
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn%5Bwght%5D.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f1ee;
  --panel: #ffffff;
  --ink: #171313;
  --text: #433837;
  --muted: #7d6d6b;
  --line: #eadbd4;
  --accent: #8f4b55;
  --accent-2: #b88a62;
  --soft: #fff4f0;
  --sidebar: #ffffff;
  --sidebar-2: #fffaf8;
  --danger: #b42318;
  --shadow: 0 14px 38px rgba(54, 40, 35, .09);
}
body[data-theme="emerald"] {
  --bg:#eef7f2; --panel:#ffffff; --ink:#10231c; --text:#2d4038; --muted:#64766d; --line:#cfe5d8; --accent:#047857; --accent-2:#0f9f7a; --soft:#e8f7ef; --sidebar:#ffffff; --sidebar-2:#f5fff9; --shadow:0 14px 38px rgba(4,120,87,.10);
}
body[data-theme="graphite"] {
  --bg:#f3f5f7; --panel:#ffffff; --ink:#111827; --text:#334155; --muted:#64748b; --line:#d9e1ea; --accent:#334155; --accent-2:#0f766e; --soft:#eef2f7; --sidebar:#ffffff; --sidebar-2:#f8fafc; --shadow:0 14px 38px rgba(15,23,42,.10);
}
body[data-theme="lavender"] {
  --bg:#f7f2fb; --panel:#ffffff; --ink:#251432; --text:#463451; --muted:#756680; --line:#e4d5ed; --accent:#7c3aed; --accent-2:#db2777; --soft:#f2eafa; --sidebar:#ffffff; --sidebar-2:#fdf8ff; --shadow:0 14px 38px rgba(124,58,237,.10);
}
.theme-options { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; }
.theme-option { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fff; display:grid; gap:8px; cursor:pointer; }
.theme-option input { width:18px; height:18px; }
.theme-swatch { height:42px; border-radius:8px; background:linear-gradient(90deg,var(--swatch),color-mix(in srgb,var(--swatch) 62%,#ffffff)); border:1px solid var(--line); }
.bot-preview { display:grid; gap:10px; border:1px solid var(--line); border-radius:8px; padding:14px; background:#fffdfb; }
.bot-avatar { width:88px; height:88px; border-radius:50%; object-fit:cover; border:1px solid var(--line); background:var(--soft); }
.settings-note { border:1px solid var(--line); border-radius:8px; padding:12px; background:var(--soft); color:var(--text); line-height:1.9; }
.guide-hero { display:grid; gap:14px; }
.guide-map { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.guide-card { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fff; display:grid; gap:8px; line-height:1.9; }
.guide-card strong { color:var(--ink); font-size:15px; }
.guide-card ul { margin:0; padding-inline-start:20px; color:var(--text); }
.guide-card li { margin:5px 0; }
.guide-flow { display:grid; gap:10px; counter-reset:guide; }
.guide-step { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fff; line-height:1.9; position:relative; }
.guide-step strong { color:var(--ink); display:block; margin-bottom:4px; }
.guide-step::before { counter-increment:guide; content:counter(guide); position:absolute; inset-block-start:14px; inset-inline-start:14px; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--accent); color:#fff; font-weight:800; }
.guide-step { padding-inline-start:58px; }
.guide-checklist { display:grid; gap:8px; }
.guide-checklist span { display:block; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fffdfb; line-height:1.8; }
.guide-anchor-list { display:flex; flex-wrap:wrap; gap:8px; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration: none; }
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
}
.sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--ink);
  padding: 24px 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff url('/brand-logo') center/contain no-repeat;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(143,75,85,.14);
}
.brand strong { display: block; font-size: 18px; }
.brand small { color: var(--muted); font-size: 12px; }
.side-nav { display: grid; gap: 8px; align-content: start; min-height:0; overflow-y:auto; padding-inline-end:4px; overscroll-behavior:contain; }
.side-nav::-webkit-scrollbar { width: 7px; }
.side-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.side-nav a {
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  border: 1px solid transparent;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.side-nav a:hover, .side-nav a.active {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.ui-strip { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.ui-strip .button.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.nav-badge { min-width:22px; height:22px; border-radius:999px; background:var(--danger); color:#fff; display:inline-grid; place-items:center; font-size:11px; font-weight:900; padding:0 6px; }
.emoji-shell { position:relative; display:grid; gap:8px; }
.emoji-tools { display:flex; align-items:center; justify-content:flex-start; }
.emoji-icon-button { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; padding:0; font-size:20px; background:var(--soft); color:var(--accent); }
.emoji-popover { position:absolute; z-index:30; inset-block-start:calc(100% + 8px); inset-inline-start:0; width:min(380px,92vw); display:grid; gap:10px; padding:12px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 24px 80px rgba(0,0,0,.20); }
.emoji-popover[hidden] { display:none; }
.emoji-search { min-height:40px; }
.emoji-tabs { display:flex; gap:6px; overflow:auto; }
.emoji-tabs button { flex:0 0 auto; padding:7px 10px; border-radius:999px; }
.emoji-tabs button.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.emoji-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:5px; max-height:230px; overflow:auto; }
.emoji-grid button { padding:6px; min-height:36px; font-size:20px; border-radius:8px; }
.message-row-deleted td, .message-card-deleted { background:#fff1f2 !important; border-color:#fecdd3 !important; }
.message-edit { display:grid; gap:8px; }
.message-edit summary { cursor:pointer; color:var(--accent); font-weight:900; }
.message-preview { white-space:pre-wrap; line-height:1.9; }
.data-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.compact-card { border:1px solid var(--line); border-radius:10px; background:#fff; padding:14px; display:grid; gap:10px; }
.logout-form button {
  width: 100%;
  background: var(--soft);
  color: var(--accent);
  border-color: var(--line);
}
.workspace { min-width: 0; }
.pagebar {
  min-height: 122px;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.pagebar h1 { margin: 4px 0 0; color: var(--ink); font-size: 30px; }
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
button, .button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition: .16s ease;
}
button:hover, .button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
button.primary, .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.danger { color: var(--danger); }
main { max-width: 1280px; margin: 0 auto; padding: 28px 32px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.card { min-height: 132px; display: grid; align-content: space-between; border-right: 4px solid var(--accent); }
.card strong { display: block; font-size: 36px; margin-top: 8px; color: var(--ink); }
.card small { color: var(--muted); }
.dashboard-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px; }
.metric-card { min-height:138px; display:grid; gap:10px; border-right:4px solid var(--accent); }
.metric-card strong { display:block; font-size:34px; color:var(--ink); line-height:1.1; }
.metric-card small { color:var(--muted); line-height:1.8; }
.metric-card.urgent { border-right-color:var(--danger); background:linear-gradient(180deg,#fff,#fff7f7); }
.dashboard-wide { display:grid; grid-template-columns:1.35fr .85fr; gap:14px; }
.chart-bars { display:grid; gap:10px; }
.chart-row { display:grid; grid-template-columns:minmax(84px, 130px) 1fr auto; align-items:center; gap:10px; color:var(--muted); font-size:13px; }
.chart-track { height:12px; background:#f3ebe7; border-radius:999px; overflow:hidden; }
.chart-fill { display:block; height:100%; width:var(--value); background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:999px; }
.chart-fill.danger { background:linear-gradient(90deg,var(--danger),#ef8a76); }
.chart-fill.ok { background:linear-gradient(90deg,#047857,#65a30d); }
.chart-fill.neutral { background:linear-gradient(90deg,#64748b,#94a3b8); }
.spark-days { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:8px; min-height:190px; align-items:end; padding-top:10px; }
.spark-day { display:grid; grid-template-rows:1fr auto; gap:8px; min-width:0; color:var(--muted); font-size:12px; text-align:center; }
.spark-bar { height:150px; display:flex; align-items:end; justify-content:center; background:#fbf6f3; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.spark-bar span { width:100%; min-height:6px; height:var(--value); background:linear-gradient(180deg,var(--accent-2),var(--accent)); display:block; }
.kpi-list { display:grid; gap:10px; }
.kpi-item { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.kpi-item:last-child { border-bottom:0; }
.quick-links { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.help-steps { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
.help-step { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fffdfb; line-height:1.8; }
.help-step strong { color:var(--ink); display:block; margin-bottom:4px; }
.helper-text { color:var(--muted); font-size:12px; line-height:1.9; margin:0; }
.choice-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.choice-grid label { border:1px solid var(--line); border-radius:8px; padding:10px; background:#fff; cursor:pointer; }
.user-picker { display:grid; gap:8px; min-width:min(100%, 340px); }
.user-picker input { background:#fffdfc; }
.user-picker select { min-height:46px; }
.user-title { display:block; color:var(--ink); font-weight:800; }
.user-meta { display:block; color:var(--muted); font-size:12px; margin-top:4px; line-height:1.7; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { color: var(--muted); font-weight: 700; background: #f8fafc; }
tr:hover td { background: #fbfdfd; }
input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(14,116,144,.15);
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
form { margin: 0; }
.form-grid { display: grid; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.login { max-width: 380px; margin: 10vh auto; }
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(360px, 520px);
  place-content: center;
  align-items: stretch;
  gap: 22px;
  padding: clamp(18px, 4vw, 54px);
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(135deg, #342526 0%, #7a4448 54%, #9f6262 100%);
}
.login-hero {
  color: #fff;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  align-content: center;
  gap: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  box-shadow: 0 30px 90px rgba(28,18,18,.28);
  backdrop-filter: blur(10px);
}
.login-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0;
  line-height: 1.35;
}
.login-hero p {
  color: rgba(255,255,255,.82);
  max-width: 520px;
  line-height: 2;
  font-size: 16px;
}
.login-box {
  display: grid;
  align-content: center;
  padding: 0;
}
.login-box .panel {
  width: min(100%, 520px);
  padding: clamp(24px, 4vw, 38px);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(28,18,18,.24);
}
.login-box h2 { font-size: 28px; margin-bottom: 6px; }
.login-box label { font-size: 15px; color: var(--text); font-weight: 800; }
.login-box input[type="password"] { min-height: 56px; font-size: 18px; border-radius: 10px; }
.login-box button.primary { min-height: 54px; font-size: 16px; justify-content: center; }
.login-help { margin: 0 0 10px; color: var(--muted); line-height: 1.9; }
.thumb { width: 92px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display:block; }
.thumb-button { border:0; background:transparent; padding:0; cursor: zoom-in; }
.gallery { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.image-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap:10px; }
.image-tile { padding:0; overflow:hidden; border:1px solid var(--line); background:#fff; text-align:right; }
.image-tile img { width:100%; aspect-ratio: 1 / .72; object-fit:cover; display:block; }
.image-tile span { display:block; padding:8px; color:var(--muted); font-size:12px; }
.image-modal { position:fixed; inset:0; z-index:40; background:rgba(23,19,19,.72); display:grid; place-items:center; padding:18px; }
.image-modal-box { position:relative; max-width:min(92vw,860px); max-height:88vh; background:#fff; padding:10px; border-radius:8px; display:grid; gap:10px; }
.image-modal-box img { max-width:100%; max-height:72vh; object-fit:contain; border-radius:6px; }
.image-modal-close { position:absolute; inset-block-start:-12px; inset-inline-start:-12px; width:38px; height:38px; border-radius:50%; background:var(--danger); color:#fff; border:0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}
.code-block {
  direction: ltr;
  text-align: left;
  background: #2d2222;
  color: #fff5ef;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
}
.mini-code {
  direction: ltr;
  text-align: left;
  max-width: 360px;
  white-space: pre-wrap;
  background: #f1f5f9;
  color: #2d2222;
  padding: 10px;
  border-radius: 8px;
  margin: 0;
}
.content-form {
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}
.notice {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.notice.success {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}
.notice.error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.jalali-preview {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.mobile-card-title { display: none; }
.tour-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, .50);
  z-index: 9000;
}
.tour-highlight { outline: 3px solid rgba(143,75,85,.28); background: var(--soft) !important; color: var(--accent) !important; }
.tour-focus { position: relative; z-index: 9001; outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; box-shadow: 0 18px 60px rgba(0,0,0,.26); }
.tour-pop {
  position: fixed;
  inset-inline: 18px;
  top: 22px;
  bottom: auto;
  z-index: 9010;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 24px 90px rgba(0,0,0,.32);
  max-width: 560px;
  margin: auto;
}
.tour-pop p { line-height: 1.95; }
.inline-edit { border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; }
.inline-edit summary { cursor:pointer; padding:10px 12px; color:var(--accent); font-weight:800; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.inline-edit summary::after { content:'⌄'; font-size:16px; }
.inline-edit[open] summary::after { content:'⌃'; }
.inline-edit > form { padding:12px; border-top:1px solid var(--line); }
.login-alert { position:fixed; inset-inline:18px; top:18px; z-index:50; max-width:420px; margin:auto; background:#fee2e2; color:#991b1b; border:1px solid #fecaca; border-radius:10px; padding:14px 16px; box-shadow:0 18px 50px rgba(0,0,0,.18); font-weight:800; }
.about-hero { display:grid; grid-template-columns:minmax(180px, 260px) 1fr; gap:22px; align-items:center; }
.about-photo { width:100%; max-width:240px; aspect-ratio:1; object-fit:cover; border-radius:16px; border:1px solid var(--line); box-shadow:0 24px 70px rgba(28,18,18,.16); }
.about-info { display:grid; gap:12px; }
.about-info h2 { font-size:30px; margin:0; }
.about-links { display:flex; flex-wrap:wrap; gap:10px; }
.about-links a { color:var(--accent); font-weight:800; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--soft); }
.about-note { border:1px solid var(--line); border-radius:10px; padding:14px; background:var(--soft); color:var(--text); line-height:1.9; }
.catalog-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.catalog-manager { display:grid; grid-template-columns:minmax(280px,.92fr) minmax(0,1.45fr); gap:14px; align-items:start; }
.catalog-forms { display:grid; gap:12px; }
.check-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:8px; }
.check-item { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); }
.catalog-create { border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
.catalog-create summary { cursor:pointer; padding:14px 16px; display:flex; justify-content:space-between; gap:10px; font-weight:900; color:var(--accent); }
.catalog-create summary::after { content:'⌄'; }
.catalog-create[open] summary::after { content:'⌃'; }
.catalog-create form { padding:0 16px 16px; }
.catalog-list { display:grid; gap:10px; }
.catalog-card { border:1px solid var(--line); border-radius:10px; background:#fff; padding:14px; display:grid; gap:12px; }
.catalog-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.catalog-card-title { display:grid; gap:5px; }
.catalog-card-title strong { color:var(--ink); font-size:17px; }
.catalog-meta { display:flex; flex-wrap:wrap; gap:6px; color:var(--muted); }
.catalog-manage { display:grid; gap:8px; }
.catalog-manage summary { cursor:pointer; color:var(--accent); font-weight:900; padding:9px 0; }
.pagination { display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:12px; }
.pagination .button.disabled { opacity:.45; pointer-events:none; }
.people-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.person-card { display:grid; grid-template-columns:88px 1fr; gap:14px; align-items:center; }
.person-card img { width:88px; height:88px; border-radius:14px; object-fit:cover; border:1px solid var(--line); }
.date-picker-shell { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.date-picker-trigger { flex: 0 0 auto; }
.date-range-presets { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.date-range-presets button { padding:10px 12px; }
.date-picker-modal { position:fixed; inset:0; z-index:35; background:rgba(23,19,19,.42); display:grid; place-items:end center; padding:18px; }
.date-picker-box { width:min(520px,100%); background:#fff; border-radius:8px; border:1px solid var(--line); box-shadow:0 28px 80px rgba(0,0,0,.22); padding:16px; display:grid; gap:12px; }
.date-picker-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; direction:rtl; }
.date-picker-day { min-height:58px; padding:8px 4px; display:grid; place-items:center; border:1px solid var(--line); background:#fff; }
.date-picker-day strong { color:var(--ink); }
.date-picker-day span { color:var(--muted); font-size:11px; }
.date-picker-day.selected { background:var(--accent); color:#fff; border-color:var(--accent); }
.date-picker-day.selected strong, .date-picker-day.selected span { color:#fff; }
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top:0; height:auto; max-height:42vh; overflow:hidden; padding:12px; gap:10px; z-index:8; }
  .brand { justify-content:center; }
  .side-nav { grid-template-columns: repeat(4, minmax(0,1fr)); overflow:auto; display:flex; padding-bottom:4px; max-height:calc(42vh - 88px); }
  .side-nav a { min-width:112px; padding:11px 8px; font-size:12px; text-align:center; justify-content:center; }
  .logout-form { display:none; }
  .pagebar { align-items: flex-start; flex-direction: column; padding: 16px; position:relative; }
  .pagebar h1 { font-size:24px; }
  main { padding: 14px; }
  .grid, .two, .dashboard-grid, .dashboard-wide, .quick-links, .help-steps, .choice-grid, .theme-options, .guide-map { grid-template-columns: 1fr; }
  .login-screen { grid-template-columns: 1fr; place-content:center; padding:16px; }
  .login-hero { padding: 24px; border-radius:12px; }
  .login-hero h1 { font-size: 30px; }
  .login-box { padding: 0; }
  .login-box .panel { width:100%; padding:22px; }
  table.mobile-list, table.mobile-list thead, table.mobile-list tbody, table.mobile-list tr, table.mobile-list td { display: block; width: 100%; }
  table.mobile-list { border: 0; background: transparent; }
  table.mobile-list thead { display: none; }
  table.mobile-list tr { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow); }
  table.mobile-list td { border-bottom: 1px solid var(--line); white-space: normal; }
  table.mobile-list td:last-child { border-bottom: 0; }
  table:not(.mobile-list) { display: block; overflow-x: auto; white-space: nowrap; }
  .mobile-card-title { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
  .actions > * { flex: 1 1 140px; }
  .card, .panel { padding:14px; }
  .about-hero { grid-template-columns:1fr; }
  .about-photo { max-width:180px; }
  .catalog-overview, .catalog-manager, .people-grid { grid-template-columns:1fr; }
  .person-card { grid-template-columns:70px 1fr; }
  .person-card img { width:70px; height:70px; }
  .date-picker-modal { place-items:end center; padding:8px; }
  .date-picker-box { border-radius:8px 8px 0 0; }
}
