/* ============================================================
   style.css — DC Ballot Initiative Dispatch App
   ============================================================ */

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

/* Loading screen */
#loading-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #1a2e1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s;
}
#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
.loading-content {
  text-align: center;
}
.loading-horse {
  font-size: 64px;
  animation: gallop 0.6s ease-in-out infinite;
}
@keyframes gallop {
  0%, 100% { transform: translateY(0) scaleX(1); }
  25% { transform: translateY(-18px) scaleX(1); }
  50% { transform: translateY(0) scaleX(1); }
  75% { transform: translateY(-12px) scaleX(1); }
}
.loading-text {
  margin-top: 16px;
  color: #a5d6a7;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

:root {
  --sidebar-width: 280px;
  --panel-width: 380px;
  --header-height: 110px;
  --bg: #ededed;
  --card-bg: #fff;
  --border: #d5d5d5;
  --text: #000;
  --text-light: #444;
  --primary: #5AE200;
  --primary-dark: #4bc700;
  --primary-light: #e6ffd6;
  --accent-orange: #FF8E00;
  --accent-blue: #00B9FF;
  --accent-yellow: #FFEB00;
  --danger: #c62828;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ---- HEADER ---- */
.app-header {
  height: var(--header-height);
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1000;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.stats-bar {
  display: flex;
  gap: 20px;
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

.stat { font-weight: 600; }

.dispatcher-badge {
  background: var(--primary);
  color: #000;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
  margin-left: 8px;
}

.active-dispatchers {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  align-items: center;
}

.dispatcher-pip {
  background: #e3f2fd;
  color: #1565c0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.region-picker {
  background: rgba(90,226,0,0.2);
  border: 1px solid rgba(90,226,0,0.4);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.region-picker option { color: #333; background: #fff; }

.district-type-picker {
  background: rgba(90,226,0,0.2);
  border: 1px solid rgba(90,226,0,0.4);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.district-type-picker option { color: #333; background: #fff; }

.date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.date-nav button {
  background: rgba(90,226,0,0.2);
  border: 1px solid rgba(90,226,0,0.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.date-nav button:hover:not(:disabled) { background: rgba(90,226,0,0.4); }
.date-nav button:disabled { opacity: 0.4; cursor: default; }

#current-date-label {
  font-size: 16px;
  font-weight: 700;
  min-width: 280px;
  text-align: center;
}

#date-picker {
  background: rgba(90,226,0,0.15);
  border: 1px solid rgba(90,226,0,0.3);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

#date-counter {
  font-size: 11px;
  opacity: 0.8;
}

.nav-divider {
  opacity: 0.4;
  margin: 0 2px;
}

.nav-toggle {
  background: rgba(90,226,0,0.15);
  border: 1px solid rgba(90,226,0,0.3);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.nav-toggle.active { background: rgba(90,226,0,0.4); }
.nav-toggle:hover { background: rgba(90,226,0,0.5); }

#animal-picker {
  background: rgba(90,226,0,0.15);
  border: 1px solid rgba(90,226,0,0.3);
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
#animal-picker option { color: #333; background: #fff; }

/* ---- IDEAS PANEL ---- */
.ideas-panel {
  position: fixed;
  top: var(--header-height);
  right: 20px;
  width: 420px;
  max-height: 60vh;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.ideas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
  font-size: 14px;
}

.ideas-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

.ideas-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
}

.ideas-input-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.ideas-input-row button {
  background: #000;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.ideas-input-row button:hover { background: var(--primary); color: #000; }

#ideas-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 14px;
}

.idea-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.idea-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.idea-text { flex: 1; line-height: 1.4; }

.idea-done .idea-text {
  text-decoration: line-through;
  color: #999;
}

.idea-date {
  font-size: 10px;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
}

.idea-remove {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0.5;
}
.idea-remove:hover { opacity: 1; }

.hidden-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.restore-btn {
  background: #000;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.restore-btn:hover { background: var(--primary); color: #000; }

.vol-hide-btn {
  width: 100%;
  margin-top: 6px;
  padding: 4px 8px;
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.vol-hide-btn:hover { background: #ffcdd2; }

/* ---- LAYOUT ---- */
.app-body {
  display: flex;
  height: calc(100vh - var(--header-height));
}

/* ---- Panel collapse ---- */
.panel-collapse-btn {
  position: absolute;
  top: 8px;
  right: -18px;
  z-index: 10;
  width: 18px;
  height: 36px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-light);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}
.panel-collapse-btn:hover { background: var(--bg); }

.panel-collapse-right {
  right: auto;
  left: -18px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  box-shadow: -2px 0 4px rgba(0,0,0,0.1);
}

.volunteer-panel.collapsed,
.shift-panel.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  border: none;
  padding: 0;
}

.volunteer-panel.collapsed > *:not(.panel-collapse-btn),
.shift-panel.collapsed > *:not(.panel-collapse-btn) {
  display: none;
}

.volunteer-panel.collapsed .panel-collapse-btn {
  right: -18px;
}

.shift-panel.collapsed .panel-collapse-btn {
  left: -18px;
}

/* ---- LEFT SIDEBAR — Volunteers ---- */
.volunteer-panel {
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width 0.2s ease;
}

.panel-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  background: #000;
  color: var(--primary);
}

#volunteer-search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  margin-top: 6px;
}

.filter-section {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.filter-label {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
}

.filter-section select {
  flex: 1;
  padding: 3px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  background: #fff;
}

#volunteer-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px;
}

.ward-section { margin-bottom: 2px; }

.ward-header {
  padding: 6px 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f8f8;
  border-left: 3px solid #ccc;
  user-select: none;
}

.ward-header:hover { background: #f0f0f0; }

.ward-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ward-count { color: var(--text-light); font-weight: 400; }

.ward-section.collapsed .ward-volunteers { display: none; }

.ward-volunteers { padding: 2px 4px; }

.volunteer-card {
  padding: 6px 8px;
  margin: 3px 4px;
  border-radius: 14px;
  cursor: grab;
  font-size: 12px;
  border: 1px solid #d5d5d5;
  background: #ededed;
  transition: all 0.15s;
}

.volunteer-card:hover { background: var(--primary-light); border-color: var(--primary-dark); }
.volunteer-card.dragging { opacity: 0.4; }

.volunteer-card.vol-confirmed {
  background: var(--primary-light);
  border: 2px solid var(--primary-dark);
}
.volunteer-card.vol-tentative {
  background: #fff8e1;
  border: 2px dashed var(--accent-orange);
}
.volunteer-card.vol-ghosted {
  background: #f3e5f5;
  border: 2px solid #ce93d8;
  opacity: 0.7;
}
.volunteer-card.vol-declined {
  background: #ffebee;
  border: 2px solid #ef5350;
}
.volunteer-card.vol-ghosted .vol-name-row {
  font-style: italic;
}
.volunteer-card.vol-declined .vol-name-row {
  text-decoration: line-through;
  color: #999;
}

.vol-status-icon {
  margin-right: 3px;
  font-size: 12px;
}

.vol-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.5;
  font-weight: 500;
}

.vol-badges-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding-left: 22px;
}

.vol-badges-row:empty { display: none; }

.trained-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-dark);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.vol-trained {
  display: inline-block;
  background: var(--primary-light);
  color: #2d7a00;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.vol-week-host {
  display: inline-block;
  background: #fff3d6;
  color: #cc7200;
  padding: 1px 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: middle;
  border: 1px solid var(--accent-orange);
}

.vol-week-attend {
  display: inline-block;
  background: var(--primary-light);
  color: #2d7a00;
  padding: 1px 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: middle;
  border: 1px solid var(--primary-dark);
}

.vol-status {
  display: inline-block;
  background: #d6f2ff;
  color: #007ab8;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-left: 2px;
  vertical-align: middle;
}

.vol-untrained {
  display: inline-block;
  background: #ffcdd2;
  color: #c62828;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.vol-contact {
  margin-top: 4px;
  padding: 6px;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 11px;
}

.vol-contact a { color: #2d7a00; text-decoration: none; }

.vol-contact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.vol-call-btn, .vol-sms-btn {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}

.vol-call-btn {
  background: var(--primary-light);
  color: #2d7a00 !important;
  border: 1px solid var(--primary-dark);
}
.vol-call-btn:hover { background: #d0f5b0; }

.vol-sms-btn {
  background: #d6f2ff;
  color: #007ab8 !important;
  border: 1px solid var(--accent-blue);
}
.vol-sms-btn:hover { background: #b3e5fc; }

.vol-name-row { word-break: break-word; }

.vol-emoji {
  font-size: 16px;
  margin-right: 3px;
  vertical-align: middle;
}

.vol-skills {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-light);
}

.vol-stats {
  margin-top: 4px;
  font-size: 10px;
  color: #555;
  line-height: 1.4;
}

.vol-notebook { margin-right: 2px; }
.vol-boe { margin-right: 2px; }

.vol-boe-toggle {
  margin-top: 4px;
  font-size: 11px;
}
.vol-boe-toggle label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vol-boe-toggle input { cursor: pointer; }

.vol-notes-section {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #eee;
}

.vol-notes-label {
  font-size: 10px;
  color: #555;
  margin-bottom: 2px;
}

.vol-stampede-notes {
  font-size: 11px;
  color: #555;
  background: #e8eaf6;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.vol-notes-input {
  width: 100%;
  min-height: 40px;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  resize: vertical;
  background: #fffde7;
}

.vol-link-stampede {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #eee;
}

.link-label {
  font-size: 10px;
  color: #555;
  margin-bottom: 3px;
}

.link-search {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
}

.link-results {
  max-height: 120px;
  overflow-y: auto;
}

.link-result {
  padding: 4px 6px;
  cursor: pointer;
  font-size: 11px;
  border-bottom: 1px solid #f0f0f0;
}
.link-result:hover { background: #e3f2fd; }

.link-no-results {
  padding: 4px 6px;
  font-size: 10px;
  color: #999;
  font-style: italic;
}

.vol-emoji-picker {
  margin-top: 6px;
  border-top: 1px solid #eee;
  padding-top: 4px;
}

.emoji-picker-label {
  font-size: 10px;
  color: #999;
  margin-bottom: 2px;
}

.emoji-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.emoji-option {
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  line-height: 1;
  transition: transform 0.1s;
}
.emoji-option:hover {
  transform: scale(1.3);
  background: #e3f2fd;
}

/* ---- MAP ---- */
.map-container {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.district-label {
  background: rgba(255,255,255,0.8) !important;
  border: 1px solid #999 !important;
  border-radius: 3px !important;
  padding: 2px 6px !important;
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

.ward-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-weight: 700;
  font-size: 12px;
  color: #555;
  text-shadow: 1px 1px 2px #fff, -1px -1px 2px #fff;
}

.volunteer-marker, .shift-marker, .shift-flag-marker, .metro-station-marker, .home-dot-marker, .animated-horse-marker, .house-marker { background: none; border: none; }

.marker-name-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: #333;
  background: rgba(255,255,255,0.85);
  padding: 0 3px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.3;
  text-shadow: none;
  pointer-events: none;
}

.shift-name-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.75);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
  pointer-events: none;
  margin-bottom: 1px;
  letter-spacing: 0.2px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marker-badges-row {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  white-space: nowrap;
  pointer-events: none;
}

/* Metro station dots */
.metro-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #333;
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
}

/* Hide filtered-out volunteer markers */
.marker-hidden {
  display: none !important;
}

/* Volunteer marker highlight on hover */
.marker-highlighted {
  animation: marker-vibrate 0.2s linear infinite;
  filter: drop-shadow(0 0 10px #ffd600) drop-shadow(0 0 20px #ff6f00) !important;
  z-index: 9999 !important;
}

@keyframes marker-vibrate {
  0% { margin-left: 0; margin-top: 0; }
  25% { margin-left: -2px; margin-top: 1px; }
  50% { margin-left: 2px; margin-top: -1px; }
  75% { margin-left: -1px; margin-top: -2px; }
  100% { margin-left: 0; margin-top: 0; }
}

/* Glowing tentative connection lines */
.tentative-line-glow {
  filter: drop-shadow(0 0 6px #ff6d00) drop-shadow(0 0 12px #ff6d00);
  animation: line-glow 1.5s ease-in-out infinite;
}

/* Glowing drag line */
.drag-line-glow {
  filter: drop-shadow(0 0 6px #ffd600) drop-shadow(0 0 12px #ff6d00);
  animation: line-glow 1.5s ease-in-out infinite;
}

@keyframes line-glow {
  0%, 100% { filter: drop-shadow(0 0 4px #ffd600) drop-shadow(0 0 8px #ff6d00); }
  50% { filter: drop-shadow(0 0 10px #ffd600) drop-shadow(0 0 20px #ff6d00); }
}

/* Shift flag drop target highlight during drag */
.shift-drop-target { filter: drop-shadow(0 0 6px #ffd600) drop-shadow(0 0 12px #ffd600); }

/* Shift flag vibration when horse is nearby during drag */
.shift-vibrating svg {
  animation: vibrate 0.15s linear infinite;
}

.shift-vibrating {
  filter: drop-shadow(0 0 8px #ffd600) drop-shadow(0 0 16px #ff6f00) !important;
}

@keyframes vibrate {
  0% { margin-left: 0; margin-top: 0; }
  20% { margin-left: -2px; margin-top: 1px; }
  40% { margin-left: 2px; margin-top: -1px; }
  60% { margin-left: -1px; margin-top: -2px; }
  80% { margin-left: 1px; margin-top: 2px; }
  100% { margin-left: 0; margin-top: 0; }
}

/* Map popups */
.volunteer-popup, .shift-popup { font-size: 13px; line-height: 1.5; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.badge.trained { background: var(--primary-light); color: #2d7a00; }
.badge.untrained { background: #fff3e0; color: #e65100; }
.ward-tag { display: inline-block; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 10px; margin: 2px 0; }
.shift-type { display: inline-block; background: #e3f2fd; color: #1565c0; padding: 1px 6px; border-radius: 3px; font-size: 10px; margin: 2px 4px; }

/* Assign button in volunteer popup */
.multi-shift-popup { max-height: 350px; overflow-y: auto; }
.multi-shift-card { padding: 4px 0; }
.popup-shift-select {
  background: #000;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  width: 100%;
}
.popup-shift-select:hover { background: var(--primary); color: #000; }

.ring-controls {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.ring-controls label { font-weight: 600; white-space: nowrap; }
.ring-controls select {
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
}

.popup-assign-btn {
  background: #000;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
}
.popup-assign-btn:hover { background: var(--primary); color: #000; }

/* Drag overlay banner */
#drag-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 214, 0, 0.95);
  color: #333;
  padding: 8px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  pointer-events: none;
}

/* ---- RIGHT PANEL — Shifts ---- */
.shift-panel {
  width: var(--panel-width);
  background: var(--card-bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width 0.2s ease;
}

#shift-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px;
}

.shift-ward-group { margin-bottom: 8px; }

.shift-ward-label {
  color: #fff;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px 4px 0 0;
}

.shift-card {
  background: #fdfdfd;
  border: 1px solid var(--border);
  border-top: none;
  padding: 10px;
  font-size: 14px;
}

.shift-card:last-child { border-radius: 0 0 4px 4px; }

.shift-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-title {
  flex: 1;
}

.shift-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #ccc;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.shift-star.starred { color: #f9a825; }
.shift-star:hover { color: #f9a825; }

.shift-status {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.shift-status.filled { background: var(--primary-light); color: #2d7a00; }
.shift-status.partial { background: #fff3d6; color: #cc7200; }
.shift-status.empty { background: #ffcdd2; color: #c62828; }

.shift-details {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
  margin: 5px 0;
}

/* Host section */
.host-section {
  margin-top: 6px;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.host-label, .vol-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.host-drop-zone {
  min-height: 36px;
  border: 2px dashed #90caf9;
  border-radius: 4px;
  padding: 4px;
  background: #e3f2fd;
  transition: all 0.2s;
}

.host-drop-zone.drop-active { border-color: #1565c0; background: #bbdefb; }
.host-drop-zone.drop-hover { border-color: #1565c0; background: #90caf9; }

.host-placeholder {
  text-align: center;
  font-size: 11px;
  color: #90a4ae;
  padding: 4px;
}

.host-default {
  padding: 5px 8px;
  font-size: 13px;
  color: #1565c0;
}
.host-default-label {
  font-size: 10px;
  color: #90a4ae;
  font-style: italic;
}

.host-chip {
  border-width: 2px !important;
}
.host-chip.tentative { border-color: #42a5f5 !important; background: #e3f2fd !important; }
.host-chip.confirmed { border-color: #1565c0 !important; background: #bbdefb !important; }

/* Volunteer section */
.volunteers-section {
  margin-top: 6px;
}

.shift-drop-zone {
  min-height: 32px;
  border: 2px dashed #ddd;
  border-radius: 4px;
  padding: 4px;
  margin-top: 4px;
  transition: all 0.2s;
}

.shift-drop-zone.drop-active { border-color: var(--primary-dark); background: var(--primary-light); }
.shift-drop-zone.drop-hover { border-color: var(--primary); background: #d0f5b0; }

.drop-placeholder {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  padding: 4px;
}

.assigned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.assigned-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 14px;
  font-size: 13px;
  width: 100%;
  margin-bottom: 2px;
  position: relative;
  overflow: visible;
}

.chip-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.chip-top-row {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.chip-badges-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  padding-left: 2px;
}

.chip-badges-row:empty {
  display: none;
}

.assigned-chip.tentative {
  background: #fff8e1;
  border: 2px dashed var(--accent-orange);
}

.assigned-chip.confirmed {
  background: var(--primary-light);
  border: 2px solid var(--primary-dark);
}

.assigned-chip.declined {
  background: #ffebee;
  border: 2px solid #ef5350;
}

.assigned-chip.declined .chip-name {
  color: #c62828;
  text-decoration: line-through;
}

.assigned-chip.ghosted {
  background: #f3e5f5;
  border: 2px solid #ce93d8;
  opacity: 0.7;
}

.assigned-chip.ghosted .chip-name {
  color: #7b1fa2;
  font-style: italic;
}

.chip-status-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.stampede-chip {
  cursor: default !important;
}

.chip-stampede {
  display: inline-block;
  background: #e8eaf6;
  color: #3949ab;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 3px;
  vertical-align: middle;
}

.chip-timer-overlay {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  background: #ff6d00;
  color: #fff;
  padding: 0 6px;
  border-radius: 14px 0 0 14px;
  font-size: 10px;
  font-weight: 700;
  animation: timer-pulse 1.5s ease-in-out infinite;
  white-space: nowrap;
  z-index: 1;
}


.chip-hourglass {
  font-size: 14px;
  transition: transform 0.2s;
  cursor: pointer;
  opacity: 0.6;
}
.chip-hourglass:hover {
  transform: scale(1.4);
  opacity: 1;
}

.chip-start-timer {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  padding: 1px 4px;
  line-height: 1;
  margin-left: 4px;
}
.chip-start-timer:hover {
  background: #ffe0b2;
  transform: scale(1.1);
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.chip-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.chip-name {
  flex: 1;
}

.chip-confirm {
  background: var(--primary-dark);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-confirm:hover { background: var(--primary); }

.chip-unconfirm {
  background: var(--accent-orange);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-unconfirm:hover { background: #e67e00; }

.chip-decline {
  background: #ef5350;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-decline:hover { background: #c62828; }

.chip-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}

.chip-remove:hover { font-weight: bold; }

.chip-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
}

.chip-move {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 5px;
  line-height: 1;
  flex-shrink: 0;
  font-weight: bold;
  color: #3949ab;
}
.chip-move:hover { background: #ffe0b2; }

.chip-copy-phone, .chip-copy-draft {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 5px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.15s;
}
.chip-copy-phone:hover { background: #ffe0b2; }
.chip-copy-draft:hover { background: #ffe0b2; }

.copy-success {
  background: var(--primary-light) !important;
  border-color: var(--primary-dark) !important;
  font-size: 10px !important;
  color: #2d7a00;
}

/* Hover contact tooltip on assigned chips */
.chip-contact-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  z-index: 100;
  pointer-events: auto;
}

.chip-contact-tooltip a { color: #2d7a00; text-decoration: none; }
.chip-contact-tooltip a:hover { text-decoration: underline; }

.tt-contact-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0;
}

.tt-call-btn, .tt-sms-btn {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none !important;
}

.tt-call-btn { background: var(--primary-light); color: #2d7a00 !important; border: 1px solid var(--primary-dark); }
.tt-call-btn:hover { background: #d0f5b0; }
.tt-sms-btn { background: #d6f2ff; color: #007ab8 !important; border: 1px solid var(--accent-blue); }
.tt-sms-btn:hover { background: #b3e5fc; }

.tt-phone { font-size: 11px; color: #666; }

.chip-call, .chip-sms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #fff3e0;
  border: 1px solid #ffcc80;
}
.chip-call:hover, .chip-sms:hover { background: #ffe0b2; }

.chip-tt-ward {
  display: inline-block;
  background: #eee;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 12px;
  color: #555;
}

.chip-tt-skills {
  display: block;
  font-size: 11px;
  color: #888;
  max-width: 200px;
  white-space: normal;
  margin-top: 2px;
}

.assigned-chip:hover .chip-contact-tooltip {
  display: block;
}

.no-shifts {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
}

/* ---- BOX SELECT ---- */
.box-select-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 2px solid var(--primary-dark);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 3000;
  width: 360px;
  max-height: 70vh;
  overflow-y: auto;
}

.box-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  background: #000;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px 6px 0 0;
}

.box-select-shift-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.box-select-shift-btn:hover { background: var(--primary-light); }
.box-select-shift-btn .shift-btn-name { font-weight: 700; }
.box-select-shift-btn .shift-btn-details { color: #666; font-size: 12px; margin-top: 2px; }

.box-select-active { cursor: crosshair !important; }

/* ---- Twilio SMS ---- */
.twilio-label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
  font-size: 12px;
}
.twilio-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  margin-top: 2px;
}
.twilio-save-btn {
  margin-top: 10px;
  padding: 6px 16px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}
.twilio-save-btn:hover { background: var(--primary-dark); }

.twilio-status {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 8px;
}
.twilio-status.connected { background: #e6ffd6; color: #2d7a00; }
.twilio-status.disconnected { background: #ffebee; color: #c62828; }

.chip-send-sms {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  opacity: 0.7;
}
.chip-send-sms:hover { opacity: 1; }
.chip-send-sms.sending { opacity: 0.4; pointer-events: none; }

/* ---- SMS Template Modal ---- */
.sms-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sms-modal {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.sms-modal h3 { margin: 0 0 12px; font-size: 16px; }
.sms-template-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sms-template-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 16px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 11px;
}
.sms-template-btn:hover { background: #e0e0e0; }
.sms-template-btn.active { background: var(--primary-light); border-color: var(--primary-dark); }
.sms-modal textarea {
  width: 100%;
  height: 180px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.sms-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}
.sms-modal-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.sms-send-btn { background: var(--primary); }
.sms-send-btn:hover { background: var(--primary-dark); }
.sms-cancel-btn { background: #eee; }
.sms-cancel-btn:hover { background: #ddd; }
.sms-copy-btn { background: #e3f2fd; }
.sms-copy-btn:hover { background: #bbdefb; }

/* ---- Custom message button ---- */
.custom-msg-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  opacity: 0.4;
  margin-left: 6px;
}
.custom-msg-btn:hover { opacity: 1; }
.custom-msg-btn.has-message { opacity: 1; background: #fff9c4; border-radius: 4px; }

.vol-unlinked-warn {
  font-size: 12px;
  margin-left: 2px;
  cursor: help;
}

/* ---- Satisfaction ---- */
.chip-satisfaction-row {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}
.sat-btn {
  border: 1px solid #e0e0e0;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  padding: 1px 6px;
  opacity: 0.5;
  transition: all 0.15s;
}
.sat-btn:hover { opacity: 1; transform: scale(1.15); }
.sat-btn.sat-active { opacity: 1; border-color: #999; background: #fff; transform: scale(1.1); }
.shift-satisfaction-bar {
  display: flex;
  gap: 8px;
  padding: 3px 8px;
  font-size: 12px;
  background: #f5f5f5;
  border-radius: 4px;
  margin: 2px 0;
}
.sat-stat { display: flex; align-items: center; gap: 2px; }
.sat-happy { color: #2e7d32; }
.sat-neutral { color: #f57f17; }
.sat-sad { color: #c62828; }

/* ---- Task system ---- */
.task-create-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.task-item {
  padding: 8px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 4px;
  background: #fff;
}
.task-item.task-complete { opacity: 0.6; }
.task-item.task-overdue { border-left: 3px solid #c62828; }
.task-assigned-list {
  padding: 4px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.task-assigned-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 8px;
  background: #f3e5f5;
  border: 1px solid #ce93d8;
  border-radius: 12px;
}
.task-assign-option {
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.task-assign-option:hover { background: #f0f0f0; }

/* ---- Bulk actions (left panel) ---- */
.bulk-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.bulk-action-btn {
  flex: 1;
  font-size: 10px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.bulk-action-btn:hover { background: #e0e0e0; }

/* ---- Bulk SMS ---- */
.bulk-sms-btn {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #e8f5e9;
  cursor: pointer;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}
.bulk-sms-btn:hover { background: #c8e6c9; }
.bulk-sms-modal { width: 520px; }
.bulk-sms-recipients {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  max-height: 150px;
  overflow-y: auto;
}
.bulk-sms-vol-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.bulk-sms-vol-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.bulk-sms-vol-label:hover { background: #f0f0f0; }
.bulk-sms-vol-label input { margin: 0; width: 14px; height: 14px; }

/* ---- Coalition events ---- */
.coalition-panel {
  max-height: 70vh;
  width: 500px;
}
.coal-add-btn {
  padding: 6px 14px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}
.coal-add-btn:hover { opacity: 0.9; }
.coal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}
.coal-form-grid label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 600;
}
.coal-form-grid input, .coal-form-grid select, .coal-form-grid textarea {
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  margin-top: 2px;
}
.coal-form-grid label:has(textarea) {
  grid-column: 1 / -1;
}
.coal-form-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.coal-form-actions button {
  padding: 4px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.coal-form-actions button:first-child { background: var(--primary); }
.coal-form-actions button:last-child { background: #eee; }

.coal-event-card {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  background: #fafafa;
}
.coal-event-card .coal-title { font-weight: 700; }
.coal-event-card .coal-org { color: #666; font-size: 11px; }
.coal-event-card .coal-details { color: #444; margin-top: 2px; font-size: 11px; }
.coal-event-card .coal-actions { margin-top: 4px; display: flex; gap: 6px; }
.coal-event-card .coal-actions button {
  padding: 2px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
}
.coal-edit-btn { background: #e3f2fd; }
.coal-delete-btn { background: #ffebee; color: #c62828; }

.coalition-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-blue);
  border: 2px solid #0077b6;
  border-radius: 50%;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Coalition shift card in right panel */
.shift-card.coalition-card {
  border-left: 4px solid var(--accent-blue);
  background: #f0f8ff;
}

/* ---- Activist preferences ---- */
.vol-prefs-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eee;
}
.pref-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  font-size: 11px;
}
.pref-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.pref-row input[type="time"] {
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100px;
}
.pref-row input[type="checkbox"] {
  margin: 0;
}
.pref-row input[type="date"] {
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 120px;
}
.pref-blackout-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 2px;
}
.pref-blackout {
  gap: 4px;
}
.pref-blackout span {
  font-size: 10px;
  color: #888;
}
.pref-blackout-remove {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 0 4px;
}
.pref-blackout-remove:hover { color: #f44336; }
.pref-blackout-add {
  display: block;
  margin-top: 4px;
  background: none;
  border: 1px dashed #ccc;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  color: #666;
  width: 100%;
}
.pref-blackout-add:hover { background: #f5f5f5; border-color: #999; }

.chip-fav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  opacity: 0.7;
  text-shadow: 0 0 2px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.4);
}
.chip-fav:hover, .chip-fav.fav-active {
  opacity: 1;
  text-shadow: none;
}

/* ---- Highlight flash for sidebar scroll-to ---- */
@keyframes highlightFlash {
  0% { background: #fff9c4; }
  100% { background: var(--card-bg); }
}
.volunteer-card.highlight-flash {
  animation: highlightFlash 1.5s ease;
}

/* ---- CALL BAR ---- */
#call-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1b5e20;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
#call-bar button {
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#call-bar button:hover { background: #b71c1c; }

/* ---- TAG BADGES ---- */
.vol-tag-badge {
  display: inline-block;
  font-size: 12px;
  margin-right: 2px;
  vertical-align: middle;
}

/* ---- INBOX ---- */
.inbox-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #c62828;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  padding: 0 4px;
}
#btn-inbox { position: relative; }

.inbox-panel {
  width: 420px;
  max-height: 70vh;
  right: 10px;
  left: auto;
  overflow: hidden;
}
#inbox-list {
  overflow-y: auto;
  flex: 1;
}
.inbox-mark-read-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  margin-right: 8px;
  color: #555;
}
.inbox-mark-read-btn:hover { background: #eee; }

.inbox-msg {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s;
}
.inbox-msg:hover { background: #f5f5f5; }
.inbox-unread { background: #e8f5e9; }
.inbox-unread:hover { background: #c8e6c9; }

.inbox-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.inbox-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5AE200;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.inbox-name {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-time {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
}
.inbox-dot {
  color: #5AE200;
  font-size: 14px;
}
.inbox-msg-body {
  font-size: 13px;
  color: #333;
  padding-left: 36px;
  word-wrap: break-word;
}
.inbox-msg-actions {
  padding-left: 36px;
  margin-top: 6px;
  display: flex;
  gap: 6px;
}
.inbox-action-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
}
.inbox-action-btn:hover { background: #e0e0e0; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
  :root { --sidebar-width: 240px; --panel-width: 280px; }
}

@media (max-width: 900px) {
  .app-body { flex-direction: column; }
  .volunteer-panel, .shift-panel { width: 100%; height: 200px; border: none; border-bottom: 1px solid var(--border); }
  .map-container { flex: 1; min-height: 300px; }
}
