@font-face { font-family: Inter; src: url('fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url('fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url('fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url('fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url('fonts/inter-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f6f9;
  --surface: #fff;
  --surface-2: #f8fafc;
  --ink: #172033;
  --muted: #6c7789;
  --line: #dfe4ec;
  --blue: #3157d5;
  --blue-dark: #253fa6;
  --blue-soft: #edf1ff;
  --violet: #7658d9;
  --green: #218459;
  --amber: #9b6516;
  --danger: #c63749;
  --radius: 18px;
  --shadow: 0 16px 46px rgba(23, 32, 51, .08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 12% 12%, #e1e8ff, transparent 35%), radial-gradient(circle at 88% 85%, #e9e1ff, transparent 31%), #f5f6fa; }
.auth-card { width: min(100%, 440px); padding: 38px; border: 1px solid rgba(23,32,51,.08); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.setup-card { width: min(100%, 550px); }
.auth-card h1 { margin: 7px 0 8px; font-size: 32px; letter-spacing: -.045em; }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #fff; font-weight: 800; background: linear-gradient(145deg, #5371e5, #263da5); box-shadow: 0 9px 24px rgba(49,87,213,.25); }
.brand-mark.small { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
.eyebrow { margin: 20px 0 0; color: var(--blue); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; }
.muted { color: var(--muted); line-height: 1.6; }
.optional { color: var(--muted); font-weight: 400; }
.help { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notice-card { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid #dbe2f8; border-radius: 12px; background: #f6f8ff; font-size: 12px; }
.notice-card span { color: var(--muted); }

.form-stack { display: grid; gap: 18px; }
.auth-card .form-stack { margin-top: 26px; }
label { display: grid; gap: 7px; color: #445068; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; min-width: 0; padding: 12px 13px; outline: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: #8aa0ea; box-shadow: 0 0 0 3px rgba(49,87,213,.1); }
input[type="file"] { padding: 9px; font-size: 12px; }
input[type="color"] { height: 48px; padding: 5px; }
.checkbox-label { display: flex; align-items: center; gap: 9px; }
.checkbox-label input { width: auto; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 13px; font-weight: 700; transition: .15s; }
.button:hover { transform: translateY(-1px); border-color: #bac3d2; box-shadow: 0 5px 14px rgba(23,32,51,.06); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 7px 18px rgba(49,87,213,.17); }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button-ghost { background: transparent; box-shadow: none; }
.button-wide { width: 100%; min-height: 47px; }
.button-large { min-height: 48px; padding: 0 21px; }
.button-small { min-height: 35px; padding: 0 12px; font-size: 12px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 20px; }
.icon-button:hover { color: var(--danger); background: #fff3f4; }

.alert { margin: 18px 0; padding: 14px 16px; border: 1px solid; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.alert-error { color: #8d2634; border-color: #f3c5cc; background: #fff0f2; }
.alert-success { color: #17653e; border-color: #bfe5cf; background: #edf9f2; }
.alert-warning { color: #80581c; border-color: #ead29f; background: #fff8e9; }

.topbar { height: 70px; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions form { margin: 0; }
.dashboard, .page-wide { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 84px; }
.page-narrow { width: min(720px, calc(100% - 36px)); margin: 0 auto; padding: 48px 0 84px; }
.page-narrow > h1, .page-heading h1 { margin: 7px 0 6px; font-size: clamp(32px, 4vw, 46px); letter-spacing: -.05em; line-height: 1.05; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.page-heading .eyebrow { margin-top: 0; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 28px; padding: 46px; overflow: hidden; border: 1px solid #d7def0; border-radius: 27px; background: linear-gradient(135deg, #fbfcff 0%, #edf1ff 65%, #e9e2ff 100%); box-shadow: 0 18px 44px rgba(45,61,125,.09); }
.hero-copy .eyebrow { margin-top: 0; }
.hero-copy h1 { max-width: 720px; margin: 8px 0 12px; font-size: clamp(38px, 5vw, 64px); line-height: .99; letter-spacing: -.06em; }
.hero-copy p:not(.eyebrow) { max-width: 680px; margin: 0 0 25px; color: #56637a; font-size: 16px; line-height: 1.65; }
.stats-card { align-self: stretch; display: grid; align-content: center; gap: 10px; padding: 22px; border: 1px solid rgba(255,255,255,.7); border-radius: 20px; background: rgba(255,255,255,.62); backdrop-filter: blur(10px); }
.stats-card div { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 5px; border-bottom: 1px solid #dde3f2; }
.stats-card div:last-child { border: 0; }
.stats-card strong { font-size: 32px; letter-spacing: -.05em; }
.stats-card .stat-cost { font-size: 20px; letter-spacing: -.03em; }
.stats-card span { color: var(--muted); font-size: 13px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 40px 0 18px; }
.section-heading .eyebrow { margin-top: 0; }
.section-heading h2 { margin: 5px 0 0; font-size: 29px; letter-spacing: -.04em; }
.section-spaced { margin-top: 55px; }
.client-tools { display: flex; align-items: center; gap: 10px; }
.client-search { min-width: 270px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 4px 14px rgba(23,32,51,.035); transition: border-color .15s, box-shadow .15s; }
.client-search:focus-within { border-color: #8da6ed; box-shadow: 0 0 0 3px rgba(47,91,211,.11); }
.client-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #7b8799; stroke-width: 1.8; stroke-linecap: round; }
.client-search input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.client-search input::placeholder { color: #8b96a8; }
.client-search input::-webkit-search-cancel-button { cursor: pointer; }
.visually-hidden { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.client-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(23,32,51,.045); }
.client-card-main { min-height: 130px; display: flex; align-items: center; gap: 16px; padding: 20px; color: inherit; text-decoration: none; }
.client-card-main > div:last-child { min-width: 0; }
.client-card-main:hover { background: #fbfcff; }
.client-logo { width: 70px; height: 70px; display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 18px; background: color-mix(in srgb, var(--brand-color), white 83%); color: var(--brand-color); font-weight: 800; }
.client-logo img { width: 100%; height: 100%; object-fit: contain; padding: 9px; }
.client-card h3 { margin: 0 0 7px; font-size: 18px; }
.client-card p { margin: 0; color: var(--muted); font-size: 12px; }
.card-actions { display: flex; gap: 7px; padding: 13px 16px; border-top: 1px solid var(--line); background: #fafbfc; }
.empty-state { min-height: 310px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px; text-align: center; border: 1px dashed #c7cfdd; border-radius: 20px; background: rgba(255,255,255,.5); }
.empty-state h2 { margin: 8px 0 0; }
.empty-state p { margin: 0 0 12px; color: var(--muted); }
.empty-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--blue-soft); color: var(--blue); font-size: 32px; }
.client-search-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; border: 1px dashed #c7cfdd; border-radius: 18px; background: rgba(255,255,255,.5); }
.client-search-empty[hidden] { display: none; }
.client-search-empty h2 { margin: 7px 0 0; font-size: 21px; }
.client-search-empty p { margin: 0; color: var(--muted); font-size: 13px; }

.jobs-list { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.job-row { min-height: 77px; display: grid; grid-template-columns: 52px minmax(180px,1fr) minmax(90px,170px) auto 25px; align-items: center; gap: 16px; padding: 13px 17px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.job-row:last-child { border: 0; }
.job-row:hover { background: #fafbfe; }
.job-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 800; }
.job-name { display: grid; gap: 5px; }
.job-name strong { font-size: 14px; }
.job-name span { color: var(--muted); font-size: 11px; }
.progress-mini, .progress-large { overflow: hidden; border-radius: 999px; background: #e9edf4; }
.progress-mini { height: 6px; }
.progress-large { height: 10px; }
.progress-mini span, .progress-large span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--violet)); transition: width .3s; }
.row-arrow { color: #9ba5b5; font-size: 20px; }
.status { display: inline-flex; align-items: center; width: max-content; padding: 5px 9px; border-radius: 999px; background: #edf0f5; color: #647084; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-completed, .status-done { color: var(--green); background: #e9f7f0; }
.status-running, .status-generating { color: var(--blue); background: var(--blue-soft); }
.status-failed, .status-error { color: var(--danger); background: #fff0f2; }
.status-partial { color: var(--amber); background: #fff6e6; }
.history-cost { display: grid; gap: 2px; justify-items: end; padding: 10px 13px; border: 1px solid #dce3f2; border-radius: 11px; background: #fff; }
.history-cost span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.history-cost strong { font-size: 14px; }
.history-cost small { color: var(--amber); font-size: 9px; }

.surface-form { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(23,32,51,.05); }
.form-section { display: grid; gap: 17px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { padding-bottom: 0; border-bottom: 0; }
.form-section h2 { margin: 0; font-size: 18px; }
.section-title { display: flex; align-items: flex-start; gap: 12px; }
.section-title > span { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 800; }
.section-title h2 { margin: 1px 0 4px; font-size: 19px; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.client-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); align-items: start; gap: 23px; }
.sticky-card { position: sticky; top: 92px; }
.existing-logo { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.existing-logo img { width: 80px; height: 58px; object-fit: contain; }
.hex-color-field { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
.hex-color-field .color-swatch { width: 50px; height: 48px; padding: 4px; border-radius: 11px; cursor: pointer; }
.hex-color-field .hex-input { height: 48px; text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .04em; }
.hex-color-field .hex-input.is-invalid { border-color: var(--danger); background: #fff7f8; }
.selected-file-name { margin-top: -2px; color: var(--green); font-size: 11px; font-weight: 600; }
.upload-box { min-height: 128px; position: relative; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; border: 2px dashed #b8c5e8; border-radius: 14px; background: #fafbff; text-align: center; color: var(--blue); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.upload-box:hover, .upload-box:focus-visible, .upload-box.dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-box.dragging { transform: scale(1.01); }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-box > span:not(.upload-icon) { color: var(--muted); font-size: 11px; font-weight: 400; }
.upload-box .upload-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 23px; font-weight: 500; }
.upload-box.dragging .upload-icon { color: #fff; background: var(--blue); }
.upload-error { padding: 10px 12px; border: 1px solid #f3c5cc; border-radius: 10px; background: #fff0f2; color: #8d2634; font-size: 11px; line-height: 1.45; }
.selected-references { display: grid; gap: 8px; }
.selected-reference { display: grid; grid-template-columns: 56px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 8px; border: 1px solid #cfd8ee; border-radius: 11px; background: #f8faff; }
.selected-reference img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #eef1f6; }
.selected-reference-info { min-width: 0; display: grid; gap: 4px; }
.selected-reference-info strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.selected-reference-info span { color: var(--muted); font-size: 10px; font-weight: 400; }
.remove-selected-file { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); cursor: pointer; font-size: 18px; }
.remove-selected-file:hover { border-color: #f0b8c0; background: #fff0f2; color: var(--danger); }
.selected-references-note { margin: 1px 0 0; color: var(--green); font-size: 10px; line-height: 1.45; }
.references-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.reference-thumb { overflow: hidden; gap: 0; border: 1px solid var(--line); border-radius: 11px; background: #f2f4f8; }
.reference-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.reference-thumb span { display: flex; align-items: center; gap: 5px; padding: 7px; color: var(--muted); font-size: 10px; font-weight: 500; }
.reference-thumb input { width: auto; }
.mini-empty { padding: 22px; border-radius: 12px; background: #f6f7fa; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.55; }
.profile-ready { display: grid; gap: 5px; padding: 14px; border: 1px solid #c4e6d2; border-radius: 12px; background: #eff9f3; color: var(--green); font-size: 12px; }
.profile-ready span { color: #4e6b5b; line-height: 1.45; }

.batch-page { max-width: 1120px; }
.brand-chip { padding: 9px 13px; border-left: 4px solid var(--brand-color); border-radius: 9px; background: #fff; box-shadow: 0 5px 15px rgba(23,32,51,.05); color: var(--muted); font-size: 12px; font-weight: 700; }
.mode-lock { display: grid; align-content: center; gap: 4px; padding: 12px 14px; border: 1px solid #cbd7fb; border-radius: 11px; background: var(--blue-soft); font-size: 12px; }
.mode-lock strong { color: var(--blue); }
.mode-lock span { color: var(--muted); font-size: 10px; }
.briefs-section { display: grid; gap: 17px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(23,32,51,.05); }
#brief-list { display: grid; gap: 13px; }
.brief-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) 36px; align-items: start; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fafbfc; }
.brief-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.brief-fields { display: grid; gap: 13px; }
.add-brief { justify-self: start; }
.add-brief span { color: var(--muted); font-size: 10px; }
.submit-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; border: 1px solid #cdd7f3; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 12px 34px rgba(23,32,51,.13); backdrop-filter: blur(12px); }
.submit-bar div { display: grid; gap: 4px; font-size: 13px; }
.submit-bar span { color: var(--muted); font-size: 11px; }

.job-page { max-width: 1320px; }
.queue-summary { display: grid; grid-template-columns: minmax(210px,auto) minmax(150px,1fr) auto minmax(220px,auto); align-items: center; gap: 22px; padding: 20px 23px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.queue-status { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.queue-status .status { grid-row: 1 / 3; }
.queue-status strong { font-size: 14px; }
.queue-status > span:last-child { color: var(--muted); font-size: 10px; }
.queue-cost { display: grid; gap: 3px; padding-left: 18px; border-left: 1px solid var(--line); }
.queue-cost > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.queue-cost strong { font-size: 14px; white-space: nowrap; }
.queue-cost small { max-width: 155px; color: var(--amber); font-size: 9px; line-height: 1.35; }
.worker-message { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); text-align: right; font-size: 11px; }
.worker-error { color: var(--danger); }
.spinner { width: 34px; height: 34px; display: inline-block; flex: none; border: 3px solid #dce3f5; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.small-spinner { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; margin-top: 24px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 7px 22px rgba(23,32,51,.045); }
.result-preview { position: relative; display: grid; place-items: center; aspect-ratio: 1 / .9; overflow: hidden; background: #eef1f6; }
.result-preview > img { width: 100%; height: 100%; object-fit: contain; }
.revision-overlay { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; background: rgba(18,25,41,.72); color: #fff; text-align: center; backdrop-filter: blur(2px); }
.revision-overlay strong { font-size: 13px; }
.revision-overlay small { color: rgba(255,255,255,.78); font-size: 10px; }
.generating-visual, .queued-visual, .error-visual { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 11px; text-align: center; color: var(--muted); }
.generating-visual strong, .queued-visual strong, .error-visual strong { color: var(--ink); font-size: 13px; }
.generating-visual small { font-size: 10px; }
.queued-visual > span, .error-visual > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #fff; color: var(--blue); font-size: 20px; font-weight: 800; box-shadow: 0 5px 15px rgba(23,32,51,.08); }
.error-visual > span { color: var(--danger); }
.result-info { padding: 18px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-no { color: var(--muted); font-size: 10px; font-weight: 800; }
.result-info h2 { margin: 11px 0 6px; font-size: 17px; line-height: 1.3; }
.result-info > p { min-height: 34px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.item-cost { display: grid; gap: 3px; margin-top: 11px; padding: 9px 10px; border: 1px solid #dce3f2; border-radius: 9px; background: #f7f9fd; color: #536076; font-size: 10px; line-height: 1.4; }
.item-cost strong { color: var(--ink); font-size: 10px; }
.item-cost span { color: var(--amber); font-size: 9px; }
.item-error { margin: 12px 0; padding: 10px; border-radius: 9px; background: #fff1f3; color: var(--danger); font-size: 10px; line-height: 1.45; }
.revision-error { background: #fff8e9; color: #80581c; }
.download-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.revision-form { display: grid; gap: 10px; margin-top: 12px; padding: 13px; border: 1px solid #cbd7fb; border-radius: 11px; background: #f6f8ff; }
.revision-form[hidden] { display: none; }
.revision-form textarea { min-height: 82px; resize: vertical; }
.revision-form > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.revision-form > div { display: flex; flex-wrap: wrap; gap: 7px; }
.canva-note { display: flex; gap: 15px; margin-top: 28px; padding: 20px; border: 1px solid #d8cffa; border-radius: 17px; background: #f7f4ff; }
.canva-badge { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 13px; background: linear-gradient(145deg, #7e5ce3, #416cd8); color: #fff; font-size: 20px; font-weight: 800; }
.canva-note p { margin: 5px 0 0; color: #625d74; font-size: 12px; line-height: 1.55; }

@media (max-width: 900px) {
  .hero-grid, .client-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .queue-summary { grid-template-columns: 1fr; gap: 14px; }
  .queue-cost { padding-left: 0; border-left: 0; }
  .worker-message { justify-content: flex-start; text-align: left; }
}
@media (max-width: 680px) {
  .topbar { height: auto; min-height: 66px; padding: 12px 15px; }
  .topbar .brand > span:last-child { display: none; }
  .header-actions { gap: 5px; }
  .header-actions .button { padding: 0 10px; }
  .dashboard, .page-wide { width: min(100% - 28px, 1240px); padding-top: 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .clients-heading { align-items: stretch; flex-direction: column; }
  .client-tools { width: 100%; align-items: stretch; }
  .client-search { min-width: 0; flex: 1; }
  .hero-grid { padding: 27px; }
  .hero-copy h1 { font-size: 39px; }
  .two-cols, .three-cols { grid-template-columns: 1fr; }
  .job-row { grid-template-columns: 46px 1fr auto; }
  .job-row .progress-mini, .job-row .status { display: none; }
  .client-grid, .results-grid { grid-template-columns: 1fr; }
  .brief-card { grid-template-columns: 34px minmax(0,1fr); padding: 14px; }
  .brief-card .remove-brief { grid-column: 1 / -1; justify-self: end; }
  .submit-bar { align-items: stretch; flex-direction: column; bottom: 8px; }
  .surface-form, .briefs-section { padding: 20px; }
}
