/* ══════════════════════════════════════════════════════════════
   VIP168 — Dark Gaming Theme
   ລະບົບອອກແບບ UI/UX ສຳລັບ VIP168
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary:        #0A0E17;
  --bg-secondary:      #111827;
  --bg-tertiary:       #1A2332;
  --bg-surface:        #1E293B;
  --bg-elevated:       #243044;
  --bg-overlay:        rgba(0,0,0,0.75);
  --accent-gold:       #F0B90B;
  --accent-gold-dark:  #C99A08;
  --accent-gold-light: #FDE68A;
  --accent-blue:       #3B82F6;
  --accent-blue-dark:  #2563EB;
  --accent-blue-light: #93C5FD;
  --status-success:    #10B981;
  --status-warning:    #F59E0B;
  --status-error:      #EF4444;
  --status-info:       #6366F1;
  --text-primary:      #F1F5F9;
  --text-secondary:    #94A3B8;
  --text-muted:        #64748B;
  --text-inverse:      #0A0E17;
  --border-default:    #1E293B;
  --border-accent:     #F0B90B33;
  --border-active:     #F0B90B;
  --glow-gold:         0 0 15px rgba(240, 185, 11, 0.3);
  --glow-gold-strong:  0 0 30px rgba(240, 185, 11, 0.5);
  --glow-blue:         0 0 15px rgba(59, 130, 246, 0.3);
  --shadow-card:       0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-elevated:   0 10px 25px rgba(0, 0, 0, 0.6);
  --radius-sm:         6px;
  --radius-md:         10px;
  --radius-lg:         16px;
  --radius-xl:         24px;
  --radius-full:       9999px;
  --font-primary:  'Noto Sans Lao', 'Phetsarath OT', 'Saysettha OT', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-blue-light); }
button { font-family: var(--font-primary); cursor: pointer; }
input, textarea, select { font-family: var(--font-primary); }

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.5rem;  font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
small, .text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 5px var(--accent-gold); } 50% { box-shadow: 0 0 25px var(--accent-gold); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* ═══════════════ BUTTONS ═══════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border: none;
  padding: 10px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.938rem; cursor: pointer;
  transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(240, 185, 11, 0.2);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { box-shadow: var(--glow-gold); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--accent-blue); color: #fff; border: none;
  padding: 10px 24px; border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--accent-blue-dark); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-default);
  padding: 10px 24px; border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text-primary); }

.btn-danger {
  background: var(--status-error); color: #fff; border: none;
  padding: 10px 24px; border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { opacity: 0.9; }

.btn-pending {
  position: relative; color: transparent !important; pointer-events: none;
}
.btn-pending::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}

.btn-sm { padding: 6px 14px; font-size: 0.813rem; }
.btn-lg { padding: 14px 32px; font-size: 1.125rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-gold-lg {
  padding: 14px 32px; font-size: 1.125rem;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border: none; border-radius: var(--radius-full);
  font-weight: 700; cursor: pointer; box-shadow: var(--glow-gold);
  transition: all 0.2s; animation: glowPulse 2s infinite;
}
.btn-gold-lg:hover { transform: scale(1.05); box-shadow: var(--glow-gold-strong); }
.btn-gold-lg:active { transform: scale(0.97); }

/* ═══════════════ MODAL ═══════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); width: 90%; max-width: 420px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-elevated); animation: modalSlideUp 0.3s ease;
}
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 1.125rem;
}
.modal-body { padding: 20px; }
.modal-body label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-default); display: flex; gap: 12px; justify-content: flex-end; }

/* ═══════════════ FORMS ═══════════════ */
.input-field {
  width: 100%; padding: 12px 16px; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 1rem; transition: border-color 0.2s;
}
.input-field::placeholder { color: var(--text-muted); }
.input-field:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 2px rgba(240,185,11,0.15); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-secondary); font-size: 0.875rem; }

.select-field {
  width: 100%; padding: 12px 40px 12px 16px; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 1rem; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select-field:focus { outline: none; border-color: var(--accent-gold); }

/* ═══════════════ CHAT BUBBLES ═══════════════ */
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: var(--radius-lg);
  font-size: 0.938rem; line-height: 1.5; word-break: break-word;
  position: relative; animation: bubbleIn 0.25s ease-out;
}
.chat-bubble.incoming {
  background: var(--bg-tertiary); color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm); margin-right: auto;
  border: 1px solid var(--border-default);
}
.chat-bubble.outgoing {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border-bottom-right-radius: var(--radius-sm);
  margin-left: auto; box-shadow: var(--glow-gold);
}
.chat-bubble.system {
  background: var(--bg-elevated); color: var(--text-muted); font-size: 0.813rem;
  text-align: center; max-width: 90%; margin: 8px auto;
  border-radius: var(--radius-md); border: 1px dashed var(--border-default);
}
.chat-bubble .time { font-size: 0.688rem; opacity: 0.7; margin-top: 4px; text-align: right; }

/* ═══════════════ USER CARD ═══════════════ */
.user-card {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.2s ease; cursor: pointer;
}
.user-card:hover { background: var(--bg-tertiary); border-color: var(--border-accent); }
.user-card.active { background: var(--bg-tertiary); border-color: var(--accent-gold); box-shadow: var(--glow-gold); }
.user-card .avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--bg-elevated); border: 2px solid var(--border-default);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-secondary); font-size: 1.125rem; position: relative;
}
.user-card .avatar.vip { border-color: var(--accent-gold); box-shadow: var(--glow-gold); }
.user-card .info { flex: 1; min-width: 0; }
.user-card .name { font-weight: 600; color: var(--text-primary); font-size: 0.938rem; }
.user-card .preview { font-size: 0.813rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .meta { text-align: right; flex-shrink: 0; }
.user-card .time { font-size: 0.75rem; color: var(--text-muted); }
.user-card .badge-unread {
  background: var(--status-error); color: #fff; font-size: 0.688rem;
  font-weight: 700; width: 20px; height: 20px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 4px;
}
.user-card .online-dot {
  width: 10px; height: 10px; background: var(--status-success);
  border-radius: 50%; border: 2px solid var(--bg-secondary);
  position: absolute; bottom: -2px; right: -2px;
}

/* ═══════════════ PACKAGE BUTTONS ═══════════════ */
.package-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.package-btn {
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 10px 16px;
  color: var(--text-primary); font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.package-btn:hover { border-color: var(--accent-gold); }
.package-btn.active { background: var(--accent-gold); color: var(--text-inverse); border-color: var(--accent-gold); box-shadow: var(--glow-gold); }

/* ═══════════════ STAT CARDS ═══════════════ */
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px; transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 1.75rem; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); color: var(--accent-gold); }
.stat-card .stat-label { font-size: 0.813rem; color: var(--text-muted); margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

/* ═══════════════ WHEEL ═══════════════ */
.wheel-container { position: relative; width: 320px; height: 320px; margin: 0 auto; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%;
  border: 4px solid var(--accent-gold);
  box-shadow: var(--glow-gold-strong), inset 0 0 40px rgba(0,0,0,0.5);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  position: relative;
  background: conic-gradient(var(--accent-gold) 0deg 45deg, var(--bg-tertiary) 45deg 90deg, var(--accent-blue) 90deg 135deg, var(--bg-elevated) 135deg 180deg, var(--accent-gold) 180deg 225deg, var(--bg-tertiary) 225deg 270deg, var(--accent-blue) 270deg 315deg, var(--bg-elevated) 315deg 360deg);
}
.wheel-pointer {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 12px solid transparent;
  border-right: 12px solid transparent; border-top: 24px solid var(--accent-gold);
  filter: drop-shadow(0 0 8px rgba(240,185,11,0.6)); z-index: 10;
}
.wheel-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%; background: var(--bg-secondary);
  border: 3px solid var(--accent-gold); box-shadow: var(--glow-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent-gold); font-size: 0.875rem; z-index: 5;
}
.spin-btn {
  display: block; margin: 20px auto 0; padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border: none; border-radius: var(--radius-full);
  font-family: var(--font-primary); font-weight: 700; font-size: 1.125rem;
  cursor: pointer; box-shadow: var(--glow-gold); transition: all 0.2s;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.spin-btn:hover { transform: scale(1.05); box-shadow: var(--glow-gold-strong); }
.spin-btn:active { transform: scale(0.97); }
.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ═══════════════ NOTIFICATION BANNER ═══════════════ */
.notification-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; animation: slideDown 0.3s ease; cursor: pointer;
  box-shadow: var(--shadow-elevated);
}
.notification-banner .close-banner {
  background: none; border: none; color: var(--text-inverse);
  font-size: 1.25rem; cursor: pointer; padding: 4px 8px;
}

/* ═══════════════ LOGIN PAGE ═══════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}
.login-card {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 40px 32px; width: 100%;
  max-width: 420px; box-shadow: var(--shadow-elevated); animation: bounceIn 0.5s ease;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-text {
  font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold), var(--accent-gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 0.05em;
}
.login-logo .logo-sub { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: var(--bg-tertiary); border-radius: var(--radius-md); padding: 4px; }
.login-tab {
  flex: 1; padding: 10px 16px; text-align: center; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.938rem; cursor: pointer; transition: all 0.2s;
  color: var(--text-muted); border: none; background: none;
}
.login-tab.active { background: var(--bg-surface); color: var(--accent-gold); box-shadow: var(--shadow-card); }
.login-tab:hover:not(.active) { color: var(--text-secondary); }

/* ═══════════════ CUSTOMER CHAT ═══════════════ */
.customer-app {
  max-width: 480px; margin: 0 auto; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden; background: var(--bg-primary);
}
.customer-header {
  background: var(--bg-secondary); border-bottom: 1px solid var(--border-default);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-shrink: 0;
}
.customer-header .user-info { display: flex; align-items: center; gap: 10px; }
.customer-header .user-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--bg-elevated); border: 2px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.customer-header .user-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.customer-header .credit { display: flex; flex-direction: column; align-items: flex-end; }
.customer-header .credit-amount { font-weight: 700; color: var(--accent-gold); font-family: var(--font-mono); font-size: 0.938rem; }
.customer-header .credit-points { font-size: 0.75rem; color: var(--text-muted); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-messages .message-date-divider { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 8px 0; }
.chat-messages .message-row { display: flex; flex-direction: column; }
.chat-messages .message-row.in { align-items: flex-start; }
.chat-messages .message-row.out { align-items: flex-end; }
.chat-messages .chat-bubble img, .chat-messages .chat-bubble video { border-radius: var(--radius-md); max-width: 240px; cursor: pointer; }
.chat-messages .voice-bubble { display: flex; align-items: center; gap: 8px; padding: 8px 14px; min-width: 120px; cursor: pointer; }
.chat-messages .voice-bubble .play-icon { font-size: 1.25rem; }
.chat-messages .voice-duration { font-size: 0.75rem; opacity: 0.8; }

.cta-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--bg-secondary); border-top: 1px solid var(--border-default); flex-shrink: 0;
}
.cta-bar .topup-btn {
  flex: 1; padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border: none; border-radius: var(--radius-full);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  box-shadow: var(--glow-gold); animation: glowPulse 2s infinite;
  transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cta-bar .topup-btn:active { transform: scale(0.97); }
.cta-bar .attach-btn {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--bg-surface); border: 1px solid var(--border-default);
  color: var(--text-primary); font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.cta-bar .attach-btn:hover { border-color: var(--accent-gold); }

.bottom-nav {
  display: flex; background: var(--bg-secondary);
  border-top: 1px solid var(--border-default); flex-shrink: 0; height: 64px;
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: var(--text-muted);
  text-decoration: none; transition: all 0.2s; cursor: pointer;
  border: none; background: none; font-family: var(--font-primary); position: relative;
}
.bottom-nav .nav-item .nav-icon { font-size: 1.5rem; }
.bottom-nav .nav-item .nav-label { font-size: 0.688rem; font-weight: 500; }
.bottom-nav .nav-item.active { color: var(--accent-gold); }
.bottom-nav .nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 25%; right: 25%;
  height: 2px; background: var(--accent-gold); border-radius: 0 0 2px 2px;
}

.voice-record-overlay {
  position: fixed; bottom: 140px; left: 50%; transform: translateX(-50%);
  background: var(--status-error); color: #fff; padding: 12px 24px;
  border-radius: var(--radius-full); font-weight: 600; font-size: 1rem;
  z-index: 500; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-elevated); animation: fadeIn 0.2s ease;
}
.voice-record-overlay .recording-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  animation: glowPulse 0.8s infinite;
}

.topup-amount-display {
  text-align: center; font-size: 2rem; font-weight: 800;
  color: var(--accent-gold); font-family: var(--font-mono); margin: 8px 0 16px;
}
.qr-section { text-align: center; padding: 16px 0; }
.qr-section .qr-placeholder {
  width: 180px; height: 180px; margin: 0 auto 12px;
  background: var(--bg-surface); border: 2px dashed var(--border-default);
  border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: 0.875rem;
}
.slip-upload-area {
  border: 2px dashed var(--border-default); border-radius: var(--radius-md);
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color 0.2s; margin-top: 12px;
}
.slip-upload-area:hover { border-color: var(--accent-gold); }
.slip-preview { max-width: 100%; max-height: 200px; border-radius: var(--radius-md); margin: 8px auto 0; display: none; }

/* ═══════════════ ADMIN ═══════════════ */
.admin-layout { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.admin-sidebar {
  width: 256px; background: var(--bg-secondary);
  border-right: 1px solid var(--border-default);
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; z-index: 100;
}
.sidebar-brand { padding: 16px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-default); flex-shrink: 0; }
.sidebar-brand .brand-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.25rem; color: var(--text-inverse); flex-shrink: 0;
}
.sidebar-brand .brand-text {
  font-weight: 700; font-size: 1.125rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; list-style: none; }
.sidebar-nav .nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-md); cursor: pointer; color: var(--text-secondary);
  font-weight: 500; font-size: 0.938rem; transition: all 0.2s;
  border: none; background: none; width: 100%; text-align: left;
  font-family: var(--font-primary); position: relative;
}
.sidebar-nav .nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-nav .nav-item.active {
  background: var(--bg-tertiary); color: var(--accent-gold);
  border-left: 3px solid var(--accent-gold); box-shadow: inset 0 0 0 1px var(--border-accent);
}
.sidebar-nav .nav-item .nav-icon { font-size: 1.25rem; width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-nav .nav-item .nav-label { white-space: nowrap; }
.sidebar-nav .nav-item .nav-badge {
  margin-left: auto; background: var(--status-error); color: #fff;
  font-size: 0.688rem; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: var(--radius-full); display: inline-flex; align-items: center;
  justify-content: center; padding: 0 6px;
}
.sidebar-footer { border-top: 1px solid var(--border-default); padding: 8px; flex-shrink: 0; }
.sidebar-footer .user-profile {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  color: var(--text-secondary); font-size: 0.875rem;
}
.sidebar-footer .user-profile .profile-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg-elevated); display: flex; align-items: center;
  justify-content: center; font-weight: 700; flex-shrink: 0;
}

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.admin-panel { flex: 1; overflow-y: auto; padding: 24px; display: none; }
.admin-panel.active { display: block; animation: pageIn 0.3s ease; }
.panel-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; color: var(--text-primary); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }

.recent-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.recent-table th { text-align: left; padding: 10px 12px; font-size: 0.813rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-default); text-transform: uppercase; letter-spacing: 0.05em; }
.recent-table td { padding: 10px 12px; font-size: 0.875rem; border-bottom: 1px solid var(--border-default); color: var(--text-primary); }
.recent-table tr:hover td { background: var(--bg-tertiary); }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.status-badge.approved { background: var(--status-success); color: #fff; }
.status-badge.pending { background: var(--status-warning); color: var(--text-inverse); }
.status-badge.rejected { background: var(--status-error); color: #fff; }

/* 3-Panel Chat Layout */
.chat-layout { display: grid; grid-template-columns: 300px 1fr 280px; height: 100%; overflow: hidden; }

.user-list-panel { background: var(--bg-primary); border-right: 1px solid var(--border-default); display: flex; flex-direction: column; overflow: hidden; }
.user-list-search { padding: 12px; flex-shrink: 0; }
.user-list-tabs { display: flex; gap: 4px; padding: 0 12px 8px; flex-shrink: 0; overflow-x: auto; }
.user-list-tabs .tab-btn {
  padding: 6px 12px; border-radius: var(--radius-full); font-size: 0.75rem;
  font-weight: 600; cursor: pointer; border: 1px solid var(--border-default);
  background: var(--bg-tertiary); color: var(--text-muted); white-space: nowrap;
  transition: all 0.2s; font-family: var(--font-primary);
}
.user-list-tabs .tab-btn.active { background: var(--accent-gold); color: var(--text-inverse); border-color: var(--accent-gold); }
.user-list-scroll { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }

.chat-panel { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-primary); }
.chat-header { padding: 12px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-default); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.chat-header .chat-user-info { display: flex; align-items: center; gap: 10px; }
.chat-header .chat-user-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.chat-header .chat-user-name { font-weight: 700; color: var(--text-primary); }
.chat-header .chat-user-status { font-size: 0.75rem; color: var(--text-muted); }
.chat-header .chat-actions { display: flex; gap: 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 1rem; }
.chat-input-bar { padding: 12px 16px; background: var(--bg-secondary); border-top: 1px solid var(--border-default); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chat-input-bar .input-field { flex: 1; padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-full); color: var(--text-primary); font-size: 0.938rem; }
.chat-input-bar .send-btn { width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--accent-gold); color: var(--text-inverse); border: none; font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.chat-input-bar .send-btn:hover { box-shadow: var(--glow-gold); }
.chat-input-bar .chat-attach-btn { width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--bg-surface); border: 1px solid var(--border-default); color: var(--text-primary); font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }

.tag-panel {
  width: 280px; background: var(--bg-secondary); border-left: 1px solid var(--border-default);
  display: flex; flex-direction: column; transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  overflow: hidden; flex-shrink: 0;
}
.tag-panel.collapsed { width: 0; opacity: 0; padding: 0; border: none; }
.tag-panel-header { padding: 16px; border-bottom: 1px solid var(--border-default); font-weight: 700; display: flex; align-items: center; justify-content: space-between; white-space: nowrap; }
.tag-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.tag-panel-body h4 { font-size: 0.813rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.tag-list { display: flex; flex-direction: column; gap: 6px; }
.tag-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--bg-tertiary); border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.2s; border: none; color: var(--text-primary);
  font-family: var(--font-primary); font-size: 0.875rem; width: 100%; text-align: left;
}
.tag-toggle:hover { background: var(--bg-elevated); }
.tag-toggle .tag-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }

.toggle-switch {
  width: 40px; height: 22px; background: var(--bg-surface);
  border-radius: var(--radius-full); position: relative; transition: background 0.2s;
  border: 1px solid var(--border-default); flex-shrink: 0;
}
.toggle-switch.active { background: var(--accent-gold); border-color: var(--accent-gold); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s;
}
.toggle-switch.active::after { transform: translateX(18px); }

.user-detail { padding: 12px 0; border-bottom: 1px solid var(--border-default); margin-bottom: 16px; }
.user-detail .detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.875rem; }
.user-detail .detail-label { color: var(--text-muted); }
.user-detail .detail-value { color: var(--text-primary); font-weight: 500; }

.topup-actions { display: flex; gap: 8px; margin-top: 8px; }
.topup-actions .btn-approve, .topup-actions .btn-reject { padding: 6px 14px; border-radius: var(--radius-md); border: none; font-size: 0.813rem; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--font-primary); }
.btn-approve { background: var(--status-success); color: #fff; }
.btn-reject { background: var(--status-error); color: #fff; }

/* Admin sub-panels */
.wheel-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.wheel-prize-list { display: flex; flex-direction: column; gap: 8px; }
.wheel-prize-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg-tertiary); border-radius: var(--radius-md); border: 1px solid var(--border-default); }
.wheel-prize-item .prize-info { display: flex; align-items: center; gap: 10px; }
.wheel-prize-item .prize-label { font-weight: 600; color: var(--text-primary); }
.wheel-prize-item .prize-meta { font-size: 0.75rem; color: var(--text-muted); }
.prize-form { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px; }

.lootbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.lootbox-card { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px; transition: all 0.2s; }
.lootbox-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.lootbox-card .lootbox-name { font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; }
.lootbox-card .lootbox-cost { color: var(--accent-gold); font-family: var(--font-mono); font-weight: 600; }

.users-admin-table { width: 100%; border-collapse: collapse; background: var(--bg-secondary); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-default); }
.users-admin-table th { text-align: left; padding: 12px 16px; font-size: 0.813rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-default); }
.users-admin-table td { padding: 10px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border-default); color: var(--text-primary); }
.users-admin-table tr:hover td { background: var(--bg-tertiary); }

.section-card { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.section-card h3 { font-size: 1.125rem; margin-bottom: 16px; color: var(--text-primary); }

/* Admin Login */
.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 70%); }
.admin-login-card { background: var(--bg-secondary); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: 40px 32px; width: 100%; max-width: 400px; box-shadow: var(--shadow-elevated); animation: bounceIn 0.5s ease; }
.admin-login-header { text-align: center; margin-bottom: 32px; }
.admin-login-header .lock-icon { font-size: 3rem; margin-bottom: 12px; }
.admin-login-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.admin-login-header p { font-size: 0.875rem; color: var(--text-muted); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (min-width: 1280px) {
  .admin-sidebar { width: 260px; }
  .admin-sidebar .nav-label { display: inline; }
  .chat-layout { grid-template-columns: 320px 1fr 280px; }
  .tag-panel { display: flex; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .admin-sidebar { width: 220px; }
  .chat-layout { grid-template-columns: 280px 1fr 260px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .admin-sidebar { width: 72px; }
  .admin-sidebar .nav-label, .admin-sidebar .sidebar-brand .brand-text, .admin-sidebar .sidebar-footer .user-profile span, .admin-sidebar .nav-badge { display: none; }
  .chat-layout { grid-template-columns: 250px 1fr; }
  .tag-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 280px; z-index: 50; box-shadow: var(--shadow-elevated); transform: translateX(0); }
  .tag-panel.collapsed { transform: translateX(100%); width: 280px; opacity: 1; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .admin-layout { display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--text-muted); flex-direction: column; }
  .admin-sidebar, .admin-main { display: none; }
}
@media (max-width: 360px) {
  .bottom-nav .nav-label { font-size: 0.625rem; }
  .bottom-nav .nav-icon { font-size: 1.25rem; }
  .chat-bubble { max-width: 85%; font-size: 0.875rem; }
}
@media (min-width: 361px) and (max-width: 480px) {
  .bottom-nav .nav-label { font-size: 0.688rem; }
  .bottom-nav .nav-icon { font-size: 1.5rem; }
}
@media (min-width: 481px) {
  .customer-app { max-width: 480px; border-left: 1px solid var(--border-default); border-right: 1px solid var(--border-default); }
}

/* ═══════════════ UTILITY ═══════════════ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-success { color: var(--status-success); }
.text-warning { color: var(--status-warning); }
.text-error { color: var(--status-error); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ═══════════════ CUSTOMER PANELS (Wheel, Lootbox, etc.) ═══════════════ */
.panel-container { display: flex; flex-direction: column; height: 100%; }

.panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  position: sticky; top: 0; z-index: 10;
}
.panel-header .btn-ghost { font-size: 14px; color: var(--accent-gold); margin-right: 8px; }
.panel-header span { font-weight: 600; color: var(--text-primary); font-size: 16px; }

/* ═══════════════ CHAT INPUT ROW ═══════════════ */
.chat-input-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: var(--bg-secondary);
  border-top: 1px solid var(--border-default); flex-shrink: 0;
}
.chat-input-row .msg-input {
  flex: 1; padding: 10px 14px; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius-full);
  color: var(--text-primary); font-size: 0.938rem; font-family: var(--font-primary);
}
.chat-input-row .msg-input::placeholder { color: var(--text-muted); }
.chat-input-row .msg-input:focus { outline: none; border-color: var(--accent-gold); }
.chat-input-row .attach-btn,
.chat-input-row .voice-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--bg-surface); border: 1px solid var(--border-default);
  color: var(--text-primary); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.chat-input-row .attach-btn:hover,
.chat-input-row .voice-btn:hover { border-color: var(--accent-gold); }
.chat-input-row .voice-btn.recording {
  background: var(--status-error); color: #fff; border-color: var(--status-error);
  animation: glowPulse 0.8s infinite;
}
.chat-input-row .send-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--accent-gold); color: var(--text-inverse);
  border: none; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.chat-input-row .send-btn:hover { box-shadow: var(--glow-gold); }

/* ═══════════════ SIMPLE WHEEL ═══════════════ */
.wheel-simple-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px; gap: 20px; flex: 1; overflow-y: auto;
}
.wheel-canvas-wrap {
  position: relative; display: inline-block;
}
.wheel-canvas-wrap canvas {
  display: block; border-radius: 50%;
  box-shadow: 0 0 30px rgba(240,185,11,0.25);
}
.wheel-spin-btn {
  display: block; margin: 0 auto; padding: 14px 40px;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--text-inverse); border: none; border-radius: var(--radius-full);
  font-family: var(--font-primary); font-weight: 700; font-size: 1.125rem;
  cursor: pointer; box-shadow: var(--glow-gold); transition: all 0.2s;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.wheel-spin-btn:hover { transform: scale(1.05); box-shadow: var(--glow-gold-strong); }
.wheel-spin-btn:active { transform: scale(0.97); }
.wheel-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.wheel-result {
  text-align: center; padding: 12px 20px; border-radius: var(--radius-lg);
  font-weight: 600; font-size: 0.938rem; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.wheel-result.win { background: rgba(16,185,129,0.15); color: var(--status-success); }
.wheel-result.lose { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.wheel-result.empty { color: var(--text-muted); }

/* Wheel — U-Mall SPIN Style */
.wheel-panel-full { background: linear-gradient(180deg, #8B0000 0%, #4A0000 40%, #0A0E17 100%); min-height: 100vh; }

.wheel-header { background: transparent; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wheel-header-balance { display: flex; gap: 12px; font-size: 13px; color: #FFD700; font-weight: 600; flex: 1; justify-content: center; }
.wheel-header .btn-ghost { color: #FFD700; }

/* Product Cards */
.wheel-products-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; scroll-snap-type: x mandatory; }
.wheel-product-card { min-width: 100px; background: rgba(255,255,255,0.08); border-radius: var(--radius-md); padding: 8px; text-align: center; scroll-snap-align: start; flex-shrink: 0; }
.wheel-product-card .product-img { font-size: 32px; margin-bottom: 4px; }
.wheel-product-card .product-name { font-size: 12px; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wheel-product-card .product-cost { font-size: 13px; color: #FFD700; font-weight: 700; }

/* Progress Bar */
.wheel-progress-bar { padding: 0 12px 8px; }
.progress-milestones { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.progress-track { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #F0B90B, #FF6B00); border-radius: 3px; transition: width 0.5s; }

/* Spin Area */
.wheel-spin-area { display: flex; flex-direction: column; align-items: center; padding: 8px 16px; }
.wheel-pointer-arrow { font-size: 22px; color: #FFD700; margin-bottom: -2px; z-index: 3; filter: drop-shadow(0 0 4px #FFD700); }
.wheel-canvas-wrap { position: relative; display: inline-block; }
.wheel-canvas-wrap canvas { display: block; border-radius: 50%; box-shadow: 0 0 30px rgba(240,185,11,0.2); }
.spin-btn-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(135deg, #FF4444, #CC0000); border: 3px solid #FFD700; color: #FFF; font-size: 18px; font-weight: 900; cursor: pointer; z-index: 5; letter-spacing: 1px; font-family: var(--font-primary); text-shadow: 0 1px 2px rgba(0,0,0,0.4); box-shadow: 0 0 15px rgba(255,0,0,0.4); }

/* Result Toast */
.wheel-result-toast { position: fixed; bottom: 180px; left: 50%; transform: translateX(-50%); padding: 10px 24px; border-radius: var(--radius-full); font-weight: 700; font-size: 14px; z-index: 100; animation: modalSlideUp 0.3s ease-out; }
.wheel-result-toast.win { background: #10B981; color: #FFF; }
.wheel-result-toast.lose { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border-default); }

/* Bottom Controls */
.wheel-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; background: rgba(0,0,0,0.3); }
.wc-redeem-btn { background: #8B0000; color: #FFD700; border: 1px solid #FFD700; border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; font-weight: 700; font-family: var(--font-primary); cursor: pointer; }
.wc-btn { width: 40px; height: 36px; background: #CC0000; color: #FFF; border: 2px solid rgba(255,255,255,0.3); border-radius: var(--radius-sm); font-size: 20px; font-weight: 700; cursor: pointer; font-family: var(--font-primary); }
.wc-multiplier { width: 50px; height: 36px; background: #DD2222; color: #FFF; border: 2px solid #FFD700; border-radius: var(--radius-sm); font-size: 14px; font-weight: 900; cursor: default; font-family: var(--font-primary); }

/* Lootbox */
.lootbox-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lootbox-card { display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface); padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid var(--border-default); }
.lootbox-info { display: flex; flex-direction: column; gap: 2px; }
.lootbox-info strong { color: var(--text-primary); font-size: 15px; }

/* Reward History */
.reward-history { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.reward-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface); padding: 8px 14px; border-radius: var(--radius-sm); }
.reward-item span { color: var(--text-primary); font-weight: 500; }
.reward-item .reward-type { font-size: 0.688rem; color: var(--text-muted); text-transform: uppercase; }

/* Games Panel */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 16px; }
.game-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 20px 12px; text-align: center;
  cursor: pointer; transition: all 0.2s; text-decoration: none; color: var(--text-primary);
}
.game-card:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--glow-gold); }
.game-card .game-icon { font-size: 2.5rem; margin-bottom: 8px; }
.game-card .game-name { font-weight: 600; font-size: 0.938rem; }
.game-card .game-url-hint { font-size: 0.688rem; color: var(--text-muted); margin-top: 4px; word-break: break-all; }

/* Draw / Points Panel */
.draw-points-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  padding: 24px; margin: 16px; text-align: center;
}
.draw-points-card .points-big {
  font-size: 3rem; font-weight: 800; color: var(--accent-gold);
  font-family: var(--font-mono);
}
.draw-points-card .points-label { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }
.draw-prizes-section { padding: 0 16px 16px; }
.draw-prizes-section h3 { font-size: 0.938rem; color: var(--text-secondary); margin-bottom: 10px; }
.draw-prize-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 6px;
}
.draw-prize-item .prize-info { display: flex; flex-direction: column; }
.draw-prize-item .prize-name { font-weight: 600; color: var(--text-primary); }
.draw-prize-item .prize-detail { font-size: 0.75rem; color: var(--text-muted); }
.draw-exchange-btn {
  padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--accent-gold); color: var(--text-inverse);
  border: none; font-weight: 600; font-size: 0.75rem; cursor: pointer;
  font-family: var(--font-primary); white-space: nowrap;
}
.draw-exchange-btn:hover { box-shadow: var(--glow-gold); }

/* Results Modal (lootbox open result) */
.result-modal {
  position: fixed; inset: 0; background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center; z-index: 1100;
  animation: fadeIn 0.2s ease;
}
.result-modal .result-card {
  background: var(--bg-secondary); border: 2px solid var(--accent-gold);
  border-radius: var(--radius-xl); padding: 32px 24px;
  text-align: center; animation: bounceIn 0.4s ease;
  max-width: 320px; width: 90%;
}
.result-modal .result-icon { font-size: 3.5rem; margin-bottom: 12px; }
.result-modal .result-title { font-size: 1.25rem; font-weight: 700; color: var(--accent-gold); margin-bottom: 8px; }
.result-modal .result-item { font-size: 0.938rem; color: var(--text-primary); margin: 4px 0; }
.result-modal .result-close {
  margin-top: 16px; padding: 10px 28px; border-radius: var(--radius-full);
  background: var(--accent-gold); color: var(--text-inverse);
  border: none; font-weight: 700; cursor: pointer; font-family: var(--font-primary);
}

/* Text utilities */
.text-center { text-align: center; }

/* ─── Search/Filter Bar ─── */
.search-filter-bar {
  display: flex; gap: 8px; flex: 1; flex-wrap: wrap;
}
.search-filter-bar .input-field { max-width: 300px; }
.search-filter-bar .select-field { max-width: 160px; }

.users-admin-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}

/* ─── Notes Section ─── */
.notes-section { margin-top: 8px; border-top: 1px solid var(--border-default); padding-top: 8px; }
.notes-list { display: flex; flex-direction: column; gap: 6px; max-height: 250px; overflow-y: auto; margin-bottom: 8px; }
.note-card {
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 8px 12px; font-size: 0.813rem;
}
.note-card .note-text { color: var(--text-primary); margin-bottom: 4px; }
.note-card .note-meta { font-size: 0.688rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
.note-card .note-image { max-width: 150px; border-radius: var(--radius-sm); margin: 4px 0; cursor: pointer; }
.note-card .note-delete { color: var(--status-error); cursor: pointer; font-size: 0.75rem; background: none; border: none; }
.note-input-row { display: flex; gap: 6px; align-items: center; }
.note-input-row .input-field { flex: 1; padding: 8px 12px; font-size: 0.813rem; }
.note-input-row .btn-sm { padding: 6px 10px; font-size: 0.813rem; }

/* ─── Games Admin ─── */
.games-admin-list { display: flex; flex-direction: column; gap: 8px; }
.game-admin-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-tertiary);
  border-radius: var(--radius-md); border: 1px solid var(--border-default);
}
.game-admin-info { display: flex; align-items: center; gap: 10px; }
.game-admin-name { font-weight: 600; color: var(--text-primary); }
.game-admin-url { font-size: 0.75rem; color: var(--text-muted); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-admin-actions { display: flex; gap: 6px; }

/* ─── Tag Labels on User List ─── */
.tag-label {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 0.688rem; font-weight: 600; color: #000; margin-left: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
