/* Alborz Karan Pooya — admin panel */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #0d1526;
  --ink-2: #344055;
  --muted: #677287;
  --line: #e3e7ee;
  --line-strong: #cfd5df;

  --primary: #1f4fd1;
  --primary-hover: #1a43b3;
  --primary-soft: #eaf0ff;
  --accent: #0ea5a4;

  --success: #13795b;
  --success-soft: #e6f6f0;
  --danger: #c23a32;
  --danger-soft: #fdecea;
  --warn: #a16207;
  --warn-soft: #fdf5e1;

  --side-bg: #0b1324;
  --side-ink: #c7cfdd;
  --side-muted: #7d889c;
  --side-active: #18233b;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .05);
  --shadow: 0 1px 2px rgba(13, 21, 38, .04), 0 6px 20px -8px rgba(13, 21, 38, .12);
  --shadow-lg: 0 24px 60px -20px rgba(13, 21, 38, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sidebar-w: 256px;
  --font: "Vazirmatn", "IRANSans", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.4; font-weight: 700; color: var(--ink); }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.num { font-feature-settings: "tnum"; }
.ltr { direction: ltr; unicode-bidi: plaintext; text-align: right; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0;
  width: var(--sidebar-w);
  background: var(--side-bg);
  color: var(--side-ink);
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .28s var(--ease);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2c5ff0, #0ea5a4);
  color: #fff; font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 700; color: #fff; font-size: 14.5px; line-height: 1.3; }
.brand-sub { font-size: 11.5px; color: var(--side-muted); }

.nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav-label { font-size: 11px; color: var(--side-muted); padding: 14px 10px 6px; letter-spacing: .02em; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin-block: 2px;
  border-radius: 8px;
  color: var(--side-ink);
  transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before {
  content: ""; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: #4d7cff;
}
.nav a .icon { opacity: .85; }
.nav-badge {
  margin-inline-start: auto; font-size: 11px; padding: 0 7px; border-radius: 99px;
  background: rgba(255, 255, 255, .08); color: var(--side-ink);
}

.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: #1c2944; color: #fff; font-weight: 700; font-size: 13px;
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.side-foot .who a { color: var(--side-muted); font-size: 12px; }
.side-foot .who a:hover { color: #fff; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  transition: background .18s ease;
}
.side-foot .icon-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 32px;
  background: rgba(244, 246, 249, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.crumbs b { color: var(--ink); font-weight: 600; }
.topbar-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.topbar .menu-toggle { display: none; }
.flip { transform: scaleX(-1); }

.content { padding: 8px 32px 48px; max-width: 1240px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .45s var(--ease) both; }
.reveal-1 { animation-delay: .04s; } .reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .12s; } .reveal-4 { animation-delay: .16s; }
.reveal-5 { animation-delay: .2s; }  .reveal-6 { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-ink: var(--ink-2); --b-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font: inherit; font-weight: 600; font-size: 13.5px;
  color: var(--b-ink); background: var(--b-bg);
  border: 1px solid var(--b-line); border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.btn:hover { background: var(--surface-2); border-color: #b9c1ce; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .field-input:focus-visible { outline: 3px solid rgba(31, 79, 209, .25); outline-offset: 1px; }
.btn-primary { --b-bg: var(--primary); --b-ink: #fff; --b-line: var(--primary); box-shadow: 0 1px 2px rgba(31, 79, 209, .3); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { --b-bg: var(--danger); --b-ink: #fff; --b-line: var(--danger); }
.btn-danger:hover { background: #a8302a; border-color: #a8302a; }
.btn-ghost { --b-bg: transparent; --b-line: transparent; }
.btn-ghost:hover { background: rgba(13, 21, 38, .05); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn-icon { width: 32px; padding: 0; }
.btn-block { width: 100%; }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-soft); }

/* ---------- Cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 20px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease);
}
a.stat:hover { border-color: #c5cfe3; box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.stat-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--ink); }
.stat-hint { font-size: 12px; color: var(--muted); }
.stat.highlight { background: linear-gradient(140deg, #13204a 0%, #1f4fd1 100%); border-color: transparent; color: #dfe7ff; }
.stat.highlight .stat-top, .stat.highlight .stat-hint { color: #b9c8f5; }
.stat.highlight .stat-value { color: #fff; }
.stat.highlight .stat-icon { background: rgba(255, 255, 255, .12); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }

/* ---------- Tables ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-inline-start: 36px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.segmented a { padding: 4px 12px; border-radius: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background .18s ease, color .18s ease; }
.segmented a:hover { color: var(--ink); }
.segmented a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: start; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-main b { font-weight: 600; color: var(--ink); }
.cell-muted { color: var(--muted); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 52px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.thumb.empty { display: grid; place-items: center; color: var(--line-strong); }
a.row-link { color: inherit; }
a.row-link:hover b { color: var(--primary); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-advice { background: var(--primary-soft); color: var(--primary); border-color: #d5e0ff; }
.badge-contact { background: var(--success-soft); color: var(--success); border-color: #c9ecdf; }

.empty {
  padding: 56px 24px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .empty-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); margin-bottom: 4px; }
.empty b { color: var(--ink); font-size: 15px; }

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; gap: 10px; flex-wrap: wrap; }
.pages { display: flex; gap: 4px; }
.pages a, .pages span { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-2); border: 1px solid transparent; padding: 0 8px; }
.pages a:hover { background: var(--surface-2); border-color: var(--line); }
.pages .on { background: var(--ink); color: #fff; }
.pages .gap { color: var(--muted); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.form-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-weight: 600; font-size: 13px; color: var(--ink-2); display: flex; gap: 4px; }
.field-label .req { color: var(--danger); }
.field-help { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 5px; }
.field-input {
  width: 100%; font: inherit; color: var(--ink);
  height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field-input::placeholder { color: #9aa3b2; }
.field-input:hover { border-color: #b4bccb; }
.field-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 79, 209, .14); }
textarea.field-input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.8; }
textarea.field-input.editor { min-height: 320px; }
select.field-input { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23677287' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; }
.field.has-error .field-input { border-color: var(--danger); }
.counter { font-size: 11.5px; color: var(--muted); align-self: flex-end; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 180px; padding: 20px; text-align: center; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
  cursor: pointer; overflow: hidden;
  transition: border-color .2s ease, background .2s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--primary); }
.dropzone b { color: var(--ink); font-weight: 600; }
.dropzone img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade .3s ease; }
.dropzone.has-image { border-style: solid; }
.dropzone .dz-text { display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .2s ease; }
.dropzone.has-image .dz-text { opacity: 0; }
.dropzone .dz-change {
  position: absolute; inset-inline: 10px; bottom: 10px; z-index: 2;
  padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: rgba(13, 21, 38, .72); color: #fff; display: none;
}
.dropzone.has-image .dz-change { display: block; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

.form-actions { display: flex; gap: 10px; }
.form-actions .btn { flex: 1; }

.meta-list { display: grid; gap: 10px; font-size: 13px; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; color: var(--ink-2); text-align: end; word-break: break-all; }

/* ---------- Detail ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
.detail-grid dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.detail-grid dd { margin: 0; font-weight: 600; }
.message { white-space: pre-wrap; line-height: 2; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.kv { display: flex; flex-wrap: wrap; gap: 8px; }
.kv span { padding: 4px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; }

/* Activity list */
.activity { list-style: none; margin: 0; padding: 0; }
.activity li a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: inherit; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.activity li:last-child a { border-bottom: 0; }
.activity li a:hover { background: var(--surface-2); }
.activity .avatar { background: var(--primary-soft); color: var(--primary); width: 36px; height: 36px; }
.activity .grow { flex: 1; min-width: 0; }
.activity .grow b { display: block; font-weight: 600; }
.activity .grow span { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.quick { display: grid; gap: 8px; padding: 16px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; transition: border-color .18s ease, background .18s ease, transform .18s var(--ease); }
.quick a:hover { border-color: #c5cfe3; background: var(--surface-2); transform: translateX(-2px); }
.quick a .icon:last-child { margin-inline-start: auto; color: var(--muted); }

/* ---------- Flash / toast ---------- */
.toasts { position: fixed; top: 18px; inset-inline-end: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: pop .35s var(--ease) both;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.hide { opacity: 0; transform: translateY(-6px); }
.toast .t-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.toast.success .t-icon { background: var(--success-soft); color: var(--success); }
.toast.error .t-icon { background: var(--danger-soft); color: var(--danger); }
.toast p { flex: 1; padding-top: 2px; }
.toast button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 15, 28, .45); backdrop-filter: blur(2px); z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; animation: fade .2s ease; }
.modal { width: min(420px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 24px; animation: pop .25s var(--ease); }
.modal .m-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); margin-bottom: 14px; }
.modal h3 { font-size: 16px; margin-bottom: 6px; }
.modal p { color: var(--muted); }
.modal .m-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal .m-actions .btn { flex: 1; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-art {
  position: relative; overflow: hidden; color: #dbe4ff;
  background: radial-gradient(1200px 600px at 100% 0%, #1f4fd1 0%, transparent 55%), radial-gradient(900px 500px at 0% 100%, #0e7f8a 0%, transparent 55%), #0a1222;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art .grid-lines {
  position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  animation: drift 30s linear infinite;
}
@keyframes drift { to { background-position: 44px 44px; } }
.auth-art > * { position: relative; }
.auth-art h2 { color: #fff; font-size: 30px; line-height: 1.6; font-weight: 800; max-width: 440px; }
.auth-art p { color: #a9b8e0; max-width: 420px; margin-top: 12px; line-height: 2; }
.auth-art .brand { padding: 0; border: 0; }
.auth-art small { color: #7f8fb8; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(380px, 100%); }
.auth-card h1 { font-size: 24px; }
.auth-card > p { color: var(--muted); margin: 6px 0 28px; }
.auth-card form { display: grid; gap: 18px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .field-input { padding-inline-start: 38px; height: 44px; }
.alert { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; animation: pop .3s var(--ease); }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--success-soft); color: var(--success); }

/* ---------- Error page ---------- */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page .code { font-size: 72px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--muted); margin: 10px 0 22px; }

/* ---------- Responsive ---------- */
.scrim { display: none; }
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-layout, .grid-2 { grid-template-columns: 1fr; }
  .form-side { position: static; }
}
@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(9, 15, 28, .4); z-index: 30; animation: fade .2s ease; }
  .main { margin-inline-start: 0; }
  .topbar .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 4px 16px 40px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 640px) {
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .page-head .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .hide-sm { display: none; }
  .search { max-width: none; }
}
