/* =========================================================
   NAVSHAKTI COMMAND CENTER — Brand Palette Theme
   Primary:  #670004 (Dark Crimson), #ab2100 (Ruby Red)
   Accent:   #ffd88b (Warm Gold), #c8860a (Shiny Gold)
   DEFAULT:  Light Mode (High Contrast & Clean)
   ========================================================= */

/* ── LIGHT MODE (DEFAULT) ───────────────────────────────── */
:root, [data-theme="light"] {
  --bg-primary:          #fcf6ee;
  --bg-card:             #ffffff;
  --bg-card-hover:       #faf0e6;
  --bg-card-active:      #f5e3d3;
  --bg-sunken:           #f6e7d8;
  --bg-input:            #ffffff;
  --bg-header:           #670004;
  --bg-header-bottom:    #4a0003;

  --border-color:        #ebd2be;
  --border-accent:       #ab2100;
  --border-subtle:       #f2dece;

  --text-primary:        #260204;
  --text-secondary:      #670004;
  --text-muted:          #8c4e43;
  --text-on-dark:        #fff5f0;
  --text-placeholder:    #a66e62;

  --accent-gold:         #c8860a;
  --accent-gold-light:   #ffd88b;
  --accent-shiny:        #9a6200;
  --accent-amber:        #b87800;
  --accent-red:          #ab2100;
  --accent-crimson:      #670004;
  --accent-bright:       #d43000;

  --accent-green:        #15803d;
  --accent-green-bg:     rgba(21, 128, 61, 0.12);
  --accent-green-text:   #15803d;
  --accent-orange:       #c2410c;
  --accent-purple:       #7e22ce;

  --count-zero-color:    #9c6458;
  --count-active-bg:     #ffe8e0;
  --count-active-color:  #ab2100;
  --count-active-border: #f8ad9a;
  --count-high-bg:       #fef3c7;
  --count-high-color:    #854d0e;
  --count-high-border:   #fde047;

  --card-shadow:         0 2px 12px rgba(103, 0, 4, 0.07);
  --modal-shadow:        0 12px 45px rgba(103, 0, 4, 0.25);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* ── DARK MODE ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-primary:          #0d0204;
  --bg-card:             #170507;
  --bg-card-hover:       #24080b;
  --bg-card-active:      #2e0c10;
  --bg-sunken:           #0a0102;
  --bg-input:            #120305;
  --bg-header:           #1e0205;
  --bg-header-bottom:    #100102;

  --border-color:        #3a0a0c;
  --border-accent:       #ab2100;
  --border-subtle:       #260507;

  --text-primary:        #fff5f0;
  --text-secondary:      #e29f8f;
  --text-muted:          #9a5040;
  --text-on-dark:        #fff5f0;
  --text-placeholder:    #7a3a30;

  --accent-gold:         #ffd88b;
  --accent-gold-light:   #ffd88b;
  --accent-shiny:        #c8860a;
  --accent-amber:        #e8a020;
  --accent-red:          #ab2100;
  --accent-crimson:      #670004;
  --accent-bright:       #ff4012;

  --accent-green:        #22c55e;
  --accent-green-bg:     rgba(34, 197, 94, 0.15);
  --accent-green-text:   #4ade80;
  --accent-orange:       #f97316;
  --accent-purple:       #c084fc;

  --count-zero-color:    #6a3028;
  --count-active-bg:     rgba(171, 33, 0, 0.28);
  --count-active-color:  #ff9c85;
  --count-active-border: rgba(171, 33, 0, 0.6);
  --count-high-bg:       rgba(255, 216, 139, 0.22);
  --count-high-color:    #ffd88b;
  --count-high-border:   rgba(255, 216, 139, 0.5);

  --card-shadow:         0 4px 16px rgba(0, 0, 0, 0.45);
  --modal-shadow:        0 14px 50px rgba(0, 0, 0, 0.85);
}

/* ── Base & Global Reset ───────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Header ────────────────────────────────────────────── */
.top-header {
  background: linear-gradient(180deg, var(--bg-header) 0%, var(--bg-header-bottom) 100%);
  border-bottom: 2px solid var(--border-accent);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 25px rgba(103, 0, 4, 0.4);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--accent-gold-light);
  box-shadow: 0 0 18px rgba(255, 216, 139, 0.6);
  background-color: #000;
  display: block;
  flex-shrink: 0;
}

.brand-badge {
  background: linear-gradient(135deg, #ffd88b, #c8860a);
  color: #1a0000;
  font-weight: 800;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 2px;
}

.brand-title h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-on-dark);
}

.brand-subtitle {
  font-size: 11px;
  color: #e2b0a3;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 216, 139, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-on-dark);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s infinite;
}

.status-dot.disconnected {
  background-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

@keyframes pulse-dot {
  0%   { transform: scale(0.95); opacity: 0.8; }
  50%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.venue-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #ffd88b;
}

/* Header Buttons */
.top-header .btn-action {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 216, 139, 0.3);
  color: var(--text-on-dark);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.top-header .btn-action:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: #ffd88b;
  color: #ffd88b;
  transform: translateY(-1px);
}

.top-header .btn-danger {
  background: rgba(171, 33, 0, 0.5);
  border-color: rgba(255, 128, 96, 0.6);
  color: #ffd0c7;
}

.top-header .btn-danger:hover {
  background: rgba(171, 33, 0, 0.8);
  border-color: #ff6040;
  color: #ffffff;
}

/* ── Stats Overview Bar ─────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px 24px 8px 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-red);
}

.stat-card.alert-card {
  border-color: var(--accent-red);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-value.sos-count {
  color: var(--accent-red);
}

/* ── SOS Emergency Beacon Panel ─────────────────────────── */
.sos-panel {
  margin: 12px 24px 0 24px;
  background: linear-gradient(90deg, #3a0303 0%, #1a0404 100%);
  border: 2px solid var(--accent-red);
  border-radius: 12px;
  padding: 16px 20px;
  animation: flash-border 1.5s infinite;
  display: none;
}

.sos-panel.active { display: block; }

@keyframes flash-border {
  0%   { box-shadow: 0 0 15px rgba(171, 33, 0, 0.35); }
  50%  { box-shadow: 0 0 35px rgba(171, 33, 0, 0.85); }
  100% { box-shadow: 0 0 15px rgba(171, 33, 0, 0.35); }
}

.sos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sos-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fca5a5;
  font-weight: 800;
  font-size: 15px;
}

.sos-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sos-item {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(171, 33, 0, 0.5);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sos-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sos-caller {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.sos-meta {
  font-size: 12px;
  color: #fca5a5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-resolve {
  background: var(--accent-green);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-resolve:hover { opacity: 0.9; }

/* ── Section Boxes ───────────────────────────────────────── */
.matrix-section {
  padding: 16px 24px 8px 24px;
}

.section-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.matrix-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.matrix-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.matrix-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Search Input ────────────────────────────────────────── */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
  stroke: var(--text-muted);
}

.search-input-wrapper input {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 32px 9px 36px;
  border-radius: 8px;
  font-size: 12.5px;
  width: 320px;
  transition: all 0.2s;
  outline: none;
}

.search-input-wrapper input::placeholder {
  color: var(--text-placeholder);
}

.search-input-wrapper input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 10px rgba(171, 33, 0, 0.2);
  width: 360px;
}

.search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

/* ── Search Results Panel ────────────────────────────────── */
.search-results-panel {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  max-height: 280px;
  overflow-y: auto;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 12px;
}

.search-results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.search-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-item:hover {
  border-color: var(--accent-red);
  background: var(--bg-card-hover);
}

/* ── Live Deployment Matrix Table ────────────────────────── */
.matrix-container {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.matrix-table th, .matrix-table td {
  padding: 10px 10px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.matrix-table th {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.matrix-table th.team-col-header {
  text-align: left;
  min-width: 210px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
}

.team-row-header {
  text-align: left !important;
  font-weight: 700;
  position: sticky;
  left: 0;
  background: var(--bg-card);
  color: var(--text-primary) !important;
  z-index: 1;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.team-row-header:hover {
  background: var(--bg-card-hover) !important;
  color: var(--accent-red) !important;
}

.team-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary) !important;
}

.team-title-wrap span {
  color: var(--text-primary) !important;
}

.team-color-indicator {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.cell-count-btn {
  font-family: var(--font-mono);
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-block;
  min-width: 28px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: transparent;
}

.count-zero {
  color: var(--count-zero-color);
  opacity: 0.65;
  cursor: default;
}

.count-active {
  background: var(--count-active-bg);
  color: var(--count-active-color);
  border-color: var(--count-active-border);
  font-weight: 800;
}

.count-active:hover {
  transform: scale(1.1);
}

.count-high {
  background: var(--count-high-bg);
  color: var(--count-high-color);
  border-color: var(--count-high-border);
  font-weight: 800;
}

.count-high:hover {
  transform: scale(1.1);
}

.matrix-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.matrix-timestamp {
  font-family: var(--font-mono);
  color: var(--accent-green);
  font-weight: 700;
}

/* ── Lower Feeds Split Grid ──────────────────────────────── */
.feeds-grid {
  padding: 8px 24px 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .feeds-grid { grid-template-columns: 1fr; }
}

.checkins-feed-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkin-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}

.checkin-item:hover {
  border-color: var(--accent-red);
}

.checkin-user {
  font-weight: 700;
  color: var(--text-primary);
}

.checkin-zone {
  color: var(--accent-red);
  font-weight: 700;
}

.checkin-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── Comms Feed ──────────────────────────────────────────── */
.chat-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.filter-chip:hover {
  border-color: var(--accent-red);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--accent-red), #670004);
  color: #ffd88b;
  font-weight: 800;
  border-color: var(--accent-red);
}

.messages-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.message-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  position: relative;
  transition: border-color 0.2s;
}

.message-card:hover {
  border-color: var(--accent-red);
}

.message-card.lead-direct {
  border-left: 4px solid var(--accent-gold);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

.message-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
  flex-wrap: wrap;
}

.sender-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sender-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-primary);
}

.badge-role {
  font-size: 9px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.role-lead {
  background: linear-gradient(135deg, var(--accent-red), #670004);
  color: #ffd88b;
}

.role-vol {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-channel-lead {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-crimson);
  background: rgba(200, 134, 10, 0.15);
  border: 1px solid var(--accent-gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.badge-channel-dept {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-red);
  background: rgba(171, 33, 0, 0.12);
  border: 1px solid rgba(171, 33, 0, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.message-body {
  font-size: 12.5px;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.msg-time {
  color: var(--text-secondary);
}

.hop-badge {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Action Buttons ──────────────────────────────────────── */
.btn-action {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-danger {
  background: rgba(171, 33, 0, 0.15);
  border-color: rgba(171, 33, 0, 0.4);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(171, 33, 0, 0.3);
}

/* ── Modal Overlay & Dialogs ─────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  box-shadow: var(--modal-shadow);
  overflow: hidden;
}

.modal-card-lg { max-width: 760px; }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card-hover);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-secondary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--accent-red); }

.modal-body { padding: 20px; }

.modal-body label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-select, .form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 8px rgba(171, 33, 0, 0.2);
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1.5px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-card-hover);
}

/* ── Drill-Down & Review Roster List ─────────────────────── */
.drilldown-list {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.volunteer-roster-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--card-shadow);
}

.volunteer-roster-card:hover {
  border-color: var(--accent-red);
}

.vol-profile-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vol-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-secondary);
}

.vol-details h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.vol-meta-info {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  margin-top: 2px;
  flex-wrap: wrap;
}

/* ── CSV Dropzone ────────────────────────────────────────── */
.csv-upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: all 0.2s;
}

.csv-upload-dropzone:hover {
  border-color: var(--accent-red);
  background: var(--bg-card-hover);
}

.import-result-box {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
}

/* ── Matrix View Toggle & Smart Grid ─────────────────────── */
.matrix-view-toggle {
  display: inline-flex;
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.matrix-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.matrix-toggle-btn:hover {
  color: var(--text-primary);
}

.matrix-toggle-btn.active {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-crimson));
  color: #ffd88b;
  box-shadow: 0 1px 6px rgba(171, 33, 0, 0.25);
}

/* ── Comms Navigation Bar (Chips + Dropdown) ─────────────── */
.comms-navigation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.comms-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.comms-dropdown-wrap {
  min-width: 200px;
  flex: 1;
  max-width: 280px;
}

.comms-dept-select {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
  width: 100%;
}

.comms-dept-select:focus {
  border-color: var(--accent-red);
}

/* ── Priority Badges in Review Station ───────────────────── */
.badge-priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.badge-priority-1 {
  background: rgba(171, 33, 0, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(171, 33, 0, 0.4);
}

.badge-priority-2 {
  background: rgba(200, 134, 10, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(200, 134, 10, 0.4);
}

.badge-priority-3 {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-priority-4 {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-priority-5 {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.allotment-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
}

.allotment-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary) !important;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.allotment-item span {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.allotment-item:hover {
  background: var(--bg-card-hover);
}
