/* Coffee Beans — dark casino theme (mobile-first) */
:root {
  --bg: #0c0a0f;
  --bg-elev: #15121c;
  --bg-card: #1a1624;
  --gold: #d4af37;
  --gold-dim: #a8882a;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --text: #f5f0e8;
  --muted: #9a919a;
  --border: rgba(212, 175, 55, 0.22);
  --radius: 14px;
  --tab-h: 62px;
  --top-h: 56px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
img, video { max-width: 100%; height: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #1a0f1a 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--gold); text-decoration: none; }

.container { width: min(1100px, 100% - 24px); margin-inline: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #1a0a0a;
  border-color: transparent;
}
.btn-outline { background: transparent; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.text-muted { color: var(--muted); }
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.alert-error { background: rgba(192, 57, 43, 0.2); border: 1px solid var(--red); }
.alert-success { background: rgba(46, 204, 113, 0.15); border: 1px solid #2ecc71; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-success { background: #1e4d2b; color: #7dffb0; }
.badge-danger { background: #4d1e1e; color: #ff9a9a; }
.badge-warning { background: #4d3f1e; color: #ffd27d; }

/* Public layout */
.layout-public .public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 10, 15, 0.92);
  position: sticky;
  top: 0;
  z-index: 50;
}
.public-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.public-nav { display: flex; gap: 12px; align-items: center; }
.public-main { padding: 0 0 48px; max-width: none; margin: 0; }
.public-main--narrow { padding: 24px 16px 48px; max-width: 720px; margin: 0 auto; }
.public-main p, .public-main li { font-size: 1.05rem; line-height: 1.65; color: #ddd; }
.public-footer { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }

.landing-hero {
  text-align: center; padding: 48px 16px 56px;
  background: radial-gradient(ellipse at center, rgba(192,57,43,.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(212,175,55,.08) 0%, transparent 40%);
  border-bottom: 1px solid var(--border);
}
.landing-hero h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); margin: 0 0 12px; color: var(--text); }
.landing-hero .gold { color: var(--gold); }
.landing-hero .lead { max-width: 640px; margin: 0 auto 24px; color: var(--muted); font-size: 1.1rem; }
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.landing-section {
  padding: 40px 16px; max-width: 900px; margin: 0 auto;
  border-bottom: 1px solid rgba(212,175,55,.08);
}
.landing-section h2 { color: var(--gold); font-size: 1.45rem; margin: 0 0 14px; }
.landing-section h3 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--text); }
.landing-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.landing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
.landing-card strong { color: var(--gold); display: block; margin-bottom: 6px; }
.landing-faq details {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.landing-faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.landing-faq p { margin: 10px 0 0; color: var(--muted); font-size: .98rem; }
.landing-cta {
  text-align: center; padding: 48px 16px;
  background: linear-gradient(135deg, rgba(192,57,43,.15), rgba(212,175,55,.12));
}
.landing-winners { font-size: 14px; }
.landing-winners li { list-style: none; padding: 8px 0; border-bottom: 1px solid var(--border); }
.auth-card {
  max-width: 420px; margin: 32px auto; padding: 28px 22px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.auth-card h1 { margin: 0 0 8px; font-size: 1.35rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.telegram-widget-box { display: flex; justify-content: center; min-height: 52px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-header h2 { margin: 0; font-size: 1rem; color: var(--gold); }
.card-body { padding: 16px; }
.page-header { margin-bottom: 18px; }
.page-header h1 { margin: 0 0 6px; font-size: 1.4rem; }
.referral-link-box { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.referral-link-box input { flex: 1; min-width: 200px; }
.dash-cta-poker {
  display: block; text-align: center; padding: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--red) 0%, #8b0000 100%);
  border-radius: var(--radius); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.easy-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.easy-action-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.easy-todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.easy-todo-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.easy-todo-count { display: block; font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.easy-todo-card.has-work { border-color: var(--red-bright); }
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red); border-color: transparent; color: #fff; }
.btn-secondary { background: var(--bg-elev); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.admin-auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }

/* User shell */
.layout-user { padding-bottom: calc(var(--tab-h) + 12px); }
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(280px, 86vw);
  background: var(--bg-elev); border-right: 1px solid var(--border);
  transform: translateX(-102%); transition: transform .25s ease; z-index: 90;
  padding: 16px 12px;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sidebar .logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.sidebar-close, .menu-toggle {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 12px; color: var(--muted);
}
.nav-item.active, .nav-item:hover { background: rgba(212,175,55,.12); color: var(--text); }
.nav-logout { margin-top: 8px; color: var(--red-bright); }

.main-content { min-height: 100vh; }
.top-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; min-height: var(--top-h);
  border-bottom: 1px solid var(--border);
  background: rgba(12,10,15,.9); position: sticky; top: 0; z-index: 40;
}
.top-title { flex: 1; font-weight: 700; font-size: 15px; }
.balance-display {
  font-size: 13px; font-weight: 700; color: var(--gold);
  white-space: nowrap;
}
.page-content { padding: 16px; max-width: 960px; margin: 0 auto; }

.bottom-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg-elev); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); z-index: 70;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: var(--muted); padding-top: 6px;
}
.tab-item span { font-size: 18px; }
.tab-item.active { color: var(--gold); }

/* 3-col grids */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .pkg-grid { grid-template-columns: 1fr; }
}
.pkg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.pkg-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--gold); }

/* Poker */
.poker-page { display: flex; flex-direction: column; gap: 16px; }
.poker-hero h1 { margin: 0 0 6px; font-size: 1.5rem; }
.poker-balance { font-size: 14px; color: var(--muted); }
.poker-table-wrap { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.poker-table {
  background: radial-gradient(circle at center, #1b5e20 0%, #0d3d14 45%, #062510 100%);
  min-height: 280px; padding: 20px 14px; position: relative;
  box-shadow: inset 0 0 40px rgba(0,0,0,.45);
}
.poker-seat { text-align: center; margin: 8px 0; }
.poker-avatar {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--bg-card); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.poker-name { font-weight: 600; font-size: 14px; }
.poker-hand { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 8px 0; min-height: 52px; }
.poker-action { font-size: 12px; color: #c8f7c5; min-height: 18px; }
.poker-center { text-align: center; padding: 10px 0; }
.poker-status { font-size: 13px; color: #e8ffe8; }
.poker-pot { font-size: 12px; color: var(--gold); margin-top: 4px; }

.playing-card {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 36px; height: 50px; border-radius: 6px; background: #fff;
  font-size: 11px; font-weight: 700; box-shadow: 0 2px 4px rgba(0,0,0,.35);
}
.playing-card em { font-style: normal; line-height: 1; }
.playing-card i { font-style: normal; font-size: 14px; line-height: 1; }
.card-red { color: var(--red-bright); }
.card-black { color: #222; }
.card-back {
  background: repeating-linear-gradient(45deg, #8b0000, #8b0000 4px, #5c0000 4px, #5c0000 8px);
  border: 1px solid var(--gold-dim);
}

.poker-controls {
  position: sticky; bottom: calc(var(--tab-h) + 8px); z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(12,10,15,.94); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  backdrop-filter: blur(8px);
}
.poker-bets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.poker-bet-btn {
  flex: 1; min-width: 70px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  font-weight: 600; cursor: pointer;
}
.poker-bet-btn.selected { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.btn-play-poker { width: 100%; }

.winner-feed-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.winner-feed-panel h3 { margin: 0 0 10px; font-size: 1rem; }
.winner-feed-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.winner-feed-item { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.winner-feed-item strong { color: var(--gold); }

.poker-result-modal[hidden] { display: none !important; }
.poker-result-modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
}
.poker-result-modal.open { display: flex; }
.poker-result-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.poker-result-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 24px; max-width: 320px; width: 90%; text-align: center;
  transition: transform .35s ease, box-shadow .35s ease;
}
.poker-result-modal.is-win-celebration .poker-result-card {
  transform: scale(1.12);
  border-color: #ffd700;
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, .55),
    0 0 40px rgba(255, 215, 0, .45),
    0 0 80px rgba(255, 180, 0, .25),
    0 24px 48px rgba(0, 0, 0, .55);
  animation: win-card-pop .55s cubic-bezier(.2, 1.4, .4, 1);
}
.poker-result-modal.is-win-celebration .poker-result-card h2,
.poker-result-modal.is-win-celebration #pokerResultTitle {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: #ffd700;
  text-shadow: 0 0 18px rgba(255, 215, 0, .65), 0 2px 0 rgba(0, 0, 0, .4);
  letter-spacing: .02em;
}
.poker-confetti:not([hidden]) {
  position: absolute; inset: -20px; pointer-events: none; overflow: hidden;
}
.poker-result-modal.is-win-celebration .poker-confetti:not([hidden])::before,
.poker-result-modal.is-win-celebration .poker-confetti:not([hidden])::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, #ffd700 2px, transparent 2px),
    radial-gradient(circle, #ff6b6b 2px, transparent 2px),
    radial-gradient(circle, #4ecdc4 2px, transparent 2px);
  background-size: 24px 24px, 32px 32px, 28px 28px;
  animation: confetti-fall 2.5s linear infinite;
  opacity: .85;
}
@keyframes win-card-pop {
  0% { transform: scale(.72); opacity: 0; }
  60% { transform: scale(1.18); }
  100% { transform: scale(1.12); opacity: 1; }
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(120px) rotate(360deg); }
}
@keyframes pulse { 50% { opacity: .5; } }

.poker-daily-limit { font-size: 13px; color: var(--gold); margin-top: 6px; }
.poker-bet-modal {
  position: fixed; inset: 0; z-index: 180; display: none;
  align-items: center; justify-content: center;
}
.poker-bet-modal.open { display: flex; }
.poker-bet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.poker-bet-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 22px; width: min(360px, 92vw);
}
.poker-bet-card h3 { margin: 0 0 8px; }

.redeem-payout-display { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin: 0 0 12px; }

.admin-actions-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px;
}
.admin-detail-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px;
}
.admin-balance-form {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center;
}
.admin-balance-form input[type="number"] { flex: 1; min-width: 120px; max-width: 200px; }
@media (min-width: 900px) {
  .admin-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin — drawer sidebar (no chip-row nav) */
.layout-admin { min-height: 100vh; }
.admin-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80;
}
.admin-sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(280px, 86vw);
  background: var(--bg-elev); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .25s ease; z-index: 90;
  padding: 16px 12px; overflow-y: auto;
}
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 16px;
}
.admin-brand {
  color: var(--text); font-weight: 700; font-size: 14px;
  text-decoration: none; line-height: 1.3;
}
.admin-sidebar-close, .admin-menu-toggle {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer;
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
}
.admin-sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar-nav a {
  display: block; padding: 12px 14px; border-radius: 12px;
  color: var(--muted); font-size: 14px; text-decoration: none;
}
.admin-sidebar-nav a.active,
.admin-sidebar-nav a:hover {
  background: rgba(212,175,55,.12); color: var(--text);
}
/* Kill legacy chip-row / shell nav if any markup remains */
.admin-shell { display: block; }
.admin-nav {
  display: none !important;
  flex-wrap: nowrap !important;
}
.admin-frame { min-height: 100vh; min-width: 0; }
.admin-top {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; min-height: 52px;
  border-bottom: 1px solid var(--border);
  background: rgba(12,10,15,.9); position: sticky; top: 0; z-index: 40;
}
.admin-top-title {
  flex: 1; margin: 0; font-weight: 700; font-size: 15px;
  color: var(--text); line-height: 1.3;
}
.admin-main { padding: 20px 16px 40px; }
.admin-heading { margin: 0 0 16px; font-size: 1.35rem; color: var(--gold); }

/* Admin modals — centered popups (not bottom sheets) */
.layout-admin .pkg-modal {
  position: fixed; inset: 0; z-index: 100060;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.layout-admin .pkg-modal.open { display: flex; align-items: center; justify-content: center; }
.layout-admin .pkg-modal[hidden] { display: none !important; }
.layout-admin .pkg-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.65);
}
.layout-admin .pkg-modal-card {
  position: relative; z-index: 1; width: min(94vw, 420px);
  max-width: 420px; margin: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.layout-admin .pkg-modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap;
}
.layout-admin .admin-actions-bar .btn,
.layout-admin .admin-inline-actions .btn {
  white-space: nowrap;
}

@media (min-width: 900px) {
  .layout-admin {
    display: grid;
    grid-template-columns: 240px 1fr;
  }
  .layout-admin .admin-sidebar-overlay { display: none !important; }
  .layout-admin .admin-sidebar-close { display: none; }
  .layout-admin .admin-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
  }
  .layout-admin .admin-sidebar {
    position: sticky; top: 0; height: 100vh;
    width: 240px; transform: none;
    grid-column: 1; grid-row: 1;
    transition: transform .25s ease, width .25s ease, opacity .2s;
  }
  .layout-admin .admin-frame {
    grid-column: 2; min-width: 0;
  }
  body.layout-admin.admin-sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  body.layout-admin.admin-sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
    width: 0; min-width: 0; opacity: 0;
    pointer-events: none; overflow: hidden;
    border: none; padding: 0;
  }
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--gold); font-weight: 600; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
}

.admin-actions-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  margin-bottom: 20px !important;
}
.admin-actions-bar form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 !important;
}
.admin-detail-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  margin-bottom: 16px !important;
}
.admin-detail-grid .card {
  margin: 0;
}
.card-body p { margin: 0 0 10px; }
.admin-main .card,
.admin-panel .card {
  margin-bottom: 16px;
}
@media (min-width: 900px) {
  .admin-detail-grid { grid-template-columns: 1fr 1fr !important; }
}
.admin-balance-box { display: flex; flex-direction: column; gap: 12px; }
.admin-balance-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 0 !important;
}
.admin-balance-form input[type="number"] { flex: 1; min-width: 120px; }
.pkg-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}
.admin-row-actions,
td .admin-inline-actions,
.admin-inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn + .btn { margin-left: 0; } /* rely on parent gap */
.form-actions, .pkg-modal-actions, .poker-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

body.layout-user.sidebar-collapsed {
  grid-template-columns: 0 1fr !important;
}
body.layout-user.sidebar-collapsed .sidebar {
  transform: translateX(-100%) !important;
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  border: none !important;
  padding: 0 !important;
}

@media (min-width: 900px) {
  .layout-user .menu-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
  .layout-user .sidebar-close { display: none; }
  .layout-user .sidebar-overlay { display: none !important; }
  .layout-user .sidebar {
    transform: none; position: sticky; top: 0; height: 100vh;
    width: 260px; transition: transform .25s ease, width .25s ease, opacity .2s;
  }
  body.layout-user {
    display: grid;
    grid-template-columns: 260px 1fr;
    padding-bottom: 0;
  }
  body.layout-user.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) !important;
  }
  body.layout-user.sidebar-collapsed .sidebar {
    transform: translateX(-100%) !important;
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    border: none !important;
    padding: 0 !important;
  }
  .layout-user .bottom-tabs { display: none; }
  .layout-user .main-content { grid-column: 2; min-width: 0; }
  .layout-user .sidebar { grid-column: 1; grid-row: 1; }
  .poker-controls { bottom: 12px; }
}

/* Landing extras */
.landing-hero .eyebrow {
  letter-spacing: .12em; text-transform: uppercase; font-size: 12px;
  color: var(--gold); margin: 0 0 10px;
}
.landing-steps { padding-left: 1.2rem; color: var(--muted); line-height: 1.65; }
.landing-steps li { margin-bottom: 12px; }
.landing-steps strong { color: var(--text); }
.winner-ul { list-style: none; padding: 0; margin: 16px 0 0; }
.winner-ul li {
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); font-size: 14px;
}
.landing-faq details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
}
.landing-faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.landing-faq details p { color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.landing-cta {
  text-align: center; padding: 40px 16px 60px;
  background: radial-gradient(ellipse at center, rgba(212,175,55,.12), transparent 70%);
}
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.pkg-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.pkg-coins { color: var(--gold); font-size: 1.25rem; font-weight: 800; margin: 0; }
@media (max-width: 520px) {
  .pkg-card h3 { font-size: 12px; }
  .pkg-coins { font-size: 1.05rem; }
}

.easy-todo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}
.easy-todo-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; text-align: center; color: inherit; text-decoration: none;
  display: flex; flex-direction: column; gap: 6px;
}
.easy-todo-card.has-work { border-color: var(--gold); }
.easy-todo-count { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.page-header h1 { margin: 0 0 6px; font-size: 1.4rem; }
.page-header p { margin: 0; color: var(--muted); font-size: 14px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.card-header { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.card-header h2 { margin: 0; font-size: 1rem; }
.card-body { padding: 14px; }
.text-muted { color: var(--muted); }
.btn-block { display: block; width: 100%; text-align: center; }

/* —— Premium motion & onboarding —— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .06s; }
.reveal.delay-2 { transition-delay: .12s; }
.reveal.delay-3 { transition-delay: .18s; }
.reveal.delay-4 { transition-delay: .24s; }

.btn, .easy-action-tile, .community-btn, .dash-cta-poker, .tab-item {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.is-press { transform: scale(.97) !important; }

.btn-primary {
  box-shadow: 0 8px 22px rgba(212, 175, 55, .28);
  animation: cta-sheen 3.2s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes cta-sheen {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.balance-hero { letter-spacing: -.02em; }
.balance-hero-cur { font-size: .9rem; font-weight: 600; color: var(--muted); }

.next-step-card {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,.35);
  background: linear-gradient(135deg, rgba(26,22,36,.95), rgba(40,28,12,.9));
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.next-step-glow {
  position: absolute; inset: -40% -20% auto auto;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(212,175,55,.28), transparent 70%);
  pointer-events: none;
  animation: glow-drift 5s ease-in-out infinite;
}
@keyframes glow-drift {
  0%, 100% { transform: translate(0,0); opacity: .7; }
  50% { transform: translate(-12px, 10px); opacity: 1; }
}
.next-step-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(212,175,55,.15);
  border: 1px solid rgba(212,175,55,.3);
}
.next-step-label {
  margin: 0 0 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold);
}
.next-step-body h2 { margin: 0 0 6px; font-size: 1.1rem; }
.next-step-body p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.next-step-cta { min-width: 140px; }

.dash-lang-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.dash-lang-select {
  min-width: 140px;
  max-width: 55%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  margin-top: 8px;
}
.lang-option {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.lang-option.is-selected {
  border-color: var(--gold);
  background: rgba(212,175,55,.15);
}
.dash-clean .dash-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 22px !important;
  position: relative;
  z-index: 2;
}
.dash-clean .winner-feed-panel {
  display: block;
  clear: both;
  margin: 0 0 22px !important;
  padding: 14px;
  position: relative;
  z-index: 1;
}
.dash-clean .easy-action-tile {
  min-height: 72px;
}

.dash-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(212,175,55,.35);
  background: linear-gradient(145deg, rgba(36,28,18,.95), rgba(18,14,12,.95));
  color: inherit;
  text-decoration: none;
  min-height: 64px;
}
.dash-contact-btn:hover { border-color: var(--gold); }
.dash-contact-ico { font-size: 20px; flex-shrink: 0; }
.dash-contact-btn strong { display: block; font-size: 13px; color: var(--text); }
.dash-contact-btn em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.dash-contact-muted {
  opacity: .55;
  border-style: dashed;
  cursor: default;
}
.dash-contact-mgr { border-color: rgba(100,160,255,.35); }

.dash-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(80,180,120,.35);
  background: linear-gradient(135deg, rgba(20,40,28,.9), rgba(18,14,12,.95));
}
.dash-task-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-task-ico { font-size: 22px; }
.dash-task-left strong { display: block; font-size: 13px; }
.dash-task-left p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.dash-task-left b { color: var(--gold); }

.community-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
@media (min-width: 520px) {
  .community-row { grid-template-columns: repeat(3, 1fr); }
}
.community-btn {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  text-decoration: none;
}
.community-btn span { font-size: 18px; }
.community-btn strong { font-size: 13px; color: var(--text); }
.community-btn em { font-style: normal; font-size: 11px; color: var(--muted); }
.community-group { border-color: rgba(212,175,55,.4); }
.community-group:hover { box-shadow: 0 0 0 1px var(--gold); }

.dash-cta-poker {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; min-height: 52px;
  border-radius: 16px; font-weight: 800; font-size: 16px;
  color: #1a0a0a !important;
  background: linear-gradient(135deg, #f0c75e, #c9922e);
  box-shadow: 0 10px 28px rgba(201,146,46,.35);
  text-decoration: none;
}
.alert-pop { animation: alert-in .35s ease; }
@keyframes alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.onboard-overlay[hidden] { display: none !important; }
.onboard-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.72);
  opacity: 0; transition: opacity .3s ease;
}
.onboard-overlay.open { opacity: 1; }
.onboard-card {
  width: min(380px, 100%);
  background: linear-gradient(180deg, #241c14, #120e0c);
  border: 1px solid rgba(212,175,55,.4);
  border-radius: 20px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  transform: translateY(12px) scale(.98);
  transition: transform .35s ease;
}
.onboard-overlay.open .onboard-card { transform: none; }
.onboard-progress {
  height: 4px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  margin-bottom: 16px; overflow: hidden;
}
.onboard-progress i {
  display: block; height: 100%; width: 25%;
  background: linear-gradient(90deg, var(--gold), #f0c75e);
  border-radius: inherit;
  transition: width .3s ease;
}
.onboard-icon { font-size: 40px; margin-bottom: 8px; }
.onboard-card h3 { margin: 0 0 8px; color: var(--text); font-size: 1.25rem; }
.onboard-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.onboard-actions { display: flex; gap: 10px; }
.onboard-actions .btn { flex: 1; }

.nav-group { color: var(--gold) !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-primary { animation: none; }
  .next-step-glow { animation: none; }
}
