/* ==========================================================================
   تمرین مصاحبه — Mockup stylesheet (Phase 1)
   RTL-first, responsive, no external dependencies.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --brand: #3346d3;
  --brand-600: #2836b0;
  --brand-50: #eef0fd;
  --brand-100: #dde2fb;
  --teal: #0b7f71;
  --teal-600: #08665b;
  --teal-50: #e6f5f2;

  --ink: #1b2233;
  --ink-2: #49526a;
  --ink-3: #6b7489;
  --line: #e2e6ee;
  --line-2: #cdd3df;
  --bg: #f6f7fb;
  --surface: #ffffff;

  --ok: #1a7f37;    --ok-bg: #e7f5ea;
  --warn: #9a5200;  --warn-bg: #fff3e0;
  --bad: #b42318;   --bad-bg: #fdecea;
  --info: #1f5fbf;  --info-bg: #e8f0fc;
  --muted: #5b6475; --muted-bg: #eef0f4;
  --tech: #6a3fb5;  --tech-bg: #f1ebfb;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 14px rgba(20, 30, 60, .06);
  --shadow-lg: 0 10px 40px rgba(20, 30, 60, .16);
  --sidebar: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Vazirmatn", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .9em; }
small, .small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* Latin/technical runs inside Persian text */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; text-align: left; }
.en { direction: ltr; unicode-bidi: isolate; }
.fa-text { font-family: "Vazirmatn", Tahoma, sans-serif; }
code, .code {
  direction: ltr; unicode-bidi: isolate;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .86em; background: #f1f3f8; border: 1px solid var(--line);
  border-radius: 6px; padding: .05em .4em;
}
pre.user-text {
  white-space: pre-wrap; direction: ltr; text-align: left;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem;
  background: #f7f8fb; border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  padding: .75rem 1rem; margin: .5rem 0;
}

.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt0 { margin-top: 0 !important; } .mb0 { margin-bottom: 0 !important; }
.mt1 { margin-top: .5rem; } .mt2 { margin-top: 1rem; } .mt3 { margin-top: 1.5rem; } .mt4 { margin-top: 2.25rem; }
.mb1 { margin-bottom: .5rem; } .mb2 { margin-bottom: 1rem; } .mb3 { margin-bottom: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mockup ribbon ---------- */
.mock-ribbon {
  background: #1b2233; color: #dfe3ee; font-size: .8rem;
  display: flex; gap: .75rem; align-items: center; justify-content: space-between;
  padding: .35rem 1rem; flex-wrap: wrap;
}
.mock-ribbon a { color: #fff; font-weight: 700; }
.mock-ribbon .persp { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.mock-ribbon .persp a {
  background: rgba(255,255,255,.1); padding: .1rem .6rem; border-radius: 99px; font-weight: 500;
}
.mock-ribbon .persp a.on { background: #fff; color: #1b2233; font-weight: 800; }

/* ---------- Layout ---------- */
.container { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.split-r { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
@media (max-width: 960px) {
  .split, .split-r { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g4.keep2 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.4rem; }
  body { font-size: 15px; }
}

/* ---------- Public header / footer ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 900; color: var(--ink); font-size: 1.1rem; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--teal)); color: #fff; font-size: 1rem;
}
.site-nav { display: flex; gap: .25rem; margin-inline-start: auto; align-items: center; }
.site-nav a { color: var(--ink-2); padding: .4rem .7rem; border-radius: 8px; font-weight: 600; }
.site-nav a:hover, .site-nav a.on { background: var(--brand-50); color: var(--brand); text-decoration: none; }
.icon-btn.nav-toggle { display: none; margin-inline-start: auto; }
@media (max-width: 860px) {
  .icon-btn.nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; inset-inline: 0; top: 64px; background: #fff;
    flex-direction: column; align-items: stretch; padding: .75rem 1rem 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
}
.site-footer { margin-top: 3rem; background: #141a29; color: #b9c0d2; padding: 2.5rem 0 1.5rem; font-size: .9rem; }
.site-footer a { color: #e3e7f2; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .25rem 0; }

/* ---------- App (panel) layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--surface); border-inline-start: 0; border-inline-end: 1px solid var(--line);
  padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { padding: .25rem .5rem 1rem; }
.side-nav { list-style: none; padding: 0; margin: 0; }
.side-nav li a {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.side-nav li a:hover { background: var(--bg); text-decoration: none; }
.side-nav li a.on { background: var(--brand-50); color: var(--brand); }
.side-nav .ico { width: 1.4rem; text-align: center; flex: none; }
.side-nav .count { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; line-height: 1.6; }
.side-sep { font-size: .75rem; color: var(--ink-3); padding: 1rem .7rem .25rem; font-weight: 700; }
.admin .sidebar { background: #161c2c; border-color: #161c2c; }
.admin .sidebar .logo { color: #fff; }
.admin .side-nav li a { color: #c3c9d8; }
.admin .side-nav li a:hover { background: rgba(255,255,255,.06); }
.admin .side-nav li a.on { background: rgba(122,140,255,.18); color: #fff; }
.admin .side-sep { color: #8590a8; }

.app-main { min-width: 0; }
.app-top {
  background: var(--surface); border-bottom: 1px solid var(--line); min-height: 60px;
  display: flex; align-items: center; gap: .75rem; padding: .5rem 1.5rem; position: sticky; top: 0; z-index: 15;
}
.app-top .title { font-weight: 800; font-size: 1.05rem; }
.app-top .who { margin-inline-start: auto; display: flex; align-items: center; gap: .6rem; }
.app-body { padding: 1.5rem; max-width: 1240px; }
.app-top .menu-btn { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 40; transform: translateX(-110%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  [dir=rtl] .sidebar { transform: translateX(110%); }
  .sidebar.open { transform: none; }
  .app-top .menu-btn { display: inline-flex; }
  .app-body { padding: 1rem; }
  .app-top { padding: .5rem 1rem; }
  .who .who-name { display: none; }
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(10, 15, 30, .4); z-index: 35; }
.scrim.open { display: block; }

.page-head { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin-bottom: .1rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: .35rem; }
.crumbs a { color: var(--ink-3); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tint { background: var(--brand-50); border-color: var(--brand-100); box-shadow: none; }
.card.tint-teal { background: var(--teal-50); border-color: #c4e7e0; box-shadow: none; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card.pad0 > .card-head { padding: 1rem 1.25rem 0; }

.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat .v { font-size: 1.75rem; font-weight: 900; line-height: 1.2; }
.stat .k { color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.stat .d { color: var(--ink-3); font-size: .8rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.4;
  padding: .62rem 1.1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: var(--brand); color: #fff; white-space: nowrap; text-decoration: none !important;
  min-height: 44px;
}
.btn:hover { background: var(--brand-600); }
.btn.teal { background: var(--teal); } .btn.teal:hover { background: var(--teal-600); }
.btn.ok { background: var(--ok); }
.btn.danger { background: var(--bad); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--bg); }
.btn.ghost { background: transparent; color: var(--brand); border-color: transparent; }
.btn.ghost:hover { background: var(--brand-50); }
.btn.outline-danger { background: #fff; color: var(--bad); border-color: #f2b8b5; }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; min-height: 34px; border-radius: 8px; }
.btn.lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 10px; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 1.1rem; color: var(--ink); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700;
  padding: .12rem .6rem; border-radius: 99px; white-space: nowrap; line-height: 1.7;
  background: var(--muted-bg); color: var(--muted);
}
.badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.tech { background: var(--tech-bg); color: var(--tech); }
.badge.lg { font-size: .92rem; padding: .25rem .85rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .65rem; border-radius: 99px;
  background: #f1f3f8; border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); white-space: nowrap;
}
.chip.lang { background: var(--teal-50); border-color: #c4e7e0; color: var(--teal-600); font-weight: 700; }
.chip.field { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); font-weight: 700; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.role-tag { font-size: .78rem; font-weight: 800; padding: .05rem .5rem; border-radius: 6px; background: #fff7d6; color: #7a5a00; border: 1px solid #f0dc8c; white-space: nowrap; }
.role-tag.er { background: var(--teal-50); color: var(--teal-600); border-color: #c4e7e0; }

/* ---------- Avatars ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 800; color: #fff; font-size: .95rem; background: var(--brand);
}
.avatar.sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }
.av1 { background: #3346d3; } .av2 { background: #0b7f71; } .av3 { background: #b4531c; }
.av4 { background: #8a3ab9; } .av5 { background: #2a7ab0; } .av6 { background: #a1324f; } .av7 { background: #4b6b2a; }
.person { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.person .nm { font-weight: 800; }
.person .sub { color: var(--ink-3); font-size: .85rem; }

/* ---------- Forms ---------- */
label, .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .3rem; }
.hint { color: var(--ink-3); font-size: .83rem; margin-top: .25rem; }
.field { margin-bottom: 1rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search],
input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: .55rem .75rem; border: 1px solid var(--line-2);
  border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(51,70,211,.3); outline-offset: 1px; border-color: var(--brand); }
input.ltr-input, .ltr-input { direction: ltr; text-align: left; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); background: #fffafa; }
.field-error { color: var(--bad); font-size: .85rem; margin-top: .3rem; display: block; font-weight: 600; line-height: 1.9; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; margin: .35rem 0; cursor: pointer; }
.check input { margin-top: .45rem; width: 1.05rem; height: 1.05rem; flex: none; accent-color: var(--brand); }
.check.disabled { color: var(--ink-3); cursor: not-allowed; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .5rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem 1rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 800; padding: 0 .4rem; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 1.5rem; text-align: center; background: #fafbfe; }

/* option cards (radio as cards) */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.opt {
  border: 1.5px solid var(--line-2); border-radius: 12px; padding: .7rem .85rem; background: #fff; cursor: pointer;
  display: block; position: relative; font-weight: 600;
}
.opt input { position: absolute; opacity: 0; }
.opt .t { font-weight: 800; display: block; }
.opt .s { color: var(--ink-3); font-size: .82rem; font-weight: 500; display: block; }
.opt:has(input:checked), .opt.sel { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-100); }
.opt.dis { background: #f4f5f8; color: var(--ink-3); cursor: not-allowed; border-style: dashed; }
.opt.dis .t { color: var(--ink-3); text-decoration: line-through; }

/* rating scale */
.scale { display: flex; gap: .4rem; flex-wrap: wrap; }
.scale label { margin: 0; }
.scale input { position: absolute; opacity: 0; }
.scale span {
  display: inline-flex; flex-direction: column; align-items: center; min-width: 84px; padding: .5rem .5rem;
  border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .82rem; background: #fff; text-align: center;
}
.scale span b { font-size: 1.15rem; }
.scale input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); box-shadow: 0 0 0 2px var(--brand-100); }
.scale input:focus-visible + span { outline: 3px solid rgba(51,70,211,.3); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid; align-items: flex-start; }
.alert .ai { font-size: 1.2rem; line-height: 1.5; flex: none; }
.alert p:last-child { margin-bottom: 0; }
.alert.info { background: var(--info-bg); border-color: #c7d8f5; color: #183e78; }
.alert.ok { background: var(--ok-bg); border-color: #bfe2c7; color: #135c28; }
.alert.warn { background: var(--warn-bg); border-color: #f5d3a3; color: #6e3b00; }
.alert.bad { background: var(--bad-bg); border-color: #f4c2bd; color: #861b12; }
.alert.tech { background: var(--tech-bg); border-color: #d9c8f3; color: #4c2a86; }
.alert.neutral { background: #f3f4f7; border-color: var(--line); color: var(--ink-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: start; font-weight: 700; color: var(--ink-3); font-size: .8rem; padding: .6rem .75rem; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
table.t td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: #fafbff; }
table.t .num { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { border: 1px solid var(--line); border-radius: 12px; margin: .6rem .6rem; width: auto; padding: .4rem .2rem; background: #fff; }
  table.t.cards td { border: 0; padding: .3rem .75rem; display: flex; gap: .75rem; justify-content: space-between; }
  table.t.cards td::before { content: attr(data-label); color: var(--ink-3); font-size: .8rem; font-weight: 700; flex: none; }
  table.t.cards td.main { display: block; } table.t.cards td.main::before { display: none; }
}

/* ---------- Key/value ---------- */
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: .5rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); font-weight: 600; font-size: .9rem; }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .6rem; } }

/* ---------- Time block ---------- */
.when { display: flex; flex-direction: column; }
.when .main { font-weight: 800; }
.when .tz { color: var(--ink-3); font-size: .82rem; }
.when .greg { color: var(--ink-3); font-size: .8rem; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a, .tabs button {
  font: inherit; font-weight: 700; color: var(--ink-3); padding: .6rem .9rem; border: 0; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none;
}
.tabs .on { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel[hidden] { display: none; }

/* ---------- Stepper (reservation lifecycle) ---------- */
.stepper { display: flex; gap: 0; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: s; }
.stepper li { flex: 1; position: relative; text-align: center; font-size: .8rem; color: var(--ink-3); font-weight: 600; padding-top: 2.1rem; }
.stepper li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%);
  width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: grid; place-items: center; line-height: 1.6rem; z-index: 1;
}
.stepper li::after { content: ""; position: absolute; top: .9rem; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line-2); }
.stepper li:last-child::after { display: none; }
[dir=rtl] .stepper li::before { transform: translateX(50%); content: counter(s, persian); }
.stepper li.done { color: var(--ok); } .stepper li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.done::after { background: var(--ok); }
.stepper li.cur { color: var(--brand); font-weight: 800; } .stepper li.cur::before { border-color: var(--brand); background: var(--brand); color: #fff; }
.stepper li.fail { color: var(--bad); } .stepper li.fail::before { content: "✕"; border-color: var(--bad); background: var(--bad); color: #fff; }
.stepper li.skip { opacity: .45; }

/* ---------- Event timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-block: 0 .9rem; padding-inline: 1.6rem 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: .35rem; top: .55rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--line-2); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: .65rem; top: 1.3rem; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.ok::before { background: var(--ok); } .timeline li.bad::before { background: var(--bad); }
.timeline li.warn::before { background: #e08a00; } .timeline li.info::before { background: var(--brand); } .timeline li.tech::before { background: var(--tech); }
.timeline .tt { font-weight: 700; }
.timeline .tm { color: var(--ink-3); font-size: .8rem; }

/* ---------- Next action card ---------- */
.next-action { border: 2px solid var(--brand); background: linear-gradient(0deg, #fff, var(--brand-50)); }
.next-action.warn { border-color: #e9a23b; background: linear-gradient(0deg, #fff, #fff6e8); }
.next-action.bad { border-color: #e59a93; background: linear-gradient(0deg, #fff, #fdf0ee); }
.next-action.ok { border-color: #8fcf9f; background: linear-gradient(0deg, #fff, #eef8f0); }
.next-action.neutral { border-color: var(--line-2); background: #fff; }
.next-action .na-label { font-size: .78rem; font-weight: 800; color: var(--ink-3); letter-spacing: 0; }

.status-hero { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 1.35rem; }

/* Meeting link box */
.linkbox { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.linkbox .url { direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; flex: 1; min-width: 200px; text-align: left; }
.attempts { display: flex; gap: .5rem; margin: .5rem 0; }
.attempts span { flex: 1; text-align: center; padding: .4rem; border-radius: 10px; border: 1.5px dashed var(--line-2); font-size: .82rem; font-weight: 700; color: var(--ink-3); }
.attempts span.used { border-style: solid; border-color: #e9a23b; background: #fff6e8; color: #7a4300; }
.attempts span.cur { border-style: solid; border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }

/* ---------- Mobile sticky action bar ---------- */
.mobile-action { display: none; }
@media (max-width: 960px) {
  .mobile-action {
    display: flex; position: sticky; bottom: 0; z-index: 25; gap: .6rem; align-items: center;
    background: #fff; border-top: 1px solid var(--line); padding: .6rem 1rem; box-shadow: 0 -6px 20px rgba(20,30,60,.08);
    margin: 1rem -1rem -1rem;
  }
  .mobile-action .ma-status { flex: 1; min-width: 0; font-size: .8rem; line-height: 1.5; }
  .mobile-action .ma-status b { display: block; font-size: .9rem; }
  .mobile-action .btn { min-width: 0; }
}

/* ---------- Read-more ---------- */
.clamp { position: relative; }
.clamp .clamp-body { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.clamp.c2 .clamp-body { -webkit-line-clamp: 2; }
.clamp.c3 .clamp-body { -webkit-line-clamp: 3; }
.clamp.open .clamp-body { display: block; -webkit-line-clamp: unset; }
.clamp-toggle { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: .2rem 0; }
details.more summary { cursor: pointer; color: var(--brand); font-weight: 700; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary .when-closed { display: none; }
details.more:not([open]) summary .when-open { display: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(10,15,30,.5); display: none; align-items: center; justify-content: center; z-index: 60; padding: 1rem; }
.modal.open { display: flex; }
.modal .dialog { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; padding: 1.4rem; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }

/* ---------- Landing ---------- */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #e4e8ff 0, transparent 60%), radial-gradient(900px 400px at 0% 110%, #dff3ee 0, transparent 60%), #fff; padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: 2.45rem; line-height: 1.45; margin-bottom: .75rem; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.cta-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: 1.5rem; max-width: 560px; }
.cta { display: block; border-radius: 16px; padding: 1rem 1.1rem; color: #fff; text-decoration: none !important; box-shadow: var(--shadow); }
.cta b { display: block; font-size: 1.15rem; }
.cta span { font-size: .87rem; opacity: .92; }
.cta.find { background: var(--brand); } .cta.find:hover { background: var(--brand-600); }
.cta.conduct { background: #fff; color: var(--teal-600); border: 2px solid var(--teal); } .cta.conduct:hover { background: var(--teal-50); }
.hero-art { width: 100%; height: auto; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .hero-art { max-width: 460px; margin-inline: auto; display: block; }
}
@media (max-width: 480px) { .cta-pair { grid-template-columns: 1fr; } }
.section { padding: 3rem 0 0; }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 1.75rem; }
.section-title p { color: var(--ink-2); }
.step-card { text-align: start; }
.step-num { width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 900; margin-bottom: .6rem; }
.feature-ico { font-size: 1.6rem; }

/* ---------- Calendar / slots ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; min-height: 120px; }
.day h4 { font-size: .82rem; margin: 0 0 .4rem; text-align: center; color: var(--ink-2); }
.day h4 small { display: block; font-weight: 500; color: var(--ink-3); font-size: .74rem; }
.slot {
  display: block; text-align: center; font-size: .82rem; font-weight: 700; padding: .35rem .25rem; border-radius: 8px;
  border: 1.5px solid var(--brand-100); background: var(--brand-50); color: var(--brand-600); margin-bottom: .35rem; cursor: pointer; text-decoration: none !important;
}
.slot:hover { border-color: var(--brand); }
.slot.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.slot.dis { background: #f4f5f8; color: var(--ink-3); border: 1.5px dashed var(--line-2); cursor: not-allowed; font-weight: 500; }
.slot small { display: block; font-weight: 500; font-size: .74rem; }
.slot .why { display: block; font-size: .7rem; font-weight: 500; }
.slot.held { background: var(--warn-bg); border-color: #f5d3a3; color: var(--warn); cursor: default; }
.slot.booked { background: var(--ok-bg); border-color: #bfe2c7; color: var(--ok); cursor: default; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.legend i { display: inline-block; width: .9rem; height: .9rem; border-radius: 4px; vertical-align: middle; margin-inline-end: .3rem; border: 1.5px solid; }
@media (max-width: 860px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; display: grid; grid-template-columns: 90px 1fr; gap: .5rem; align-items: start; }
  .day h4 { text-align: start; }
  .day .slots { display: flex; flex-wrap: wrap; gap: .35rem; }
  .day .slot { margin: 0; padding-inline: .6rem; }
}

/* ---------- Charts (CSS/SVG, single light theme) ---------- */
.viz { --series-1: #257de0; --series-2: #f47230; --seq-1: #cce3fd; --seq-2: #9dc8f7; --seq-3: #519ced; --seq-4: #2370cd; --seq-5: #0e3d7e; }
.hbars { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: .45rem .75rem; align-items: center; font-size: .88rem; }
.hbars .lab { color: var(--ink-2); font-weight: 600; }
.hbars .track { height: 14px; position: relative; }
.hbars .bar { height: 100%; background: var(--series-1); border-radius: 0; border-start-end-radius: 4px; border-end-end-radius: 4px; min-width: 2px; }
.hbars .val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.hbars .bar:hover, .hbars .bar.pair > i:hover { filter: brightness(.9); }
.hbars .pair { display: flex; flex-direction: column; gap: 2px; height: auto; background: none; }
.hbars .pair > i { display: block; height: 9px; border-radius: 0; border-start-end-radius: 4px; border-end-end-radius: 4px; }
.vlegend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin-bottom: .6rem; }
.vlegend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: middle; margin-inline-end: .3rem; }
.stackbar { display: flex; height: 26px; gap: 2px; border-radius: 6px; overflow: hidden; }
.stackbar > i { display: block; height: 100%; }
.heat { display: grid; grid-template-columns: 70px repeat(8, minmax(0, 1fr)); gap: 2px; font-size: .74rem; }
.heat .h { color: var(--ink-3); text-align: center; font-weight: 600; }
.heat .r { color: var(--ink-2); font-weight: 600; }
.heat .c { height: 30px; border-radius: 4px; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.heat .c.l1 { background: var(--seq-1); color: #1b2233; } .heat .c.l2 { background: var(--seq-2); color: #1b2233; }
.heat .c.l3 { background: var(--seq-3); color: #fff; } .heat .c.l4 { background: var(--seq-4); color: #fff; } .heat .c.l5 { background: var(--seq-5); color: #fff; }
.heat .c.l0 { background: #f1f3f8; color: var(--ink-3); }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: .85rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: #f7f8ff; }
.notif .ni { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: none; background: var(--bg); }
.notif .nt { font-weight: 700; }
.notif .nm { color: var(--ink-3); font-size: .8rem; }
.dot-unread { width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); display: inline-block; }

/* ---------- Mockup index ---------- */
.journey { counter-reset: j; list-style: none; padding: 0; margin: 0; }
.journey li { counter-increment: j; position: relative; padding-block: .35rem; padding-inline: 2.2rem 0; }
.journey li::before { content: counter(j); position: absolute; inset-inline-start: 0; top: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: .82rem; }
.page-list { columns: 2; column-gap: 2rem; padding-inline-start: 1.2rem; }
@media (max-width: 640px) { .page-list { columns: 1; } }
.page-list li { break-inside: avoid; margin-bottom: .2rem; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 100px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(520px, 100%); }

/* ---------- Print-ish policy ---------- */
.policy { border-inline-start: 4px solid var(--brand); padding-inline-start: 1rem; margin-bottom: 1.5rem; }
.policy.teal { border-color: var(--teal); }
.toc { position: sticky; top: 80px; }
.toc ol { padding-inline-start: 1.2rem; margin: 0; }

/* ---------- Languages multi-select ---------- */
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; }
.ms-opt { display: flex; align-items: center; gap: .5rem; border: 1.5px solid var(--line-2); border-radius: 10px; padding: .45rem .7rem; cursor: pointer; font-weight: 600; margin: 0; background: #fff; }
.ms-opt input { accent-color: var(--teal); width: 1rem; height: 1rem; flex: none; margin: 0; }
.ms-opt:has(input:checked) { border-color: var(--teal); background: var(--teal-50); color: var(--teal-600); }
.ms-opt:focus-within { outline: 3px solid rgba(11,127,113,.25); }
.ms-summary { margin-top: .6rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.lang-ms legend { font-size: 1rem; }
.lang-ms.has-error, body.show-errors .lang-ms.demo-field { border-color: #f4c2bd; background: #fffafa; }
.lang-compare { display: grid; gap: .45rem; background: #f7f8fb; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.lang-compare > div { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

/* ---------- Validation ---------- */
.counter { font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.counter.over { color: var(--bad); font-weight: 800; }
.demo-error { display: none !important; }
body.show-errors .demo-error { display: block !important; }
body.show-errors .demo-field input, body.show-errors .demo-field select, body.show-errors .demo-field textarea { border-color: var(--bad); background: #fffafa; }
body.show-errors fieldset.demo-field { border-color: #f4c2bd; }
.ribbon-btn { background: #f2a600; color: #1b2233; border: 0; border-radius: 99px; font: inherit; font-weight: 800; padding: .05rem .75rem; cursor: pointer; }
.design-note { border: 1.5px dashed #9b7ad8; background: #faf7ff; color: #4c2a86; border-radius: 12px; padding: .75rem 1rem; font-size: .85rem; line-height: 1.85; }
.design-note > b:first-child { display: block; margin-bottom: .2rem; }
.design-note a { color: #5b34b0; font-weight: 700; }
.format-box { background: #f7f8fb; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-size: .84rem; align-self: start; }
.format-box ul { padding-inline-start: 1.1rem; margin: .35rem 0; }
.format-box li { margin-bottom: .25rem; }
.format-box code { white-space: normal; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
.field-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; }
@media (max-width: 760px) { .field-aside { grid-template-columns: 1fr; } .format-box code { white-space: normal; } }
input[type=month] { width: 100%; font: inherit; font-size: .95rem; padding: .55rem .75rem; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; min-height: 44px; }
.field.has-error input[type=month] { border-color: var(--bad); }


/* ---------- Meeting link confirmation ---------- */
.badge.checking { background: var(--info-bg); color: var(--info); }
.badge.checking::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.confirm-box { border: 2px solid var(--brand-100); background: var(--brand-50); border-radius: 12px; padding: .9rem 1rem; }
.confirm-box .url-full { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: .5rem .7rem; overflow-wrap: anywhere; display: block; margin: .3rem 0 .6rem; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .55rem; padding: .3rem 0; align-items: baseline; }
.checklist .ck { width: 1.3rem; text-align: center; flex: none; font-weight: 800; }
.checklist .ok .ck { color: var(--ok); } .checklist .bad .ck { color: var(--bad); } .checklist .run .ck { color: var(--info); } .checklist .skip { color: var(--ink-3); }
.url-copy { display: flex; gap: .4rem; align-items: center; }
.url-copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; min-height: 34px; padding: .25rem .5rem; background: #f7f8fb; }
.join-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.host-pill { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; background: #f1f3f8; border: 1px solid var(--line); border-radius: 6px; padding: .1rem .45rem; }
tr.superseded td { color: var(--ink-3); }

/* ---------- Homepage CMS ---------- */
.cms { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .cms { grid-template-columns: 1fr; } }
.cms-blocks details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; }
.cms-blocks summary { cursor: pointer; padding: .75rem 1rem; font-weight: 800; display: flex; gap: .6rem; align-items: center; list-style: none; }
.cms-blocks summary::-webkit-details-marker { display: none; }
.cms-blocks summary::after { content: "▾"; margin-inline-start: auto; color: var(--ink-3); }
.cms-blocks details[open] summary::after { content: "▴"; }
.cms-blocks details[open] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-100); }
.cms-blocks .body { padding: 0 1rem 1rem; }
.block-num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800; flex: none; }
.block-sub { font-weight: 500; color: var(--ink-3); font-size: .82rem; }
.cms-group { border-top: 1px dashed var(--line); padding-top: .75rem; margin-top: .75rem; }
.cms-group > .label { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.img-field { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .75rem; align-items: start; }
.img-field img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); background: #f1f3f8; }
.cms-preview { position: sticky; top: 72px; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.cms-preview .bar { display: flex; gap: .5rem; align-items: center; padding: .5rem .8rem; background: #f1f3f8; border-bottom: 1px solid var(--line); font-size: .8rem; }
.cms-preview .frame { height: calc(100vh - 150px); overflow-y: auto; }
.cms-preview .pv-scale { zoom: .62; }
.pv-block { position: relative; outline: 2px dashed transparent; outline-offset: -2px; transition: outline-color .15s, background .15s; }
.pv-block > .pv-tag { position: absolute; top: .5rem; inset-inline-start: .5rem; z-index: 3; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 800; border-radius: 8px; padding: .1rem .55rem; }
.pv-block.hl { outline-color: var(--brand); background: rgba(51,70,211,.04); }
.save-bar { position: sticky; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: .7rem 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 1rem -1.5rem -1.5rem; box-shadow: 0 -6px 20px rgba(20,30,60,.08); }
.toast { position: fixed; bottom: 1.25rem; inset-inline-end: 1.25rem; background: #1b2233; color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 80; }
.placeholder-note { font-size: .78rem; color: var(--warn); font-weight: 700; }

.cms-preview .pv-scale a, .cms-preview .pv-scale button, .cms-preview .pv-scale select { pointer-events: none; }
