/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

:root {
  --bg:        #f4f6fa;
  --white:     #ffffff;
  --border:    #e4e9f2;
  --border2:   #cdd5e4;
  --text:      #1a2236;
  --muted:     #6b7a96;
  --light:     #aab4c8;
  --accent:    #7CBC44;
  --acc-dark:  #5D9A2E;
  --acc-light: #EFF7E6;
  --green:     #059669;
  --grn-light: #ecfdf5;
  --amber:     #d97706;
  --amb-light: #fffbeb;
  --red:       #dc2626;
  --red-light: #fef2f2;
  --shadow:    0 2px 14px rgba(26,34,54,.08);
  --shadow-md: 0 4px 28px rgba(26,34,54,.13);
  --r:         14px;
  --r-sm:      10px;
  --sans:      'Nunito Sans', sans-serif;
  --head:      'Nunito', sans-serif;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Login Screen ── */
#login-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-logo {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
}
.login-logo svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.login-title { font-family: var(--head); font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.login-title span { color: var(--accent); }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; line-height: 1.5; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  background: var(--white); border: 1.5px solid var(--border2);
  border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--text);
  transition: all .18s; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.google-btn:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(37,99,235,.15); }
.google-btn svg { flex-shrink: 0; }
.login-note { font-size: 11px; color: var(--light); margin-top: 16px; }

/* ── App Shell (hidden until logged in) ── */
#app { display: none; flex-direction: column; flex: 1; }

/* ── Top Nav ── */
.topnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-dot {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(124,188,68,.35);
}
.nav-dot svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-wordmark { font-family: var(--head); font-weight: 800; font-size: 16px; color: var(--text); }
.nav-wordmark span { color: var(--accent); }
.nav-tabs { display: flex; gap: 3px; }
.nav-tab {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 7px 16px; border-radius: 9px;
  border: none; background: none; cursor: pointer; transition: all .15s;
}
.nav-tab:hover { color: var(--text); background: var(--bg); }
.nav-tab.active { color: var(--accent); background: var(--acc-light); }
.nav-tab.hidden { display: none; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; transition: all .15s;
}
.user-pill:hover { border-color: var(--border2); }
.user-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #7CBC44, #5D9A2E);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 700; font-size: 10px; color: #fff;
}
.user-name { font-size: 12px; font-weight: 600; }
.logout-btn {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: all .15s;
}
.logout-btn:hover { color: var(--red); background: var(--red-light); }
.hide-amt-btn {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: none; border: 1px solid var(--border); cursor: pointer;
  padding: 4px 10px; border-radius: 6px; transition: all .15s; white-space: nowrap;
}
.hide-amt-btn:hover { border-color: var(--border2); color: var(--text); }
body.hide-amounts .hide-amt-btn { background: var(--acc-light); border-color: var(--accent); color: var(--accent); }

/* ── Hide amounts mode ── */
body.hide-amounts #stat-forecast,
body.hide-amounts #stat-bonus,
body.hide-amounts #stat-advance,
body.hide-amounts #total-amt,
body.hide-amounts .brow-amt,
body.hide-amounts .emp-amt,
body.hide-amounts #ts-se,
body.hide-amounts .adv-cell,
body.hide-amounts .ts-card-rate,
body.hide-amounts .brow-sub,
body.hide-amounts .dline-amt,
body.hide-amounts .dline-total { filter: blur(8px); user-select: none; pointer-events: none; }

/* ── Page content wrapper ── */
.page { display: none; flex: 1; padding: 24px 28px; max-width: 1100px; margin: 0 auto; width: 100%; }
.page.active { display: block; }

/* ── Section label ── */
.sec-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--head); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  margin-bottom: 10px;
}
.sec-label::before {
  content: ''; display: block;
  width: 3px; height: 14px;
  background: var(--accent); border-radius: 2px;
}

/* ── Month pills ── */
.month-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.mpill {
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border2);
  background: var(--white); color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.mpill:hover { border-color: var(--accent); color: var(--accent); }
.mpill.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; box-shadow: 0 2px 10px rgba(37,99,235,.28);
}

/* ── Stat cards ── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--light); margin-bottom: 6px; }
.stat-val { font-family: var(--head); font-size: 26px; font-weight: 800; }
.stat-val.blue { color: var(--accent); }
.stat-val.green { color: var(--green); }
.stat-val.red { color: var(--red); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── Breakdown card ── */
.bcard {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.bcard-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--head); font-size: 14px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.tag {
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; background: var(--grn-light); color: var(--green);
}
.tag.pending { background: var(--amb-light); color: var(--amber); }
.brow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.brow:last-child { border-bottom: none; }
.brow:hover { background: var(--bg); }
.brow-left { display: flex; align-items: center; gap: 12px; }
.brow-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.brow-title { font-size: 13px; font-weight: 600; }
.brow-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.brow-right { text-align: right; }
.brow-amt { font-family: var(--head); font-size: 15px; font-weight: 800; }
.brow-amt.g { color: var(--green); }
.brow-amt.r { color: var(--red); }
.brow-bar { height: 3px; border-radius: 2px; margin-top: 5px; min-width: 48px; }

/* ── Total strip ── */
.total-strip {
  background: var(--accent); border-radius: var(--r);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 20px rgba(37,99,235,.32);
  margin-bottom: 16px;
}
.total-lbl { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); }
.total-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 3px; }
.total-amt { font-family: var(--head); font-size: 30px; font-weight: 800; color: #fff; }

/* ── Buttons ── */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  padding: 10px 20px; border-radius: var(--r-sm);
  border: none; cursor: pointer; transition: all .16s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(124,188,68,.3); }
.btn-primary:hover { background: var(--acc-dark); }
.btn-ghost { background: var(--white); color: var(--muted); border: 1.5px solid var(--border2); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

/* ── Admin page ── */
.adm-toprow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.adm-title { font-family: var(--head); font-size: 18px; font-weight: 800; }
.adm-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.close-btn {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--r-sm); padding: 10px 20px;
  cursor: pointer; transition: all .16s;
}
.close-btn:hover { background: var(--acc-dark); }
.close-btn.is-closed {
  background: var(--amb-light); color: var(--amber);
  border: 1.5px solid var(--amber);
}
.close-btn.is-closed:hover { background: #fef3c7; }

/* locked card overlay */
.ts-card-wrap { position: relative; }
.ts-card-locked-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(255,255,255,.82); backdrop-filter: blur(3px);
  border-radius: var(--r); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.ts-card-locked-overlay span:first-child { font-size: 20px; }
.ts-card-locked-overlay span:last-child { font-size: 12px; font-weight: 600; color: var(--muted); }

.sum-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.sum-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow);
}
.sum-n { font-family: var(--head); font-size: 24px; font-weight: 800; }
.sum-l { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; }

.filter-row { display: flex; gap: 6px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.fpill {
  font-size: 12px; font-weight: 600; padding: 6px 14px;
  border-radius: 20px; border: 1.5px solid var(--border2);
  background: var(--white); color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.fpill:hover { border-color: var(--accent); color: var(--accent); }
.fpill.active { background: var(--acc-light); border-color: var(--accent); color: var(--accent); }
.total-fund {
  margin-left: auto; font-family: var(--head);
  font-size: 14px; font-weight: 800; color: var(--accent);
}

/* Staff table */
.staff-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
}
.tbl-head {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.4fr 1fr 0.8fr;
  padding: 10px 18px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.tbl-head span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--light); }
.trow {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.4fr 1fr 0.8fr;
  align-items: center; padding: 12px 18px;
  border-bottom: 1px solid var(--border); transition: background .12s; cursor: pointer;
}
.trow-wrap:last-child { border-bottom: none; }
.trow:hover { background: var(--acc-light); }
.trow.sel { background: var(--acc-light); }
.emp-info { display: flex; align-items: center; gap: 10px; }
.mini-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 700; font-size: 11px; color: #fff; flex-shrink: 0;
}
.emp-name { font-size: 13px; font-weight: 600; }
.emp-role { font-size: 11px; color: var(--muted); margin-top: 1px; }
.emp-amt { font-family: var(--head); font-size: 14px; font-weight: 800; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.pill.ok  { background: var(--grn-light); color: var(--green); }
.pill.wait { background: var(--amb-light); color: var(--amber); }
.pill.bad { background: var(--red-light); color: var(--red); }
.days-wrap { display: flex; align-items: center; gap: 8px; }
.mini-bar-bg { width: 50px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 2px; }
.days-txt { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── Loading spinner ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty / error states ── */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.empty-state .icon { font-size: 36px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ══ TIMESHEET STYLES ══════════════════════════════════ */
.ts-legend{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;align-items:center;}
.ts-leg{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--muted);
  background:var(--white);border:1px solid var(--border);padding:4px 11px;border-radius:20px;}
.ts-leg-sq{width:10px;height:10px;border-radius:3px;flex-shrink:0;}

.ts-sumbar{background:var(--white);border:1px solid var(--border);border-radius:var(--r);
  padding:13px 18px;display:flex;align-items:center;justify-content:space-evenly;
  box-shadow:var(--shadow);margin-bottom:16px;gap:8px;flex-wrap:wrap;}
.ts-si{text-align:center;min-width:56px;}
.ts-sv{font-family:var(--head);font-size:21px;font-weight:800;}
.ts-sl{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--light);margin-top:2px;}
.ts-sdiv{width:1px;height:32px;background:var(--border);}

.ts-card{background:var(--white);border:1px solid var(--border);border-radius:var(--r);
  overflow:hidden;box-shadow:var(--shadow);margin-bottom:12px;}
.ts-card-head{padding:12px 16px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;}
.ts-card-left{display:flex;align-items:center;gap:8px;}
.ts-badge{font-size:10px;font-weight:700;padding:3px 9px;border-radius:20px;
  background:var(--acc-light);color:var(--acc-dark);text-transform:uppercase;letter-spacing:.04em;}
.ts-badge-stake{background:var(--acc-light);color:var(--acc-dark);}
.ts-badge-hourly{background:#eff4ff;color:#2563eb;}
.ts-badge-individual{background:var(--amb-light,#fffbeb);color:var(--amber);}
.ts-badge-group{background:#f0fdf4;color:#15803d;}
.ts-badge-substitute{background:#fdf4ff;color:#7e22ce;}
.ts-badge-special{background:#fff1f2;color:#be123c;}
.ts-badge-project{background:#f0f9ff;color:#0369a1;}
.ts-badge-mentor{background:#f5f3ff;color:#6d28d9;}
.ts-card-name{font-size:13px;font-weight:700;}
.ts-card-rate{font-size:12px;color:var(--muted);}
.ts-card-reset{font-size:11px;font-weight:600;color:var(--muted);background:none;border:1px solid var(--border);
  border-radius:20px;padding:3px 10px;cursor:pointer;transition:color .15s,border-color .15s;}
.ts-card-reset:hover{color:var(--red);border-color:var(--red);}
.ts-card-body{padding:14px 16px;}

.ts-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}
.ts-cal-th{text-align:center;font-size:10px;font-weight:700;text-transform:uppercase;
  letter-spacing:.05em;color:var(--light);padding-bottom:5px;}
.ts-cal-th.we{color:var(--border2);}
.ts-cal-empty{border-radius:9px;}
.ts-cal-sep{grid-column:1/-1;height:1px;background:var(--border);margin:3px 0;}

/* stake cells */
.dc{width:100%;border-radius:9px;border:1.5px solid var(--border2);
  background:var(--white);flex-shrink:0;overflow:hidden;transition:border-color .12s;}
.dc.we{opacity:.35;background:var(--bg);}/* weekend: clickable for stake type */
.dc-num{height:26px;display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;color:var(--muted);
  transition:background .12s,color .12s;border-bottom:1px solid var(--border);}
.dc.work{border-color:var(--accent);}
.dc.work .dc-num{background:var(--accent);color:#fff;border-bottom-color:rgba(255,255,255,.15);}
.dc.sick{border-color:#fcd34d;}
.dc.sick .dc-num{background:var(--amb-light,#fffbeb);color:#92400e;border-bottom-color:#fcd34d;}
.dc.absent{border-color:#fca5a5;}
.dc.absent .dc-num{background:var(--red-light,#fef2f2);color:#991b1b;border-bottom-color:#fca5a5;}
.dc.absent.nonote .dc-num::after{content:'●';font-size:6px;color:var(--red);vertical-align:super;margin-left:1px;}
.dc-seg{display:flex;height:22px;}
.dcb{flex:1;border:none;background:transparent;cursor:pointer;font-size:11px;
  display:flex;align-items:center;justify-content:center;
  border-right:1px solid var(--border);transition:background .12s;padding:0;font-family:var(--sans);}
.dcb:last-child{border-right:none;}
.dcb:hover{background:var(--bg);}
.dc.sick  .dcb.bs{background:rgba(217,119,6,.15);}
.dc.absent .dcb.ba{background:rgba(220,38,38,.12);}
.dc.sick   .dcb{border-right-color:#fcd34d;}
.dc.absent .dcb{border-right-color:#fca5a5;}

/* numeric cells — value always visible */
.nc{width:100%;border-radius:9px;border:1.5px solid var(--border2);
  background:var(--white);flex-shrink:0;overflow:hidden;transition:border-color .12s;
  display:flex;flex-direction:column;}
.nc.we{opacity:.3;pointer-events:none;background:var(--bg);}
.nc.has-val{border-color:var(--accent);}
.nc.has-val .nc-num{background:var(--accent);color:#fff;}
.nc-num{height:30px;display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:800;color:var(--muted);border-bottom:1px solid var(--border);
  transition:background .12s,color .12s;}
.nc-row{display:flex;align-items:stretch;flex:1;}
.nc-btn{flex:0 0 20px;border:none;background:transparent;cursor:pointer;font-size:15px;
  font-weight:700;color:var(--muted);transition:background .12s;padding:0;font-family:var(--sans);
  border-right:1px solid var(--border);}
.nc-btn:last-child{border-right:none;border-left:1px solid var(--border);}
.nc-btn:hover{background:var(--bg);color:var(--text);}
.nc-count{flex:1;display:flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:800;color:var(--text);}
.nc.has-val .nc-count{color:var(--acc-dark);}
.nc-note-btn{width:100%;border:none;border-top:1px solid var(--border);background:transparent;
  cursor:pointer;font-size:12px;padding:2px 0;color:var(--muted);transition:background .12s;}
.nc-note-btn:hover{background:var(--bg);color:var(--text);}
.nc.has-note .nc-note-btn{color:var(--accent);}

/* absence note popup */
.ts-note-popup{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,.4);padding:16px;}
.ts-note-popup.open{display:flex;}
.ts-note-card{background:var(--white);border-radius:16px;padding:20px;width:100%;max-width:360px;
  box-shadow:0 8px 32px rgba(0,0,0,.2);}
.ts-note-card-title{font-family:var(--head);font-size:15px;font-weight:800;
  margin-bottom:12px;color:var(--slate);}
.ts-note-inp{width:100%;border:1.5px solid var(--border);border-radius:9px;padding:10px 12px;
  font-family:var(--sans);font-size:14px;outline:none;transition:border-color .15s;box-sizing:border-box;}
.ts-note-inp:focus{border-color:var(--accent);}
.ts-note-inp.req{border-color:var(--red);background:var(--red-light,#fef2f2);}
.ts-note-btns{display:flex;gap:8px;margin-top:12px;justify-content:flex-end;}

/* criteria block */
.ts-crit{background:var(--white);border:1px solid var(--border);border-radius:var(--r);
  padding:16px;box-shadow:var(--shadow);margin-bottom:12px;}
.ts-crit-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:12px;}
.ts-crit-toggles{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;}
.ts-ctog{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:20px;
  border:1.5px solid var(--border2);cursor:pointer;font-size:12px;font-weight:600;
  color:var(--muted);background:var(--white);transition:all .15s;user-select:none;}
.ts-ctog.on{border-color:var(--accent);background:var(--acc-light);color:var(--acc-dark);}
.ts-ctog-dot{width:8px;height:8px;border-radius:50%;background:var(--border2);transition:background .15s;}
.ts-ctog.on .ts-ctog-dot{background:var(--accent);}
.ts-olymp{display:flex;align-items:center;gap:8px;margin-bottom:12px;}
.ts-olymp-label{font-size:12px;font-weight:600;color:var(--muted);}
.ts-olymp-count{display:flex;align-items:center;gap:6px;}
.ts-olymp-btn{width:28px;height:28px;border-radius:50%;border:1.5px solid var(--border2);
  background:var(--white);cursor:pointer;font-size:16px;font-weight:700;color:var(--muted);
  display:flex;align-items:center;justify-content:center;transition:all .15s;}
.ts-olymp-btn:hover{border-color:var(--accent);color:var(--accent);}
.ts-olymp-val{font-size:15px;font-weight:800;color:var(--text);min-width:20px;text-align:center;}
.ts-crit-ta{width:100%;border:1.5px solid var(--border);border-radius:10px;
  padding:10px 12px;font-family:var(--sans);font-size:13px;color:var(--text);
  resize:vertical;min-height:70px;margin-bottom:12px;outline:none;transition:border-color .15s;}
.ts-crit-ta:focus{border-color:var(--accent);}
.ts-crit-save{font-family:var(--sans);font-size:12px;font-weight:700;padding:8px 18px;
  border-radius:10px;border:none;cursor:pointer;background:var(--accent);color:#fff;transition:all .15s;}
.ts-crit-save:hover{background:var(--acc-dark);}
.ts-crit-msg{font-size:12px;font-weight:600;color:var(--green);display:none;margin-left:8px;}
.ts-crit-msg.on{display:inline;}

/* ── Employee detail expand ── */
.trow-wrap { border-bottom: 1px solid var(--border); }
.trow-wrap .trow { border-bottom: none; }
.trow-expand { display: none; background: var(--slate-light); padding: 0 18px 14px; }
.trow-expand.open { display: block; }

/* day grid per role */
.dexp-role { padding: 10px 0 6px; border-bottom: 1px solid var(--border); }
.dexp-role:last-of-type { border-bottom: none; }
.dexp-role-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.dexp-role-name { font-size: 12px; font-weight: 700; color: var(--text); }
.dexp-role-type { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 20px;
  background: var(--border); color: var(--muted); }
.day-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.dq { width: 22px; height: 26px; border-radius: 5px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 9px; font-weight: 700;
  line-height: 1; cursor: default; transition: opacity .1s; }
.dq-num { font-size: 8px; opacity: .7; }
.dq-we      { background: transparent; border: 1px solid var(--border); color: var(--muted); opacity: .4; }
.dq-we-full { background: #0ea5e9; color: #fff; opacity: 1; border: none; }
.dq-we-half { background: #7dd3fc; color: #0c4a6e; opacity: 1; border: none; }
.dq-empty { background: var(--border); color: var(--muted); }
.dq-work  { background: var(--accent); color: #fff; }
.dq-sick  { background: #fbbf24; color: #fff; }
.dq-absent{ background: var(--red,#ef4444); color: #fff; }
.dq-count { background: #7c3aed; color: #fff; }
.dq.editable { cursor: pointer; }
.dq.editable:hover { filter: brightness(1.15); }

/* ── Proxy Fill Cards ── */
.proxy-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.proxy-card-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.proxy-card-info { flex: 1; min-width: 0; }
.proxy-card-meta { text-align: right; flex-shrink: 0; }
.proxy-card-body { border-top: 1.5px solid var(--border); padding: 14px 16px; }
.proxy-role-row { margin-bottom: 14px; }
.proxy-role-row:last-of-type { margin-bottom: 0; }
.proxy-role-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }

/* comment block */
.dexp-comment { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 8px 12px; margin: 10px 0 4px; font-size: 12px; color: var(--text);
  white-space: pre-wrap; line-height: 1.5; }
.dexp-comment-lbl { display: block; font-size: 10px; font-weight: 700;
  color: #92400e; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

/* calculation lines */
.dlines { padding-top: 8px; }
.dline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.dline:last-child { border-bottom: none; }
.dline-title { font-size: 12px; font-weight: 600; color: var(--text); }
.dline-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.dline-amt { font-family: var(--head); font-size: 13px; font-weight: 700; white-space: nowrap; }
.dline-amt.g { color: var(--accent); } .dline-amt.r { color: var(--red); }
.dline-total { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 8px 0 2px; }
.dline-total-lbl { font-size: 11px; color: var(--muted); }
.dline-total-amt { font-family: var(--head); font-size: 16px; font-weight: 800; color: var(--accent); }
.dline-comment { font-size: 11px; color: var(--muted); padding: 6px 0 0; font-style: italic; }
.dline-loading { padding: 10px 0; text-align: center; color: var(--muted); font-size: 12px; }

/* criteria admin page */
.crit-card{background:var(--white);border:1px solid var(--border);border-radius:var(--r);
  padding:16px;box-shadow:var(--shadow);margin-bottom:12px;}
.crit-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.crit-emp-name{font-size:14px;font-weight:700;}
.crit-emp-note{font-size:12px;color:var(--amber);font-weight:600;margin-top:2px;}

/* Criteria admin compact table */
.crit-tbl{background:var(--white);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden;}
.crit-tbl-hdr,.crit-tbl-row{display:grid;grid-template-columns:170px 1fr 140px 200px 100px;align-items:center;gap:12px;padding:10px 16px;}
.crit-tbl-hdr{background:var(--bg);font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border);}
.crit-tbl-row{border-bottom:1px solid var(--border);transition:background .15s;}
.crit-tbl-row:last-child{border-bottom:none;}
.crit-col-name{min-width:0;}
.crit-dot-wrap{display:flex;flex-direction:column;align-items:center;gap:3px;}
.crit-dot{width:18px;height:18px;border-radius:50%;background:#e5e7eb;cursor:pointer;transition:background .15s;flex-shrink:0;}
.crit-dot.on{background:var(--green);}
.crit-dot:not(.on):hover{background:#9ca3af;}
.crit-note-inp{width:100%;font-family:var(--sans);font-size:12px;border:1px solid var(--border);border-radius:6px;padding:5px 8px;resize:none;min-height:38px;box-sizing:border-box;}
.crit-note-inp:focus{outline:none;border-color:var(--accent);}

.ts-srow{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:4px;}
.ts-sbtn{font-family:var(--sans);font-size:13px;font-weight:700;padding:11px 24px;
  border-radius:10px;border:none;cursor:pointer;
  background:var(--accent);color:#fff;
  box-shadow:0 2px 10px rgba(124,188,68,.3);transition:all .15s;}
.ts-sbtn:hover{background:var(--acc-dark);}
.ts-sbtn:disabled{opacity:.5;cursor:not-allowed;}
.ts-wmsg{font-size:12px;font-weight:600;color:var(--red);background:var(--red-light,#fef2f2);
  border:1px solid #fca5a5;padding:8px 12px;border-radius:8px;display:none;align-items:center;gap:5px;}
.ts-wmsg.on{display:flex;}
.ts-toast{font-size:12px;font-weight:600;color:var(--green);background:var(--grn-light,#ecfdf5);
  border:1px solid #6ee7b7;padding:8px 12px;border-radius:8px;display:none;align-items:center;gap:5px;}
.ts-toast.on{display:flex;}

/* locked banner */
.ts-locked-banner{background:var(--amb-light);border:1px solid #fcd34d;border-radius:var(--r-sm);
  padding:10px 16px;font-size:13px;font-weight:600;color:#92400e;margin-bottom:12px;}

/* saved lock overlay */
.ts-lock{position:relative;}
.ts-lock-overlay{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:12px;
  background:rgba(255,255,255,.75);backdrop-filter:blur(3px);border-radius:var(--r);}
.ts-lock-msg{font-size:15px;font-weight:700;color:var(--green);}
.ts-lock-btn{font-size:13px;font-weight:600;color:var(--muted);background:var(--white);
  border:1px solid var(--border2);border-radius:20px;padding:6px 18px;cursor:pointer;}
.ts-lock-btn:hover{border-color:var(--accent);color:var(--accent);}
/* ══ END TIMESHEET STYLES ══════════════════════════════ */

/* ── Responsive ── */
@media (max-width: 700px) {
  .topnav { padding: 0 16px; }
  .nav-tabs .nav-tab { padding: 6px 10px; font-size: 12px; }
  .page { padding: 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .sum-row { grid-template-columns: 1fr 1fr; }
  .tbl-head, .trow { grid-template-columns: 1.8fr 1.2fr 1fr; }
  .tbl-head span:nth-child(4), .trow > *:nth-child(4),
  .tbl-head span:nth-child(5), .trow > *:nth-child(5) { display: none; }
}

/* ── Staff search input ── */
.staff-search-inp {
  width: 100%; max-width: 400px;
  border: 1.5px solid var(--border2); border-radius: var(--r-sm);
  padding: 10px 14px; font-family: var(--sans); font-size: 13px; color: var(--text);
  background: var(--white); outline: none; margin-bottom: 16px;
  transition: border-color .15s;
}
.staff-search-inp:focus { border-color: var(--accent); }

/* ── Staff mgmt table ── */
.sm-tbl-head { display: grid; grid-template-columns: 2fr 2fr 1fr 0.5fr; padding: 10px 18px; background: var(--bg); border-bottom: 1px solid var(--border); }
.sm-tbl-head span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--light); }
.sm-trow { display: grid; grid-template-columns: 2fr 2fr 1fr 0.5fr; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.sm-trow:hover { background: var(--acc-light); }
.sm-trow-wrap:last-child .sm-trow { border-bottom: none; }
.sm-trow-expand { display: none; background: #f8faf5; padding: 0 18px 16px; border-bottom: 1px solid var(--border); }
.sm-trow-expand.open { display: block; }

/* ── Staff mgmt form fields ── */
.sm-field-lbl { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.form-inp {
  border: 1.5px solid var(--border2); border-radius: var(--r-sm);
  padding: 8px 12px; font-family: var(--sans); font-size: 13px; color: var(--text);
  background: var(--white); outline: none; transition: border-color .15s;
}
.form-inp:focus { border-color: var(--accent); }
select.form-inp { cursor: pointer; }

/* ── Rate item ── */
.sm-rate-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sm-rate-item:last-child { border-bottom: none; }
.sm-rate-role { font-size: 12px; font-weight: 700; flex: 1; min-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-rate-sel { font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.sm-rate-inp { width: 84px; font-size: 12px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-align: right; }
.sm-rate-del { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 4px; border-radius: 4px; transition: color .12s; }
.sm-rate-del:hover { color: var(--red); }

/* ── Status message ── */
.sm-msg { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; margin-top: 8px; display: none; }
.sm-msg-ok  { display: block; background: var(--grn-light); color: var(--green); }
.sm-msg-err { display: block; background: var(--red-light); color: var(--red); }

/* ── Form checks ── */
.form-checks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.45); align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open, .modal-overlay[style*="flex"] { display: flex; }
.modal-card {
  background: var(--white); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 420px; box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.modal-title { font-family: var(--head); font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.form-group .form-inp { width: 100%; }
.form-error { font-size: 12px; font-weight: 600; color: var(--red); background: var(--red-light); padding: 8px 10px; border-radius: 8px; margin-top: 8px; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* ── Weekend cells (stake) ── */
.dc.we .dc-num { cursor: pointer; }
.dc.we-half { opacity: 1; border-color: #ffdd33; }
.dc.we-half .dc-num { background: #fffde7; color: #5d4200; border-bottom-color: #ffdd33; }
.dc.we-full { opacity: 1; border-color: #395028; }
.dc.we-full .dc-num { background: #395028; color: #fff; border-bottom-color: rgba(255,255,255,.2); }
.dc-we-marker { font-size: 13px; font-weight: 800; text-align: center; padding: 3px 0;
  color: #5d4200; line-height: 1; }
.dc.we-full .dc-we-marker { color: #c8e6b0; }

/* ── Mark-all button ── */
.ts-mark-all-btn { margin-top: 8px; font-family: var(--sans); font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--accent);
  background: var(--acc-light); color: var(--acc-dark); cursor: pointer; transition: all .15s; }
.ts-mark-all-btn:hover { background: var(--accent); color: #fff; }

/* ── Mentee cards ── */
.ts-mentee-cards { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 30px; }
.mentee-chip { display: flex; align-items: center; gap: 5px;
  background: var(--acc-light); border: 1.5px solid var(--accent); border-radius: 20px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--acc-dark); }
.mentee-chip-del { border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 14px; font-weight: 800; line-height: 1; padding: 0 2px;
  transition: color .12s; }
.mentee-chip-del:hover { color: var(--red); }
.ts-mentee-add-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ts-mentor-count-lbl { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 4px; }

/* ── Individual lessons ── */
.ts-individual-block { padding: 2px 0; }
.ts-ind-list { display: flex; flex-direction: column; gap: 6px; }
.ts-ind-row { display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 7px 12px; }
.ts-ind-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
