/* ══════════════════════════════════════════════
   ZeroLoss Design System – Premium Dark Theme
   ══════════════════════════════════════════════ */

:root {
  --bg-primary: #09111E;
  --bg-secondary: #101A2B;
  --bg-card: #142135;
  --bg-card-hover: #192942;
  --bg-input: #0B1524;
  --border: rgba(255,255,255,0.06);
  --border-focus: rgba(24,169,201,0.5);
  --text-primary: #f0f2f5;
  --text-secondary: #8892a4;
  --text-muted: #5a6478;
  --green: #18A9C9; /* Changed to Cyan to match logo */
  --green-dark: #1289A3;
  --green-glow: rgba(24,169,201,0.15);
  --green-glow-strong: rgba(24,169,201,0.25);
  --red: #e74c3c;
  --red-glow: rgba(231,76,60,0.15);
  --blue: #3498db;
  --blue-glow: rgba(52,152,219,0.15);
  --yellow: #f39c12;
  --yellow-glow: rgba(243,156,18,0.15);
  --purple: #9b59b6;
  --purple-glow: rgba(155,89,182,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(46,204,113,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ══════════════════════════════════════
   Navbar
   ══════════════════════════════════════ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  background: rgba(17,24,39,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar .brand span { color: var(--green); }

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.navbar .nav-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}
.navbar .nav-links a.active { color: var(--green); }

.navbar .user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.navbar .nav-user-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.navbar .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}

/* ══════════════════════════════════════
   Page Container
   ══════════════════════════════════════ */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ══════════════════════════════════════
   Cards
   ══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: var(--shadow-md);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon.green { background: var(--green-glow); color: var(--green); }
.stat-icon.blue { background: var(--blue-glow); color: var(--blue); }
.stat-icon.yellow { background: var(--yellow-glow); color: var(--yellow); }
.stat-icon.purple { background: var(--purple-glow); color: var(--purple); }
.stat-icon.red { background: var(--red-glow); color: var(--red); }

.stat-content { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

/* ══════════════════════════════════════
   Buttons
   ══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font);
  text-decoration: none;
}
.btn-primary {
  background: var(--green);
  color: #000;
}
.btn-primary:hover { background: var(--green-dark); box-shadow: 0 0 16px var(--green-glow-strong); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-danger { background: var(--red-glow); color: var(--red); }
.btn-danger:hover { background: rgba(231,76,60,0.25); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* ══════════════════════════════════════
   Tables
   ══════════════════════════════════════ */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 1rem; font-weight: 600; }

table {
  width: 100%;
  border-collapse: collapse;
}
table th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
table td {
  padding: 0.85rem 1.5rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: rgba(255,255,255,0.02); }

/* ══════════════════════════════════════
   Forms & Inputs
   ══════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.form-input::placeholder { color: var(--text-muted); }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892a4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ══════════════════════════════════════
   Badges
   ══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-green { background: var(--green-glow); color: var(--green); }
.badge-red { background: var(--red-glow); color: var(--red); }
.badge-blue { background: var(--blue-glow); color: var(--blue); }
.badge-yellow { background: var(--yellow-glow); color: var(--yellow); }
.badge-purple { background: var(--purple-glow); color: var(--purple); }

/* ══════════════════════════════════════
   Modal
   ══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   Product Cards (Members)
   ══════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.product-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  border-color: rgba(46,204,113,0.2);
}
.product-card .product-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
}
.product-card .product-icon.green { background: var(--green-glow); color: var(--green); }
.product-card .product-icon.blue { background: var(--blue-glow); color: var(--blue); }
.product-card .product-icon.yellow { background: var(--yellow-glow); color: var(--yellow); }

.product-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.product-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.5; }

.product-card.locked {
  /* opacity and grayscale removed per user request to keep buttons bright */
}
.product-card.locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.03) 10px, rgba(0,0,0,0.03) 20px);
  pointer-events: none;
}
.locked-ribbon {
  position: absolute;
  top: 18px; right: -32px;
  background: var(--red);
  color: #fff;
  padding: 4px 40px;
  transform: rotate(45deg);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ══════════════════════════════════════
   Surebet Cards
   ══════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 1.5rem;
}
.surebet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.surebet-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.08);
}
.surebet-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profit-badge {
  background: var(--green-glow);
  color: var(--green);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 0.3rem;
}
.meta-info {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
}
.zl-label {
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.6rem;
  color: var(--text-secondary);
}
.league-name { color: var(--text-muted); font-size: 0.8rem; }

.teams { display: flex; flex-direction: column; gap: 0.6rem; }
.team-row { display: flex; align-items: center; gap: 0.75rem; }
.team-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.team-name { font-size: 0.95rem; font-weight: 600; }

.houses { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.25rem; }
.house-row { display: flex; justify-content: space-between; align-items: center; }
.house-info { display: flex; align-items: flex-start; gap: 0.6rem; }
.house-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.house-dot.green { background: var(--green); }
.house-dot.blue { background: var(--blue); }
.house-details { display: flex; flex-direction: column; }
.house-name { font-size: 0.875rem; font-weight: 600; }
.market-name { font-size: 0.75rem; color: var(--text-muted); }

.odd-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.house-row[onclick] {
  border-radius: var(--radius-sm);
  margin: 0 -0.4rem;
  padding: 0.35rem 0.4rem;
  transition: var(--transition);
}
.house-row[onclick]:hover {
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.house-row[onclick]:active {
  background: rgba(255,255,255,0.07);
  transform: scale(0.99);
}

.card-actions {
  display: flex; gap: 0.75rem; margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.card-actions .btn { flex: 1; justify-content: center; }

/* ══════════════════════════════════════
   Toast Notifications
   ══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 80px; right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  display: flex; align-items: center; gap: 0.75rem;
  min-width: 280px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Small Tablet / Large Phone ── */
@media (max-width: 768px) {
  .page-container { padding: 1rem; padding-bottom: 80px; }
  .navbar { padding: 0 0.75rem; gap: 0.5rem; }
  .navbar .nav-links a { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
  .navbar .nav-links a span { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table th, table td { padding: 0.6rem 0.75rem; font-size: 0.8rem; white-space: nowrap; }
  .page-header h1 { font-size: 1.35rem; }
  
  /* User section compact */
  .navbar .user-section { gap: 0.5rem !important; }
  #navUserName { display: none !important; }
  
  /* Lang dropdown compact */
  .lang-dropdown-btn { padding: 5px 10px; font-size: 0.8rem; }
  #lang-btn-text { display: none; }
  .lang-dropdown-btn i.fa-chevron-down { display: none; }
  
  /* Stat cards compact */
  .stat-card { padding: 1rem; gap: 0.75rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.7rem; }
  
  /* Surebet card adjustments */
  .surebet-card { padding: 1rem; }
  .card-top { flex-wrap: wrap; gap: 0.5rem; }
  .meta-info { flex-wrap: wrap; }
  
  /* Product card compact */
  .product-card { padding: 1.25rem; }
  .product-card .product-icon { width: 56px; height: 56px; font-size: 1.4rem; margin-bottom: 1rem; }
  
  /* Modal improvements */
  .modal { margin: 0.5rem; max-height: 90vh; }
  .modal-body { padding: 1rem; overflow-y: auto; }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-footer { padding: 0.75rem 1rem; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 0; justify-content: center; }
  
  /* Toast on mobile */
  .toast-container { top: 72px; right: 0.5rem; left: 0.5rem; }
  .toast { min-width: unset; width: 100%; font-size: 0.8rem; padding: 0.75rem 1rem; }

  /* Notification dropdown */
  .notif-dropdown { width: 320px; right: -40px; }
  
  /* Live notification toast */
  .live-notif-toast { bottom: 80px; right: 12px; left: 12px; width: auto; }
}

/* ── Phone ── */
@media (max-width: 600px) {
  html { font-size: 15px; }
  
  .navbar { 
    height: 56px; 
    padding: 0 0.75rem; 
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #0a0e17;
  }
  .navbar .brand { font-size: 1rem; }
  
  /* Bottom navigation bar */
  .navbar .nav-links {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
  }
  .navbar .nav-links a {
    flex-direction: column;
    font-size: 0.6rem;
    padding: 0.35rem 0.5rem;
    gap: 0.15rem;
    min-width: 0;
  }
  .navbar .nav-links a i { font-size: 1.15rem; }
  .navbar .nav-links a span { display: block; font-size: 0.6rem; }

  /* Page layout */
  .page-container { padding: 0.75rem; padding-bottom: 90px; }
  .page-header { margin-bottom: 1rem; }
  .page-header h1 { font-size: 1.2rem; }
  .page-header p { font-size: 0.85rem; }
  
  /* Stats grid - 2 columns on phone */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 0.75rem; gap: 0.6rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; border-radius: 8px; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.65rem; }
  
  /* Surebet cards */
  .cards-grid { gap: 0.75rem; }
  .surebet-card { padding: 0.875rem; gap: 0.75rem; }
  .profit-badge { font-size: 0.7rem; padding: 0.2rem 0.6rem; }
  .meta-info { font-size: 0.65rem; gap: 0.4rem; }
  .zl-label { font-size: 0.55rem; padding: 0.1rem 0.4rem; }
  .league-name { font-size: 0.75rem; }
  .team-name { font-size: 0.85rem; }
  .team-avatar { width: 24px; height: 24px; font-size: 0.5rem; }
  .house-name { font-size: 0.8rem; }
  .market-name { font-size: 0.7rem; }
  .odd-pill { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  
  .card-actions { flex-direction: column; gap: 0.5rem; }
  .card-actions .btn { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  
  /* House rows - make tappable */
  .house-row { min-height: 44px; }
  .house-row[onclick] { padding: 0.5rem; margin: 0 -0.25rem; }
  
  /* Product cards */
  .products-grid { gap: 1rem; }
  .product-card { padding: 1.25rem; }
  .product-card .product-icon { width: 52px; height: 52px; font-size: 1.3rem; margin-bottom: 0.75rem; }
  .product-card h3 { font-size: 1rem; }
  .product-card p { font-size: 0.85rem; margin-bottom: 1rem; }
  
  /* Tables */
  table th, table td { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
  .table-header { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .table-header h3 { font-size: 0.9rem; }
  
  /* Modals */
  .modal-overlay { padding: 0.5rem; align-items: flex-end; }
  .modal { 
    max-height: 92vh; 
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: modalSlideUp 0.3s ease;
  }
  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .modal-body { padding: 1rem; max-height: 60vh; overflow-y: auto; }
  .modal-header { padding: 1rem; }
  .modal-header h3 { font-size: 1rem; }
  .modal-footer { padding: 0.75rem 1rem; }
  .modal-close { width: 32px; height: 32px; }
  
  /* Buttons touch-friendly */
  .btn { min-height: 42px; padding: 0.55rem 1rem; font-size: 0.85rem; }
  .btn-sm { min-height: 36px; padding: 0.35rem 0.75rem; }
  .btn-icon { width: 38px; height: 38px; }
  
  /* Forms */
  .form-input { padding: 0.65rem 0.85rem; font-size: 0.85rem; min-height: 42px; }
  
  /* Language dropdown */
  .lang-dropdown-btn { padding: 4px 8px; gap: 4px; }
  .lang-dropdown-btn img { width: 22px; height: 22px; }
  #lang-btn-text { display: none; }
  .lang-dropdown-btn i.fa-chevron-down { display: none; }
  .lang-dropdown-menu { right: -20px; min-width: 140px; }
  .lang-dropdown-item { padding: 8px 10px; font-size: 0.85rem; }
  
  /* Notification dropdown full width on phone */
  .notif-dropdown { 
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    top: 60px;
    width: auto;
    max-width: 100%;
  }
  .notif-list-container { max-height: 50vh; }
  
  /* Live notification toast */
  .live-notif-toast { 
    bottom: 80px; 
    right: 0.5rem; 
    left: 0.5rem; 
    width: auto;
    padding: 1rem;
  }
  
  /* Toast container */
  .toast-container { top: 60px; left: 0.5rem; right: 0.5rem; }
  .toast { min-width: unset; font-size: 0.8rem; padding: 0.7rem 1rem; }
  
  /* Badge sizes */
  .badge { font-size: 0.6rem; padding: 0.2rem 0.5rem; }
  
  /* Limitation modal compact */
  .limit-box { padding: 1rem; }
  .limit-box-name { font-size: 1rem; }
  .limit-step { font-size: 0.8rem; }
}

/* ── Very Small Phone (iPhone SE, etc) ── */
@media (max-width: 380px) {
  html { font-size: 14px; }
  .navbar .brand { font-size: 0.9rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { flex-direction: column; text-align: center; }
  .stat-icon { margin: 0 auto; }
  .page-container { padding: 0.5rem; padding-bottom: 85px; }
  .surebet-card { padding: 0.75rem; }
  .product-card { padding: 1rem; }
  .modal-overlay { padding: 0; }
  .modal { border-radius: var(--radius-md) var(--radius-md) 0 0; }
}

/* Custom Language Dropdown */
.lang-dropdown {
  position: relative;
  z-index: 1000;
  user-select: none;
}
.lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.lang-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.lang-dropdown-btn img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0; /* Aligns with the right edge of the button */
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 150px;
  padding: 0.5rem;
}
.lang-dropdown.active .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.lang-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.lang-dropdown-item.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}
.lang-dropdown-item img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* ════════════════════════════════════════
   Limitation Modal
   ════════════════════════════════════════ */
.limit-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  transition: var(--transition);
}
.limit-box.active {
  border-color: var(--green);
  box-shadow: 0 0 15px rgba(46,204,113,0.1);
}
.limit-box.disabled {
  opacity: 0.5;
}
.limit-box-header {
  margin-bottom: 1rem;
}
.limit-box-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.limit-box-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.limit-spinner {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.limit-box.active .limit-spinner {
  color: var(--green);
}
.limit-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.limit-step:last-child {
  margin-bottom: 0;
}
.limit-step.active {
  color: var(--text-primary);
}
.limit-step.done {
  color: var(--text-secondary);
}
.limit-step-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.limit-step-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}
.limit-step.active .limit-step-icon {
  border-color: var(--green);
  border-width: 2px;
}
.limit-step.done .limit-step-icon {
  background: var(--green);
  border-color: var(--green);
}
.limit-step-time {
  font-size: 0.75rem;
  color: var(--green);
}

/* ════════════════════════════════════════
   In-App Notifications System
   ════════════════════════════════════════ */
.notification-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.notif-bell-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 100px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
  animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: 90vw;
  background: #141923;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
  z-index: 9999;
  overflow: hidden;
  animation: fadeInDown 0.2s ease-out forwards;
}

.notif-dropdown-header {
  padding: 0.9rem 1.2rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-dropdown-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.notif-list-container {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  position: relative;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.unread {
  background: rgba(52, 152, 219, 0.08);
  border-left: 3px solid var(--blue);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.notif-item-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.notif-item-del-btn:hover {
  color: var(--red);
  background: rgba(231,76,60,0.12);
}

.notif-item-message {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.notif-item-media {
  margin-bottom: 0.6rem;
  border-radius: 6px;
  overflow: hidden;
}

.notif-item-media img,
.notif-item-media video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  display: block;
}

/* Live popup toast in bottom corner */
.live-notif-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: #141923;
  border: 1px solid rgba(52, 152, 219, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(0,0,0,0.7), 0 0 20px rgba(52, 152, 219, 0.2);
  padding: 1.25rem;
  z-index: 99999;
  animation: slideInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

 
 