:root {
  --ink: #eef6ef;
  --muted: #8ca091;
  --bg: #07100b;
  --panel: #0d1911;
  --panel-2: #122219;
  --line: #21392a;
  --green: #5ee37e;
  --green-dark: #1f9d4c;
  --gold: #f2c94c;
  --red: #f06464;
  --blue: #70a5ff;
  --shadow: 0 20px 60px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px; background: #08140c; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; margin: 0 8px 30px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #07100b; font-weight: 900; font-size: 19px; background: radial-gradient(circle, #fff7b8 8%, var(--gold) 10% 34%, #a47b0c 36% 40%, #17271b 42% 54%, var(--gold) 56% 60%, #173720 62%); box-shadow: 0 0 0 3px #172a1d; }
.brand strong { display: block; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.nav { display: grid; gap: 5px; }
.nav a { padding: 11px 13px; border-radius: 10px; color: #9daf9f; display: flex; justify-content: space-between; align-items: center; }
.nav a:hover { background: #101e15; color: #fff; }
.nav a.active { background: #173921; color: var(--green); font-weight: 750; }
.nav .count { font-size: 10px; min-width: 22px; padding: 2px 6px; text-align: center; border-radius: 999px; background: #21352a; color: var(--gold); }
.sidebar-footer { margin-top: auto; padding: 14px 10px 2px; color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(7,16,11,.9); position: sticky; top: 0; backdrop-filter: blur(12px); z-index: 20; }
.topbar h1 { margin: 0; font-size: 20px; }
.topbar .spacer { flex: 1; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(94,227,126,.1); }
.content { padding: 28px 32px 50px; max-width: 1500px; margin: auto; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.hero-row h2 { font-size: 28px; letter-spacing: -.04em; margin: 0 0 5px; }
.hero-row p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric { padding: 18px; background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.metric small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.metric strong { display: block; font-size: 27px; margin-top: 8px; letter-spacing: -.04em; }
.metric .trend { margin-top: 5px; color: var(--green); font-size: 11px; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.panel-header { display: flex; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 14px; }
.panel-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.panel-header .spacer { flex: 1; }
.panel-body { padding: 18px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid rgba(33,57,42,.65); vertical-align: middle; white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.018); }
tbody tr:last-child td { border-bottom: 0; }
.player-cell { display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #1d3324; color: var(--green); font-weight: 800; }
.player-cell strong { display: block; }
.player-cell small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.badge.green { color: var(--green); background: rgba(94,227,126,.09); }
.badge.gold { color: var(--gold); background: rgba(242,201,76,.09); }
.badge.red { color: #ff8585; background: rgba(240,100,100,.09); }
.badge.blue { color: var(--blue); background: rgba(112,165,255,.09); }
.button { border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; color: #dce8de; background: #14241a; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; justify-content: center; font-weight: 700; }
.button:hover { filter: brightness(1.14); }
.button.primary { border-color: #2baf56; background: var(--green-dark); color: white; }
.button.danger { border-color: #8f3333; background: #3a1717; color: #ff9a9a; }
.button.gold { border-color: #9c7b20; color: #ffe181; background: #30270d; }
.button.small { padding: 6px 9px; border-radius: 7px; font-size: 11px; }
.button.full { width: 100%; padding: 12px; }
.actions { display: flex; gap: 6px; align-items: center; }
.form-grid { display: grid; gap: 14px; }
.form-grid label { color: #aebcaf; display: grid; gap: 6px; font-size: 11px; font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea { width: 100%; border: 1px solid #294332; background: #08120c; color: white; border-radius: 9px; padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(31,157,76,.12); }
textarea { min-height: 80px; resize: vertical; }
hr { border: 0; border-top: 1px solid var(--line); width: 100%; }
.alert { border: 1px solid; padding: 11px 13px; border-radius: 10px; margin-bottom: 15px; }
.alert.success { color: #a0f5b7; background: #102b18; border-color: #255c34; }
.alert.danger { color: #ffaaaa; background: #2a1111; border-color: #683131; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.round-live { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.roulette-number { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: #d53c3c; border: 4px solid #f7e7b5; box-shadow: 0 0 0 5px #593f0d; font-size: 28px; font-weight: 900; }
.roulette-number.black { background: #121212; }
.roulette-number.green { background: #17883a; }
.round-info strong { display: block; font-size: 20px; }
.progress { height: 7px; background: #1c2d21; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-dark), var(--green)); width: var(--progress, 50%); }
.quick-list { display: grid; gap: 8px; }
.quick-item { padding: 11px 12px; border-radius: 10px; background: #0a140e; border: 1px solid #1d3023; display: flex; justify-content: space-between; gap: 10px; }
.quick-item small { color: var(--muted); display: block; }
.compact-live { margin-bottom: 18px; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; font-weight: 750; }
.connection-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.compact-live.offline .connection-state { color: var(--red); }
.compact-live-row, .overview-live-row { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }
.overview-live-row { grid-template-columns: 1fr auto; }
.compact-live-row > div:first-child small { color: var(--muted); letter-spacing: .1em; font-size: 10px; font-weight: 800; }
.compact-phase { display: block; margin: 2px 0 3px; color: var(--green); font-size: 22px; letter-spacing: -.025em; }
.compact-timer, .compact-result { min-width: 96px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #08120c; }
.compact-timer small, .compact-result small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.compact-timer b, .compact-result b { display: block; color: var(--gold); font: 800 20px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.live-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.live-meta .button { margin-left: auto; }
.live-meta b { color: #c9d6cc; }
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 18px; }
.filters { display: flex; gap: 8px; }
.filters input { width: 240px; }
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 20% 10%, #183d23, transparent 35%), #07100b; }
.install-shell { width: min(980px,100%); display: grid; grid-template-columns: 1fr 1fr; background: #0b1710; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 35px 100px rgba(0,0,0,.45); }
.brand-panel { padding: 54px; background: linear-gradient(150deg, rgba(24,70,37,.88), rgba(8,20,12,.95)); }
.eyebrow, .step-label { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.brand-panel h1 { font-size: 42px; line-height: 1.03; letter-spacing: -.055em; margin: 22px 0; }
.brand-panel h1 span { color: var(--gold); }
.brand-panel p { color: #adbaae; max-width: 390px; }
.feature-stack { margin-top: 40px; display: grid; gap: 12px; }
.feature-stack span::before { content: "✓"; color: var(--green); margin-right: 10px; }
.install-card { padding: 46px; }
.install-card h2 { font-size: 25px; margin: 8px 0 5px; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #1c9b47; font-size: 28px; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; }
.login-art { padding: 70px; display: flex; flex-direction: column; justify-content: end; background: radial-gradient(circle at 35% 28%, rgba(50,146,74,.42), transparent 28%), linear-gradient(135deg,#07100b,#0f2818); }
.login-art h1 { font-size: clamp(48px,7vw,96px); line-height: .88; letter-spacing: -.07em; margin: 0; max-width: 700px; }
.login-art h1 span { color: var(--gold); }
.login-form { padding: 50px; display: grid; place-items: center; border-left: 1px solid var(--line); }
.login-form form { width: min(370px,100%); }
.login-form h2 { font-size: 28px; margin-bottom: 5px; }
.mobile-nav { display: none; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .cards { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .content { padding: 20px 14px 40px; }
  .topbar { padding: 0 14px; }
  .cards { grid-template-columns: 1fr; }
  .install-shell, .login-shell { grid-template-columns: 1fr; }
  .brand-panel, .login-art { display: none; }
  .install-card, .login-form { padding: 28px; }
  .split { grid-template-columns: 1fr; }
  .hero-row { align-items: stretch; flex-direction: column; }
  .compact-live-row, .overview-live-row { grid-template-columns: 1fr 1fr; }
  .compact-live-row > div:first-child, .overview-live-row > div:first-child { grid-column: 1 / -1; }
  .filters { flex-wrap: wrap; }
  .filters input { width: 100%; }
}
