@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&family=Sarabun:wght@400;500;600;700&display=swap');

:root {
  --bg: #020617;
  --surface: #0F172A;
  --surface2: #1E293B;
  --surface3: #334155;
  --border: #334155;
  --border-light: #475569;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --blue: #3B82F6;
  --blue-light: #60A5FA;
  --blue-glow: rgba(59,130,246,0.15);
  --cyan: #06B6D4;
  --cyan-light: #22D3EE;
  --green: #22C55E;
  --green-light: #4ADE80;
  --amber: #F59E0B;
  --red: #EF4444;
  --red-light: #F87171;
  --purple: #8B5CF6;
  --orange: #F97316;
  --sidebar-width: 260px;
  --topbar-height: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

html[lang="th"] body {
  font-family: 'Sarabun', 'DM Sans', system-ui, sans-serif;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-content {
  padding: 24px;
  flex: 1;
}

/* ── Sidebar Logo ── */
.sidebar-logo {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.logo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ── Sidebar Nav ── */
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.15s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
  border-left-color: var(--surface3);
}

.nav-item.active {
  background: var(--blue-glow);
  color: var(--blue-light);
  border-left-color: var(--blue);
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-light); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin: 8px 0 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg { width: 20px; height: 20px; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-green { background: rgba(34,197,94,0.15); color: #4ADE80; border: 1px solid rgba(34,197,94,0.25); }
.badge-red { background: rgba(239,68,68,0.15); color: #F87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-yellow { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.25); }
.badge-blue { background: rgba(59,130,246,0.15); color: #93C5FD; border: 1px solid rgba(59,130,246,0.25); }
.badge-cyan { background: rgba(6,182,212,0.15); color: #67E8F9; border: 1px solid rgba(6,182,212,0.25); }
.badge-purple { background: rgba(139,92,246,0.15); color: #C4B5FD; border: 1px solid rgba(139,92,246,0.25); }
.badge-orange { background: rgba(249,115,22,0.15); color: #FDBA74; border: 1px solid rgba(249,115,22,0.25); }
.badge-gray { background: rgba(100,116,139,0.15); color: #94A3B8; border: 1px solid rgba(100,116,139,0.25); }

.live-badge {
  background: rgba(239,68,68,0.2);
  color: #F87171;
  border: 1px solid rgba(239,68,68,0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: #2563EB; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface3); }

.btn-success {
  background: rgba(34,197,94,0.15);
  color: var(--green-light);
  border: 1px solid rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red-light);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-icon {
  padding: 6px;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon:hover { color: var(--text); background: var(--surface3); }
.btn-icon svg { width: 14px; height: 14px; }

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--surface2);
  position: sticky;
  top: 0;
  z-index: 2;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.td-mono {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--blue-light);
}

/* ── Forms ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.form-control::placeholder { color: var(--text-dim); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ── Mode Toggle ── */
.mode-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.mode-toggle-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}

.mode-toggle-btn.active-sandbox {
  background: rgba(59,130,246,0.2);
  color: var(--blue-light);
}

.mode-toggle-btn.active-live {
  background: rgba(239,68,68,0.2);
  color: var(--red-light);
}

/* ── Alert / Warning Box ── */
.alert-box {
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.alert-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #FCD34D;
}

.alert-danger {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red-light);
}

.alert-info {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--blue-light);
}

.alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green-light);
}

.alert-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  pointer-events: auto;
  animation: slideIn 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast-success { background: #0F2A1A; border: 1px solid rgba(34,197,94,0.4); color: var(--green-light); }
.toast-error { background: #2A0F0F; border: 1px solid rgba(239,68,68,0.4); color: var(--red-light); }
.toast-warning { background: #2A1F0F; border: 1px solid rgba(245,158,11,0.4); color: #FCD34D; }
.toast-info { background: #0F1A2A; border: 1px solid rgba(59,130,246,0.4); color: var(--blue-light); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.modal-danger { border-color: rgba(239,68,68,0.5); }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── JSON Viewer ── */
.json-viewer {
  background: #0A0F1A;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.json-key { color: #93C5FD; }
.json-string { color: #86EFAC; }
.json-number { color: #FCD34D; }
.json-bool { color: #C4B5FD; }
.json-null { color: #94A3B8; }

/* ── Timeline ── */
.timeline { padding: 8px 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.done { background: rgba(34,197,94,0.2); border-color: var(--green); }
.timeline-dot.done svg { color: var(--green); }
.timeline-dot svg { width: 12px; height: 12px; color: var(--text-muted); }

.timeline-content { flex: 1; padding-top: 2px; }
.timeline-event { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Copy Button ── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { background: var(--surface3); color: var(--text); }
.copy-btn.copied { background: rgba(34,197,94,0.15); color: var(--green); border-color: rgba(34,197,94,0.3); }
.copy-btn svg { width: 11px; height: 11px; }

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
}

.filter-bar .form-control { width: auto; min-width: 130px; }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Live Warning Box ── */
.live-warning {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(245,158,11,0.08));
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 10px;
  padding: 16px;
  display: none;
}

.live-warning.visible { display: block; }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Gateway Admin Fixes ── */
.gateway-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.gateway-admin-card {
  min-width: 0;
  overflow: hidden;
}

.gateway-card-value,
.gateway-secret {
  min-width: 0;
  max-width: 100%;
  font-family: 'DM Mono', monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gateway-secret {
  color: var(--amber);
  font-size: 11px;
  line-height: 1.5;
}

/* ── Player Deposit ── */
.casino-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.casino-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 15%, rgba(245,158,11,0.22), transparent 28%),
    linear-gradient(135deg, rgba(15,23,42,0.96), rgba(2,6,23,0.98));
}

.casino-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: repeating-conic-gradient(from 12deg, rgba(245,158,11,0.18) 0 10deg, transparent 10deg 20deg);
  opacity: 0.55;
  pointer-events: none;
}

.casino-kicker,
.casino-section-label {
  color: var(--amber);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.casino-hero h1 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.casino-hero p {
  margin-top: 12px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 15px;
}

.casino-wallet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: 18px;
  background: rgba(2,6,23,0.68);
  box-shadow: inset 0 0 34px rgba(34,197,94,0.08);
}

.casino-wallet span,
.casino-wallet small {
  color: var(--text-muted);
}

.casino-wallet strong {
  margin: 8px 0;
  color: var(--green-light);
  font-size: 30px;
  line-height: 1;
}

.casino-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.casino-card {
  background: rgba(15,23,42,0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
}

.casino-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.casino-card h2 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.2;
}

.gateway-choice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.gateway-choice {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, transform 0.16s, background 0.16s;
}

.gateway-choice:hover,
.gateway-choice.selected {
  border-color: rgba(245,158,11,0.65);
  background: rgba(245,158,11,0.08);
  transform: translateY(-1px);
}

.gateway-orb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,0.28), rgba(59,130,246,0.18));
  color: #FCD34D;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
}

.gateway-choice strong,
.gateway-choice small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gateway-choice small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.gateway-check {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.deposit-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.deposit-amount {
  color: var(--green-light);
  font-size: 18px;
  font-weight: 700;
}

.player-profile-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(59,130,246,0.22);
  border-radius: 14px;
  background: rgba(30,41,59,0.48);
}

.deposit-submit {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

.deposit-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.deposit-note code {
  color: var(--cyan);
  overflow-wrap: anywhere;
}

.status-card {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
}

.deposit-status-empty,
.deposit-status-live {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--border-light);
  border-radius: 14px;
  color: var(--text-muted);
}

.deposit-status-live {
  border-style: solid;
  color: var(--text);
  background: rgba(2,6,23,0.36);
}

.deposit-order-id {
  margin-bottom: 10px;
  color: var(--cyan-light);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.deposit-status-line {
  margin-bottom: 12px;
}

.deposit-status-row,
.credit-ledger div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.deposit-status-row span,
.credit-ledger span {
  color: var(--text-muted);
  font-size: 12px;
}

.deposit-gateway-message {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(245,158,11,0.08);
  color: #FCD34D;
  font-size: 12px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.credit-ledger {
  margin-top: 14px;
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .casino-grid { grid-template-columns: 1fr; }
  .status-card { position: static; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .casino-hero { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .gateway-admin-grid { grid-template-columns: 1fr; }
  .casino-hero, .casino-card { padding: 16px; border-radius: 16px; }
  .deposit-field-row { grid-template-columns: 1fr; }
  .gateway-choice { grid-template-columns: 38px minmax(0, 1fr); }
  .gateway-check { display: none; }
}

/* ── Status dot ── */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot-yellow { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot-gray { background: var(--text-dim); }
.dot-blue { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.dot-purple { background: var(--purple); box-shadow: 0 0 6px var(--purple); }

/* ── Glow accents ── */
.glow-blue { box-shadow: 0 0 20px rgba(59,130,246,0.2); }
.glow-green { box-shadow: 0 0 20px rgba(34,197,94,0.2); }

/* ── Auto refresh toggle ── */
.refresh-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--surface3);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}

.toggle-switch.on { background: rgba(59,130,246,0.5); }
.toggle-switch.on::after { left: 18px; background: var(--blue-light); }

/* ── Progress bar ── */
.progress-bar {
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Topbar user ── */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue-glow);
  border: 1px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-light);
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* QR Preview */
.qr-preview {
  width: 120px;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-preview img { width: 100%; height: 100%; object-fit: contain; }

/* Countdown */
.countdown { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--amber); }
.countdown.expired { color: var(--red); }

/* Payment URL card */
.url-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.url-card:hover { border-color: var(--border-light); }

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}
