:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1a212b;
  --line: #2d3745;
  --line-bright: #3a4658;
  --text: #d7dde7;
  --muted: #7f8b9d;
  --accent: #ff6b00;
  --accent-hover: #ff8b3d;
  --cyan: #18ffff;
  --green: #00e676;
  --amber: #ffb74d;
  --red: #ff3d3d;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 107, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 0, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 107, 0, 0.14), transparent 36rem),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
  font-family: "Fira Code", "JetBrains Mono", "IBM Plex Mono", "Courier New", monospace;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

button,
input {
  font: inherit;
}

.flash-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
}

.flash {
  border: 1px solid var(--line-bright);
  background: rgba(11, 17, 24, 0.96);
  color: var(--text);
  padding: 12px 14px;
  box-shadow: 0 18px 40px var(--shadow);
}

.flash-error {
  border-color: rgba(255, 95, 109, 0.7);
  color: #ffd8dd;
}

.flash-warning {
  border-color: rgba(246, 196, 83, 0.75);
  color: #ffe4a3;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(1040px, 100%);
  border: 1px solid var(--line-bright);
  background: rgba(7, 11, 15, 0.92);
  box-shadow: 0 26px 80px var(--shadow);
}

.panel-chrome {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #070c11;
}

.panel-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-bright);
}

.panel-chrome span:nth-child(1) {
  background: var(--red);
}

.panel-chrome span:nth-child(2) {
  background: var(--amber);
}

.panel-chrome span:nth-child(3) {
  background: var(--green);
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  padding: clamp(24px, 4vw, 46px);
}

.eyebrow,
.terminal-prompt,
.secure-badge,
.metric-card span,
.panel-title span,
.status-ledger span {
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.login-copy h1 {
  margin: 12px 0 10px;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.88;
  color: #f4fbff;
  text-shadow: 0 0 34px rgba(255, 107, 0, 0.24);
}

.lede {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}

.status-ledger div,
.auth-card,
.metric-card,
.panel,
.go-bar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 24, 33, 0.94), rgba(8, 12, 17, 0.94));
}

.status-ledger div {
  min-height: 74px;
  padding: 12px;
}

.status-ledger strong {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-size: 0.92rem;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.secure-badge {
  border: 1px solid rgba(32, 227, 138, 0.5);
  color: var(--green);
  padding: 3px 7px;
}

.setup-warning {
  border: 1px solid rgba(246, 196, 83, 0.5);
  background: rgba(246, 196, 83, 0.08);
  color: #ffdf91;
  padding: 12px;
  line-height: 1.6;
}

.setup-warning code {
  color: var(--green);
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.auth-card input,
.go-bar input {
  width: 100%;
  border: 1px solid var(--line);
  background: #04070a;
  color: var(--text);
  outline: none;
}

.auth-card input {
  height: 44px;
  padding: 0 12px;
}

.auth-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14);
}

.terminal-button,
.icon-button,
.launch-list button,
.launch-list a {
  border: 1px solid var(--line-bright);
  color: var(--text);
  background: #091017;
  cursor: pointer;
}

.terminal-button {
  height: 46px;
  color: #0d1117;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 800;
}

.terminal-button:hover,
.icon-button:hover,
.launch-list button:hover,
.launch-list a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.terminal-frame {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.top-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.96);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--cyan);
  color: var(--accent);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 0.78rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  height: 34px;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ticker-tape {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: #070b0f;
}

.ticker-item {
  display: flex;
  gap: 8px;
  min-width: max-content;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.ticker-item strong {
  color: var(--text);
}

.ticker-up strong,
.positive {
  color: var(--green);
}

.ticker-down strong,
.negative {
  color: var(--red);
}

.workspace {
  display: grid;
  grid-template-columns: 64px 1fr;
  min-height: 0;
}

.rail {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 15, 0.85);
}

.rail-item {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.rail-item.active,
.rail-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.command-center {
  padding: 16px;
  min-width: 0;
}

.go-bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.go-bar span {
  color: #0d1117;
  background: var(--accent);
  padding: 8px 12px;
  font-weight: 800;
}

.go-bar input {
  height: 34px;
  padding: 0 10px;
}

.mission-header,
.security-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 27, 34, 0.84);
}

.mission-header h1,
.security-header h1 {
  margin: 4px 0 6px;
  color: var(--text);
  font-family: "Inter", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.85rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.mission-header p,
.security-header p,
.intelligence-panel p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge-row span,
.symbol-row span {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.clock-panel,
.security-price {
  min-width: 160px;
  border: 1px solid var(--line);
  background: #0d1117;
  padding: 12px;
}

.clock-panel span,
.security-price span,
.metric-cell span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.clock-panel strong,
.security-price strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 1.2rem;
}

.clock-panel small,
.security-price small {
  display: block;
  margin-top: 6px;
}

.heat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.heat-item {
  display: grid;
  gap: 5px;
  min-height: 76px;
  border: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.78);
  color: var(--text);
  padding: 10px;
  text-decoration: none;
}

.heat-item span,
.heat-item small {
  color: var(--muted);
  font-size: 0.72rem;
}

.heat-item strong {
  font-size: 1.05rem;
}

.heat-up {
  border-color: rgba(0, 230, 118, 0.42);
}

.heat-up strong {
  color: var(--green);
}

.heat-down {
  border-color: rgba(255, 61, 61, 0.42);
}

.heat-down strong {
  color: var(--red);
}

kbd {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
}

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

.metric-card {
  min-height: 116px;
  padding: 16px;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.45rem;
  color: #f7fbff;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.terminal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.9fr;
  gap: 12px;
  margin-top: 14px;
}

.panel {
  min-height: 320px;
  padding: 14px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title strong {
  color: var(--cyan);
  font-size: 0.78rem;
}

.launch-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.launch-list button,
.launch-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  min-height: 70px;
  padding: 12px;
  text-align: left;
  text-decoration: none;
}

.launch-list button span,
.launch-list a span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent);
}

.launch-list button strong,
.launch-list a strong {
  align-self: end;
}

.launch-list button small,
.launch-list a small {
  color: var(--muted);
}

.chart-panel {
  position: relative;
}

.chart-bars {
  height: 238px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 10px;
  padding: 28px 6px 4px;
}

.chart-bars i {
  display: block;
  min-height: 22px;
  border: 1px solid rgba(255, 107, 0, 0.42);
  background: linear-gradient(180deg, rgba(255, 107, 0, 0.92), rgba(24, 255, 255, 0.14));
}

.watch-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.88rem;
}

.watch-table th,
.watch-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.watch-table th:first-child,
.watch-table td:first-child {
  text-align: left;
}

.watch-table th {
  color: var(--muted);
  font-weight: 400;
}

.watch-table a {
  color: var(--accent);
  text-decoration: none;
}

.watch-table a:hover {
  color: var(--accent-hover);
}

.intelligence-panel {
  min-height: 220px;
}

.mini-command-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-command-list span {
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 6px 8px;
  font-size: 0.72rem;
}

.symbol-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.symbol-row h1 {
  margin: 0;
}

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

.metric-cell {
  min-height: 78px;
  border: 1px solid var(--line);
  background: rgba(22, 27, 34, 0.82);
  padding: 10px;
}

.metric-cell strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.metric-cell.positive strong {
  color: var(--green);
}

.metric-cell.negative strong {
  color: var(--red);
}

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

.price-chart-panel {
  min-height: 360px;
}

.line-chart {
  width: 100%;
  height: 230px;
  margin-top: 18px;
  border: 1px solid rgba(45, 55, 69, 0.7);
  background:
    linear-gradient(rgba(45, 55, 69, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 55, 69, 0.36) 1px, transparent 1px),
    #0d1117;
  background-size: 20px 20px;
}

.line-chart polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.volume-bars {
  height: 80px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 6px;
  margin-top: 10px;
}

.volume-bars i {
  display: block;
  min-height: 10px;
  background: rgba(24, 255, 255, 0.32);
  border: 1px solid rgba(24, 255, 255, 0.42);
}

.descriptor-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.descriptor-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.descriptor-list dt {
  color: var(--muted);
}

.descriptor-list dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.price-history {
  grid-column: span 2;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-top: 14px;
}

.ops-panel {
  grid-column: span 3;
  min-height: 190px;
}

.event-stream {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.event-stream li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(47, 82, 100, 0.6);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.event-stream time {
  color: var(--accent);
}

@media (max-width: 900px) {
  .login-grid,
  .workspace,
  .terminal-grid,
  .metrics-grid,
  .security-grid,
  .security-metrics {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-flow: column;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ops-panel,
  .price-history {
    grid-column: auto;
  }

  .mission-header,
  .security-header,
  .top-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .login-shell,
  .command-center {
    padding: 12px;
  }

  .login-grid {
    padding: 18px;
  }

  .status-ledger,
  .go-bar {
    grid-template-columns: 1fr;
  }

  .top-bar {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    padding: 14px;
  }
}
