:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(8, 15, 22, 0.72);
  --panel-strong: rgba(7, 12, 18, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(183, 232, 255, 0.16);
  --line-strong: rgba(183, 232, 255, 0.28);
  --text: #f6fbff;
  --muted: #9caebe;
  --dim: #708291;
  --cyan: #30f1d5;
  --blue: #6ca8ff;
  --amber: #ffc35b;
  --red: #ff5277;
  --green: #56efa4;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }

body {
  background:
    linear-gradient(160deg, rgba(5, 7, 11, 0.94), rgba(9, 17, 25, 0.9) 52%, rgba(3, 5, 8, 0.96)),
    #05070b;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.space-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.space-scene:active { cursor: grabbing; }

.scene-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 68% 26%, rgba(48, 241, 213, 0.13), transparent 30%),
    radial-gradient(circle at 20% 18%, rgba(108, 168, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.18), rgba(3, 5, 8, 0.62) 72%, rgba(3, 5, 8, 0.86));
}

.whale-companion {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  --orb-eye: #72f3ff;
  --orb-fluid: #25d8d0;
  --orb-accent: #8fffe2;
  --orb-halo: rgba(126, 228, 255, 0.45);
  transform: translate3d(calc(100vw - 116px), 72px, 0);
  transition: filter 0.2s ease;
  pointer-events: none;
  will-change: transform;
}

.whale-companion.open {
  left: 0 !important;
  top: 0 !important;
  bottom: auto;
}

.whale-toggle {
  pointer-events: auto;
  position: relative;
  width: 74px;
  height: 74px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  filter:
    drop-shadow(0 14px 22px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 14px var(--orb-halo));
  opacity: 0.86;
  transform-origin: 50% 50%;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.whale-toggle:hover,
.whale-companion.open .whale-toggle {
  opacity: 0.98;
}

.whale-3d {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 106px;
  height: 106px;
  aspect-ratio: 1 / 1;
  display: block;
  opacity: 0;
  background: transparent;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.24s ease;
}

.whale-toggle.webgl-ready .whale-3d {
  opacity: 1;
}

.whale-toggle.webgl-ready .glass-orb {
  opacity: 0;
}

.glass-orb {
  position: absolute;
  inset: 6px;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.96) 0 7%, rgba(255, 255, 255, 0.28) 8%, transparent 20%),
    radial-gradient(circle at 66% 74%, color-mix(in srgb, var(--orb-fluid) 76%, transparent), transparent 32%),
    radial-gradient(circle at 44% 48%, rgba(255,255,255,0.18), transparent 54%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--orb-halo) 62%, transparent), rgba(255,255,255,0.03) 58%, transparent 72%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow:
    inset -18px -22px 42px rgba(0, 0, 0, 0.22),
    inset 16px 20px 38px rgba(255, 255, 255, 0.24),
    0 0 26px var(--orb-halo);
  transform: translate3d(0, 0, 0);
  animation: glassOrbBreath 5.8s ease-in-out infinite;
  transition: opacity 0.24s ease;
}

.weather-elf {
  border-radius: 52% 48% 54% 46% / 46% 52% 48% 54%;
  background:
    radial-gradient(ellipse at 36% 58%, color-mix(in srgb, var(--orb-fluid) 58%, transparent), transparent 35%),
    radial-gradient(ellipse at 58% 48%, color-mix(in srgb, var(--orb-accent) 48%, transparent), transparent 33%),
    radial-gradient(ellipse at 72% 62%, color-mix(in srgb, var(--orb-eye) 38%, transparent), transparent 28%),
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.96) 0 7%, rgba(255, 255, 255, 0.3) 8%, transparent 20%),
    linear-gradient(160deg, color-mix(in srgb, var(--orb-eye) 24%, transparent), rgba(255,255,255,0.05) 48%, color-mix(in srgb, var(--orb-fluid) 28%, transparent)),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--orb-halo) 62%, transparent), rgba(255,255,255,0.03) 60%, transparent 74%);
}

.glass-orb::before,
.glass-orb::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 44% 56% 52% 48%;
  border: 1px solid rgba(255,255,255,0.18);
  background: radial-gradient(circle at 48% 54%, color-mix(in srgb, var(--orb-accent) 38%, transparent), transparent 54%);
  filter: blur(0.2px);
  animation: glassOrbFluid 7.2s ease-in-out infinite;
}

.glass-orb::after {
  inset: 22% 18% 15% 22%;
  border-radius: 58% 42% 44% 56%;
  background: radial-gradient(circle at 55% 60%, color-mix(in srgb, var(--orb-fluid) 54%, transparent), transparent 62%);
  animation-duration: 9.5s;
  animation-direction: reverse;
}

.glass-orb-liquid {
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -20%;
  height: 58%;
  border-radius: 46% 54% 50% 50%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--orb-fluid) 72%, transparent), color-mix(in srgb, var(--orb-accent) 58%, transparent)),
    radial-gradient(circle at 40% 10%, rgba(255,255,255,0.3), transparent 35%);
  opacity: 0.76;
  filter: blur(0.4px);
  transform-origin: 50% 88%;
  animation: glassOrbWave 6.4s ease-in-out infinite;
}

.glass-orb-eye {
  position: absolute;
  top: 39%;
  width: 15px;
  height: 22px;
  border-radius: 999px;
  background: var(--orb-eye);
  box-shadow:
    inset 0 -4px 8px rgba(0,0,0,0.26),
    0 0 15px color-mix(in srgb, var(--orb-eye) 80%, transparent);
  animation: glassOrbBlink 4.8s ease-in-out infinite;
}

.glass-orb-eye::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 5px;
  height: 8px;
  border-radius: 999px;
  background: rgba(2, 13, 20, 0.78);
}

.glass-orb-eye.left { left: 33%; }
.glass-orb-eye.right { right: 33%; }

.glass-orb-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 18px var(--orb-eye);
  animation: glassOrbSpark 5.4s ease-in-out infinite;
}

.glass-orb-spark.one {
  left: 28%;
  top: 24%;
}

.glass-orb-spark.two {
  right: 24%;
  bottom: 30%;
  width: 5px;
  height: 5px;
  animation-delay: -2.2s;
}

.whale-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--orb-halo), rgba(183, 140, 255, 0.17) 58%, transparent 74%);
  filter: blur(7px);
}

@keyframes glassOrbBreath {
  0%, 100% { transform: scale(0.985) rotate(-1deg); }
  50% { transform: scale(1.035) rotate(1.5deg); }
}

@keyframes glassOrbFluid {
  0%, 100% { transform: translate3d(-2%, 2%, 0) rotate(0deg) scale(0.95, 1.05); }
  50% { transform: translate3d(3%, -2%, 0) rotate(18deg) scale(1.08, 0.96); }
}

@keyframes glassOrbWave {
  0%, 100% { transform: rotate(-7deg) translateY(2%); border-radius: 42% 58% 50% 50%; }
  50% { transform: rotate(7deg) translateY(-8%); border-radius: 58% 42% 45% 55%; }
}

@keyframes glassOrbBlink {
  0%, 42%, 48%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(0.18); }
}

@keyframes glassOrbSpark {
  0%, 100% { opacity: 0.55; transform: translate3d(0, 0, 0) scale(0.75); }
  50% { opacity: 1; transform: translate3d(8px, -6px, 0) scale(1.1); }
}

.whale-bubble {
  pointer-events: none;
  position: absolute;
  left: auto;
  right: 66px;
  top: 8px;
  width: max-content;
  max-width: 150px;
  padding: 6px 8px;
  border: 1px solid rgba(183, 140, 255, 0.34);
  border-radius: 8px;
  background: rgba(5, 13, 22, 0.78);
  color: #dff9ff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28), 0 0 24px rgba(126, 228, 255, 0.12);
  backdrop-filter: blur(14px);
}

.whale-panel {
  pointer-events: auto;
  position: absolute;
  left: auto;
  right: 0;
  top: 86px;
  bottom: auto;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(126, 228, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.92);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.whale-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(126, 228, 255, 0.16);
}

.whale-panel header strong { display: block; font-size: 15px; }
.whale-panel header span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.whale-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.whale-messages {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
}

.whale-msg {
  width: fit-content;
  max-width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #dbeaf4;
  font-size: 13px;
  line-height: 1.55;
}

.whale-msg.user {
  justify-self: end;
  color: #04241f;
  background: linear-gradient(135deg, #7ee4ff, #6af0c4);
  font-weight: 800;
}

.whale-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 0 12px 10px;
}

.whale-actions button,
.whale-form button {
  height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.whale-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(126, 228, 255, 0.14);
}

.whale-form input { height: 34px; }

.whale-voice {
  width: 34px;
  padding: 0;
}

.whale-voice.listening {
  color: #04120f;
  background: linear-gradient(135deg, #7ee4ff, #6af0c4);
  border-color: transparent;
  box-shadow: 0 0 22px rgba(126, 228, 255, 0.42);
}

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  backdrop-filter: blur(14px);
}

.brand,
.status-row,
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.brand {
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(48, 241, 213, 0.8);
}

.hero {
  width: min(1220px, calc(100% - 36px));
  min-height: 600px;
  margin: 0 auto;
  padding: clamp(54px, 9vh, 96px) 0 clamp(34px, 7vh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  align-items: center;
  gap: 38px;
}

.hero-copy {
  max-width: 760px;
  pointer-events: none;
}

.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 12px 0 18px;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.96;
  font-weight: 950;
  text-shadow: 0 0 34px rgba(48, 241, 213, 0.26);
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-copy p:empty { display: none; }

.hero-side {
  display: grid;
  gap: 14px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metrics div,
.summary-card,
.batch-panel,
.control-grid label,
.classified-shell,
.type-card,
.detail-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.metrics div { min-height: 112px; padding: 18px; }
.metrics span { display: block; font-size: 34px; font-weight: 950; }
.metrics label { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }

.pill,
.tag,
.type-tab,
.group-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.online,
.tag.notice { color: var(--green); border-color: rgba(86, 239, 164, 0.38); }
.pill.error,
.tag.critical { color: var(--red); border-color: rgba(255, 82, 119, 0.45); background: rgba(255, 82, 119, 0.13); }
.tag.warning { color: var(--amber); border-color: rgba(255, 195, 91, 0.4); background: rgba(255, 195, 91, 0.12); }
.tag.info { color: var(--cyan); border-color: rgba(48, 241, 213, 0.38); background: rgba(48, 241, 213, 0.1); }

button {
  height: 34px;
  border: 1px solid rgba(48, 241, 213, 0.45);
  background: rgba(48, 241, 213, 0.1);
  color: var(--cyan);
  border-radius: 8px;
  padding: 0 13px;
  font-weight: 900;
}

button:hover,
.type-tab:hover,
.group-row:hover,
.batch-item:hover {
  border-color: rgba(48, 241, 213, 0.5);
  background: rgba(48, 241, 213, 0.08);
}

.content {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0 74px;
}

.section-head,
.classified-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 16px;
}

h2 { margin: 0 0 7px; font-size: 24px; }
.section-head p,
.classified-head p,
.panel-title p { margin: 0; color: var(--muted); line-height: 1.6; }

.plain-link { color: var(--cyan); text-decoration: none; font-weight: 900; }
#refresh-countdown { color: var(--muted); font-size: 13px; }

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.control-grid > label:first-child { grid-column: span 2; }

.control-grid label,
.time-range {
  display: grid;
  gap: 7px;
  padding: 12px;
  box-shadow: none;
}

.control-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

input, select {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

input:focus, select:focus { border-color: rgba(48, 241, 213, 0.55); }
select option { color: #111; }

.time-range {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.time-range label {
  min-width: 0;
}

.time-range.hidden { display: none; }

input[type="datetime-local"] {
  min-width: 0;
  max-width: 100%;
  letter-spacing: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card { padding: 16px; box-shadow: none; }
.summary-card h3 { margin: 0 0 10px; font-size: 15px; }
.summary-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }

.classified-shell {
  padding: 16px;
  margin-bottom: 16px;
}

.type-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.type-tab {
  min-width: max-content;
  height: 34px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.type-tab.active {
  color: #04120f;
  background: linear-gradient(135deg, var(--cyan), #9bf5d2);
  border-color: transparent;
}

.classified-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.alarm-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.alarm-section > h3 {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0 2px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.alarm-section > h3 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-section {
  grid-template-columns: 1fr;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-row {
  position: relative;
  border: 1px solid rgba(183, 232, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.timeline-row::before {
  content: "";
  position: absolute;
  left: 122px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(48, 241, 213, 0.36), transparent);
}

.timeline-row summary {
  grid-template-columns: 104px minmax(0, 1fr) auto;
  padding: 13px 15px;
}

.timeline-stamp {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 14px;
  color: var(--muted);
  font-size: 12px;
  z-index: 1;
}

.timeline-stamp::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(48, 241, 213, 0.7);
}

.timeline-stamp time {
  color: var(--cyan);
  font-weight: 900;
  line-height: 1.3;
}

.timeline-stamp span {
  color: var(--dim);
  font-weight: 800;
}

.timeline-type {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 7px;
  border: 1px solid rgba(48, 241, 213, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(48, 241, 213, 0.08);
  font-size: 12px;
  vertical-align: 1px;
}

.type-card {
  min-height: 210px;
  overflow: hidden;
  box-shadow: none;
}

.type-card.empty-section {
  grid-column: 1 / -1;
  min-height: 92px;
}

.type-card-head {
  padding: 15px 15px 13px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.type-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.type-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.type-count {
  display: grid;
  justify-items: end;
  min-width: 72px;
}

.type-count strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.type-count span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.type-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.group-list {
  display: grid;
}

.type-more {
  width: calc(100% - 24px);
  margin: 10px 12px 12px;
  color: var(--text);
  border-color: rgba(126, 228, 255, 0.28);
  background: linear-gradient(135deg, rgba(48, 241, 213, 0.1), rgba(183, 140, 255, 0.08));
}

.load-more-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid rgba(183, 232, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.load-more-btn {
  min-width: 170px;
  height: 36px;
  color: var(--text);
  border-color: rgba(48, 241, 213, 0.35);
}

.load-more-btn:disabled {
  cursor: default;
  opacity: 0.58;
}

.group-row {
  border: 0;
  border-bottom: 1px solid rgba(183, 232, 255, 0.1);
  border-radius: 0;
  background: transparent;
}

.group-row summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  cursor: pointer;
}

.group-row summary::-webkit-details-marker { display: none; }

.group-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.group-main strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.group-sub {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.group-count {
  min-width: 42px;
  text-align: right;
}

.group-count strong {
  display: block;
  color: var(--cyan);
  font-size: 20px;
  line-height: 1;
}

.group-count span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.group-body {
  padding: 0 15px 14px;
  color: var(--muted);
}

.group-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ghost-btn {
  height: 30px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.occurrence-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.occurrence {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 12px;
}

.occurrence time { color: var(--cyan); font-weight: 800; }
.occurrence span { color: var(--muted); overflow-wrap: anywhere; }

.detail-panel {
  position: sticky;
  top: 76px;
  min-height: 420px;
  padding: 16px;
  box-shadow: none;
}

.empty-detail {
  min-height: 380px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-detail strong {
  color: var(--text);
  font-size: 22px;
}

.detail-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.detail-kpis div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
}

.detail-kpis strong { display: block; font-size: 18px; }
.detail-kpis span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.detail-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(183, 232, 255, 0.12);
}

.detail-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--cyan);
  text-transform: uppercase;
}

.detail-section p,
.detail-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.batch-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.panel-title h2 { margin: 0 0 8px; font-size: 18px; }

.batch-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.batch-item {
  min-width: 250px;
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
}

.batch-item strong { display: block; margin-bottom: 8px; }
.batch-item span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }

.muted { color: var(--muted); }
.hide { display: none !important; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: 650px; }
  .hero-side { max-width: 720px; }
  .classified-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; min-height: 260px; }
  .type-grid { grid-template-columns: 1fr; }
  .alarm-section { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr 1fr; }
  .time-range { grid-column: 1 / -1; }
  .summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar,
  .section-head,
  .classified-head {
    display: block;
  }

  .topbar { width: min(100% - 24px, 1220px); }
  .status-row,
  .head-actions {
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .hero,
  .content {
    width: min(100% - 24px, 1220px);
  }

  .hero {
    min-height: 720px;
    padding-top: 46px;
    gap: 28px;
  }

  h1 { font-size: clamp(42px, 13vw, 64px); }
  .hero-copy p { font-size: 16px; }

  .metrics,
  .control-grid,
  .time-range,
  .batch-panel,
  .detail-kpis {
    grid-template-columns: 1fr;
  }

  .control-grid > label:first-child { grid-column: span 1; }
  .time-range { grid-column: span 1; }
  input[type="datetime-local"] { min-width: 0; }

  .classified-shell { padding: 12px; }
  .type-card-head,
  .group-row summary { padding-left: 12px; padding-right: 12px; }
  .occurrence { grid-template-columns: 1fr; }
  .whale-companion {
    left: 0;
    top: 0;
  }
  .whale-toggle {
    width: 68px;
    height: 68px;
    aspect-ratio: 1 / 1;
  }
  .whale-3d {
    width: 98px;
    height: 98px;
  }
  .whale-bubble {
    left: auto;
    right: 58px;
    top: 6px;
    max-width: 150px;
  }
  .whale-panel {
    right: 0;
    top: 78px;
  }
}
