/* Atlas1: approved Graphite / Charcoal Blue / Pacific Cyan / Orange / Green palette.
   Keeps the existing HTML / HTMX components and their data contracts. */
:root {
  color-scheme: dark;
  --bg: #090B0B;
  --bg-2: #202627;
  --card: #171C1D;
  --card-solid: #171C1D;
  --card-edge: #2A3031;
  --card-hover: #454F51;
  --text: #edf2f3;
  --text-2: #c3cdd0;
  --muted: #b5bfc9;
  --accent: #048BA8;
  --accent-dim: #163f4c;
  --accent-2: #F18F01;
  --accent-2-dim: #4b3c2c;
  --whale: #F18F01;
  --win: #99C24D;
  --volume: #F18F01;
  --chart: #F18F01;
  --loss: #F18F01;
  --warn: #F18F01;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 6px;
  --radius-sm: 4px;
  --glass-blur: 0px;
  --glow-mint: none;
  --glow-blue: none;
}
body { font-size: 13px; }
body::before, body::after, .topbar::before { display: none; }
button, input, select { font-family: var(--font-body); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.atlas-sidebar {
  width: 210px; position: fixed; inset: 0 auto 0 0; z-index: 110;
  display: flex; flex-direction: column; padding: 25px 14px 20px;
  background: #2F2D2E; border-right: 1px solid var(--card-edge);
}
.sidebar-brand { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 0 10px 26px; font-size: 21px; font-weight: 650; letter-spacing: -.8px; }
.atlas-mark { display: grid; place-items: center; width: 27px; height: 29px; background: #048BA8; border: 1px solid #048BA8; color: var(--accent); font-size: 17px; border-radius: 5px; }
.sidebar-edition { width: 100%; padding-left: 36px; font-size: 8px; letter-spacing: 1.6px; color: var(--muted); margin-top: -7px; }
.sidebar-section-label { margin: 18px 12px 9px; font-size: 10px; font-weight: 600; color: #b5bfc9; text-transform: uppercase; letter-spacing: 1.2px; }
.sidebar-links { display: grid; gap: 4px; }
.sidebar-links a { display: flex; gap: 12px; align-items: center; min-height: 39px; padding: 9px 12px; border: 1px solid transparent; border-radius: 5px; color: var(--text-2); font-size: 12px; }
.sidebar-links a > span { width: 18px; text-align: center; font-size: 17px; color: var(--muted); }
.sidebar-links a:hover { background: var(--bg-2); color: var(--text); }
.sidebar-links a[aria-current='page'] { background: #048BA8; border-color: #048BA8; color: var(--accent); }
.sidebar-links a[aria-current='page'] > span { color: var(--accent); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--card-edge); padding: 18px 10px 0; font-size: 10px; color: var(--muted); line-height: 1.8; }
.sidebar-footer-label { letter-spacing: 1.2px; font-size: 8px; }
.sidebar-footer p { color: var(--text-2); font-size: 11px; }
body:has(.atlas-sidebar) .topbar { margin-left: 210px; padding: 0 30px; background: #2F2D2E; height: 62px; backdrop-filter: none; gap: 14px; }
body:has(.atlas-sidebar) main { margin-left: 210px; max-width: none; padding: 28px 30px 60px; }
.topbar .logo { font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.topbar .nav { margin-right: auto; }
.nav-link, .workspace-pill-btn, .topbar-search input, .tab, .btn, .btn-sm, .window-pill { border-radius: 4px; }
.workspace-pill-btn { background: var(--card); }
.workspace-icon { color: var(--accent); }
.topbar-search input { background: var(--card); font-size: 12px; }
.overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.overview-eyebrow { font-size: 9px; color: var(--muted); letter-spacing: 1.7px; margin-bottom: 10px; }
.overview-heading h1 { font-size: 29px; letter-spacing: -1.1px; font-weight: 600; line-height: 1.25; }
.overview-title-dot { color: var(--accent); }
.overview-heading p { margin-top: 9px; color: var(--muted); font-size: 12px; }
.overview-source-link { display: flex; gap: 18px; align-items: center; padding: 10px 13px; border: 1px solid var(--card-edge); border-radius: 4px; background: var(--card); color: var(--text-2); font-size: 11px; white-space: nowrap; }
.overview-source-link:hover { border-color: #048BA8; color: var(--accent); }
.card, .kpi, .casino-card, .auth-card { background: var(--card); box-shadow: none; backdrop-filter: none; border-radius: 6px; }
.card::before, .kpi::before, .casino-card::before { display: none; }
.kpi { padding: 17px 18px; border-top: 2px solid #58697d; }
.kpi:nth-child(2) { border-top-color: #F18F01; }
.kpi:nth-child(3) { border-top-color: #99C24D; }
.kpi:has(.win) { border-top-color: #99C24D; }
.kpi:has(.loss) { border-top-color: #a14e63; }
.kpi:hover, .casino-card:hover { transform: none; }
.kpi-label { font-size: 10px; letter-spacing: .35px; text-transform: none; color: #aab8be; }
.kpi-value { font-family: var(--font-body); font-weight: 550; font-size: 25px; letter-spacing: -.9px; margin-top: 9px; }
.kpi-section { margin-bottom: 22px; }
.kpi-section-head { margin-bottom: 10px; }
.kpi-section-head h3 { text-transform: none; font-size: 12px; letter-spacing: 0; font-weight: 600; }
.kpi-section-window { font-family: var(--font-body); font-size: 9px; letter-spacing: .7px; margin-left: auto; }
.kpi-pulse { background: #2E4057; border-color: #4b5c70; border-radius: 5px; box-shadow: none; }
.kpi-pulse-dot { box-shadow: none; }
.card-head { background: #35485f; border-bottom: 1px solid var(--card-edge); padding: 14px 17px; }
.card-head h2 { font-size: 13px; font-weight: 600; letter-spacing: -.2px; text-transform: none; }
table th { background: #28394d; color: #c2cbd4; }
table td { border-bottom-color: #43556b; }
.table-scroll { scrollbar-color: #718095 #2F2D2E; }
.amt-pill { border-radius: 3px; }
.chart-bar { fill: #F18F01; }
.ccy-mix-bar { border-radius: 3px; height: 8px; }
.ccy-mix-seg, .ccy-mix-swatch { background: #718095; }
.ccy-usdt { background: #99C24D; }
.ccy-usdc { background: #048BA8; }
.ccy-btc { background: #F18F01; }
.ccy-eth { background: #b8c7d9; }
.ccy-sol { background: #72bac9; }
.ccy-xrp { background: #c3d69d; }
.ccy-shfl { background: #edb767; }
.ccy-dai { background: #d8ceba; }
.ccy-mix-chip { border-radius: 3px; }
.casino-card { border-color: var(--card-edge); }
.casino-card.active { border-color: #048BA8; }
@media (min-width: 1600px) { body:has(.atlas-sidebar) main { padding: 30px 40px 60px; } }
@media (max-width: 1100px) {
  .atlas-sidebar { width: 175px; }
  body:has(.atlas-sidebar) .topbar { margin-left: 175px; padding: 0 18px; }
  body:has(.atlas-sidebar) main { margin-left: 175px; padding: 23px 18px 50px; }
  .topbar-search { width: 180px; }
  .topbar .logo { display: none; }
}
@media (max-width: 800px) {
  .atlas-sidebar { display: none; }
  body:has(.atlas-sidebar) .topbar { margin-left: 0; height: auto; min-height: 58px; padding: 12px 16px; flex-wrap: wrap; }
  body:has(.atlas-sidebar) main { margin-left: 0; padding: 24px 16px 45px; }
  .topbar .logo { display: block; }
  .topbar-search { width: 100%; }
  .overview-heading { align-items: flex-start; }
  .overview-heading h1 { font-size: 25px; }
  .overview-source-link { font-size: 10px; padding: 8px; gap: 8px; }
  .kpi-value { font-size: 22px; }
}
@media (max-width: 480px) {
  .overview-heading { flex-direction: column; gap: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 13px; min-width: 0; }
  .kpi-pulse { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Semantic colors stay consistent across the existing components. */
.atlas-mark { color: #fff; }
.sidebar-links a[aria-current='page'], .sidebar-links a[aria-current='page'] > span { color: #fff; }
.kpi-value.win, .win { color: var(--win); }
.kpi:nth-child(3) { border-top-color: var(--accent); }
.overview-title-dot, .logo-dot { color: #F18F01; }
.overview-source-link { background: #048BA8; color: #fff; border-color: #048BA8; }
.overview-source-link:hover { background: #07788f; color: #fff; }
.kpi-pulse-dot { background: var(--win); }
.sidebar-links a:not([aria-current='page']):hover { color: #fff; }

/* Reference layout: quiet neutral surfaces, tightly set masonry-like columns.
   The five supplied colors are accents, not the background palette. */
:root {
  --text: #e2e6e6; --text-2: #b9c1c2; --muted: #899496;
  --row-flash: rgb(4 139 168 / 10%);
  --row-live-bg: rgb(153 194 77 / 4%);
}
.atlas-sidebar { width: 155px; background: #0e1010; padding: 21px 10px 16px; }
.sidebar-brand { font-size: 18px; padding: 0 5px 21px; gap: 7px; }
.sidebar-edition { font-size: 7px; letter-spacing: 1px; }
.sidebar-section-label { font-size: 9px; margin-left: 7px; }
.sidebar-links a { font-size: 11px; gap: 8px; padding: 8px; min-height: 34px; }
.sidebar-links a[aria-current='page'] { background: #202627; border-color: #313a3c; color: #e2e6e6; }
.sidebar-links a[aria-current='page'] > span { color: #048BA8; }
.sidebar-footer { padding: 13px 4px 0; font-size: 9px; }
.sidebar-footer p { font-size: 10px; }
body:has(.atlas-sidebar) .topbar { margin-left: 155px; height: 49px; padding: 0 24px; background: #090B0B; border-bottom-color: #1c2122; }
body:has(.atlas-sidebar) main { margin-left: 155px; padding: 22px 26px 50px; }
.topbar .logo { display: none; }
.nav-link { font-size: 11px; padding: 6px 10px; }
.overview-heading { margin-bottom: 16px; }
.overview-eyebrow { display: none; }
.overview-heading h1 { font-size: 19px; letter-spacing: -.5px; }
.overview-heading p { font-size: 11px; margin-top: 4px; }
.overview-source-link { padding: 7px 12px; font-size: 10px; }
#kpi-pulse .kpi-pulse { margin-bottom: 22px; padding: 9px 12px; background: #141819; border: 1px solid #252c2d; }
.atlas-board { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 24px; align-items: start; }
.board-column { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.board-column-wide { grid-column: span 2; }
.atlas-board .kpi-section, .atlas-board .card {
  margin: 0; min-width: 0; padding: 17px 15px; overflow: hidden;
  background: linear-gradient(155deg,#191e1f 0%,#171c1d 65%,#181e20 100%);
  border: 1px solid #202627; border-radius: 6px; box-shadow: none;
}
.atlas-board .kpi-section-head { display: block; margin: 0 0 18px; padding: 0; }
.atlas-board .kpi-section-head h3 { font-size: 12px; font-weight: 550; color: #d9dede; }
.atlas-board .kpi-section-window { display: block; font-size: 10px; margin: 4px 0 0; text-transform: none; letter-spacing: 0; color: var(--muted); }
.atlas-board .kpis, .atlas-board .kpis.kpis-6 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.atlas-board .kpi { padding: 11px 10px; border: 1px solid #292f30; border-radius: 4px; background: #202627; }
.atlas-board .kpi:first-child { padding: 0 0 13px; border: 0; border-bottom: 1px solid #293032; background: transparent; }
.atlas-board .kpi-label { font-size: 10px; color: #98a4a6; letter-spacing: 0; }
.atlas-board .kpi-value { font-size: 20px; font-weight: 500; margin-top: 5px; letter-spacing: -.6px; }
.atlas-board .kpi:first-child .kpi-value { font-size: 27px; }
.atlas-board .card-head { padding: 0 0 15px; border: 0; background: transparent; gap: 10px; flex-wrap: wrap; }
.atlas-board .card-head h2 { font-size: 12px; letter-spacing: 0; font-weight: 550; }
.atlas-board .feed-status { font-size: 9px; white-space: normal; }
.atlas-board .table-scroll { max-height: 355px; overflow: auto; }
.atlas-board table { font-size: 10px; }
.atlas-board table td { padding: 9px 7px; border-bottom: 1px solid #283031; }
.atlas-board table th { padding: 7px; font-size: 8px; letter-spacing: .35px; background: transparent; border-bottom: 1px solid #303839; }
.atlas-board .td-player a, .atlas-board .player a { color: #d5dddd; }
.atlas-board .td-player a:hover, .atlas-board .player a:hover { color: #99C24D; }
.atlas-board .board-feed table { min-width: 480px; }
.atlas-board .board-whales table { min-width: 630px; }
.atlas-board .lb-controls { flex-wrap: wrap; gap: 6px; }
.atlas-board .rank-table .empty { white-space: normal; }
.atlas-board .ccy-mix { display: block; }
.currency-chart { display: none; }
.atlas-board .currency-chart { display: flex; gap: 7px; height: 165px; margin: 8px 0 18px; }
.currency-chart-column { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 9px; text-align: center; font: 8px var(--font-body); color: var(--muted); }
.currency-chart-track { flex: 1; display: flex; align-items: end; border-bottom: 1px solid #303839; }
.currency-chart-bar { width: 100%; min-height: 1px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg,#F18F01, #F18F01b3); transition: height .3s; }
.currency-chart-column:nth-child(2n) .currency-chart-bar { background: linear-gradient(180deg,#048BA8,#048BA8b3); }
.currency-chart-column:nth-child(3n) .currency-chart-bar { background: linear-gradient(180deg,#99C24D,#99C24Db3); }
.atlas-board .ccy-mix-bar { margin-bottom: 12px; height: 4px; }
.atlas-board .ccy-mix-legend { display: grid; grid-template-columns: 1fr; gap: 7px; }
.atlas-board .ccy-mix-chip { display: flex; padding: 0; border: 0; background: transparent; font-size: 10px; }
.atlas-board .ccy-mix-pct { margin-left: auto; }
.atlas-board .ccy-mix-swatch { width: 5px; height: 5px; }
.card, .casino-card, .auth-card { background: var(--card); }
.card-head, table th { background: #171c1d; }
#casino-strip-section { margin-top: 24px; }
.casino-card { background: linear-gradient(155deg,#191e1f,#171c1d); }
.overview-source-link, .atlas-mark { background: #048BA8; border-color: #048BA8; }
.ccy-usdt { background: #99C24D; }.ccy-usdc { background: #048BA8; }
.ccy-btc { background: #F18F01; }.ccy-eth { background: #2E4057; }
.ccy-sol { background: #048BA8; }.ccy-xrp { background: #99C24D; }
.ccy-shfl { background: #F18F01; }.ccy-dai { background: #2F2D2E; }
@media (max-width: 1900px) {
  .atlas-board { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
  .board-column { gap: 18px; }
}
@media (max-width: 1250px) {
  .atlas-board { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .board-column-wide { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 900px) {
  .atlas-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .board-column-wide { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 800px) {
  body:has(.atlas-sidebar) .topbar { margin-left: 0; height: auto; padding: 10px 16px; }
  body:has(.atlas-sidebar) main { margin-left: 0; padding: 20px 16px 40px; }
  .topbar .logo { display: block; }
}
@media (max-width: 480px) {
  .atlas-board { grid-template-columns: minmax(0,1fr); }
  .board-column-wide { grid-column: auto; }
  .atlas-board .kpis, .atlas-board .kpis.kpis-6 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .atlas-board .kpi:first-child { grid-column: 1 / -1; }
}
/* Override legacy currency-brand gradients with the approved accent palette. */
.ccy-btc, .ccy-doge, .ccy-bnb, .ccy-shfl { background: #F18F01 !important; }
.ccy-usdc, .ccy-sol, .ccy-ton, .ccy-ada { background: #048BA8 !important; }
.ccy-usdt, .ccy-bch, .ccy-xrp { background: #99C24D !important; }
.ccy-eth, .ccy-trx, .ccy-matic, .ccy-pol { background: #2E4057 !important; }
.ccy-ltc, .ccy-dai, .ccy-other { background: #2F2D2E !important; }
.td-payout.win, tr.win-row .td-payout, .amount.win { color: var(--win); }
/* Unified navigation matching the compact reference panel. */
.atlas-sidebar { inset: 61px auto 16px 12px; width: 145px; padding: 14px 9px; border: 1px solid #252a2b; border-radius: 10px; }
.sidebar-brand { font-size: 16px; padding-bottom: 18px; }
.sidebar-links svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
.sidebar-links a { border: 1px solid #282f30; background: #171b1c; margin-bottom: 3px; min-height: 40px; border-radius: 5px; }
.sidebar-links a[aria-current='page'] { border-color: #3d494b; background: linear-gradient(135deg,#252d2e,#1e2526); box-shadow: inset 2px 0 #048BA8; }
.sidebar-links a[aria-current='page'] svg { color: #048BA8; }
.sidebar-section-label { margin: 17px 5px 9px; text-transform: none; letter-spacing: 0; color: #929c9e; font-weight: 450; }
.sidebar-settings { margin-top: auto; padding-top: 24px; }
.sidebar-footer { margin-top: 14px; }
body:has(.atlas-sidebar) .topbar { margin-left: 0; padding: 0 22px; gap: 18px; height: 46px; }
body:has(.atlas-sidebar) main { margin-left: 169px; }
.topbar .logo { display: block; min-width: 129px; font-size: 13px; font-weight: 600; letter-spacing: -.3px; color: var(--text); }
.shell-breadcrumb { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--muted); font-size: 11px; }
.shell-breadcrumb strong { font-weight: 450; color: var(--text-2); }
.breadcrumb-divider { color: #4b5658; }
.topbar-brand.workspace-pill { margin-left: 0; }
.workspace-pill-btn { padding: 7px 11px; background: #161b1c; border: 1px solid #2b3335; border-radius: 5px; font-size: 11px; }
.workspace-icon { font-size: 0; display: inline-flex; align-items: center; }
.workspace-icon::before { content: ''; display: block; width: 7px; height: 7px; border-radius: 2px; background: #048BA8; }
.topbar-search { width: 220px; }
.topbar-search input { border-radius: 5px; background: #161b1c; font-size: 11px; padding: 7px 11px; }
.topbar-logout { margin-left: 0; order: 5; }
.mobile-navigation { display: none; }
@media (max-width: 800px) {
  .atlas-sidebar { display: none; }
  body:has(.atlas-sidebar) main { margin-left: 0; }
  body:has(.atlas-sidebar) .topbar { height: auto; padding: 10px 14px; gap: 12px; }
  .topbar .logo { min-width: 0; margin-right: auto; }
  .shell-breadcrumb { display: none; }
  .mobile-navigation { display: block; position: relative; }
  .mobile-navigation summary { list-style: none; display: flex; align-items: center; gap: 7px; color: var(--text-2); cursor: pointer; font-size: 11px; }
  .mobile-navigation summary::-webkit-details-marker { display: none; }
  .mobile-navigation nav { position: absolute; right: 0; top: 29px; min-width: 180px; padding: 7px; background: #171c1d; border: 1px solid #333c3e; border-radius: 6px; box-shadow: 0 12px 25px #0006; z-index: 200; }
  .mobile-navigation nav a { display: block; padding: 10px; font-size: 12px; border-radius: 4px; }
  .mobile-navigation nav a:hover { background: #252d2e; }
  .topbar-search { width: 100%; }
}

/* Personal overview arrangement. Handles remain outside refreshed content. */
.customizable-board > [data-widget] { position: relative; min-width: 0; padding-top: 32px; }
.customizable-board > [data-widget="feed"], .customizable-board > [data-widget="whales"] { grid-column: span 2; }
.customizable-board > .layout-full-panel { grid-column: 1 / -1; }
.panel-drag-handle { position: absolute; top: 3px; right: 7px; width: 28px; height: 26px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: grab; touch-action: none; font-size: 20px; z-index: 2; }
.panel-drag-handle:hover, .panel-drag-handle:focus-visible { background: #2a3233; color: var(--accent); }
.panel-dragging { opacity: .55; outline: 1px dashed var(--accent); }
.panel-drop-target { outline: 2px solid var(--accent); outline-offset: 3px; }
.layout-toolbar { display: flex; align-items: center; gap: 14px; margin: 0 0 15px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.layout-toolbar > button { margin-left: auto; }
.layout-status { color: var(--win); }
@media(max-width:480px) {
  .customizable-board > [data-widget="feed"], .customizable-board > [data-widget="whales"] { grid-column: 1; }
}

.casino-arrange-item { position: relative; min-width: 0; }
.casino-arrange-item > .casino-card { height: 100%; padding-top: 32px; }
.casino-drag-handle { position: absolute; top: 3px; right: 7px; z-index: 3; width: 28px; height: 26px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 20px; cursor: grab; touch-action: none; }
.casino-drag-handle:hover, .casino-drag-handle:focus-visible { background: #2a3233; color: var(--accent); }

/* Individual casino cards now participate in the shared dashboard grid. */
.customizable-board > .dashboard-casino-panel { padding: 0; align-self: stretch; }
.dashboard-casino-panel > .casino-card { height: 100%; padding-top: 32px; }
#casino-strip-section .casino-strip[hidden] { display: none; }

/* Calm movement and a restrained cyan landing cue. */
.customizable-board > [data-widget] { transition: box-shadow 180ms ease, opacity 180ms ease, outline-color 180ms ease; }
.customizable-board > .panel-dragging { opacity: .65; box-shadow: 0 14px 32px #0005, 0 0 0 1px #048ba855; }
.customizable-board > .panel-drop-target { outline: 1px solid #048BA8; box-shadow: 0 0 0 4px #048ba81a; }
.panel-drag-handle:active { cursor: grabbing; }
.panel-settling { animation: panel-settle 520ms ease-out; }
@keyframes panel-settle {
  0%, 35% { box-shadow: 0 10px 28px #0004, 0 0 0 1px #048ba880; }
  100% { box-shadow: 0 0 0 #0000, 0 0 0 1px #048ba800; }
}
@media (prefers-reduced-motion: reduce) {
  .customizable-board > [data-widget] { transition: none; }
  .panel-settling { animation: none; }
}
