/* =====================================================================
   گوش‌نویس — سیستم طراحی
   لاجوردی (اصلی) · زعفرانی (کلمه در حال پخش) · فیروزه‌ای (موفقیت)
   ===================================================================== */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* زمین (پس‌زمینه صفحه) کمی به سمت لاجوردی؛ کاغذ متن سفید؛ میز ابزار یک پله لاجوردی‌تر؛ عرشه پخش تیره */
  --bg: #F2F4F9;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --surface-3: #ECEFF6;
  --tools: #EAEFFA;
  --tools-2: #F5F7FD;
  --ink: #131A30;
  --ink-2: #444D6B;
  --ink-3: #646D88;
  --line: #E1E5EE;
  --line-2: #CDD4E2;
  --lapis: #2346B4;
  --lapis-strong: #1A3489;
  --lapis-soft: #E3E9FA;
  --lapis-tint: #F1F4FD;
  --saffron: #D98A14;
  --saffron-soft: #FCEBCB;
  --turq: #0B7F77;
  --turq-soft: #DDF3F1;
  --danger: #BE3A33;
  --danger-soft: #FBE6E4;
  --warn: #9A5F06;
  --warn-soft: #FBF0DA;
  --deck: #101836;
  --deck-2: #182352;
  --deck-line: #26326A;
  --deck-ink: #EEF1FC;
  --deck-ink-2: #B3BDE0;
  --deck-ink-3: #8C97C2;
  --wave: #3A4C8E;
  --wave-done: #93A8FF;
  --focus: 0 0 0 3px rgba(35, 70, 180, .28);
  --shadow-pop: 0 18px 40px -12px rgba(19, 26, 48, .24), 0 2px 6px rgba(19, 26, 48, .06);
  --shadow-soft: none;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 7px;
  --sidebar-w: 248px;
  --top-h: 60px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A0C12;
  --surface: #12151D;
  --surface-2: #171B24;
  --surface-3: #1E232E;
  --tools: #141B2C;
  --tools-2: #19213A;
  --ink: #E9ECF4;
  --ink-2: #B0B7CA;
  --ink-3: #8D95AA;
  --line: #242A37;
  --line-2: #323A4C;
  --lapis: #7E9BFF;
  --lapis-strong: #A9BBFF;
  --lapis-soft: #1D2850;
  --lapis-tint: #151D38;
  --saffron: #F2B04B;
  --saffron-soft: #3A2B11;
  --turq: #43C9BE;
  --turq-soft: #12302F;
  --danger: #F07A72;
  --danger-soft: #3A1B1B;
  --warn: #E7B24E;
  --warn-soft: #382A10;
  --deck: #0B1230;
  --deck-2: #121C44;
  --deck-line: #1F2A5C;
  --deck-ink: #EEF1FC;
  --deck-ink-2: #AEB8DE;
  --deck-ink-3: #8590BD;
  --wave: #2C3B78;
  --wave-done: #8FA6FF;
  --focus: 0 0 0 3px rgba(126, 155, 255, .35);
  --shadow-pop: 0 20px 44px -10px rgba(0, 0, 0, .65), 0 2px 6px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lapis); text-decoration: none; }
a:hover { color: var(--lapis-strong); }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--saffron-soft); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; font-feature-settings: normal; }
.num { font-variant-numeric: tabular-nums; }
/* ارقام فارسی برای زمان‌ها (ویژگی ss01 در فونت وزیرمتن) */
.seg-time, .time-readout, .bm-item .t, .search-hit .t, .live-text .t, .rec-time, #timeline, .lib-item .meta { font-feature-settings: "ss01"; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.hidden, [hidden] { display: none !important; }

.theme-ic-dark { display: none; }
:root[data-theme="dark"] .theme-ic-dark { display: inline; }
:root[data-theme="dark"] .theme-ic-light { display: none; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- تایپوگرافی */
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 750; letter-spacing: -.01em; }
.h1 { font-size: 26px; }
.h2 { font-size: 20px; }
.h3 { font-size: 16px; font-weight: 700; }
.lead { font-size: 15px; color: var(--ink-2); margin: 4px 0 0; }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }

/* ---------------------------------------------------------------- پوسته */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; background: var(--bg); }
.shell.panel-shell { background: linear-gradient(to left, var(--ink) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
:root[data-theme="dark"] .shell.panel-shell { background: linear-gradient(to left, #080D19 var(--sidebar-w), var(--bg) var(--sidebar-w)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  background: var(--bg); display: flex; flex-direction: column; padding: 16px 12px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--deck); color: #fff;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { font-size: 11.5px; color: var(--ink-3); margin-top: -3px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-new { margin: 0 4px 14px; width: auto !important; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-title { font-size: 12px; color: var(--ink-3); padding: 18px 10px 6px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a .i { width: 17px; height: 17px; color: var(--ink-3); }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.nav a.active .i { color: var(--lapis); }
.nav .count {
  margin-inline-start: auto; font-size: 12px; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 99px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-2);
}
.nav .count:empty { display: none; }
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.worker-pill {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2);
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.on { background: var(--turq); box-shadow: 0 0 0 3px var(--turq-soft); }
.dot.busy { background: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft); animation: pulse 1.6s ease-in-out infinite; }
.dot.off { background: var(--danger); }
@keyframes pulse { 50% { opacity: .45; } }

.main { min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 10px;
  padding: 0 28px; background: var(--bg); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { padding: 6px 28px 48px; width: 100%; max-width: 1400px; margin: 0 auto; }
.content.wide { max-width: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 22px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.announcement {
  display: flex; gap: 10px; align-items: center; padding: 10px 28px; font-size: 13.5px;
  background: var(--saffron-soft); color: var(--ink); border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------- دکمه‌ها */
.btn {
  --b-bg: var(--surface); --b-ink: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-md); border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-ink);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--surface-3); color: var(--b-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--lapis); --b-ink: #fff; --b-line: var(--lapis); }
.btn-primary:hover { background: var(--lapis-strong); border-color: var(--lapis-strong); color: #fff; }
:root[data-theme="dark"] .btn-primary { --b-ink: #0B1120; }
:root[data-theme="dark"] .btn-primary:hover { color: #0B1120; }
.btn-soft { --b-bg: var(--lapis-soft); --b-ink: var(--lapis-strong); --b-line: transparent; }
.btn-soft:hover { background: color-mix(in srgb, var(--lapis-soft) 70%, var(--lapis) 12%); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; --b-ink: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { --b-bg: var(--danger-soft); --b-ink: var(--danger); --b-line: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost-danger { --b-bg: transparent; --b-ink: var(--danger); --b-line: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn-ghost-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-sm); gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- فرم */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--ink-3); }
.field .error, .errorlist { font-size: 12.5px; color: var(--danger); list-style: none; padding: 0; margin: 0; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, select.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.input { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; line-height: 1.7; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lapis); box-shadow: var(--focus); }
.input-sm { height: 34px; font-size: 13.5px; border-radius: var(--r-sm); }
select.input, .field select {
  appearance: none; padding-inline-start: 13px; padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238790A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 11px center;
}
.input-group { position: relative; }
.input-group .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-group .input { padding-inline-start: 38px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--lapis); }
.switch input:checked::after { inset-inline-start: 19px; }
.switch input:disabled { opacity: .5; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--lapis); margin: 0; }

/* ---------------------------------------------------------------- سطوح */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.panel-pad { padding: 20px 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel-head .h3 { display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 18px 22px; }
.panel-foot { padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- نشان‌ها */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; box-shadow: none; }
.tone-success { background: var(--turq-soft); color: var(--turq); }
.tone-success .dot { background: var(--turq); }
.tone-info { background: var(--lapis-soft); color: var(--lapis-strong); }
.tone-info .dot { background: var(--lapis); animation: pulse 1.4s infinite; }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-danger .dot { background: var(--danger); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-warn .dot { background: var(--warn); }
.tone-neutral { background: var(--surface-3); color: var(--ink-2); }
.tone-muted { background: transparent; color: var(--ink-3); border: 1px dashed var(--line-2); }
.kbd { display: inline-block; min-width: 22px; padding: 0 6px; height: 22px; line-height: 21px; text-align: center; font-size: 12px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface-2); color: var(--ink-2); font-family: ui-monospace, monospace; }

.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--lapis); border-radius: inherit; transition: width .5s ease; }
.progress.lg { height: 10px; }

/* ---------------------------------------------------------------- پیام‌ها */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-md); font-size: 14px; border: 1px solid transparent; }
.alert .i { margin-top: 3px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--lapis-soft); color: var(--lapis-strong); }
.alert-success { background: var(--turq-soft); color: var(--turq); }
.alert p { margin: 0; color: var(--ink); }

.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; min-width: 240px; max-width: 92vw;
  background: var(--ink); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: 14px;
  animation: toast-in .22s ease-out;
}
.toast.error { background: var(--danger); color: #fff; }
.toast.leave { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- منوی کشویی و پنجره */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 50; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  animation: pop .14s ease-out;
}
.menu.start { inset-inline-end: auto; inset-inline-start: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--r-sm); color: var(--ink); font-size: 14px; cursor: pointer; text-align: start;
}
.menu a:hover, .menu button:hover { background: var(--surface-3); color: var(--ink); }
.menu .danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .menu-label { font-size: 12px; color: var(--ink-3); padding: 6px 10px 2px; }

dialog.modal {
  border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-pop);
}
dialog.modal::backdrop { background: rgba(11, 17, 32, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .18s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-body { padding: 14px 22px 8px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-start; padding: 14px 22px 20px; }

/* ---------------------------------------------------------------- جدول */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table th a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--lapis-tint); }
.table .t-title { font-weight: 600; color: var(--ink); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.table td.shrink, .table th.shrink { width: 1%; white-space: nowrap; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: var(--r-md); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-sm); border: 0; background: none;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .active, .tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs .count { font-size: 11.5px; color: var(--ink-3); }

.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 16px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--ink-2); }
.pagination a:hover { background: var(--surface-3); }
.pagination .current { background: var(--lapis); color: #fff; font-weight: 700; }

.empty { text-align: center; padding: 56px 24px; }
.empty .art { width: 132px; margin: 0 auto 18px; color: var(--lapis); opacity: .9; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); margin: 0 auto 18px; max-width: 420px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--lapis-soft); color: var(--lapis-strong); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }

/* ---------------------------------------------------------------- کتابخانه */
.lib-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lib-toolbar .input-group { flex: 1; min-width: 220px; max-width: 420px; }
.summary-line { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 14px; }
.summary-line b { color: var(--ink); font-weight: 750; }

.lib-list { display: flex; flex-direction: column; }
.lib-item {
  display: grid; grid-template-columns: auto 52px 1fr 170px 150px auto; align-items: center; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); position: relative;
}
.lib-item:last-child { border-bottom: 0; }
.lib-item:hover { background: var(--lapis-tint); }
.lib-item .thumb {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--lapis-soft); color: var(--lapis);
}
.lib-item.st-failed .thumb { background: var(--danger-soft); color: var(--danger); }
.lib-item.st-completed .thumb { background: var(--lapis-soft); }
.lib-item .title { font-weight: 650; font-size: 15.5px; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-item .title::after { content: ""; position: absolute; inset: 0; }
.lib-item .meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.lib-item .meta span { display: inline-flex; gap: 4px; align-items: center; }
.lib-item .meta .i { width: 14px; height: 14px; }
.lib-item .wave-col { color: var(--line-2); }
.lib-item:hover .wave-col { color: color-mix(in srgb, var(--lapis) 45%, var(--line-2)); }
.mini-wave { width: 100%; height: 26px; fill: currentColor; }
.lib-item .status-col { display: flex; flex-direction: column; gap: 6px; }
.lib-item .act { position: relative; z-index: 2; display: flex; gap: 2px; }
.lib-item .star.on { color: var(--saffron); }
.lib-item .star.on .i { fill: currentColor; }
.lib-item .sel { position: relative; z-index: 2; }

.bulkbar {
  position: sticky; bottom: 18px; z-index: 20; margin: 14px auto 0; width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-pop);
}
.bulkbar .btn-ghost { --b-ink: var(--bg); }
.bulkbar .btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--bg); }

/* ---------------------------------------------------------------- بارگذاری */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 300px; padding: 34px; border-radius: var(--r-lg); border: 2px dashed var(--line-2); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--lapis); background: var(--lapis-tint); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .art { width: 220px; color: var(--lapis); margin-bottom: 16px; }
.dropzone h2 { font-size: 20px; margin-bottom: 4px; }
.dropzone p { margin: 0; color: var(--ink-2); }
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.formats span { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-3); direction: ltr; }

.file-queue { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fq-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.fq-item .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--lapis-soft); color: var(--lapis); }
.fq-item .name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq-item .sub { font-size: 12px; color: var(--ink-3); }
.fq-item.bad { border-color: var(--danger); }
.fq-item.bad .ic { background: var(--danger-soft); color: var(--danger); }

.recorder { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 20px; text-align: center; }
.rec-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--danger); color: #fff; box-shadow: 0 0 0 8px var(--danger-soft); transition: transform .15s;
}
.rec-btn:hover { transform: scale(1.04); }
.rec-btn .i { width: 34px; height: 34px; }
.rec-btn.recording { animation: rec 1.4s ease-in-out infinite; }
@keyframes rec { 50% { box-shadow: 0 0 0 16px var(--danger-soft); } }
.rec-time { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; direction: ltr; }
#recWave { width: 100%; min-height: 80px; }

/* ---------------------------------------------------------------- استودیو */
.studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 16px; }
.title-edit { font-size: 24px; font-weight: 780; letter-spacing: -.015em; border: 1px solid transparent; border-radius: var(--r-sm); padding: 0 6px; margin: 0 -6px; outline: none; }
.title-edit:hover { border-color: var(--line-2); }
.title-edit:focus { border-color: var(--lapis); box-shadow: var(--focus); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: var(--ink-3); font-size: 13.5px; }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.meta-row .i { width: 15px; height: 15px; }

.transcript { padding: 10px 6px 20px; }
.seg {
  display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 10px 14px; border-radius: var(--r-md);
  position: relative; transition: background .2s;
}
.seg:hover { background: var(--surface-2); }
.seg.current { background: var(--lapis-tint); }
.seg.current::before { content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--lapis); }
.seg-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-top: 4px; }
.seg-time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; direction: ltr; border: 0; background: none; cursor: pointer; padding: 0; }
.seg-time:hover { color: var(--lapis); }
.spk {
  display: inline-flex; align-items: center; gap: 5px; max-width: 74px; font-size: 12px; font-weight: 700;
  color: var(--spk, var(--ink-2)); border: 0; background: none; padding: 0; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.spk::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--spk, var(--ink-3)); flex: none; }
.seg-text {
  font-size: 17px; line-height: 2.05; color: var(--ink); outline: none; border-radius: 6px; padding: 0 4px; margin: 0 -4px;
  word-break: break-word;
}
.seg-text[dir="ltr"] { text-align: left; }
.seg-text:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--lapis); }
.seg-text .w { border-radius: 4px; cursor: pointer; transition: background .12s, color .12s; padding: 1px 0; }
.seg-text .w:hover { background: var(--surface-3); }
.seg-text .w.now { background: var(--saffron-soft); color: var(--ink); box-shadow: 0 2px 0 var(--saffron); }
.show-conf .seg-text .w.low { text-decoration: underline wavy color-mix(in srgb, var(--danger) 70%, transparent); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.seg-text mark, .seg-text .hit { background: color-mix(in srgb, var(--lapis) 22%, transparent); color: inherit; border-radius: 3px; }
.seg-text .hit.focus { background: var(--lapis); color: #fff; }
.seg .seg-actions { position: absolute; top: 8px; inset-inline-end: 8px; display: none; gap: 2px; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); padding: 2px; }
.seg:hover .seg-actions { display: flex; }
.seg.edited .seg-time::after { content: "•"; color: var(--saffron); margin-inline-start: 4px; }
.saving { position: absolute; bottom: 6px; inset-inline-end: 12px; font-size: 11.5px; color: var(--ink-3); }

.side-section + .side-section { margin-top: 22px; }
.side-section h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; color: var(--ink-2); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.stat .v { font-size: 19px; font-weight: 780; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: var(--ink-3); }
.share-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); margin: 6px 0 10px; }
.share-bar span { display: block; height: 100%; }
.spk-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.spk-row .sw { width: 12px; height: 12px; border-radius: 4px; }
.spk-row input { height: 34px; }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.bm-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); }
.bm-item .t { font-size: 12.5px; direction: ltr; color: var(--lapis); font-variant-numeric: tabular-nums; background: none; border: 0; cursor: pointer; padding: 0 2px; font-weight: 700; }
.bm-item input { border: 0; background: transparent; height: 30px; padding: 0 4px; font-size: 13.5px; width: 100%; outline: none; }
.bm-item input:focus { background: var(--surface); border-radius: 6px; }
.search-hit { display: block; width: 100%; text-align: start; padding: 8px 10px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); cursor: pointer; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.search-hit:hover { background: var(--lapis-tint); }
.search-hit .t { color: var(--lapis); font-size: 12px; direction: ltr; display: inline-block; margin: 0 0 0 8px; font-weight: 700; }
.search-hit mark { background: var(--saffron-soft); color: var(--ink); border-radius: 3px; }
.fmt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fmt-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: start; color: var(--ink); }
.fmt-btn:hover { border-color: var(--lapis); background: var(--lapis-tint); color: var(--ink); }
.fmt-btn b { font-size: 14px; direction: ltr; }
.fmt-btn span { font-size: 12px; color: var(--ink-3); }

.ai-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ai-grid .fmt-btn { align-items: center; text-align: center; padding: 10px 6px; gap: 4px; }
.ai-grid .fmt-btn b { direction: rtl; font-size: 13px; }
.ai-grid .fmt-btn .i { color: var(--lapis); }
.ai-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.ai-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ai-card-head .t { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-card-body { padding: 10px 12px; font-size: 14px; line-height: 1.95; max-height: 360px; overflow-y: auto; }
.ai-card-body h1, .ai-card-body h2, .ai-card-body h3 { font-size: 14.5px; margin: 10px 0 4px; }
.ai-card-body ul, .ai-card-body ol { margin: 4px 0; padding-inline-start: 20px; }
.ai-card-body p { margin: 0 0 8px; }
.ai-card-foot { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 8px; border-top: 1px solid var(--line); }
.ai-card .progress { margin: 4px 0 0; }
.seg-tr { grid-column: 2; font-size: 15px; line-height: 1.9; color: var(--ink-2); border-inline-start: 2px solid var(--turq); padding-inline-start: 10px; margin-top: 2px; }
.seg-tr.diff { border-color: var(--saffron); }
.clip-box { margin-top: 14px; }
.clip-box #clipWave { direction: ltr; margin: 8px 0; }
.clip-box #clipWave ::part(region) { background: color-mix(in srgb, var(--lapis) 16%, transparent) !important; border-inline: 2px solid var(--lapis); }
.clip-inputs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clip-inputs .input { width: 104px; text-align: center; }


/* حالت پردازش */
.processing-card { max-width: 820px; margin: 10px auto 0; }
.proc-visual { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 70px; margin: 8px 0 22px; color: var(--lapis); }
.proc-visual i { display: block; width: 5px; border-radius: 4px; background: currentColor; animation: eq 1.2s ease-in-out infinite; opacity: .85; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 100%; } }
.proc-stage { font-size: 18px; font-weight: 700; text-align: center; }
.proc-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.proc-steps .badge.done { background: var(--turq-soft); color: var(--turq); }
.live-text { max-height: 340px; overflow-y: auto; padding: 4px 4px 0; font-size: 15.5px; line-height: 2; color: var(--ink-2); }
.live-text p { margin: 0 0 6px; animation: fade-in .4s ease-out; }
.live-text .t { color: var(--ink-3); font-size: 12px; direction: ltr; display: inline-block; margin: 0 0 0 10px; font-variant-numeric: tabular-nums; }
@keyframes fade-in { from { opacity: 0; } }

/* ---------------------------------------------------------------- ورود */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.05fr; }
.auth-art {
  position: relative; overflow: hidden; background: var(--lapis-strong); color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
:root[data-theme="dark"] .auth-art { background: #14204A; }
.auth-art .brand { color: #fff; padding: 0; }
.auth-art .brand-mark { background: rgba(255,255,255,.14); }
.auth-art .brand-sub { color: rgba(255,255,255,.65); }
.auth-quote { position: relative; z-index: 1; max-width: 460px; }
.auth-quote h2 { font-size: 34px; font-weight: 800; line-height: 1.45; letter-spacing: -.02em; }
.auth-quote p { color: rgba(255,255,255,.75); margin: 12px 0 0; font-size: 15.5px; }
.auth-wave { position: absolute; inset-inline: 0; top: 30%; width: 100%; height: 190px; opacity: .9; }
.auth-wave rect { fill: rgba(255,255,255,.16); }
.auth-wave rect.hot { fill: var(--saffron); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-card .lead { margin-bottom: 26px; }
.auth-foot { margin-top: 22px; font-size: 14px; color: var(--ink-2); text-align: center; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- پنل مدیریت */
.shell.panel-shell .sidebar { background: var(--ink); border-color: var(--ink); color: #C9D0E3; }
:root[data-theme="dark"] .shell.panel-shell .sidebar { background: #080D19; border-color: var(--line); }
.panel-shell .brand { color: #fff; }
.panel-shell .brand-mark { background: var(--saffron); color: #1A1204; }
.panel-shell .brand-sub { color: #8E97B3; }
.panel-shell .nav-title { color: #6F7896; }
.panel-shell .nav a { color: #B9C1D8; }
.panel-shell .nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.panel-shell .nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.panel-shell .nav a.active .i { color: var(--saffron); }
.panel-shell .nav .count { background: rgba(255,255,255,.1); color: #fff; }
.panel-shell .worker-pill { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); color: #B9C1D8; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px 20px; }
.kpi .k { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.kpi .k .i { color: var(--ink-3); }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--ink-3); margin-inline-start: 4px; }
.kpi .foot { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.delta { font-weight: 700; direction: ltr; display: inline-block; }
.delta.up { color: var(--turq); }
.delta.down { color: var(--danger); }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { transform: translateY(-1px); }
.feed .tone-danger.dot, .dot.tone-danger { background: var(--danger); }
.feed .tone-success.dot { background: var(--turq); }
.feed .tone-warn.dot { background: var(--saffron); }
.feed .tone-neutral.dot { background: var(--line-2); }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.rank .bar { height: 5px; border-radius: 9px; background: var(--surface-3); margin-top: 4px; overflow: hidden; }
.rank .bar span { display: block; height: 100%; background: var(--lapis); border-radius: inherit; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input { width: auto; }
.filters .input-group { flex: 1; min-width: 220px; max-width: 360px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.meter { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--lapis); }
.meter.warn span { background: var(--saffron); }
.meter.danger span { background: var(--danger); }
.settings-group { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 24px 22px; border-bottom: 1px solid var(--line); }
.settings-group:last-of-type { border-bottom: 0; }
.settings-group .desc h3 { font-size: 16px; }
.settings-group .desc p { margin: 4px 0 0; color: var(--ink-3); font-size: 13.5px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; }
.setting-row + .setting-row { border-top: 1px dashed var(--line); }
.setting-row .label { color: var(--ink); font-size: 14.5px; }
.setting-row .help { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.setting-row .input, .setting-row select { max-width: 280px; }
.pw-reveal { font-family: ui-monospace, monospace; direction: ltr; font-size: 18px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-3); user-select: all; display: inline-block; }

.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap;
  margin-top: auto; padding: 18px 28px 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.footer-main { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.brand-mark.sm { width: 22px; height: 22px; border-radius: 7px; }
.brand-mark.sm svg { width: 14px; height: 14px; }
.footer-links { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--lapis); }
.footer-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.footer-link-btn { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; padding: 0; }
.footer-link-btn:hover { color: var(--lapis); }
.auth-form { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.auth-footer { border: 0; justify-content: center; margin-top: 32px; padding: 0; width: 100%; max-width: 380px; }
.auth-footer .footer-meta { display: none; }

.folder-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.notif-btn { position: relative; }
.notif-count { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.notif-menu { width: min(360px, calc(100vw - 24px)); max-height: 440px; overflow-y: auto; inset-inline-start: auto; inset-inline-end: -40px; }
.notif-item { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 2px !important; white-space: normal; }
.notif-item span { font-size: 13px; color: var(--ink-2); }
.notif-item time { font-size: 11.5px; color: var(--ink-3); }
.notif-item.unread { background: var(--lapis-tint); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px;
  background: var(--surface-3); color: var(--ink-2); position: relative; z-index: 2; }
.tag-chip:hover { background: var(--lapis-soft); color: var(--lapis-strong); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-row .chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-row .chip:hover { border-color: var(--lapis); color: var(--ink); }
.chip-row .chip[aria-pressed="true"], .chip-row .chip.active { background: var(--lapis-soft); border-color: transparent; color: var(--lapis-strong); }
.chip-row .chip .sw { width: 9px; height: 9px; border-radius: 50%; }

.seg.filtered-out { display: none; }
.spk-filter { border-top: 0; padding-top: 0; gap: 10px; }
.seg-badge { position: absolute; bottom: 8px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 99px; border: 0; background: var(--saffron-soft); color: var(--warn); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.hist-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.hist-item.resolved { opacity: .6; }
.hist-item .btn { align-self: flex-start; }
.quote-seg { margin: 0 0 12px; padding: 8px 12px; border-inline-start: 3px solid var(--lapis); background: var(--lapis-tint); border-radius: 6px; font-size: 14px; }
textarea.fulltext { min-height: 340px; font-size: 14px; line-height: 2; }
#historyModal, #commentsModal { width: min(600px, calc(100vw - 32px)); }
#historyList, #commentList { max-height: 50vh; overflow-y: auto; }
label.chip { user-select: none; }

.settings-tabs { flex-wrap: wrap; width: max-content; max-width: 100%; }

.crud-thumb { width: 44px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.crud-thumb.lg { width: 120px; height: 80px; }
.crud-form .setting-row { align-items: flex-start; }
.crud-form .label { max-width: 300px; padding-top: 8px; }
.crud-input { width: min(560px, 62%); }
.crud-input textarea.input { min-height: 110px; }
.crud-input select[multiple] { height: 130px; }
@media (max-width: 900px) { .crud-form .setting-row { flex-direction: column; align-items: stretch; } .crud-input { width: 100%; } }

/* صفحه خطا */
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.error-page .code { font-size: 96px; font-weight: 900; color: var(--lapis); letter-spacing: -.04em; line-height: 1; }

/* ---------------------------------------------------------------- واکنش‌گرا */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .lib-item { grid-template-columns: auto 52px 1fr 130px auto; }
  .lib-item .wave-col { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 60; transform: translateX(100%); transition: transform .22s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(11,17,32,.4); z-index: 55; }
  .topbar .menu-btn { display: inline-flex; }
  .shell, .shell.panel-shell { background: var(--bg) !important; }
  .topbar, .content, .announcement, .site-footer { padding-inline: 16px; }
  .upload-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-head .dropdown .menu { inset-inline-end: auto; inset-inline-start: 0; }
  .transcript-tools .xsmall { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .settings-group { grid-template-columns: 1fr; gap: 12px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .lib-item { grid-template-columns: 44px 1fr auto; gap: 12px; padding: 12px; }
  .lib-item .sel, .lib-item .status-col .progress { display: none; }
  .lib-item .thumb { width: 44px; height: 44px; }
  .lib-item .status-col { grid-column: 2; grid-row: 2; flex-direction: row; }
  .lib-item .act { grid-row: 1 / span 2; grid-column: 3; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi .v { font-size: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; gap: 2px; }
  .seg-tr { grid-column: 1; }
    .seg-side { flex-direction: row; gap: 12px; }
  .deck { padding: 10px 12px; }
  .volume { display: none; }
  .h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .sidebar, .topbar, .player, .side-panel, .transcript-tools, .seg-actions { display: none !important; }
  .shell, .studio { display: block; }
  .panel { border: 0; }
}

/* =====================================================================
   نسخه ۱.۴ — ورود با موبایل، پلن‌ها، تبلیغ، اشتراک، گفت‌وگو، جست‌وجو
   ===================================================================== */
.badge-success { background: var(--turq-soft); color: var(--turq); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.center { text-align: center; }
.text-end { text-align: end; }
.input-lg { height: 50px; font-size: 16px; border-radius: var(--r-md); }
.input-group.lg .input { height: 52px; font-size: 16px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.brand-mark .brand-logo { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

/* ورود */
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); margin-bottom: 20px; }
.seg-tabs button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: 14px; height: 38px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft), 0 1px 3px rgba(19, 26, 48, .08); }
.otp-boxes { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.otp-box { width: 50px; height: 58px; text-align: center; font-size: 24px; font-weight: 800; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-family: inherit; }
.otp-box:focus { outline: none; border-color: var(--lapis); box-shadow: var(--focus); }
.test-code { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: var(--saffron-soft); color: var(--warn); margin: 0 0 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 20px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.qr-box { width: 200px; margin: 0 auto 10px; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.qr-box svg { width: 100%; height: auto; display: block; }
.link-btn { border: 0; background: none; color: var(--lapis); font: inherit; cursor: pointer; padding: 0; }
.link-btn:disabled { color: var(--ink-3); cursor: default; }

/* پیام‌رسان */
.messenger-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.messenger-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.messenger-card > div { flex: 1; min-width: 0; }
.messenger-card.linked { border-color: color-mix(in srgb, var(--turq) 40%, var(--line)); background: var(--turq-soft); }
.mc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.mc-telegram { background: linear-gradient(140deg, #37aee2, #1e96c8); }
.mc-bale { background: linear-gradient(140deg, #3ec28f, #149e6d); }

/* پلن و مصرف */
.plan-mini { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.plan-mini:hover { border-color: var(--lapis); transform: translateY(-1px); }
.plan-meter { display: block; padding: 10px 12px; border-radius: var(--r-md); background: linear-gradient(140deg, var(--lapis-tint), var(--saffron-soft)); color: inherit; text-decoration: none; margin-bottom: 10px; }
.plan-meter svg { color: var(--saffron); }
.upgrade-btn svg { color: var(--saffron); }
.usage-bars { display: grid; gap: 14px; }
.ubar-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.ubar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lapis), #6b3df0); transition: width .6s; }
.ubar.warm .ubar-track span { background: linear-gradient(90deg, var(--saffron), #d0781c); }
.ubar.hot .ubar-track span { background: linear-gradient(90deg, #e2574c, var(--danger)); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 8px; } .check-list svg { color: var(--turq); flex: none; margin-top: 5px; }
.result-card { max-width: 560px; margin: 40px auto; }
.result-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--lapis-soft); color: var(--lapis); margin-bottom: 12px; }
.result-ic.ok { background: var(--turq-soft); color: var(--turq); } .result-ic.bad { background: var(--danger-soft); color: var(--danger); }

/* جست‌وجوی بالای صفحه */
.top-search { position: relative; display: flex; align-items: center; flex: 0 1 360px; margin-inline-start: 8px; }
.top-search svg { position: absolute; inset-inline-start: 12px; color: var(--ink-3); pointer-events: none; }
.top-search input { width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding-inline: 36px 14px; font: inherit; font-size: 14px; }
.top-search input:focus { outline: none; border-color: var(--lapis); box-shadow: var(--focus); background: var(--surface); }
@media (max-width: 760px) { .top-search { display: none; } }

/* جست‌وجو و پرسش */
.search-hero { display: flex; gap: 10px; margin-bottom: 16px; } .search-hero .input-group { flex: 1; }
.search-file { overflow: hidden; }
.search-file-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; background: var(--surface-2); }
.search-hit { display: flex; gap: 12px; padding: 10px 16px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); line-height: 1.9; }
.search-hit:last-child { border-bottom: 0; } .search-hit:hover { background: var(--lapis-tint); }
.search-hit .ts { flex: none; font-size: 12px; color: var(--ink-3); background: var(--surface-3); border-radius: 6px; padding: 0 7px; height: 22px; margin-top: 4px; }
.search-hit mark, [data-hl] mark { background: var(--saffron-soft); color: inherit; border-radius: 4px; padding: 0 2px; }
.ask-box { background: linear-gradient(160deg, var(--surface), var(--lapis-tint)); }

/* گفت‌وگو */
.chat-log { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 2px; }
.chat-q { align-self: flex-start; max-width: 88%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--lapis); color: #fff; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; }
[dir="rtl"] .chat-q, .chat-q { border-radius: 14px 14px 4px 14px; }
.chat-a { position: relative; align-self: flex-end; max-width: 94%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-3); font-size: 13.5px; line-height: 1.9; }
.chat-a p { margin: 0 0 6px; } .chat-a p:last-child { margin: 0; } .chat-a h3 { font-size: 14px; margin: 6px 0; } .chat-a ul, .chat-a ol { margin: 4px 0; padding-inline-start: 18px; }
.chat-copy { position: absolute; top: 2px; inset-inline-end: 2px; opacity: 0; transition: opacity .2s; }
.chat-a:hover .chat-copy { opacity: 1; }
.chat-input { display: flex; gap: 6px; align-items: flex-end; } .chat-input textarea { flex: 1; resize: vertical; min-height: 44px; }
.time-link { border: 0; background: var(--lapis-soft); color: var(--lapis-strong); font: inherit; font-size: 12px; border-radius: 6px; padding: 0 6px; cursor: pointer; }
.time-link:hover { background: var(--lapis); color: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ask-item { display: flex; flex-direction: column; gap: 6px; }

/* همکاران */
.collab-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.collab-row .grow { flex: 1; min-width: 0; }

/* تبلیغ */
.promo { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); margin: 14px 0; }
.promo-label { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 2; font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .45); color: #fff; }
.promo-close { position: absolute; top: 4px; inset-inline-end: 4px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.promo-body { display: block; color: inherit; text-decoration: none; }
.promo-body img, .promo-body video { display: block; width: 100%; height: auto; }
.promo-text { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: 14px; }
.promo-text:only-child { padding-top: 26px; }
.promo-text .btn { flex: none; }
.promo-top { margin-top: 0; }
.promo-sidebar { margin: 0 0 10px; font-size: 13px; }
.promo-sidebar .promo-text { flex-direction: column; align-items: stretch; text-align: center; }
.promo-html { padding: 8px; }
.modal-head .h3, .modal-body > div > b, .side-section h4 { display: flex; align-items: center; gap: 7px; }

/* =====================================================================
   استودیو ۱.۵ — عرشه پخش تیره، کاغذ متن سفید، میز ابزار لاجوردی
   ===================================================================== */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 31vw, 470px); gap: 18px; align-items: start; }
.studio-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* عرشه پخش */
.deck {
  position: sticky; top: calc(var(--top-h) + 6px); z-index: 20; color: var(--deck-ink);
  background: var(--deck); border-radius: var(--r-lg); padding: 14px 16px 12px;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.045) 1px, transparent 0); background-size: 18px 18px;
}
.deck.stuck { box-shadow: var(--shadow-pop); }
.deck-wave { background: var(--deck-2); border-radius: 10px; padding: 10px 10px 2px; }
#waveform { direction: ltr; position: relative; cursor: text; overflow: hidden; }
#waveform ::part(region) { background: color-mix(in srgb, var(--saffron) 24%, transparent) !important; border-inline: 2px solid var(--saffron); }
#waveform ::part(cursor) { width: 2px; }
#timeline { direction: ltr; color: var(--deck-ink-3); font-size: 11px; }
.wave-hint { margin: 6px 2px 0; font-size: 12px; color: var(--deck-ink-3); display: flex; align-items: center; gap: 6px; }
.wave-hint.hidden { display: none; }
.player-controls { display: flex; align-items: center; gap: 2px; margin-top: 10px; flex-wrap: nowrap; min-width: 0; }
.player-controls .bm-label { display: none; }
@media (max-width: 1500px) { .deck .volume { display: none; } }
.deck .btn { --b-bg: transparent; --b-line: transparent; --b-ink: var(--deck-ink-2); }
.deck .btn:hover { background: rgba(255,255,255,.08); color: var(--deck-ink); }
.deck .btn[aria-pressed="true"], .deck .btn.btn-soft { background: rgba(255,255,255,.1); color: var(--deck-ink); }
.play-btn { width: 46px; height: 46px; border-radius: 50%; padding: 0; }
.deck .play-btn { --b-bg: var(--saffron); --b-ink: #1F1503; }
.deck .play-btn:hover { background: #F0A93A; color: #1F1503; }
.play-btn .i { width: 22px; height: 22px; }
.time-readout { font-variant-numeric: tabular-nums; direction: ltr; font-size: 14px; color: var(--deck-ink-2); padding: 0 10px; min-width: 120px; text-align: center; }
.time-readout b { color: var(--deck-ink); font-weight: 700; }
.zoom-ctl { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-inline: 1px solid var(--deck-line); margin-inline: 4px; }
.zoom-ctl input[type=range] { width: 84px; accent-color: var(--wave-done); direction: rtl; }
.deck .speed-select { width: auto; height: 32px; padding-inline-end: 30px; font-size: 13px; border-radius: var(--r-sm);
  background-color: var(--deck-2); color: var(--deck-ink); border-color: var(--deck-line); }
.volume { width: 90px; accent-color: var(--wave-done); }

/* انتخاب بازه روی موج: کلمات همان بازه + ابزارها */
.sel-bar { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.sel-bar.hidden { display: none; }
.sel-head { display: flex; align-items: center; gap: 10px; }
.sel-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--saffron-soft); color: var(--warn); flex: none; }
.sel-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.sel-stats b { color: var(--ink); font-weight: 700; margin-inline-start: 4px; }
.sel-text { max-height: 92px; overflow-y: auto; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border-inline-start: 3px solid var(--saffron);
  font-size: 15px; line-height: 1.95; color: var(--ink); white-space: pre-wrap; }
.sel-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sel-actions .btn { --b-bg: var(--surface); --b-ink: var(--ink); --b-line: var(--line-2); }

/* آمار فشرده */
.insights { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi-strip { margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-strip > div { padding: 10px 14px; min-width: 0; }
.kpi-strip > div + div { border-inline-start: 1px solid var(--line); }
.kpi-strip dt { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.kpi-strip dd { margin: 2px 0 0; font-size: 18px; font-weight: 650; white-space: nowrap; }
.kpi-strip dd small { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.topwords { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); min-width: 0; }
.topwords .tw-k { font-size: 12px; color: var(--ink-3); white-space: nowrap; flex: none; }
.topwords #topWords { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.topwords .badge { height: 22px; font-size: 12px; cursor: pointer; border: 0; }

/* گوینده‌ها زیر آمار */
.speakers-strip { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 8px; }
.ss-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ss-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.ss-bar { margin: 0; height: 8px; }

/* کاغذ متن */
.transcript-panel { background: var(--surface); }
.transcript-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tt-hint { max-width: 320px; }

/* میز ابزار کناری */
.side-panel {
  position: sticky; top: calc(var(--top-h) + 6px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--tools); border: 1px solid color-mix(in srgb, var(--lapis) 14%, var(--line)); border-radius: var(--r-lg);
}
.side-panel > .tabs {
  flex: none; margin: 0; border-radius: 0; padding: 8px; gap: 4px; flex-wrap: wrap;
  background: var(--tools); border-bottom: 1px solid color-mix(in srgb, var(--lapis) 14%, var(--line));
}
.side-panel > .tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
.side-panel > .tabs button { justify-content: center; padding: 7px 6px; }
.side-panel > .tabs [aria-selected="true"] { background: var(--surface); color: var(--lapis-strong); box-shadow: 0 0 0 1px color-mix(in srgb, var(--lapis) 22%, var(--line)); }
.side-body { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; scrollbar-width: thin; }
.side-section { background: var(--surface); border-radius: var(--r-md); padding: 14px; }
.side-section + .side-section { margin-top: 10px; }
.side-section h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.side-panel .stat { background: var(--surface-2); }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .side-panel { position: static; height: auto !important; max-height: none; }
  .side-body { max-height: 70vh; }
  .insights { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .kpi-strip > div:nth-child(4) { border-inline-start: 0; }
  .kpi-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .deck { position: static; }
  .zoom-ctl, .volume, #muteBtn { display: none; }
}
.deck::before { content: ""; position: absolute; inset-inline: -4px; bottom: 100%; height: 12px; background: var(--bg); }
.model-pick { display: flex; gap: 6px; } .model-pick .input { flex: 1; min-width: 0; }
.model-pick + select { margin-top: 6px; }
textarea.ltr-lines { direction: ltr; text-align: left; font-family: inherit; }

/* ورودی سریع کتابخانه */
.intake { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; margin-bottom: 18px; }
.intake-tile, .intake-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.intake-tile:hover { border-color: color-mix(in srgb, var(--lapis) 40%, var(--line)); color: var(--ink); background: var(--lapis-tint); }
.intake-tile .i, .intake-ic .i { color: var(--lapis); }
.intake-tile b { display: block; font-size: 14px; } .intake-tile small { display: block; font-size: 12px; color: var(--ink-3); }
.intake-link { background: var(--deck); border-color: var(--deck); padding: 8px 8px 8px 8px; }
.intake-link .intake-ic { padding-inline-start: 8px; } .intake-link .intake-ic .i { color: var(--saffron); }
.intake-link .input { flex: 1; background: var(--deck-2); border-color: var(--deck-line); color: var(--deck-ink); }
.intake-link .input::placeholder { color: var(--deck-ink-3); direction: rtl; }
@media (max-width: 900px) { .intake { grid-template-columns: 1fr 1fr; } .intake-link { grid-column: 1 / -1; } }
.sel-stats .stat { padding: 0; background: none; border: 0; border-radius: 0; }
.deck.stuck .sel-text { max-height: 40px; }
.deck.stuck .wave-hint { display: none; }

/* ورود با بله */
.btn-bale { background: #00ADB5; border-color: #00ADB5; color: #fff; font-weight: 600; }
.btn-bale:hover { background: #009aa1; border-color: #009aa1; color: #fff; }
.bale-mark { display: inline-grid; place-items: center; }
.bale-wait { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2, var(--bg)); text-align: center; }
.bale-step { margin: 0 0 8px; font-size: 14px; text-align: start; }
.bale-wait .btn { margin: 6px 0 12px; }
.bale-qr { margin: 4px 0 8px; }
.bale-qr .qr-box { width: 170px; }
.bale-status { margin: 8px 0; font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; justify-content: center; }
.bale-status[data-tone="danger"] { color: var(--danger); }
.bale-status[data-tone="ok"] { color: var(--success, #1a7f4b); }
.i.spin { animation: spin 1s linear infinite; }

/* انتخاب موتور تبدیل گفتار و محل اجرای هوش مصنوعی */
.engine-row { flex-wrap: wrap; }
.engine-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 10px; }
.engine-card { display: grid; gap: 4px; justify-items: start; text-align: start; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface, #fff); color: var(--ink); cursor: pointer; font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.engine-card .i { color: var(--ink-3); }
.engine-card b { font-size: 15px; }
.engine-card span { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.engine-card:hover { border-color: var(--lapis); }
.engine-card.active { border-color: var(--lapis); background: var(--lapis-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lapis) 14%, transparent); }
.engine-card.active .i { color: var(--lapis); }
.settings-group[hidden] { display: none; }
@media (max-width: 640px) { .engine-cards { grid-template-columns: 1fr; } }
.setting-row[hidden] { display: none; }
