/* Voice recording portal. Mobile first, RTL-aware (logical properties), light/dark. No build step. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e9edf2; --text: #111827; --muted: #5b6472;
  --faint: #8a93a1; --border: #e3e7ed; --border-strong: #cfd6df;
  --accent: #0d7a6f; --accent-hover: #0a6a60; --accent-ink: #ffffff; --accent-soft: #e2f3f0; --accent-line: #a7dcd4;
  --ok: #15803d; --ok-soft: #e5f6ea; --warn: #a15c07; --warn-soft: #fdf1dc; --bad: #c0262d; --bad-soft: #fde9e8;
  --info: #2457c5; --info-soft: #e8eefc; --rec: #dc2626;
  --jo: #0d7a6f; --iq: #2f62d6; --sa: #b8650a;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 2px 8px rgba(17, 24, 39, .05);
  --shadow-lg: 0 12px 40px rgba(17, 24, 39, .18);
  --font: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Noto Sans", Tahoma, Arial, sans-serif;
  --font-script: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1014; --surface: #151a20; --surface-2: #1b2128; --surface-3: #232a33; --text: #e8ecf1; --muted: #a0a9b6;
    --faint: #76808d; --border: #262e38; --border-strong: #343e4a;
    --accent: #2bb5a4; --accent-hover: #38c7b5; --accent-ink: #04211d; --accent-soft: #10302c; --accent-line: #1f5f57;
    --ok: #4ccb7c; --ok-soft: #10301d; --warn: #f2b84b; --warn-soft: #34280f; --bad: #f8746b; --bad-soft: #3a1716;
    --info: #7fa6ff; --info-soft: #172443; --rec: #ff5b51; --jo: #2bb5a4; --iq: #6f97ff; --sa: #f0a24a;
    --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1014; --surface: #151a20; --surface-2: #1b2128; --surface-3: #232a33; --text: #e8ecf1; --muted: #a0a9b6;
  --faint: #76808d; --border: #262e38; --border-strong: #343e4a;
  --accent: #2bb5a4; --accent-hover: #38c7b5; --accent-ink: #04211d; --accent-soft: #10302c; --accent-line: #1f5f57;
  --ok: #4ccb7c; --ok-soft: #10301d; --warn: #f2b84b; --warn-soft: #34280f; --bad: #f8746b; --bad-soft: #3a1716;
  --info: #7fa6ff; --info-soft: #172443; --rec: #ff5b51; --jo: #2bb5a4; --iq: #6f97ff; --sa: #f0a24a;
  --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; font-weight: 700; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 650; }
h3 { font-size: .95rem; margin: 0 0 .5rem; font-weight: 650; }
p { margin: .35rem 0 .75rem; }
code { font-size: .85em; background: var(--surface-2); padding: .05rem .35rem; border-radius: 6px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: .85rem; } .tiny { font-size: .78rem; }
.num { font-variant-numeric: tabular-nums; }
[dir="rtl"] .num, .ltr { direction: ltr; unicode-bidi: isolate; }
.ar { font-family: var(--font-script); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.hide { display: none !important; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt { margin-top: 18px; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.side { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.side .in { display: flex; align-items: center; gap: .5rem .75rem; padding: .6rem 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); white-space: nowrap; flex: 1; }
.brand:hover { text-decoration: none; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo svg.i { width: 18px; height: 18px; stroke-width: 2.2; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; line-height: 1.2; }
.nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; order: 3; flex: 1 1 100%; margin: 0 -6px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; gap: .55rem; padding: .45rem .7rem; border-radius: 9px; color: var(--muted); white-space: nowrap; font-weight: 550; font-size: .92rem; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav .count { margin-inline-start: auto; background: var(--warn); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; min-width: 1.4rem; text-align: center; }
.tools { display: flex; gap: .35rem; align-items: center; }
.iconbtn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 9px; height: 34px; min-width: 34px;
  padding: 0 .55rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.iconbtn:hover { background: var(--surface-2); text-decoration: none; }
.who { display: none; }
.content { padding: 20px 16px 72px; max-width: 1180px; margin: 0 auto; }
.content.narrow { max-width: 600px; }
@media (min-width: 1024px) {
  .shell.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .shell.admin .side { position: static; min-height: 100vh; border-bottom: 0; border-inline-end: 1px solid var(--border); }
  .shell.admin .side .in { position: sticky; top: 0; flex-direction: column; align-items: stretch; height: 100vh; padding: 18px 14px; flex-wrap: nowrap; gap: 18px; }
  .shell.admin .brand { flex: 0 0 auto; padding: 0 6px; }
  .shell.admin .nav { flex-direction: column; order: 0; margin: 0; flex: 1 1 auto; overflow: visible; }
  .shell.admin .nav a { padding: .55rem .75rem; }
  .shell.admin .tools { border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap; }
  .shell.admin .who { display: block; width: 100%; font-size: .8rem; color: var(--muted); padding: 0 4px 6px; overflow: hidden; text-overflow: ellipsis; }
  .shell.admin .content { padding: 28px 36px 80px; margin: 0; max-width: 1240px; width: 100%; }
}
@media (min-width: 761px) { .shell:not(.admin) .nav { order: 0; flex: 0 1 auto; margin: 0; } .shell:not(.admin) .brand { flex: 0 0 auto; } .shell:not(.admin) .side .in { max-width: 1180px; margin: 0 auto; } }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lead { color: var(--muted); margin: .3rem 0 0; max-width: 68ch; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }

/* ---------------------------------------------------------------- cards, grids, KPIs */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.c2m { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } .grid.c21 { grid-template-columns: 2fr 1fr; } }
@media (min-width: 1100px) { .grid.c5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 720px) and (max-width: 1099px) { .grid.c5 { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--text); }
.kpi .k { color: var(--muted); font-size: .84rem; font-weight: 550; display: flex; align-items: center; gap: .45rem; }
.kpi .k svg.i { width: 16px; height: 16px; color: var(--faint); }
.kpi .v { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.2; }
.kpi .v small { font-size: .85rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.kpi .sub { color: var(--muted); font-size: .8rem; }
.kpi.attention { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
a.kpi:hover { text-decoration: none; border-color: var(--border-strong); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.jo, .bar.jo > span, .seg.jo { background: var(--jo); } .dot.iq, .bar.iq > span, .seg.iq { background: var(--iq); } .dot.sa, .bar.sa > span, .seg.sa { background: var(--sa); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: .88rem; margin: .8rem 0 .3rem; }
.hint { font-weight: 450; color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .75rem; min-height: 42px; }
input[type=file] { font: inherit; max-width: 100%; }
textarea { min-height: 220px; line-height: 1.75; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; margin: .5rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip > span { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--border-strong); border-radius: 99px; padding: .4rem .85rem; font-weight: 600; font-size: .9rem; cursor: pointer; background: var(--surface); }
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .55rem 1rem; min-height: 42px;
  font: inherit; font-weight: 650; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad); color: #fff; } .btn.ok { background: var(--ok); color: #fff; } .btn.warn { background: var(--warn); color: #fff; }
.btn.sm { min-height: 32px; padding: .25rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn.lg { min-height: 52px; padding: .7rem 1.4rem; font-size: 1.02rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn kbd { font: inherit; font-size: .72rem; opacity: .8; border: 1px solid currentColor; border-radius: 5px; padding: 0 .3rem; }
form.inline { display: inline; }
.form-row { display: grid; gap: 0 14px; }
@media (min-width: 720px) { .form-row.c2 { grid-template-columns: 1fr 1fr; } .form-row.c3 { grid-template-columns: repeat(3, 1fr); } .form-row.c4 { grid-template-columns: 2fr 1.4fr 2fr 1fr; } }

/* ---------------------------------------------------------------- notices, badges */
.notice { border-radius: 12px; padding: .75rem .95rem; margin: .6rem 0 1rem; border: 1px solid transparent; display: flex; gap: .6rem; align-items: flex-start; }
.notice svg.i { margin-top: 2px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); } .notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); } .notice.info { background: var(--info-soft); color: var(--info); }
.explain { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; }
.explain ol { margin: .4rem 0 0; padding-inline-start: 1.2rem; } .explain li { margin: .2rem 0; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.accepted, .badge.approved, .badge.received, .badge.done, .badge.paid { background: var(--ok-soft); color: var(--ok); }
.badge.flagged, .badge.processing, .badge.running, .badge.invite { background: var(--warn-soft); color: var(--warn); }
.badge.rerecord, .badge.rejected, .badge.failed, .badge.off { background: var(--bad-soft); color: var(--bad); }
.badge.tts { background: var(--info-soft); color: var(--info); }

/* ---------------------------------------------------------------- progress, bars, charts */
.progress, .bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span, .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.bar.thick { height: 12px; }
.target { display: grid; gap: 6px; margin: 4px 0 16px; }
.target .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart text { fill: var(--faint); font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------------------------------------------------------------- tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; }
th { font-size: .76rem; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
tr:last-child td { border-bottom: 0; }
tfoot td, tfoot th { background: var(--surface-2); font-weight: 700; border-bottom: 0; }
td audio { width: 220px; height: 34px; display: block; }
.person { display: flex; align-items: center; gap: .65rem; min-width: 0; color: var(--text); }
a.person:hover { text-decoration: none; }
a.person:hover b { color: var(--accent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; color: #fff; background: var(--accent); }
.avatar.jo { background: var(--jo); } .avatar.iq { background: var(--iq); } .avatar.sa { background: var(--sa); }
.person .meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.person .meta small { color: var(--muted); font-size: .78rem; }

/* ---------------------------------------------------------------- empty state */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--faint); }
.empty .ico svg.i { width: 26px; height: 26px; }
.empty h3 { color: var(--text); margin-bottom: .3rem; }
.empty p { max-width: 46ch; margin: 0 auto 14px; }

/* ---------------------------------------------------------------- topics */
.dialect-block { margin-bottom: 30px; }
.dialect-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 12px; flex-wrap: wrap; }
.dialect-head h2 { margin: 0; font-size: 1.15rem; }
.topics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.topic { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow); color: var(--text); }
a.topic:hover { text-decoration: none; border-color: var(--accent-line); }
.topic .t { font-weight: 700; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topic .t .more { color: var(--faint); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.topic .stats { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); gap: 6px; }
.sample { font-family: var(--font-script); font-size: 1.08rem; line-height: 1.9; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sample:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- recordings (review) */
.rec { display: grid; gap: .5rem; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rec:last-child { border-bottom: 0; }
.rec .script { font-family: var(--font-script); font-size: 1.12rem; line-height: 1.9; }
.rec audio { width: 100%; max-width: 440px; height: 38px; }
.metrics { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--muted); }
.metrics b { color: var(--text); font-weight: 650; }
.review-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.review-actions input[type=text] { max-width: 260px; min-height: 32px; padding: .25rem .6rem; }
.asr-compare { display: grid; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .95rem; }
.asr-compare .lab { font-size: .75rem; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: .45rem; align-items: center; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .badge { font-size: .7rem; }
.spot { max-width: 760px; }
.spot .script { font-family: var(--font-script); font-size: 1.5rem; line-height: 1.9; text-align: center; padding: 18px 6px; }
.spot audio { width: 100%; height: 44px; }
.spot .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }

/* ---------------------------------------------------------------- activity */
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: .7rem; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.activity li:last-child { border-bottom: 0; }
.activity .when { color: var(--faint); font-size: .76rem; margin-inline-start: auto; white-space: nowrap; }
.activity .ev-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.activity .ev-ico.ok { background: var(--ok-soft); color: var(--ok); } .activity .ev-ico.warn { background: var(--warn-soft); color: var(--warn); }
.activity .ev-ico.bad { background: var(--bad-soft); color: var(--bad); } .activity .ev-ico.info { background: var(--info-soft); color: var(--info); }
.activity .ev-ico svg.i { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- modal, disclosure */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 14, 20, .45); }
dialog.modal .mh { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
dialog.modal .mh h2 { margin: 0; }
dialog.modal .mb { padding: 18px 20px 20px; }
dialog.modal .opt { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
dialog.modal .opt h3 { margin-bottom: .2rem; }
details.tech { margin-top: 12px; }
details.tech summary { cursor: pointer; color: var(--muted); font-size: .88rem; font-weight: 600; }
details.tech[open] summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- auth pages */
.auth { max-width: 420px; margin: 8vh auto 0; padding: 0 16px; }
.auth .card { padding: 26px; }
.auth .brand { justify-content: center; margin-bottom: 18px; font-size: 1.1rem; }
.consent-text { white-space: pre-wrap; line-height: 1.95; max-height: 52vh; overflow: auto; background: var(--surface-2); border-radius: 12px; padding: 16px; font-size: .97rem; }

/* ---------------------------------------------------------------- freelancer home */
.hero { background: linear-gradient(135deg, #0d7a6f, #0f5f7a); color: #fff; border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero h2 { color: #fff; margin: 0 0 .2rem; font-size: 1.2rem; }
.hero p { color: rgba(255, 255, 255, .85); margin: 0 0 12px; }
.hero .btn { background: #fff; color: #0b4f48; }
.hero .bar { background: rgba(255, 255, 255, .25); margin: 10px 0 6px; } .hero .bar > span { background: #fff; }
.hero .tiny { color: rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- recorder (mobile first) */
.recorder { display: flex; flex-direction: column; min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px); }
.rec-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); }
.rec-head .progress { flex: 1; margin: 0 .6rem; }
.script-card { flex: 1; display: flex; flex-direction: column; justify-content: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px 18px; margin: 12px 0; box-shadow: var(--shadow); min-height: 210px; }
.script-text { font-family: var(--font-script); font-size: clamp(1.55rem, 6.4vw, 2.3rem); line-height: 1.85; text-align: center; direction: rtl; unicode-bidi: isolate; word-spacing: .06em; margin: 0; }
.script-meta { text-align: center; color: var(--faint); font-size: .76rem; margin-top: .8rem; }
.feedback { min-height: 3rem; }
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 0 4px; }
.recbtn { width: 84px; height: 84px; border-radius: 50%; border: 5px solid color-mix(in srgb, var(--rec) 26%, var(--surface)); background: var(--rec); cursor: pointer;
  display: flex; align-items: center; justify-content: center; justify-self: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--rec) 35%, transparent); transition: transform .12s; touch-action: manipulation; }
.recbtn:active { transform: scale(.96); }
.recbtn .ico { width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: all .15s; }
.recbtn.on .ico { border-radius: 6px; width: 26px; height: 26px; }
.recbtn.on { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rec) 45%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
.recbtn[disabled] { opacity: .45; animation: none; }
.side-btn { display: flex; justify-content: center; }
.timer { direction: ltr; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; min-height: 1.4rem; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px auto 0; max-width: 260px; width: 100%; }
.meter > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .06s linear; }
.review-bar { display: none; gap: 10px; }
.review-bar.show { display: grid; grid-template-columns: 1fr 1fr; }
.review-bar audio { grid-column: 1 / -1; width: 100%; height: 44px; }
.queue-pill { display: none; font-size: .78rem; padding: .15rem .6rem; border-radius: 99px; background: var(--info-soft); color: var(--info); }
.queue-pill.show { display: inline-block; }
.toast { position: fixed; inset-inline: 16px; bottom: 18px; margin: 0 auto; max-width: 520px; z-index: 50; border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow-lg); display: none; font-weight: 600; }
.toast.show { display: block; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #fff; } .toast.info { background: var(--info); color: #fff; }

/* ---------------------------------------------------------------- lists, misc */
.uplist { list-style: none; margin: 0; padding: 0; }
.uplist li { padding: .7rem 0; border-bottom: 1px solid var(--border); display: grid; gap: .3rem; }
.uplist li:last-child { border-bottom: 0; }
.drop { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 24px; text-align: center; background: var(--surface); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row > select, .row > input, form.row select, form.row input[type=date] { width: auto; }
.sentence { background: var(--accent-soft); color: var(--accent); border-radius: 12px; padding: .7rem 1rem; font-weight: 650; margin: 14px 0 4px; }
footer { text-align: center; color: var(--faint); font-size: .78rem; padding: 18px; }
