/* Core Design Tokens - Premium Light Sky Blue & Crimson Theme */
:root {
  --navy: #f8fafc;
  --navy-light: #ffffff;
  --navy-dark: #f1f5f9;
  
  /* Brand Red (Sponsor / Accents) */
  --teal: #f43f5e;
  --teal-light: #fda4af;
  
  /* Brand Sky Blue (Site / Investigator / Primary) */
  --mint: #0ea5e9;
  --mint-light: #38bdf8;
  --mint-dark: #0284c7;
  
  --amber: #b45309; /* Darker for accessibility */
  --amber-light: #fef3c7;
  
  --rose: #b91c1c;
  --rose-light: #fee2e2;
  
  --purple: #6d28d9;
  --purple-light: #ede9fe;
  
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --border-card: rgba(14, 165, 233, 0.15);
  --border-focus: #0ea5e9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Box Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 35px rgba(15, 23, 42, 0.06);
  --shadow-glow-mint: 0 0 25px rgba(14, 165, 233, 0.1);
  --shadow-glow-teal: 0 0 25px rgba(244, 63, 94, 0.1);
  --shadow-glow-purple: 0 0 25px rgba(139, 92, 246, 0.1);
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset & Body */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Gradients */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.03) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}
body::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.02) 0%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--navy-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.25);
}

/* Top Header Styles */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
  padding: 0 24px;
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand em {
  color: var(--mint);
  font-style: normal;
  text-shadow: none;
}

/* Role Switcher Widget */
.role-switcher-container {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 4px;
  border-radius: 30px;
}

.role-switcher-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px;
}

.role-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
}

.role-btn:hover {
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.03);
}

.role-btn.active[data-role="sponsor"] {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-glow-teal);
}

.role-btn.active[data-role="site"] {
  background: var(--mint);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-glow-mint);
}

.role-btn.active[data-role="smo"] {
  background: var(--purple);
  color: #fff;
  box-shadow: var(--shadow-glow-purple);
}

/* Layout Grid */
.app-container {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}

/* Sidebar Nav */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: var(--transition);
}

.sidebar-item a:hover {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar-item.active a {
  background: rgba(14, 165, 233, 0.08);
  color: var(--mint-dark);
  font-weight: 600;
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: inset 0 0 10px rgba(14, 165, 233, 0.02);
}

.sponsor-mode .sidebar-item.active a {
  background: rgba(244, 63, 94, 0.08);
  color: var(--teal);
  border-color: rgba(244, 63, 94, 0.3);
}

.smo-mode .sidebar-item.active a {
  background: rgba(139, 92, 246, 0.08);
  color: var(--purple);
  border-color: rgba(139, 92, 246, 0.3);
}

.user-badge {
  margin-top: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-badge-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--mint-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sponsor-mode .user-badge-title {
  color: var(--teal-light);
}
.smo-mode .user-badge-title {
  color: var(--purple-light);
}

.user-badge-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Dashboard Panels */
.dashboard-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-panel.active {
  display: block;
}

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

/* Page Headers */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 20px;
}

.panel-title h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel-title p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-primary {
  background: var(--mint);
  color: #fff;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--mint-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.btn-outline-mint {
  background: transparent;
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--mint-light);
}

.btn-outline-mint:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: var(--mint);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--rose);
  color: white;
}
.btn-danger:hover {
  background: #c93d3d;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Cards & Layout Grid */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-card-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 10px;
  letter-spacing: -0.02em;
}

.stat-card-value em {
  font-style: normal;
  color: var(--mint-light);
  text-shadow: 0 0 10px rgba(56,189,248,0.2);
}

.stat-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(14, 165, 233, 0.2);
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Lists and Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border-card);
}

td {
  padding: 20px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(15, 23, 42, 0.01);
}

/* Tags & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-mint {
  background: rgba(14, 165, 233, 0.1);
  color: var(--mint-dark);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-teal {
  background: rgba(244, 63, 94, 0.1);
  color: var(--teal);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.1);
  color: var(--amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-rose {
  background: rgba(220, 38, 38, 0.1);
  color: var(--rose);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* Forms styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group label span {
  color: var(--mint-light);
}

.form-control {
  width: 100%;
  background: rgba(15, 23, 42, 0.02);
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
  background: #ffffff;
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.form-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.form-checkbox-item:hover {
  border-color: var(--mint);
  color: var(--text-primary);
}

.form-checkbox-item input {
  accent-color: var(--mint);
}

/* Filter panel */
.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.filter-bar select, .filter-bar input {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  font-size: 13px;
  transition: var(--transition);
}

.filter-bar select:focus, .filter-bar input:focus {
  border-color: var(--mint);
}

/* Split Details Layout */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
}

/* Site Intelligence Score Component */
.intel-score-box {
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.score-badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.score-number {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-number.score-high { color: var(--mint-dark); }
.score-number.score-med { color: var(--amber); }
.score-number.score-low { color: var(--rose); }

.score-rec {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 20px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rec-high { background: var(--mint-dark); border: 1px solid var(--mint); }
.rec-med { background: var(--amber); border: 1px solid var(--amber); }
.rec-low { background: var(--rose); border: 1px solid var(--rose); }

.intel-dimension-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intel-dim-item {
  margin-bottom: 4px;
}

.intel-dim-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.intel-dim-bar-bg {
  height: 6px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.intel-dim-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s ease;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--navy-light);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-glow-mint);
  animation: modalSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--rose-light);
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 24px 32px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

/* CDA & FQ Signatures and Progress Bar */
.cda-document {
  background: var(--navy-dark);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 240px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cda-document h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
}

.signature-pad-container {
  border: 1.5px dashed rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(14, 165, 233, 0.02);
  margin-bottom: 20px;
  text-align: center;
  box-shadow: inset 0 0 15px rgba(14, 165, 233, 0.02);
}

.signature-input {
  font-family: 'Great Vibes', 'Brush Script MT', cursive, sans-serif;
  font-size: 36px;
  color: var(--mint-dark);
  border: none;
  background: transparent;
  width: 100%;
  text-align: center;
  outline: none;
  border-bottom: 1.5px solid rgba(14, 165, 233, 0.2);
  padding-bottom: 12px;
  text-shadow: none;
}

.signature-input::placeholder {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--text-muted);
  text-shadow: none;
}

.audit-trail-box {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.audit-trail-box strong {
  color: var(--text-secondary);
}

/* FQ Wizard Progress Header */
.fq-progress-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.fq-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.fq-progress-fill {
  height: 100%;
  background: var(--mint);
  width: 0%;
  box-shadow: none;
  transition: width 0.3s ease;
}

.fq-progress-text {
  font-size: 11px;
  font-weight: 800;
  color: var(--mint-dark);
  white-space: nowrap;
}

.fq-question-card {
  animation: fadeIn 0.3s ease;
}

/* Responsive adjustments */
@media(max-width: 960px) {
  .app-container {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 24px;
  }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .sidebar-menu {
    flex-direction: row;
  }
  .user-badge {
    display: none;
  }
  .card-grid-3, .card-grid-2 {
    grid-template-columns: 1fr;
  }
  .split-layout {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 12px;
  }
  .role-switcher-container {
    width: 100%;
    justify-content: center;
  }
}

/* Spinner Animation */
.spin {
  display: inline-block;
  animation: spin-anim 1.5s linear infinite;
}
@keyframes spin-anim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Authentication Styles */
#auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px 24px;
  background: var(--bg-app);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 40px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* OTP Digits Form */
.otp-inputs-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0;
}

.otp-digit-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--mint-dark);
  background: rgba(15, 23, 42, 0.02);
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.otp-digit-input:focus {
  border-color: var(--mint);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.15);
}

/* Floating OTP Simulator Toast */
.otp-simulator-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  max-width: 380px;
  z-index: 1000;
  animation: toastSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 5px solid var(--mint);
}

.otp-simulator-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--mint-light);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.otp-simulator-code {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.15em;
  margin: 10px 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

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

/* Header User Details */
.header-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-info {
  text-align: right;
}

.header-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Logistical Map Panel & View toggles */
.view-toggle-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 8px;
}

.map-logistics-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  min-height: 520px;
}

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
}

#logistics-map {
  width: 100%;
  height: 520px;
  z-index: 1;
}

.logistics-details-panel {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.transit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  transition: border-color 0.2s;
}

.transit-card:hover {
  border-color: var(--green);
}

.transit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.transit-cost {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}

@media(max-width: 992px) {
  .map-logistics-container {
    grid-template-columns: 1fr;
  }
}
