/* Voice Platform dashboard — light theme, one accent (deep blue), cool neutrals. */
:root {
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --accent: #1e4fd6; --accent-hover: #183fae; --accent-soft: #e9eefc; --accent-text: #1a44b8;
  --ring: 0 0 0 3px rgba(30, 79, 214, .28);
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --border: #e2e7ee; --border-strong: #c9d2de;
  --text: #16202e; --text-2: #4a5666; --text-3: #7b8796;
  --ok: #157a3d; --ok-bg: #e5f5ec; --info: #0b6f8a; --info-bg: #e0f3f8; --warn: #9a5b00; --warn-bg: #fff3dc;
  --danger: #b42323; --danger-bg: #fdeaea; --danger-border: #f1c2c2; --neutral: #55606f; --neutral-bg: #eef1f5;
  --radius: 8px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar-w: 232px;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 10px; }
a { color: var(--accent-text); }
code { font-family: var(--mono); font-size: 12px; background: var(--neutral-bg); padding: 1px 5px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); }
[hidden] { display: none !important; }
.noscript { padding: 24px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.spacer { flex: 1; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.link { color: var(--accent-text); text-decoration: none; }
.link:hover { text-decoration: underline; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.icon { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---- Shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: 0 0 auto; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); position: relative; flex: 0 0 auto; }
.logo-mark::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M7 16h3l2-5 3 10 3-7 2 4 2-2h3' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-item .chip { margin-left: auto; }
.nav-disabled { color: var(--text-3); cursor: not-allowed; }
.nav-disabled:hover { background: none; color: var(--text-3); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 15px; font-weight: 600; }
.health { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--ok); } .dot-warn { background: #e0a100; } .dot-danger { background: var(--danger); } .dot-neutral { background: var(--border-strong); }
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 32px 96px; }
.content:focus { outline: none; }

/* ---- Connect ---- */
.connect { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.connect-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.connect-card .brand { padding: 0 0 16px; }
.connect-title { font-size: 18px; margin-bottom: 8px; }
.btn-block { width: 100%; justify-content: center; margin-top: 6px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--neutral-bg); color: var(--text); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger.btn-solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-icon { width: 28px; height: 28px; padding: 0; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---- Forms ---- */
.input, .select, .textarea { width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13.5px; line-height: 1.4; }
.input:focus, .select:focus, .textarea:focus, .chips-input:focus-within { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.textarea.json-editor { min-height: 480px; font-size: 12.5px; }
.input.mono, .textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.input.invalid { border-color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field-inline { flex-direction: row; align-items: center; justify-content: space-between; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: 0 0 auto; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.switch-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); margin: 0; }
.range-value { min-width: 48px; text-align: right; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); min-height: 32px; }
.chips-input input { border: 0; outline: 0; flex: 1; min-width: 140px; padding: 2px 4px; background: transparent; font-size: 13.5px; }
.chip-x { border: 0; background: none; padding: 0; margin-left: 2px; cursor: pointer; color: inherit; opacity: .7; display: inline-flex; }
.chip-x:hover { opacity: 1; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto; gap: 8px; align-items: center; }
.row-tools { display: inline-flex; gap: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.check input { accent-color: var(--accent); margin: 0; }
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card:has(input:focus-visible) { box-shadow: var(--ring); }
.radio-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.radio-card strong { font-size: 13.5px; font-weight: 600; }
.radio-card span { font-size: 12px; color: var(--text-2); }
.section { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface-2); }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head .input { flex: 1; }
.section-head .switch { margin-left: 4px; }

/* ---- Layout blocks ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 16px; }
.page-head .sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.card-sub { font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.two-col { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.filters { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.filters .select { width: auto; min-width: 200px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 12px; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile-label { font-size: 12px; color: var(--text-3); }
.tile-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile-value small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; }
.meta-label { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.meta-value { font-size: 13.5px; margin-top: 2px; word-break: break-word; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; word-break: break-word; }
pre.json { margin: 0; padding: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 560px; }

/* ---- Tables ---- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td, .table tr.clickable:focus-visible td { background: var(--surface-2); }
.table tr.clickable:focus-visible { outline: none; box-shadow: inset var(--ring); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.cell-title { font-weight: 500; color: var(--text); text-decoration: none; }
.cell-title:hover { text-decoration: underline; }
.cell-sub { font-size: 12px; color: var(--text-3); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 0; font-size: 12.5px; color: var(--text-2); }

/* ---- Chips & states ---- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
.chip-accent { background: var(--accent-soft); color: var(--accent-text); }
.chip-neutral { background: var(--neutral-bg); color: var(--neutral); }
.chip-mono { font-family: var(--mono); font-weight: 500; font-size: 11.5px; }
.chip .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.empty { padding: 48px 24px; text-align: center; color: var(--text-2); }
.empty h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty p { margin-bottom: 14px; font-size: 13.5px; }
.error-box { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin: 8px 0; white-space: pre-wrap; word-break: break-word; }
.notice { background: var(--info-bg); color: var(--info); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.spinner { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); padding: 20px 0; font-size: 13px; }
.spinner::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.unsaved { color: var(--warn); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.unsaved::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); max-width: 380px; }
.toast-ok { background: var(--ok); } .toast-danger { background: var(--danger); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; padding: 20px 22px; width: min(440px, 100%); box-shadow: 0 20px 40px rgba(16, 24, 40, .25); }
.modal h2 { font-size: 15px; margin-bottom: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---- Agent editor ---- */
.editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.editor-head h2 { font-size: 16px; }
.editor-footer { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 12px 0; margin-top: 8px; background: var(--bg); border-top: 1px solid var(--border); }
.editor-footer .error-box { margin: 0; flex: 1; }

/* ---- Transcript & live panel ---- */
.transcript { display: flex; flex-direction: column; gap: 10px; }
.transcript-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 24px 0; }
.bubble { max-width: 74%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.bubble-user { align-self: flex-end; background: var(--accent-soft); color: var(--text); border-bottom-right-radius: 4px; }
.bubble-agent { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble-pending { opacity: .7; font-style: italic; }
.bubble-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-3); margin-top: 4px; font-family: var(--mono); }
.bubble-interrupted { color: var(--warn); }
.bubble-system { align-self: center; max-width: 90%; font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--neutral-bg); border-radius: 6px; padding: 4px 10px; }
.bubble-system.failed { color: var(--danger); background: var(--danger-bg); }
.live-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 560px; }
.live-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.live-body { flex: 1; overflow: auto; padding: 16px; max-height: 70vh; }
.live-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--neutral-bg); color: var(--neutral); }
.status-connecting { background: var(--warn-bg); color: var(--warn); }
.status-listening { background: var(--ok-bg); color: var(--ok); }
.status-speaking { background: var(--accent-soft); color: var(--accent-text); }
.status-ended { background: var(--neutral-bg); color: var(--neutral); }
.status-error { background: var(--danger-bg); color: var(--danger); }
.status-pill .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
.live-stat { font-size: 12.5px; color: var(--text-2); }
.live-stat b { font-family: var(--mono); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- Knowledge, unanswered questions, public widget ---- */
.chip .spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; opacity: .85; }
.radio-cards-fit { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 14px; }
.select-inline { width: auto; flex: 1; min-width: 160px; }
.cards-2 { gap: 16px 20px; align-items: start; }
.results { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.result { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.result-snippet { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.chunks { display: flex; flex-direction: column; gap: 10px; }
.chunk { border-left: 3px solid var(--accent-soft); padding: 4px 12px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.table .nowrap { white-space: nowrap; }
.gap-q { font-size: 13.5px; font-weight: 500; color: var(--text); max-width: 460px; min-width: 220px; white-space: normal; line-height: 1.45; }
.gap-ctx { font-size: 12.5px; color: var(--text-2); max-width: 460px; min-width: 120px; white-space: normal; line-height: 1.45; margin-top: 2px; }
.checks-stack .checks { flex-direction: column; align-items: flex-start; gap: 8px; }
.qr { width: 180px; height: 180px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; flex: 0 0 auto; }
.share { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 4px; }
.slug-row { flex-wrap: nowrap; }
.slug-row .input { width: auto; flex: 1; min-width: 120px; }
a.btn { color: var(--text); }

/* ---- File upload (Knowledge) ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 16px; margin-bottom: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.dropzone strong { color: var(--text); font-size: 13.5px; font-weight: 600; }
.dropzone svg.icon { width: 22px; height: 22px; color: var(--accent); margin-bottom: 2px; }
.dropzone.disabled { opacity: .55; cursor: not-allowed; }
.dropzone.disabled:hover { border-color: var(--border-strong); background: var(--surface-2); }
.file-sub { display: flex; gap: 5px; max-width: 300px; }
.file-sub .truncate { min-width: 0; flex: 0 1 auto; }
.file-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.file-pick svg.icon { width: 20px; height: 20px; color: var(--accent); }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress { margin-bottom: 12px; }
.progress { position: relative; height: 8px; border-radius: 999px; background: var(--neutral-bg); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s ease-out; }
.progress.indeterminate .progress-bar { width: 35%; transition: none; animation: indeterminate 1.2s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-2); }

/* ---- Languages ---- */
.field-wide { grid-column: 1 / -1; }
.lang-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.chip-suggest { border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); font-family: inherit; cursor: pointer; }
.chip-suggest:hover { border-color: var(--accent); border-style: solid; background: var(--accent-soft); color: var(--accent-text); }
/* Urdu (and other right-to-left) transcript lines, chunks and questions */
[dir="rtl"] { font-family: 'Noto Nastaliq Urdu', 'Urdu Typesetting', var(--font); line-height: 1.9; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .brand { padding: 0 8px 0 0; }
  .brand-name { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-item { padding: 6px 8px; }
  .nav-item .chip { display: none; }
  .sidebar-foot { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 80px; }
  .grid-2, .grid-3, .two-col, .radio-cards, .share { grid-template-columns: 1fr; }
  .slug-row { flex-wrap: wrap; }
  .bubble { max-width: 92%; }
  .live-panel { min-height: 420px; }
}
@media (max-width: 600px) {
  .nav-item > span:first-of-type { display: none; }
  .nav-item svg.icon { width: 18px; height: 18px; }
}
