html, body {
  background: #000 !important;
}

.aureus-live {
  width: min(100% - 24px, 1500px);
  margin: 0 auto;
  padding: 22px 0 42px;
  color: #fff7df;
  background: #000;
  font-family: Arial, sans-serif;
}

.aureus-live * {
  box-sizing: border-box;
}

.al-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 12px 0 24px;
  border-bottom: 1px solid rgba(245, 180, 49, .25);
}

.al-kicker {
  margin: 0 0 8px;
  color: #ff5a50;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.al-header h1 {
  margin: 0;
  color: #ffd978;
  font-size: clamp(34px, 7vw, 76px);
  line-height: .95;
}

.al-status {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 9px;
  align-items: center;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 180, 49, .28);
  border-radius: 20px;
  background: rgba(245, 180, 49, .05);
}

.al-status small {
  grid-column: 2;
  color: #bdb29a;
}

.al-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: #777;
}

.al-status[data-status="LIVE"] .al-dot { background: #1fe36f; box-shadow: 0 0 14px rgba(31, 227, 111, .8); }
.al-status[data-status="STALE"] .al-dot { background: #ffd978; box-shadow: 0 0 14px rgba(255, 217, 120, .7); }
.al-status[data-status="OFFLINE"] .al-dot { background: #ff4b3e; box-shadow: 0 0 14px rgba(255, 75, 62, .7); }

.al-layer-summary {
  margin: 18px 0;
}

.al-layer-block {
  padding: 14px;
  border: 1px solid rgba(245, 180, 49, .28);
  border-radius: 18px;
  background: #000;
  box-shadow: inset 0 0 40px rgba(245, 180, 49, .035);
}

.al-layer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.al-layer-head h2 {
  margin: 0;
  color: #ffd978;
  font-size: 18px;
}

.al-layer-head span {
  color: #bdb29a;
  font-size: 12px;
  text-align: right;
}

.al-layer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.al-layer {
  display: grid;
  grid-template-columns: minmax(54px, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(245, 180, 49, .16);
  border-radius: 10px;
  background: rgba(245, 180, 49, .045);
}

.al-layer span {
  color: #cfc4ad;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.al-layer strong {
  min-width: 0;
  color: #fff7df;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.al-layer small {
  grid-column: 1 / -1;
  color: #918874;
  font-size: 11px;
}

.al-layer::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #777;
  box-shadow: 0 0 10px rgba(119, 119, 119, .55);
}

.al-layer {
  grid-template-columns: 8px minmax(48px, .8fr) minmax(0, 1fr);
}

.al-layer small {
  grid-column: 2 / -1;
}

.al-layer[data-state="READY"]::before,
.al-layer[data-state="LIVE"]::before,
.al-layer[data-state="OK"]::before,
.al-layer[data-state="RUNNING"]::before {
  background: #1fe36f;
  box-shadow: 0 0 12px rgba(31, 227, 111, .8);
}

.al-layer[data-state="READY"] strong,
.al-layer[data-state="LIVE"] strong,
.al-layer[data-state="OK"] strong,
.al-layer[data-state="RUNNING"] strong {
  color: #61f29a;
}

.al-layer[data-state="STALE"]::before,
.al-layer[data-state="UNKNOWN"]::before {
  background: #ffd978;
  box-shadow: 0 0 12px rgba(255, 217, 120, .7);
}

.al-layer[data-state="STALE"] strong,
.al-layer[data-state="UNKNOWN"] strong {
  color: #ffd978;
}

.al-layer[data-state="ERROR"]::before,
.al-layer[data-state="OFFLINE"]::before,
.al-layer[data-state="DISCONNECTED"]::before {
  background: #ff4b3e;
  box-shadow: 0 0 12px rgba(255, 75, 62, .7);
}

.al-layer[data-state="ERROR"] strong,
.al-layer[data-state="OFFLINE"] strong,
.al-layer[data-state="DISCONNECTED"] strong {
  color: #ff6d62;
}

.al-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.al-card {
  border: 1px solid rgba(245, 180, 49, .28);
  border-radius: 24px;
  background: #000;
  box-shadow: inset 0 0 40px rgba(245, 180, 49, .035);
}

.al-card {
  padding: 18px;
}

.al-card-compact {
  padding: 10px 12px;
}

.al-card h2 {
  margin: 0 0 16px;
  color: #ffd978;
  font-size: 21px;
}

.al-card-compact h2 {
  margin-bottom: 6px;
  font-size: 16px;
}

.al-metrics span {
  color: #cfc4ad;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.al-metrics {
  display: grid;
  gap: 10px;
}

.al-card-compact .al-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.al-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245, 180, 49, .13);
}

.al-card-compact .al-metrics div {
  align-items: baseline;
  gap: 7px;
  min-height: 27px;
  padding: 4px 0;
}

.al-metrics div:last-child {
  border-bottom: 0;
}

.al-metrics strong {
  color: #fff7df;
  text-align: right;
  overflow-wrap: anywhere;
}

.al-card-compact .al-metrics span {
  font-size: 10px;
}

.al-card-compact .al-metrics strong {
  font-size: 15px;
  line-height: 1.15;
}

.al-chart-card {
  margin: 18px 0;
}

.al-chart-card canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(245, 180, 49, .16);
  border-radius: 18px;
  background: #000;
}

.al-table-wrap {
  overflow-x: hidden;
}

.al-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.al-table th,
.al-table td {
  padding: 8px 7px;
  border-bottom: 1px solid rgba(245, 180, 49, .14);
  color: #d8cfbd;
  text-align: left;
  vertical-align: top;
}

.al-table th {
  color: #ffd978;
  font-size: 12px;
  text-transform: uppercase;
}

.al-score-freshness {
  display: inline-flex;
  margin: -4px 0 12px;
  padding: 6px 9px;
  border: 1px solid rgba(245, 180, 49, .24);
  border-radius: 999px;
  color: #bdb29a;
  background: rgba(245, 180, 49, .055);
  font-size: 12px;
  font-weight: 800;
}

.al-card[data-role="scores-section"][data-eval-state="STALE"] {
  border-color: rgba(255, 75, 62, .58);
  box-shadow: inset 0 0 40px rgba(255, 75, 62, .055);
}

.al-card[data-role="scores-section"][data-eval-state="STALE"] .al-score-freshness {
  color: #ff8178;
  border-color: rgba(255, 75, 62, .58);
  background: rgba(255, 75, 62, .09);
}

.al-decision {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff7df;
  background: rgba(245, 180, 49, .12);
  border: 1px solid rgba(245, 180, 49, .22);
  font-size: 12px;
  font-weight: 900;
}

.al-decision[data-decision="NO_TRADE"] {
  color: #ffd978;
}

.al-decision[data-decision="BUY"],
.al-decision[data-decision="SELL"] {
  color: #61f29a;
}

.al-score-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.al-score-card.al-score-blocked {
  padding: 8px;
  border: 1px solid rgba(255, 217, 120, .52);
  border-left: 4px solid #ffd978;
  border-radius: 12px;
  background: rgba(255, 217, 120, .08);
  box-shadow: 0 0 18px rgba(255, 217, 120, .11);
}

.al-score-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  color: #fff7df;
  font-size: 14px;
  font-weight: 800;
}

.al-score-time {
  color: #ffd978;
  font-variant-numeric: tabular-nums;
}

.al-score-alert {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(255, 217, 120, .55);
  border-radius: 999px;
  color: #ffd978;
  background: rgba(255, 217, 120, .12);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.al-score-reason {
  color: #d8cfbd;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.al-empty {
  color: #bdb29a;
  font-size: 13px;
}

.al-rejection-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 75, 62, .34);
  border-left: 4px solid #ff4b3e;
  border-radius: 12px;
  background: rgba(255, 75, 62, .055);
}

.al-rejection-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #fff7df;
  font-size: 13px;
  font-weight: 900;
}

.al-rejection-top strong[data-direction="BUY"] {
  color: #61f29a;
}

.al-rejection-top strong[data-direction="SELL"] {
  color: #ff8178;
}

.al-rejection-reason {
  color: #ffd978;
  font-size: 12px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.al-rejection-context {
  color: #bdb29a;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.al-accepted-card {
  border-color: rgba(31, 227, 111, .34);
  background: rgba(31, 227, 111, .045);
}

.al-accepted-card .al-rejection-reason {
  color: #8cffb6;
}

.al-accepted-pnl {
  color: #d8cfbd;
  font-size: 12px;
  font-weight: 900;
}

.al-accepted-pnl[data-pnl="positive"] {
  color: #61f29a;
}

.al-accepted-pnl[data-pnl="negative"] {
  color: #ff6d62;
}

.al-accepted-pnl[data-pnl="open"] {
  color: #ffd978;
}

.al-footer {
  margin-top: 18px;
  color: #9f9580;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .al-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .aureus-live {
    width: min(100% - 16px, 1500px);
  }

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

  .al-layer-block {
    padding: 12px;
    border-radius: 14px;
  }

  .al-layer-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .al-layer-head span {
    text-align: left;
  }

  .al-layer {
    grid-template-columns: 8px minmax(40px, .7fr) minmax(0, 1fr);
    padding: 8px;
  }

  .al-layer span,
  .al-layer strong,
  .al-layer small {
    font-size: 10px;
  }

  .al-grid {
    gap: 8px;
    margin: 10px 0;
  }

  .al-card-compact {
    padding: 9px 11px;
    border-radius: 16px;
  }

  .al-card-compact h2 {
    margin-bottom: 5px;
    font-size: 15px;
  }

  .al-card-compact .al-metrics {
    gap: 0 10px;
  }

  .al-card-compact .al-metrics div {
    min-height: 25px;
    padding: 3px 0;
  }

  .al-card-compact .al-metrics span {
    font-size: 9px;
  }

  .al-card-compact .al-metrics strong {
    font-size: 14px;
  }

  .al-table thead {
    display: none;
  }

  .al-table th,
  .al-table td {
    padding: 12px 6px;
  }

  .al-score-top {
    gap: 7px 9px;
    font-size: 13px;
  }

  .al-score-reason {
    font-size: 11px;
  }

  .al-rejection-card {
    padding: 9px;
  }

  .al-rejection-top,
  .al-rejection-reason {
    font-size: 11px;
  }

  .al-rejection-context {
    font-size: 10px;
  }
}
