/* ============================================================
   CrewHub Volunteer — shared design system
   Consumed by organizer-dashboard.html and volunteer-dashboard.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f4;
  --bg-tertiary: #eeece8;
  --bg-info: #e6f1fb;
  --bg-success: #eaf3de;
  --bg-warning: #faeeda;
  --bg-danger: #fcebeb;
  --bg-purple: #EEEDFE;
  --text-primary: #1a1a18;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --text-info: #0c447c;
  --text-success: #27500a;
  --text-warning: #633806;
  --text-danger: #791f1f;
  --text-purple: #534AB7;
  --border-tertiary: rgba(26,26,24,0.12);
  --border-secondary: rgba(26,26,24,0.22);
  --brand: #378ADD;
  --brand-dark: #185FA5;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1c1c1a;
    --bg-secondary: #252523;
    --bg-tertiary: #111110;
    --bg-info: #042c53;
    --bg-success: #173404;
    --bg-warning: #412402;
    --bg-danger: #501313;
    --bg-purple: #23204a;
    --text-primary: #f0ece4;
    --text-secondary: #b4b2a9;
    --text-tertiary: #888780;
    --text-info: #85b7eb;
    --text-success: #97c459;
    --text-warning: #ef9f27;
    --text-danger: #f09595;
    --text-purple: #b3aef0;
    --border-tertiary: rgba(240,236,228,0.12);
    --border-secondary: rgba(240,236,228,0.22);
  }
}

/* Manual theme override (Settings) — beats the prefers-color-scheme defaults */
:root[data-theme="light"] {
  --bg-primary: #ffffff; --bg-secondary: #f5f5f4; --bg-tertiary: #eeece8;
  --bg-info: #e6f1fb; --bg-success: #eaf3de; --bg-warning: #faeeda; --bg-danger: #fcebeb; --bg-purple: #EEEDFE;
  --text-primary: #1a1a18; --text-secondary: #5f5e5a; --text-tertiary: #888780;
  --text-info: #0c447c; --text-success: #27500a; --text-warning: #633806; --text-danger: #791f1f; --text-purple: #534AB7;
  --border-tertiary: rgba(26,26,24,0.12); --border-secondary: rgba(26,26,24,0.22);
}
:root[data-theme="dark"] {
  --bg-primary: #1c1c1a; --bg-secondary: #252523; --bg-tertiary: #111110;
  --bg-info: #042c53; --bg-success: #173404; --bg-warning: #412402; --bg-danger: #501313; --bg-purple: #23204a;
  --text-primary: #f0ece4; --text-secondary: #b4b2a9; --text-tertiary: #888780;
  --text-info: #85b7eb; --text-success: #97c459; --text-warning: #ef9f27; --text-danger: #f09595; --text-purple: #b3aef0;
  --border-tertiary: rgba(240,236,228,0.12); --border-secondary: rgba(240,236,228,0.22);
}

body { font-family: var(--font); background: var(--bg-tertiary); color: var(--text-primary); }

/* Global search field in topbar */
.topbar-search { flex: 1; max-width: 340px; position: relative; }
.topbar-search input { width: 100%; padding: 7px 12px 7px 32px; font-size: 12.5px; border-radius: var(--radius-md); border: 0.5px solid var(--border-secondary); background: var(--bg-secondary); color: var(--text-primary); font-family: inherit; cursor: pointer; }
.topbar-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-tertiary); fill: none; stroke-width: 1.8; }
.topbar-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text-tertiary); border: 0.5px solid var(--border-tertiary); border-radius: 4px; padding: 1px 5px; font-family: var(--font); }
@media (max-width: 760px) { .topbar-search { display: none; } }

/* Search palette */
.search-result { padding: 10px 16px; display: flex; align-items: center; gap: 11px; cursor: pointer; border-bottom: 0.5px solid var(--border-tertiary); }
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.sel { background: var(--bg-secondary); }
.search-ic { width: 30px; height: 30px; border-radius: var(--radius-md); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.search-ic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.search-main { font-size: 13px; font-weight: 500; }
.search-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.search-kind { margin-left: auto; font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }

/* Login / landing */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-tertiary); }
.login-card { width: 100%; max-width: 420px; background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.login-head { padding: 28px 28px 20px; text-align: center; border-bottom: 0.5px solid var(--border-tertiary); }
.login-logo { display: inline-flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 600; }
.login-logo .brand-accent { color: var(--brand); }
.login-logo .sb-logo-mark { width: 30px; height: 30px; }
.login-logo .sb-logo-mark svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.login-tag { font-size: 12.5px; color: var(--text-tertiary); margin-top: 8px; }
.login-body { padding: 22px 28px 26px; }
.login-body .field input { padding: 10px 12px; }
.role-pick { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.role-card { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 0.5px solid var(--border-secondary); border-radius: var(--radius-md); cursor: pointer; text-decoration: none; color: inherit; transition: border-color 0.1s, background 0.1s; }
.role-card:hover { border-color: var(--brand); background: var(--bg-secondary); }
.role-av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.role-name { font-size: 13.5px; font-weight: 600; }
.role-desc { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.role-arrow { margin-left: auto; color: var(--text-tertiary); }
.role-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.login-or { text-align: center; font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 14px; position: relative; }
.login-or::before, .login-or::after { content: ''; position: absolute; top: 50%; width: 38%; height: 0.5px; background: var(--border-tertiary); }
.login-or::before { left: 0; } .login-or::after { right: 0; }
.login-foot { font-size: 11.5px; color: var(--text-tertiary); text-align: center; margin-top: 16px; }

/* Segmented control (settings) */
.seg { display: inline-flex; border: 0.5px solid var(--border-secondary); border-radius: var(--radius-md); overflow: hidden; }
.seg button { padding: 7px 14px; font-size: 12px; background: var(--bg-primary); color: var(--text-secondary); border: none; border-right: 0.5px solid var(--border-tertiary); cursor: pointer; font-family: inherit; }
.seg button:last-child { border-right: none; }
.seg button.sel { background: var(--brand); color: #fff; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 0.5px solid var(--border-tertiary); }
.set-row:last-child { border-bottom: none; }
.set-label { font-size: 12.5px; font-weight: 500; }
.set-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-secondary); border-radius: 22px; transition: background 0.15s; }
.switch .track::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(16px); }

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

/* Sidebar */
.sidebar {
  width: 224px; flex-shrink: 0;
  background: var(--bg-primary);
  border-right: 0.5px solid var(--border-tertiary);
  display: flex; flex-direction: column; padding: 20px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sb-logo { padding: 0 20px 20px; border-bottom: 0.5px solid var(--border-tertiary); font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sb-logo .brand-accent { color: var(--brand); }
.sb-logo-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-logo-mark svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; }
.sb-section { padding: 12px 20px 4px; font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.06em; text-transform: uppercase; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s; text-decoration: none; user-select: none;
}
.sb-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.sb-item.active { color: var(--text-info); background: var(--bg-info); border-left-color: var(--brand); }
.sb-item svg.ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.sb-badge { margin-left: auto; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 10px; }
.sb-badge.danger { background: var(--bg-danger); color: var(--text-danger); }
.sb-badge.warn { background: var(--bg-warning); color: var(--text-warning); }
.sb-badge.info { background: var(--bg-info); color: var(--text-info); }
.sb-foot { margin-top: auto; padding: 16px 20px 4px; border-top: 0.5px solid var(--border-tertiary); display: flex; align-items: center; gap: 10px; }
.sb-av { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-info); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-info); flex-shrink: 0; }
.sb-av.green { background: var(--bg-success); color: var(--text-success); }
.sb-name { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.sb-role { font-size: 11px; color: var(--text-tertiary); }
.sb-signout { margin-left: auto; background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 4px; border-radius: var(--radius-sm, 4px); flex-shrink: 0; }
.sb-signout:hover { color: var(--text-primary); background: var(--bg-secondary); }
.sb-switch { margin: 10px 20px 0; padding: 8px 10px; border-radius: var(--radius-md); background: var(--bg-secondary); font-size: 11px; color: var(--text-secondary); text-decoration: none; display: flex; align-items: center; gap: 7px; border: 0.5px solid var(--border-tertiary); }
.sb-switch:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sb-switch svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--bg-primary); border-bottom: 0.5px solid var(--border-tertiary);
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 5; gap: 16px;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.topbar-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }
.topbar-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger svg { width: 22px; height: 22px; stroke: var(--text-primary); fill: none; stroke-width: 2; }

/* Notification bell */
.bell { position: relative; background: none; border: 0.5px solid var(--border-secondary); border-radius: var(--radius-md); width: 34px; height: 32px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bell:hover { background: var(--bg-secondary); }
.bell svg { width: 16px; height: 16px; stroke: var(--text-secondary); fill: none; stroke-width: 1.8; }
.bell-dot { position: absolute; top: 5px; right: 6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: #C6392F; color: #fff; font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.notif-panel { position: absolute; top: 46px; right: 0; width: 320px; max-width: calc(100vw - 32px); background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 30; display: none; overflow: hidden; }
.notif-panel.open { display: block; }
.notif-head { padding: 12px 16px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; justify-content: space-between; }
.notif-head .card-title { font-size: 13px; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-row { padding: 11px 16px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--bg-secondary); }
.notif-row.unread { background: var(--bg-info); }
.notif-row.unread:hover { filter: brightness(0.98); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex-shrink: 0; }
.notif-dot.read { background: transparent; }
.notif-text { font-size: 12.5px; color: var(--text-primary); line-height: 1.45; }
.notif-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* User menu */
.userchip { width: 32px; height: 32px; border-radius: 50%; border: 0.5px solid var(--border-secondary); background: var(--bg-info); color: var(--text-info); font-size: 11px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.userchip.green { background: var(--bg-success); color: var(--text-success); }
.userchip:hover { filter: brightness(0.97); }
.umenu-head { padding: 12px 16px; border-bottom: 0.5px solid var(--border-tertiary); }
.umenu-name { font-size: 13px; font-weight: 600; }
.umenu-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.umenu-item { display: flex; align-items: center; gap: 9px; padding: 10px 16px; font-size: 12.5px; color: var(--text-primary); cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-family: inherit; }
.umenu-item:hover { background: var(--bg-secondary); }
.umenu-item.danger { color: var(--text-danger); }
.umenu-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.btn {
  padding: 7px 14px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius-md); cursor: pointer;
  border: 0.5px solid var(--border-secondary);
  background: var(--bg-primary); color: var(--text-primary);
  transition: background 0.1s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--bg-secondary); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { background: var(--bg-danger); color: var(--text-danger); border-color: transparent; }
.btn.sm { padding: 4px 10px; font-size: 11px; }
.btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn:disabled { opacity: 0.5; cursor: default; }

.content { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.view { display: none; flex-direction: column; gap: 20px; }
.view.active { display: flex; }
.page-intro { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; max-width: 720px; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metric { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 16px; }
.metric-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.metric-val { font-size: 26px; font-weight: 600; color: var(--text-primary); line-height: 1; }
.metric-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 5px; }
.metric-sub.up { color: var(--text-success); }
.metric-sub.warn { color: var(--text-warning); }
.metric-sub.danger { color: var(--text-danger); }
.metric-sub.info { color: var(--text-info); }

/* Layout */
.two-col { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 16px; }
.two-col.even { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
.col { display: flex; flex-direction: column; gap: 16px; }

/* Cards */
.card { background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.card-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.card-action { font-size: 12px; color: var(--text-info); cursor: pointer; background: none; border: none; font-family: inherit; }
.card-action:hover { text-decoration: underline; }
.card-body { padding: 16px 18px; }
.card-grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* Pills */
.pill { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 10px; white-space: nowrap; display: inline-block; }
.pill.active { background: var(--bg-success); color: var(--text-success); }
.pill.draft { background: var(--bg-secondary); color: var(--text-secondary); }
.pill.upcoming { background: var(--bg-warning); color: var(--text-warning); }
.pill.closed { background: var(--bg-danger); color: var(--text-danger); }
.pill.info { background: var(--bg-info); color: var(--text-info); }
.pill.purple { background: var(--bg-purple); color: var(--text-purple); }

/* Event rows */
.event-row { padding: 13px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; gap: 14px; }
.event-row:last-child { border-bottom: none; }
.event-date-block { width: 40px; text-align: center; flex-shrink: 0; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 6px 4px; }
.event-month { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
.event-day { font-size: 18px; font-weight: 600; color: var(--text-primary); line-height: 1; }
.event-info { flex: 1; min-width: 0; }
.event-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.event-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

/* Progress */
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-bar { height: 4px; background: var(--bg-secondary); border-radius: 2px; width: 70px; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--brand); }
.progress-fill.warn { background: #BA7517; }
.progress-fill.good { background: #3B6D11; }
.progress-label { font-size: 11px; color: var(--text-tertiary); min-width: 36px; text-align: right; }

/* Department rows */
.dept-row { padding: 10px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; gap: 10px; }
.dept-row:last-child { border-bottom: none; }
.dept-color { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.dept-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.dept-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.dept-nums { text-align: right; flex-shrink: 0; margin-left: auto; }
.dept-filled { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.dept-cap { font-size: 11px; color: var(--text-tertiary); }

/* Comms / list items */
.comms-item { padding: 12px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; gap: 12px; align-items: flex-start; }
.comms-item:last-child { border-bottom: none; }
.comms-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.comms-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.comms-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.comms-status { margin-left: auto; font-size: 11px; color: var(--text-tertiary); white-space: nowrap; flex-shrink: 0; padding-left: 12px; }

/* Volunteer rows */
.vol-row { padding: 10px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; gap: 12px; }
.vol-row:last-child { border-bottom: none; }
.vol-av { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.vol-av.a { background: var(--bg-info); color: var(--text-info); }
.vol-av.b { background: var(--bg-success); color: var(--text-success); }
.vol-av.c { background: var(--bg-warning); color: var(--text-warning); }
.vol-av.d { background: var(--bg-purple); color: var(--text-purple); }
.vol-av.e { background: #FAECE7; color: #993C1D; }
.vol-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.vol-dept { font-size: 11px; color: var(--text-tertiary); }
.vol-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.stars { display: flex; gap: 2px; }
.star { width: 10px; height: 10px; background: #BA7517; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); }
.star.empty { background: var(--border-tertiary); padding: 0; }

/* Feedback */
.feedback-item { padding: 12px 18px; border-bottom: 0.5px solid var(--border-tertiary); }
.feedback-item:last-child { border-bottom: none; }
.feedback-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.feedback-name { font-size: 12px; font-weight: 500; color: var(--text-primary); }
.feedback-event { font-size: 11px; color: var(--text-tertiary); }
.feedback-quote { font-size: 12px; color: var(--text-secondary); line-height: 1.5; font-style: italic; border-left: 2px solid var(--border-secondary); padding-left: 8px; margin-top: 4px; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
table.tbl th { text-align: left; font-size: 11px; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 18px; border-bottom: 0.5px solid var(--border-tertiary); white-space: nowrap; }
table.tbl td { padding: 11px 18px; border-bottom: 0.5px solid var(--border-tertiary); color: var(--text-primary); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--bg-secondary); }
.td-main { font-weight: 500; }
.td-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.cell-user { display: flex; align-items: center; gap: 10px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 0.5px solid var(--border-tertiary); padding: 0 18px; overflow-x: auto; }
.tab { padding: 11px 14px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-info); border-bottom-color: var(--brand); font-weight: 500; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { flex: 1; min-width: 180px; position: relative; }
.search input { width: 100%; padding: 8px 12px 8px 32px; font-size: 12.5px; border-radius: var(--radius-md); border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-primary); font-family: inherit; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-tertiary); fill: none; stroke-width: 1.8; }
.select { padding: 8px 12px; font-size: 12.5px; border-radius: var(--radius-md); border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-primary); font-family: inherit; cursor: pointer; }

/* Shift grid */
.shift-grid { overflow-x: auto; }
.shift-grid-inner { min-width: 720px; }
.shift-cols { display: grid; grid-template-columns: 130px repeat(4, 1fr); }
.shift-head { font-size: 11px; font-weight: 600; color: var(--text-secondary); padding: 10px; border-bottom: 0.5px solid var(--border-tertiary); text-align: center; }
.shift-head:first-child { text-align: left; }
.shift-timecell { font-size: 11px; color: var(--text-tertiary); padding: 12px 10px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; }
.shift-cell { border-bottom: 0.5px solid var(--border-tertiary); border-left: 0.5px solid var(--border-tertiary); padding: 6px; min-height: 62px; }
.shift-block { border-radius: 6px; padding: 6px 8px; font-size: 11px; margin-bottom: 4px; cursor: pointer; border-left: 2px solid; }
.shift-block:hover { filter: brightness(0.97); }
.shift-block.safety { background: var(--bg-info); border-color: var(--brand); color: var(--text-info); }
.shift-block.reg { background: var(--bg-success); border-color: #3B6D11; color: var(--text-success); }
.shift-block.av { background: var(--bg-warning); border-color: #BA7517; color: var(--text-warning); }
.shift-block.prog { background: var(--bg-purple); border-color: #534AB7; color: var(--text-purple); }
.shift-block.deal { background: #FAECE7; border-color: #993C1D; color: #993C1D; }
.shift-block-title { font-weight: 600; }
.shift-block-fill { opacity: 0.85; margin-top: 1px; }

/* Dispatch board */
.dispatch-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.dispatch-col { background: var(--bg-secondary); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 120px; }
.dispatch-col-head { padding: 11px 14px; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; border-bottom: 0.5px solid var(--border-tertiary); }
.dispatch-col-count { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
.dispatch-list { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.dispatch-card { background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-md); padding: 10px 11px; cursor: grab; border-left: 3px solid var(--brand); }
.dispatch-card:active { cursor: grabbing; }
.dispatch-card.dragging { opacity: 0.45; }
.dispatch-list.drag-over { outline: 2px dashed var(--brand); outline-offset: -3px; background: var(--bg-info); border-radius: var(--radius-md); }
.duty-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.duty-avail { background: #3B6D11; } .duty-oncall { background: #BA7517; } .duty-break { background: #888780; }
.duty-pill { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; }
.duty-pill.available { background: var(--bg-success); color: var(--text-success); }
.duty-pill.oncall { background: var(--bg-warning); color: var(--text-warning); }
.duty-pill.break { background: var(--bg-secondary); color: var(--text-secondary); }
.dispatch-card:hover { border-color: var(--border-secondary); }
.dispatch-card.p-high { border-left-color: #C6392F; }
.dispatch-card.p-med { border-left-color: #BA7517; }
.dispatch-card.p-low { border-left-color: #3B6D11; }
.dispatch-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dispatch-code { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-secondary); }
.dispatch-title { font-size: 12.5px; font-weight: 500; color: var(--text-primary); line-height: 1.4; }
.dispatch-loc { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.dispatch-loc svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.dispatch-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.dispatch-assignee { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
.mini-av { width: 18px; height: 18px; border-radius: 50%; font-size: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }

/* Assignments — when-timeline strip above the board */
.asg-tl-scroll { overflow-x: auto; }
.asg-tl { display: grid; grid-template-columns: 118px repeat(4, minmax(120px,1fr)); gap: 1px; background: var(--border-tertiary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-md); overflow: hidden; min-width: 600px; }
.asg-tl-h { background: var(--bg-secondary); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); padding: 7px 10px; }
.asg-tl-day { background: var(--bg-secondary); padding: 8px 10px; font-size: 11.5px; font-weight: 600; color: var(--text-primary); }
.asg-tl-day span { display: block; font-size: 9.5px; font-weight: 400; color: var(--text-tertiary); margin-top: 1px; }
.asg-tl-cell { background: var(--bg-primary); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-height: 52px; }
.asg-tl-cell.now { background: var(--bg-info); box-shadow: inset 0 0 0 1.5px var(--brand); }
.asg-tl-cell.load-hi { background: var(--bg-danger); }
.asg-tl-cell.now.load-hi { background: var(--bg-danger); box-shadow: inset 0 0 0 1.5px var(--brand); }
.asg-tl-empty { color: var(--border-secondary); font-size: 15px; text-align: center; line-height: 42px; user-select: none; }
.asg-chip { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 6px; border-radius: 5px; background: var(--bg-secondary); border-left: 3px solid var(--brand); color: var(--text-primary); cursor: pointer; white-space: nowrap; overflow: hidden; }
.asg-chip:hover { background: var(--bg-info); }
.asg-chip .asg-chip-t { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.asg-chip.done { opacity: 0.5; }
.asg-chip.done .asg-chip-t { text-decoration: line-through; }
.asg-chip.p-high { border-left-color: #C6392F; } .asg-chip.p-low { border-left-color: #3B6D11; }
.pri-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--text-tertiary); }
.pri-dot.p-high { background: #C6392F; } .pri-dot.p-low { background: #3B6D11; }
.asg-tl-more { font-size: 10px; color: var(--text-tertiary); padding: 1px 6px; cursor: pointer; }
.asg-tl-flag { font-size: 9.5px; color: var(--text-danger); font-weight: 600; padding: 0 4px; }

/* Assignments — hour timeline (reuses .tl-* from the shift scheduler) */
#view-assignments .tl-block { cursor: pointer; }
#view-assignments .tl-block.asg-done { opacity: 0.55; }
#view-assignments .tl-block.asg-done .shift-block-title { text-decoration: line-through; }
.asg-tl-band { position: absolute; top: 0; bottom: 0; border: 1px dashed; border-top: none; border-bottom: none; z-index: 0; pointer-events: none; }
.asg-tl-band-lbl { position: absolute; top: 2px; left: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; opacity: 0.75; }
.asg-tray { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 2px 2px; }
.asg-tray-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); font-weight: 600; margin-right: 2px; }
#view-assignments .tl-lane-label:hover { color: var(--brand); }
.asg-tl-morebar { position: absolute; left: 4px; width: 210px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-secondary); background: var(--bg-secondary); border: 0.5px dashed var(--border-secondary); border-radius: var(--radius-sm, 5px); cursor: pointer; z-index: 3; }
.asg-tl-morebar:hover { color: var(--brand); border-color: var(--brand); }
.sev { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.03em; }
.sev.high { background: var(--bg-danger); color: var(--text-danger); }
.sev.med { background: var(--bg-warning); color: var(--text-warning); }
.sev.low { background: var(--bg-success); color: var(--text-success); }

/* Zone dispatch map — schematic floor plan */
.zone-map { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(58px, auto); gap: 10px; }
.zone-tile { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-left: 3px solid var(--border-secondary); border-radius: var(--radius-md); padding: 9px 10px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .06s; min-width: 0; }
.zone-tile:hover { border-color: var(--border-secondary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.zone-tile.covered { border-left-color: #3B6D11; }
.zone-tile.uncovered { border-left-color: var(--border-secondary); background: var(--bg-secondary); }
.zone-tile.hot { border-left-color: #C6392F; box-shadow: 0 0 0 1px rgba(198,57,47,0.25); }
.zone-tile.drag-over { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); transform: scale(1.01); }
.zone-tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.zone-tile-name { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.zone-tile-cov { font-size: 10px; font-weight: 500; color: var(--text-tertiary); white-space: nowrap; }
.zone-tile-cov.ok { color: var(--text-success); }
.zone-tile-cov.warn { color: var(--text-danger); }
.zone-staff { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.zone-av { position: relative; cursor: grab; }
.zone-av:active { cursor: grabbing; }
.zone-av.dragging { opacity: 0.4; }
.zone-av .duty-dot { position: absolute; right: -1px; bottom: -1px; width: 7px; height: 7px; border: 1.5px solid var(--bg-primary); }
.zone-calls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.zone-call { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; padding: 1px 6px; border-radius: 5px; cursor: grab; border: 0.5px solid transparent; }
.zone-call:active { cursor: grabbing; }
.zone-call.dragging { opacity: 0.4; }
.zone-call.high { background: var(--bg-danger); color: var(--text-danger); }
.zone-call.med { background: var(--bg-warning); color: var(--text-warning); }
.zone-call.low { background: var(--bg-success); color: var(--text-success); }
.zone-empty-note { font-size: 10.5px; color: var(--text-tertiary); }
.zone-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 11.5px; color: var(--text-secondary); }
.zone-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.zone-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
@media (max-width: 720px) { .zone-map { grid-template-columns: repeat(4, 1fr); } .zone-tile { grid-column: span 4 !important; grid-row: auto !important; } }

/* Zone map: two-pane layout (floor plan + staff side panel) */
.zonemap-layout { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.zonemap-side { position: sticky; top: 12px; }
@media (max-width: 900px) { .zonemap-layout { grid-template-columns: 1fr; } .zonemap-side { position: static; } }

/* Uploaded venue map + positioned zone pins */
.venue-wrap { position: relative; text-align: center; }
/* the canvas shrink-wraps the fitted image so absolutely-positioned pins (in %) stay aligned */
.venue-canvas { position: relative; display: inline-block; max-width: 100%; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary); border: 0.5px solid var(--border-tertiary); vertical-align: top; }
.venue-canvas.editing { cursor: crosshair; box-shadow: inset 0 0 0 2px var(--brand); }
/* scale the image down to fit both the container width AND the viewport height, whole plan always visible */
.venue-img { display: block; max-width: 100%; max-height: var(--venue-max-h, calc(100vh - 300px)); width: auto; height: auto; user-select: none; -webkit-user-drag: none; }
.zone-pin { position: absolute; transform: translate(-50%, -50%); z-index: 2; min-width: 124px; max-width: 190px; background: var(--bg-primary); border: 1px solid var(--border-tertiary); border-left: 4px solid var(--border-secondary); border-radius: var(--radius-md); padding: 9px 11px; box-shadow: 0 3px 12px rgba(0,0,0,0.2); cursor: pointer; font-size: 12px; }
.zone-pin:hover { box-shadow: 0 5px 18px rgba(0,0,0,0.3); z-index: 3; }
.zone-pin.covered { border-left-color: #3B6D11; }
.zone-pin.uncovered { border-left-color: var(--border-secondary); }
.zone-pin.hot { border-left-color: #C6392F; box-shadow: 0 0 0 2px rgba(198,57,47,0.4), 0 4px 16px rgba(0,0,0,0.3); }
.zone-pin.drag-over { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand); z-index: 4; }
.zone-pin.editing { cursor: grab; }
.zone-pin.editing:active, .zone-pin.editing.dragging { cursor: grabbing; box-shadow: 0 8px 24px rgba(0,0,0,0.34); z-index: 5; }
.zone-pin-name { font-weight: 600; font-size: 13px; color: var(--text-primary); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-pin-avs { display: flex; align-items: center; gap: 2px; margin-top: 5px; }
.zone-pin-avs .mini-av { width: 22px; height: 22px; font-size: 10px; border: 1.5px solid var(--bg-primary); margin-left: -3px; }
.zone-pin-avs .mini-av:first-child { margin-left: 0; }
.zone-pin-empty { font-size: 10.5px; color: var(--text-tertiary); }
.pin-more { font-size: 10.5px; color: var(--text-tertiary); margin-left: 3px; }
.zone-pin-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; flex-wrap: wrap; font-size: 11px; }
.zone-pin-dot { width: 8px; height: 8px; border-radius: 50%; }
.zone-pin-hint { font-size: 9.5px; color: var(--brand); margin-top: 4px; font-weight: 500; }
.zone-pin-x { position: absolute; top: -9px; right: -9px; width: 21px; height: 21px; border-radius: 50%; background: var(--bg-danger); color: var(--text-danger); font-size: 14px; line-height: 19px; text-align: center; border: 1px solid var(--border-tertiary); cursor: pointer; font-weight: 700; z-index: 6; }

/* Floor selector tabs */
.floor-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.floor-tab { position: relative; padding: 6px 14px; font-size: 12px; font-weight: 500; border-radius: 16px; border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-secondary); cursor: pointer; font-family: inherit; }
.floor-tab:hover { border-color: var(--border-primary); color: var(--text-primary); }
.floor-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.floor-hot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #C6392F; margin-left: 6px; vertical-align: middle; }
.floor-tab.active .floor-hot { background: #fff; }
.venue-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 48px 20px; text-align: center; border: 1.5px dashed var(--border-secondary); border-radius: var(--radius-md); color: var(--text-tertiary); background: var(--bg-secondary); }
.venue-empty svg { width: 34px; height: 34px; stroke: var(--text-tertiary); fill: none; stroke-width: 1.4; }

/* Unplaced-zone tray (edit mode) */
.zone-tray { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tray-chip { font-size: 11.5px; padding: 4px 10px; border-radius: 14px; border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-secondary); cursor: pointer; }
.tray-chip.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.tray-chip.placed { opacity: 0.5; }

/* Staff side panel (searchable, drag-to-assign) */
.staff-panel { background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); overflow: hidden; }
.staff-panel-head { padding: 12px 12px 8px; border-bottom: 0.5px solid var(--border-tertiary); }
.staff-panel-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; justify-content: space-between; }
.staff-panel-hint { font-size: 10.5px; color: var(--text-tertiary); margin-top: 3px; }
.staff-panel-list { max-height: 62vh; overflow-y: auto; padding: 6px; }
.staff-drag { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-md); cursor: grab; border: 0.5px solid transparent; }
.staff-drag:hover { background: var(--bg-secondary); border-color: var(--border-tertiary); }
.staff-drag:active { cursor: grabbing; }
.staff-drag.dragging { opacity: 0.4; }
.staff-drag-main { min-width: 0; flex: 1; }
.staff-drag-name { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.staff-drag-sub { font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Event clock bar + current-shift highlight (shift rotation) */
.clock-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--bg-secondary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 12px; }
.clock-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); }
.clock-val { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.clock-now { font-size: 12px; font-weight: 600; color: var(--text-tertiary); padding: 3px 10px; border-radius: 12px; background: var(--bg-primary); }
.clock-now.on { color: var(--text-success); background: var(--bg-success); }
.clock-ctrls { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.shift-block.shift-now { outline: 2px solid var(--brand); outline-offset: 1px; box-shadow: 0 0 0 3px rgba(55,138,221,0.18); }
.shift-live { font-size: 9px; font-weight: 700; color: var(--text-success); }

/* Zone-team member controls (volunteer field-manager view) */
.tm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .tm-grid { grid-template-columns: 1fr; } }

/* Shift time / break tracking */
.tm-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--text-secondary); margin-bottom: 12px; padding: 8px 10px; background: var(--bg-secondary); border-radius: var(--radius-md); }
.tm-stats b { color: var(--text-primary); font-weight: 600; }
.brk-txt-due { color: var(--text-warning); font-weight: 600; }
.brk-txt-bad { color: var(--text-danger); font-weight: 600; }
.brk-txt-due b, .brk-txt-bad b { color: inherit; }
.brk-pill { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 6px; border-radius: 6px; }
.brk-pill.due { background: var(--bg-warning); color: var(--text-warning); }
.brk-pill.bad { background: var(--bg-danger); color: var(--text-danger); }
.break-banner { background: var(--bg-danger); color: var(--text-danger); border: 0.5px solid var(--text-danger); border-radius: var(--radius-md); padding: 10px 14px; font-size: 12.5px; font-weight: 500; margin-bottom: 12px; }

/* Hotel grid */
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px; }
.room-card { background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); padding: 14px; }
.room-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.room-num { font-size: 14px; font-weight: 600; }
.room-type { font-size: 11px; color: var(--text-tertiary); }
.room-occ { display: flex; flex-direction: column; gap: 6px; }
.room-person { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.room-empty { font-size: 11.5px; color: var(--text-tertiary); font-style: italic; padding: 3px 0; }
.room-bar { height: 3px; border-radius: 2px; background: var(--bg-secondary); margin-top: 12px; overflow: hidden; }
.room-bar-fill { height: 100%; background: var(--brand); }

/* Resources */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.res-card { background: var(--bg-primary); border: 0.5px solid var(--border-tertiary); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color 0.1s; position: relative; }
.res-card:hover { border-color: var(--border-secondary); }
.res-icon { width: 38px; height: 38px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.res-icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.res-icon.map { background: var(--bg-info); color: var(--text-info); }
.res-icon.doc { background: var(--bg-warning); color: var(--text-warning); }
.res-icon.train { background: var(--bg-purple); color: var(--text-purple); }
.res-icon.video { background: var(--bg-danger); color: var(--text-danger); }
.res-title { font-size: 13px; font-weight: 600; }
.res-meta { font-size: 11px; color: var(--text-tertiary); }
.res-req { position: absolute; top: 12px; right: 12px; }

/* Profile */
.profile-section { padding: 18px; }
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-av { width: 52px; height: 52px; border-radius: 50%; background: var(--bg-success); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--text-success); flex-shrink: 0; }
.profile-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.profile-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.profile-divider { border: none; border-top: 0.5px solid var(--border-tertiary); margin: 12px 0; }
.profile-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.profile-row-label { font-size: 11px; color: var(--text-tertiary); min-width: 80px; padding-top: 3px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-row-val { font-size: 12px; color: var(--text-primary); flex: 1; line-height: 1.5; }
.skill-tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 10px; background: var(--bg-secondary); color: var(--text-secondary); margin: 3px 3px 0 0; }
.skill-tag.cert { background: var(--bg-purple); color: var(--text-purple); }
.skill-tag.job { background: var(--bg-success); color: var(--text-success); }

/* Ratings */
.rating-big { display: flex; align-items: baseline; gap: 6px; padding: 16px 18px 8px; }
.rating-num { font-size: 36px; font-weight: 600; color: var(--text-primary); line-height: 1; }
.rating-detail { display: flex; flex-direction: column; gap: 3px; }
.rating-stars { display: flex; gap: 3px; }
.rating-star { width: 13px; height: 13px; background: #BA7517; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); }
.rating-star.empty { background: var(--border-tertiary); padding: 0; }
.rating-count { font-size: 11px; color: var(--text-tertiary); }

/* Interest / signup buttons */
.interest-btn { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-md); cursor: pointer; border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-primary); font-family: inherit; }
.interest-btn:hover { background: var(--bg-secondary); }
.interest-btn.expressed { background: var(--bg-info); color: var(--text-info); border-color: transparent; }

/* Shift list (volunteer) */
.shift-row { padding: 12px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; gap: 12px; }
.shift-row:last-child { border-bottom: none; }
.shift-time { font-size: 12px; font-weight: 500; color: var(--text-primary); min-width: 82px; flex-shrink: 0; line-height: 1.4; }
.shift-dot { width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.shift-info { flex: 1; min-width: 0; }
.shift-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.shift-dept { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* Announcements (volunteer) */
.announce-item { padding: 13px 18px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; gap: 12px; align-items: flex-start; }
.announce-item:last-child { border-bottom: none; }
.announce-icon { width: 28px; height: 28px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.announce-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.announce-icon.email { background: var(--bg-info); color: var(--text-info); }
.announce-icon.announce { background: var(--bg-warning); color: var(--text-warning); }
.announce-icon.reminder { background: var(--bg-success); color: var(--text-success); }
.announce-body { flex: 1; }
.announce-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.announce-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.announce-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex-shrink: 0; }

/* On-duty status toggle */
.duty-toggle { display: inline-flex; border: 0.5px solid var(--border-secondary); border-radius: var(--radius-md); overflow: hidden; }
.duty-toggle button { padding: 6px 12px; font-size: 11.5px; font-weight: 500; background: var(--bg-primary); color: var(--text-secondary); border: none; cursor: pointer; font-family: inherit; border-right: 0.5px solid var(--border-tertiary); }
.duty-toggle button:last-child { border-right: none; }
.duty-toggle button.on-avail.sel { background: var(--bg-success); color: var(--text-success); }
.duty-toggle button.on-call.sel { background: var(--bg-warning); color: var(--text-warning); }
.duty-toggle button.on-break.sel { background: var(--bg-secondary); color: var(--text-secondary); }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-secondary); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 11px; font-size: 12.5px; border-radius: var(--radius-md); border: 0.5px solid var(--border-secondary); background: var(--bg-primary); color: var(--text-primary); font-family: inherit; }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-primary); border-radius: var(--radius-lg); width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); border: 0.5px solid var(--border-tertiary); animation: pop 0.12s ease-out; }
.modal.wide { max-width: 660px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { padding: 16px 20px; border-bottom: 0.5px solid var(--border-tertiary); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 14px; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-tertiary); font-size: 20px; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 0.5px solid var(--border-tertiary); display: flex; justify-content: flex-end; gap: 8px; }

/* Toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text-primary); color: var(--bg-primary); padding: 11px 16px; border-radius: var(--radius-md); font-size: 12.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; animation: slidein 0.16s ease-out; max-width: 320px; }
.toast svg { width: 15px; height: 15px; stroke: #3B6D11; fill: none; stroke-width: 2.4; flex-shrink: 0; }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-tertiary); font-size: 12.5px; }

/* Batch room editor — add/edit many rooms in one block at once */
.room-editor { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin-bottom: 4px; }
.room-editor-row { display: grid; grid-template-columns: 1fr 72px 140px 64px 100px; gap: 8px; align-items: center; }
.room-editor-row input, .room-editor-row select { padding: 6px 8px; font-size: 12.5px; }
.room-editor-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); padding: 0 2px; }
.room-editor-row.is-new input, .room-editor-row.is-new select { border-color: var(--accent, #378ADD); }
@media (max-width: 640px) {
  .room-editor-row { grid-template-columns: 1fr 1fr; grid-template-areas: "num num" "floor type" "cap remove"; }
  .room-editor-head { display: none; }
}

/* Event timeline — read view */
.timeline-list { display: flex; flex-direction: column; gap: 9px; }
.timeline-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.timeline-check { width: auto; margin: 0; cursor: pointer; flex-shrink: 0; }
.timeline-pill { min-width: 56px; text-align: center; flex-shrink: 0; }
.timeline-title { color: var(--text-primary); }
.timeline-row.is-done .timeline-title { color: var(--text-tertiary); text-decoration: line-through; }

/* Event timeline — editor rows */
.ms-editor { display: flex; flex-direction: column; gap: 8px; }
.ms-row { display: grid; grid-template-columns: auto 1fr 150px auto; gap: 8px; align-items: center; }
.ms-row input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; }
@media (max-width: 640px) {
  .ms-row { grid-template-columns: auto 1fr; grid-template-areas: "chk title" "date remove"; }
  .ms-row input[type="date"] { grid-area: date; }
  .ms-row button { grid-area: remove; }
}

/* Shift scheduler timeline */
.tl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 4px 14px; }
.tl-day-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tl-day-tab { font-size: 11.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-secondary, #ddd); background: var(--bg-primary); color: var(--text-secondary); cursor: pointer; text-align: center; }
.tl-day-tab .tl-day-tab-date { display: block; font-size: 9.5px; color: var(--text-tertiary); }
.tl-day-tab.active { background: var(--accent, #378ADD); color: #fff; border-color: var(--accent, #378ADD); }
.tl-day-tab.active .tl-day-tab-date { color: rgba(255,255,255,.8); }
.tl-day-tab.is-setup:not(.active) { border-style: dashed; }
.tl-zoom { display: inline-flex; border: 1px solid var(--border-secondary, #ddd); border-radius: var(--radius-md, 8px); overflow: hidden; }
.tl-zoom-btn { font-size: 11.5px; padding: 6px 12px; border: none; background: var(--bg-primary); color: var(--text-secondary); cursor: pointer; border-right: 1px solid var(--border-secondary, #ddd); }
.tl-zoom-btn:last-child { border-right: none; }
.tl-zoom-btn.active { background: var(--accent, #378ADD); color: #fff; }

.tl-scroll { overflow-x: auto; padding-bottom: 6px; }
.tl-axis { position: relative; height: 22px; font-size: 10.5px; color: var(--text-tertiary); border-bottom: 1px solid var(--border-tertiary); margin-bottom: 4px; }
.tl-hour { position: absolute; top: 0; transform: translateX(-2px); white-space: nowrap; }
.tl-plus1 { opacity: .6; font-size: 9px; }

.tl-lane { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-tertiary); }
.tl-lane-label { flex-shrink: 0; font-size: 11.5px; font-weight: 500; color: var(--text-secondary); padding: 8px 10px 8px 0; display: flex; align-items: center; }
.tl-lane-track { position: relative; flex-shrink: 0; }
.tl-lane-track.drag-over { background-color: var(--bg-info, rgba(55,138,221,.08)); }

.tl-now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text-danger, #c0392b); z-index: 2; pointer-events: none; }
.tl-now-line::before { content: ''; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-danger, #c0392b); }

.tl-block { position: absolute; border-radius: 6px; padding: 4px 8px; cursor: grab; overflow: hidden; box-sizing: border-box;
            border: 1px solid rgba(0,0,0,.08); font-size: 11px; line-height: 1.35; }
.tl-block:active { cursor: grabbing; }
.tl-block.dragging { opacity: .4; }
.tl-block .shift-block-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-block .shift-block-fill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }

/* Shift grid headers: Day number over the calendar date */
.shift-head .shift-daynum { display: block; font-weight: 600; }
.shift-head .shift-daydate { display: block; font-size: 10.5px; font-weight: 400; color: var(--text-tertiary); margin-top: 1px; }
/* Setup / load-in days are working days, but read as pre-event */
.shift-head-setup { background: var(--bg-secondary); }
.shift-head-setup .shift-daynum { color: var(--text-secondary); }

/* Event row actions */
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-current { font-size: 11px; color: var(--text-tertiary); margin-right: 2px; }

/* Delete confirmation: what is about to be destroyed */
.delete-manifest { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius-md, 8px);
                   background: var(--bg-danger, #3a1c1c); color: var(--text-danger, #f3b0b0); font-size: 12.5px; }
.delete-manifest b { font-variant-numeric: tabular-nums; }

/* Department templates — a menu of suggestions, not defaults */
.tpl-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tpl-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
            border: 1px solid var(--border-secondary, #ddd); background: var(--bg-primary); color: var(--text-primary); font-size: 12.5px; }
.tpl-chip:hover { border-color: var(--accent, #378ADD); }
.tpl-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.tpl-name { font-weight: 500; }
.tpl-plus { color: var(--text-tertiary); font-size: 15px; line-height: 1; }

/* Operations: department switcher + cross-team (shared) calls */
.ops-switch { display: inline-flex; align-items: center; gap: 8px; }
.ops-switch-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); }
.ops-tag { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; margin-left: auto; margin-right: 6px;
           background: var(--bg-tertiary); color: var(--text-secondary); white-space: nowrap; }
.ops-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); cursor: pointer; }
.ops-toggle input { width: auto; margin: 0; cursor: pointer; }
/* A shared call is another team's work: present, but visually secondary. */
.dispatch-card.dispatch-shared { opacity: .72; border-style: dashed; }
.dispatch-card.dispatch-shared:hover { opacity: 1; }

/* First-run state for an organization with no events yet */
.empty-first-run { max-width: 460px; margin: 8vh auto; text-align: center; padding: 0 20px; }
.empty-first-run h2 { font-size: 19px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-first-run p { font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 20px; }

/* Radio code badge */
.code-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.02em; }

/* Rank badge (staffer hierarchy) */
.rank { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 5px; letter-spacing: 0.02em; background: var(--bg-secondary); color: var(--text-secondary); white-space: nowrap; }
.rank-director { background: var(--bg-purple); color: var(--text-purple); }
.rank-supervisor { background: var(--bg-info); color: var(--text-info); }
.rank-lead { background: var(--bg-success); color: var(--text-success); }
.rank-seniorstaffer { background: var(--bg-warning); color: var(--text-warning); }
.rank-staffer { background: var(--bg-secondary); color: var(--text-secondary); }
.rank-trainee { background: var(--bg-secondary); color: var(--text-tertiary); }
.staffer-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-secondary); border-radius: 14px; padding: 3px 4px 3px 3px; font-size: 12px; margin: 0 4px 4px 0; }
.staffer-chip .rm { cursor: pointer; color: var(--text-tertiary); font-weight: 700; padding: 0 4px; }
.staffer-chip .rm:hover { color: var(--text-danger); }
.staffer-chip.lead { background: var(--bg-info); }

/* Compact density (Settings) */
:root.compact table.tbl th { padding-top: 6px; padding-bottom: 6px; }
:root.compact table.tbl td { padding-top: 6px; padding-bottom: 6px; }
:root.compact .vol-row, :root.compact .dept-row, :root.compact .comms-item, :root.compact .event-row, :root.compact .shift-row, :root.compact .announce-item, :root.compact .feedback-item { padding-top: 7px; padding-bottom: 7px; }
:root.compact .card-header { padding-top: 10px; padding-bottom: 10px; }
:root.compact .metric { padding: 12px; }
:root.compact .content { gap: 14px; }
:root.compact .view { gap: 14px; }
.divider { border: none; border-top: 0.5px solid var(--border-tertiary); }
.section-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin: 4px 0; font-weight: 600; }

@media (max-width: 1024px) {
  .two-col, .two-col.even { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dispatch-board { grid-template-columns: repeat(2, 1fr); }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .hamburger { display: block; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .dispatch-board { grid-template-columns: 1fr; }
  .notif-panel { position: fixed; top: 60px; right: 12px; left: 12px; width: auto; }
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 39; }
.scrim.open { display: block; }

/* ---------- reviews ---------- */
.star-pick { display: flex; align-items: center; gap: 2px; }
.star-pick button { background: none; border: none; cursor: pointer; font-size: 26px; line-height: 1; padding: 0 2px; color: var(--border-secondary); transition: color 0.1s, transform 0.1s; }
.star-pick button.on { color: #BA7517; }
.star-pick button:hover { transform: scale(1.12); }
.star-pick-label { margin-left: 10px; font-size: 12px; color: var(--text-tertiary); }
.fb-note { font-size: 11.5px; color: var(--text-tertiary); margin-top: 6px; }
.fb-flag { color: var(--text-danger); }
.feedback-item.fb-hidden { opacity: 0.6; }
.fb-history { margin-top: 6px; font-size: 11.5px; color: var(--text-tertiary); }
.fb-history summary { cursor: pointer; }
.audit-action { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: var(--bg-secondary); color: var(--text-secondary); white-space: nowrap; }
.audit-action.created { color: var(--text-success); }
.audit-action.reported, .audit-action.deleted, .audit-action.hidden { color: var(--text-danger); }

/* Wordmark: "CrewHub" with a small product label underneath (sidebar + sign-in) */
.brand-word { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-sub { font-size: 0.6em; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-tertiary); margin-top: 2px; }
