/* ═══════════════════════════════════════════════
   NAIL TURN — International Standard Design
   Layout: Top Stats Bar + Sidebar + Main Content
   ═══════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg: #F4F4F6;
  --surface: #FFFFFF;
  --surface-2: #F8F8FA;
  --surface-3: #EFEFF2;

  /* Brand */
  --rose: #D4547A;
  --rose-2: #E8759A;
  --rose-dark: #B03060;
  --rose-bg: #FFF0F4;
  --rose-b: rgba(212,84,122,.20);

  /* Status colors */
  --c-ready: #16A34A;
  --c-ready-bg: #DCFCE7;
  --c-ready-b: rgba(22,163,74,.18);

  --c-busy: #D97706;
  --c-busy-bg: #FEF3C7;
  --c-busy-b: rgba(217,119,6,.22);

  --c-off: #94A3B8;
  --c-off-bg: #F1F5F9;
  --c-off-b: rgba(148,163,184,.22);

  --c-pen: #DC2626;
  --c-pen-bg: #FEE2E2;
  --c-pen-b: rgba(220,38,38,.20);

  /* Text */
  --t1: #0F0F12;
  --t2: #3D3D4E;
  --t3: #8080A0;
  --t4: #B0B0C8;

  /* Borders */
  --br: rgba(0,0,0,.06);
  --br2: rgba(0,0,0,.10);
  --br3: rgba(0,0,0,.16);

  /* Shadows */
  --s-xs: 0 1px 2px rgba(0,0,0,.05);
  --s-sm: 0 1px 4px rgba(0,0,0,.07), 0 0 0 .5px rgba(0,0,0,.04);
  --s-md: 0 4px 16px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.05);
  --s-lg: 0 12px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --s-popup: 0 20px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.10);

  /* Radii */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Motion */
  --ease: cubic-bezier(.16,1,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: -apple-system, 'Inter', BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--t1);
  height: 100%;
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; }

/* ── TOP STATS BAR ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--br);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--s-sm);
}
.topbar-inner {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  gap: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 24px;
}
.brand-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--rose-2), var(--rose-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(212,84,122,.30);
}
.brand-icon svg { width: 16px; height: 16px; color: #fff; }
.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--t1);
}

/* STAT PILLS in topbar */
.stat-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--br);
  background: var(--surface-2);
  white-space: nowrap;
}
.sp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-label { font-size: 11px; color: var(--t3); font-weight: 500; }
.sp-val {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1;
}
.sp-ready .sp-val { color: var(--c-ready); }
.sp-busy .sp-val { color: var(--c-busy); }
.sp-turns .sp-val { color: #7C6EBA; }
.sp-rev .sp-val { color: var(--c-ready); font-size: 14px; }
.sp-tip .sp-val { color: #3B82F6; font-size: 14px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.shift-tag {
  font-size: 11px; font-weight: 700;
  color: var(--rose);
  background: var(--rose-bg);
  border: 1px solid var(--rose-b);
  border-radius: 20px;
  padding: 4px 12px;
}
.clock-display {
  text-align: right;
}
.clock-time {
  font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1;
}
.clock-day {
  font-size: 10px; color: var(--t4);
  margin-top: 1px;
}

/* ── MAIN LAYOUT ── */
.app-body {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 72px;
  background: var(--surface);
  border-right: 1px solid var(--br);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 4px;
  flex-shrink: 0;
  overflow-y: auto;
}
.nav-btn {
  width: 48px; height: 48px;
  border-radius: var(--r);
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--t3);
  font-size: 9px; font-weight: 600;
  letter-spacing: .03em;
  transition: all .15s var(--ease);
  cursor: pointer;
  border: none;
}
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn:hover { background: var(--surface-3); color: var(--t2); }
.nav-btn.active { background: var(--rose-bg); color: var(--rose); }
.nav-divider { width: 32px; height: 1px; background: var(--br); margin: 6px 0; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── ACTION BAR (below topbar, above staff list) ── */
.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.next-worker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--br);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  box-shadow: var(--s-sm);
  flex: 1;
  min-width: 0;
}
.nwc-label {
  font-size: 9px; font-weight: 800;
  color: var(--c-ready);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.nwc-name {
  font-size: 18px; font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.nwc-sub { font-size: 11px; color: var(--t3); margin-top: 2px; }
.nwc-empty .nwc-label { color: var(--t4); }
.nwc-empty .nwc-name { color: var(--t3); font-size: 15px; font-weight: 600; }

/* ── STAFF GRID ── */
.staff-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── STAFF CARD (horizontal row layout) ── */
.staff-card {
  background: var(--surface);
  border: 1.5px solid var(--br);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .18s var(--ease), transform .12s var(--spring), border-color .18s;
  position: relative;
  box-shadow: var(--s-xs);
}
.staff-card:hover { box-shadow: var(--s-md); transform: translateY(-1px); border-color: var(--br2); }
.staff-card:active { transform: scale(.99); }
.staff-card.sc-selected { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-b), var(--s-md); }
.staff-card.sc-busy { border-color: var(--c-busy-b); }
.staff-card.sc-off { opacity: .5; }
.staff-card.sc-pen { border-color: var(--c-pen-b); }
.staff-card.sc-next { border-color: var(--c-ready-b); }

/* Status strip — left side */
.sc-strip {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.strip-ready { background: var(--c-ready); }
.strip-busy  { background: var(--c-busy); }
.strip-off   { background: var(--c-off); }
.strip-pen   { background: var(--c-pen); }
.strip-next  { background: #3B82F6; }

.sc-body {
  padding: 10px 14px 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.sc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.av-ready { background: var(--c-ready-bg); color: var(--c-ready); }
.av-busy  { background: var(--c-busy-bg);  color: var(--c-busy);  }
.av-off   { background: var(--c-off-bg);   color: var(--c-off);   }
.av-next  { background: #DBEAFE; color: #1D4ED8; }
.av-pen   { background: var(--c-pen-bg);   color: var(--c-pen);   }

.sc-info { flex: 1; min-width: 0; }
.sc-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.sc-turns { font-size: 11px; color: var(--t3); margin-top: 1px; }

.sc-badge {
  font-size: 9.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  border: 1px solid; white-space: nowrap;
  flex-shrink: 0;
}
.sb-ready { background: var(--c-ready-bg); color: var(--c-ready); border-color: var(--c-ready-b); }
.sb-busy  { background: var(--c-busy-bg);  color: var(--c-busy);  border-color: var(--c-busy-b);  }
.sb-off   { background: var(--c-off-bg);   color: var(--c-off);   border-color: var(--c-off-b);   }
.sb-next  { background: #DBEAFE; color: #1D4ED8; border-color: rgba(59,130,246,.20); }
.sb-pen   { background: var(--c-pen-bg);   color: var(--c-pen);   border-color: var(--c-pen-b);   }

/* Progress bar */
.sc-progress {
  height: 2px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.sc-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-busy), #F97316);
  transition: width .5s var(--ease);
}

/* Tags row */
.sc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.sc-tag {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid; white-space: nowrap;
  line-height: 1.8;
}
.t-svc   { background: #EEF4FF; color: #2A5FAA; border-color: rgba(42,95,170,.16); }
.t-timer { background: var(--c-busy-bg); color: var(--c-busy); border-color: var(--c-busy-b); font-variant-numeric: tabular-nums; }
.t-pen   { background: var(--c-pen-bg); color: var(--c-pen); border-color: var(--c-pen-b); font-weight: 800; font-variant-numeric: tabular-nums; }
.t-group { background: #F0FDF4; color: #15803D; border-color: rgba(21,128,61,.16); }

/* Revenue */
.sc-rev { font-size: 11px; color: var(--c-ready); font-weight: 700; margin-top: 3px; }

/* Quick actions */
.sc-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.qa-btn {
  padding: 6px 12px;
  font-size: 11px; font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid var(--br2);
  background: var(--surface-2);
  color: var(--t2);
  transition: all .12s;
  white-space: nowrap;
}
.qa-btn:hover { background: var(--surface-3); border-color: var(--br3); }
.qa-btn.qa-primary { background: var(--rose); color: #fff; border-color: var(--rose); }
.qa-btn.qa-primary:hover { background: var(--rose-dark); }
.qa-btn.qa-green { background: var(--c-ready); color: #fff; border-color: var(--c-ready); }
.qa-btn.qa-green:hover { background: #15803D; }

/* ── HISTORY (expandable below card) ── */
.hist-wrap { margin-top: -10px; }
.hist-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--br);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  cursor: pointer;
  font-size: 9.5px; font-weight: 700;
  color: var(--t4); letter-spacing: .07em; text-transform: uppercase;
  transition: background .12s;
}
.hist-toggle:hover { background: var(--surface-3); }
.hist-toggle svg { width: 10px; height: 10px; transition: transform .2s; }
.hist-toggle.open svg { transform: rotate(180deg); }
.hist-body { display: none; background: var(--surface-2); border: 1px solid var(--br); border-top: none; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 4px 14px 12px; }
.hist-toggle.open + .hist-body { display: block; }
.hr { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--br); }
.hr:last-child { border-bottom: none; }
.hr-t { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hr-d { font-size: 10px; color: var(--t4); margin-top: 1px; }
.hr-s { font-size: 12px; font-weight: 600; }
.hr-n { font-size: 11px; color: var(--t3); font-style: italic; margin-top: 2px; }
.hr-r { font-size: 12px; font-weight: 700; color: var(--c-ready); text-align: right; }
.hr-tp { font-size: 10px; color: #3B82F6; text-align: right; margin-top: 2px; }

/* ── POPUP / ACTION MODAL ── */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.popup {
  width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--s-popup);
  animation: popIn .22s var(--ease);
}
@keyframes popIn { from { opacity:0; transform:scale(.95) translateY(10px) } to { opacity:1; transform:scale(1) translateY(0) } }
.popup-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--br);
}
.popup-av {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.popup-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.popup-meta { font-size: 11px; color: var(--t3); margin-top: 2px; }
.popup-close {
  margin-left: auto; width: 28px; height: 28px;
  border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); font-size: 14px; font-weight: 700;
  transition: all .12s; flex-shrink: 0;
}
.popup-close:hover { background: var(--surface-3); color: var(--t1); }
.popup-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }

/* TIMER in popup */
.popup-timer {
  text-align: center;
  padding: 14px;
  background: var(--c-busy-bg);
  border-radius: var(--r);
  border: 1px solid var(--c-busy-b);
}
.pt-val {
  font-size: 44px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--c-busy);
  letter-spacing: -.04em;
  line-height: 1;
}
.pt-sub {
  font-size: 9.5px; font-weight: 700;
  color: var(--c-busy); opacity: .7;
  letter-spacing: .08em; text-transform: uppercase;
  margin-top: 4px;
}
.pen-timer-display {
  text-align: center; padding: 14px;
  background: var(--c-pen-bg); border-radius: var(--r);
  border: 1px solid var(--c-pen-b);
}
.ptd-val { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c-pen); letter-spacing: -.03em; line-height: 1; }
.ptd-sub { font-size: 9.5px; font-weight: 700; color: var(--c-pen); opacity:.7; letter-spacing:.08em; text-transform:uppercase; margin-top:4px; }

/* Form fields */
.f-label { font-size: 9.5px; font-weight: 700; color: var(--t3); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; }
.f-select {
  width: 100%; font-family: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid var(--br2); border-radius: var(--r);
  padding: 9px 32px 9px 11px; outline: none;
  background: var(--surface-2); color: var(--t1);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238080A0' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.f-select:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-b); background: var(--surface); }
.f-row { display: flex; gap: 8px; }
.f-group { flex: 1; display: flex; flex-direction: column; }
.f-input {
  width: 100%; font-family: inherit; font-size: 14px; font-weight: 700;
  border: 1px solid var(--br2); border-radius: var(--r);
  padding: 8px 11px; outline: none;
  background: var(--surface-2); color: var(--t1);
  transition: border-color .2s; font-variant-numeric: tabular-nums;
}
.f-input:focus { border-color: var(--c-ready); box-shadow: 0 0 0 3px var(--c-ready-b); background: var(--surface); }
.f-textarea {
  width: 100%; font-family: inherit; font-size: 12.5px;
  border: 1px solid var(--br2); border-radius: var(--r);
  padding: 9px 11px; resize: none; outline: none;
  background: var(--surface-2); color: var(--t1);
  transition: border-color .2s; line-height: 1.5;
}
.f-textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-b); background: var(--surface); }
.f-textarea::placeholder { color: var(--t4); }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--r); font-size: 13px; font-weight: 600; padding: 10px 16px; width: 100%; transition: all .18s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-rose { background: var(--rose); color: #fff; box-shadow: 0 3px 10px rgba(212,84,122,.28); }
.btn-rose:hover { background: var(--rose-dark); box-shadow: 0 5px 16px rgba(212,84,122,.36); transform: translateY(-1px); }
.btn-dark { background: var(--t1); color: #fff; }
.btn-dark:hover { background: #2A2A38; transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--t2); border: 1px solid var(--br2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--br3); }
.btn-green { background: var(--c-ready); color: #fff; }
.btn-green:hover { background: #15803D; transform: translateY(-1px); }
.btn-sm { padding: 8px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 6px; }

/* Penalty buttons */
.pen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pen-opt { padding: 8px; font-size: 11px; font-weight: 600; border-radius: var(--r-sm); border: 1px solid var(--c-pen-b); background: rgba(255,255,255,.8); color: var(--c-pen); cursor: pointer; font-family: inherit; transition: all .12s; text-align: center; }
.pen-opt:hover { background: #fff; box-shadow: var(--s-sm); transform: translateY(-1px); }

/* Section label */
.sec-lbl { font-size: 9.5px; font-weight: 700; color: var(--t4); letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.sec-div { display: flex; align-items: center; gap: 8px; }
.sec-div-line { flex: 1; height: 1px; background: var(--br2); }
.sec-div-txt { font-size: 9.5px; font-weight: 700; color: var(--t4); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }

/* Multi select banner */
.multi-bar {
  background: #DBEAFE; border: 1px solid rgba(59,130,246,.22);
  border-radius: var(--r-lg); padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  animation: slideDown .18s var(--ease);
}
.mb-txt { font-size: 12px; font-weight: 700; color: #1D4ED8; }
.mb-sub { font-size: 10px; color: var(--t3); margin-top: 1px; }

/* Penalized section separator */
.pen-separator {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0 4px;
}
.pen-sep-line { flex: 1; height: 1px; background: rgba(220,38,38,.15); }
.pen-sep-txt { font-size: 9.5px; font-weight: 700; color: var(--c-pen); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; opacity: .8; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: rgba(15,15,18,.92);
  backdrop-filter: blur(20px);
  color: #fff; border-radius: 14px;
  padding: 10px 20px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .2s, transform .2s var(--ease);
  pointer-events: none; white-space: nowrap; z-index: 999;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rose-2); }

@keyframes slideDown { from { opacity:0; transform:translateY(-6px) } to { opacity:1; transform:translateY(0) } }

/* ── GROUP CARD ── */
.group-card {
  background: var(--surface);
  border: 1.5px solid var(--c-busy-b);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--s-sm);
}
.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  background: var(--c-busy-bg);
  border-bottom: 1px solid var(--c-busy-b);
}
.group-members {
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--br);
}
.gm-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ── KANBAN VIEW ── */
.staff-grid.kanban-mode {
  display: block;
}
.kanban-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}
.kanban-col {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--br);
  overflow: hidden;
}
.kanban-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 2px solid;
  background: var(--surface);
}
.kanban-col-title { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.kanban-col-count {
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px;
}
.kanban-col-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.kanban-empty { text-align: center; padding: 20px 0; color: var(--t4); font-size: 12px; }

/* Mini card in kanban */
.kc {
  background: var(--surface);
  border: 1px solid var(--br);
  border-radius: var(--r);
  padding: 10px;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
}
.kc:hover { box-shadow: var(--s-sm); transform: translateY(-1px); }
.kc-top { display: flex; align-items: center; gap: 8px; }
.kc-name { font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-turns { font-size: 10px; color: var(--t3); margin-top: 1px; }
.kc-sub { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.kc-btn {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--br2);
  background: var(--surface-2); color: var(--t2); font-size: 12px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .12s; font-family: inherit;
}
.kc-btn:hover { background: var(--surface-3); }
.kc-btn-green { background: var(--c-ready); color: #fff; border-color: var(--c-ready); }
.kc-btn-green:hover { background: #15803D; }
.kc-btn-rose { background: var(--rose); color: #fff; border-color: var(--rose); }
.kc-btn-rose:hover { background: var(--rose-dark); }

@media (max-width: 900px) {
  .kanban-wrap { grid-template-columns: repeat(2, 1fr); }
}

/* ── SEARCH & FILTER BAR ── */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--br2);
  border-radius: var(--r);
  padding: 7px 12px;
  flex: 1;
  max-width: 260px;
  color: var(--t3);
}
.search-input {
  border: none; outline: none;
  background: transparent;
  font-size: 13px; color: var(--t1);
  width: 100%;
}
.search-input::placeholder { color: var(--t4); }
.filter-tabs { display: flex; gap: 4px; }
.filter-btn {
  padding: 6px 12px; font-size: 11px; font-weight: 600;
  border-radius: var(--r-sm); border: 1px solid var(--br2);
  background: var(--surface); color: var(--t3);
  cursor: pointer; font-family: inherit; transition: all .12s;
}
.filter-btn:hover { background: var(--surface-2); color: var(--t2); }
.filter-btn.active { background: var(--t1); color: #fff; border-color: var(--t1); }

/* ── DRAG & DROP ── */
.staff-card[draggable="true"] { cursor: grab; }
.staff-card[draggable="true"]:active { cursor: grabbing; }
.staff-card.drag-over {
  border-color: var(--rose) !important;
  box-shadow: 0 0 0 3px var(--rose-b) !important;
  transform: scale(1.01);
}

/* ── BAR CHART ── */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--br);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--s-sm);
  margin-bottom: 12px;
}
.chart-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-row:last-child { margin-bottom: 0; }
.chart-name {
  font-size: 12px; font-weight: 700;
  color: var(--t2); width: 52px; flex-shrink: 0;
  padding-top: 3px;
}
.chart-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.chart-bar-wrap {
  display: flex; align-items: center; gap: 8px;
}
.chart-bar {
  height: 20px; border-radius: 4px;
  min-width: 4px;
  transition: width .4s var(--ease);
}
.cb-rev { background: linear-gradient(90deg, var(--rose-2), var(--rose-dark)); }
.cb-tip { background: linear-gradient(90deg, #60A5FA, #2563EB); }
.chart-val {
  font-size: 11px; font-weight: 700;
  color: var(--t2); white-space: nowrap;
}

/* ── TAB PAGES ── */
.tab-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.tab-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.tab-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }

/* DATA TABLE */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--br);
  box-shadow: var(--s-sm);
  background: var(--surface);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  font-size: 9.5px; font-weight: 700; color: var(--t4);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 11px 16px; text-align: left;
  border-bottom: 1px solid var(--br2);
  background: var(--surface-2); white-space: nowrap;
}
.data-table td { padding: 6px 16px; border-bottom: 1px solid var(--br); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }

/* MINI STATS (in popup) */
.mini-stat {
  background: var(--surface-2); border: 1px solid var(--br);
  border-radius: var(--r); padding: 10px 12px; text-align: center;
}
.ms-val { font-size: 16px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ms-lbl { font-size: 10px; color: var(--t3); margin-top: 2px; }

/* REPORT STAT CARDS */
.report-stat-card {
  background: var(--surface); border: 1px solid var(--br);
  border-radius: var(--r-lg); padding: 16px 18px;
  box-shadow: var(--s-sm);
}
.rsc-val { font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.rsc-lbl { font-size: 11px; color: var(--t3); margin-top: 4px; }

/* Responsive */
/* ── KANBAN DRAG ── */
.kc[draggable=true] { cursor: grab; }
.kc[draggable=true]:active { cursor: grabbing; }
.kc.kc-drag-over {
  border-color: var(--rose) !important;
  box-shadow: 0 0 0 2px var(--rose-b) !important;
  transform: scale(1.02);
}
