/* =========================================================
   Lawpus — Gestão de Equipa | Design system
   ========================================================= */

/* ---------- Sincronizar agenda (checkbox) ---------- */
.sync-toggle { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border: 1px solid #e2e8f0;
  border-radius: 11px; cursor: pointer; transition: .12s; background: #fff; margin-top: 2px; }
.sync-toggle:hover { border-color: #cbd5e1; background: #f8fafc; }
.sync-toggle.on { border-color: #b08d2d; background: #f4ecd6; }
.sync-toggle .cbx { width: 22px; height: 22px; border: 2px solid #cbd5e1; border-radius: 6px; display: grid;
  place-items: center; flex: none; color: #fff; font-size: 13px; font-weight: 700; background: #fff; transition: .12s; margin-top: 1px; }
.sync-toggle.on .cbx { background: #16a34a; border-color: #16a34a; }
.sync-toggle .st-txt b { display: block; font-size: 14px; color: #0f172a; }
.sync-toggle .st-txt span { font-size: 12px; color: #64748b; line-height: 1.4; }
.req-star { color: #dc2626; }

/* ---------- Prioridades (popup) ---------- */
.pri-row { display: flex; align-items: center; gap: 11px; padding: 10px 4px; border-bottom: 1px solid #eef2f7; cursor: pointer; }
.pri-row:last-child { border-bottom: none; }
.pri-row:hover .task-title { color: #2563eb; }
.pri-num { width: 22px; height: 22px; border-radius: 50%; background: #0f172a; color: #fff; font-size: 11px;
  font-weight: 700; display: grid; place-items: center; flex: none; }

:root {
  --navy-900: #0b1220;
  --navy-800: #0f172a;
  --navy-700: #1e293b;
  --navy-600: #334155;
  --ink: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --gold: #b08d2d;
  --gold-soft: #f4ecd6;
  --accent: #2563eb;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --slate-soft: #e2e8f0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow: 0 4px 14px rgba(15,23,42,.08);
  --shadow-lg: 0 18px 50px rgba(15,23,42,.22);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* sem serifas (títulos usam sans) */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[x-cloak] { display: none !important; }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; color: var(--navy-800); margin: 0; letter-spacing: .2px; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(176,141,45,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(37,99,235,.18), transparent 55%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
}
.login-card {
  width: 100%; max-width: 410px; background: var(--surface);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 38px 34px 30px;
  position: relative;
}
.login-crest {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: var(--gold); font-size: 26px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 23px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 24px; }
.login-demo {
  margin-top: 18px; font-size: 12.5px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
.login-demo code { background: #fff; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--navy-700); }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #cbd5e1; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand-crest { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--gold), #8a6d1f); color: #fff; font-size: 19px; flex: none; }
.brand-name { font-family: var(--serif); color: #fff; font-size: 16px; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted-2); letter-spacing: .3px; }
.nav-group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: #5b6b85; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: #cbd5e1; cursor: pointer; font-size: 14px; border: 1px solid transparent; transition: .12s;
}
.nav-item .nav-ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(176,141,45,.16); color: #fff; border-color: rgba(176,141,45,.4); }
.nav-item .badge { margin-left: auto; background: rgba(255,255,255,.12); color: #e2e8f0; font-size: 11px;
  padding: 1px 7px; border-radius: 20px; }
.nav-item.active .badge { background: var(--red); color: #fff; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 19px; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }
.content { padding: 26px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 10px;
  cursor: pointer; font-size: 13.5px; font-weight: 500; transition: .12s; white-space: nowrap; }
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn.primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn.primary:hover { background: var(--navy-700); }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.gold:hover { filter: brightness(1.05); }
.btn.danger { color: var(--red); border-color: var(--red-soft); background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f1f5f9; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; padding: 11px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 9px; }

/* ---------- Inputs ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy-700); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); transition: .12s;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea.input { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 16px; }
.grid { display: grid; gap: 18px; }
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 26px 0 12px; font-family: var(--sans); font-weight: 700; }

/* ---------- Stat cards ---------- */
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat .stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .stat-value { font-family: var(--serif); font-size: 32px; color: var(--navy-800); line-height: 1.1; margin-top: 4px; }
.stat .stat-ico { position: absolute; right: 14px; top: 14px; font-size: 22px; opacity: .5; }
.stat .stat-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.accent-red { border-left: 4px solid var(--red); }
.stat.accent-amber { border-left: 4px solid var(--amber); }
.stat.accent-green { border-left: 4px solid var(--green); }
.stat.accent-navy { border-left: 4px solid var(--navy-700); }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.todo { background: var(--slate-soft); color: #475569; }
.pill.action { background: var(--red-soft); color: var(--red); }
.pill.done { background: var(--green-soft); color: var(--green); }
.pill.overdue { background: var(--red-soft); color: var(--red); }
.pill.soon { background: var(--amber-soft); color: var(--amber); }
.cat-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-size: 12px; font-weight: 700; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.assignee { display: inline-flex; align-items: center; gap: 7px; }
.lnk-x { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 12px; line-height: 1;
  padding: 2px 4px; border-radius: 5px; }
.lnk-x:hover { color: var(--red); background: rgba(220,38,38,.08); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; padding: 11px 14px; color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr { cursor: pointer; transition: background .1s; }
table.tbl tbody tr:hover { background: #f8fafc; }
.task-title { font-weight: 500; color: var(--navy-800); }
.deadline-cell.overdue { color: var(--red); font-weight: 600; }
.deadline-cell.soon { color: var(--amber); font-weight: 600; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .6; }

/* ---------- Filters bar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters .select, .filters .input { width: auto; min-width: 140px; padding: 7px 10px; font-size: 13px; }
.search { position: relative; }
.search .input { padding-left: 32px; min-width: 220px; }
.search::before { content: "🔍"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .5; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px);
  display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%;
  max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line-2); }

/* ---------- Dropdown ---------- */
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 210px; padding: 6px; z-index: 50; }
.menu-pop .mi { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.menu-pop .mi:hover { background: #f1f5f9; }
.menu-pop .sep { height: 1px; background: var(--line-2); margin: 5px 2px; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.user-chip:hover { background: #f1f5f9; }
.user-chip .nm { font-size: 13px; font-weight: 600; line-height: 1.1; }
.user-chip .rl { font-size: 11px; color: var(--muted); }

/* ---------- Lang toggle ---------- */
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-toggle button { border: none; background: #fff; padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.lang-toggle button.on { background: var(--navy-800); color: #fff; }
.login-card .lang-toggle { position: absolute; top: 20px; right: 22px; }

/* ---------- Progress / budget ---------- */
.progress { height: 10px; background: var(--line); border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--gold), #8a6d1f); }
.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.bar-row .bar { height: 9px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar-row .bar > span { display: block; height: 100%; }
.bar-row .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 11px; padding: 12px 14px; border-radius: 11px; align-items: flex-start; font-size: 13.5px; }
.alert.red { background: var(--red-soft); color: #991b1b; }
.alert.amber { background: var(--amber-soft); color: #92400e; }
.alert .a-ico { font-size: 16px; }
.alert-list .ali { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.alert-list .ali:last-child { border-bottom: none; }
.alert-list .ali:hover .task-title { color: var(--accent); }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-head h3 { font-size: 18px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 700; }
.cal-cell { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-height: 96px; padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.out { background: #f8fafc; opacity: .6; }
.cal-cell.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--navy-700); }
.cal-cell.today .cal-daynum { color: var(--gold); }
.cal-ev { font-size: 11px; padding: 3px 6px; border-radius: 6px; color: #fff; cursor: pointer; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.cal-ev.ov { outline: 2px solid var(--red); }
/* Notificação por validar: aspeto "pendente" (tracejado + semitransparente) */
.cal-ev.pending { opacity: .85; border: 1px dashed rgba(255,255,255,.9); font-style: italic; }
.cal-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; color: #64748b; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .lg-dot { width: 12px; height: 12px; border-radius: 4px; background: #94a3b8; }
.cal-legend .lg-dot.pending { border: 1px dashed #94a3b8; background: transparent; }

/* ---------- Category page ---------- */
.cat-hero { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius);
  color: #fff; margin-bottom: 20px; box-shadow: var(--shadow); }
.cat-hero .ch-ico { font-size: 34px; }
.cat-hero h2 { color: #fff; font-size: 24px; }
.cat-hero p { margin: 2px 0 0; opacity: .85; font-size: 13px; }
.sec { margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 14px 18px; }
.sec-head h3 { font-size: 15.5px; flex: 1; }
.sec-head .chev { transition: transform .15s; color: var(--muted); }
.sec-head.open .chev { transform: rotate(90deg); }
.sec-body { padding: 0 18px 18px; }
.sub-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; margin: 14px 0 8px; }
.note-li { display: flex; gap: 8px; font-size: 13.5px; color: #475569; margin-bottom: 6px; }
.note-li::before { content: "—"; color: var(--gold); }
.check-li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.check-li:last-child { border-bottom: none; }
.check-box { width: 19px; height: 19px; border: 2px solid #cbd5e1; border-radius: 6px; display: grid; place-items: center;
  cursor: pointer; flex: none; margin-top: 1px; font-size: 12px; color: #fff; background: #fff; transition: .12s; }
.check-box.on { background: var(--green); border-color: var(--green); }
.check-text { font-size: 13.5px; flex: 1; }
.check-text.done { text-decoration: line-through; color: var(--muted); }
.sec-cost { font-size: 12.5px; color: var(--muted); }
.sec-cost b { color: var(--navy-800); font-family: var(--serif); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; width: 320px; min-width: 290px;
  flex: 1 0 290px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.kanban-col.drag-over { outline: 2px dashed var(--gold); outline-offset: -3px; background: var(--gold-soft); }
.kanban-col-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.kanban-col-head h3 { font-size: 13.5px; font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.kanban-col-head .sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kanban-col-head .cnt { margin-left: auto; background: #fff; border: 1px solid var(--line); color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 20px; }
.kanban-body { padding: 11px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 90px; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-left-width: 4px; border-radius: 11px;
  padding: 11px 13px; cursor: grab; box-shadow: var(--shadow-sm); transition: box-shadow .12s; }
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; }
.kanban-card .kc-title { font-size: 13.5px; font-weight: 500; color: var(--navy-800); margin: 9px 0 11px; line-height: 1.35; }
.kanban-card .kc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kanban-empty { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 20px 8px;
  border: 1px dashed var(--line); border-radius: 10px; }
.kanban-hint { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }

/* ---------- Misc ---------- */
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.hidden { display: none; }
.toast-wrap { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast { background: var(--navy-800); color: #fff; padding: 12px 16px; border-radius: 11px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; display: flex; align-items: center; gap: 9px; min-width: 240px; animation: slidein .2s ease; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--navy-700); border-radius: 50%;
  animation: rot .7s linear infinite; margin: 50px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%);
    transition: transform .2s; z-index: 70; height: 100vh; }
  .sidebar.open { transform: none; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex !important; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 65; }
}
@media (min-width: 981px) { .menu-toggle { display: none; } }
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .cal-cell { min-height: 64px; }
}
