/* Village OS Deluxe — Swing Shift Scheduler
   Responsive CSS: phone 390, tablet 691, tablet-landscape 1024, desktop 1280+ */

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary: #2563EB;
  --c-primary-light: #EFF6FF;
  --c-primary-border: #BFDBFE;
  --c-primary-text: #1D4ED8;
  --c-dark: #1F1D3A;
  --c-text: #111827;
  --c-text-secondary: #4B5563;
  --c-text-muted: #6B7280;
  --c-text-faint: #9CA3AF;
  --c-bg: #F4F5F7;
  --c-card: #FFFFFF;
  --c-border: #E5E7EB;
  --c-border-light: #ECEEF2;
  --c-border-faint: #F1F2F5;
  --c-success: #15803D;
  --c-success-bg: #F0FDF4;
  --c-warning: #B45309;
  --c-warning-bg: #FFFBEB;
  --c-danger: #B91C1C;
  --c-danger-bg: #FEF2F2;
  --c-danger-border: #FECACA;
  --c-ot-purple: #6D28D9;
  --c-ot-bg: #EDE9FE;
  --c-ot-border: #DDD6FE;
  --c-fto-orange: #EA580C;
  --c-fto-bg: #FFF7ED;
  --c-uncovered: #FFC000;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.12);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.15);
  --shadow-lg: 0 6px 18px rgba(15, 23, 42, 0.25);
  /* Group colors */
  --g-main: #2563EB;
  --g-tower: #7C3AED;
  --g-relief1: #0F766E;
  --g-pool: #C2410C;
  --g-relief2: #BE185D;
  --g-rw: #1F1D3A;
  --g-dispatch: #0B6FD8;
}

html, body {
  height: 100%;
  font-family: Poppins, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { height: 100%; }

/* ─── App Shell ───────────────────────────────────────────────────────────── */
.vapp {
  height: 100%;
  display: flex;
  overflow: hidden;
}

.vmain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Side Menu (desktop only) ────────────────────────────────────────────── */
.vsidemenu {
  width: 56px;
  flex: 0 0 56px;
  background: var(--c-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
}

.vsidemenu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 48px;
  padding: 8px 0 6px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  font-size: 10px;
  transition: background 0.15s, color 0.15s;
}
.vsidemenu-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
.vsidemenu-item.active { background: rgba(255,255,255,0.12); color: #FFFFFF; }
.vsidemenu-icon { font-size: 18px; line-height: 1; }
.vsidemenu-label { font-weight: 600; }

.phone .vsidemenu, .tablet .vsidemenu { display: none; }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.vheader {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
}

.vheader-title h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.vheader-date {
  font-size: 11.5px;
  color: var(--c-text-muted);
}

.vheader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vday-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vday-label {
  font-weight: 600;
  font-size: 13px;
  min-width: 72px;
  text-align: center;
}

.phone .vheader { padding: 8px 10px; }
.phone .vheader-title h1 { font-size: 13.5px; }
.phone .vheader-date { display: none; }
.phone .vday-label { font-size: 12px; min-width: 60px; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.vbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.vbtn-primary { background: var(--c-primary); color: #FFF; }
.vbtn-primary:hover { background: #1D4ED8; }
.vbtn-outline { background: var(--c-card); color: var(--c-text); border: 1px solid var(--c-border); }
.vbtn-outline:hover { background: #F9FAFB; }
.vbtn-danger { background: var(--c-danger-bg); color: var(--c-danger); border: 1px solid var(--c-danger-border); }
.vbtn-danger:hover { background: #FEE2E2; }
.vbtn-success { background: var(--c-success-bg); color: var(--c-success); border: 1px solid #BBF7D0; }
.vbtn-sm { padding: 4px 10px; font-size: 11.5px; border-radius: 8px; }
.vbtn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-card);
  color: var(--c-text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.vbtn-icon:hover { background: #F9FAFB; }

.phone .vbtn { padding: 6px 10px; font-size: 11.5px; }
.phone .vbtn-icon { width: 28px; height: 28px; font-size: 14px; }

/* ─── Tabs ────────────────────────────────────────────────────────────────── */
.vtabs {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vtab {
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 12px;
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.vtab:hover { color: var(--c-text); }
.vtab.active { color: var(--c-primary-text); font-weight: 600; border-bottom-color: var(--c-primary); }

.phone .vtabs { padding: 0 8px; }
.phone .vtab { padding: 7px 8px; font-size: 11.5px; }

/* ─── Mobile Pane Toggle ──────────────────────────────────────────────────── */
.vpane-toggle {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #F3F4F6;
  border-radius: 9px;
  padding: 3px;
  margin: 6px 10px 0;
}
.vpane-btn {
  border: 0;
  border-radius: 7px;
  padding: 6px 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-secondary);
  background: transparent;
  cursor: pointer;
  min-height: 30px;
}
.vpane-btn.active {
  background: var(--c-card);
  color: var(--c-primary-text);
  box-shadow: var(--shadow-sm);
}

/* ─── Toast ───────────────────────────────────────────────────────────────── */
.vtoast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-dark);
  color: #FFF;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Content Area ────────────────────────────────────────────────────────── */
.vcontent {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
}
.phone .vcontent { padding: 8px 10px; }
.tablet .vcontent { padding: 10px 14px; }

.vloading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--c-text-muted);
  font-weight: 500;
}

.vplaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--c-text-faint);
  font-size: 13px;
  text-align: center;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.vcard {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-faint);
}
.vcard-header h2 {
  font-size: 13.5px;
  font-weight: 700;
}
.vcard-body { padding: 10px 14px; flex: 1; min-height: 0; overflow-y: auto; }

.vcard-dark {
  background: var(--c-dark);
  color: #FFF;
  border-color: transparent;
}

/* ─── 3-Column Scheduler Layout ───────────────────────────────────────────── */
.vscheduler-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.tablet .vscheduler-grid {
  grid-template-columns: 180px 1fr 220px;
  gap: 10px;
}

/* ─── Roster Panel ────────────────────────────────────────────────────────── */
.vroster {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.vroster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
}
.vroster-header h2 { font-size: 13.5px; font-weight: 700; }
.vroster-count {
  font-size: 11px;
  color: var(--c-text-muted);
  background: #F3F4F6;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-weight: 600;
}
.vsearch {
  margin: 0 10px 6px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--c-text);
  background: #F9FAFB;
  outline: none;
}
.vsearch:focus { border-color: var(--c-primary); background: var(--c-card); }

.vroster-tabs {
  display: flex;
  gap: 0;
  padding: 0 10px;
  margin-bottom: 4px;
}
.vroster-tab {
  flex: 1;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 0;
  color: var(--c-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-align: center;
}
.vroster-tab.active { color: var(--c-primary-text); border-bottom-color: var(--c-primary); }

.vroster-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 4px;
}

.vroster-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s;
}
.vroster-row:hover { background: #F9FAFB; }
.vroster-row.selected { background: var(--c-primary-light); box-shadow: inset 0 0 0 1px var(--c-primary-border); }
.vroster-row.called {
  opacity: 0.55;
  text-decoration: line-through;
}

.vofficer-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: #FFF;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  background: var(--c-text-muted);
}
.vofficer-info { display: flex; flex-direction: column; min-width: 0; }
.vofficer-name { font-size: 12px; font-weight: 600; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vofficer-role { font-size: 10px; color: var(--c-text-muted); }

/* Avatar group colors */
.vofficer-avatar.g0 { background: var(--g-main); }
.vofficer-avatar.g1 { background: var(--g-tower); }
.vofficer-avatar.g2 { background: var(--g-relief1); }
.vofficer-avatar.g3 { background: var(--g-pool); }
.vofficer-avatar.g4 { background: var(--g-relief2); }
.vofficer-avatar.g5 { background: var(--g-rw); }
.vofficer-avatar.g6 { background: var(--g-dispatch); }
.vofficer-avatar.unassigned { background: var(--c-text-faint); }
.vofficer-avatar.called { background: var(--c-danger); }
.vofficer-avatar.fto { background: var(--c-fto-orange); }
.vofficer-avatar.offsite { background: #64748B; }

/* ─── Posting Grid ────────────────────────────────────────────────────────── */
.vgrid {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.vgrid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-faint);
}
.vgrid-header h2 { font-size: 13.5px; font-weight: 700; }

.vgrid-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

/* Group sections within the grid */
.vgroup {
  margin-bottom: 8px;
}
.vgroup:last-child { margin-bottom: 0; }

.vgroup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
}
.vgroup-header.g0 { background: var(--g-main); }
.vgroup-header.g1 { background: var(--g-tower); }
.vgroup-header.g2 { background: var(--g-relief1); }
.vgroup-header.g3 { background: var(--g-pool); }
.vgroup-header.g4 { background: var(--g-relief2); }
.vgroup-header.g5 { background: var(--g-rw); }

.vgroup-note {
  font-weight: 400;
  font-size: 10.5px;
  opacity: 0.8;
}

/* Post rows */
.vpost-row {
  display: grid;
  grid-template-columns: 140px repeat(4, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  min-height: 38px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--c-border-faint);
  font-size: 12px;
}
.vpost-row:last-child { border-bottom: 0; }

.tablet .vpost-row { grid-template-columns: 120px repeat(4, minmax(0, 1fr)); }
.phone .vpost-row { grid-template-columns: 80px repeat(4, minmax(0, 1fr)); font-size: 10.5px; }

.vpost-label {
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vpost-label .vpost-short {
  font-size: 10px;
  color: var(--c-text-muted);
  font-weight: 500;
}

/* Block cells (officer assigned per 2-hour block) */
.vblock-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.vblock-cell:hover { filter: brightness(0.95); }

.vblock-cell.assigned {
  background: var(--c-primary-light);
  color: var(--c-primary-text);
}
.vblock-cell.held {
  background: var(--c-primary-light);
  color: var(--c-primary-text);
}
.vblock-cell.closed {
  background: var(--c-danger-bg);
  color: var(--c-danger);
  font-style: italic;
}
.vblock-cell.p-closed {
  background: #3A3A3A;
  color: #E5E7EB;
  font-weight: 700;
}
.vblock-cell.short {
  background: #FFFBEB;
  color: var(--c-warning);
  font-style: italic;
}
.vblock-cell.ot {
  background: var(--c-ot-bg);
  color: var(--c-ot-purple);
}
.vblock-cell.empty {
  background: #F9FAFB;
  color: var(--c-text-faint);
}
.vblock-cell.uncovered {
  background: #FFFDE7;
  color: #B45309;
  border: 1px dashed var(--c-uncovered);
}

/* Block column headers (time labels) */
.vblock-header-row {
  display: grid;
  grid-template-columns: 140px repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 2px 6px;
  margin-bottom: 2px;
}
.tablet .vblock-header-row { grid-template-columns: 120px repeat(4, minmax(0, 1fr)); }
.phone .vblock-header-row { grid-template-columns: 80px repeat(4, minmax(0, 1fr)); }

.vblock-header-cell {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-muted);
  padding: 2px 0;
}

/* ─── Selected/Detail Panel ───────────────────────────────────────────────── */
.vpanel {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.vpanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border-faint);
}
.vpanel-header h2 { font-size: 13.5px; font-weight: 700; }
.vpanel-content { flex: 1; overflow-y: auto; padding: 10px 12px; }

/* Officer detail within panel */
.vpanel-officer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border-faint);
  margin-bottom: 10px;
}
.vpanel-officer-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: #FFF;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vpanel-officer-name { font-size: 14px; font-weight: 700; }
.vpanel-officer-role { font-size: 11px; color: var(--c-text-muted); }

.vpanel-section {
  margin-bottom: 12px;
}
.vpanel-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.vpanel-assignments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vpanel-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #F9FAFB;
  border-radius: 7px;
  font-size: 12px;
}
.vpanel-assign-time {
  font-weight: 700;
  color: var(--c-text-muted);
  font-size: 10.5px;
  min-width: 36px;
}
.vpanel-assign-post {
  font-weight: 600;
  color: var(--c-text);
}

/* Post detail within panel */
.vpanel-post-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.vpanel-post-group { font-size: 11px; font-weight: 600; margin-bottom: 10px; }

.vpanel-action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ─── Dispatch Section ────────────────────────────────────────────────────── */
.vdispatch {
  margin-top: 8px;
}
.vdispatch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px 8px 0 0;
  background: var(--c-dark);
  color: #FFF;
  font-size: 12px;
  font-weight: 700;
}
.vdispatch-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--c-border-faint);
  background: var(--c-card);
  font-size: 12px;
}
.vdispatch-seat {
  font-weight: 600;
  color: var(--c-text);
}
.vdispatch-officer {
  font-weight: 500;
  color: var(--c-text-secondary);
}
.vdispatch-offline {
  color: var(--c-danger);
  font-style: italic;
}

/* ─── Status Badges ───────────────────────────────────────────────────────── */
.vbadge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
}
.vbadge-posted { background: #14532D; color: #BBF7D0; }
.vbadge-draft { background: #78350F; color: #FDE68A; }
.vbadge-none { background: #374151; color: #E5E7EB; }
.vbadge-count {
  background: #F3F4F6;
  color: #374151;
  padding: 2px 8px;
  font-size: 11px;
}
.vbadge-danger { background: #DC2626; color: #FFF; min-width: 18px; text-align: center; }

/* P-label tags */
.vp-label {
  display: inline-block;
  background: #3A3A3A;
  color: #E5E7EB;
  border-radius: 4px;
  padding: 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.6;
}

/* ─── Call-offs View ──────────────────────────────────────────────────────── */
.vcalloffs-layout {
  display: flex;
  gap: 12px;
  min-height: 0;
}
.phone .vcalloffs-layout { flex-direction: column; }

.vcalloffs-main { flex: 1; min-width: 0; }
.vcalloffs-sidebar { width: 280px; flex: 0 0 280px; }
.phone .vcalloffs-sidebar { width: 100%; flex: auto; }

.vcalloff-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}
.vcalloff-info { flex: 1; min-width: 0; }
.vcalloff-name { font-size: 12.5px; font-weight: 600; }
.vcalloff-desc { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* ─── Details View ────────────────────────────────────────────────────────── */
.vdetails-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.phone .vdetails-grid { grid-template-columns: 1fr; }

.vdetail-section {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.vdetail-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vdetail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--c-border-faint);
  font-size: 12px;
}
.vdetail-item:last-child { border-bottom: 0; }

/* ─── History View ────────────────────────────────────────────────────────── */
.vhistory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tablet .vhistory-grid { grid-template-columns: repeat(2, 1fr); }
.phone .vhistory-grid { grid-template-columns: 1fr; }

.vhistory-card {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.vhistory-card:hover { box-shadow: var(--shadow-md); }
.vhistory-card-day {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.vhistory-card-date {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.vhistory-card-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
}

/* ─── Rotation / Fairness View ────────────────────────────────────────────── */
.vfairness-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, minmax(0, 1fr));
  gap: 4px;
  font-size: 12px;
}
.phone .vfairness-grid { grid-template-columns: 100px repeat(5, minmax(0, 1fr)); font-size: 10.5px; }

.vfairness-header {
  font-weight: 700;
  color: var(--c-text-muted);
  font-size: 10px;
  padding: 4px 6px;
  text-align: center;
}

.vfairness-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-weight: 600;
}

.vheat-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 11px;
}
.vheat-0 { background: #F3F4F6; color: var(--c-text-faint); }
.vheat-1 { background: #DBEAFE; color: #1E293B; }
.vheat-2 { background: #93C5FD; color: #1E293B; }
.vheat-3 { background: #3B82F6; color: #1E293B; }
.vheat-4 { background: #1D4ED8; color: #FFF; }

/* ─── Full Schedule / Sheet View ──────────────────────────────────────────── */
.vsheet {
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.vsheet h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}
.vsheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.vsheet-table th, .vsheet-table td {
  padding: 5px 8px;
  border: 1px solid var(--c-border);
  text-align: left;
}
.vsheet-table th {
  background: #F3F4F6;
  font-weight: 700;
  font-size: 10.5px;
  color: var(--c-text-muted);
  text-transform: uppercase;
}

/* ─── Forms & Inputs ──────────────────────────────────────────────────────── */
.vinput {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--c-text);
  background: #F9FAFB;
  outline: none;
  width: 100%;
}
.vinput:focus { border-color: var(--c-primary); background: var(--c-card); }

.vselect {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--c-text);
  background: #F9FAFB;
  outline: none;
  width: 100%;
}

.vform-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.vform-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
  min-width: 60px;
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.vflex { display: flex; }
.vflex-col { display: flex; flex-direction: column; }
.vgap-4 { gap: 4px; }
.vgap-6 { gap: 6px; }
.vgap-8 { gap: 8px; }
.vgap-10 { gap: 10px; }
.valign-center { align-items: center; }
.vjustify-between { justify-content: space-between; }
.vtext-muted { color: var(--c-text-muted); }
.vtext-sm { font-size: 11px; }
.vtext-xs { font-size: 10px; }
.vtext-bold { font-weight: 700; }
.vtext-center { text-align: center; }
.vw-full { width: 100%; }
.vmt-4 { margin-top: 4px; }
.vmt-8 { margin-top: 8px; }
.vmb-4 { margin-bottom: 4px; }
.vmb-8 { margin-bottom: 8px; }

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ─── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .vsidemenu, .vtabs, .vpane-toggle, .vheader-actions, .vtoast { display: none !important; }
  .vapp { height: auto; }
  .vmain { overflow: visible; }
  .vcontent { overflow: visible; padding: 0; }
  .vsheet { border: 0; padding: 0; }
  body { background: #FFF; }
}
