:root {
  color-scheme: dark;
  --page: #07111f;
  --panel: rgba(15, 31, 54, 0.44);
  --panel-soft: rgba(27, 61, 96, 0.32);
  --panel-dark: rgba(5, 15, 29, 0.58);
  --line: rgba(188, 224, 255, 0.24);
  --line-strong: rgba(111, 188, 255, 0.54);
  --text: #f7fbff;
  --muted: #c2d3e3;
  --green: #69c6ff;
  --cyan: #9ee7ff;
  --red: #ff5574;
  --amber: #ffd08a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 78%, rgba(255, 181, 120, 0.3), transparent 18rem),
    radial-gradient(circle at 72% 36%, rgba(122, 187, 255, 0.34), transparent 28rem),
    linear-gradient(180deg, #082b56 0%, #315f91 42%, #9dbbd2 68%, #182c46 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
  text-shadow: 0 1px 3px rgba(0, 5, 14, 0.82);
}

body:not(.is-authenticated) .dashboard {
  filter: blur(10px);
  opacity: 0.22;
  pointer-events: none;
}

body.is-authenticated .login-screen {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

button {
  font: inherit;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 18px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.login-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(238, 248, 255, 0.32);
  border-radius: 8px;
  background: rgba(5, 13, 27, 0.54);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.24), 0 24px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px) saturate(1.12);
}

.login-brand {
  justify-content: center;
  margin-bottom: 18px;
}

.login-fields {
  display: grid;
  gap: 12px;
}

.login-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-fields input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(238, 248, 255, 0.28);
  border-radius: 6px;
  background: rgba(2, 7, 18, 0.46);
  color: var(--text);
  font: 600 0.95rem Inter, system-ui, sans-serif;
  outline: none;
  padding: 0 12px;
}

.login-fields input:focus {
  border-color: rgba(105, 198, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(105, 198, 255, 0.14);
}

.login-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--red);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-align: center;
}

.login-button {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid rgba(105, 198, 255, 0.58);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(105, 198, 255, 0.28), rgba(255, 208, 138, 0.12));
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.background-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: brightness(0.64) contrast(1.08) saturate(0.98);
}

.background-motion-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("https://i.pinimg.com/originals/a4/22/f3/a422f3abe1579818be26c7342fffa70e.png") center / cover no-repeat;
  filter: brightness(0.72) contrast(1.04) saturate(0.98);
  opacity: 1;
  transform-origin: center;
  animation: backgroundPosterMotion 18s ease-in-out infinite alternate;
}

.background-motion-fallback::before,
.background-motion-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.background-motion-fallback::before {
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(232, 247, 255, 0.92) 49%, transparent 50%),
    linear-gradient(118deg, transparent 0 53%, rgba(112, 193, 255, 0.62) 54%, transparent 55%),
    radial-gradient(ellipse at 54% 6%, rgba(210, 235, 255, 0.52), transparent 38%);
  clip-path: polygon(47% 0, 56% 0, 52% 19%, 58% 19%, 45% 48%, 50% 25%, 43% 25%);
  opacity: 0;
  filter: blur(0.5px);
  animation: stormFlash 7.5s infinite;
}

.background-motion-fallback::after {
  background:
    radial-gradient(ellipse at 50% 10%, rgba(235, 246, 255, 0.3), transparent 24rem),
    linear-gradient(180deg, rgba(5, 12, 28, 0.1), rgba(2, 6, 15, 0.48));
  opacity: 0;
  animation: skyPulse 7.5s infinite;
}

.background-video.is-playing + .background-motion-fallback {
  opacity: 0;
}

.background-sharp-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 7, 18, 0.22), rgba(2, 7, 18, 0.36)),
    url("https://i.pinimg.com/originals/a4/22/f3/a422f3abe1579818be26c7342fffa70e.png") center / cover no-repeat;
  filter: brightness(0.68) contrast(1.12) saturate(1.02);
  opacity: 0.96;
}

.background-video.is-playing ~ .background-sharp-layer {
  opacity: 0;
}

#matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  opacity: 0;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rain-glass {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(68, 184, 255, 0.04), transparent 24rem),
    linear-gradient(180deg, rgba(2, 7, 18, 0.14), rgba(2, 7, 18, 0.26));
  filter: none;
  opacity: 1;
}

.rain-glass::before,
.rain-glass::after {
  content: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rain-glass::before {
  background-image:
    radial-gradient(ellipse at center, rgba(255,255,255,0.72) 0 11%, rgba(211,234,250,0.48) 12% 29%, rgba(34,55,76,0.34) 42%, transparent 62%),
    radial-gradient(ellipse at center, rgba(255,255,255,0.68) 0 10%, rgba(211,234,250,0.42) 12% 28%, rgba(34,55,76,0.30) 43%, transparent 62%),
    radial-gradient(ellipse at center, rgba(255,255,255,0.7) 0 10%, rgba(211,234,250,0.45) 13% 30%, rgba(34,55,76,0.32) 44%, transparent 64%);
  background-size: 86px 118px, 64px 92px, 112px 150px;
  background-position: 6vw 11vh, 31vw 22vh, 74vw 9vh;
  background-repeat: no-repeat;
  filter: drop-shadow(0 8px 8px rgba(4, 12, 24, 0.2));
  opacity: 0.62;
}

.rain-glass::after {
  background-image:
    radial-gradient(ellipse at center, rgba(255,255,255,0.58) 0 9%, rgba(226,242,255,0.38) 12% 27%, rgba(28,48,70,0.28) 43%, transparent 64%),
    radial-gradient(ellipse at center, rgba(255,255,255,0.64) 0 10%, rgba(226,242,255,0.42) 12% 28%, rgba(28,48,70,0.3) 42%, transparent 64%),
    radial-gradient(ellipse at center, rgba(255,255,255,0.54) 0 8%, rgba(226,242,255,0.34) 12% 26%, rgba(28,48,70,0.24) 43%, transparent 64%);
  background-size: 58px 76px, 76px 104px, 48px 66px;
  background-position: 18vw 68vh, 58vw 54vh, 88vw 72vh;
  background-repeat: no-repeat;
  opacity: 0.48;
}

.rain-glass span {
  display: none;
}

.rain-glass span:nth-child(1) { left: 8%; top: 16%; transform: scale(0.82) rotate(-12deg); }
.rain-glass span:nth-child(2) { left: 14%; top: 39%; transform: scale(1.26) rotate(8deg); }
.rain-glass span:nth-child(3) { left: 22%; top: 24%; transform: scale(0.62) rotate(18deg); }
.rain-glass span:nth-child(4) { left: 33%; top: 15%; transform: scale(1.5) rotate(-4deg); }
.rain-glass span:nth-child(5) { left: 42%; top: 63%; transform: scale(0.74) rotate(10deg); }
.rain-glass span:nth-child(6) { left: 52%; top: 31%; transform: scale(1.05) rotate(-16deg); }
.rain-glass span:nth-child(7) { left: 61%; top: 73%; transform: scale(0.68) rotate(22deg); }
.rain-glass span:nth-child(8) { left: 69%; top: 18%; transform: scale(1.34) rotate(6deg); }
.rain-glass span:nth-child(9) { left: 77%; top: 46%; transform: scale(0.86) rotate(-10deg); }
.rain-glass span:nth-child(10) { left: 85%; top: 27%; transform: scale(1.18) rotate(14deg); }
.rain-glass span:nth-child(11) { left: 91%; top: 64%; transform: scale(0.72) rotate(-18deg); }
.rain-glass span:nth-child(12) { left: 96%; top: 12%; transform: scale(0.54) rotate(20deg); }

.storm {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.storm::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(180, 225, 255, 0.08), transparent 24rem),
    linear-gradient(90deg, transparent, rgba(180, 225, 255, 0.05), transparent);
  background-size: auto;
  mask-image: none;
}

.storm::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 6%, rgba(128, 255, 190, 0.24), transparent 46%);
  animation: skyFlash 12s 2s infinite;
}

.rain {
  position: absolute;
  inset: -55vh 0 0;
  height: 155vh;
  opacity: 0;
  background-image: none;
  animation: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 82%, transparent 100%);
}

.rain-back {
  opacity: 0;
  filter: blur(0.7px);
  background-size: 1px 120px, 1px 170px, 1px 92px;
  background-position: 42px 0, 118px 36px, 190px 14px;
  animation: none;
}

.lightning {
  position: absolute;
  top: 0;
  width: 100%;
  height: 34vh;
  opacity: 0;
  filter: blur(18px);
  background: radial-gradient(ellipse at center top, rgba(221, 244, 255, 0.62), rgba(75, 159, 230, 0.16) 34%, transparent 68%);
}

.lightning-one {
  right: 0;
  animation: flash 12s infinite;
}

.lightning-two {
  left: 0;
  height: 26vh;
  animation: flash 15s 5s infinite;
}

.fog {
  position: absolute;
  inset: auto -10% 0;
  height: 36vh;
  background: linear-gradient(to top, rgba(3, 8, 16, 0.88), transparent);
}

.dashboard {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(1480px, calc(100% - 28px));
  margin: 10px auto;
  padding: 12px;
  border: 1px solid rgba(178, 255, 219, 0.22);
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dashboard::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 82%, rgba(105, 198, 255, 0.05));
}

.dashboard::after {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(225, 246, 255, 0.08), transparent 30%),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.1), transparent 15rem);
  mix-blend-mode: screen;
}

.glass-rain {
  position: absolute;
  inset: -35% 0 0;
  z-index: 0;
  pointer-events: none;
  height: 150%;
  opacity: 0;
  background-image: none;
  background-size: 100% 100%;
  background-position: 0 0;
  animation: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 11%, black 86%, transparent 100%);
}

.topbar,
.ticker,
.tabs,
.operator-strip,
.intelligence-grid,
.tab-panel {
  position: relative;
  z-index: 1;
}

.topbar,
.ticker,
.signal-strip,
.tabs,
.operator-strip,
.goal-panel,
.metric,
.panel,
.ai-summary-card,
.notification-panel,
.command-card,
.risk-grid article,
.gauge-card,
.bottom-ticker {
  border: 1px solid rgba(238, 248, 255, 0.26);
  border-radius: 6px;
  background-color: rgba(5, 13, 27, 0.34);
  background-image: none;
  background-size: auto;
  background-position: 0 0;
  background-repeat: repeat;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 10px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(3px) saturate(1.08);
  animation: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
  background-color: rgba(5, 13, 27, 0.38);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 38px;
  place-items: center;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(105, 198, 255, 0.22), rgba(255, 208, 138, 0.08));
  box-shadow: 0 0 22px rgba(105, 198, 255, 0.22);
  transform-style: preserve-3d;
  animation: crownSpin 5s linear infinite;
}

.crown-mark-small {
  width: 38px;
  height: 32px;
  animation-duration: 5s;
}

.crown-mark-small .crown-peak {
  bottom: 11px;
  width: 11px;
  height: 14px;
}

.crown-mark-small .crown-peak.left {
  left: 8px;
}

.crown-mark-small .crown-peak.center {
  left: 13px;
  bottom: 12px;
  width: 13px;
  height: 18px;
}

.crown-mark-small .crown-peak.right {
  right: 8px;
}

.crown-mark-small .crown-base {
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 8px;
}

.crown-mark {
  overflow: hidden;
}

.crown-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 5px;
  background: radial-gradient(circle at 50% 20%, rgba(238, 248, 255, 0.26), transparent 42%);
}

.crown-peak,
.crown-base {
  position: absolute;
  z-index: 1;
  background: linear-gradient(180deg, #ffffff 0%, #9ee7ff 42%, var(--green) 100%);
  filter: drop-shadow(0 0 8px rgba(105, 198, 255, 0.55));
}

.crown-peak {
  bottom: 13px;
  width: 13px;
  height: 17px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.crown-peak.left {
  left: 9px;
  transform: rotate(-13deg);
  transform-origin: bottom center;
}

.crown-peak.center {
  left: 16px;
  bottom: 14px;
  width: 15px;
  height: 21px;
}

.crown-peak.right {
  right: 9px;
  transform: rotate(13deg);
  transform-origin: bottom center;
}

.crown-base {
  left: 10px;
  right: 10px;
  bottom: 9px;
  height: 10px;
  border-radius: 2px 2px 5px 5px;
}

.crown-base::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(3, 12, 8, 0.32);
}

.crown-mark::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 11px;
  right: 11px;
  bottom: 19px;
  height: 4px;
  background:
    radial-gradient(circle at 0% 50%, #f5fff8 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, #f5fff8 0 2px, transparent 2.5px),
    radial-gradient(circle at 100% 50%, #f5fff8 0 2px, transparent 2.5px);
}


.crown-mark {
  overflow: hidden;
}


.brand-title {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 2px 4px 6px 0;
  border-bottom: 1px solid rgba(101, 232, 193, 0.54);
  background: linear-gradient(180deg, #ffffff 8%, #d7f2ff 42%, #69c6ff 68%, #fff1d9 100%);
  background-clip: text;
  color: #f4fff8;
  filter: drop-shadow(0 0 16px rgba(105, 198, 255, 0.24));
  font-size: clamp(1.35rem, 2.05vw, 2.05rem);
  font-weight: 800;
  isolation: isolate;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titlePulse 2.8s ease-in-out infinite;
  text-shadow:
    0 0 6px rgba(245, 255, 248, 0.62),
    0 0 16px rgba(105, 198, 255, 0.58),
    0 0 34px rgba(255, 208, 138, 0.18);
  box-shadow: 0 8px 18px -17px rgba(105, 198, 255, 0.95);
}

.brand-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 2px 4px 6px 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(158, 231, 255, 0.8);
  filter: blur(5px);
  opacity: 0.82;
  pointer-events: none;
}

.brand-title::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 6px;
  left: -35%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(238, 248, 255, 0.86), transparent);
  transform: skewX(-18deg);
  animation: titleScan 2.4s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow,
.section-title,
.metric span,
.mini-grid span,
.gauge-card span {
  margin: 0;
  color: #d5e8f8;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 2px 0 0;
  letter-spacing: 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(33, 217, 144, 0.86);
}

.ghost-button,
.mini-button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(117, 165, 207, 0.26);
  border-radius: 5px;
  background: rgba(54, 112, 162, 0.1);
  color: #c8d9e8;
  cursor: pointer;
}

.ghost-button:hover,
.mini-button:hover {
  border-color: rgba(66, 191, 247, 0.5);
  background: rgba(66, 191, 247, 0.12);
}

.ghost-button.danger {
  color: #ffc3cf;
}

.ticker {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background-color: rgba(5, 13, 27, 0.34);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  color: #e2f1fb;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  text-align: center;
}

.signal-strip strong {
  color: var(--green);
}

.ticker div {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: #eef7ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ticker span,
.ticker em {
  color: var(--green);
  font-style: normal;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 6px;
  background-color: rgba(5, 13, 27, 0.34);
}

.tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.tabs .active {
  background: rgba(238, 248, 255, 0.14);
  color: var(--green);
}

.operator-strip {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 12px;
  background-color: rgba(5, 13, 27, 0.34);
}

.operator-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.operator-strip span,
.command-card span,
.risk-grid span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.operator-strip strong,
.command-card strong,
.risk-grid strong,
.ai-summary-card strong {
  overflow: hidden;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 5, 14, 0.9);
}

.intelligence-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
  margin-top: 8px;
}

.ai-summary-card,
.notification-panel {
  min-height: 128px;
  padding: 12px;
  background-color: rgba(5, 13, 27, 0.34);
}

.ai-summary-card {
  display: grid;
  align-content: center;
  gap: 9px;
  border-color: rgba(101, 232, 193, 0.34);
  background:
    linear-gradient(135deg, rgba(238, 248, 255, 0.1), rgba(5, 13, 27, 0.42));
}

.ai-summary-card strong {
  display: block;
  font-size: 1rem;
  color: #eafff4;
  text-shadow: 0 0 16px rgba(57, 229, 151, 0.26);
}

.ai-summary-card p {
  max-width: 74ch;
  margin: 0;
  color: #e2f1fb;
  text-shadow: 0 1px 3px rgba(0, 5, 14, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
}

.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-tags span {
  padding: 5px 8px;
  border: 1px solid rgba(164, 255, 211, 0.2);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.26);
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
}

.notification-panel {
  overflow: hidden;
}

.notification-feed {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.glow-notification {
  position: relative;
  display: grid;
  grid-template-columns: auto 0.8fr 1fr;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(101, 232, 193, 0.28);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.28);
  font-family: "JetBrains Mono", monospace;
  animation: notificationGlow 2.4s ease-out;
}

.glow-notification::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(101, 232, 193, 0.16), transparent);
  transform: translateX(-100%);
  animation: notificationScan 1.5s ease-out;
}

.glow-notification span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(57, 229, 151, 0.8);
}

.glow-notification strong {
  color: #eafff4;
  font-size: 0.78rem;
}

.glow-notification em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glow-notification.warning span {
  background: var(--amber);
  box-shadow: 0 0 14px rgba(245, 168, 59, 0.8);
}

.glow-notification.danger span {
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 85, 116, 0.8);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.goal-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 8px;
  padding: 12px 14px;
  overflow: hidden;
  background-color: rgba(7, 18, 32, 0.14);
}

.goal-panel::before {
  content: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(238, 248, 255, 0.1), transparent 42%, rgba(105, 198, 255, 0.08));
}

.goal-info,
.goal-value,
.progress-track {
  position: relative;
}

.goal-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.goal-info button {
  border: 0;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
}

.goal-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.progress-track {
  grid-column: 1 / -1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(214, 230, 242, 0.08);
}

.progress-fill {
  width: 8.1%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.progress-track span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.metric {
  min-height: 72px;
  padding: 10px 12px;
  text-shadow: 0 1px 4px rgba(0, 5, 14, 0.9);
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem);
  text-shadow: 0 0 12px rgba(57, 229, 151, 0.16);
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.metric.accent,
.metric.hot {
  border-color: var(--line-strong);
  background: rgba(7, 18, 32, 0.18);
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.command-card {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 12px;
  background-color: rgba(7, 18, 32, 0.14);
}

.command-card.active-command {
  border-color: var(--line-strong);
  background: rgba(7, 18, 32, 0.2);
}

.command-card button {
  justify-self: start;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.overview-positions {
  margin-top: 8px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 8px;
  margin-top: 8px;
}

.panel {
  padding: 12px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.mini-grid article {
  min-height: 54px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.18);
  backdrop-filter: blur(1px);
}

.mini-grid strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
}

.positive-text {
  color: var(--green);
}

.negative-text {
  color: var(--red);
}

.cyan-text {
  color: var(--cyan);
}

.warning-text {
  color: var(--amber);
}

.position-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.position {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.18);
  backdrop-filter: blur(1px);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.position strong {
  color: var(--cyan);
}

.position em {
  font-style: normal;
}

.position.long em {
  color: var(--green);
}

.position.short em {
  color: var(--red);
}

.closed-trades-panel {
  margin-top: 8px;
}

.closed-trades {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  font-family: "JetBrains Mono", monospace;
}

.closed-trade {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(164, 255, 211, 0.16);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.2);
  color: #e3f2ea;
  font-size: 0.8rem;
}

.closed-trade span {
  font-weight: 700;
}

.closed-trade strong {
  color: var(--green);
}

.closed-trade.loss strong {
  color: var(--red);
}

.closed-trade em,
.closed-trade time {
  color: var(--muted);
  font-style: normal;
}

.closed-trade.new {
  border-color: var(--line-strong);
  animation: closedTradeFlash 1.8s ease-out;
}

.data-table {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-family: "JetBrains Mono", monospace;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.risk-grid article {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 74px;
  padding: 12px;
  background-color: rgba(6, 24, 19, 0.24);
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.1fr 0.65fr 0.9fr 0.9fr 0.7fr 0.78fr;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(164, 255, 211, 0.16);
  border-radius: 5px;
}

.compact-table .table-head,
.compact-table .table-row {
  min-height: 36px;
}

.table-head {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(238, 248, 255, 0.12);
}

.table-row {
  background: rgba(5, 13, 27, 0.38);
  color: #f2f8ff;
  font-size: 0.8rem;
}

.table-row:hover {
  border-color: rgba(66, 191, 247, 0.34);
  background: rgba(7, 18, 32, 0.28);
}

.table-row.long strong {
  color: var(--green);
}

.table-row.short strong {
  color: var(--red);
}

.table-row em {
  color: var(--cyan);
  font-style: normal;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
  margin-top: 8px;
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(7, 18, 32, 0.28);
  backdrop-filter: blur(2px);
  font-family: "JetBrains Mono", monospace;
}

.setting-row span,
.alert-card span {
  color: var(--muted);
  font-size: 0.74rem;
}

.setting-row strong {
  color: var(--green);
  font-size: 0.84rem;
}

.mini-button {
  color: var(--green);
}

.muted-button {
  color: var(--muted);
}

.alert-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(238, 248, 255, 0.12), rgba(7, 18, 32, 0.18));
}

.alert-card strong {
  color: var(--text);
  font-size: 1rem;
}

.alert-card small {
  color: var(--muted);
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.bottom-ticker {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  overflow: hidden;
}

.bottom-ticker div {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

.bottom-ticker span,
.bottom-ticker em {
  color: var(--green);
  font-style: normal;
}

.gauge-card {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 104px;
  padding: 10px;
}

.gauge {
  position: relative;
  width: min(118px, 22vw);
  aspect-ratio: 2 / 1;
  overflow: hidden;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 0 0;
  background: conic-gradient(from 270deg at 50% 100%, var(--red) 0 28deg, var(--amber) 28deg 70deg, var(--green) 70deg 128deg, rgba(255, 255, 255, 0.08) 128deg 180deg);
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 11px 11px 0;
  border-radius: 999px 999px 0 0;
  background: #08121f;
}

.needle {
  position: absolute;
  left: calc(50% - 1.5px);
  bottom: 0;
  z-index: 2;
  width: 3px;
  height: 78%;
  transform: rotate(calc(-90deg + (var(--value) * 1.8deg)));
  transform-origin: bottom center;
  border-radius: 99px;
  background: linear-gradient(var(--cyan), var(--amber));
}

.gauge strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  z-index: 3;
  color: var(--amber);
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
}

.alt .gauge strong {
  color: var(--cyan);
}

@keyframes rainFall {
  from {
    transform: translate3d(0, -28vh, 0);
  }
  to {
    transform: translate3d(0, 28vh, 0);
  }
}

@keyframes flash {
  0%, 86%, 100% {
    opacity: 0;
  }
  87% {
    opacity: 0.42;
  }
  88% {
    opacity: 0.05;
  }
  89% {
    opacity: 0.28;
  }
  91% {
    opacity: 0;
  }
}

@keyframes skyFlash {
  0%, 86%, 100% {
    opacity: 0;
  }
  87% {
    opacity: 0.32;
  }
  88% {
    opacity: 0.04;
  }
  89% {
    opacity: 0.18;
  }
  91% {
    opacity: 0;
  }
}

@keyframes titlePulse {
  0%, 100% {
    color: #f4f8fb;
    text-shadow: 0 0 8px rgba(105, 198, 255, 0.22), 0 0 28px rgba(105, 198, 255, 0.1);
  }
  50% {
    color: #e4f7ff;
    text-shadow: 0 0 12px rgba(105, 198, 255, 0.58), 0 0 34px rgba(255, 208, 138, 0.18);
  }
}

@keyframes titleScan {
  0% {
    left: -38%;
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  55% {
    opacity: 0.55;
  }
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes skyDrift {
  from {
    transform: translate3d(-1.5vw, -1vh, 0) scale(1);
  }
  to {
    transform: translate3d(1.5vw, 1vh, 0) scale(1.04);
  }
}

@keyframes dropletFall {
  0% {
    transform: translate3d(0, -12vh, 0) scaleY(0.86);
    opacity: 0;
  }
  9% {
    opacity: 0.48;
  }
  58% {
    transform: translate3d(14px, 56vh, 0) scaleY(1.25);
    opacity: 0.5;
  }
  100% {
    transform: translate3d(-8px, 112vh, 0) scaleY(1.65);
    opacity: 0;
  }
}

@keyframes crownSpin {
  0% {
    transform: perspective(420px) rotateY(0deg);
  }
  50% {
    transform: perspective(420px) rotateY(180deg);
  }
  100% {
    transform: perspective(420px) rotateY(360deg);
  }
}

@keyframes closedTradeFlash {
  0% {
    background: rgba(238, 248, 255, 0.22);
    box-shadow: 0 0 24px rgba(57, 229, 151, 0.28);
  }
  100% {
    background: rgba(1, 10, 8, 0.58);
    box-shadow: none;
  }
}

@keyframes notificationGlow {
  0% {
    border-color: rgba(245, 255, 248, 0.75);
    box-shadow: 0 0 26px rgba(57, 229, 151, 0.34);
  }
  100% {
    border-color: rgba(101, 232, 193, 0.28);
    box-shadow: none;
  }
}

@keyframes notificationScan {
  to {
    transform: translateX(100%);
  }
}

@keyframes backgroundPosterMotion {
  0% {
    transform: scale(1) translate3d(-0.2%, -0.2%, 0);
    filter: brightness(0.96);
  }
  50% {
    transform: scale(1.01) translate3d(0.2%, 0.2%, 0);
    filter: brightness(1.04);
  }
  100% {
    transform: scale(1) translate3d(-0.1%, 0.3%, 0);
    filter: brightness(1);
  }
}

@keyframes stormFlash {
  0%, 72%, 78%, 82%, 100% {
    opacity: 0;
  }
  73% {
    opacity: 0.95;
  }
  75% {
    opacity: 0.08;
  }
  79% {
    opacity: 0.6;
  }
}

@keyframes skyPulse {
  0%, 72%, 78%, 82%, 100% {
    opacity: 0;
  }
  73% {
    opacity: 0.65;
  }
  75% {
    opacity: 0.12;
  }
  79% {
    opacity: 0.42;
  }
}

@keyframes glassRain {
  from {
    transform: translateY(-170px);
  }
  to {
    transform: translateY(170px);
  }
}

@keyframes panelRain {
  from {
    background-position: 24px -260px, 86px -340px, 46px -220px;
  }
  to {
    background-position: 24px 260px, 86px 340px, 46px 220px;
  }
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-grid,
  .tool-grid,
  .operator-strip,
  .intelligence-grid,
  .command-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .dashboard {
    width: min(100% - 18px, 1360px);
    margin: 8px auto;
    padding: 10px;
  }

  .ticker,
  .signal-strip,
  .bottom-ticker,
  .metric-grid,
  .mini-grid,
  .command-grid,
  .risk-grid,
  .gauge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-head,
  .table-row,
  .closed-trade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
    padding: 10px;
  }

  .glow-notification {
    grid-template-columns: auto 1fr;
  }

  .glow-notification em {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .topbar,
  .goal-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-row,
  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .ticker,
  .metric-grid,
  .mini-grid,
  .command-grid,
  .risk-grid,
  .gauge-grid {
    grid-template-columns: 1fr;
  }
}

