/* IGautoReply dashboard — RTL, light/dark */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --border: #e4e7ef;
  --border-strong: #cfd5e2;
  --text: #161a23;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-soft: rgba(124, 58, 237, .10);
  --on-primary: #ffffff;
  --success: #0f7a55;
  --success-soft: rgba(18, 128, 92, .12);
  --warning: #a14a06;
  --warning-soft: rgba(247, 144, 9, .15);
  --danger: #cf2a1e;
  --danger-soft: rgba(217, 45, 32, .10);
  --info: #1d4ed8;
  --info-soft: rgba(29, 78, 216, .10);
  --ig: linear-gradient(135deg, #f9a03f 0%, #e1306c 45%, #a334d6 75%, #5851db 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --font: Vazirmatn, Vazir, Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar: 252px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1016;
    --surface: #161922;
    --surface-2: #1d212c;
    --border: #272c39;
    --border-strong: #363c4d;
    --text: #e8eaf0;
    --muted: #9ba3b4;
    --faint: #6b7385;
    --primary: #9d70ff;
    --primary-hover: #8b5cf6;
    --primary-soft: rgba(157, 112, 255, .16);
    --success: #3ccf91;
    --success-soft: rgba(60, 207, 145, .14);
    --warning: #f5a524;
    --warning-soft: rgba(245, 165, 36, .14);
    --danger: #ff6b5e;
    --danger-soft: rgba(255, 107, 94, .14);
    --info: #6b9bff;
    --info-soft: rgba(107, 155, 255, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px 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-family: var(--font); font-size: 15px; line-height: 1.8; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.ltr { direction: ltr; text-align: left; }
.ltr-inline { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.wrap { white-space: normal; min-width: 180px; }
.text-danger { color: var(--danger); }
.is-hidden { display: none !important; }
.spacer { flex: 1; }
.i { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------- layout */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar);
  background: var(--surface); border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; z-index: 30;
  transition: transform .2s ease;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.05rem; padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand-text small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--ig); color: #fff; display: grid; place-items: center; flex: none; }
.brand-mark .i { width: 20px; height: 20px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font: inherit; font-weight: 500; border: 0; background: none; width: 100%; text-align: start; cursor: pointer;
}
.nav a:hover, .nav-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav-badge { margin-inline-start: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; line-height: 1.6; }
.nav-foot { border-top: 1px solid var(--border); padding-top: 10px; }
.main { margin-inline-start: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px 6px; }
.topbar h1 { margin: 0; }
.content { padding: 12px 28px 28px; flex: 1; width: 100%; max-width: 1280px; }
.foot { color: var(--faint); font-size: .78rem; padding: 0 28px 20px; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.menu-btn { display: none; }
.scrim { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 20; }
  .main { margin-inline-start: 0; }
  .menu-btn { display: grid; }
  .topbar { padding: 14px 16px 4px; }
  .content { padding: 10px 16px 24px; }
  .foot { padding: 0 16px 16px; }
}

/* ------------------------------------------------------------- cards & grid */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols > .card { margin-bottom: 0; }
.stack > .card { margin-bottom: 18px; }
@media (max-width: 1180px) { .cols { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.4; }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .i { width: 40px; height: 40px; color: var(--faint); margin-bottom: 8px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
meter { width: 90px; height: 8px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; background: var(--faint); }
.dot-ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot-err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* ------------------------------------------------------------- alerts & badges */
.alert { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 12px; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert a { color: inherit; font-weight: 700; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 1px 10px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-err { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px; min-height: 40px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tab:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; border-color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ig { background: var(--ig); border: 0; color: #fff; }
.btn-ig:hover { filter: brightness(1.05); background: var(--ig); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 5px 12px; min-height: 34px; font-size: .88rem; }
.btn-xs { padding: 2px 8px; min-height: 28px; font-size: .8rem; }
.btn-sm .i, .btn-xs .i { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }

/* ------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .92rem; padding: 0; }
.field small { line-height: 1.7; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 12px; min-height: 42px; width: 100%;
}
textarea { resize: vertical; line-height: 1.8; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
.form-grid { display: flex; flex-direction: column; }
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }
.form-row .narrow { flex: 0 0 110px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.field-foot { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.counter { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.counter.over { color: var(--danger); font-weight: 700; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
details summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
details[open] summary { margin-bottom: 10px; }
.inline-form { display: flex; gap: 10px; align-items: center; margin: 0; }
.inline-form select { width: auto; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; }
.switch-row small { font-size: .82rem; }
.switch { appearance: none; -webkit-appearance: none; width: 46px !important; height: 26px; min-height: 26px; border-radius: 99px; background: var(--border-strong); position: relative; cursor: pointer; border: 0; padding: 0; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: inset-inline-start .2s; }
.switch:checked { background: var(--success); }
.switch:checked::after { inset-inline-start: 23px; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.seg { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, background .15s; }
.seg small { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.seg input:focus-visible + span { outline: 3px solid var(--primary-soft); }

/* chips input */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 8px; min-height: 48px; background: var(--surface); cursor: text; }
.chips:focus-within { border-color: var(--primary); outline: 3px solid var(--primary-soft); }
.chips.enhanced .chips-source { display: none; }
.chips .chips-input { flex: 1; min-width: 140px; border: 0; padding: 4px; min-height: 32px; outline: none; background: transparent; }
.chips .chips-input:focus-visible { outline: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 2px 6px 2px 12px; font-weight: 600; font-size: .9rem; max-width: 100%; animation: pop .15s ease; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { border: 0; background: transparent; color: inherit; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.chip button:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }
.chip button .i { width: 14px; height: 14px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.token-btn { border: 1px dashed var(--border-strong); background: var(--surface-2); color: var(--primary); border-radius: 6px; padding: 0 6px; font: inherit; font-family: var(--mono); font-size: .85em; cursor: pointer; }

/* copy field */
.copy-field { margin: 8px 0 12px; }
.copy-field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { background: var(--surface-2); font-size: .85rem; }
.copy-row .btn.copied { color: var(--success); border-color: var(--success); }

/* ------------------------------------------------------------- toolbar, tabs, search */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar form { margin: 0; }
.filters select { width: auto; }
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 5px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tab span { font-size: .75rem; background: var(--surface-2); border-radius: 99px; padding: 0 7px; }
.tab.active { background: var(--primary-soft); color: var(--primary); }
.search { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px; min-width: 220px; flex: 1; max-width: 360px; }
.search .i { color: var(--faint); }
.search input { border: 0; padding-inline: 0; background: transparent; min-height: 40px; }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--primary); }

/* ------------------------------------------------------------- posts grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.post-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.post-thumb { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.post-thumb img.broken { display: none; }
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb-fallback .i { width: 36px; height: 36px; }
.kind-badge, .active-badge { position: absolute; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; backdrop-filter: blur(6px); }
.kind-badge { inset-inline-start: 10px; background: rgba(0, 0, 0, .55); color: #fff; }
.active-badge { inset-inline-end: 10px; background: var(--success); color: #fff; }
.active-badge.off { background: rgba(0, 0, 0, .55); }
.kind-badge .i, .active-badge .i { width: 13px; height: 13px; }
.post-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.caption { margin: 0; font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-chips span { background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 0 8px; font-size: .75rem; font-weight: 600; }
.post-foot { display: flex; gap: 12px; align-items: center; margin-top: auto; }
.post-foot span { display: inline-flex; align-items: center; gap: 4px; }
.post-foot .i { width: 14px; height: 14px; }
@media (max-width: 600px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .post-meta { padding: 8px 10px 10px; }
  .post-foot { gap: 8px; flex-wrap: wrap; }
  .search { max-width: none; }
}

/* ------------------------------------------------------------- post editor */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.back-link .i { transform: scaleX(-1); }
.editor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.editor > .card { margin-bottom: 18px; }
.editor-media { position: sticky; top: 16px; }
.post-thumb.large { border-radius: var(--radius-sm); margin-bottom: 12px; }
.caption-full { font-size: .88rem; max-height: 220px; overflow: auto; white-space: normal; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mini-stats div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; text-align: center; display: flex; flex-direction: column; }
.mini-stats strong { font-size: 1.2rem; }
.mini-stats span { font-size: .75rem; color: var(--muted); }
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor-media { position: static; }
  .post-thumb.large { max-width: 280px; }
}

/* ------------------------------------------------------------- tables & feeds */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; color: var(--muted); font-weight: 600; font-size: .8rem; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table form { margin: 4px 0 0; }
.err-text { min-width: 220px; max-width: 300px; line-height: 1.7; margin-top: 4px; }
.thumb-xs { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; display: block; }
.thumb-empty { background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed-body { flex: 1; min-width: 0; overflow: hidden; }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; padding-top: 14px; }

.account-mini { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.account-mini img, .avatar-empty { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-empty { background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.account-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.account-head img, .account-head .avatar-empty { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.account-head h2 { margin: 0; }
.account-head > div { flex: 1; min-width: 0; }
@media (max-width: 420px) { .account-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- logs */
.log-list { list-style: none; margin: 0; padding: 0; }
.log { padding: 12px 14px; border-radius: var(--radius-sm); border-inline-start: 3px solid var(--border-strong); margin-bottom: 8px; background: var(--surface-2); }
.log.unread { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.log-critical, .log-error { border-inline-start-color: var(--danger); }
.log-warning { border-inline-start-color: var(--warning); }
.log-info { border-inline-start-color: var(--info); }
.log-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.log-source { font-weight: 700; font-size: .85rem; }
.log-msg { margin: 0; }
.log pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; overflow: auto; font-size: .8rem; max-height: 300px; white-space: pre-wrap; word-break: break-word; }

/* ------------------------------------------------------------- setup steps */
.checklist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); flex-wrap: wrap; }
.checklist .muted { font-size: .82rem; flex-basis: 100%; padding-inline-start: 32px; margin-top: -6px; }
.check-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .8rem; }
.check-icon .i { width: 14px; height: 14px; }
.checklist .ok .check-icon { background: var(--success-soft); color: var(--success); }
.checklist .no .check-icon { background: var(--danger-soft); color: var(--danger); }
.checklist .warn .check-icon { background: var(--warning-soft); color: var(--warning); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-inline-start: 66px; }
.step::before { content: counter(step, persian); position: absolute; inset-inline-start: 20px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step ul, .step ol.sub, ol.sub { padding-inline-start: 20px; margin: 0 0 8px; }
ol.sub { list-style-type: persian; }
.step li { margin-bottom: 8px; }
.step h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .step { padding-inline-start: 20px; padding-top: 58px; }
  .step::before { top: 16px; }
}

/* ------------------------------------------------------------- login / install / docs */
body.bare { display: flex; justify-content: center; padding: 40px 16px; }
.bare-wrap { width: 100%; max-width: 420px; }
.bare-wrap.wide { max-width: 680px; }
.bare-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin-bottom: 20px; flex-wrap: wrap; }
.login-card h1 { font-size: 1.2rem; }
.doc { max-width: 760px; width: 100%; }
.doc h1 { font-size: 1.5rem; }
.doc h2 { margin-top: 1.2em; }
.doc ul { padding-left: 20px; }
@media (max-width: 600px) { .form-row { flex-direction: column; gap: 0; } .form-row .narrow { flex-basis: auto; } }
