:root {
  color-scheme: dark;
}

body.theme-light {
  color-scheme: light;
  background: #eef5fb !important;
  color: #0f172a !important;
}

body.theme-light #appBackground {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #e8f1f8 100%);
}

body.theme-light #appBackground > div {
  opacity: 0.2;
}

body.theme-light #appBackground > div:last-child {
  opacity: 1;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.2), #e8f1f8 82%) !important;
}

body.theme-light .bg-ocean-950,
body.theme-light .bg-ocean-900,
body.theme-light .bg-ocean-850,
body.theme-light .bg-ocean-800 {
  background-color: rgba(255, 255, 255, 0.78) !important;
}

body.theme-light .text-white,
body.theme-light .text-slate-100,
body.theme-light .text-slate-200 {
  color: #0f172a !important;
}

body.theme-light .text-slate-300,
body.theme-light .text-slate-400 {
  color: #475569 !important;
}

body.theme-light .text-slate-500 {
  color: #64748b !important;
}

body.theme-light [class*="border-white/"] {
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.theme-light [class*="bg-white/"] {
  background-color: rgba(255, 255, 255, 0.68) !important;
}

body.theme-light header,
body.theme-light aside {
  background: rgba(248, 251, 255, 0.82) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.theme-light input {
  color: #0f172a !important;
}

body.theme-light input::placeholder {
  color: #94a3b8 !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 1.15rem;
  padding: 0.72rem 0.75rem;
  color: rgb(203 213 225);
  transition: 160ms ease;
}

body.theme-light .nav-item {
  color: #334155;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: white;
}

body.theme-light .nav-item:hover {
  border-color: rgba(14, 165, 233, 0.18);
  background: rgba(14, 165, 233, 0.07);
  color: #0f172a;
}

.nav-item.active {
  border-color: rgba(103, 232, 249, 0.24);
  background:
    radial-gradient(circle at left, rgba(56, 217, 255, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(56, 217, 255, 0.13), rgba(52, 245, 197, 0.08));
  color: white;
}

body.theme-light .nav-item.active {
  border-color: rgba(14, 165, 233, 0.24);
  background:
    radial-gradient(circle at left, rgba(14, 165, 233, 0.14), transparent 48%),
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(20, 184, 166, 0.08));
  color: #0f172a;
}

.nav-icon {
  display: grid;
  place-items: center;
  height: 2.15rem;
  width: 2.15rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  color: rgb(125 211 252);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.theme-light .nav-icon {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(14, 165, 233, 0.08);
  color: #0369a1;
}

.nav-item.active .nav-icon {
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.16);
  color: white;
}

.nav-active-marker {
  position: absolute;
  left: -0.25rem;
  top: 50%;
  height: 1.7rem;
  width: 0.18rem;
  border-radius: 999px;
  background: transparent;
  transform: translateY(-50%);
}

.nav-item.active .nav-active-marker {
  background: rgb(103, 232, 249);
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.65);
}

.nav-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.18rem 0.45rem;
  color: rgb(148 163 184);
  font-size: 0.65rem;
  font-weight: 800;
}

body.theme-light .nav-badge {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
}

.nav-item.active .nav-badge {
  border-color: rgba(103, 232, 249, 0.24);
  background: rgba(103, 232, 249, 0.12);
  color: rgb(224 242 254);
}

.nav-group {
  margin-top: 1rem;
}

.nav-group:first-child {
  margin-top: 0;
}

.nav-group-label {
  margin: 0 0 0.45rem 0.55rem;
  color: rgb(100 116 139);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 1.5rem;
  backdrop-filter: blur(18px);
}

body.theme-light .panel {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.panel-strong {
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at top left, rgba(56, 217, 255, 0.13), transparent 35%),
    rgba(255, 255, 255, 0.06);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
}

body.theme-light .panel-strong {
  border-color: rgba(14, 165, 233, 0.2);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.11), transparent 35%),
    rgba(255, 255, 255, 0.78);
}

.risk-low {
  color: rgb(110 231 183);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(110, 231, 183, 0.22);
}

.risk-medium {
  color: rgb(253 224 71);
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(253, 224, 71, 0.22);
}

.risk-high {
  color: rgb(251 191 36);
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(251, 191, 36, 0.24);
}

.risk-critical {
  color: rgb(253 164 175);
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(253, 164, 175, 0.28);
}

.map-grid {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 1.5rem;
  background:
    linear-gradient(rgba(103, 232, 249, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 20% 25%, rgba(52, 245, 197, 0.16), transparent 18%),
    radial-gradient(circle at 70% 40%, rgba(56, 217, 255, 0.16), transparent 20%),
    radial-gradient(circle at 45% 82%, rgba(167, 139, 250, 0.12), transparent 22%),
    #081827;
  background-size: 42px 42px, 42px 42px, auto, auto, auto, auto;
}

body.theme-light .map-grid {
  background:
    linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 20% 25%, rgba(20, 184, 166, 0.18), transparent 18%),
    radial-gradient(circle at 70% 40%, rgba(14, 165, 233, 0.18), transparent 20%),
    radial-gradient(circle at 45% 82%, rgba(99, 102, 241, 0.12), transparent 22%),
    #dff1fb;
}

.coast-shape {
  position: absolute;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(15, 118, 110, 0.16);
  filter: blur(0.1px);
  transform: rotate(-10deg);
}

body.theme-light .coast-shape {
  border-color: rgba(14, 165, 233, 0.2);
  background: rgba(20, 184, 166, 0.18);
}

.coast-shape.one {
  left: 10%;
  top: 18%;
  height: 44%;
  width: 28%;
  border-radius: 54% 46% 62% 38% / 41% 49% 51% 59%;
}

.coast-shape.two {
  right: 13%;
  top: 22%;
  height: 35%;
  width: 23%;
  border-radius: 42% 58% 48% 52% / 52% 43% 57% 48%;
}

.coast-shape.three {
  bottom: 8%;
  left: 38%;
  height: 22%;
  width: 26%;
  border-radius: 55% 45% 50% 50% / 38% 61% 39% 62%;
}

.route-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(56, 217, 255, 0.78), transparent);
  opacity: 0.75;
}

.vessel-dot {
  position: absolute;
  display: grid;
  place-items: center;
  height: 1.15rem;
  width: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgb(56, 217, 255);
  box-shadow: 0 0 0 7px rgba(56, 217, 255, 0.13), 0 0 26px rgba(56, 217, 255, 0.45);
  animation: pulse-dot 2.8s infinite;
}

.vessel-dot.warning {
  background: rgb(251, 191, 36);
  box-shadow: 0 0 0 7px rgba(251, 191, 36, 0.13), 0 0 26px rgba(251, 191, 36, 0.38);
}

.vessel-dot.danger {
  background: rgb(251, 113, 133);
  box-shadow: 0 0 0 7px rgba(251, 113, 133, 0.13), 0 0 26px rgba(251, 113, 133, 0.44);
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

.bar-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(56, 217, 255), rgb(52, 245, 197));
}

.sparkline {
  height: 54px;
  width: 100%;
}

.sparkline polyline {
  fill: none;
  stroke: rgb(56, 217, 255);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.table-row {
  transition: 140ms ease;
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.view-enter {
  animation: view-enter 220ms ease both;
}

.drawer-open {
  display: block;
  animation: drawer-enter 220ms ease both;
}

.modal-open {
  display: block;
}

.tab-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  color: rgb(203 213 225);
  font-size: 0.82rem;
  font-weight: 700;
  transition: 150ms ease;
}

body.theme-light .tab-button {
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
  background: rgba(255, 255, 255, 0.56);
}

body.theme-light .tab-button:hover,
body.theme-light .tab-button.active {
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(14, 165, 233, 0.1);
  color: #075985;
}

body.theme-light #notificationPanel,
body.theme-light #detailDrawer,
body.theme-light #commandPalette > div,
body.theme-light #modalOverlay > div,
body.theme-light #toast {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #0f172a !important;
}

.tab-button:hover,
.tab-button.active {
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.12);
  color: rgb(224 242 254);
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawer-enter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
