:root {
  --ocean-bg: #071A24;
  --ocean-rail: #06151E;
  --ocean-card: #0C2534;
  --ocean-card-hover: #103043;
  --ocean-input: #081D29;
  --ocean-line: rgba(125, 211, 252, 0.14);
  --ocean-line-strong: rgba(125, 211, 252, 0.28);

  --ink-main: #F1F5F9;
  --ink-sub: #94B4C7;
  --ink-dim: #5E7E91;

  --accent-sky: #38BDF8;
  --accent-teal: #2DD4BF;
  --accent-amber: #FBBF24;
  --accent-coral: #FB7185;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ocean-bg);
  color: var(--ink-main);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* Twin-Bar Geometric Mark + Clean Wordmark */
.kraton-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-main);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

/* Bento Cards */
.ocean-panel {
  background: var(--ocean-card);
  border: 1px solid var(--ocean-line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.ocean-panel:hover {
  border-color: var(--ocean-line-strong);
}

.ocean-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #3B82A6;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(186, 230, 253, 0.22);
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.ocean-btn:hover { background: #4B96BC; }
.ocean-btn:active { transform: scale(0.98); }

.ocean-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-main);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--ocean-line);
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease;
}

.ocean-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Pills & Pulse */
.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.13);
  color: var(--accent-sky);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.pill-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.65);
  animation: oceanPulse 2.1s infinite;
  display: inline-block;
  flex-shrink: 0;
}
.pulse-dot.amber { background: var(--accent-amber); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55); }
.pulse-dot.red { background: var(--accent-coral); box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.55); }

@keyframes oceanPulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.flash-up { animation: oceanFlashUp 300ms ease; }
.flash-down { animation: oceanFlashDown 300ms ease; }

@keyframes oceanFlashUp {
  0% { background: rgba(45, 212, 191, 0.28); border-radius: 6px; }
  100% { background: transparent; }
}
@keyframes oceanFlashDown {
  0% { background: rgba(251, 113, 133, 0.28); border-radius: 6px; }
  100% { background: transparent; }
}

.filter-pill {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ocean-input);
  color: var(--ink-sub);
  border: 1px solid var(--ocean-line);
  cursor: pointer;
  transition: all 150ms ease;
}
.filter-pill:hover { color: var(--ink-main); border-color: var(--ocean-line-strong); }
.filter-pill.active {
  background: #3B82A6;
  color: #FFFFFF;
  border-color: rgba(186, 230, 253, 0.35);
}

.decay-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}
.decay-fill {
  height: 100%;
  transition: width 350ms linear, background-color 350ms ease;
}

/* Desktop Left Rail + Responsive Mobile Header */
.ocean-shell {
  display: flex;
  min-height: 100vh;
}

.ocean-sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--ocean-rail);
  border-right: 1px solid var(--ocean-line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ocean-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-sub);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.ocean-nav-link:hover, .ocean-nav-link.active {
  background: rgba(56, 189, 248, 0.11);
  color: var(--ink-main);
}

.ocean-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ocean-topbar {
  height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--ocean-line);
  background: rgba(7, 26, 36, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* Slide-Over Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 16, 0.72);
  backdrop-filter: blur(4px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.action-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  background: rgba(11, 34, 48, 0.96);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--ocean-line-strong);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.action-drawer.open { transform: translateX(0); }

@media (max-width: 900px) {
  .ocean-sidebar { display: none; }
  .ocean-topbar { padding: 0 14px; }
}
