@font-face {
    font-family: "Yekan Bakh";
    src: url("fonts/yekan-bakh-regular.woff2") format("woff2"),
         url("fonts/yekan-bakh-regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root {
    color-scheme: light;
    --navy: #0f2640;
    --navy-2: #16324f;
    --navy-3: #1d3b5e;
    --navy-text: #b7c7d8;
    --navy-muted: #7390ad;
    --blue: #1f5fa6;
    --blue-dark: #174b85;
    --blue-soft: #e6f0fa;
    --teal: #1aa6a0;
    --teal-dark: #13837e;
    --teal-soft: #dcf2f1;
    --ink: #172d43;
    --text: #33475b;
    --muted: #627587;
    --line: #e1e7ee;
    --field: #cbd8e5;
    --surface: #ffffff;
    --background: #eef2f6;
    --ok: #1c7d54;
    --ok-soft: #e4f4ec;
    --warn: #93650f;
    --warn-soft: #fcf1dc;
    --bad: #a03543;
    --bad-soft: #fbe9ec;
    --radius: 12px;
    --shadow: 0 1px 2px #10233a14, 0 1px 1px #10233a0a;
    --shadow-lg: 0 14px 34px #10233a1f;
    --page: 1080px;
    font-family: "Yekan Bakh", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink);
    background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #6caae9;
    outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.6; }
h2 { font-size: 1.02rem; line-height: 1.7; }
h3 { font-size: .92rem; }
small { font-size: .8rem; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted, .fine-print { color: var(--muted); }
.fine-print { font-size: .78rem; }
.eyebrow { color: var(--teal-dark); font-size: .78rem; margin-bottom: 2px; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -90px; right: 16px; z-index: 50; background: white; padding: 10px 20px; border-radius: 8px; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }

.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 10; width: 248px; background: var(--navy); color: #dbe6f2; display: flex; flex-direction: column; gap: 28px; padding: 26px 16px 18px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 1.12rem; padding: 0 8px; }
.brand-mark { display: block; width: 42px; height: 42px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px #ffffff26, 0 6px 16px #0006; }
.brand-mark .logo { display: block; width: 100%; height: 100%; }
.login-card .brand-mark { box-shadow: 0 6px 16px #0f264033; }
.brand-text small { display: block; color: var(--navy-muted); font-size: .7rem; line-height: 1.3; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--navy-text); font-size: .87rem; transition: background .15s, color .15s; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.selected { background: var(--navy-3); color: #fff; box-shadow: inset -3px 0 0 #3fb6d9; }
.nav a .icon { opacity: .85; }
.nav-label { font-size: .7rem; color: var(--navy-muted); padding: 16px 12px 4px; }
.account { margin-top: auto; display: flex; align-items: center; gap: 10px; background: var(--navy-2); border-radius: 12px; padding: 10px 12px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #24476d; color: #cfe3f6; font-size: .85rem; flex: none; }
.account-text { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.account-text strong { font-size: .84rem; font-weight: normal; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { color: var(--navy-muted); font-size: .7rem; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--navy-text); }
.icon-button:hover { background: var(--navy-3); color: #fff; }

.workspace { margin-right: 248px; min-height: 100vh; padding: 0 32px 64px; }
.page-heading { margin: 0 -32px; padding: 26px max(32px, calc((100% + 64px - var(--page)) / 2)) 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-heading-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-title { min-width: 0; }
.page-subtitle { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-body { max-width: var(--page); margin: 0 auto; padding-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
.page-body > * { min-width: 0; }

.guest-workspace { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 18px; background: radial-gradient(circle at 85% 10%, #1d4a78 0, transparent 45%), radial-gradient(circle at 10% 90%, #11605d 0, transparent 40%), var(--navy); }
.guest-workspace > .alert { width: min(100%, 440px); }
.login-card { background: var(--surface); border-radius: 18px; padding: 34px 32px; width: min(100%, 440px); box-shadow: 0 30px 80px #0008; }
.login-card .brand { color: var(--ink); padding: 0; margin-bottom: 22px; }
.login-card .brand-text small { color: var(--muted); }
.login-card h1 { font-size: 1.35rem; }
.login-card .form-stack { margin-top: 22px; }
.login-card .fine-print { margin-top: 18px; }
.login-card .button { width: 100%; }
.error-code { display: inline-grid; place-items: center; min-width: 64px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 1rem; margin-bottom: 14px; }
.login-card .error-actions { margin-top: 22px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.panel > h2 { margin-bottom: 14px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; }
.section-title { display: flex; gap: 10px; align-items: center; }
.section-title h2 { margin: 0; }
.step-dot { display: inline-grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 50%; width: 26px; height: 26px; font-size: .76rem; flex: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); border: 1px solid var(--blue); color: #fff; border-radius: 10px; padding: 9px 20px; font-size: .86rem; text-align: center; line-height: 1.8; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button .icon { width: 17px; height: 17px; }
.button.secondary { background: var(--surface); color: var(--blue); border-color: var(--field); }
.button.secondary:hover { background: var(--blue-soft); border-color: #b7cde4; }
.button.success { background: var(--ok); border-color: var(--ok); }
.button.success:hover { background: #166444; border-color: #166444; }
.button.danger-button { background: var(--surface); color: var(--bad); border-color: #e6c1c4; }
.button.danger-button:hover { background: var(--bad-soft); }
.button.small { padding: 4px 13px; font-size: .78rem; border-radius: 8px; }
.button.large { padding: 11px 28px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: .82rem; }
.text-button:hover, .table-link:hover { text-decoration: underline; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.table-link { font-size: .8rem; white-space: nowrap; }

.form-stack { display: grid; gap: 20px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: .85rem; }
label small { color: var(--muted); }
.field { display: grid; gap: 7px; min-width: 0; }
.field-label { color: var(--ink); font-size: .85rem; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field-note { color: var(--muted); font-size: .76rem; }
.char-count { color: var(--muted); font-size: .72rem; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; color: var(--ink); border: 1px solid var(--field); border-radius: 10px; background: #fff; padding: 9px 12px; line-height: 1.8; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { border-color: #6caae9; box-shadow: 0 0 0 3px #6caae933; outline: none; }
input::placeholder, textarea::placeholder { color: #8394a6; font-size: .83rem; }
textarea { resize: vertical; min-height: 110px; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.form-panel { max-width: 860px; display: grid; gap: 14px; }
.form-panel > h2 { margin: 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: .82rem; color: var(--text); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); flex: 0 0 auto; margin: 5px 0 0; }

.alert { display: flex; align-items: flex-start; gap: 10px; background: var(--warn-soft); border: 1px solid #ecd6a6; border-radius: 10px; padding: 12px 16px; color: #6f4c0c; font-size: .85rem; }
.alert .icon { margin-top: 4px; }
.alert p { margin: 4px 0; }
.alert ul { margin: 4px 0 0; padding-right: 20px; }
.alert.success { background: var(--ok-soft); color: #165c3f; border-color: #bfe0cf; }
.alert.danger { background: var(--bad-soft); color: #8d2c39; border-color: #ecc5cb; }
.form-stack .alert { margin: 0; }
.error-text { color: var(--bad); }

.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 11px; font-size: .74rem; white-space: nowrap; line-height: 1.9; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.pending { color: var(--warn); background: var(--warn-soft); }
.badge.approved, .badge.active { color: var(--ok); background: var(--ok-soft); }
.badge.declined, .badge.inactive { color: var(--bad); background: var(--bad-soft); }
.badge.neutral, .badge.draft { color: #40556a; background: #eef2f6; }
.badge.large { font-size: .82rem; padding: 4px 14px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats-grid.three-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: grid; align-content: start; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; color: var(--ink); }
.stat span { color: var(--muted); font-size: .78rem; }
.stat strong { font-size: 1.75rem; font-weight: normal; line-height: 1.6; }
.stat small { color: var(--muted); font-size: .74rem; }
a.stat { color: var(--ink); transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: #b7cde4; transform: translateY(-1px); }
.stat.accent { border-top: 3px solid var(--teal); }
.stat.accent strong { color: var(--teal-dark); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: #40556a; border-radius: 999px; padding: 3px 14px; font-size: .8rem; box-shadow: var(--shadow); }
.chip:hover { border-color: #b7cde4; }
.chip.selected { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip b { font-weight: normal; opacity: .7; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter-drawer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-drawer > summary { display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer; list-style: none; color: #40556a; font-size: .84rem; }
.filter-drawer > summary::-webkit-details-marker { display: none; }
.filter-drawer > summary .count { background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 0 9px; font-size: .72rem; }
.filter-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; gap: 14px; padding: 16px; }
.filter-actions { display: flex; gap: 14px; align-items: center; }
.search-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, .45fr) auto; gap: 16px; align-items: end; }

.table-panel { padding: 0; overflow: hidden; }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: .82rem; }
th { color: var(--muted); background: #f6f8fb; font-weight: normal; white-space: nowrap; padding: 11px 18px; font-size: .74rem; }
td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--text); }
tbody tr:hover td { background: #fafcfe; }
td strong { font-weight: normal; color: var(--ink); }
td small { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; }
td small.error-text { color: var(--bad); }
.sample-id { color: var(--blue); direction: ltr; unicode-bidi: isolate; }
.transcript-cell { min-width: 200px; max-width: 380px; overflow-wrap: anywhere; }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.table-actions form { display: inline; }
.table-actions button { white-space: nowrap; }
.empty-state { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 44px 24px; }
.empty-state .icon { width: 34px; height: 34px; color: #9fb3c8; margin-bottom: 4px; }
.empty-state p { color: var(--muted); font-size: .85rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: .82rem; color: var(--muted); }

.queue { display: grid; }
.queue-item { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 14px 4px; color: var(--ink); }
.queue-item:first-child { border-top: 0; padding-top: 4px; }
.queue-item:hover .queue-content strong { color: var(--blue); }
.sample-number { color: var(--blue); font-size: .76rem; background: var(--blue-soft); border-radius: 8px; padding: 6px 9px; direction: ltr; unicode-bidi: isolate; }
.queue-content { flex: 1; display: grid; gap: 1px; min-width: 0; }
.queue-content strong { font-size: .88rem; font-weight: normal; }
.queue-content small, .queue-content > span { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .84rem; color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.steps .dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--background); font-size: .78rem; flex: none; transition: background .2s, color .2s; }
.steps .dot .icon { width: 15px; height: 15px; stroke-width: 2.6; display: none; }
.steps small { display: block; font-size: .7rem; color: var(--muted); line-height: 1.3; }
.steps li.is-current { border-color: var(--teal); color: var(--ink); box-shadow: 0 0 0 3px var(--teal-soft); }
.steps li.is-current .dot { background: var(--teal); color: #fff; }
.steps li.is-done { color: var(--ink); }
.steps li.is-done .dot { background: var(--ok-soft); color: var(--ok); }
.steps li.is-done .dot span { display: none; }
.steps li.is-done .dot .icon { display: block; }

.compose-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 22px; }
.compose-card { display: grid; gap: 20px; }
.guide-stack { position: sticky; top: 20px; display: grid; gap: 14px; min-width: 0; }
.guide-stack .panel { padding: 20px; display: grid; gap: 12px; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tips li { display: flex; gap: 10px; font-size: .79rem; color: var(--text); line-height: 1.75; }
.tip-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); flex: none; }
.tip-icon .icon { width: 15px; height: 15px; }
.rule-card { background: var(--blue-soft); border-color: #d3e3f4; box-shadow: none; }
.rule-card p { font-size: .79rem; color: var(--text); }
.rule-yes, .rule-no { display: block; padding: 6px 10px; border-radius: 8px; font-size: .79rem; }
.rule-yes { background: var(--ok-soft); color: var(--ok); }
.rule-no { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.submit-row p { color: var(--muted); font-size: .78rem; }

.audio-source { display: grid; gap: 14px; }
#recording-form.has-audio .audio-source { display: none; }
.recorder-box { display: grid; justify-items: center; gap: 8px; text-align: center; background: #f7fafd; border: 1px dashed #bdcfe1; border-radius: var(--radius); padding: 24px 18px; }
.recorder-box strong { font-size: .9rem; font-weight: normal; }
.recorder-box .muted { font-size: .76rem; }
.record-button { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; border: 7px solid #e1ecf8; background: var(--blue); color: white; transition: background .15s; }
.record-button:hover { background: var(--blue-dark); }
.record-button .icon { width: 26px; height: 26px; }
.record-button.is-recording { background: #b72f45; border-color: #f7e1e6; animation: record-pulse 1.6s ease-in-out infinite; }
.timer { font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: 3px; }
.upload-drop { position: relative; display: grid; justify-items: center; gap: 2px; padding: 16px; text-align: center; background: #fbfcfe; border: 1px dashed #bdcfe1; border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-drop:hover, .upload-drop.is-dragging { border-color: var(--blue); background: #f1f6fc; }
.upload-drop:focus-within { outline: 3px solid #6caae9; outline-offset: 2px; }
.upload-drop:has(.upload-input:disabled) { opacity: .55; cursor: not-allowed; }
.upload-drop input.upload-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.upload-icon { width: 24px; height: 24px; color: var(--blue); }
.upload-text { color: var(--text); font-size: .84rem; }
.upload-text strong { color: var(--blue); font-weight: normal; }
.upload-hint { color: var(--muted); font-size: .72rem; }
.audio-preview { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(180deg, #f5fbf8, #fff); border: 1px solid #cde8da; }
.audio-ready-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.audio-ready-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ready-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; flex: none; }
.ready-mark .icon { width: 16px; height: 16px; stroke-width: 2.8; }
.audio-ready-title strong { display: block; font-weight: normal; font-size: .9rem; }
.audio-ready-title p { color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; line-height: 1.6; }
.audio-ready-actions { display: flex; gap: 8px; flex-wrap: wrap; }
audio { width: 100%; max-width: 100%; display: block; }
.audio-player { display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; background: #f7fafd; border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px 9px 9px; }
.audio-preview .audio-player { background: #fff; }
.audio-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 4px 12px #1f5fa633; transition: background .15s, transform .15s; }
.audio-play:hover { background: var(--blue-dark); }
.audio-play:active { transform: scale(.95); }
.audio-icon { width: 18px; height: 18px; fill: currentColor; }
.audio-wave { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 3px; cursor: pointer; touch-action: none; border-radius: 6px; }
.audio-wave i { flex: 1; min-width: 2px; border-radius: 3px; background: #c9d7e6; transition: background .12s; }
.audio-wave i.is-played { background: var(--blue); }
.audio-wave.is-loading i { opacity: .55; }
.audio-wave:hover i:not(.is-played) { background: #b6c8db; }
.audio-time { flex: none; color: var(--muted); font-size: .78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.audio-time strong { color: var(--ink); font-weight: normal; }
.audio-speed { flex: none; min-width: 48px; border: 1px solid var(--field); border-radius: 20px; background: #fff; color: #40556a; padding: 2px 10px; font-size: .74rem; line-height: 1.8; transition: border-color .15s, color .15s; }
.audio-speed:hover { border-color: var(--blue); color: var(--blue); }

.category-picker { position: relative; }
.category-picker select.is-enhanced { position: absolute; inset-inline: 0; bottom: 0; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.category-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; color: var(--ink); text-align: right; border: 1px solid var(--field); border-radius: 10px; background: #fff; padding: 8px 12px; line-height: 1.7; }
.category-trigger[aria-expanded=true] { border-color: #6caae9; box-shadow: 0 0 0 3px #6caae933; }
.category-picker.is-invalid .category-trigger { border-color: #c2413b; }
.category-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.category-placeholder { color: #8394a6; font-size: .85rem; }
.category-name { font-size: .86rem; }
.category-hint { color: var(--muted); font-size: .72rem; }
.category-chevron { flex: none; width: 18px; height: 18px; fill: none; stroke: #627587; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.category-trigger[aria-expanded=true] .category-chevron { transform: rotate(180deg); }
.category-list { position: absolute; z-index: 20; top: calc(100% + 6px); inset-inline: 0; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--field); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; }
.category-list:focus { outline: none; }
.category-option { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.category-option.is-active { background: var(--blue-soft); }
.category-option[aria-selected=true] .category-name { color: var(--blue); }
.category-error { margin-top: -2px; }
.multi-picker { position: relative; }
.multi-picker select.is-enhanced { position: absolute; inset-inline: 0; bottom: 0; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.multi-control { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; border: 1px solid var(--field); border-radius: 10px; background: #fff; padding: 6px 8px 6px 12px; cursor: pointer; }
.multi-picker.is-open .multi-control, .multi-control:focus-within { border-color: #6caae9; box-shadow: 0 0 0 3px #6caae933; }
.multi-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.multi-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--blue-dark); border-radius: 999px; padding: 2px 10px 2px 4px; font-size: .8rem; line-height: 1.8; }
.multi-chip-remove { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1rem; line-height: 1; padding: 0; }
.multi-chip-remove:hover { background: #cfe0f3; }
.multi-toggle { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; padding: 0; }
.multi-picker.is-open .category-chevron { transform: rotate(180deg); }
.multi-panel { position: absolute; z-index: 20; top: calc(100% + 6px); inset-inline: 0; background: #fff; border: 1px solid var(--field); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 6px; }
.multi-panel .multi-search { padding: 7px 12px; }
.multi-list { position: static; border: 0; box-shadow: none; padding: 0; max-height: 280px; }
.multi-option { align-items: center; }
.multi-option[hidden] { display: none; }
.multi-check { flex: none; width: 18px; height: 18px; border: 1.5px solid #9fb3c8; border-radius: 5px; background: #fff; position: relative; }
.multi-option[aria-selected=true] .multi-check { background: var(--blue); border-color: var(--blue); }
.multi-option[aria-selected=true] .multi-check::after { content: ""; position: absolute; inset: 2px 5px 5px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.multi-empty { font-size: .8rem; padding: 4px 8px; }
.done-mark { color: var(--ok) !important; }
.optional-tag { color: var(--muted); font-size: .7rem; background: var(--background); border-radius: 999px; padding: 1px 8px; margin-inline-start: 4px; }
.prompt-field .field-row label { display: flex; align-items: center; gap: 4px; }
.prompt-field .category-name { line-height: 1.9; }
.prompt-field .category-list { max-height: 380px; }
.prompt-field .category-option { border-bottom: 1px solid #f0f3f7; border-radius: 0; }
.prompt-field .category-option:last-child { border-bottom: 0; }
.prompt-field .category-option.is-active { border-radius: 8px; }
.prompt-reading { display: grid; gap: 6px; background: var(--teal-soft); border: 1px solid #b9e2df; border-radius: var(--radius); padding: 14px 18px; }
.prompt-reading-label { display: flex; align-items: center; gap: 6px; color: var(--teal-dark); font-size: .76rem; }
.prompt-reading-label .icon { width: 16px; height: 16px; }
.prompt-reading p { color: var(--ink); font-size: 1.05rem; line-height: 2.1; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-original { margin-top: 12px; font-size: .8rem; color: var(--muted); }
.prompt-original summary { cursor: pointer; margin-bottom: 8px; }
.prompt-cell strong { display: block; max-width: 520px; line-height: 1.9; }
.search-form.five { grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(120px, .45fr)) auto; }
.search-form.four { grid-template-columns: minmax(180px, 1fr) minmax(150px, .5fr) minmax(120px, .4fr) auto; }
.delete-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 18px; min-width: 0; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: .82rem; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: left; overflow-wrap: anywhere; }
.exact-transcript { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2.2; background: #f7fafd; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.format-note { color: var(--muted); font-size: .74rem; margin-top: 8px; }
.review-panel { border-top: 3px solid var(--teal); }
.decline-panel { background: var(--bad-soft); border-color: #ecc5cb; }
.decline-panel h2 { color: var(--bad); }

@keyframes record-pulse { 50% { box-shadow: 0 0 0 8px #b72f4514; } }
@media (max-width: 1180px) {
    .compose-grid { grid-template-columns: minmax(0, 1fr) 260px; }
    .detail-grid { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 1060px) {
    .compose-grid, .detail-grid { grid-template-columns: 1fr; }
    .guide-stack { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; }
    .brand { padding: 0; }
    .nav { display: flex; gap: 4px; overflow-x: auto; order: 3; flex: 1 0 100%; min-width: 0; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
    .nav a { white-space: nowrap; padding: 7px 11px; font-size: .8rem; }
    .nav a.selected { box-shadow: inset 0 -2px 0 #3fb6d9; }
    .nav-label { display: none; }
    .account { margin: 0 auto 0 0; padding: 6px 8px; background: transparent; }
    .account-text small { display: none; }
    .workspace { margin-right: 0; padding: 0 22px 48px; }
    .page-heading { margin: 0 -22px; padding: 22px 22px 18px; }
}
@media (max-width: 650px) {
    :root { font-size: 14px; }
    .workspace { padding: 0 14px 40px; }
    .page-heading { margin: 0 -14px; padding: 18px 16px 16px; }
    .page-body { padding-top: 18px; gap: 16px; }
    .account-text { display: none; }
    .steps { gap: 6px; }
    .steps li { flex-direction: column; text-align: center; gap: 4px; padding: 8px 6px; font-size: .74rem; }
    .steps small { display: none; }
    .guide-stack { grid-template-columns: 1fr; }
    .fields-grid, .search-form, .search-form.four, .search-form.five { grid-template-columns: 1fr; }
    .stats-grid, .stats-grid.three-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 14px 16px; }
    .stat strong { font-size: 1.5rem; }
    .panel, .login-card { padding: 20px 16px; }
    .table-panel { padding: 0; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .filter-actions { grid-column: 1 / -1; }
    .queue-item { gap: 10px; }
    .queue-item .sample-number { display: none; }
    .audio-player { gap: 10px; padding: 8px 10px 8px 8px; }
    .audio-play { width: 40px; height: 40px; }
    .audio-wave { gap: 2px; }
    .audio-speed { min-width: 40px; padding: 2px 6px; }
    .submit-row .button { width: 100%; }
}
.search-form.five { padding: 18px 20px; gap: 14px; background: linear-gradient(180deg, #fff, #fafcfe); }
.search-form label { font-size: .78rem; color: var(--muted); gap: 6px; }
.search-form select, .search-form input:not([type=checkbox]) { background-color: #f8fafc; }
.search-form select:hover, .search-form input:not([type=checkbox]):hover { border-color: #a9bdd1; }
.search-form select:focus, .search-form input:not([type=checkbox]):focus { background-color: #fff; }
.search-form .button { height: 43px; padding-inline: 18px; }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; inset-block: 0; inset-inline-start: 12px; margin: auto 0; width: 17px; height: 17px; color: #8394a6; pointer-events: none; }
.input-icon input:not([type=checkbox]) { padding-inline-start: 38px; }
.alert.success { align-items: center; box-shadow: var(--shadow); border-inline-start: 4px solid var(--ok); }
.alert.success .icon { margin: 0; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--ok); color: #fff; }
.prompts-table { border-radius: 14px; box-shadow: 0 1px 2px #10233a14, 0 8px 24px #10233a0d; }
.prompts-table th { padding: 13px 20px; font-size: .74rem; letter-spacing: 0; border-bottom: 1px solid var(--line); }
.prompts-table td { padding: 16px 20px; }
.prompts-table tbody tr { transition: background .15s; }
.prompts-table tbody tr:hover td { background: #f6faff; }
.prompts-table .prompt-cell strong { font-size: .92rem; color: var(--ink); line-height: 2; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.meta-chip { display: inline-flex; align-items: center; border-radius: 6px; padding: 0 8px; font-size: .7rem; line-height: 1.8; background: #eef2f6; color: #52667a; }
.meta-chip.category { background: var(--teal-soft); color: var(--teal-dark); }
.meta-chip.none { background: transparent; border: 1px dashed var(--field); color: var(--muted); }
.user-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; background: #f3f6fa; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px 1px 4px; font-size: .76rem; color: var(--text); white-space: nowrap; }
.user-chip.more { padding: 1px 10px; color: var(--blue); background: var(--blue-soft); border-color: transparent; }
.mini-avatar { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: .68rem; line-height: 1; }
.count-pill { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: .8rem; }
.count-pill.zero { background: #f1f4f8; color: #8a9bad; }
.prompts-table .badge { padding: 3px 12px; font-size: .74rem; }
.prompts-table .table-actions { gap: 8px; }
.prompts-table .button.small { padding: 3px 12px; gap: 5px; }
.prompts-table .button.small .icon { width: 15px; height: 15px; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 14px; border-radius: 10px; border: 1px solid transparent; font-size: .78rem; line-height: 1.8; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.action-btn .icon { width: 15px; height: 15px; }
.action-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 10px #10233a1a; }
.action-btn:active { transform: none; box-shadow: none; }
.action-btn.edit { background: var(--blue-soft); color: var(--blue); border-color: #c9dcf0; }
.action-btn.edit:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.action-btn.danger { background: var(--bad-soft); color: var(--bad); border-color: #f1ced3; }
.action-btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.action-btn.ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e5d4; }
.action-btn.ok:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.prompts-table .empty-state { padding: 56px 24px; }
.prompts-table .empty-state .icon { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
@media (max-width: 650px) { .search-form.five { padding: 16px; } .prompts-table td, .prompts-table th { padding-inline: 14px; } }
.prompt-form { max-width: 880px; padding: 0; overflow: hidden; gap: 0; }
.prompt-form > form.form-stack { gap: 0; }
.prompt-form .form-section { display: grid; gap: 16px; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: center; gap: 12px; }
.section-head h2 { font-size: .98rem; line-height: 1.5; }
.section-head p { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.section-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); flex: none; }
.section-icon.teal { background: var(--teal-soft); color: var(--teal-dark); }
.section-icon.violet { background: #ece9fb; color: #5b4bc4; }
.section-icon .icon { width: 19px; height: 19px; }
.prompt-form label, .prompt-form .field > label { font-size: .84rem; color: var(--ink); }
.prompt-form textarea { min-height: 150px; font-size: 1rem; line-height: 2.1; padding: 14px 16px; background: #fbfcfe; border-radius: 12px; }
.prompt-form textarea:focus { background: #fff; }
.prompt-form select { appearance: none; -webkit-appearance: none; padding-inline-end: 12px; padding-inline-start: 36px; background: #fbfcfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23627587' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 12px center; height: 44px; cursor: pointer; }
.prompt-form select:hover { border-color: #a9bdd1; }
.prompt-form select:focus { background-color: #fff; }
.prompt-form .field-note, .prompt-form label small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.8; }
.prompt-form .multi-control { min-height: 48px; background: #fbfcfe; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.prompt-form .multi-control:hover { border-color: #a9bdd1; }
.prompt-form .form-footer { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 18px 28px; background: #f6f8fb; }
.prompt-form .delete-row { margin: 0; padding: 16px 28px; border-top: 1px solid var(--line); background: #fff; }
@media (max-width: 650px) { .prompt-form .form-section { padding: 20px 16px; } .prompt-form .form-footer { padding: 16px; } .prompt-form .form-footer .button { flex: 1; } }
.action-btn.assign { background: #ece9fb; color: #5b4bc4; border-color: #d9d3f6; }
.action-btn.assign:hover { background: #5b4bc4; border-color: #5b4bc4; color: #fff; }
.action-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.action-btn.assign:disabled:hover { background: #ece9fb; color: #5b4bc4; border-color: #d9d3f6; }
.assign-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; overflow: visible; box-shadow: 0 24px 70px #0f264059; color: var(--ink); }
.assign-dialog::backdrop { background: #0f264073; backdrop-filter: blur(2px); }
.assign-form { display: grid; gap: 18px; padding: 24px 26px 0; }
.assign-form .section-head p { max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-form .field-note { display: block; color: var(--muted); font-size: .74rem; line-height: 1.8; }
.assign-footer { display: flex; justify-content: flex-start; gap: 10px; margin: 0 -26px; padding: 16px 26px; background: #f6f8fb; border-radius: 0 0 16px 16px; border-top: 1px solid var(--line); }
@media (max-width: 650px) { .assign-form { padding: 20px 16px 0; } .assign-footer { margin: 0 -16px; padding: 14px 16px; } .assign-footer .button { flex: 1; } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.pager .pagination { gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager-info { white-space: nowrap; }
.page-link { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #40556a; font-size: .8rem; box-shadow: var(--shadow); transition: background .15s, border-color .15s, color .15s; }
a.page-link:hover { background: var(--blue-soft); border-color: #b7cde4; color: var(--blue); }
.page-link.wide { padding: 0 14px; }
.page-link.current { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 10px #1f5fa640; }
.page-gap { display: inline-grid; place-items: center; min-width: 24px; color: #8394a6; }
.page-size label { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.page-size select { width: auto; min-width: 74px; height: 36px; padding: 2px 12px; border-radius: 10px; background: var(--surface); }
@media (max-width: 650px) { .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; } }
.recorder-box { position: relative; }
.countdown { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; background: #f7fafdf5; border-radius: inherit; }
.countdown-number { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 3rem; line-height: 1; box-shadow: 0 0 0 10px #1f5fa61f; }
.countdown-number.pop { animation: countdown-pop .9s ease-out; }
.countdown-hint { color: var(--ink); font-size: .86rem; }
.record-button.is-counting { background: #d98a1d; border-color: #f8ebd2; }
@keyframes countdown-pop { 0% { transform: scale(.55); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.inline-form { margin: 0; display: inline-flex; }
.multi-picker.is-invalid .multi-control { border-color: #c2413b; box-shadow: 0 0 0 3px #c2413b22; }
.multi-error { margin: 6px 0 0; font-size: .85rem; }
.level-meter { width: min(240px, 100%); height: 8px; border-radius: 999px; background: #e3eaf2; overflow: hidden; direction: ltr; }
.level-meter[hidden], .level-hint[hidden] { display: none; }
.level-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ok); transition: width .08s linear; }
.level-meter.is-low .level-fill { background: var(--warn); }
.level-meter.is-hot .level-fill { background: var(--bad); }
.level-hint { font-size: .76rem; color: var(--warn); }
