@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0c0f14;
  --foreground: #f5f5f7;
  --card: #12161c;
  --card-foreground: #f5f5f7;
  --primary: #4f5bf5;
  --primary-foreground: #ffffff;
  --primary-hover: #4652e5;
  --secondary: #25282d;
  --secondary-foreground: #f5f5f7;
  --muted: #20242b;
  --muted-foreground: #a4a7ae;
  --accent: #292d35;
  --accent-foreground: #ffffff;
  --destructive: #ffb0b8;
  --border: #2c3038;
  --input: #3d424c;
  --input-background: #25282d;
  --ring: #9ba3ff;
  --radius: .875rem;
}

* { box-sizing: border-box; border-color: var(--border); }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: Vazirmatn, Tahoma, sans-serif; line-height: 1.9; }
a { color: inherit; text-decoration: none; }
@layer base {
:where(button, input, textarea, select) { font: inherit; }
button:not([data-slot="button"]), .button { border: 1px solid transparent; border-radius: var(--radius); background: var(--primary); color: var(--primary-foreground); min-height: 42px; padding: 9px 17px; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.65; transition: background-color .15s, box-shadow .15s; }
button:not([data-slot="button"]):hover, .button:hover { background: var(--primary-hover); }
:where(button):disabled { opacity: .5; cursor: wait; }
}
.secondary { color: var(--secondary-foreground); background: var(--secondary); border-color: var(--border); }
.secondary:hover { background: var(--accent); }
.text-button { background: transparent; color: var(--foreground); padding: 7px 10px; border-color: transparent; }
.text-button:hover { background: var(--accent); }
:where(button, a, summary):focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; inset-inline-start: 16px; transform: translateY(-150%); background: var(--primary); color: white; padding: 8px 16px; border-radius: var(--radius); z-index: 100; }
.skip-link:focus { transform: translateY(0); }
.topbar { max-width: 1240px; margin: auto; padding: 18px 28px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; color: var(--foreground); background: var(--secondary); }
.brand-mark svg { width: 25px; height: 25px; }
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted-foreground); }
nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
nav form { margin: 0; }
.desktop-navigation { gap: 4px; }
.mobile-navigation { display: none; }
.fallback-navigation { gap: 16px; font-size: 13px; }
.fallback-navigation [aria-current=page] { font-weight: 700; }
.navigation-sheet { width: min(340px, 88vw); padding-top: 56px; overflow-y: auto; }
.navigation-sheet > button { right: auto; left: 16px; min-height: 32px; padding: 8px; background: transparent; color: var(--foreground); }
.sheet-links { flex-direction: column; align-items: stretch; margin: 28px 0; }
.sheet-links form { width: 100%; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.shell { max-width: 1184px; margin: auto; padding: 32px 24px 60px; min-height: calc(100dvh - 170px); }
body[data-admin=false] .shell { max-width: 1060px; }
:where(h1) { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.6; margin: 8px 0; letter-spacing: -.5px; overflow-wrap: anywhere; }
:where(h2) { font-size: 20px; font-weight: 600; line-height: 1.8; margin: 6px 0 14px; }
:where(h3) { font-size: 17px; font-weight: 600; margin: 8px 0; }
:where(p) { margin: 10px 0; overflow-wrap: anywhere; }
.muted, small { color: var(--muted-foreground); }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); padding: 24px; border-radius: 14px; margin-bottom: 20px; min-width: 0; box-shadow: 0 1px 3px #00000020; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 12px 0 28px; }
.page-heading > div { min-width: 0; }
.page-heading .button { flex-shrink: 0; }
.notice { background: #282319; color: #eacb8c; border: 1px solid #4d412b; border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 22px; }
.alert { background: #2c181f; color: var(--destructive); border: 1px solid #61313d; padding: 14px; border-radius: var(--radius); margin-bottom: 16px; }
.quota-grid, .request-grid, .scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quota-grid .card { padding: 18px; margin-bottom: 0; }
.quota-grid strong { display: block; font-size: 27px; margin-top: 8px; font-weight: 600; }
.request-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.request-card { display: block; transition: border-color .15s, box-shadow .15s; }
.request-card:hover { border-color: #6870ba; box-shadow: 0 4px 14px #00000030; }
.request-card h2 { font-size: 20px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--border); background: var(--secondary); color: var(--secondary-foreground); border-radius: 7px; padding: 3px 10px; font-size: 12px; font-weight: 500; white-space: normal; }
.narrow { max-width: 450px; margin: 44px auto; }
.login { padding: 32px; }
.login h1 { font-size: 26px; }
.login form > button { width: 100%; margin-top: 26px; }
.form-card { max-width: 740px; margin-inline: auto; }
label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 500; }
:where(input, select, textarea) { width: 100%; max-width: 100%; background: var(--input-background); border: 1px solid var(--input); border-radius: var(--radius); padding: 10px 12px; color: var(--foreground); font-size: 14px; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: 1; }
input[type=hidden] { display: none; }
textarea { resize: vertical; min-height: 100px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
form > button { margin-top: 18px; }
nav form > button { margin-top: 0; }
details { margin-top: 16px; }
summary { cursor: pointer; font-size: 14px; font-weight: 500; padding: 8px 0; }
ol { list-style: decimal; padding-inline-start: 23px; }
li { padding-bottom: 12px; }
progress { width: 100%; height: 10px; accent-color: var(--primary); border-radius: 20px; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--muted); border-radius: 20px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 20px; }
.output-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.output-card { padding: 16px; }
.output-card img { width: 100%; height: auto; border-radius: 10px; display: block; margin: 10px 0 14px; aspect-ratio: 9/16; object-fit: contain; background: var(--muted); }
.caption { white-space: pre-wrap; }
.image-pending { aspect-ratio: 9/16; background: var(--muted); border: 1px dashed var(--input); border-radius: 10px; display: grid; place-items: center; color: var(--muted-foreground); text-align: center; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 660px; margin: auto; }
.comparison figure { margin: 0; }
.comparison img { width: 100%; height: auto; border-radius: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.technical { direction: ltr; text-align: left; font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.job { border-bottom: 1px solid var(--border); padding: 14px 0; }
.hide-form { margin: 28px 0; }
.hide-form small { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; }
.filter-grid label { margin-top: 0; }
.user-form { max-width: 650px; }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--primary); }
.profile-item { border-top: 1px solid var(--border); padding-top: 14px; }
.pagination { justify-content: center; margin: 24px; color: var(--muted-foreground); font-size: 13px; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; color: var(--foreground); }
.empty { text-align: center; padding: 55px 20px; margin-top: 24px; border-style: dashed; box-shadow: none; }
.back { display: inline-block; font-size: 13px; color: var(--ring); margin-bottom: 8px; }
.toast { position: fixed; bottom: 25px; inset-inline: 20px; margin: auto; max-width: 420px; background: var(--secondary); border: 1px solid var(--input); color: var(--foreground); border-radius: var(--radius); padding: 12px 20px; text-align: center; box-shadow: 0 4px 20px #00000050; z-index: 60; }
footer { padding: 20px; text-align: center; color: var(--muted-foreground); font-size: 12px; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
  .desktop-navigation { display: none; }
  .mobile-navigation { display: block; }
  .topbar { padding: 16px 20px; gap: 12px; }
  .brand { font-size: 17px; }
  .fallback-navigation { gap: 8px; font-size: 12px; }
  .topbar:has(.fallback-navigation) { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .shell { padding: 22px 16px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .quota-grid { gap: 8px; }
  .quota-grid .card { padding: 12px 8px; }
  .quota-grid strong { font-size: 19px; }
  .quota-grid small { font-size: 10px; }
  .request-grid, .scenario-grid { grid-template-columns: 1fr; }
  .output-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .output-card { padding: 12px; }
  .output-card h3 { font-size: 16px; }
  .output-card .button { font-size: 12px; padding: 9px; }
  .card { padding: 20px; border-radius: 12px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .narrow { margin: 20px auto; }
  .comparison { gap: 10px; }
}
@media (max-width: 440px) {
  .output-grid, .filter-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .login { padding: 24px; }
  .brand-mark { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.model-call-content { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 65vh; overflow: auto; text-align: start; font-size: 13px; line-height: 1.9; }

/* Customer request workspace. Only the selected Razor section is rendered. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.compact-user-page .shell { max-width: 760px !important; padding-top: 18px; }
.compact-user-page .topbar { padding-block: 12px; }
.compact-user-page .page-heading { margin: 0 0 16px; }
.compact-user-page .page-heading h1 { font-size: 24px; }
.compact-user-page .request-card { margin-bottom: 0; padding: 16px; }
.compact-user-page .request-card h2 { margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; }
.compact-user-page input, .compact-user-page select, .compact-user-page textarea { font-size: 16px; }
.compact-user-page :where(button, .button, summary) { min-height: 44px; }
.compact-user-page .quota-grid small { font-size: 12px; }
.quota-summary { margin: 12px 0; }
.quota-summary summary { font-size: 14px; }
.compact-card { padding: 16px; margin-bottom: 14px; }
.compact-card h2 { font-size: 20px; }
.request-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.request-meta .back { margin: 0; }
.request-header .eyebrow { display: block; margin-top: 6px; }
.request-topic { font-size: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 10px; }
.request-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 12px 0 8px; }
.request-tabs a, .request-modes a { display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; padding: 6px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--secondary); font-size: 14px; }
.request-tabs a[aria-current=page], .request-modes a[aria-current=page] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.request-live { font-size: 12px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-bottom: 8px; }
.request-live .request-update { width: 100%; padding-block: 8px; }
.request-mode { margin: 4px 0 10px; font-size: 12px; }
.request-mode summary { font-size: 12px; padding: 2px 0; min-height: 28px; }
.request-content > h2 { font-size: 20px; }
.request-review { margin: 6px 0 12px; }
.request-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: nowrap; }
.request-pagination > span { font-size: 13px; text-align: center; }
.request-pagination .button { font-size: 13px; padding: 8px 10px; flex-shrink: 0; }
.slide-selector { display: flex; flex: 1; gap: 6px; min-width: 0; }
.slide-selector select { min-width: 0; }
.slide-selector button { margin: 0; padding: 6px; }
.page-disabled { border: 1px solid var(--border); min-height: 44px; padding: 8px 10px; border-radius: 8px; opacity: .5; }
.request-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.single-output { padding: 0; }
.single-output .slide-image-link { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.single-output img { width: auto; max-width: 100%; height: clamp(160px, 36svh, 360px); aspect-ratio: 9/16; object-fit: contain; margin: 4px auto; border: 1px solid var(--border); }
.single-image-pending { height: clamp(160px, 36svh, 360px); width: auto; max-width: 100%; margin: 12px auto; }
.text-pending { aspect-ratio: auto; padding: 24px; }
.output-actions { justify-content: center; gap: 8px; margin-top: 12px; align-items: flex-start; }
.output-actions > .button { font-size: 13px; padding-inline: 10px; }
.download-menu { border: 1px solid var(--border); background: var(--secondary); border-radius: 8px; padding: 0 10px; margin: 0; }
.download-menu summary { min-height: 44px; }
.download-menu[open] { flex-basis: 100%; }
.download-menu .actions { padding-bottom: 12px; }
.scenario-scene { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.request-primary-action { margin: 12px 0; }
.request-primary-action > button { margin: 0; width: 100%; }
.edit-preview, .approval-image img { display: block; width: auto; max-width: 100%; height: clamp(160px, 30svh, 320px); object-fit: contain; margin: 10px auto; border-radius: 8px; }
.approval-image { margin: 10px 0; text-align: center; }
.approval-image figcaption { font-size: 12px; color: var(--muted-foreground); }
.post-preview.is-collapsed { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.image-preview { background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: 12px; max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 12px; }
.image-preview::backdrop { background: #000c; }
.image-preview img { display: block; width: auto; max-width: 100%; height: min(76dvh, 900px); object-fit: contain; margin-top: 12px; }
.wizard-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.wizard-steps button[aria-current=step] { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
[data-request-wizard] fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
[data-request-wizard] legend { font-size: 16px; }
[data-request-wizard] [data-wizard-next] { margin-top: 18px; width: 100%; }
[data-request-wizard] .actions { margin-top: 18px; }
.profile-workspace { max-width: 640px; margin: auto; }
.profile-add, .profile-item { margin-top: 12px; }
.profile-item { padding-top: 12px; }
@media (max-width: 440px) {
  .compact-user-page .shell { padding: 12px 12px 24px; }
  .compact-user-page .topbar { padding: 10px 12px; }
  .compact-user-page .brand small { display: none; }
  .compact-card { padding: 14px; }
  .request-tabs a { font-size: 13px; }
  .request-pagination { gap: 4px; }
  .request-pagination .button { padding: 8px 6px; font-size: 12px; }
  .request-pagination > span { font-size: 12px; }
  .request-meta .back { font-size: 12px; }
  .compact-user-page footer { padding: 12px; }
}
.video-settings { display: grid; gap: 1rem; }
.video-reset { display: flex; align-items: center; gap: .5rem; }
.video-reset input { width: auto; }
.video-slide { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--border, #ddd); padding-block: 1rem; }
.video-slide img { width: 80px; height: auto; border-radius: .5rem; }
.video-cues { padding-inline-start: 1.5rem; overflow-wrap: anywhere; }
.video-cue-line { display: block; }
.video-cues p { margin-top: .2rem; }
.video-result { border-top: 1px solid var(--border, #ddd); padding-block: 1rem; }
.video-player { display: block; width: 100%; max-width: 320px; max-height: 70vh; margin-block: 1rem; background: #111; }
@media (max-width: 400px) { .video-slide { grid-template-columns: 60px minmax(0, 1fr); gap: .6rem; } .video-slide img { width: 60px; } }
