@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary: #00f3ff;
  --primary-glow: rgba(0, 243, 255, 0.5);
  --secondary: #bd00ff;
  --secondary-glow: rgba(189, 0, 255, 0.5);
  --success: #39ff14;
  --danger: #ff003c;
  --warning: #fefe33;
  --radius: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"],
:root:not([data-theme]) {
  --bg-main: rgba(5, 5, 8, 0.4);
  --bg-accent: rgba(10, 10, 20, 0.6);
  --bg-gradient: radial-gradient(circle at center, rgba(10, 10, 31, 1) 0%, rgba(5, 5, 8, 1) 100%);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(0, 243, 255, 0.2);
  --text-main: #e0faff;
  --text-muted: #7da5ae;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  --panel-glow: inset 0 0 20px rgba(0, 243, 255, 0.05);
}


[data-theme="dark"] {
  --bg-main: #020617;
  --bg-accent: #0f172a;
  --bg-gradient: linear-gradient(135deg, #020617 0%, #0f172a 100%);
  --sidebar-bg: var(--glass-bg);
  --primary: #00f3ff;
  --primary-hover: #00d8e6;
  --primary-glow: rgba(0, 243, 255, 0.5);
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(0, 243, 255, 0.2);
  --glow-primary: 0 0 20px rgba(0, 243, 255, 0.3);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  --panel-glow: inset 0 0 40px rgba(0, 243, 255, 0.05);
}

[data-theme="tech-light"] {
  --bg-main: #f3f4f6;
  /* Ash Gray - Cool Gray 100 */
  --bg-accent: #e5e7eb;
  /* Cool Gray 200 */
  --bg-gradient: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
  --sidebar-bg: linear-gradient(180deg, #e5e7eb 0%, #f9fafb 100%);
  /* Ashy gradient */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(156, 163, 175, 0.2);
  --text-main: #1f2937;
  /* Gray 800 */
  --text-muted: #4b5563;
  /* Gray 600 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --panel-glow: none;
  --primary: #0ea5e9;
  /* Keep blue primary or switch to gray? User said 'bg' and 'sidebar' ash. Let's keep primary blue for contrast or maybe a darker steel blue. Keeping existing blue for now to avoid dullness. */
}





* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}



/* Utilities */
.hidden {
  display: none !important;
}

.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
}

.mobile-only {
  display: none !important;
}

.desktop-only {
  display: flex !important;
}

.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow), var(--panel-glow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scanning 4s linear infinite;
  box-shadow: 0 0 10px var(--primary-glow);
}


@keyframes scanning {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-popup {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes float-popup {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1,
h2 {
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  text-shadow: var(--glow-primary);
}

h2,
h3 {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}


input,
select {
  width: 100%;
  padding: 0.875rem;
  margin-bottom: 1.25rem;
  background: var(--bg-accent);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}


input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Mobile Menu Button */
/* MOVED SIDEBAR DEFAULTS HERE TO ALLOW OVERRIDES */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.6rem;
  overflow-y: auto;
}

.sidebar h3,
.sidebar label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  display: block;
}

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 2.2rem;
  /* Enlarged from 1.5rem */
  padding: 0;
  /* Removing padding to constrain size better or keep distinct */
  margin-right: 5px;
  cursor: pointer;
  z-index: 1100;
}

@media (max-width: 768px) {

  /* --- NAVBAR & HEADER --- */
  .menu-btn {
    display: block;
  }

  .navbar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 15px !important;
    padding: 0 15px !important;
    height: 60px !important;
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10005 !important;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  .navbar::-webkit-scrollbar {
    display: none;
  }

  /* Prevent shrinking */
  .navbar>div,
  .navbar>button,
  #personnel-view .navbar>div,
  #admin-view .navbar>div {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: fit-content !important;
  }

  .logo {
    font-size: 1rem !important;
    margin-right: 10px;
    flex-shrink: 0 !important;
  }

  .logo span {
    display: none;
  }

  .brand-text {
    display: none !important;
  }

  .user-info {
    display: none !important;
    /* Hide user string to save space */
  }

  /* Right-side button groups */
  #admin-view .navbar button,
  #personnel-view .navbar button {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    height: 36px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Restore Elements */
  #personnel-coords-display,
  #weather-widget,
  #weather-widget-personnel {
    display: flex !important;
    font-size: 0.75rem !important;
    min-width: 0;
  }

  /* --- SIDEBAR & OVERLAY --- */
  .sidebar {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    height: calc(100dvh - 60px) !important;
    height: calc(100vh - 60px) !important;
    /* Fallback */
    z-index: 9999 !important;
    transform: translateX(-100%);
    width: 65% !important;
    /* Narrowed from 85% */
    max-width: 280px !important;
    background: var(--sidebar-bg);
    backdrop-filter: blur(15px);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px !important;
    /* Increased for SOS button visibility */
    border-right: 1px solid var(--glass-border);
    display: flex !important;
    flex-direction: column !important;
    touch-action: pan-y;
    padding-top: 0 !important;
  }

  #personnel-view .sidebar .btn-sos {
    position: relative !important;
    /* Changed from sticky to relative for better scrolling behavior at list end */
    margin-top: 30px !important;
    flex-shrink: 0 !important;
    z-index: 100 !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar-overlay {
    position: fixed;
    top: 60px;
    /* Matched to sidebar top */
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(3px);
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Sidebar content internal scroll reset */
  #sidebar-default-content,
  #sidebar-default-content>div {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Modal adjustments */
  .modal-content {
    padding: 1rem;
    width: 95%;
  }
}

button {
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  color: white;
  margin-top: 0.5rem;
}

.btn-primary {
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
}

.btn-success:hover {
  background: var(--success-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.btn-warning {
  background: #eab308;
}

.btn-warning:hover {
  background: #ca8a04;
  transform: translateY(-1px);
}

.btn-sos {
  background: #ff0000;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-sos:hover {
  background: #cc0000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
  transform: scale(1.02);
}

/* Dashboard Layout */
.dashboard {
  height: 100dvh;
  height: 100vh;
  /* Fallback for older browsers */
  display: flex;
  flex-direction: column;
}

.dashboard-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.navbar {
  display: flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--glass-border);
  gap: 1.5rem;
  box-shadow: var(--shadow);
  flex-wrap: nowrap;
  /* Prevent wrapping */
  white-space: nowrap;
  /* Force single line */
  height: 70px;
  /* Fixed height to ensure consistency */
  /* overflow: hidden; Removed to allow overrides */
}

/* Responsive Navbar Fixes */
.logo {
  flex-shrink: 0;
}

.logo span {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .logo span {
    display: none;
    /* Hide "| Personel Paneli" on medium screens */
  }
}

.user-info {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

#personnel-coords-display {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#weather-widget-personnel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.navbar button {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.brand-link:hover {
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
}

.user-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}




/* Sidebar */



/* Message Body Area */
#msg-body {
  min-height: 120px !important;
  max-height: 250px;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s, box-shadow 0.3s;
  color: white !important;
  border-radius: 8px;
}

#msg-body:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.1);
  outline: none;
}

/* Messaging Selection UI Enhancements */
.msg-selection-container {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-top: 10px;
  padding: 10px;
  animation: fadeIn 0.3s ease;
  flex-shrink: 0;
}

.msg-item-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-radius: 6px !important;
  margin-bottom: 2px !important;
}

.msg-item-row:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  padding-left: 18px !important;
}

.msg-item-row.selected {
  background: rgba(59, 130, 246, 0.15) !important;
  border-left: 3px solid var(--primary) !important;
}

.msg-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

.msg-item-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: auto;
}

.msg-search-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.msg-list-area {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 300px;
  overflow-y: auto;
}

/* Modal Tabs Enhancement */
.msg-tab {
  flex: 1;
  padding: 18px 10px;
  background: transparent;
  color: #64748b;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.msg-tab:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
}

.msg-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(0, 243, 255, 0.03);
}

.form-group {
  margin-bottom: 24px !important;
  display: block;
}

.form-group label {
  font-weight: 600 !important;
  color: #94a3b8 !important;
  margin-bottom: 10px !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

@keyframes pulse-opacity {
  0% {
    opacity: 1;
    stroke-opacity: 1;
    stroke-width: 2px;
  }

  50% {
    opacity: 0.6;
    stroke-opacity: 0.5;
    stroke-width: 5px;
  }

  100% {
    opacity: 1;
    stroke-opacity: 1;
    stroke-width: 2px;
  }
}

.pulsing-marker {
  animation: pulse-opacity 1.5s infinite ease-in-out;
  transform-origin: center;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  z-index: 2000000;
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  border-radius: 16px;
  width: 95%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  /* Ensure modal fits on mobile */
  margin: auto;
  min-height: 480px;
}



/* Close Modal Button - TOP RIGHT ABSOLUTE */
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--danger);
}


.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  min-height: 42px;
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.collapsible-header h3 {
  margin: 0;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-weight: 600;
  text-transform: none !important;
  color: var(--text-main);
  flex: 1;
}

.collapsible-header.header-online {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.1);
}

.collapsible-header.header-online h3 {
  color: #10b981 !important;
}

.collapsible-header.header-offline {
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.1);
}

.collapsible-header.header-offline h3 {
  color: #94a3b8 !important;
}

.collapsible-header.header-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

.collapsible-header.header-danger h3 {
  color: #ef4444 !important;
}

.header-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.personnel-count {
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(0, 243, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.collapsible-header .arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.collapsible-section.collapsed .arrow {
  transform: rotate(-90deg);
}

.collapsible-section.collapsed>*:not(.collapsible-header):not(.preserve-visibility) {
  display: none !important;
}

.personnel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.personnel-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  min-height: 42px;
}

.personnel-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Item Premium Color Classes */
.item-green {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.item-blue {
  background: rgba(59, 130, 246, 0.1) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.item-red {
  background: rgba(239, 68, 68, 0.1) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.item-purple {
  background: rgba(139, 92, 246, 0.1) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.item-green:hover {
  background: rgba(16, 185, 129, 0.2) !important;
}

.item-blue:hover {
  background: rgba(59, 130, 246, 0.2) !important;
}

.item-red:hover {
  background: rgba(239, 68, 68, 0.2) !important;
}

.item-purple:hover {
  background: rgba(139, 92, 246, 0.2) !important;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 10px;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.offline {
  background: var(--warning);
  box-shadow: 0 0 5px var(--warning);
}

.personnel-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar h3 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 5px;
}

/* Map Container */
#map-container,
#personnel-map-container {
  flex: 1;
  position: relative;
  width: 100%;
  background: #0f172a;
}


/* Personnel Controls */
.personnel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.control-panel {
  text-align: center;
  background: var(--glass-bg);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  max-width: 500px;
  width: 100%;
}

.status-indicator {
  display: block;
  text-align: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-indicator.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-indicator.inactive {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Custom Alert */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 2rem;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--primary);
  color: white;
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

/* Decorative Notification Card */
/* Decorative Notification Card - Person Style */
.notif-card {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  z-index: 10000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: notifSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90%;
  width: 480px;
  overflow: hidden;
}

[data-theme="tech-light"] .notif-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

@keyframes notifSlideIn {
  0% {
    transform: translate(-50%, -100%) scale(0.9);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Left side accent */
.notif-card-left {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  width: 6px;
  flex-shrink: 0;
}

.notif-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.notif-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0f172a;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

[data-theme="tech-light"] .notif-avatar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.notif-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-sender-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notif-sender-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}

[data-theme="tech-light"] .notif-sender-name {
  color: #111827;
}

.notif-sender-role {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.notif-message {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-left: 54px;
  /* Align with text start (42px avatar + 12px gap) */
  margin-bottom: 12px;
}

[data-theme="tech-light"] .notif-message {
  color: #4b5563;
}

.notif-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-left: 54px;
}

[data-theme="tech-light"] .notif-actions {
  border-top-color: rgba(0, 0, 0, 0.05);
}

.btn-notif-action {
  background: transparent;
  color: #818cf8;
  border: 1px solid transparent;
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  width: auto;
  margin-top: 0;
}

.btn-notif-action:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

[data-theme="tech-light"] .btn-notif-action {
  color: #4f46e5;
}

[data-theme="tech-light"] .btn-notif-action:hover {
  background: rgba(79, 70, 229, 0.05);
  color: #4338ca;
}

.pulse-sos {
  animation: pulse-red 1s infinite alternate !important;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.2);
  }

  100% {
    box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 1);
    color: white;
  }
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Marker Delete Button */
.marker-delete-btn {
  transition: transform 0.2s;
}

.marker-delete-btn:hover {
  transform: scale(1.2);
  background: #dc2626 !important;
}

/* Logout Button Specifics */
.btn-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

[data-theme="tech-light"] .btn-logout {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

[data-theme="tech-light"] .btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: none;
}

/* Light theme fixes for mobile sidebar buttons */
[data-theme="tech-light"] #mobile-personnel-history-btn,
[data-theme="tech-light"] #mobile-personnel-msg-btn,
[data-theme="tech-light"] #mobile-personnel-theme-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1f2937 !important;
}

[data-theme="tech-light"] #mobile-personnel-history-btn:hover,
[data-theme="tech-light"] #mobile-personnel-msg-btn:hover,
[data-theme="tech-light"] #mobile-personnel-theme-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
}


/* Light theme sidebar container */
[data-theme="tech-light"] .sidebar .mobile-only {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Light theme navbar GPS status */
[data-theme="tech-light"] #personnel-navbar-gps-status {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

[data-theme="tech-light"] #navbar-coords-display {
  color: #1f2937 !important;
}


/* Google Maps InfoWindow Cleanup */
.gm-style-iw {
  padding: 0 !important;
  overflow: visible !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
}

/* Hide default close button or style it? Let's style it minimally or hide */
/* Usually users want the X visible. We'll let it be default, or maybe move it. */
.gm-ui-hover-effect {
  top: 2px !important;
  right: 2px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
}

[data-theme="tech-light"] .gm-ui-hover-effect {
  background: rgba(0, 0, 0, 0.05) !important;
}


/* Autocomplete Suggestions */
.autocomplete-suggestions {
  position: absolute;
  /* top is relative to input bottom */
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 2000;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.autocomplete-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 0.9rem;
}

.autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* Map Controls */
.map-controls-top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  width: 42px;
  height: 42px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  /* [FIX] Remove mobile click delay */
}

.map-control-btn:hover {
  background: var(--primary);
  color: #020617;
  transform: scale(1.1) translateY(-2px);
}

.map-control-btn.active {
  background: var(--primary);
  color: #020617;
  border-color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes pulse-popup {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Number Spinner Control */
.number-control {
  display: flex;
  align-items: center;
  background: var(--bg-accent);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.number-control button {
  width: 36px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  font-size: 1.1rem;
  padding: 4px;
  cursor: pointer;
  display: flex;
  /* Ensure centering */
  justify-content: center;
  align-items: center;
}

.number-control button:hover {
  background: rgba(0, 243, 255, 0.1);
}

.number-control input {
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  margin: 0;
  padding: 4px;
  font-weight: bold;
  font-size: 1rem;
  /* Disable spinner arrows in standard numbering */
  -moz-appearance: textfield;
  appearance: textfield;
}

.number-control input::-webkit-outer-spin-button,
.number-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.number-control input:focus {
  box-shadow: none;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Fullscreen buttons now use .map-control-btn logic in normal mode */
#map-fullscreen-btn,
#personnel-map-fullscreen-btn {
  color: #ffffff !important;
}

#map-fullscreen-btn:hover,
#personnel-map-fullscreen-btn:hover {
  background: #ffffff;
  color: black;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}


/* Fullscreen Exit Button (Red 'X' at Bottom Right) */
#map-fullscreen-btn.is-fullscreen,
#personnel-map-fullscreen-btn.is-fullscreen {
  position: fixed !important;
  bottom: 80px !important;
  right: 30px !important;
  z-index: 1000000 !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  color: #ef4444 !important;
  border: 2px solid #ef4444 !important;
  background: rgba(0, 0, 0, 0.9) !important;
  font-size: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5) !important;
}

#map-fullscreen-btn.is-fullscreen:hover,
#personnel-map-fullscreen-btn.is-fullscreen:hover {
  background: #ef4444 !important;
  color: white !important;
}


/* Fullscreen Mode Class */
#map-wrapper.fullscreen-mode,
#personnel-map-wrapper.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: black !important;
}

#map-wrapper.fullscreen-mode #map-container,
#personnel-map-wrapper.fullscreen-mode #personnel-map-container {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* Premium Prompt Modal Styles */
.prompt-modal-content,
.confirm-modal-content {
  background: rgba(10, 10, 20, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(239, 68, 68, 0.1) !important;
  text-align: center;
  max-width: 450px !important;
  padding: 2.5rem !important;
  border-radius: 24px !important;
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-modal-content {
  border-top: 4px solid #ef4444 !important;
}

@keyframes modalPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#prompt-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
  padding: 1rem;
  border-radius: 12px;
  width: 100%;
}

#prompt-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.prompt-modal-content button {
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.prompt-modal-content .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.prompt-modal-content .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.prompt-modal-content button:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

/* Hide default Google Maps InfoWindow frame for premium popups */
.gm-style-iw {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: none !important;
  max-height: none !important;
}

.gm-style-iw-c {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 16px !important;
}

.gm-style-iw-t::after {
  background: rgba(15, 23, 42, 0.95) !important;
  /* Tailwind slate-900 approx */
  box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  background: transparent !important;
}

/* Close button positioning for custom InfoWindow */
.gm-ui-hover-effect {
  top: 5px !important;
  right: 5px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000 !important;
}

.gm-ui-hover-effect span {
  margin: 0 !important;
  filter: invert(1);
  /* Make 'X' white */
}

/* --- NEW TRACKING OPTIMIZATION STYLES --- */
.signal-strength {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.signal-excellent {
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  background: rgba(16, 185, 129, 0.15) !important;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.signal-sufficient {
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  background: rgba(59, 130, 246, 0.15) !important;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.signal-weak {
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.15) !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.personnel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.7rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 12px;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-value {
  color: var(--primary);
  font-weight: 600;
}

@keyframes pulse-warmup {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

.warmup-pulse {
  animation: pulse-warmup 1.5s infinite;
}

/* Heading Arrow Icon Fix */
.heading-arrow {
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Route Card Styles */
.premium-route-card {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 8px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(16, 185, 129, 0.1);
  gap: 12px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  color: white;
  font-family: 'Inter', sans-serif;
  animation: float-route-card 3s ease-in-out infinite;
}

@keyframes float-route-card {

  0%,
  100% {
    transform: translate(30px, -50%);
  }

  50% {
    transform: translate(35px, -50%);
  }
}

.route-icon-main {
  width: 32px;
  height: 32px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
}

.route-icon-main svg {
  width: 20px;
  height: 20px;
}

.route-info-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.route-info-row {
  display: flex;
  flex-direction: column;
}

.route-info-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
}

.route-info-lab {
  font-size: 0.6rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.route-info-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.route-glow-effect {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: rotate-glow 10s linear infinite;
}

/* Messaging UI Styling */
.blinking-btn {
  animation: blink-animation 1s infinite alternate;
}

@keyframes blink-animation {
  from {
    box-shadow: 0 0 5px #ef4444;
  }

  to {
    box-shadow: 0 0 20px #ef4444, 0 0 10px #fca5a5;
  }
}

.msg-tab {
  position: relative;
  border-bottom: 2px solid transparent;
}

.msg-tab:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.msg-tab.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.1) !important;
}

.msg-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.msg-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  border-color: #475569;
}

.msg-card.unread {
  border-left: 4px solid #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, #1e293b 100%);
}

.msg-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.new-badge {
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 8px;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
}

.delete-btn:hover {
  color: #ef4444;
}

.msg-preview {
  color: #94a3b8;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-card-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #334155;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.badge-count {
  background: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.7rem;
  margin-left: 5px;
}

.msg-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.media-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1;
  background: black;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  text-align: center;
  font-size: 0.7rem;
  padding: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.download-btn:hover {
  background: rgba(16, 185, 129, 0.9);
}

/* --- History Modal & List Styles --- */
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 60vh;
  min-height: 350px;
  /* Scrollable area */
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.history-info {
  flex: 1;
}

/* Premium Filter Inputs */
#history-date-filter,
#admin-history-date-filter,
#admin-history-filter {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  font-size: 0.9rem !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

#history-date-filter:focus,
#admin-history-date-filter:focus,
#admin-history-filter:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
  background: rgba(15, 23, 42, 0.8) !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.7);
  cursor: pointer;
}

/* Language Toggle Button */
.lang-toggle-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: auto;
  margin: 0;
  letter-spacing: 0.5px;
}

.lang-toggle-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary);
}

.lang-toggle-fixed {
  position: fixed;
  top: 20px;
  right: 20px;
}

/* Mobile adjustments for nav button */
@media (max-width: 768px) {
  .navbar .lang-toggle-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    width: auto;
  }

  .mobile-only {
    display: flex !important;
  }


  .mobile-only.force-hidden {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }
}

/* Notification Card Premium Styles */
#custom-notification-card {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 90%;
  max-width: 400px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 100000;
  animation: slideDownFade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  font-family: 'Inter', sans-serif;
}

@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

#custom-notification-card.premium-card {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 100000;
  overflow: hidden;
  animation: notif-slide-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: auto;
}

#custom-notification-card.premium-card.closing {
  animation: notif-slide-out 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes notif-slide-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes notif-slide-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px) scale(0.8);
  }
}

.premium-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  color: white;
  cursor: pointer;
}

.premium-button:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.premium-button:active {
  transform: translateY(1px);
}

.notif-card-left {
  width: 6px;
  flex-shrink: 0;
}

.notif-card-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid;
  overflow: hidden;
  flex-shrink: 0;
}

.notif-sender-info {
  display: flex;
  flex-direction: column;
}

.notif-sender-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.notif-sender-role {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.notif-message {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-actions button {
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.notif-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Operational Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.metric-card {
  padding: 35px 25px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.metric-card-title {
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.metric-card-value {
  font-size: 2.2rem;
  color: #1e293b;
  font-weight: 900;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 0.85rem;
  background: white;
}

.data-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3b82f6;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.flatpickr-day.selected {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.metrics-table th {
  background: #f1f5f9;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 700;
}

.metrics-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

@media print {

  /* Hide all app UI components */
  #admin-view,
  #personnel-view,
  .navbar,
  .sidebar,
  #map-wrapper,
  #neural-bg,
  #alert-area,
  .sidebar-overlay,
  .metrics-config-panel,
  #close-metrics,
  .btn-logout,
  .btn-primary,
  .btn-success {
    display: none !important;
  }

  /* Reset layout for print */
  html,
  body {
    background: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .modal {
    position: static !important;
    display: block !important;
    background: white !important;
    z-index: auto !important;
  }

  .modal-content {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: white !important;
  }

  #metrics-results,
  #report-print-area {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #report-print-area * {
    color: black !important;
    background: transparent !important;
  }

  .metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
  }

  .metric-card {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    text-align: center !important;
    padding: 30px 20px !important;
    page-break-inside: avoid;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .metrics-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 20px !important;
  }

  .metrics-table th,
  .metrics-table td {
    border: 1px solid #e2e8f0 !important;
    padding: 8px !important;
    text-align: left !important;
    color: #000 !important;
  }

  .metrics-table th {
    background: #f1f5f9 !important;
  }

}

/* Premium Red Button */
.btn-premium-red {
  background: linear-gradient(135deg, #ff2222 0%, #c01b1b 100%) !important;
  border: none;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 15px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-premium-red:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.7);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ff4d4d 0%, #dc2626 100%) !important;
}

.btn-premium-red:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.5);
}

.btn-premium-red:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #334155 !important;
  box-shadow: none;
  filter: grayscale(100%);
  color: #94a3b8;
}

.btn-premium-red::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.6s;
}

.btn-premium-red:hover::after {
  left: 100%;
}


/* OGE Gauge & Progress Styles */
.oge-gauge-container {
  position: relative;
  width: 200px;
  height: 100px;
  /* Semicircle */
  overflow: hidden;
  margin: 0 auto;
}

.oge-gauge-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #334155;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  /* Top half? No layout is tricky */
  /* Easier: Border logic */
  box-sizing: border-box;
  border: 30px solid #334155;
  border-bottom: 0;
  border-radius: 100px 100px 0 0;
}

.oge-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 100px;
  box-sizing: border-box;
  border: 30px solid transparent;
  border-top-color: #f59e0b;
  /* Default warning */
  border-radius: 100px 100px 0 0;
  transform-origin: 50% 100%;
  transform: rotate(-180deg);
  /* Start hidden */
  transition: transform 1s ease-out, border-color 0.3s;
  z-index: 2;
}

.oge-center-text {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
}

.oge-score {
  font-size: 2rem;
  font-weight: 800;
}

.oge-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.oge-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.oge-metric-bar-bg {
  flex: 1;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  margin: 0 10px;
  overflow: hidden;
}

.oge-metric-bar-fill {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width 1s ease;
}

/* --- PREMIUM SCROLLBARS --- */
/* Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 243, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) rgba(15, 23, 42, 0.4);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.reports-menu-content>* {
  flex-shrink: 0;
}

/* --- REPORTS MODAL MOBILE RESPONSIVENESS --- */
@media (max-width: 640px) {
  #reports-modal .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    border-radius: 16px !important;
  }

  #reports-modal .modal-content>div:first-child {
    padding: 16px !important;
  }

  #reports-modal h2 {
    font-size: 1.25rem !important;
  }

  #reports-modal .reports-menu-content {
    padding: 16px !important;
    gap: 12px !important;
    max-height: 80vh !important;
  }

  /* Adjust Report Cards (Buttons) */
  #reports-modal button,
  #reports-modal #manifesto-toggle-btn {
    padding: 12px !important;
  }

  #reports-modal button h3,
  #reports-modal #manifesto-toggle-btn h3 {
    font-size: 0.9rem !important;
  }

  #reports-modal button p,
  #reports-modal #manifesto-toggle-btn p {
    font-size: 0.7rem !important;
  }

  /* Adjust Icons */
  #reports-modal div[style*="width: 40px"] {
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
  }

  /* Submenu Adjustments */
  #manifesto-submenu button {
    padding: 12px 16px 12px 50px !important;
    font-size: 0.85rem !important;
  }

  #manifesto-submenu button span:first-child {
    font-size: 0.85rem !important;
  }
}

/* --- ANALYSIS MODALS MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {

  /* Global Modal Content Fix */
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    height: 95vh !important;
    max-height: 95vh !important;
    margin: 2.5vh auto !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
  }

  /* 1. Metrics Modal */
  #metrics-modal .modal-content>div:first-child {
    padding: 15px !important;
  }

  #metrics-modal .modal-content>div:nth-child(2) {
    padding: 15px !important;
  }

  #metrics-modal .modal-content>div:nth-child(2)>div:first-child {
    flex-direction: column !important;
    gap: 15px !important;
  }

  #metrics-modal .multi-select-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #metrics-modal .metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  #metrics-modal div[style*="padding: 40px"] {
    padding: 15px !important;
  }

  #metrics-paper {
    padding: 0 !important;
  }

  #metrics-paper h1 {
    font-size: 1.5rem !important;
  }

  /* 2. Manifesto Modal */
  #manifesto-modal .modal-content {
    padding: 15px !important;
  }

  #manifesto-modal .grid-2 {
    grid-template-columns: 1fr !important;
  }

  #manifesto-modal .form-actions {
    flex-direction: column !important;
  }

  #manifesto-modal .counter-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  #manifesto-modal .counter-control {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* 3. Heatmap Modal */
  #heatmap-modal .modal-content {
    height: 95vh !important;
  }

  #heatmap-modal .modal-content>div:nth-child(2) {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #heatmap-modal div[style*="width: 350px"] {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
    height: auto !important;
    max-height: 50vh !important;
  }

  #heatmap-map {
    height: 300px !important;
    flex-shrink: 0 !important;
  }

  /* 4. Unscanned Analysis Modal */
  #unscanned-analysis-modal .modal-content>div:nth-child(2) {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #unscanned-analysis-modal div[style*="width: 320px"] {
    width: 100% !important;
    border-right: none !important;
    height: auto !important;
  }

  #unscanned-map {
    height: 300px !important;
    flex-shrink: 0 !important;
  }

  /* 5. OGE Analysis Modal */
  #oge-analysis-modal .modal-content>div:nth-child(2) {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #oge-analysis-modal div[style*="width: 340px"] {
    width: 100% !important;
    border-right: none !important;
    height: auto !important;
  }

  #oge-map {
    height: 300px !important;
    flex-shrink: 0 !important;
  }

  /* 6. Event Manifesto Modal */
  #event-manifesto-modal .modal-content>div:nth-child(2)>div {
    flex-direction: column !important;
    gap: 15px !important;
  }

  #manifesto-charts-area {
    grid-template-columns: 1fr !important;
  }

  #event-manifesto-report-container {
    padding: 15px !important;
  }

  /* 7. Manifesto Operations Modal */
  #manifesto-operations-modal .table-container {
    overflow-x: auto !important;
  }

  /* 8. Sector Performance Comparison Modal */
  #sector-performance-modal .modal-content>div:nth-child(2) {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #sector-performance-modal div[style*="width: 320px"] {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    height: auto !important;
    flex-shrink: 0 !important;
  }

  #sp-results-area {
    padding: 15px !important;
  }

  #sp-content>div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  #sp-content>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  #sp-table-body td,
  #sp-table-body th {
    padding: 8px !important;
    font-size: 0.75rem !important;
  }

  /* 9. Personel Performance Comparison Modal */
  #personnel-performance-modal .modal-content>div:nth-child(2) {
    flex-direction: column !important;
    overflow-y: auto !important;
  }

  #personnel-performance-modal div[style*="width: 320px"] {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    height: auto !important;
    flex-shrink: 0 !important;
  }

  #pp-results-area {
    padding: 15px !important;
  }

  #pp-content>div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  #pp-content>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  #pp-table-body td,
  #pp-table-body th {
    padding: 8px !important;
    font-size: 0.75rem !important;
  }

  #manifesto-operations-modal td,
  #manifesto-operations-modal th {
    min-width: 100px !important;
    font-size: 0.8rem !important;
    padding: 8px !important;
  }

  /* 10. Admin Radio Modal Mobile Optimization */
  #admin-radio-modal .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    padding: 20px 15px !important;
    height: 90vh !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #admin-radio-channels {
    flex: 1 !important;
    overflow-y: auto !important;
  }

  .radio-channel-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  .channel-title-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .channel-actions-block {
    justify-content: space-between !important;
    width: 100% !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    gap: 8px !important;
  }

  .radio-control-btn {
    flex: 1 !important;
    width: auto !important;
    height: 38px !important;
    font-size: 0.65rem !important;
    padding: 0 5px !important;
  }

  #admin-radio-modal h2 {
    font-size: 1.1rem !important;
  }

  #admin-radio-modal p {
    font-size: 0.8rem !important;
  }

  .radio-action-btn {
    flex: 1 !important;
    font-size: 0.7rem !important;
    height: 40px !important;
    padding: 0 5px !important;
    text-align: center !important;
  }
}

/* Radio / Telsiz Premium Styles */
#personnel-radio-section {
  animation: fadeIn 0.5s ease;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

.radio-channel-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  cursor: default;
}

.radio-channel-card:hover {
  background: rgba(139, 92, 246, 0.08) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
  transform: translateX(5px);
}

.channel-info-block {
  flex: 1;
}

.channel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-title {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

.channel-pcount {
  font-size: 0.7rem;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.channel-id {
  margin: 4px 0 0 0;
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
}

.channel-actions-block {
  display: flex;
  gap: 12px;
  align-items: center;
}

#ptt-btn {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#ptt-btn:active {
  transform: scale(0.96);
}

.active-speaker-ring {
  border: 2px solid #8b5cf6;
  border-radius: 50%;
  animation: pulse-speaker 1.5s infinite;
}

@keyframes pulse-speaker {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Radio / Telsiz Premium Styles Extended */
.radio-channel-card.active-room {
  border-color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.05) !important;
  box-shadow: inset 4px 0 0 #8b5cf6;
}

#admin-radio-ptt-btn.talking,
#admin-navbar-ptt-btn.talking {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4) !important;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.voice-wave span {
  width: 2px;
  background: #a78bfa;
  border-radius: 1px;
  animation: wave-animation 1s ease-in-out infinite;
}

@keyframes wave-animation {

  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 16px;
  }
}

#leader-channel-toggle-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

#leader-channel-toggle-btn:active {
  transform: translateY(1px);
}

.radio-action-btn {
  height: 44px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: white;
}

.mute-all {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.unmute-all {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }

  20% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

.premium-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.premium-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 2px;
}

/* Sidebar Split Button Styles */
#admin-radio-ptt-btn:hover {
  background: rgba(139, 92, 246, 0.1);
}

#admin-radio-menu-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

#admin-radio-ptt-btn.talking {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444;
}

#admin-radio-ptt-btn.talking .status-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 15px #ef4444 !important;
}

/* Premium Radio Control Buttons */
.radio-control-btn {
  width: 105px !important;
  height: 32px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.7rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: white !important;
}

.radio-control-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.radio-control-btn:active {
  transform: scale(0.95);
}

.radio-btn-join {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

.radio-btn-leave {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.radio-btn-mute {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

.radio-btn-muted {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}

/* Premium Event Card Styles */
.event-card {
  margin-bottom: 4px;
  border-radius: 10px;
  overflow: visible;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(0, 243, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover {
  border-color: rgba(0, 243, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 243, 255, 0.1);
  transform: translateY(-2px);
}

.event-card-header {
  padding: 6px 10px;
  background: linear-gradient(90deg, rgba(0, 243, 255, 0.05), transparent);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 243, 255, 0.05);
}

.event-card-header:hover {
  background: linear-gradient(90deg, rgba(0, 243, 255, 0.1), rgba(0, 243, 255, 0.05));
}

.event-card-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}

.event-card-area {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 2px;
}

.event-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-left: 8px;
}

.event-delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.event-delete-btn:hover {
  background: #ef4444;
  color: #fff;
}

/* Premium Event Action Dropdown Menu */
.event-action-dropdown {
  position: relative;
  display: inline-block;
}

.event-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-action-btn:hover {
  background: rgba(0, 243, 255, 0.1);
  border-color: rgba(0, 243, 255, 0.3);
  color: var(--primary);
  transform: scale(1.05);
}

.event-action-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 243, 255, 0.1);
  z-index: 1000;
  min-width: 180px;
  padding: 8px;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-action-dropdown-menu.hidden {
  display: none;
}

.event-action-item {
  padding: 10px 14px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.event-action-item:hover {
  background: rgba(0, 243, 255, 0.1);
  color: #fff;
  padding-left: 18px;
}

.event-action-item.danger {
  color: #f87171;
}

.event-action-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Toast Notifications Container */
#alert-area {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 320px;
  width: 100%;
}

/* Toast Styles */
.toast-notification {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  animation: toast-enter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  position: relative;
  overflow: hidden;
}

.toast-exit {
  animation: toast-exit 0.4s ease forwards;
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-message {
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Progress bar inside toast */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 100%;
  transform-origin: left;
  animation: toast-progress 5s linear forwards;
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-progress {
  background: #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-progress {
  background: #ef4444;
}

/* Light Theme Toasts */
[data-theme="tech-light"] .toast-notification {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="tech-light"] .toast-message {
  color: #1e293b !important;
}

/* Hide Create Event Button on Mobile when Radio is Active */
@media (max-width: 1200px) {
  body.radio-active #create-event-btn {
    display: none !important;
  }
}

/* --- MOBILE RESPONSIVENESS OVERHAUL --- */
@media (max-width: 768px) {

  /* Sidebar Drawer Logic */
  .sidebar {
    position: fixed !important;
    top: 60px !important;
    left: -280px;
    /* Fully hide */
    width: 280px !important;
    height: calc(100dvh - 60px) !important;
    height: calc(100vh - 60px) !important;
    /* Fallback */
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-main) !important;
    backdrop-filter: blur(20px);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    padding-top: 0 !important;
    /* Spacing for navbar height */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px !important;
  }

  .sidebar.mobile-open {
    transform: translateX(280px);
  }

  /* Overlay */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Navbar Adjustments */
  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    height: 60px !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
    z-index: 2100 !important;
    /* Above sidebar (2000) */
    background: var(--bg-main) !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  .navbar .logo {
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .navbar .brand-text {
    display: none;
    /* Hide long title on very small screens */
  }

  /* Hide non-essential items on mobile navbar to make room for PTT/Radio and Actions */
  .navbar .user-info,
  .navbar #weather-widget,
  .navbar #personnel-coords-display,
  .navbar #weather-widget-personnel,
  .navbar .desktop-only,
  .navbar #reports-btn,
  .navbar #dark-mode-toggle,
  .navbar #dark-mode-toggle-personnel,
  .navbar #admin-messaging-btn,
  .navbar #personnel-messaging-btn {
    display: none !important;
  }

  .navbar button.menu-btn {
    display: block !important;
    font-size: 1.8rem !important;
    padding: 5px !important;
    z-index: 2200 !important;
  }

  /* Force display of critical mobile navbar items */
  /* Force display of critical mobile navbar items */
  .navbar #personnel-lang-btn,
  .navbar #personnel-logout-btn,
  .navbar #admin-lang-btn,
  .navbar #admin-logout-btn {
    display: flex !important;
  }

  /* Optimize Radio Toolbar for Mobile to match other buttons */
  #personnel-radio-toolbar,
  #admin-radio-toolbar {
    height: 36px !important;
    padding: 0 4px !important;
    border-radius: 8px !important;
    margin-left: 5px !important;
    gap: 6px !important;
  }

  /* Force display when active to prevent rendering issues */
  #personnel-radio-toolbar:not(.hidden),
  #admin-radio-toolbar:not(.hidden) {
    display: flex !important;
  }

  /* REPORTS MODAL LIGHT THEME OVERRIDES */
  [data-theme="tech-light"] #reports-modal .modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
  }

  [data-theme="tech-light"] #reports-modal .modal-content>div:first-child {
    /* Header */
    background: linear-gradient(to right, #f8fafc, #f1f5f9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  /* Headings & Text */
  [data-theme="tech-light"] #reports-modal h2,
  [data-theme="tech-light"] #reports-modal h3 {
    color: #0f172a !important;
  }

  [data-theme="tech-light"] #reports-modal p {
    color: #64748b !important;
  }

  [data-theme="tech-light"] #reports-modal .close-modal {
    color: #94a3b8 !important;
  }

  [data-theme="tech-light"] #reports-modal .close-modal:hover {
    color: #ef4444 !important;
  }

  /* Buttons */
  [data-theme="tech-light"] #reports-modal button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }

  [data-theme="tech-light"] #reports-modal button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
  }

  /* Icon Container inside buttons */
  [data-theme="tech-light"] #reports-modal button>div>div:first-child {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
  }

  /* Adjust main content padding because navbar is now fixed */
  .dashboard-content {
    margin-top: 60px !important;
    flex-direction: column !important;
  }

  /* Keep essential buttons */
  #dark-mode-toggle,
  #dark-mode-toggle-personnel,
  .navbar .user-info,
  #reports-btn,
  #history-btn,
  #admin-messaging-btn,
  #personnel-messaging-btn {
    display: none !important;
    /* Move these to sidebar for better mobile UI */
  }

  /* Dashboard Content */
  .dashboard-content {
    flex-direction: column;
  }

  /* Map Fullscreen on mobile when sidebar is drawer */
  #map-wrapper,
  #personnel-map-wrapper {
    height: calc(100vh - 60px) !important;
    width: 100% !important;
  }

  /* Mobile Grid Fixes */
  .metrics-grid-compact,
  .cr-grid-4,
  .cr-grid-3,
  .cr-grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* Admin Table Responsiveness */
  .user-management-container {
    padding: 10px !important;
  }

  .premium-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Messaging Modal Mobile */

  /* Messaging Modal - Light Theme Overrides */
  [data-theme="tech-light"] #messaging-modal .modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
  }

  /* Header */
  [data-theme="tech-light"] #messaging-modal .modal-content>div:first-child {
    background: linear-gradient(to right, #f8fafc, #eff6ff) !important;
    /* light slate to light blue */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }

  [data-theme="tech-light"] #messaging-modal h2 {
    color: #1e293b !important;
  }

  /* Tabs */
  [data-theme="tech-light"] .msg-tabs {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  [data-theme="tech-light"] .msg-tab {
    color: #64748b !important;
  }

  [data-theme="tech-light"] .msg-tab.active {
    background: rgba(255, 255, 255, 1) !important;
    color: #0ea5e9 !important;
    /* Primary blue */
    border-bottom: 2px solid #0ea5e9 !important;
  }

  /* Content Area */
  [data-theme="tech-light"] .msg-content {
    background: #ffffff !important;
  }

  /* Empty State */
  [data-theme="tech-light"] .msg-list>div {
    color: #94a3b8 !important;
  }

  /* Message Card */
  [data-theme="tech-light"] .msg-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  [data-theme="tech-light"] .msg-card:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
  }

  [data-theme="tech-light"] .msg-card.unread {
    background: #eff6ff !important;
    /* Very light blue */
    border-left: 3px solid #3b82f6 !important;
  }

  /* Message Header Text (Sender Name) - Targeting the inline style */
  [data-theme="tech-light"] .msg-card .msg-header>div>div>div:first-child {
    color: #0f172a !important;
    /* Dark Slate */
  }

  /* Message Header Date */
  [data-theme="tech-light"] .msg-card .msg-header>div>div>div:last-child {
    color: #64748b !important;
  }

  /* Message Preview */
  [data-theme="tech-light"] .msg-preview {
    color: #475569 !important;
  }

  /* Message Content (Expanded) */
  [data-theme="tech-light"] .msg-card-content {
    background: #f8fafc !important;
    color: #334155 !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  /* Delete Button */
  [data-theme="tech-light"] .delete-btn {
    color: #94a3b8 !important;
  }

  [data-theme="tech-light"] .delete-btn:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
  }

  /* Inputs & Selects in Write Tab */
  [data-theme="tech-light"] #tab-write .premium-input,
  [data-theme="tech-light"] #tab-write select,
  [data-theme="tech-light"] #tab-write textarea {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
  }

  [data-theme="tech-light"] #tab-write label {
    color: #475569 !important;
  }

  /* Selection Lists (Personnel/Sector) */
  [data-theme="tech-light"] .msg-item-row {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
  }

  [data-theme="tech-light"] .msg-item-row:hover {
    background: #f1f5f9 !important;
  }

  [data-theme="tech-light"] .msg-item-row.selected {
    background: #e0f2fe !important;
    /* Light blue */
    color: #0369a1 !important;
  }

  .messaging-modal-content {
    width: 95% !important;
    height: 90vh !important;
    margin: 5vh auto !important;
  }

  .msg-layout {
    flex-direction: column !important;
  }

  .msg-sidebar {
    width: 100% !important;
    height: 150px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  /* Auth Card Mobile */
  .auth-container {
    padding: 20px;
  }

  .card {
    padding: 1.5rem !important;
  }

  /* Modal Responsiveness */
  .modal-content {
    width: 95% !important;
    max-width: none !important;
    margin: 5% auto !important;
    padding: 1.25rem !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* Mobile Visibility Utilities */
  .mobile-only {
    display: flex !important;
  }


  .mobile-only.force-hidden {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }
}

/* Base Utility for Mobile Overlay (needed outside MQ for transition) */
.sidebar-overlay {
  display: block;
  /* app.js handles classes */
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-progress {
  background: #3b82f6;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-progress {
  background: #f59e0b;
}

@keyframes toast-enter {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-exit {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* --- Premium Dialog (Alert/Confirm) --- */
.premium-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-dialog-overlay.show {
  opacity: 1;
  visibility: visible;
}

.premium-dialog-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 243, 255, 0.05);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

.premium-dialog-overlay.show .premium-dialog-card {
  transform: scale(1) translateY(0);
}

.premium-dialog-icon {
  width: 64px;
  height: 64px;
  background: rgba(0, 243, 255, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  color: var(--primary);
  border: 1px solid rgba(0, 243, 255, 0.2);
}

.dialog-error .premium-dialog-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.dialog-success .premium-dialog-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.premium-dialog-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.premium-dialog-message {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.premium-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.premium-dialog-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  flex: 1;
}

.btn-confirm {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Response to user request: Removing sidebar gap */
#notification-sidebar-list {
  padding: 0 !important;
  margin: 0 !important;
}

.event-arrow {
  display: none !important;
}

#personnel-radio-section {
  transition: none !important;
  animation: none !important;
}

#personnel-event-container,
#personnel-sector-container {
  transition: none !important;
  animation: none !important;
}

/* --- Premium Flatpickr & Smart Calendar --- */
.flatpickr-calendar {
  background: #0f172a !important;
  border: 1px solid rgba(0, 243, 255, 0.2) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 243, 255, 0.05) !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  z-index: 3000000 !important;
}

.flatpickr-day {
  color: #94a3b8 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.flatpickr-day:hover {
  background: rgba(0, 243, 255, 0.1) !important;
  color: #fff !important;
}

.flatpickr-day.today {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.has-data,
.flatpickr-day.startRange.has-data,
.flatpickr-day.endRange.has-data {
  background: linear-gradient(135deg, #0ea5e9 0%, #00f3ff 100%) !important;
  border: none !important;
  color: #000 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important;
}

.flatpickr-day.inRange {
  background: rgba(0, 243, 255, 0.15) !important;
  box-shadow: -5px 0 0 rgba(0, 243, 255, 0.15), 5px 0 0 rgba(0, 243, 255, 0.15) !important;
  color: #fff !important;
  border-radius: 0 !important;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: #fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #0f172a !important;
  color: #fff !important;
  font-weight: 700 !important;
}

.flatpickr-weekday {
  color: #475569 !important;
  font-weight: 700 !important;
}

/* Smart Calendar Highlighting (Days with records) */
.flatpickr-day.has-data {
  color: #fff !important;
  position: relative;
  background: rgba(0, 243, 255, 0.1) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(0, 243, 255, 0.2) !important;
}

.flatpickr-day.has-data::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #00f3ff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 243, 255, 1), 0 0 15px rgba(0, 243, 255, 0.5);
}

.flatpickr-day.has-data.endRange::after {
  background: #000;
  box-shadow: none;
}

/* Archive Smart Calendar */
.flatpickr-day.has-archive-data {
  color: #fff !important;
  position: relative;
  background: rgba(139, 92, 246, 0.15) !important;
  border-radius: 4px;
}

.flatpickr-day.has-archive-data::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #a78bfa;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(167, 139, 250, 1);
}

.flatpickr-day.has-archive-data.selected::after,
.flatpickr-day.has-archive-data.startRange::after,
.flatpickr-day.has-archive-data.endRange::after {
  background: #fff;
  box-shadow: none;
}

/* Premium Inputs */
.premium-input {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(0, 243, 255, 0.15) !important;
  border-radius: 10px !important;
  color: #fff !important;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.15) !important;
  background: rgba(15, 23, 42, 0.8) !important;
}

.premium-input::placeholder {
  color: #64748b !important;
}

/* Hide native browser date/time icons to prevent overlap with premium styling */
input.premium-input::-webkit-calendar-picker-indicator,
input.premium-input::-webkit-inner-spin-button,
input.premium-input::-webkit-clear-button {
  display: none !important;
  -webkit-appearance: none !important;
}

input.premium-input {
  padding-right: 35px !important;
}

/* --- Premium Admin Event Steps --- */
.event-step.premium-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(0, 243, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.event-step.premium-card:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(0, 243, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 243, 255, 0.05);
}

.step-title {
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b !important;
  margin-bottom: 12px !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--primary);
  border-radius: 2px;
}

/* Custom Datalist / Select Aesthetics for Premium Inputs */
input.premium-input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
}

/* Scrollbar for inputs/cards if needed */
.event-step.premium-card::-webkit-scrollbar {
  width: 4px;
}

.event-step.premium-card::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.2);
  border-radius: 10px;
}

/* --- Premium Number Control --- */
.premium-number-control {
  display: flex !important;
  align-items: center;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(0, 243, 255, 0.1) !important;
  border-radius: 12px !important;
  overflow: hidden;
  height: 48px;
  width: 100%;
}

.premium-number-control button {
  width: 48px !important;
  height: 100% !important;
  background: rgba(0, 243, 255, 0.05) !important;
  border: none !important;
  color: var(--primary) !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-number-control button:hover {
  background: rgba(0, 243, 255, 0.15) !important;
  color: #fff !important;
}

.premium-number-control button:active {
  background: rgba(0, 243, 255, 0.2) !important;
  transform: scale(0.95);
}

.premium-number-control input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
}

/* Remove default number arrows */
.premium-number-control input::-webkit-outer-spin-button,
.premium-number-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.premium-number-control input[type=number] {
  -webkit-appearance: textfield;
  appearance: textfield;
  -moz-appearance: textfield;
}

/* --- Premium Custom Dropdown --- */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
  animation: slide-up 0.2s ease-out;
}

.dropdown-results.hidden {
  display: none;
}

.dropdown-item {
  padding: 10px 14px;
  color: #cbd5e1;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary);
  padding-left: 18px;
}

.dropdown-item.selected {
  background: rgba(0, 243, 255, 0.2);
  color: #fff;
  font-weight: 700;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-results::-webkit-scrollbar {
  width: 4px;
}

.dropdown-results::-webkit-scrollbar-thumb {
  background: rgba(0, 243, 255, 0.2);
  border-radius: 10px;
}

/* --- Event Action Dropdown Menu (3-dot menu) --- */
.event-action-dropdown {
  position: relative;
  display: inline-block;
}

.event-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  line-height: 1;
  width: auto;
  margin: 0;
}

.event-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.event-action-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  z-index: 5000;
  min-width: 180px;
  padding: 8px;
  animation: slide-up 0.2s ease-out;
  backdrop-filter: blur(10px);
}

.event-action-dropdown-menu.hidden {
  display: none;
}

.event-action-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.event-action-item:hover {
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary);
  padding-left: 18px;
}

.event-action-item.danger {
  color: #f87171;
}

.event-action-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Consolidated Report Styles */
.cr-report-page {
  background: white;
  padding: 40px;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
}

.cr-header {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
}

.cr-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cr-subtitle {
  font-size: 16px;
  color: #64748b;
  margin-top: 5px;
  font-weight: 600;
}

.cr-date {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 5px;
}

.cr-section {
  margin-bottom: 30px;
  page-break-inside: avoid;
}

.cr-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  border-left: 4px solid #8b5cf6;
  padding-left: 10px;
  margin-bottom: 15px;
}

.cr-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.cr-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.cr-card,
.cr-card-sm {
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.cr-card .lbl,
.cr-card-sm .lbl {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cr-card .val,
.cr-val-lg {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.cr-card-sm .val {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.cr-row {
  display: flex;
  gap: 20px;
}

.cr-half {
  flex: 1;
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.cr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.cr-table th {
  text-align: left;
  padding: 8px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
}

.cr-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.cr-chip {
  display: inline-block;
  padding: 4px 10px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 20px;
  font-size: 12px;
  margin: 2px;
  font-weight: 600;
}

.cr-footer {
  margin-top: 50px;
  text-align: center;
  font-size: 10px;
  color: #cbd5e1;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge.high {
  background: #dcfce7;
  color: #166534;
}

.badge.med {
  background: #fefaca;
  color: #854d0e;
}

.badge.low {
  background: #fee2e2;
  color: #991b1b;
}

.cr-more {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 5px;
  font-style: italic;
}

.cr-note {
  font-size: 11px;
  color: #64748b;
  margin-top: 10px;
  font-style: italic;
}

.cr-flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cr-text-sm {
  font-size: 12px;
  color: #475569;
}

/* --- CONSOLIDATED REPORT PREMIUM STYLES --- */
.cr-report-page {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1e293b;
  background: white;
  line-height: 1.5;
}

.cr-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 40px;
  text-align: center;
  color: white;
  border-bottom: 8px solid #8b5cf6;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.cr-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cr-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #00f3ff;
  text-shadow: 0 2px 10px rgba(0, 243, 255, 0.3);
}

.cr-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 10px;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cr-date {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 10px;
  font-weight: 500;
}

.cr-section {
  margin-bottom: 40px;
  page-break-inside: avoid;
}

.cr-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cr-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: #8b5cf6;
  border-radius: 2px;
}

.cr-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cr-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.cr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.cr-card {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border-top: 4px solid #8b5cf6;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.cr-card-sm {
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cr-card .lbl,
.cr-card-sm .lbl {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cr-card .val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.cr-card-sm .val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.cr-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
}

.cr-table th {
  background: #f1f5f9;
  color: #475569;
  text-align: left;
  padding: 12px 15px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.cr-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.cr-table tr:nth-child(even) {
  background: #f8fafc;
}

.cr-chart-container {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.cr-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cr-badge.high {
  background: #dcfce7;
  color: #166534;
}

.cr-badge.med {
  background: #fef9c3;
  color: #854d0e;
}

.cr-badge.low {
  background: #fee2e2;
  color: #991b1b;
}

.cr-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

.cr-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.cr-half {
  flex: 1;
}

.cr-chart-box {
  width: 100%;
  height: 250px;
  position: relative;
}

.cr-summary-academic {
  page-break-inside: avoid;
}

/* Specific adjustment for PDF generation text crispness */
@media print {
  .cr-report-page {
    zoom: 1;
  }
}

/* PDF Export Mode Styles */
.pdf-export-mode .cr-report-page {
  background: white;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.pdf-export-mode .cr-header {
  padding: 30px 25px;
  margin-bottom: 0;
}

.pdf-export-mode .cr-title {
  font-size: 1.6rem;
  letter-spacing: 2px;
}

.pdf-export-mode .cr-subtitle {
  font-size: 1rem;
}

.pdf-export-mode .cr-section {
  page-break-inside: avoid;
  break-inside: avoid;
  margin-bottom: 25px;
}

.pdf-export-mode .cr-grid-2,
.pdf-export-mode .cr-grid-3,
.pdf-export-mode .cr-grid-4 {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-export-mode .cr-card,
.pdf-export-mode .cr-card-sm {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-export-mode .cr-table {
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-export-mode .cr-chart-container {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Event Info Form Premium Styling for PDF */
.pdf-export-mode .cr-section[style*="background: linear-gradient"] {
  background: #f0f9ff !important;
  border: 2px solid #3b82f6 !important;
  padding: 20px !important;
  page-break-inside: avoid;
  break-inside: avoid;
}

.pdf-export-mode .cr-section h3 {
  font-size: 0.85rem !important;
  margin: 15px 0 8px 0 !important;
}

.pdf-export-mode .cr-section div[style*="display: grid"] {
  gap: 8px !important;
  font-size: 0.85rem !important;
}

/* Ensure proper text rendering */
.pdf-export-mode * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Force page break before specific sections if needed */
.page-break-before {
  page-break-before: always;
  break-before: page;
}

.page-break-after {
  page-break-after: always;
  break-after: page;
}

/* Academic Summary Section */
.pdf-export-mode #cr-academic-summary-container {
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Footer always at bottom */
.pdf-export-mode .cr-footer {
  margin-top: 30px;
  padding-top: 20px;
}

/* Compact grids for better PDF fit */
.pdf-export-mode .cr-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pdf-export-mode .cr-card-sm {
  padding: 10px;
}

.pdf-export-mode .cr-card-sm .lbl {
  font-size: 0.65rem;
}

.pdf-export-mode .cr-card-sm .val {
  font-size: 0.95rem;
}

.radio-monitor-btn {
  background: #eab308;
}

.radio-channel-card .channel-actions-block button {
  transition: all 0.2s;
}

/* Hide Radio Footer safely if HTML removal fails */
#mute-all-btn,
#unmute-all-btn {
  display: none !important;
}

.radio-channel-card .channel-actions-block {
  gap: 10px;
}

.radio-monitor-btn {
  background: #eab308;
  color: white;
}

.radio-monitor-btn:hover {
  background: #ca8a04;
}

.active-monitor {
  border: 2px solid #eab308 !important;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}

.radio-primary-btn {
  background: #8b5cf6;
  color: white;
}

.radio-primary-btn.radio-btn-leave {
  background: #ef4444;
}

/* --- PREMIUM REPORTING DESIGN SYSTEM --- */
.premium-report-container {
  padding: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1e293b;
  background: #ffffff;
}

.report-hero-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 40px 60px;
  text-align: left;
  color: white;
  border-bottom: 8px solid #3b82f6;
  position: relative;
  overflow: hidden;
}

.report-hero-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05));
  transform: skewX(-20deg);
}

.report-hero-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #3b82f6;
}

.report-hero-subtitle {
  margin: 10px 0 0 0;
  font-size: 1.1rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 1px;
}

.metrics-rich-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 40px 60px;
}

.premium-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 30px 24px;
  /* Increased vertical padding approx 15-20% */
  min-height: 135px;
  /* Ensure consistent taller height */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Center horizontally */
  text-align: center;
  /* Center text */
  position: relative;
  overflow: hidden;
}

.premium-metric-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #3b82f6;
}

.premium-metric-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  width: 100%;
}

.premium-metric-value {
  font-size: 1.5rem;
  /* Reduced from 1.75rem for better fit */
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: baseline;
  justify-content: center;
  /* Center content */
  gap: 5px;
  flex-wrap: wrap;
  /* Allow wrapping for long values like time ranges */
  line-height: 1.2;
  width: 100%;
}

.premium-metric-value small {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.premium-section-title {
  padding: 0 60px;
  margin: 40px 0 20px 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.premium-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #f1f5f9;
}

.premium-table-wrapper {
  margin: 0 60px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.premium-table th {
  background: #f8fafc;
  padding: 16px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

.premium-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.premium-table tr:last-child td {
  border-bottom: none;
}

.premium-table tr:hover {
  background: #fcfdfe;
}

.status-badge-premium {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge-success {
  background: #dcfce7;
  color: #166534;
}

.status-badge-warning {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge-info {
  background: #e0f2fe;
  color: #075985;
}

.executive-summary-box {
  margin: 40px 60px;
  padding: 30px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #3b82f6;
  position: relative;
  page-break-inside: avoid;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.executive-summary-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.executive-summary-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
}

.report-footer-premium {
  margin-top: 80px;
  padding: 40px 60px;
  border-top: 1px solid #f1f5f9;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.6;
}

@media print {
  .premium-report-container {
    width: 210mm;
  }

  .report-hero-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .premium-metric-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
  }

  .premium-table th {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}