/* Bridge Inspection Platform - Admin Portal Styles (Subtle Goldish Beige & Executive Dark) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Subtle Goldish Beige / Warm Champagne Sandstone (Default / Primary) */
  --bg-primary: #F5F1E8;
  --bg-secondary: #ECE6D8;
  --bg-card: #FCFAF6;
  --bg-card-inner: #F6F2E9;
  --bg-muted: #EAE3D2;
  --bg-hover: #E2DAC6;
  --border-color: rgba(184, 150, 80, 0.28);
  --border-subtle: rgba(184, 150, 80, 0.16);
  --border-card: rgba(184, 150, 80, 0.28);
  --text-main: #24201A;
  --text-muted: #6B6255;
  --text-subtle: #968B7B;
  --accent-gold: #B89228;
  --accent-gold-light: #D4AF37;
  --accent-gold-dark: #8C6D18;
  --accent-amber: #C77A00;
  --accent-gold-glow: rgba(184, 146, 40, 0.25);
  /* Logo Deep Imperial Navy Blue Accents */
  --accent-navy: #15253E;
  --accent-navy-light: #243B5A;
  --accent-navy-dark: #0C1C2C;
  --accent-navy-muted: rgba(21, 37, 62, 0.12);
  --shadow-sm: 0 1px 3px rgba(90, 75, 50, 0.08);
  --shadow-md: 0 4px 18px -2px rgba(90, 75, 50, 0.08), 0 2px 6px -1px rgba(90, 75, 50, 0.04);
}

/* Executive Dark Mode (Refined Warm Charcoal & Warm Architectural Gold - No Gamer Glow) */
html.dark {
  --bg-primary: #151412;
  --bg-secondary: #1D1B17;
  --bg-card: #22201C;
  --bg-card-inner: #191814;
  --bg-muted: #2A2722;
  --bg-hover: #33302A;
  --border-color: rgba(212, 175, 55, 0.24);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(212, 175, 55, 0.24);
  --text-main: #F6F4EE;
  --text-muted: #A69F92;
  --text-subtle: #756E62;
  --accent-gold: #D4AF37;
  --accent-gold-light: #F3E5AB;
  --accent-gold-dark: #A38421;
  --accent-amber: #E5A015;
  --accent-gold-glow: rgba(212, 175, 55, 0.22);
  /* Logo Deep Navy Accents (Dark Mode) */
  --accent-navy: #1B2A4A;
  --accent-navy-light: #2E456E;
  --accent-navy-dark: #0B1626;
  --accent-navy-muted: rgba(46, 69, 110, 0.28);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.06);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 90% 40%, rgba(184, 146, 40, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

html.dark body {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.09) 0%, transparent 60%),
    radial-gradient(circle at 85% 40%, rgba(184, 146, 40, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 15% 70%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Badges for Light & Dark (Coherent Warm Architectural Palette) */
.badge-role-dev {
  background: rgba(184, 146, 40, 0.14);
  color: #8C6D18;
  border: 1px solid rgba(184, 146, 40, 0.4);
}
html.dark .badge-role-dev {
  background: rgba(212, 175, 55, 0.16);
  color: #F3E5AB;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-role-manager {
  background: rgba(140, 100, 30, 0.12);
  color: #7A5716;
  border: 1px solid rgba(140, 100, 30, 0.35);
}
html.dark .badge-role-manager {
  background: rgba(212, 175, 55, 0.14);
  color: #E2C97A;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.badge-role-lead {
  background: rgba(120, 110, 95, 0.14);
  color: #4A4337;
  border: 1px solid rgba(120, 110, 95, 0.35);
}
html.dark .badge-role-lead {
  background: rgba(160, 150, 135, 0.16);
  color: #DDD4C6;
  border: 1px solid rgba(160, 150, 135, 0.35);
}

.badge-role-member {
  background: rgba(150, 130, 105, 0.12);
  color: #5C5040;
  border: 1px solid rgba(150, 130, 105, 0.3);
}
html.dark .badge-role-member {
  background: rgba(180, 160, 135, 0.15);
  color: #CDC2B0;
  border: 1px solid rgba(180, 160, 135, 0.3);
}

.badge-role-trainee {
  background: rgba(199, 122, 0, 0.12);
  color: #9E5B00;
  border: 1px solid rgba(199, 122, 0, 0.35);
}
html.dark .badge-role-trainee {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-sub-active {
  background: rgba(184, 146, 40, 0.12);
  color: #8C6D18;
  border: 1px solid rgba(184, 146, 40, 0.35);
}
html.dark .badge-sub-active {
  background: rgba(212, 175, 55, 0.15);
  color: #F3E5AB;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.badge-sub-trial {
  background: rgba(140, 120, 90, 0.12);
  color: #5E4E36;
  border: 1px solid rgba(140, 120, 90, 0.3);
}
html.dark .badge-sub-trial {
  background: rgba(180, 160, 130, 0.15);
  color: #D8CEBE;
  border: 1px solid rgba(180, 160, 130, 0.35);
}

.badge-sub-paused {
  background: rgba(199, 122, 0, 0.12);
  color: #9E5B00;
  border: 1px solid rgba(199, 122, 0, 0.3);
}
html.dark .badge-sub-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-sub-cancelled {
  background: rgba(190, 40, 40, 0.1);
  color: #A32020;
  border: 1px solid rgba(190, 40, 40, 0.3);
}
html.dark .badge-sub-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modals */
.modal-overlay {
  background: rgba(30, 26, 20, 0.65);
  backdrop-filter: blur(6px);
}
html.dark .modal-overlay {
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(8px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #D5C9B5;
  border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #3D382F;
}
::-webkit-scrollbar-thumb:hover {
  background: #B89228;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #5A5345;
}

/* ==========================================================================
   DASHBOARD THEME - SUBTLE GOLDISH BEIGE & REFINED EXECUTIVE DARK
   ========================================================================== */

/* Top Window Chrome Metallic Gold Sheen Ribbon */
.liquid-top-ribbon {
  height: 3px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(212,175,55,0) 0%, rgba(212,175,55,0.7) 20%, #FFF8D6 50%, rgba(212,175,55,0.7) 80%, rgba(212,175,55,0) 100%);
  box-shadow: 0 1px 12px rgba(212,175,55,0.5), 0 0 6px rgba(255,255,255,0.6);
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px -2px rgba(90, 75, 50, 0.12), 0 2px 8px -1px rgba(90, 75, 50, 0.06);
}
html.dark .dashboard-card:hover {
  box-shadow: 0 12px 38px 0 rgba(0, 0, 0, 0.7), inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
}

/* Specular Diagonal Glass Glint */
.dashboard-sheen::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 40%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 65%);
  pointer-events: none;
  border-top-right-radius: 18px;
}
html.dark .dashboard-sheen::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 65%);
}

/* Coherent Action Buttons - Refined Gold Gradient */
.btn-primary-gold, .dashboard-gold-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 1.3rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #D4AF37 0%, #B89228 100%);
  border: 1px solid #D4AF37;
  box-shadow: 0 2px 10px rgba(184, 146, 40, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: #1A160E;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-primary-gold:hover, .dashboard-gold-pill-btn:hover {
  background: linear-gradient(180deg, #DFBD46 0%, #C49C2C 100%);
  border-color: #F5D77F;
  box-shadow: 0 4px 16px rgba(184, 146, 40, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.btn-primary-gold:active, .dashboard-gold-pill-btn:active {
  transform: translateY(1px);
}

/* Secondary Button - Warm Charcoal/Beige */
.btn-secondary-beige, .dashboard-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: #EDE6D8;
  border: 1.5px solid #D5C9B5;
  box-shadow: 0 1px 3px rgba(90, 75, 50, 0.08);
  color: #2D271F;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
html.dark .btn-secondary-beige, html.dark .dashboard-pill-btn {
  background: #28251F;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  color: #F6F4EE;
}

.btn-secondary-beige:hover, .dashboard-pill-btn:hover {
  background: #E2DAC8;
  border-color: #B89228;
  color: #151412;
  transform: translateY(-1px);
}
html.dark .btn-secondary-beige:hover, html.dark .dashboard-pill-btn:hover {
  background: #332F27;
  border-color: #D4AF37;
  color: #FFFFFF;
}

.btn-secondary-beige:active, .dashboard-pill-btn:active {
  transform: translateY(1px);
}

/* Frosted Gold Badge */
.badge-gold-pill {
  background: rgba(184, 146, 40, 0.12);
  border: 1px solid rgba(184, 146, 40, 0.45);
  color: #8C6D18;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
}
html.dark .badge-gold-pill {
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #F3E5AB;
}

/* Bridge Notification Chip / Pointer (Compact Keypoint Notifications) */
.bridge-notification-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.75rem;
  border-radius: 9999px;
  background: rgba(252, 250, 246, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(21, 37, 62, 0.25);
  box-shadow: 0 3px 12px rgba(21, 37, 62, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}
html.dark .bridge-notification-chip {
  background: rgba(21, 20, 18, 0.94);
  border: 1.5px solid rgba(212, 175, 55, 0.38);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.bridge-notification-chip:hover {
  border-color: #B89228;
  background: #FFFFFF;
  box-shadow: 0 5px 18px rgba(21, 37, 62, 0.18);
  transform: translateY(-2px) scale(1.02);
}
html.dark .bridge-notification-chip:hover {
  border-color: #D4AF37;
  background: #25221C;
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #15253E;
}
html.dark .chip-text {
  color: #F6F4EE;
}



/* Settings & Profile Menu Dropdown Animation */
#settings-profile-menu:not(.hidden) {
  animation: menu-pop-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menu-pop-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Multi-Function Display (MFD) Modal Animation */
#modal-enlarged-instrument:not(.hidden) {
  animation: mfd-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mfd-fade-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
