:root {
  --primary: #e65c00;
  --primary-dark: #c44d00;
  --secondary: #138808;
  --accent: #ff9933;
  --dark: #1a1a2e;
  --surface: #ffffff;
  --text-muted: #6c757d;
  --header-h: 56px;
  --footer-h: 64px;
}

body {
  background: #f0f2f5;
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

/* Header */
.teer-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  height: var(--header-h);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1050;
}

/* Bottom Nav */
.teer-bottom-nav {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--footer-h);
  padding: 6px 0 8px;
  z-index: 1050;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.teer-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  gap: 2px;
  position: relative;
  padding: 4px 10px;
  border-radius: 8px;
  transition: color 0.2s;
}

.teer-bottom-nav a i {
  font-size: 20px;
}

.teer-bottom-nav a.active,
.teer-bottom-nav a:hover {
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 4px;
  background: red;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Page Content */
.page-content {
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  padding: 12px;
}

/* Game Card */
.game-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.game-card-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 12px 16px;
  color: white;
}

.game-card-header h5 {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.game-card-body {
  padding: 12px 16px 16px;
}

/* Number Grid */
.number-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.num-btn {
  aspect-ratio: 1;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: #333;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.num-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: white;
  transform: scale(1.05);
}

.num-btn.selected {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  transform: scale(1.08);
}

/* Wallet Card */
.wallet-card {
  background: linear-gradient(135deg, var(--secondary), #1a7a12);
  color: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(19,136,8,0.3);
}

.wallet-card .balance {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.wallet-stat {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.wallet-stat .label {
  font-size: 11px;
  opacity: 0.8;
}

.wallet-stat .amount {
  font-size: 15px;
  font-weight: 700;
}

/* Section Card */
.section-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 16px;
  margin-bottom: 16px;
}

.section-card h6 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Tables */
.table-sm td, .table-sm th {
  font-size: 13px;
  vertical-align: middle;
}

/* Bet type tabs */
.bet-type-btn {
  flex: 1;
  border-radius: 8px !important;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-primary-teer {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary-teer:hover, .btn-primary-teer:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

/* Result badge */
.result-display {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 2px;
}

/* Status badges */
.badge.bg-pending { background: #fd7e14 !important; }

/* Login/Register Pages */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark), #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 0;
  padding-bottom: 0;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo h2 {
  font-weight: 800;
  color: var(--primary);
}

/* Admin Sidebar */
.admin-sidebar {
  width: 240px;
  background: var(--dark);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding-top: 0;
  overflow-y: auto;
  transition: transform 0.3s;
}

.admin-sidebar .sidebar-brand {
  padding: 18px 20px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 18px;
}

.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  border-radius: 0;
  transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}

.admin-sidebar .nav-link i {
  font-size: 17px;
  width: 22px;
}

.admin-main {
  margin-left: 240px;
  min-height: 100vh;
  background: #f0f2f5;
}

.admin-topbar {
  background: white;
  padding: 14px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-content {
  padding: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.stat-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-card .value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Mobile admin */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .admin-overlay.active {
    display: block;
  }
}

/* Toast */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 2000;
}

/* Common number grid */
.cn-grid {
  border-collapse: collapse;
  width: 100%;
}
.cn-grid td {
  border: 1px solid #dee2e6;
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}
.cn-grid td:first-child { background: var(--accent); color: white; }

/* Input styling */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,92,0,0.15);
}
