/* ==========================================================================
   Kadry · Żabka — System zarządzania czasem pracy
   iOS "liquid glass" design system
   ========================================================================== */

:root {
  /* Brand */
  --green-900: #00532a;
  --green-700: #007a3d;
  --green-600: #009a4e;
  --green-500: #00b85c;
  --green-400: #35d17e;
  --green-100: #d6f7e4;
  --accent: var(--green-600);

  /* Neutrals */
  --ink: #0d1b12;
  --ink-2: #33463a;
  --muted: #6b7d72;
  --line: rgba(13, 27, 18, 0.08);
  --line-strong: rgba(13, 27, 18, 0.14);

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-2: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow-sm: 0 2px 10px rgba(6, 40, 22, 0.06);
  --shadow: 0 12px 40px rgba(6, 40, 22, 0.12);
  --shadow-lg: 0 24px 70px rgba(6, 40, 22, 0.18);

  /* Status */
  --ok: #16a34a;
  --warn: #d98a00;
  --bad: #dc3545;
  --info: #0a84ff;

  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 30px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 700px at 8% -8%, #d8ffe8 0%, transparent 55%),
    radial-gradient(1000px 800px at 110% 10%, #c8f6ff 0%, transparent 50%),
    radial-gradient(900px 900px at 50% 120%, #e7ffd6 0%, transparent 55%),
    linear-gradient(160deg, #eef7f1 0%, #e6f2ee 40%, #eaf6ef 100%);
  background-attachment: fixed;
  min-height: 100%;
}

/* Floating blobs for depth */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 420px; height: 420px;
  top: -120px; right: -80px;
  background: radial-gradient(circle at 30% 30%, #56e39a, transparent 70%);
}
body::after {
  width: 380px; height: 380px;
  bottom: -140px; left: -100px;
  background: radial-gradient(circle at 40% 40%, #7fe0ff, transparent 70%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ==========================================================================
   Glass primitives
   ========================================================================== */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.card {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  box-shadow: 0 8px 20px rgba(0, 154, 78, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(0, 154, 78, 0.45); }

.btn-ghost {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--glass-strong); }

.btn-danger { color: #fff; background: linear-gradient(180deg, #ff5a6a, var(--bad)); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Icon-only pill */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-2);
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--glass-strong); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.input, select.input, textarea.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(0, 184, 92, 0.16);
  background: #fff;
}
textarea.input { resize: vertical; min-height: 84px; }

/* ==========================================================================
   Login page
   ========================================================================== */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 410px;
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 6px;
}
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--green-400), var(--green-700));
  box-shadow: 0 8px 20px rgba(0, 122, 61, 0.4);
  color: #fff;
}
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.brand-sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.auth-title { font-size: 25px; font-weight: 800; margin: 22px 0 4px; letter-spacing: -0.4px; }
.auth-desc { font-size: 14px; color: var(--muted); margin: 0 0 22px; }

.role-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 5px;
  margin-bottom: 20px;
}
.role-tab {
  padding: 10px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-weight: 600; font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
}
.role-tab.active {
  background: #fff;
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}

.demo-hint {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.demo-hint code {
  background: rgba(0, 154, 78, 0.1);
  padding: 1px 6px; border-radius: 6px;
  color: var(--green-700); font-weight: 600;
}
.auth-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: #b02333;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }

/* ==========================================================================
   App shell
   ========================================================================== */
.app { position: relative; z-index: 1; min-height: 100vh; display: flex; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-right: 1px solid var(--glass-border);
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 8px 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.side-brand .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  color: var(--ink-2);
  font-weight: 600; font-size: 14.5px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  border: 1px solid transparent;
}
.nav-item .ic { font-size: 18px; width: 22px; text-align: center; }
#nav { display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; min-height: 0; }
.nav-item.pinned { margin-top: auto; position: relative; }
.nav-item.pinned::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: -7px;
  height: 1px; background: var(--line);
}
/* In-menu logout entry — mobile only (desktop uses the footer button) */
.nav-logout { display: none; color: var(--bad); font-weight: 700; margin-top: 8px; position: relative; }
.nav-logout svg { stroke: var(--bad); }
.nav-logout::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: -5px;
  height: 1px; background: var(--line);
}
.nav-logout:hover { background: rgba(220, 53, 69, 0.09); }
.nav-item:hover { background: var(--glass-2); }
.nav-item.active {
  background: linear-gradient(180deg, rgba(0,184,92,0.16), rgba(0,154,78,0.12));
  color: var(--green-700);
  border-color: rgba(0,154,78,0.2);
}
.nav-badge {
  margin-left: auto;
  background: var(--bad);
  color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 10px;
  display: grid; place-items: center;
  padding: 0 5px;
}
.nav-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700;
  padding: 14px 13px 6px;
}
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 13px; cursor: pointer;
}
.side-user:hover { background: var(--glass-2); }
.avatar {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 15px;
  background: linear-gradient(150deg, var(--green-400), var(--green-700));
  flex-shrink: 0;
}
.side-user .u-name { font-size: 14px; font-weight: 700; line-height: 1.1; }
.side-user .u-role { font-size: 12px; color: var(--muted); }

/* Main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 26px;
  position: sticky; top: 0; z-index: 20;
  background: var(--glass-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.topbar .hamburger { display: none; }
.topbar-logout { display: none; color: var(--bad); }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.page-sub { font-size: 13px; color: var(--muted); }
.topbar-spacer { flex: 1; }

.content { padding: 24px 26px 90px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.row { display: flex; gap: 12px; align-items: center; }
.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Stat tiles */
.stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
}
.stat .s-top { display: flex; align-items: center; justify-content: space-between; }
.stat .s-ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--green-100); color: var(--green-700);
}
.stat .s-val { font-size: 30px; font-weight: 820; letter-spacing: -1px; line-height: 1; }
.stat .s-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .s-trend { font-size: 12px; font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--bad); }

/* Section header */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-head h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.2px; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.tbl th {
  text-align: left; font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: rgba(255,255,255,0.4); }

/* Badges / chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.badge-ok   { background: rgba(22,163,74,0.14); color: #138a3e; }
.badge-warn { background: rgba(217,138,0,0.16); color: #a56800; }
.badge-bad  { background: rgba(220,53,69,0.14); color: #c02636; }
.badge-info { background: rgba(10,132,255,0.14); color: #0a6bd6; }
.badge-mut  { background: rgba(13,27,18,0.08); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--glass-border);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--green-600); color: #fff; border-color: transparent; }

/* ==========================================================================
   Schedule / grafik grid
   ========================================================================== */
.sched {
  display: grid;
  grid-template-columns: 150px repeat(7, minmax(112px, 1fr));
  /* min-width must be >= sum of column minimums (150 + 7*112 = 934) or the
     last column overflows and gets clipped by overflow:hidden */
  min-width: 950px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.sched .sc-h {
  background: rgba(255,255,255,0.55);
  padding: 10px; font-weight: 700; font-size: 12.5px;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line);
  text-align: center;
}
.sched .sc-h.today { color: var(--green-700); background: var(--green-100); }
.sched .sc-name {
  padding: 12px; font-weight: 700; font-size: 13.5px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.4);
  display: flex; align-items: center; gap: 9px;
}
.sched .sc-cell {
  padding: 7px; min-height: 62px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background 0.15s;
  display: flex; flex-direction: column; gap: 4px;
}
.sched .sc-cell:hover { background: rgba(0,184,92,0.07); }
.shift-pill {
  background: linear-gradient(180deg, rgba(0,184,92,0.18), rgba(0,154,78,0.14));
  border: 1px solid rgba(0,154,78,0.25);
  color: var(--green-900);
  border-radius: 9px; padding: 5px 7px;
  font-size: 12px; font-weight: 700; line-height: 1.25;
}
.shift-pill small { display: block; font-weight: 500; opacity: 0.75; font-size: 11px; }
.shift-pill.leave { background: rgba(217,138,0,0.14); border-color: rgba(217,138,0,0.3); color: #8a5a00; }

/* ==========================================================================
   On-screen month calendar (grafik + dyspozycyjność)
   ========================================================================== */
.mcal {
  display: grid;
  grid-template-columns: repeat(7, minmax(94px, 1fr));
  gap: 6px;
}
.mcal .mh {
  text-align: center; font-weight: 700; font-size: 12px;
  color: var(--muted); padding: 4px 0;
}
.mcal .mc {
  min-height: 86px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.4);
  padding: 6px; transition: border 0.15s, background 0.15s;
}
.mcal .mc.empty { background: transparent; border: none; }
.mcal .mc.wknd { background: rgba(13, 27, 18, 0.035); }
.mcal .mc.today { border-color: var(--green-500); box-shadow: inset 0 0 0 1px var(--green-500); }
.mcal .mc .dn { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.mchip {
  font-size: 10.5px; font-weight: 600; border-radius: 7px;
  padding: 2px 5px; margin-bottom: 3px; border: 1px solid; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Segmented toggle (Tydzień/Miesiąc, Tylko ja/Wszyscy) */
.seg { display: inline-flex; gap: 2px; background: var(--glass-2);
  border: 1px solid var(--glass-border); border-radius: 12px; padding: 3px; }
.seg button {
  border: none; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 6px 12px; border-radius: 9px; white-space: nowrap;
}
.seg button.active { background: var(--green-600); color: #fff; }

/* Dyspozycyjność: month on desktop, cards on mobile */
.dyspo-month { display: none; }
@media (min-width: 861px) {
  .dyspo-month { display: block; }
  .dyspo-cards { display: none; }
}

/* ==========================================================================
   Clock (RCP) big control
   ========================================================================== */
.clock-card { text-align: center; padding: 30px 24px; }
.clock-time { font-size: 52px; font-weight: 850; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.clock-date { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.clock-status { margin: 18px 0; font-size: 15px; font-weight: 600; }
.clock-big {
  width: 150px; height: 150px; border-radius: 50%;
  margin: 6px auto 0;
  display: grid; place-items: center;
  border: none; cursor: pointer; color: #fff;
  background: linear-gradient(160deg, var(--green-400), var(--green-700));
  box-shadow: 0 18px 44px rgba(0,122,61,0.42);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.clock-big:hover { box-shadow: 0 22px 52px rgba(0,122,61,0.5); }
.clock-big:active { transform: scale(0.94); }
.clock-big.stop { background: linear-gradient(160deg, #ff6b7a, #c9283a); box-shadow: 0 18px 44px rgba(201,40,58,0.42); }
.clock-big.stop:hover { box-shadow: 0 22px 52px rgba(201,40,58,0.5); }
.clock-big svg { display: block; }
.clock-label {
  margin-top: 18px; font-size: 19px; font-weight: 800; letter-spacing: -0.3px;
  color: var(--green-700);
}
.clock-label.stop { color: var(--bad); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,30,20,0.35);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-back.show { display: flex; }
.modal {
  width: 100%; max-width: 460px;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.modal .m-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 14px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all 0.3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--green-700); }
.toast.bad { background: var(--bad); }

/* Progress bar */
.bar { height: 8px; border-radius: 999px; background: rgba(13,27,18,0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-400), var(--green-600)); }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e-ic { font-size: 40px; opacity: 0.5; margin-bottom: 8px; }

/* Mobile bottom nav (hidden on desktop) */
.mobnav { display: none; }
.drawer-back { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--shadow-lg);
  }
  .app.drawer-open .sidebar { transform: translateX(0); }
  .drawer-back {
    display: none; position: fixed; inset: 0; z-index: 55;
    background: rgba(10,30,20,0.3); backdrop-filter: blur(3px);
  }
  .app.drawer-open .drawer-back { display: block; }
  .topbar .hamburger { display: inline-grid; }
  .topbar-logout { display: inline-grid; }

  /* Drawer must scroll so the footer (logout) is never cut off */
  .sidebar { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  #nav { flex: 0 0 auto; }
  .nav-item.pinned { margin-top: 6px; }
  .nav-logout { display: flex; }
  .side-foot { margin-top: 14px; }
  .side-foot #logoutBtn { display: none; } /* logout lives in the menu list on mobile */
  .content { padding: 18px 16px 96px; }
  .topbar { padding: 14px 16px; }

  /* Bottom tab bar for quick nav */
  .mobnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--glass-strong);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px;
    border-radius: 10px;
  }
  .mobnav a .ic { font-size: 21px; }
  .mobnav a.active { color: var(--green-700); }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .clock-time { font-size: 42px; }
  .stat .s-val { font-size: 26px; }
  .modal-actions { flex-direction: column; }
}
