/* Palette and type mirror the S.P.S Financial Management Services website
   (website/index.html): navy + gold on ivory, Cormorant Garamond display over
   Inter body, 2px radii. Variable names are unchanged so the whole app picks
   the new brand up through the existing var() references. */
:root {
  --bg: #F4F2EB;          /* ivory page ground  (site --ink-2)  */
  --ink: #121C30;         /* body text          (site --text)   */
  --muted: #4C5668;       /* secondary text     (site --muted)  */
  --muted-2: #7C8497;
  --line: rgba(142,111,49,.26);      /* gold-tinted hairline    */
  --line-soft: rgba(18,28,48,.11);
  --panel: #FFFFFF;
  --panel-2: #FAF8F2;     /* warm panel tint    (site --panel-2)*/
  --navy: #0C1526;        /* sidebar / dark ground                */
  --navy-2: #121C30;
  --gold: #A8862F;
  --gold-lite: #C9A54F;
  --gold-deep: #7A5E22;
  --green: #12A150;
  --red: #B3261E;
  --amber: #9A6B1E;
  --blue: #2A4A7C;
  --violet: #6d4aa5;
  --radius: 2px;
  --shadow: 0 18px 40px rgba(24, 34, 56, 0.10);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Display type — matches the website's headings */
h1, h2, h3, .auth-copy h1, .kpi strong, .slip-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: .01em;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px 1fr;
}
.hidden { display: none !important; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(168,134,47,.16), transparent 42%),
    radial-gradient(circle at 82% 88%, rgba(12,21,38,.10), transparent 40%),
    linear-gradient(140deg, #FBFAF7, #F0EDE3);
}
.auth-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(18, 28, 48, .13);
  padding: 32px 30px;
}
.auth-brand { color: var(--ink); border-bottom: 0; padding-bottom: 0; }
.auth-copy { margin: 22px 0 18px; }
.auth-copy h1 { font-size: 32px; margin: 0 0 6px; font-weight: 500; letter-spacing: .01em; }
.auth-copy p { color: var(--muted); margin: 0; font-size: 13px; }
.auth-form { display: grid; gap: 12px; }
.login-error { min-height: 18px; color: var(--red); margin: 0; }
.topbar-actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.section-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.section-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.status-pill.present { color: var(--green); border-color: #b9dfca; background: #eefaf3; }
.status-pill.absent { color: var(--red); border-color: #efc5bf; background: #fff1ef; }
.status-pill.halfday { color: var(--amber); border-color: #f1dbb4; background: #fff7ea; }
.status-pill.pending { color: var(--muted); }
.doc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.subtext { color: var(--muted); font-size: 12px; margin-top: 4px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form > * { flex: 1 1 160px; }
.photo-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.photo-thumb.zoomable { cursor: zoom-in; }
.photo-thumb.zoomable:hover { border-color: var(--green); }
.photo-thumb.lg { width: 132px; height: 132px; }

/* Conveyance -------------------------------------------------------------- */
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-figure { margin: 0; text-align: center; }
.photo-figure figcaption { color: var(--muted); font-size: 11px; margin-top: 4px; }
.form-msg { color: var(--muted); font-size: 13px; margin-left: 8px; }
.warn-text { color: var(--amber); }

.check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.check-line input[type="checkbox"] { width: 16px; height: 16px; flex: none; }

/* Salary slip preview inside the modal ------------------------------------ */
.slip-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: #fff;
  font-size: 13px;
}
.slip-preview .slip-head { text-align: center; border-bottom: 2px solid var(--navy-2); padding-bottom: 12px; margin-bottom: 14px; }
.slip-preview .slip-head h1 { font-size: 17px; margin: 0 0 4px; color: var(--navy-2); }
.slip-preview .slip-head p { margin: 0; color: var(--muted); }
.slip-preview h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 18px 0 6px; }
.slip-preview table { width: 100%; border-collapse: collapse; min-width: 0; }
.slip-preview .meta-grid td { padding: 5px 8px; border: 1px solid #e6ecef; }
.slip-preview .meta-grid td:nth-child(odd) { background: var(--panel-2); color: var(--muted); }
.slip-preview .slip-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f4; }
.slip-preview .slip-table .num { text-align: right; white-space: nowrap; }
.slip-preview .slip-table tr.total td { border-top: 2px solid var(--navy-2); border-bottom: 0; font-weight: 700; background: var(--panel-2); }
.slip-preview .slip-table.net tr.total td { font-size: 15px; background: #FAF6EC; }
.slip-preview .ok { color: var(--green); }
.slip-preview .bad { color: var(--red); }
.slip-preview .slip-note { margin-top: 20px; font-size: 11px; color: var(--muted); text-align: center; }

.conv-strip { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.conv-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fff;
  font-size: 13px;
}

.photo-viewer {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(92vw, 900px);
  background: #fff;
}
.photo-viewer::backdrop { background: rgba(10, 20, 26, .72); }
.photo-viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.photo-viewer img {
  display: block;
  max-width: min(92vw, 900px);
  max-height: 78vh;
  object-fit: contain;
}

button, input, select, textarea { font: inherit; }
button, .import-label, .import-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  min-height: 36px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .01em;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
button:hover, .import-label:hover, .import-action:hover { border-color: var(--gold); }
/* Matches the website's .btn--solid gold gradient */
button.primary {
  background: linear-gradient(100deg, var(--gold-deep), var(--gold));
  border-color: transparent;
  color: #07090F;
  font-weight: 600;
}
button.primary:hover { background: linear-gradient(100deg, var(--gold), var(--gold-lite)); }
button.danger { color: var(--red); border-color: rgba(179,38,30,.32); }
button.ghost { background: transparent; }

.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 18px;
  background: var(--navy);
  color: #FBFAF7;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(168,134,47,.22);
}
/* ─── S·P·S wordmark ────────────────────────────────────────────────────────
   Same lockup as the company website: Cormorant caps separated by small
   diamonds, a fading rule, then a letterspaced line beneath. Monochrome —
   it takes its colour from whatever it sits on. */
.brand-txt { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.brand-word {
  display: flex; align-items: center; gap: .145em;
  font-family: var(--serif); font-weight: 700; font-size: 1.62rem; line-height: 1;
  color: var(--ink); white-space: nowrap;
}
.brand-word i { font-style: normal; letter-spacing: .015em; }
.brand-word b {
  display: block; width: .13em; height: .13em; flex-shrink: 0;
  background: rgba(18,28,48,.42); transform: rotate(45deg);
}
.brand-rule {
  display: block; height: 1px; width: 100%;
  background: linear-gradient(90deg, rgba(18,28,48,.30) 0%, rgba(18,28,48,.14) 55%, rgba(18,28,48,.03) 100%);
}
.brand-txt small {
  display: block; font-size: .5rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted-2); line-height: 1; white-space: nowrap;
}

.brand { display: flex; align-items: center; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
/* On the navy sidebar and loading screen the mark reverses to white */
.sidebar .brand-word, #app-loading .brand-word { color: #fff; }
.sidebar .brand-word b, #app-loading .brand-word b { background: rgba(255,255,255,.45); }
.sidebar .brand-rule, #app-loading .brand-rule {
  background: linear-gradient(90deg, rgba(255,255,255,.38), rgba(255,255,255,.04));
}
.sidebar .brand-txt small, #app-loading .brand-txt small { color: rgba(255,255,255,.60); }
.brand-sub { margin: -6px 0 0; color: rgba(255,255,255,.42); font-size: 11px; letter-spacing: .02em; }
nav { display: grid; gap: 2px; }
nav button {
  border: 0;
  color: rgba(251,250,247,.72);
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  border-radius: 0;
  border-left: 2px solid transparent;
  font-size: 13px;
  letter-spacing: .02em;
}
nav button:hover { background: rgba(251,250,247,.05); color: #fff; }
nav button.active {
  background: rgba(168,134,47,.14);
  border-left-color: var(--gold-lite);
  color: #fff;
}
.storage-card {
  margin-top: auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 8px;
  color: rgba(251,250,247,.72);
}
.storage-card button, .storage-card .import-label { width: 100%; text-align: center; }
.import-label input, .import-action input { display: none; }
.import-action { display: inline-grid; place-items: center; }

main { min-width: 0; }
.topbar {
  min-height: 92px;
  padding: 20px 28px;
  background: rgba(245, 247, 248, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
h1 { margin: 0; font-size: 25px; letter-spacing: 0; }
h2 { margin: 0 0 12px; font-size: 19px; }
h3 { margin: 0 0 8px; font-size: 15px; }
p { margin: 4px 0 0; color: var(--muted); }
.month-picker { display: grid; gap: 4px; min-width: 190px; }
.month-picker label, .field label { color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  min-height: 36px;
  padding: 8px 10px;
}
input[type="checkbox"] { width: auto; min-height: auto; padding: 0; }
textarea { min-height: 86px; resize: vertical; }

#view { padding: 24px 28px 42px; display: grid; gap: 18px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Keep row action buttons readable instead of wrapping mid-label */
td.actions > button { white-space: nowrap; }
.kpi { display: grid; gap: 6px; min-height: 112px; }
.kpi span { color: var(--muted); }
.kpi strong { font-size: clamp(20px, 2.4vw, 32px); }
.kpi small { color: var(--muted); }
.kpi.clickable { cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.kpi.clickable:hover { transform: translateY(-1px); border-color: var(--gold); }
.positive { color: var(--green); }
.negative { color: var(--red); }
.warning { color: var(--amber); }
.blue { color: var(--blue); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--panel-2); color: #34434d; font-size: 12px; position: sticky; top: 0; z-index: 1; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--panel-2);
  color: #33434c;
  font-size: 12px;
  white-space: nowrap;
}
.tag.ok { color: var(--green); background: #e7f5ee; }
.tag.bad { color: var(--red); background: #fff0ee; }
.tag.warn { color: var(--amber); background: #fff5e6; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field.full, .form-grid > .full { grid-column: 1 / -1; }
.empty {
  border: 1px dashed #b9c5cc;
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.chart {
  height: 240px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 14px 6px 4px;
  border-bottom: 1px solid var(--line);
}
.bar-group { flex: 1; min-width: 42px; display: grid; gap: 6px; align-items: end; grid-template-columns: repeat(3, 1fr); height: 100%; }
.bar { border-radius: 2px 2px 0 0; min-height: 2px; }
.bar.rev { background: var(--green); }
.bar.exp { background: var(--amber); }
.bar.profit { background: var(--blue); }
.chart-labels { display: flex; justify-content: space-around; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

dialog { width: min(760px, calc(100vw - 28px)); border: 0; border-radius: var(--radius); box-shadow: 0 26px 70px rgba(0,0,0,.26); padding: 0; }
dialog::backdrop { background: rgba(15, 23, 30, .44); }
dialog header, dialog footer { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
dialog footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
#modalBody { padding: 16px; max-height: 70vh; overflow: auto; }
.icon-btn { width: 36px; padding: 0; }

/* ── Cash Flow bars ── */
.cf-bar-wrap { display:flex; align-items:center; gap:12px; margin:8px 0; }
.cf-label    { width:72px; color:var(--muted); font-size:12px; flex-shrink:0; text-align:right; }
.cf-track    { flex:1; background:var(--panel-2); border-radius: var(--radius); height:34px; overflow:hidden; }
.cf-bar      { height:34px; border-radius: var(--radius); display:flex; align-items:center; padding:0 12px;
               transition:width .4s ease; min-width:4px; }
.cf-bar.cf-in  { background:var(--green); color:#fff; }
.cf-bar.cf-out { background:var(--amber); color:#fff; }
.cf-bar span   { font-size:12px; white-space:nowrap; font-weight:600; }

/* ── Compact date inputs in payroll payment tracker ── */
.input-small { min-height:30px; padding:4px 8px; font-size:12px; }

/* ── Payment summary bar in payroll ── */
.payment-summary {
  display:flex; gap:24px; padding:12px 16px;
  background:var(--panel-2); border-radius: var(--radius); margin-top:12px;
  font-size:13px; color:var(--muted); flex-wrap:wrap;
}
.payment-summary strong { font-size:15px; }

/* ── Mini bar for client analysis share column ── */
.mini-bar-wrap { display:flex; align-items:center; gap:8px; }
.mini-bar      { height:8px; background:var(--amber); border-radius: var(--radius); min-width:2px; max-width:120px; }
.mini-bar-wrap span { font-size:12px; color:var(--muted); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .form-grid, .two-col { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Mobile support — off-canvas sidebar drawer + touch-friendly layout
   ══════════════════════════════════════════════════════════════════════════ */
.menu-toggle { display: none; }
.sidebar-overlay { display: none; }
.topbar-title { min-width: 0; }

@media (max-width: 980px) {
  /* ── Sidebar becomes a slide-in drawer ── */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform .25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 44px rgba(0, 0, 0, .4);
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(15, 23, 30, .45);
  }
  .app-shell.nav-open .sidebar-overlay { display: block; }

  nav { grid-template-columns: 1fr; }
  nav button { min-height: 44px; }

  /* ── Hamburger button ── */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    font-size: 20px;
    flex-shrink: 0;
    padding: 0;
  }

  /* ── Topbar: hamburger + title on one row, month picker below ── */
  .topbar {
    position: sticky; top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 10px 14px;
    min-height: 0;
  }
  .topbar-title { flex: 1; }
  .topbar h1 { font-size: 19px; }
  .topbar p  { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { width: 100%; }
  .month-picker { min-width: 0; flex: 1; }

  /* ── Content spacing ── */
  #view { padding: 16px 14px calc(42px + env(safe-area-inset-bottom)); gap: 14px; }
  .panel { padding: 13px; }

  /* ── KPI cards: 2-up instead of stacked ── */
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 92px; }

  /* ── 16px inputs prevent iOS auto-zoom on focus; bigger touch targets ── */
  input, select, textarea { font-size: 16px; min-height: 44px; }
  button, .import-label, .import-action { min-height: 44px; }
  .input-small { min-height: 38px; font-size: 14px; }

  /* ── Tables scroll horizontally inside their card ── */
  .table-wrap { -webkit-overflow-scrolling: touch; max-width: 100%; }
  table { min-width: 640px; }
  th, td { padding: 8px; font-size: 13px; }
  td { vertical-align: middle; }
  .table-wrap input, .table-wrap select, .table-wrap button { min-height: 36px; font-size: 14px; }

  /* ── Modal dialog: near-fullscreen ── */
  dialog {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 24px);
  }
  #modalBody { max-height: calc(100dvh - 180px); }
  .form-grid { grid-template-columns: 1fr; }

  /* ── Charts and summaries ── */
  .chart { height: 190px; overflow-x: auto; }
  .bar-group { min-width: 34px; }
  .payment-summary { gap: 12px 20px; padding: 10px 12px; }
  .cf-label { width: 56px; }

  /* ── Auth screen ── */
  .auth-screen { padding: 16px; }
  .auth-card { padding: 20px; }
  .auth-copy h1 { font-size: 24px; }
}

/* Very small phones: single-column KPIs */
@media (max-width: 480px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .kpi { min-height: 0; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .actions { width: 100%; }
  .actions > * { flex: 1; }
}

/* Billing "All months" toggle & helper caption */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d5deda;
  border-radius: var(--radius);
  background: #f5faf7;
  font-size: 13px;
  color: var(--navy-2);
  cursor: pointer;
  user-select: none;
}
.switch input {
  width: 16px; height: 16px;
  accent-color: var(--navy-2);
  margin: 0;
}
.muted { color: #687782; font-size: 13px; }

/* Info banner for auto-computed payroll notice */
.banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 4px;
}
.banner-info {
  background: #FAF6EC;
  color: var(--navy-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
}

/* ─── Employee home — attendance / conveyance / leave quick actions ─── */
.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.today-status {
  padding: 10px 16px;
  border-radius: var(--radius);
  background: #f5faf7;
  border: 1px solid #d5deda;
  display: flex; flex-direction: column;
  align-items: flex-end;
  min-width: 140px;
}
.today-status small { color: #687782; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.today-status strong { font-size: 16px; color: var(--navy-2); margin-top: 2px; }
.today-status.present { background: #e6f5ec; border-color: #7cc39c; }
.today-status.present strong { color: #1c6a3f; }
.today-status.halfday { background: #fff4dd; border-color: #e6b972; }
.today-status.halfday strong { color: #8a5b13; }
.today-status.leave   { background: #eaf1fb; border-color: #7fa5d6; }
.today-status.leave   strong { color: #234b83; }
.today-status.absent  { background: #fbe7e7; border-color: #d47f7f; }
.today-status.absent  strong { color: #8a2323; }
.today-status.pending { background: #f0f0f0; border-color: #cfcfcf; }
.today-status.pending strong { color: #555; }

.attendance-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.att-card {
  border: 2px solid #d5deda;
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 12px;
  min-height: 100px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  color: var(--navy-2);
  font-weight: 600;
}
.att-card:hover { transform: translateY(-1px); }
.att-card .att-icon { font-size: 26px; line-height: 1; }
.att-card .att-label { font-size: 14px; }
.att-card.present { border-color: #7cc39c; }
.att-card.present.active { background: #1c6a3f; color: #fff; border-color: #1c6a3f; }
.att-card.halfday { border-color: #e6b972; }
.att-card.halfday.active { background: #b3800e; color: #fff; border-color: #b3800e; }
.att-card.leave   { border-color: #7fa5d6; }
.att-card.leave.active   { background: #234b83; color: #fff; border-color: #234b83; }
.att-card.absent  { border-color: #d47f7f; }
.att-card.absent.active  { background: #8a2323; color: #fff; border-color: #8a2323; }
.att-card.locked {
  opacity: .55;
  cursor: not-allowed;
  background: #fafcfc;
}
.att-card.locked:hover { transform: none; }
.att-lock-note {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* Marked-present timestamp badge, shown next to attendance status pills */
.marked-time { color: var(--muted); font-weight: 500; }

/* Blocking conveyance gate — an amber banner-style panel that stands in for
   the attendance cards until the previous day's odometer entry is closed. */
.banner-warn-panel {
  border: 1px solid #e6b972;
  background: #fff8ea;
  border-radius: var(--radius);
}
.banner-warn-panel h2 { color: #8a5b13; margin-top: 0; }

.upcoming-leaves {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d5deda;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--navy-2);
}
.tag.leave {
  background: #eaf1fb;
  color: #234b83;
  border: 1px solid #7fa5d6;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .attendance-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-card { min-height: 84px; padding: 14px 10px; }
  .welcome-panel { flex-direction: column; align-items: stretch; }
  .today-status { align-items: flex-start; }
}

@media (max-width: 980px) {
  .switch { flex: 1; justify-content: center; min-height: 40px; }
}
