/* ============================================================
   Attendance Portal — stylesheet
   ============================================================ */

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --brand: #1e40af;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;

  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #2563eb;

  --green: #15803d;   --green-bg: #dcfce7;  --green-border: #86efac;
  --red: #b91c1c;     --red-bg: #fee2e2;    --red-border: #fca5a5;
  --amber: #b45309;   --amber-bg: #fef3c7;  --amber-border: #fcd34d;
  --blue: #1d4ed8;    --blue-bg: #dbeafe;   --blue-border: #93c5fd;
  --purple: #6d28d9;  --purple-bg: #ede9fe; --purple-border: #c4b5fd;
  --slate: #475569;   --slate-bg: #f1f5f9;  --slate-border: #cbd5e1;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .1), 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --sidebar-w: 246px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }

/* ---------------- boot ---------------- */
.boot-splash {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; color: var(--text-muted);
}
.boot-spinner, .spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- login ---------------- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #1e40af 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center;
}
.login-brand h1 { font-size: 34px; margin-bottom: 14px; letter-spacing: -.5px; }
.login-brand p { color: #bfdbfe; font-size: 15px; max-width: 44ch; margin: 0 0 32px; }
.login-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.login-features li { display: flex; gap: 11px; align-items: flex-start; color: #dbeafe; font-size: 14px; }
.login-features .tick {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 11px;
}
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--surface); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 23px; margin-bottom: 6px; }
.login-card > p.sub { color: var(--text-muted); margin: 0 0 26px; }

.demo-accounts {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border);
}
.demo-accounts h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin-bottom: 10px; }
.demo-grid { display: grid; gap: 6px; }
.demo-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer; font: inherit; text-align: left; width: 100%;
}
.demo-btn:hover { border-color: var(--brand-border); background: var(--brand-soft); }
.demo-btn strong { font-size: 13px; font-weight: 600; }
.demo-btn span { font-size: 11.5px; color: var(--text-muted); }

/* ---------------- shell ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-head {
  padding: 17px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-head .logo {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  display: grid; place-items: center; font-size: 16px;
}
.sidebar-head .title { color: #fff; font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.sidebar-head .company { font-size: 11.5px; color: #64748b; }

.nav { flex: 1; overflow-y: auto; padding: 10px 9px 24px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.nav-group { margin-top: 15px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
  color: #64748b; padding: 0 10px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); cursor: pointer; font-size: 13.5px; margin-bottom: 1px;
  border: 0; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 500; }
.nav-item .ico { width: 17px; text-align: center; flex: none; font-size: 14px; }
.nav-item .badge-count {
  margin-left: auto; background: #ef4444; color: #fff; font-size: 10.5px;
  padding: 1px 6px; border-radius: 9px; font-weight: 600;
}

.sidebar-foot { padding: 11px; border-top: 1px solid rgba(255, 255, 255, .08); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-sm); }
.user-chip:hover { background: var(--sidebar-hover); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #64748b, #334155); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who b { display: block; color: #fff; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 11px; color: #64748b; }

/* ---------------- main ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 22px; height: 57px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; }
.topbar .crumb { color: var(--text-faint); font-size: 12.5px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.menu-toggle { display: none; }

.content { padding: 22px; flex: 1; }
.content.narrow { max-width: 1000px; }

/* ---------------- cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.card-head {
  padding: 13px 17px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--text-muted); }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 17px; }
.card-body.tight { padding: 0; }

/* ---------------- KPI tiles ---------------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 13px; margin-bottom: 18px;
}
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 15px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--slate-border); }
.kpi.green::before { background: #22c55e; }
.kpi.red::before { background: #ef4444; }
.kpi.amber::before { background: #f59e0b; }
.kpi.blue::before { background: #3b82f6; }
.kpi.purple::before { background: #8b5cf6; }
.kpi .label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.kpi .value { font-size: 27px; font-weight: 650; letter-spacing: -.6px; margin-top: 3px; line-height: 1.1; }
.kpi .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ---------------- tables ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 9px 13px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); white-space: nowrap;
}
table.data td { padding: 9px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mono { font-family: var(--mono); font-size: 12px; }
table.data.compact th, table.data.compact td { padding: 6px 9px; }

.empty { padding: 44px 20px; text-align: center; color: var(--text-muted); }
.empty .ico { font-size: 30px; opacity: .45; display: block; margin-bottom: 9px; }
.empty p { margin: 0 0 4px; font-weight: 500; }
.empty span { font-size: 12.5px; color: var(--text-faint); }

/* ---------------- badges ---------------- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; border: 1px solid transparent; line-height: 1.5;
}
.badge.green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.badge.red    { background: var(--red-bg);    color: var(--red);    border-color: var(--red-border); }
.badge.amber  { background: var(--amber-bg);  color: var(--amber);  border-color: var(--amber-border); }
.badge.blue   { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue-border); }
.badge.purple { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-border); }
.badge.slate  { background: var(--slate-bg);  color: var(--slate);  border-color: var(--slate-border); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
  font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-faint); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.danger:hover:not(:disabled) { background: #b91c1c; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover:not(:disabled) { background: #166534; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 10px 20px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- forms ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.field label .req { color: #dc2626; }
.field .help { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time],
input[type=number], input[type=month], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font: inherit; font-size: 13.5px;
  background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-muted); }
textarea { resize: vertical; min-height: 72px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 0 15px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.check input { width: auto; margin: 0; }

.filters {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end;
  padding: 13px 17px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.filters .field { margin: 0; min-width: 132px; }
.filters .field label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }

/* ---------------- punch widget ---------------- */
.punch-card {
  background: linear-gradient(150deg, #0f172a 0%, #1e3a8a 100%); color: #fff;
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.punch-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.punch-clock { font-size: 39px; font-weight: 650; letter-spacing: -1.4px; font-variant-numeric: tabular-nums; line-height: 1; }
.punch-date { color: #bfdbfe; font-size: 13px; margin-top: 5px; }
.punch-shift { color: #93c5fd; font-size: 12.5px; margin-top: 8px; }
.punch-state { text-align: right; }
.punch-state .st-label { font-size: 11.5px; color: #93c5fd; text-transform: uppercase; letter-spacing: .5px; }
.punch-state .st-value { font-size: 17px; font-weight: 600; margin-top: 2px; }
.punch-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-punch {
  padding: 12px 26px; border-radius: var(--radius); border: 0; font: inherit;
  font-size: 15px; font-weight: 600; cursor: pointer; color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-punch.in { background: #16a34a; }
.btn-punch.in:hover:not(:disabled) { background: #15803d; }
.btn-punch.out { background: #dc2626; }
.btn-punch.out:hover:not(:disabled) { background: #b91c1c; }
.btn-punch.brk { background: rgba(255, 255, 255, .17); }
.btn-punch.brk:hover:not(:disabled) { background: rgba(255, 255, 255, .26); }
.btn-punch:disabled { opacity: .5; cursor: not-allowed; }
.punch-meta {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; gap: 24px; flex-wrap: wrap; font-size: 12.5px; color: #bfdbfe;
}
.punch-meta b { color: #fff; font-weight: 600; }

.timeline { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 12.5px; background: var(--surface);
}
.tl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tl-dot.in { background: #22c55e; } .tl-dot.out { background: #ef4444; }
.tl-dot.break { background: #f59e0b; }

/* ---------------- matrix / calendar ---------------- */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; font-size: 11.5px; }
table.matrix th, table.matrix td { border: 1px solid var(--border); padding: 0; text-align: center; }
table.matrix th.emp, table.matrix td.emp {
  text-align: left; padding: 5px 9px; position: sticky; left: 0; background: var(--surface);
  min-width: 178px; z-index: 2; border-right: 2px solid var(--border-strong);
}
table.matrix thead th { background: var(--surface-2); padding: 4px 2px; font-weight: 600; min-width: 27px; }
table.matrix thead th.weekend { background: #fef2f2; color: #b91c1c; }
table.matrix td.cell { width: 27px; height: 27px; font-weight: 600; font-size: 10.5px; cursor: default; }
.c-P  { background: #dcfce7; color: #15803d; }
.c-A  { background: #fee2e2; color: #b91c1c; }
.c-H  { background: #fef3c7; color: #b45309; }
.c-L  { background: #dbeafe; color: #1d4ed8; }
.c-W  { background: #f1f5f9; color: #94a3b8; }
.c-HO { background: #ede9fe; color: #6d28d9; }
.c-M  { background: #ffedd5; color: #c2410c; }
.c-D  { background: #ccfbf1; color: #0f766e; }
.c-N  { background: var(--surface); color: var(--text-faint); }

.legend { display: flex; gap: 13px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); padding: 11px 17px; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-swatch { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--border); }

/* ---------------- misc ---------------- */
.stack { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.hidden { display: none !important; }

.bar { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

.trend-chart { display: flex; align-items: flex-end; gap: 5px; height: 132px; padding: 8px 0; }
.trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; }
.trend-col .seg { border-radius: 2px 2px 0 0; min-height: 2px; }
.trend-col .seg.p { background: #22c55e; }
.trend-col .seg.a { background: #ef4444; }
.trend-col .seg.l { background: #3b82f6; }
.trend-col .lbl { font-size: 9.5px; color: var(--text-faint); text-align: center; margin-top: 4px; white-space: nowrap; }

.map-canvas {
  width: 100%; height: 380px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden;
}

/* ---------------- toasts ---------------- */
.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 9999; display: grid; gap: 9px; max-width: 380px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--slate);
  border-radius: var(--radius-sm); padding: 11px 14px; box-shadow: var(--shadow-lg);
  animation: slide-in .2s ease-out; font-size: 13.5px;
}
.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.warn { border-left-color: #f59e0b; }
.toast b { display: block; margin-bottom: 2px; }
@keyframes slide-in { from { transform: translateX(18px); opacity: 0; } }

/* ---------------- modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 18px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; animation: pop .16s ease-out;
}
.modal.wide { max-width: 940px; }
.modal.narrow { max-width: 420px; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } }
.modal-head { padding: 15px 19px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 16px; }
.modal-head .x { margin-left: auto; border: 0; background: none; font-size: 21px; cursor: pointer; color: var(--text-faint); line-height: 1; padding: 0 4px; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 19px; max-height: 68vh; overflow-y: auto; }
.modal-foot { padding: 13px 19px; border-top: 1px solid var(--border); display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------------- permission matrix ---------------- */
.perm-module { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 11px; overflow: hidden; }
.perm-module-head {
  padding: 9px 13px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px;
}
.perm-list { padding: 9px 13px; display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 4px 15px; }
.perm-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.perm-item input { margin: 3px 0 0; }
.perm-item .pi-name { font-size: 13px; }
.perm-item .pi-desc { font-size: 11.5px; color: var(--text-muted); }

/* ---------------- approval item ---------------- */
.appr-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 11px; background: var(--surface); }
.appr-item .top { display: flex; gap: 12px; align-items: flex-start; }
.appr-item .info { flex: 1; min-width: 0; }
.appr-item .who { font-weight: 600; }
.appr-item .what { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.appr-item .meta { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }
.appr-item .acts { display: flex; gap: 7px; flex: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1000px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 15px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .punch-clock { font-size: 32px; }
}

@media print {
  .sidebar, .topbar, .filters, .btn, .toast-stack { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; }
}
