/**
 * AuditLine v2 Enterprise - Master Design System & Core Stylesheet
 * Executive SaaS Theme (Light Blue Header by Default + Dynamic Dark Mode Swapper)
 */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --header-bg: #e0f2fe;        /* Light Blue Header */
  --header-border: #bae6fd;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  
  --accent: #0284c7;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #24344d;
  --bg-input: #0f172a;
  --header-bg: #0f172a;
  --header-border: #334155;
  --border-color: #334155;
  --border-light: #475569;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);
  
  --accent: #38bdf8;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Typography & Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-main);
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mr-1 { margin-right: 4px; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-align-center {
  display: flex;
  align-items: center;
}

/* Header & Nav */
.app-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  height: auto;
  min-height: 114px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(2, 132, 199, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.brand-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
}
.brand-logo i {
  color: var(--primary);
}
.brand-tagline {
  display: none;
}

.app-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  padding: 5px 7px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-link:hover {
  background-color: rgba(2, 132, 199, 0.1);
  color: var(--text-main);
  text-decoration: none;
}
.nav-link.active {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.nav-link.active i {
  color: #ffffff !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mgmt-co-badge {
  font-size: 12px;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--header-border);
  padding: 5px 12px;
  border-radius: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}
.mgmt-co-badge i {
  color: var(--primary);
}

.theme-btn {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--header-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-btn:hover {
  background-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main Container & Tab Views */
.app-main {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.tab-view {
  display: none;
}
.tab-view.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Panels */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card-hover);
}
.card-body {
  padding: 20px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-outline {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-light);
}
.btn-light {
  background-color: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-light:hover {
  background-color: var(--border-color);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.15s ease;
}
.btn-icon:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}
.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); }
.badge-info { background-color: rgba(2, 132, 199, 0.12); color: var(--accent); }
.badge-light { background-color: var(--bg-card-hover); color: var(--text-main); border: 1px solid var(--border-color); }
.badge-dark { background-color: #0f172a; color: #f8fafc; }
.badge-outline { border: 1px solid var(--border-color); background: transparent; color: var(--text-main); }
.badge-site { background-color: rgba(37, 99, 235, 0.08); color: var(--primary); border: 1px solid rgba(37, 99, 235, 0.2); font-size: 12px; padding: 4px 10px; }

/* Grade Pills */
.grade-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.grade-gradea { background-color: #4f46e5; color: #fff; }
.grade-gradeb { background-color: #0284c7; color: #fff; }
.grade-gradec { background-color: #0d9488; color: #fff; }
.grade-graded { background-color: #d97706; color: #fff; }
.grade-gradee { background-color: #dc2626; color: #fff; }

/* Live / Offline Status Beacons */
.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.beacon-live-blue {
  background-color: #0284c7;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
  animation: pulseBlue 1.5s infinite;
}
.beacon-offline-red {
  background-color: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
  animation: pulseRed 1s infinite;
}

@keyframes pulseBlue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(2, 132, 199, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

@keyframes pulseRed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.badge-live-blue {
  background-color: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: var(--accent);
  font-weight: 700;
  padding: 4px 10px;
}
.badge-offline-red {
  background-color: var(--danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: var(--danger);
  font-weight: 700;
  padding: 4px 10px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th {
  background-color: var(--bg-card-hover);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  vertical-align: middle;
  background-color: var(--bg-card);
}
.table tbody tr:hover td {
  background-color: var(--bg-card-hover);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100005 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card-hover);
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-card-hover);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.alert-info {
  background-color: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--accent);
}
.alert-warning {
  background-color: var(--warning-bg);
  border: 1px solid rgba(217, 119, 6, 0.25);
  color: var(--warning);
}
.alert-danger {
  background-color: var(--danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--danger);
}
.alert-success {
  background-color: var(--success-bg);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--success);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background-color: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease;
}
.toast-success { background-color: #065f46; }
.toast-danger { background-color: #991b1b; }
.toast-info { background-color: #1e40af; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-icon {
  font-size: 40px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
}
.empty-state p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: 13px;
}

/* App Footer */
.app-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--header-border);
  padding: 16px 24px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-separator {
  color: var(--border-light);
}
.footer-copy strong, .footer-credit strong {
  color: var(--text-main);
  font-weight: 600;
}
.footer-version {
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Tactical Leaflet Map Pulse Markers */
.leaflet-pulse-icon {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
}
.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 2;
}
.pulse-dot:hover {
  transform: scale(1.3);
}
.pulse-dot.green { background: #10b981; box-shadow: 0 0 10px #10b981; }
.pulse-dot.red { background: #ef4444; box-shadow: 0 0 14px #ef4444; }
.pulse-dot.orange { background: #f59e0b; box-shadow: 0 0 12px #f59e0b; }

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
}
.pulse-ring.red {
  border: 2px solid #ef4444;
  animation: leafletPulseRing 1.3s infinite ease-out;
}
.pulse-ring.orange {
  border: 2px solid #f59e0b;
  animation: leafletPulseRing 1.5s infinite ease-out;
}
@keyframes leafletPulseRing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ==========================================================================
   AuditLine v3.0.0 Enterprise Layout & Header Styling
   ========================================================================== */

/* User Profile & RBAC Session Widget in Header */
.user-session-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--header-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-role-badge {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.user-switch-select {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

/* Pulsing Orange Border for Shift SLA Compliance card awaiting Ops Man Approval */
.sla-pending-pulse {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6) !important;
  animation: slaOrangePulse 1.2s infinite alternate ease-in-out !important;
  position: relative;
  cursor: pointer;
}

@keyframes slaOrangePulse {
  0% {
    border-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), inset 0 0 6px rgba(245, 158, 11, 0.15);
  }
  100% {
    border-color: #d97706;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.95), inset 0 0 14px rgba(245, 158, 11, 0.35);
  }
}

.sla-pending-pulse:hover {
  transform: translateY(-2px);
}

/* SLA Itemized Approval Matrix Styles */
.sla-table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  margin-top: 10px;
}

.sla-item-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sla-item-table th {
  background: var(--bg-card-hover);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.sla-item-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.sla-item-table tr:last-child td {
  border-bottom: none;
}

.sla-item-table tr.sla-row-selected {
  background: rgba(245, 158, 11, 0.08) !important;
}

.sla-item-table tr:hover {
  background: var(--bg-card-hover);
}

.sla-checkbox-col {
  width: 42px;
  text-align: center;
}

.sla-check-input {
  width: 17px;
  height: 17px;
  accent-color: #f59e0b;
  cursor: pointer;
  vertical-align: middle;
}

/* Floating Tactical Chat Quick Launcher */
.floating-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  z-index: 99;
  transition: all 0.2s ease;
}

.floating-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

/* Tactical Chat Custom Channel & Member Picker Styles */
.chat-member-select-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.chat-member-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}

.chat-member-item.selected {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

.channel-tag-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.channel-tag-site {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.channel-tag-mgmt {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.channel-tag-vip {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.channel-tag-tac {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}




/* ==========================================================================
   HIGH-CONTRAST DROPDOWN & SELECT OPTION STYLING (Universal Cross-Theme)
   Guarantees crisp dark green text (#14532d) on clean white background (#ffffff)
   ========================================================================== */
select,
.form-select,
.mode-switcher-container select,
#portal-mode-select,
#profile-role-select,
#site-selector {
  background-color: #ffffff !important;
  color: #14532d !important;
  border: 1.5px solid #16a34a !important;
  font-weight: 600 !important;
}

select option,
.form-select option,
.mode-switcher-container select option,
#portal-mode-select option,
#profile-role-select option,
#site-selector option {
  background-color: #ffffff !important;
  color: #14532d !important;
  font-weight: 600 !important;
  padding: 8px 12px;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: #dcfce7 !important;
  color: #14532d !important;
}

select optgroup,
.form-select optgroup {
  background-color: #f0fdf4 !important;
  color: #15803d !important;
  font-weight: 800 !important;
  font-size: 0.85rem;
  padding: 6px 10px;
}

/* Enforce in Dark Mode as well */
[data-theme="dark"] select,
[data-theme="dark"] .form-select,
[data-theme="dark"] select option,
[data-theme="dark"] select optgroup {
  background-color: #ffffff !important;
  color: #14532d !important;
}

/* ==========================================================================
   TACTICAL FORENSIC WATERMARK & ANTI-EXFILTRATION BLACKOUT VEIL
   ========================================================================== */
.aegis-watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99998;
  opacity: 0.85;
}

#aegis-blackout-veil {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  z-index: 99997;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
