:root {
  --bg: #050806;
  --bg2: #08130e;
  --panel: rgba(12, 24, 18, .82);
  --panel-solid: #0d1a14;
  --panel2: rgba(16, 35, 26, .72);
  --line: rgba(226, 255, 238, .10);
  --line-strong: rgba(207, 177, 94, .30);
  --text: #f6fff9;
  --muted: #98aa9f;
  --muted2: #708177;
  --accent: #3cf184;
  --accent-deep: #127842;
  --gold: #d7b66a;
  --gold2: #9b7839;
  --danger: #ff6475;
  --warn: #ffc85a;
  --ok: #57f19b;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
  --shadow-soft: 0 12px 40px rgba(0,0,0,.28);
  --radius: 24px;
  --radius-sm: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 12% -8%, rgba(60, 241, 132, .18), transparent 34%),
    radial-gradient(circle at 88% 6%, rgba(215, 182, 106, .12), transparent 32%),
    linear-gradient(180deg, #050806 0%, #07110d 50%, #030504 100%);
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .42;
  background-image:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at top, black 0%, transparent 74%);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.app { width: min(1280px, 100%); margin: 0 auto; padding: 22px 18px 56px; }
.header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(5, 10, 7, .72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(60,241,132,.24), rgba(215,182,106,.22)),
    radial-gradient(circle at 70% 18%, rgba(255,255,255,.18), transparent 22%),
    #0c1913;
  border: 1px solid rgba(215,182,106,.32);
  box-shadow: 0 0 0 1px rgba(60,241,132,.08), 0 20px 42px rgba(0,0,0,.38);
  font-weight: 950;
  letter-spacing: -.04em;
  color: var(--gold);
}
.logo::after { content: '♠'; position: absolute; right: 6px; bottom: -7px; color: rgba(255,255,255,.08); font-size: 32px; }
.brand h1 { margin: 0; font-size: clamp(23px, 3.2vw, 38px); letter-spacing: .02em; line-height: 1; }
.brand p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .pill {
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  border-radius: 999px;
  color: var(--muted);
  transition: .18s ease;
}
.nav a:hover, .pill:hover { transform: translateY(-1px); border-color: rgba(60,241,132,.28); color: var(--text); }
.nav a.active { color: var(--text); background: linear-gradient(135deg, rgba(60,241,132,.18), rgba(215,182,106,.10)); border-color: rgba(60,241,132,.36); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.070), rgba(255,255,255,.026)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  opacity: .6;
}
.card.compact { padding: 14px; }
.card h2, .card h3 { margin: 0 0 12px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.subtle { color: var(--muted2); }
.hero {
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 85% 16%, rgba(215,182,106,.18), transparent 28%),
    radial-gradient(circle at 15% 18%, rgba(60,241,132,.20), transparent 35%),
    linear-gradient(135deg, rgba(18,42,31,.92), rgba(8,15,11,.92));
  border-color: rgba(215,182,106,.18);
}
.hero h2 { font-size: clamp(28px, 4.5vw, 54px); line-height: .96; margin: 12px 0 12px; }
.hero p { max-width: 780px; }
.hero-kicker { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 22px 2px 12px; }
.section-title h2 { margin: 0; font-size: 22px; }
.section-title p { margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.stat {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.050), rgba(0,0,0,.13));
  min-height: 112px;
}
.stat .num { font-size: clamp(25px, 3.4vw, 38px); font-weight: 950; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat .label { color: var(--muted); font-size: 13px; margin-top: 8px; }
.stat.gold .num { color: var(--gold); }
.table-wrap { width: 100%; overflow: auto; border-radius: 18px; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.18); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(60,241,132,.035); }
.form { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .input, .row > select, .row > textarea { flex: 1 1 170px; }
.input, select, textarea {
  width: 100%;
  color: var(--text);
  background: rgba(0,0,0,.26);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input:focus, select:focus, textarea:focus { border-color: rgba(60,241,132,.58); box-shadow: 0 0 0 4px rgba(60,241,132,.08); }
.btn {
  color: #031107;
  background: linear-gradient(135deg, var(--accent), #28bf68);
  padding: 12px 15px;
  border-radius: 15px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(60,241,132,.16);
  transition: .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn.secondary { color: var(--text); background: rgba(255,255,255,.065); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, var(--danger), #c7384a); color: white; }
.btn.warn { background: linear-gradient(135deg, var(--warn), #d79c21); color: #1c1200; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(60,241,132,.12);
  color: var(--accent);
  border: 1px solid rgba(60,241,132,.25);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .01em;
}
.badge.gold { background: rgba(215,182,106,.13); color: var(--gold); border-color: rgba(215,182,106,.29); }
.badge.red { background: rgba(255,100,117,.12); color: var(--danger); border-color: rgba(255,100,117,.28); }
.badge.gray { background: rgba(255,255,255,.06); color: var(--muted); border-color: var(--line); }
.badge.big { font-size: 14px; padding: 8px 12px; }
.list { display: grid; gap: 10px; }
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
}
.item strong { display: block; }
.item small { color: var(--muted); display: block; margin-top: 4px; }
.avatar {
  width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(60,241,132,.20), rgba(215,182,106,.16));
  border: 1px solid rgba(255,255,255,.10); color: var(--gold); font-weight: 950;
}
.rank-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.rank-number { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 950; color: var(--accent); background: rgba(60,241,132,.11); border: 1px solid rgba(60,241,132,.20); }
.rank-number.gold { color: #1b1200; background: linear-gradient(135deg, #ffe29a, #c99a40); border-color: rgba(255,226,154,.35); }
.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.step { padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.14); }
.step b { display: block; color: var(--text); margin-bottom: 4px; }
.step small { color: var(--muted); }
.empty { padding: 20px; border-radius: 18px; border: 1px dashed rgba(255,255,255,.16); color: var(--muted); background: rgba(0,0,0,.12); }
.screen { min-height: 100vh; width: min(1480px, 100%); margin: 0 auto; padding: 32px; }
.screen .big { font-size: clamp(42px, 7vw, 96px); font-weight: 950; line-height: .92; letter-spacing: -.05em; }
.screen .clock { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 950; font-size: clamp(26px, 4vw, 48px); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 30; padding: 14px 16px; border-radius: 18px; background: #10221a; border: 1px solid rgba(60,241,132,.22); box-shadow: var(--shadow); display: none; }
.toast.show { display: block; animation: toast-in .22s ease-out; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
@media (max-width: 920px) {
  .header { align-items: flex-start; flex-direction: column; position: static; }
  .nav { justify-content: flex-start; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .stats, .workflow { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .table { font-size: 14px; }
}
@media (max-width: 540px) {
  .app { padding: 14px 10px 34px; }
  .card { padding: 16px; border-radius: 20px; }
  .logo { width: 46px; height: 46px; }
  .nav a { padding: 9px 12px; }
  .table th, .table td { padding: 11px 10px; }
}
