:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #090a09;
  --bg-panel: #10110f;
  --ink: #f4f1e8;
  --ink-muted: rgba(244, 241, 232, 0.64);
  --ink-faint: rgba(244, 241, 232, 0.36);
  --line: rgba(244, 241, 232, 0.16);
  --line-strong: rgba(244, 241, 232, 0.31);
  --glass: rgba(15, 16, 15, 0.54);
  --glass-strong: rgba(27, 28, 25, 0.66);
  --accent-warm: #d7b56d;
  --accent-cool: #8fb9ad;
  --accent-red: #9a4f43;
  --accent-alert: #d86f5d;
  --shadow-deep: 0 30px 90px rgba(0, 0, 0, 0.64);
  --panel: rgba(15, 16, 15, 0.58);
  --panel-strong: rgba(19, 20, 18, 0.78);
  --panel-soft: rgba(244, 241, 232, 0.05);
  --text: var(--ink);
  --muted: var(--ink-muted);
  --dim: var(--ink-faint);
  --cyan: var(--accent-cool);
  --blue: #8fb9ad;
  --violet: #b8ada1;
  --amber: var(--accent-warm);
  --red: var(--accent-alert);
  --green: #9ecb9c;
  --rose: #b98678;
  --leaf: #9ecb9c;
  --shadow: var(--shadow-deep);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  scrollbar-color: rgba(215, 181, 109, 0.34) rgba(244, 241, 232, 0.06);
}

html,
body {
  background: #050505;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 12%, rgba(215, 181, 109, 0.1), transparent 30rem),
    radial-gradient(circle at 74% 26%, rgba(143, 185, 173, 0.08), transparent 26rem),
    linear-gradient(180deg, #050505 0%, #080806 48%, #050505 100%);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  overflow-x: hidden;
  letter-spacing: 0;
}

body::before {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

body::after {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.9), transparent 24%, transparent 76%, rgba(5, 5, 5, 0.88)),
    radial-gradient(circle at center, transparent 0, transparent 34%, rgba(0, 0, 0, 0.72) 100%);
}

.nature-backdrop,
.ecosystem-webgl,
.eco-world {
  display: none !important;
}

.space-scene {
  display: none !important;
}

.scene-vignette {
  z-index: 1;
  opacity: 1;
  background:
    radial-gradient(circle at 50% 26%, rgba(215, 181, 109, 0.08), transparent 24rem),
    linear-gradient(180deg, rgba(5,5,5,0.1), rgba(5,5,5,0.38) 54%, rgba(5,5,5,0.92));
}

.shell {
  z-index: 3;
  min-height: 100vh;
  padding-top: 18px;
}

.topbar {
  top: 18px;
  width: min(1320px, calc(100% - 40px));
  min-height: 64px;
  padding: 0 10px 0 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 16, 15, 0.54);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.brand-dot {
  position: relative;
  width: 17px;
  height: 17px;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: transparent;
  box-shadow: none;
}

.brand-dot::before,
.brand-dot::after {
  position: absolute;
  content: "";
  inset: 4px;
  border: 1px solid rgba(215, 181, 109, 0.78);
  transform: rotate(45deg);
}

.brand-dot::after {
  inset: 7px;
  border: 0;
  background: var(--accent-warm);
}

.status-row {
  justify-content: flex-end;
  gap: 14px;
  color: rgba(244, 241, 232, 0.56);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.hero {
  width: min(1320px, calc(100% - 56px));
  min-height: clamp(680px, calc(100svh - 36px), 920px);
  padding: clamp(96px, 13vh, 152px) 0 clamp(70px, 10vh, 110px);
  overflow: visible;
}

.hero::before {
  right: 3%;
  bottom: 16%;
  width: min(780px, 62vw);
  aspect-ratio: 1.78;
  border-radius: 8px;
  border: 1px solid rgba(244, 241, 232, 0.2);
  background:
    linear-gradient(rgba(244, 241, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 232, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(215, 181, 109, 0.13), transparent 44%),
    rgba(12, 13, 12, 0.62);
  background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%;
  box-shadow:
    var(--shadow-deep),
    inset 0 0 80px rgba(244, 241, 232, 0.035),
    0 0 120px rgba(215, 181, 109, 0.08);
  opacity: 0.92;
  filter: none;
  transform: perspective(1200px) rotateX(57deg) rotateZ(-14deg);
  animation: futurePlateDrift 9s ease-in-out infinite alternate;
}

.hero::after {
  bottom: 38px;
  background: linear-gradient(90deg, transparent, rgba(215, 181, 109, 0.62), rgba(143, 185, 173, 0.3), transparent);
}

.eyebrow,
.section-head p,
.classified-head p,
.panel-title p,
.control-grid span,
.metrics label,
.summary-card p,
.group-sub,
.type-meta,
.timeline-stamp span,
.detail-panel p,
.batch-item span {
  font-family: "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0;
}

h1 {
  max-width: 100%;
  margin-top: 22px;
  color: #f7f3e7;
  font-family: "Inter Tight", "Arial Narrow", Inter, sans-serif;
  font-size: clamp(5.3rem, 14.2vw, 16rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0 20px 80px rgba(0, 0, 0, 0.88);
}

.hero-copy {
  max-width: min(940px, 76vw);
}

.hero-copy p {
  max-width: 620px;
  color: var(--ink-muted);
  font-size: 1.02rem;
  font-weight: 300;
}

.hero-side {
  right: 0;
  bottom: clamp(88px, 13vh, 148px);
  width: min(340px, 30vw);
}

.metrics {
  gap: 14px;
}

.metrics div {
  min-height: 82px;
  padding-left: 20px;
  border-left-color: rgba(244, 241, 232, 0.28);
}

.metrics div::before {
  border-radius: 0;
  background: var(--accent-warm);
  box-shadow: 0 0 22px rgba(215, 181, 109, 0.52);
}

.metrics span {
  color: var(--ink);
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.7rem);
  line-height: 0.86;
}

.metrics label {
  color: var(--ink-faint);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.content {
  width: min(1320px, calc(100% - 56px));
  padding-bottom: 96px;
}

.topbar,
.summary-card,
.batch-panel,
.control-grid label,
.time-range,
.classified-shell,
.type-card,
.detail-panel,
.timeline-row,
.group-row,
.batch-item {
  border-color: var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.06), rgba(244, 241, 232, 0.018)),
    rgba(15, 16, 15, 0.58);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.classified-shell,
.type-card,
.detail-panel {
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.055), rgba(244, 241, 232, 0.014)),
    rgba(10, 11, 10, 0.72);
}

.section-head,
.classified-head {
  align-items: end;
  margin-bottom: 18px;
}

h2,
.type-card h3,
.detail-panel h3,
.group-main strong,
.panel-title h2,
.alarm-section > h3 {
  color: var(--ink);
  font-family: "Inter Tight", "Arial Narrow", Inter, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.75rem, 2.8vw, 3.25rem);
  text-transform: uppercase;
}

.control-grid {
  grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.control-grid label,
.time-range {
  padding: 14px;
}

input,
select {
  height: 40px;
  border-color: rgba(244, 241, 232, 0.16);
  border-radius: 6px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: rgba(215, 181, 109, 0.72);
  box-shadow: 0 0 0 3px rgba(215, 181, 109, 0.08);
}

select option {
  color: #111;
  background: #f4f1e8;
}

button,
.ghost-btn,
.load-more-btn {
  height: 36px;
  border-color: rgba(244, 241, 232, 0.22);
  border-radius: 6px;
  background: rgba(244, 241, 232, 0.045);
  color: var(--ink);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

button:hover,
.type-tab:hover,
.group-row:hover,
.batch-item:hover,
.ghost-btn:hover {
  border-color: rgba(215, 181, 109, 0.56);
  background: rgba(215, 181, 109, 0.075);
}

.pill,
.tag,
.type-tab,
.group-chip {
  height: 28px;
  border-radius: 6px;
  border-color: rgba(244, 241, 232, 0.16);
  background: rgba(244, 241, 232, 0.045);
  color: var(--ink-muted);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill.online,
.tag.notice {
  color: #a9dca6;
  border-color: rgba(169, 220, 166, 0.34);
}

.pill.error,
.tag.critical {
  color: #ff9282;
  border-color: rgba(255, 146, 130, 0.48);
  background: rgba(154, 79, 67, 0.16);
}

.tag.warning {
  color: var(--accent-warm);
  border-color: rgba(215, 181, 109, 0.44);
  background: rgba(215, 181, 109, 0.1);
}

.tag.info,
.plain-link {
  color: var(--accent-cool);
}

.summary-grid {
  gap: 12px;
}

.summary-card {
  min-height: 164px;
  padding: 18px;
}

.summary-card h3 {
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.summary-card strong,
.type-count strong,
.group-count strong,
.detail-kpis strong {
  color: var(--ink);
  font-family: "Inter Tight", Inter, sans-serif;
}

.classified-layout {
  grid-template-columns: minmax(0, 1.26fr) minmax(360px, 0.74fr);
  gap: 16px;
}

.type-tabs {
  gap: 8px;
  margin-bottom: 18px;
}

.type-tab.active {
  border-color: rgba(215, 181, 109, 0.62);
  background: rgba(215, 181, 109, 0.12);
  color: var(--accent-warm);
}

.alarm-section > h3 {
  color: var(--ink-muted);
}

.alarm-section > h3 small,
.collapsible-history > summary h3 small {
  color: var(--ink-faint);
}

.group-row summary,
.timeline-row summary {
  min-height: 62px;
}

.group-row[open] summary,
.group-row summary:hover {
  background: rgba(244, 241, 232, 0.045);
}

.occurrence {
  border-color: rgba(244, 241, 232, 0.1);
  background: rgba(244, 241, 232, 0.028);
}

.occurrence time {
  color: var(--accent-warm);
}

.detail-panel {
  position: sticky;
  top: 98px;
}

.detail-panel::before,
.classified-shell::before {
  background: linear-gradient(90deg, transparent, rgba(215, 181, 109, 0.38), transparent);
}

.detail-kpis div {
  border-color: rgba(244, 241, 232, 0.12);
  background: rgba(244, 241, 232, 0.035);
}

.batch-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.whale-companion {
  z-index: 12;
}

.whale-toggle {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  border-color: rgba(244, 241, 232, 0.18);
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.08), rgba(244, 241, 232, 0.018)),
    rgba(15, 16, 15, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.44);
}

.celestial-orb {
  inset: 13px;
  filter: saturate(0.42) sepia(0.12);
}

.celestial-aura {
  background: radial-gradient(circle, rgba(215, 181, 109, 0.2), transparent 66%) !important;
}

.celestial-disc {
  background:
    radial-gradient(circle at 40% 34%, rgba(244, 241, 232, 0.42), transparent 18%),
    radial-gradient(circle at 52% 50%, rgba(215, 181, 109, 0.24), transparent 42%),
    rgba(10, 11, 10, 0.8) !important;
  box-shadow: inset 0 0 22px rgba(244, 241, 232, 0.12), 0 0 30px rgba(215, 181, 109, 0.22) !important;
}

.whale-bubble,
.whale-panel {
  border-radius: 8px;
  border-color: rgba(244, 241, 232, 0.16);
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.075), rgba(244, 241, 232, 0.018)),
    rgba(12, 13, 12, 0.9);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.whale-actions button,
.whale-form button {
  border-radius: 6px;
}

.whale-form input {
  border-radius: 6px;
}

@keyframes futurePlateDrift {
  from {
    transform: perspective(1200px) rotateX(57deg) rotateZ(-14deg) translate3d(0, 0, 0);
  }
  to {
    transform: perspective(1200px) rotateX(56deg) rotateZ(-13deg) translate3d(10px, -8px, 0);
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px;
  }

  .status-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 760px;
  }

  .hero::before {
    right: -12%;
    bottom: 30%;
    width: 92vw;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-side {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(640px, 100%);
    margin-top: 36px;
  }

  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .control-grid,
  .classified-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-top: 12px;
  }

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

  .topbar {
    top: 12px;
  }

  .status-row {
    gap: 8px;
    font-size: 0.62rem;
  }

  .hero {
    min-height: 720px;
    padding-top: 104px;
  }

  h1 {
    font-size: clamp(4.1rem, 18vw, 5.2rem);
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metrics div {
    min-height: 74px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .classified-head {
    align-items: start;
  }

  .batch-list {
    grid-template-columns: 1fr;
  }

  .whale-panel {
    width: min(340px, calc(100vw - 24px));
  }
}

/* Final command-center polish: stable first viewport, readable data, no assistant chrome. */
#whale-companion,
.whale-companion {
  display: none !important;
}

html {
  background: #050505;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 54% 8%, rgba(215, 181, 109, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(143, 185, 173, 0.09), transparent 26rem),
    linear-gradient(180deg, #040404 0%, #080806 47%, #040404 100%);
}

.shell {
  padding-top: 16px;
}

.topbar {
  width: min(1320px, calc(100% - 40px));
  min-height: 58px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  flex: 0 0 auto;
}

.status-row {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
}

.status-row > span {
  min-width: 0;
}

.hero {
  width: min(1320px, calc(100% - 56px));
  min-height: clamp(560px, 78svh, 720px);
  padding: clamp(96px, 11vh, 126px) 0 clamp(52px, 8vh, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  overflow: hidden;
}

.hero::before {
  right: -4%;
  bottom: clamp(70px, 12vh, 114px);
  width: min(660px, 48vw);
  opacity: 0.74;
  transform: perspective(1200px) rotateX(58deg) rotateZ(-13deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: min(820px, 100%);
}

h1 {
  margin-top: 18px;
  max-width: none;
  font-size: clamp(5.2rem, 9.8vw, 10.8rem);
  line-height: 0.9;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: nowrap;
}

.hero-copy p {
  margin-top: 22px;
  max-width: 560px;
  line-height: 1.72;
}

.hero-side {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 2;
  width: 100%;
  max-width: 350px;
  justify-self: end;
  align-self: end;
  margin: 0 0 14px;
}

.metrics {
  gap: 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(244, 241, 232, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 241, 232, 0.075), rgba(244, 241, 232, 0.018)),
    rgba(11, 12, 11, 0.66);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.metrics div {
  min-height: 78px;
  padding: 14px 0 12px 18px;
}

.metrics div + div {
  border-top: 1px solid rgba(244, 241, 232, 0.1);
}

.metrics span {
  font-size: clamp(2.25rem, 3.4vw, 4rem);
}

.content {
  width: min(1320px, calc(100% - 56px));
  padding-top: clamp(18px, 3vh, 34px);
}

.content::before {
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(244, 241, 232, 0.035), transparent 18rem),
    radial-gradient(ellipse at 50% 0%, rgba(215, 181, 109, 0.065), transparent 34rem);
}

.section-head,
.classified-head {
  gap: 18px;
}

.head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-grid {
  align-items: stretch;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card {
  min-width: 0;
}

.classified-shell {
  padding: clamp(18px, 2.2vw, 28px);
}

.type-grid,
.batch-list {
  min-width: 0;
}

.group-main,
.timeline-main,
.batch-item {
  min-width: 0;
}

.group-main strong,
.timeline-main strong,
.batch-item strong,
.occurrence p,
.detail-panel p {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.detail-panel {
  max-height: calc(100svh - 116px);
  overflow: auto;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: clamp(610px, 86svh, 760px);
  }

  .hero::before {
    right: -18%;
    bottom: 26%;
    width: min(760px, 88vw);
  }

  .hero-side {
    justify-self: start;
    max-width: 720px;
    margin-top: 8px;
  }

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

  .metrics div + div {
    border-top: 0;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    padding-top: 10px;
  }

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

  .topbar {
    top: 10px;
    padding: 12px;
    align-items: flex-start;
  }

  .status-row {
    justify-content: flex-start;
  }

  .hero {
    min-height: 620px;
    padding-top: 92px;
    padding-bottom: 42px;
  }

  .hero::before {
    right: -52%;
    bottom: 32%;
    width: 132vw;
    opacity: 0.55;
  }

  h1 {
    font-size: clamp(4rem, 17vw, 6.2rem);
    line-height: 0.94;
  }

  .hero-side {
    max-width: none;
  }

  .metrics {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .metrics div {
    min-height: 68px;
  }

  .metrics div + div {
    border-top: 1px solid rgba(244, 241, 232, 0.1);
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .head-actions {
    justify-content: flex-start;
  }

  .detail-panel {
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Top navigation refinement requested after visual review. */
.topbar {
  isolation: isolate;
  overflow: hidden;
  min-height: 62px;
  padding: 10px 12px 10px 22px;
  border-color: rgba(244, 241, 232, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    linear-gradient(112deg, rgba(215, 181, 109, 0.085), transparent 28%, rgba(143, 185, 173, 0.055) 72%, transparent),
    rgba(12, 13, 12, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62),
    0 18px 80px rgba(0, 0, 0, 0.44);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: -1;
}

.topbar::before {
  background:
    linear-gradient(90deg, transparent, rgba(244, 241, 232, 0.18) 18%, transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 7px);
  opacity: 0.34;
}

.topbar::after {
  inset: 1px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 0 46px rgba(215, 181, 109, 0.045),
    inset 0 0 1px rgba(255, 255, 255, 0.26);
}

.brand {
  position: relative;
  z-index: 1;
  font-size: 0.96rem;
  font-weight: 900;
  color: #f7f3e7;
}

.brand-dot {
  display: none !important;
}

.status-row {
  position: relative;
  z-index: 1;
}

.status-row > span:not(.pill) {
  color: rgba(244, 241, 232, 0.48);
}

#status-pill {
  height: 30px;
  padding-inline: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.018)),
    rgba(244, 241, 232, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#refresh-btn {
  min-width: 50px;
  height: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.014)),
    rgba(244, 241, 232, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 30px rgba(0, 0, 0, 0.24);
}

.hero-copy {
  margin-bottom: 8px;
}

h1 {
  margin-top: 0;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 50px;
    padding: 8px 10px 8px 12px;
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
  }

  .status-row {
    flex: none !important;
    width: max-content !important;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 7px;
  }

  .status-row > span:not(.pill) {
    display: none;
  }

  #status-pill {
    height: 28px;
    padding-inline: 10px;
    font-size: 0.62rem;
  }

  #refresh-btn {
    min-width: 38px;
    height: 30px;
    padding-inline: 8px;
    font-size: 0.62rem;
  }
}

@media (max-width: 390px) {
  .topbar {
    width: calc(100% - 16px);
    padding-inline: 10px;
    gap: 8px;
  }

  .brand {
    font-size: 0.7rem;
  }

  #status-pill {
    height: 26px;
    max-width: 72px;
    padding-inline: 8px;
    font-size: 0.58rem;
  }

  #refresh-btn {
    min-width: 34px;
    height: 28px;
    padding-inline: 7px;
    font-size: 0.58rem;
  }
}

/* Alarm type tabs must never collapse into vertical text columns. */
.type-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.type-tab {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 96px !important;
  max-width: min(360px, 68vw) !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 13px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  writing-mode: horizontal-tb !important;
  line-height: 1 !important;
}

.type-tab,
.type-tab * {
  text-orientation: mixed !important;
  writing-mode: horizontal-tb !important;
}

.type-tab span,
.type-tab strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.alarm-section,
.timeline-list,
.group-list,
.occurrence-list {
  min-width: 0;
}

.type-card,
.timeline-row,
.group-row {
  min-width: 0;
  width: 100%;
}

@media (max-width: 1180px) {
  .type-tab {
    max-width: min(320px, 74vw) !important;
  }
}
