/* SSM Inquiry — design system.
   Structure: tokens · base · components · application shell · pages · responsive. RTL-first. */

@font-face { font-family: "Vazirmatn"; src: url("/assets/fonts/Vazirmatn-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/assets/fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/assets/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/assets/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --ink: #0f2033;
  --ink-soft: #3b4d63;
  --muted: #64748b;
  --line: #e3e9f0;
  --line-strong: #cfd9e3;
  --surface: #ffffff;
  --canvas: #f5f8fb;
  --brand: #146c8c;
  --brand-dark: #0d4f68;
  --brand-ink: #0a3d52;
  --brand-soft: #e8f4f8;
  --ok: #1f7a58;
  --ok-soft: #e5f5ed;
  --warn: #946200;
  --warn-soft: #fff3d6;
  --bad: #a83232;
  --bad-soft: #fdeceb;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 32, 51, .05), 0 2px 8px rgba(15, 32, 51, .04);
  --shadow: 0 10px 34px rgba(15, 32, 51, .09);
  --font: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  --cat-identity: #146c8c;
  --cat-banking: #2f7d5b;
  --cat-company: #7a4fb0;
  --cat-vehicle: #b4651a;
  --cat-postal: #c0445f;
  --cat-bills: #3d6bc4;
  --cat-utility: #5d6b7c;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 15px; line-height: 1.8; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { padding: 1px 6px; border-radius: 6px; background: #eef3f7; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; unicode-bidi: embed; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.narrow { max-width: 880px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid rgba(20, 108, 140, .35); outline-offset: 2px; border-radius: 6px; }

/* ---------- components ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #1b7ea1, #0c4a63); font-size: 21px; font-weight: 700; box-shadow: 0 6px 18px rgba(20, 108, 140, .28); }
.brand strong, .brand small { display: block; line-height: 1.35; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.brand-light strong { color: #fff; }
.brand-light small { color: rgba(255, 255, 255, .7); }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 8px 22px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 6px 16px rgba(20, 108, 140, .22); }
.button-primary:hover { background: var(--brand-dark); }
.button-light { color: var(--brand-ink); background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.button-ghost { min-height: 40px; color: var(--brand-dark); background: transparent; border-color: var(--line-strong); }
.button-ghost:hover { background: #fff; border-color: var(--brand); }
.button-wide { width: 100%; margin-top: 6px; }
.button-lg { min-height: 52px; padding-inline: 28px; font-size: 15px; }
.sso-mark { display: inline-grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: var(--brand-dark); background: #fff; font-size: 14px; font-weight: 700; }
.button-light .sso-mark { color: #fff; background: var(--brand); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 13px; font-weight: 700; }
.eyebrow.light { color: #9fd6e4; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 5px rgba(43, 182, 115, .16); }

.badge { display: inline-flex; align-items: center; width: max-content; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.green { color: var(--ok); background: var(--ok-soft); }
.badge.gray { color: #4f5f73; background: #edf1f5; }

.alert { margin-bottom: 18px; padding: 11px 15px; border-radius: var(--radius-sm); font-size: 13px; }
.alert-error { color: var(--bad); border: 1px solid #f3c7c4; background: var(--bad-soft); }
.alert-ok { color: var(--ok); border: 1px solid #bfe3d1; background: var(--ok-soft); }

label { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 18px; min-height: 0; accent-color: var(--brand); }
.req { color: var(--bad); }
input, select { width: 100%; min-height: 46px; padding: 8px 14px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #a3afbd; }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20, 108, 140, .1); outline: 0; }
.stack { display: flex; flex-direction: column; gap: 9px; }
.privacy-note { margin-top: 18px; color: var(--muted); text-align: center; font-size: 12px; }
.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 66px; }
.password-toggle { position: absolute; inset: 6px auto 6px 7px; width: 54px; color: var(--brand); border: 0; border-radius: 8px; background: #edf6f9; font-size: 12px; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 14px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel.padded { padding: 26px; overflow: visible; }
.panel.padded + .panel.padded { margin-top: 18px; }
.panel h2 { font-size: 17px; line-height: 1.5; }
.panel.padded > h2 { margin-bottom: 14px; }
.panel.padded > p.muted { margin: -6px 0 16px; font-size: 13px; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-toolbar p { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; }
th { padding: 11px 20px; color: var(--muted); background: #f8fafc; font-size: 12px; font-weight: 700; white-space: nowrap; }
td { padding: 14px 20px; border-top: 1px solid #edf1f5; font-size: 13px; vertical-align: middle; }
td strong { font-weight: 700; }
td small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
tbody tr:hover td { background: #fafcfd; }
.row-action { color: var(--brand); font-weight: 700; white-space: nowrap; }
.link-button { padding: 2px; border: 0; background: transparent; font-size: 13px; }

.kv { display: grid; margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(140px, 230px) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; text-align: start; }
.kv .group { display: block; padding-top: 18px; }
.kv .group dt { color: var(--brand-dark); font-weight: 700; }
.depth-1 { padding-inline-start: 16px; } .depth-2 { padding-inline-start: 32px; } .depth-3 { padding-inline-start: 48px; } .depth-4 { padding-inline-start: 64px; }
.depth-5 { padding-inline-start: 80px; } .depth-6 { padding-inline-start: 96px; } .depth-7 { padding-inline-start: 112px; } .depth-8 { padding-inline-start: 128px; }

.role-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.role-list li { display: grid; gap: 4px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8fafc; }
.role-list span { color: var(--muted); font-size: 13px; }
.split-layout { display: grid; grid-template-columns: 340px 1fr; align-items: start; gap: 20px; }

/* ---------- application shell ---------- */
.app-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); }
.app-header-inner { display: flex; min-height: 70px; align-items: center; gap: 36px; }
.app-nav { display: flex; align-self: stretch; gap: 4px; }
.app-nav a { display: flex; align-items: center; padding: 0 16px; color: var(--muted); border-bottom: 3px solid transparent; font-size: 14px; font-weight: 700; transition: color .15s, border-color .15s; }
.app-nav a:hover { color: var(--ink); }
.app-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.user-menu { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.user-menu > span:not(.avatar) strong, .user-menu > span:not(.avatar) small { display: block; line-height: 1.4; }
.user-menu strong { font-size: 13px; }
.user-menu small { color: var(--muted); font-size: 12px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; border-radius: 11px; background: linear-gradient(145deg, #5b7b91, #3e5a6f); font-size: 13px; font-weight: 700; }
.logout { margin-inline-start: 6px; padding: 6px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; }
.logout:hover { color: var(--bad); border-color: #f0c4c1; background: var(--bad-soft); }
.app-main { padding-block: 36px 72px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--brand); font-size: 13px; font-weight: 700; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head h1 { margin-top: 4px; font-size: 28px; line-height: 1.4; }
.page-head p { margin-top: 6px; max-width: 720px; color: var(--muted); font-size: 14px; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.stat-icon { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 12px; font-size: 18px; font-weight: 700; }
.stat-icon.blue { color: var(--brand); background: var(--brand-soft); }
.stat-icon.green { color: var(--ok); background: var(--ok-soft); }
.stat-icon.red { color: var(--bad); background: var(--bad-soft); }
.stat-icon.amber { color: var(--warn); background: var(--warn-soft); }
.stat small, .stat strong { display: block; }
.stat small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.stat strong { font-size: 24px; line-height: 1.3; }

.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.catalog-head h2 { font-size: 20px; }
.svc-filter { max-width: 340px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 14px; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; transition: .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { color: #fff; border-color: var(--brand); background: var(--brand); }
.chip small { padding-inline: 7px; border-radius: 999px; background: rgba(15, 32, 51, .07); font-size: 11px; }
.chip[aria-pressed="true"] small { background: rgba(255, 255, 255, .22); }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svc-card { --accent: var(--cat-identity); position: relative; display: flex; flex-direction: column; gap: 4px; padding: 13px 20px 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.svc-card::before { content: ""; position: absolute; inset: 14px 0 14px auto; width: 3px; border-radius: 3px; background: var(--accent); }
.svc-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.svc-tag { align-self: flex-start; padding: 1px 10px; color: var(--accent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 11%, #fff); font-size: 12px; font-weight: 700; }
.svc-card strong { font-size: 14px; line-height: 1.6; }
.svc-card p { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.8; }
.svc-card[hidden], .svc-empty[hidden] { display: none; }
.svc-grid[data-mode="popular"] .svc-card:not([data-popular]) { display: none; }
.svc-empty { padding: 34px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.recent { margin-top: 34px; }

/* ---------- auth ---------- */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(380px, .85fr) 1.15fr; background: #fff; }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px clamp(32px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 20% 15%, rgba(80, 176, 196, .3), transparent 34%), linear-gradient(155deg, #12425c, #0a2b3f 70%); }
.auth-message h1 { margin: 14px 0 16px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.45; }
.auth-message p { max-width: 440px; color: #bcd3de; }
.auth-aside-foot { color: #8fb0c1; font-size: 12px; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px; background: var(--canvas); }
.auth-form-card { width: min(430px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.form-title { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.form-title h2 { font-size: 21px; }
.form-title p { color: var(--muted); font-size: 13px; }
.icon-box { display: grid; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: 22px; }
.sso-button { min-height: 54px; font-size: 15px; }

/* ---------- error page ---------- */
.error-page { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: var(--canvas); }
.empty-state { max-width: 560px; padding: 46px 36px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.empty-state h1 { margin: 14px 0 8px; font-size: 24px; }
.empty-state p { margin-bottom: 22px; color: var(--muted); }
.empty-icon { display: grid; width: 52px; height: 52px; margin: auto; place-items: center; border-radius: 50%; color: var(--warn); background: var(--warn-soft); font-size: 24px; font-weight: 700; }

/* ---------- public landing ---------- */
.lp { background: #fff; }
.lp-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); }
.lp-header-inner { display: flex; min-height: 74px; align-items: center; gap: 36px; }
.lp-nav { display: flex; gap: 6px; margin-inline-start: 12px; }
.lp-nav a { padding: 6px 14px; color: var(--muted); border-radius: 9px; font-size: 14px; font-weight: 700; }
.lp-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.lp-header .button { margin-inline-start: auto; }

.lp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(900px 420px at 85% -10%, rgba(20, 108, 140, .13), transparent 60%), radial-gradient(700px 380px at 5% 110%, rgba(43, 182, 115, .09), transparent 60%), #fff; }
.lp-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; padding-block: 76px 84px; }
.lp-hero h1 { margin: 18px 0; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.4; }
.lp-hero h1 span { color: var(--brand); }
.lp-lead { max-width: 560px; color: var(--ink-soft); font-size: 17px; line-height: 2; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 34px 0 0; padding: 0; color: var(--ink-soft); list-style: none; font-size: 13px; }
.lp-trust li { display: flex; align-items: center; gap: 8px; }
.lp-trust li::before { content: "✓"; display: inline-grid; width: 20px; height: 20px; place-items: center; color: #fff; border-radius: 50%; background: var(--ok); font-size: 11px; }

.lp-preview { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 30px 70px rgba(15, 32, 51, .16); }
.lp-preview::before { content: ""; position: absolute; inset: -14px 28px auto; height: 14px; border-radius: 14px 14px 0 0; background: rgba(20, 108, 140, .12); }
.lp-pv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.lp-pv-top strong { font-size: 15px; }
.lp-pv-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.lp-pv-row span { color: var(--muted); }
.lp-pv-row b { font-weight: 700; }
.lp-pv-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; color: var(--ok); border-radius: var(--radius-sm); background: var(--ok-soft); font-size: 12px; font-weight: 700; }

.lp-section { padding-block: 72px; }
.lp-section.alt { background: var(--canvas); border-block: 1px solid var(--line); }
.lp-section-head { max-width: 640px; margin-bottom: 34px; }
.lp-section-head h2 { margin-top: 6px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.5; }
.lp-section-head p { margin-top: 8px; color: var(--muted); }
.lp-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-cat { --accent: var(--cat-identity); display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.lp-cat b { font-size: 16px; }
.lp-cat em { color: var(--accent); font-size: 13px; font-style: normal; font-weight: 700; }
.lp-cat p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.lp-cat-total { justify-content: center; align-items: flex-start; color: #fff; border: 0; background: linear-gradient(150deg, var(--brand), var(--brand-ink)); }
.lp-cat-total b { font-size: 40px; line-height: 1.2; }
.lp-cat-total p { color: rgba(255, 255, 255, .8); }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.lp-steps li { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; counter-increment: step; }
.lp-steps li::before { content: counter(step); display: grid; width: 34px; height: 34px; margin-bottom: 14px; place-items: center; color: #fff; border-radius: 50%; background: var(--brand); font-weight: 700; }
.lp-steps b { display: block; margin-bottom: 4px; font-size: 16px; }
.lp-steps span { color: var(--muted); font-size: 14px; }
.lp-security { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-sec { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lp-sec b { display: block; margin-bottom: 4px; font-size: 15px; }
.lp-sec span { color: var(--muted); font-size: 13px; line-height: 1.9; }
.lp-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 72px; padding: 44px; color: #fff; border-radius: var(--radius-lg); background: radial-gradient(500px 240px at 90% 0, rgba(255, 255, 255, .16), transparent 60%), linear-gradient(150deg, var(--brand), var(--brand-ink)); }
.lp-cta h2 { font-size: 26px; line-height: 1.5; }
.lp-cta p { margin-top: 4px; color: rgba(255, 255, 255, .8); }
.lp-footer { border-top: 1px solid var(--line); background: #fff; }
.lp-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; color: var(--muted); font-size: 13px; }

/* ---------- category accents (must follow component defaults) ---------- */
[data-cat="identity"] { --accent: var(--cat-identity); } [data-cat="banking"] { --accent: var(--cat-banking); }
[data-cat="company"] { --accent: var(--cat-company); } [data-cat="vehicle"] { --accent: var(--cat-vehicle); }
[data-cat="postal"] { --accent: var(--cat-postal); } [data-cat="bills"] { --accent: var(--cat-bills); }
[data-cat="utility"] { --accent: var(--cat-utility); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 44px; padding-block: 48px 56px; }
  .lp-cats, .lp-security { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-nav { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { min-height: 300px; }
  .auth-aside-foot { display: none; }
  .app-nav a { padding: 0 11px; font-size: 13px; }
  .app-header-inner { gap: 18px; }
  .split-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .brand small { display: none; }
  .lp-header-inner { min-height: 64px; gap: 12px; }
  .lp-header .button { min-height: 38px; padding: 4px 14px; font-size: 13px; }
  .lp-section { padding-block: 46px; }
  .lp-cats, .lp-security { grid-template-columns: 1fr; }
  .lp-cta { flex-direction: column; align-items: flex-start; padding: 30px 24px; }
  .lp-footer-inner { flex-direction: column; text-align: center; }
  .lp-preview { padding: 16px; }
  .app-header-inner { flex-wrap: wrap; min-height: 0; padding-block: 10px 0; gap: 8px 12px; }
  .app-nav { order: 3; width: 100%; overflow-x: auto; }
  .app-nav a { padding: 10px 12px; white-space: nowrap; }
  .user-menu > span:not(.avatar) { display: none; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 24px; }
  .stats { gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat strong { font-size: 20px; }
  .catalog-head { flex-direction: column; align-items: stretch; }
  .svc-filter { max-width: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .panel.padded { padding: 20px 16px; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .panel-toolbar { flex-direction: column; align-items: stretch; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  tr:first-child { border-top: 0; }
  td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 5px 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  td:not([data-label])::before { content: none; }
  .auth-aside { min-height: 220px; padding: 28px 22px; }
  .auth-message p { display: none; }
  .auth-form-wrap { padding: 22px 12px; }
  .auth-form-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
