/*************************************************************************
 * LOGIXWEB PORTAL — STYLESHEET
 * Aesthetic: navy command-center, gold accent, signal-red alerts.
 * Fonts: Sora (display) / Manrope (UI) / JetBrains Mono (data).
 *************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --navy-900: #060f24;
  --navy-800: #0a1733;
  --navy-700: #0f2150;
  --navy-600: #16306b;
  --navy-500: #1f4288;
  --line: rgba(214, 178, 99, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);

  --gold: #d6b263;
  --gold-bright: #f3d488;
  --red: #e23b4e;
  --red-soft: rgba(226, 59, 78, 0.14);
  --green: #2bb673;
  --green-soft: rgba(43, 182, 115, 0.14);
  --blue: #4f9cf2;
  --amber: #e6a23c;

  --txt: #eaf0fb;
  --txt-dim: #9fb0d0;
  --txt-faint: #6b7da0;

  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);

  --ff-display: 'Sora', sans-serif;
  --ff-ui: 'Manrope', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--ff-ui);
  color: var(--txt);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(214, 178, 99, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(31, 66, 136, 0.35), transparent 55%),
    var(--navy-900);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
a { color: var(--gold); text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 20px; }

/* grain overlay */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0.035; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============== MONOGRAM MARK ============== */
.mark {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 800; font-size: 20px; color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 6px 18px -6px rgba(214, 178, 99, 0.6);
  flex-shrink: 0;
}
.mark.lg { width: 60px; height: 60px; font-size: 28px; border-radius: 15px; }

/* ===================================================================
   LOGIN SCREEN
=================================================================== */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; position: relative; z-index: 1;
}
.login-art {
  position: relative; overflow: hidden; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 700px at 70% 30%, rgba(214, 178, 99, 0.16), transparent 60%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
  border-right: 1px solid var(--line);
}
.login-art::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(circle at 65% 40%, black, transparent 75%);
}
.login-art .art-top { display: flex; align-items: center; gap: 14px; position: relative; }
.login-art .art-top b { font-family: var(--ff-display); font-size: 22px; letter-spacing: -0.4px; }
.login-art h1 {
  font-family: var(--ff-display); font-size: clamp(34px, 4vw, 56px); line-height: 1.02;
  font-weight: 800; letter-spacing: -1.5px; position: relative; margin-bottom: 18px;
}
.login-art h1 .em { color: var(--gold); }
.login-art p { color: var(--txt-dim); max-width: 440px; font-size: 16px; line-height: 1.6; position: relative; }
.login-art .badges { display: flex; gap: 10px; flex-wrap: wrap; position: relative; margin-top: 26px; }
.login-art .badge {
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold);
  background: rgba(214, 178, 99, 0.06);
}
.login-art .art-foot { color: var(--txt-faint); font-size: 13px; position: relative; }

.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-family: var(--ff-display); font-size: 28px; font-weight: 700; letter-spacing: -0.6px; }
.login-card .sub { color: var(--txt-dim); margin: 8px 0 32px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--txt-dim); margin-bottom: 8px; }
.input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); font-family: var(--ff-ui); font-size: 15px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft); color: var(--txt); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s; user-select: text;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 178, 99, 0.15); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { cursor: pointer; }

.btn {
  width: 100%; padding: 14px 18px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--ff-display); font-weight: 700; font-size: 15px; letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--navy-900);
  transition: transform 0.12s, box-shadow 0.2s; box-shadow: 0 10px 24px -10px rgba(214, 178, 99, 0.7);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(214, 178, 99, 0.8); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--txt); box-shadow: none; }
.btn.ghost:hover { background: var(--card-hover); }
.btn.danger { background: linear-gradient(135deg, #ff5566, var(--red)); color: #fff; box-shadow: none; }
.btn.sm { width: auto; padding: 9px 14px; font-size: 13px; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; display: none; }
.alert.err { display: block; background: var(--red-soft); border: 1px solid rgba(226, 59, 78, 0.4); color: #ffb3bc; }
.alert.ok { display: block; background: var(--green-soft); border: 1px solid rgba(43, 182, 115, 0.4); color: #9ff0c8; }

/* ===================================================================
   DASHBOARD SHELL
=================================================================== */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.side-brand b { font-family: var(--ff-display); font-size: 19px; letter-spacing: -0.4px; }
.side-brand span { display: block; font-size: 11px; color: var(--txt-faint); letter-spacing: 0.4px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--radius-sm);
  color: var(--txt-dim); cursor: pointer; font-weight: 600; font-size: 14px; transition: 0.15s; border: 1px solid transparent;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--card-hover); color: var(--txt); }
.nav-item.active { background: rgba(214, 178, 99, 0.12); color: var(--gold-bright); border-color: var(--line); }
.nav-item.admin-only { display: none; }
body.is-admin .nav-item.admin-only { display: flex; }

.side-user {
  margin-top: auto; padding: 13px; border-radius: var(--radius-sm); background: var(--card);
  border: 1px solid var(--line-soft); display: flex; align-items: center; gap: 11px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--navy-600); color: var(--gold-bright); font-weight: 700; font-family: var(--ff-display);
}
.side-user .meta { overflow: hidden; flex: 1; }
.side-user .meta b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .meta span { font-size: 11px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.4px; }
.logout { background: none; border: none; color: var(--txt-faint); cursor: pointer; padding: 6px; border-radius: 8px; }
.logout:hover { color: var(--red); background: var(--red-soft); }

.main { padding: 0; overflow-x: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 32px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0;
  background: rgba(6, 15, 36, 0.82); backdrop-filter: blur(14px); z-index: 20;
}
.topbar h1 { font-family: var(--ff-display); font-size: 24px; font-weight: 700; letter-spacing: -0.6px; }
.topbar .crumb { font-size: 12px; color: var(--txt-faint); letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 3px; }
.topbar .right { display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--ff-mono); font-size: 13px; color: var(--gold); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.hamburger { display: none; background: none; border: 1px solid var(--line); color: var(--txt); width: 42px; height: 42px; border-radius: 11px; cursor: pointer; }

.view { padding: 28px 32px; display: none; animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============== STAT CARDS ============== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-soft);
  position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.stat .k { font-size: 12px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.stat .v { font-family: var(--ff-display); font-size: 30px; font-weight: 700; margin-top: 8px; }
.stat .v small { font-size: 14px; color: var(--txt-dim); font-weight: 500; }
.stat.red::before { background: var(--red); } .stat.green::before { background: var(--green); }
.stat.blue::before { background: var(--blue); } .stat.amber::before { background: var(--amber); }

/* ============== GENERIC CARD / SECTION ============== */
.card-box { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.card-box > h3 { font-family: var(--ff-display); font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--ff-display); font-size: 20px; }

/* ============== TABLES ============== */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; padding: 13px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--txt-faint); background: var(--navy-800); font-weight: 700; white-space: nowrap;
}
tbody td { padding: 13px 16px; border-top: 1px solid var(--line-soft); color: var(--txt-dim); }
tbody tr:hover { background: var(--card-hover); }
tbody td b, tbody td strong { color: var(--txt); }

/* ============== BADGES / PILLS ============== */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.gold { background: rgba(214, 178, 99, 0.14); color: var(--gold-bright); }
.pill.green { background: var(--green-soft); color: #7fe6b4; }
.pill.red { background: var(--red-soft); color: #ffadb6; }
.pill.blue { background: rgba(79, 156, 242, 0.15); color: #a8cdfb; }
.pill.amber { background: rgba(230, 162, 60, 0.15); color: #f0c987; }
.pill.gray { background: rgba(255, 255, 255, 0.07); color: var(--txt-dim); }

/* ============== KANBAN ============== */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.lane { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; min-height: 200px; }
.lane.drag-over { border-color: var(--gold); background: rgba(214, 178, 99, 0.06); }
.lane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 0 4px; }
.lane-head b { font-family: var(--ff-display); font-size: 14px; }
.lane-head .count { font-family: var(--ff-mono); font-size: 12px; color: var(--txt-faint); background: var(--navy-700); padding: 2px 9px; border-radius: 999px; }
.lane-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; }

.tcard {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 14px; margin-bottom: 12px; cursor: grab; transition: 0.15s; position: relative;
}
.tcard:hover { border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow); }
.tcard:active { cursor: grabbing; }
.tcard .tc-client { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.tcard .tc-title { font-weight: 700; color: var(--txt); margin: 5px 0 8px; font-size: 14px; line-height: 1.35; }
.tcard .tc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--txt-faint); }
.tcard .tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.timer { font-family: var(--ff-mono); font-size: 13px; color: var(--gold-bright); display: flex; align-items: center; gap: 8px; }
.timer-btn { background: var(--navy-600); border: 1px solid var(--line-soft); color: var(--txt); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.timer-btn:hover { background: var(--gold); color: var(--navy-900); }
.timer-btn.running { background: var(--red); color: #fff; }
.tc-link-row { margin-top: 10px; display: flex; gap: 7px; }
.tc-link-row input { flex: 1; padding: 7px 10px; font-size: 12px; background: rgba(0,0,0,0.25); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--txt); user-select: text; }
.tc-link-row input:focus { outline: none; border-color: var(--gold); }

/* ============== TOGGLE SWITCH (iOS-style) ============== */
.toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track { position: absolute; cursor: pointer; inset: 0; background: var(--navy-600); border-radius: 999px; transition: 0.25s; border: 1px solid var(--line-soft); }
.toggle .track::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: var(--txt-dim); border-radius: 50%; transition: 0.25s; }
.toggle input:checked + .track { background: linear-gradient(135deg, var(--green), #1e9e62); border-color: transparent; }
.toggle input:checked + .track::before { transform: translateX(20px); background: #fff; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line-soft); margin-bottom: 10px; }
.toggle-row .tr-name { font-weight: 600; font-size: 14px; }
.toggle-row .tr-type { font-size: 11px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.4px; }

/* ============== ATTENDANCE STATION ============== */
.att-station { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.att-clock-big { font-family: var(--ff-mono); font-size: clamp(40px, 6vw, 64px); font-weight: 700; color: var(--gold-bright); letter-spacing: 1px; }
.att-date { color: var(--txt-dim); font-size: 15px; margin-top: 4px; }
.att-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.att-status-line { margin-top: 20px; font-size: 14px; color: var(--txt-dim); }
.geo-note { font-size: 12px; color: var(--txt-faint); margin-top: 16px; line-height: 1.5; }

/* ============== FORM GRID ============== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============== MODAL ============== */
.modal-bg { position: fixed; inset: 0; background: rgba(3, 8, 20, 0.72); backdrop-filter: blur(6px); z-index: 100; display: none; place-items: center; padding: 20px; }
.modal-bg.open { display: grid; }
.modal { width: 100%; max-width: 560px; background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; animation: rise 0.3s; }
.modal h3 { font-family: var(--ff-display); font-size: 20px; margin-bottom: 20px; }
.modal-foot { display: flex; gap: 12px; margin-top: 24px; }

/* ============== EMPTY / TOAST ============== */
.empty { text-align: center; padding: 50px 20px; color: var(--txt-faint); }
.empty .em-mark { font-size: 40px; opacity: 0.4; margin-bottom: 12px; }
#toast { position: fixed; bottom: 26px; right: 26px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 18px; border-radius: var(--radius-sm); background: var(--navy-700); border: 1px solid var(--line);
  color: var(--txt); font-size: 14px; box-shadow: var(--shadow); animation: rise 0.3s; max-width: 340px;
}
.toast.ok { border-left: 4px solid var(--green); } .toast.err { border-left: 4px solid var(--red); }

.loader-screen { position: fixed; inset: 0; display: grid; place-items: center; background: var(--navy-900); z-index: 500; }
.spinner { width: 42px; height: 42px; border: 3px solid var(--line-soft); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.scrim { display: none; }

/* ===================================================================
   RESPONSIVE
=================================================================== */
@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .att-station { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); height: 100vh;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 55; }
  .hamburger { display: grid; place-items: center; }
  .topbar { padding: 16px 18px; }
  .view { padding: 18px; }
  .kanban { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .clock { display: none; }
}

/* ===================================================================
   PATCH v2 — dropdown visibility, notifications, tabs, dark pickers, mobile
=================================================================== */

/* Render native date/time/number pickers and dropdowns in dark theme */
:root { color-scheme: dark; }
.input { color-scheme: dark; }

/* FIX: invisible <option> text (white-on-white) inside dark selects */
select.input { color: var(--txt); }
select.input option,
select.input optgroup {
  background-color: #0a1733;   /* navy-800 */
  color: #eaf0fb;              /* txt */
}
select.input option:checked,
select.input option:hover { background-color: #16306b; color: #fff; }

/* Notification banner (new task) */
.toast.notif {
  border-left: 4px solid var(--gold);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.7);
  animation: notifPop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes notifPop { from { opacity: 0; transform: translateX(40px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Report tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-soft);
  background: var(--card); color: var(--txt-dim); cursor: pointer; font-family: var(--ff-ui);
  font-weight: 600; font-size: 13px; transition: 0.15s;
}
.tab:hover { color: var(--txt); background: var(--card-hover); }
.tab.active { background: rgba(214,178,99,0.14); color: var(--gold-bright); border-color: var(--line); }

/* Weekly / monthly rollup layout */
.rollup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rollup .ru-h { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; color: var(--txt-faint); text-transform: uppercase; margin-bottom: 10px; }
.rollup ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rollup li { font-size: 13px; color: var(--txt-dim); padding: 9px 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft); border-radius: 9px; line-height: 1.45; }
.rollup li.muted { color: var(--txt-faint); opacity: 0.6; }

/* ----- Mobile polish ----- */
@media (max-width: 760px) {
  .topbar h1 { font-size: 20px; }
  .att-clock-big { font-size: 44px; }
  .att-actions { flex-direction: column; }
  .att-actions .btn { width: 100% !important; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat .v { font-size: 24px; }
  .modal { padding: 20px; border-radius: 14px; }
  .rollup { grid-template-columns: 1fr; gap: 14px; }
  .section-head .btn { width: 100%; }
  .section-head { gap: 10px; }
  .card-box > h3 { flex-wrap: wrap; }
  .card-box > h3 > span { width: auto; }
  table { font-size: 13px; }
  thead th, tbody td { padding: 10px 12px; }
  #toast { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .view { padding: 14px; }
}