/* =====================================================================
   MaestroCosts — design system
   Brand colours sampled from the MaestroServ logo gradient
   (#049AE9 → #0276C7 → #01459A). RTL/LTR via logical properties.
   ===================================================================== */
:root {
  --brand-50: #EAF5FE;
  --brand-100: #CFE8FC;
  --brand-200: #A2D3F8;
  --brand-300: #5DB5F1;
  --brand-400: #1E9BE9;
  --brand-500: #0A7BD8;
  --brand-600: #0866BB;
  --brand-700: #08519A;
  --brand-800: #073F7C;
  --brand-900: #062F5E;
  --grad: linear-gradient(135deg, #049AE9 0%, #0276C7 48%, #01459A 100%);
  --grad-side: linear-gradient(180deg, #06306F 0%, #073F86 55%, #0A56AE 100%);

  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --ink: #0E1A2B;
  --ink-2: #33445C;
  --muted: #64748B;
  --line: #E2E8F1;
  --line-2: #EDF1F7;
  --focus: 0 0 0 3px rgba(10, 123, 216, .25);

  --green: #16A34A; --green-bg: #E8F7EE;
  --amber: #C26A05; --amber-bg: #FFF4E0;
  --red: #DC2626; --red-bg: #FDECEC;
  --sky: #0284C7; --sky-bg: #E3F4FD;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 43, .05);
  --shadow: 0 1px 2px rgba(14, 26, 43, .04), 0 6px 24px -8px rgba(14, 26, 43, .10);
  --shadow-lg: 0 24px 60px -20px rgba(6, 47, 94, .35);
  --side-w: 264px;
  --font: "IBM Plex Sans Arabic", "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0A111E;
  --surface: #101A2C;
  --surface-2: #0D1626;
  --ink: #E7EEF8;
  --ink-2: #C3CFDF;
  --muted: #8DA0BA;
  --line: #1E2A40;
  --line-2: #182337;
  --green-bg: rgba(22, 163, 74, .14);
  --amber-bg: rgba(217, 119, 6, .16);
  --red-bg: rgba(220, 38, 38, .15);
  --sky-bg: rgba(14, 165, 233, .14);
  --brand-50: rgba(10, 123, 216, .14);
  --brand-100: rgba(10, 123, 216, .22);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
html[lang="en"] body { font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif; font-size: 14px; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; margin: 0; }
.txt-red { color: var(--red) !important; }
.txt-amber { color: var(--amber) !important; }
.txt-green { color: var(--green) !important; }
.ic { flex-shrink: 0; vertical-align: middle; }
.skip { position: fixed; inset-inline-start: 8px; top: -60px; background: var(--brand-500); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

/* ---------- App shell ---------- */
.app-body { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side-w);
  background: var(--grad-side); color: #fff; display: flex; flex-direction: column;
  z-index: 40; overflow: hidden;
}
.sidebar::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .06); inset-inline-end: -220px; bottom: -160px; pointer-events: none;
}
.sidebar::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .05); inset-inline-end: -150px; bottom: -100px; pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .25); }
.brand strong { display: block; font-size: 17px; letter-spacing: .01em; font-family: "Inter", var(--font); }
.brand span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .65); margin-top: 1px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; position: relative; z-index: 1; }
.nav-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .45); padding: 16px 12px 6px; }
html[lang="ar"] .nav-group { letter-spacing: 0; font-size: 11.5px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0;
  border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 500; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav-item.active::before { content: ""; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #5DD0FF; }
html[dir="rtl"] .nav-item.active::before { border-radius: 4px 0 0 4px; }
.side-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; }
.org-chip { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.org-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver { font-size: 11px; color: rgba(255, 255, 255, .4); margin-top: 10px; text-align: center; }
.scrim { display: none; }

.main-wrap { flex: 1; margin-inline-start: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand-500); }
.crumbs span:last-child { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .sep { opacity: .5; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 26px 28px 48px; max-width: 1440px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all .15s; padding: 0;
}
.icon-btn:hover { border-color: var(--brand-300); color: var(--brand-500); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.warn:hover { color: var(--amber); border-color: var(--amber); }
.icon-btn.ok:hover { color: var(--green); border-color: var(--green); }
.pill-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 13px; }
.pill-btn:hover { border-color: var(--brand-300); color: var(--brand-500); }
.only-mobile { display: none; }
[data-theme-toggle] span { display: inline-grid; place-items: center; }
[data-theme-toggle] .th-light { display: none; }
html[data-theme="dark"] [data-theme-toggle] .th-light { display: inline-grid; }
html[data-theme="dark"] [data-theme-toggle] .th-dark { display: none; }

/* user dropdown */
.dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 6px; padding-inline-end: 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); font: inherit; }
.user-btn:hover { border-color: var(--brand-300); }
.user-meta { display: flex; flex-direction: column; text-align: start; line-height: 1.2; }
.user-meta b { font-size: 13px; font-weight: 600; }
.user-meta small { font-size: 11.5px; color: var(--muted); }
.menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50;
}
.menu.menu-end { inset-inline-end: 0; }
.dropdown.open .menu { display: block; animation: pop .14s ease-out; }
.menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; flex-direction: column; }
.menu-head small { color: var(--muted); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); }
.menu button.danger { color: var(--red); }
.menu form { margin: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(8, 102, 187, .6); }
.btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 8px 22px -6px rgba(8, 102, 187, .7); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand-300); color: var(--brand-600); }
.btn-ghost.danger { color: var(--red); }
.btn-ghost.danger:hover { border-color: var(--red); background: var(--red-bg); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(1.07); }
.btn-warn { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.btn-warn:hover { background: var(--amber); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.07); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }
form.inline { display: inline; margin: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .count { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.card-body { padding: 18px 20px; }
.link { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sec-title { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--ink); }
.sec-title .ic { color: var(--brand-500); }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.mini-title { font-size: 13px; color: var(--muted); margin: 0 0 10px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 20px; }
.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)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-side { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.span2 { grid-column: span 2; }
.card .grid { gap: 16px; }
.grid > *, .form-layout > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.narrow { max-width: 520px; }
.narrow-lg { max-width: 880px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat > div:last-child { flex: 1; min-width: 0; }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.stat-l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-family: "Inter", var(--font); font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-s { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-s .prog { margin: 4px 0; }
.c-blue { background: var(--brand-50); color: var(--brand-500); }
.c-sky { background: var(--sky-bg); color: var(--sky); }
.c-navy { background: rgba(10, 61, 145, .1); color: #0A3D91; }
html[data-theme="dark"] .c-navy { color: #7AB4FF; background: rgba(122, 180, 255, .12); }
.c-teal { background: rgba(13, 148, 136, .1); color: #0D9488; }
.c-green { background: var(--green-bg); color: var(--green); }
.c-amber { background: var(--amber-bg); color: var(--amber); }
.c-red { background: var(--red-bg); color: var(--red); }
.c-violet { background: rgba(124, 58, 237, .1); color: #7C3AED; }
.c-slate { background: var(--surface-2); color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-blue { background: var(--brand-50); color: var(--brand-600); }
.badge-sky { background: var(--sky-bg); color: var(--sky); }
.badge-indigo { background: rgba(79, 70, 229, .1); color: #4F46E5; }
.badge-violet { background: rgba(124, 58, 237, .1); color: #7C3AED; }
.badge-teal { background: rgba(13, 148, 136, .1); color: #0D9488; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-orange { background: rgba(234, 88, 12, .1); color: #EA580C; }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-slate { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-navy { background: rgba(10, 61, 145, .1); color: #0A3D91; }
html[data-theme="dark"] .badge-navy { color: #8FC0FF; background: rgba(122, 180, 255, .12); }
html[data-theme="dark"] .badge-blue { color: #6CC0FF; }
html[data-theme="dark"] .badge-violet { color: #B794FF; }
html[data-theme="dark"] .badge-teal { color: #4FD1C5; }
html[data-theme="dark"] .badge-indigo { color: #A5A0FF; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.you { font-style: normal; font-size: 11px; background: var(--brand-50); color: var(--brand-600); padding: 1px 7px; border-radius: 999px; margin-inline-start: 4px; font-weight: 600; }
.lock-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--amber); background: var(--amber-bg); padding: 2px 8px; border-radius: 999px; font-weight: 600; }

/* ---------- Avatars ---------- */
.avatar { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; letter-spacing: 0; }
.avatar.xl { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.user-btn .avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.av0 { background: linear-gradient(135deg, #049AE9, #01459A); }
.av1 { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.av2 { background: linear-gradient(135deg, #8B5CF6, #5B21B6); }
.av3 { background: linear-gradient(135deg, #F59E0B, #B45309); }
.av4 { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.av5 { background: linear-gradient(135deg, #EC4899, #9D174D); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap.scroll-y { max-height: 520px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand-50) 45%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 600; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .mono { font-family: "Inter", var(--font); font-variant-numeric: tabular-nums; font-size: inherit; }
.table td.mono[dir="ltr"] { white-space: nowrap; }
.table-compact td { padding: 9px 14px; }
.actions-col { width: 1%; white-space: nowrap; text-align: end; }
.row-actions { display: inline-flex; gap: 6px; }
.cell-main { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 220px; }
.cell-main span { display: flex; flex-direction: column; min-width: 0; }
.cell-main b { font-weight: 600; }
.cell-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cell-main:hover b { color: var(--brand-500); }
.sub-txt { font-size: 12px; color: var(--muted); margin-top: 2px; display: block; }
.proj-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-500); display: grid; place-items: center; flex-shrink: 0; }
.w-prog { min-width: 140px; }
.row-off td { opacity: .55; }
.cell-input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; color: var(--ink); }
.cell-input:hover { border-color: var(--line); }
.cell-input:focus { border-color: var(--brand-400); background: var(--surface); box-shadow: var(--focus); outline: 0; }
.cell-input.xs { width: 70px; text-align: center; }

/* ---------- Filters / tabs / pager ---------- */
.filters { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; align-items: center; }
.filters.bare { border: 0; padding: 0; }
.filters .grow { flex: 1; min-width: 220px; }
.filters select, .filters input[type="date"] { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 12px; font: inherit; color: var(--ink); min-width: 140px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a span { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 0 7px; border-radius: 999px; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand-600); border-bottom-color: var(--brand-500); }
.tabs a.active span { background: var(--brand-50); color: var(--brand-600); border-color: transparent; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 13px; }
.pgs { display: flex; gap: 4px; }
.pg { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); padding: 0 8px; background: var(--surface); }
.pg.active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.pg.disabled { opacity: .4; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-size: 12px; color: var(--muted); }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 10px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand-400); box-shadow: var(--focus); }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--red); }
.err { color: var(--red); font-size: 12px; font-style: normal; }
.input-ic { position: relative; display: flex; align-items: center; }
.input-ic > .ic { position: absolute; inset-inline-start: 13px; color: var(--muted); pointer-events: none; }
.input-ic input { padding-inline-start: 40px !important; width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: var(--ink); }
.input-ic input:focus { outline: 0; border-color: var(--brand-400); box-shadow: var(--focus); }
.pw-toggle { position: absolute; inset-inline-end: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; }
.pw-toggle:hover { color: var(--brand-500); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 17px; height: 17px; accent-color: var(--brand-500); }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 0; background: var(--surface-2); border: 1px dashed var(--line); padding: 10px 12px; border-radius: 10px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.form-side .sticky { position: sticky; top: 84px; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.form-actions.col { flex-direction: column; margin-top: 20px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; width: 100%; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { box-shadow: var(--focus); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw input { position: absolute; opacity: 0; }
.sw i { display: block; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.sw input:checked + i { border-color: var(--ink); transform: scale(1.08); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch i::before { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; inset-inline-start: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::before { transform: translateX(16px); }
html[dir="rtl"] .switch input:checked + i::before { transform: translateX(-16px); }
.switch input:disabled + i { opacity: .55; cursor: not-allowed; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 4px; background: var(--line); transition: background .2s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--amber); }
.strength[data-score="3"] i:nth-child(-n+3) { background: #65A30D; }
.strength[data-score="4"] i { background: var(--green); }
input[type="range"] { accent-color: var(--brand-500); width: 100%; }
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-cards.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card > span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: all .15s; }
.radio-card small { color: var(--muted); font-size: 12px; }
.radio-card input:checked + span { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.radio-card input:disabled + span { opacity: .5; cursor: not-allowed; }
.radio-card input:focus-visible + span { box-shadow: var(--focus); }
.role-help p { margin: 0; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.side-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.side-meta div { display: flex; justify-content: space-between; gap: 10px; }
.side-meta span { color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid; }
.alert > span { flex: 1; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.alert-error { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.alert-info { background: var(--brand-50); color: var(--brand-700); border-color: color-mix(in srgb, var(--brand-500) 22%, transparent); }
html[data-theme="dark"] .alert-info { color: #8FCBFF; }
.alert-x { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 0; display: grid; }
.alert-x:hover { opacity: 1; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--grad); color: #fff; padding: 12px 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.banner > div { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.watermark-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--amber); background: repeating-linear-gradient(-45deg, var(--amber-bg), var(--amber-bg) 12px, transparent 12px, transparent 24px); border: 1px dashed color-mix(in srgb, var(--amber) 40%, transparent); padding: 8px 12px; border-radius: 10px; }

/* ---------- Lists ---------- */
.rows { list-style: none; margin: 0; padding: 6px 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; }
.rows li + li { border-top: 1px solid var(--line-2); }
.row-main { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.row-main span { display: flex; flex-direction: column; min-width: 0; }
.row-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); font-size: 12px; }
.row-main:hover b { color: var(--brand-500); }
.timeline { list-style: none; margin: 0; padding: 8px 20px 14px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; position: relative; font-size: 13.5px; }
.timeline li > div { flex: 1; }
.timeline li + li { border-top: 1px dashed var(--line-2); }
.timeline time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; box-shadow: 0 0 0 4px var(--surface-2); }
.act-green { background: var(--green); }
.act-red { background: var(--red); }
.act-blue { background: var(--brand-500); }
.act-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.act-pill.act-green { background: var(--green-bg); color: var(--green); }
.act-pill.act-red { background: var(--red-bg); color: var(--red); }
.act-pill.act-blue { background: var(--brand-50); color: var(--brand-600); }
.det summary { font-size: 11.5px; color: var(--muted); cursor: pointer; margin-top: 4px; }
.det pre { font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); padding: 8px; border-radius: 8px; max-width: 420px; overflow: auto; text-align: left; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px 18px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list .ic { color: var(--green); margin-top: 2px; }

/* ---------- Progress ---------- */
.prog { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.prog span { display: block; height: 100%; border-radius: inherit; transition: width .5s; }

/* ---------- Charts ---------- */
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut svg { width: 170px; height: 170px; flex-shrink: 0; }
.donut circle { transition: opacity .2s; }
.donut circle:hover { opacity: .8; }
.donut-v { font-size: 20px; font-weight: 700; fill: var(--ink); font-family: Inter, var(--font); }
.donut-l { font-size: 10px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 170px; flex: 1; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { font-variant-numeric: tabular-nums; font-weight: 600; }
.legend em { font-style: normal; color: var(--muted); font-size: 12px; min-width: 34px; text-align: end; }
.bars svg { width: 100%; height: auto; display: block; overflow: visible; }
.bars .grid { stroke: var(--line-2); stroke-width: 1; }
.bars .axis { font-size: 11px; fill: var(--muted); font-family: Inter, var(--font); }
.bars rect { transition: opacity .15s; }
.bars rect:hover { opacity: .8; }
.bars-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.bars-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bars-legend i { width: 10px; height: 10px; border-radius: 3px; }
html[dir="rtl"] .bars svg { direction: ltr; }

/* ---------- Empty / error ---------- */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-50); color: var(--brand-500); display: grid; place-items: center; margin-bottom: 6px; }
.empty h4 { font-size: 15px; }
.empty p { margin: 0 0 8px; color: var(--muted); max-width: 380px; }
.error-page { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error-code { font-size: 84px; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: Inter, var(--font); }
.error-page p { color: var(--muted); margin: 0 0 12px; }
.err-debug { text-align: left; direction: ltr; background: var(--surface-2); border: 1px solid var(--line); padding: 12px; border-radius: 10px; font-size: 12px; max-width: 100%; overflow: auto; }

/* ---------- Profile header ---------- */
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; flex-wrap: wrap; position: relative; overflow: hidden; }
.profile-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.ph-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ph-main h1 { font-size: 22px; }
.ph-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.profile-card .avatar { margin-bottom: 4px; }
.profile-card h3 { font-size: 18px; }
.profile-card p { margin: 0; }
.profile-card .kv { text-align: start; width: 100%; margin: 12px 0; padding-top: 14px; border-top: 1px solid var(--line-2); }

/* ---------- Reveal credentials ---------- */
.reveal { display: flex; gap: 16px; padding: 20px; border-color: color-mix(in srgb, var(--green) 35%, transparent); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--green-bg); box-shadow: 0 0 0 4px var(--green-bg); }
.reveal-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--green-bg); color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.reveal-body { flex: 1; min-width: 0; }
.reveal-body h3 { font-size: 16px; }
.reveal-body > p { margin: 4px 0 12px; color: var(--muted); }
.reveal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reveal-grid > div { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.reveal-grid small { color: var(--muted); font-size: 12px; }
.reveal-grid code { background: none; border: 0; padding: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.reveal-grid .btn { align-self: flex-start; }

/* ---------- Plans ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.plan { padding: 22px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.plan::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--plan); }
.plan.is-off { opacity: .6; }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-code { font-size: 11px; font-weight: 700; color: var(--plan); letter-spacing: .08em; font-family: var(--mono); }
.plan h3 { font-size: 18px; margin-top: 2px; }
.plan-desc { margin: 0; font-size: 13px; min-height: 40px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.plan-price b { font-size: 32px; letter-spacing: -.03em; font-family: Inter, var(--font); }
.plan-price span { color: var(--muted); }
.plan-limits { list-style: none; padding: 14px 0 0; margin: 10px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.plan-limits li { display: flex; gap: 10px; align-items: center; }
.plan-limits .ic { color: var(--plan); }
.plan-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; font-size: 12.5px; }

/* ---------- Option definitions ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.opt-card { padding: 18px; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.opt-card:hover { border-color: var(--brand-300); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.opt-card-top { display: flex; justify-content: space-between; align-items: center; }
.opt-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-500); display: grid; place-items: center; }
.opt-card h4 { font-size: 15px; margin-top: 6px; }
.opt-card code { align-self: flex-start; font-size: 11.5px; }
.opt-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.opt-table td { padding: 6px 10px; }
.opt-table .cell-input:not(.xs):not(.color-select) { min-width: 140px; }
.color-select { min-width: 96px; }
.chips.wrap { gap: 8px; }

/* ---------- Engagements ---------- */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.principles > div { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; font-weight: 500; }
.principles .ic { color: var(--brand-500); }
.eng-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.eng-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.eng-card.is-off { opacity: .65; }
.eng-top { display: flex; align-items: center; gap: 12px; }
.eng-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eng-top small { color: var(--muted); font-size: 12px; }
.eng-card h4 { font-size: 16px; margin-top: 4px; }
.eng-kv { margin: 4px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.eng-kv div { display: flex; justify-content: space-between; gap: 10px; }
.eng-kv dt { color: var(--muted); }
.eng-kv dd { margin: 0; font-weight: 500; }
.seat-bar { display: flex; flex-direction: column; gap: 10px; }
.seat-bar > div:first-child { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.role-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.role-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgba(6, 20, 40, .5); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .16s ease-out; }
.confirm form, .modal form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.confirm form { width: 400px; max-width: 100%; padding: 24px; text-align: center; }
.confirm-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--amber-bg); color: var(--amber); display: grid; place-items: center; margin: 0 auto 12px; }
.confirm p { margin: 0 0 20px; font-size: 15px; font-weight: 500; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.modal form { width: 560px; max-width: 100%; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 16px 16px; }

/* ---------- Auth ---------- */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand { position: relative; background: var(--grad); color: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-brand::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .18), transparent 45%), radial-gradient(circle at 85% 90%, rgba(1, 40, 100, .45), transparent 50%); }
.orbit { position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); }
.orbit::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .55); background: transparent; }
.o1 { width: 620px; height: 620px; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: spin 60s linear infinite; }
.o1::after { top: 40px; right: 120px; }
.o2 { width: 900px; height: 900px; top: 50%; left: 50%; transform: translate(-50%, -50%); border-color: rgba(255, 255, 255, .08); animation: spin 90s linear infinite reverse; }
.o2::after { bottom: 110px; left: 140px; }
.o3 { width: 360px; height: 360px; top: 50%; left: 50%; transform: translate(-50%, -50%); border-color: rgba(255, 255, 255, .1); }
.o3::after { display: none; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit { animation: none !important; } }
.auth-brand-inner { position: relative; z-index: 2; max-width: 440px; }
.auth-logo { border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 20px 50px rgba(0, 0, 0, .3); margin-bottom: 22px; }
.auth-brand h1 { font-size: 40px; font-family: Inter, var(--font); letter-spacing: -.02em; }
.auth-brand .lead { font-size: 17px; opacity: .92; margin: 10px 0 28px; line-height: 1.7; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); padding: 12px 16px; border-radius: 14px; backdrop-filter: blur(6px); font-size: 14px; }
.auth-foot { margin-top: 36px; font-size: 12.5px; opacity: .6; }
.auth-panel { display: flex; flex-direction: column; padding: 24px 32px; }
.auth-top { display: flex; justify-content: flex-end; gap: 8px; }
.auth-card { width: 100%; max-width: 420px; margin: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px 0; }
.auth-title { font-size: 28px; }
.auth-sub { margin: -8px 0 8px; color: var(--muted); }
.auth-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); justify-content: center; margin: 8px 0 0; }
.auth-note .ic { color: var(--green); }
.auth-help { text-align: center; font-size: 12.5px; color: var(--muted); margin: 0; }
.auth-mobile-brand { display: none; }
.auth-card .error-page { padding: 20px 0; }

/* installer */
.install-wrap { max-width: 860px; margin: 0 auto; padding: 40px 20px 60px; display: flex; flex-direction: column; gap: 18px; }
.install-head { display: flex; align-items: center; gap: 14px; }
.install-head img { border-radius: 50%; }
.install-head h1 { font-size: 26px; font-family: Inter, var(--font); }
.install-head p { margin: 2px 0 0; color: var(--muted); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.req { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.req.ok { background: var(--green-bg); color: var(--green); }
.req.bad { background: var(--red-bg); color: var(--red); }
.install-wrap .sec-title { margin-top: 8px; }
.install-wrap form .grid { margin-bottom: 18px; }
.steps-list { margin: 16px 0 20px; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats.s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-layout { grid-template-columns: 1fr; }
  .form-side .sticky { position: static; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(6, 20, 40, .45); z-index: 35; }
  .main-wrap { margin-inline-start: 0; }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 40px; }
  .g-2-1, .g-1-2, .g-side, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .stats.s3 { grid-template-columns: 1fr; }
  .user-meta, .pill-btn span { display: none; }
  .pill-btn { width: 38px; padding: 0; justify-content: center; }
  .reveal-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-family: Inter, var(--font); }
  .auth-mobile-brand img { border-radius: 50%; }
  .radio-cards.cols2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats, .stats.s4 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .principles { grid-template-columns: 1fr; }
  .crumbs { display: none; }
  .top-actions { margin-inline-start: auto; }
}
@media print {
  .sidebar, .topbar, .btn, .row-actions, .filters { display: none !important; }
  .main-wrap { margin: 0; }
  .card { box-shadow: none; }
}
