/* css/style.css - DuoWin Exact Reference Charcoal & Gold Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #14181b;
  --bg-secondary: #1a1f23;
  --bg-card: #22282d;
  --bg-card-hover: #2a3137;
  --bg-dark-card: #181d21;
  
  --gold-primary: #ffd54f;
  --gold-secondary: #ffb300;
  --gold-gradient: linear-gradient(180deg, #ffe082 0%, #ffb300 50%, #ff8f00 100%);
  
  --emerald-light: #00e676;
  --emerald-primary: #00c853;
  --emerald-gradient: linear-gradient(180deg, #38ef7d 0%, #11998e 100%);

  --text-main: #ffffff;
  --text-muted: #8e99a2;
  --text-gold: #ffd54f;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(255, 213, 79, 0.4);
  
  --danger-neon: #ff3d00;
  --warning-neon: #ffab00;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 50px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #14181b;
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 85px;
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
  position: relative;
}

/* ==========================================
   BUTTONS DESIGN SYSTEM (3D TACTILE ADVANCE)
   ========================================== */
button.btn-emerald, .btn-emerald {
  width: 100%;
  background: linear-gradient(180deg, #00e676 0%, #00b050 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #042010 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  padding: 13px 16px !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transition: all 0.12s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  text-decoration: none !important;
  letter-spacing: 0.3px;
  position: relative;
}
button.btn-emerald:active, .btn-emerald:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 6px rgba(0, 230, 118, 0.2) !important;
}

button.btn-gold, .btn-gold {
  width: 100%;
  background: linear-gradient(180deg, #ffcc33 0%, #ff9900 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #2b1800 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  padding: 13px 16px !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transition: all 0.12s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  text-decoration: none !important;
  letter-spacing: 0.3px;
  position: relative;
}
button.btn-gold:active, .btn-gold:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.2) !important;
}

button:disabled, .btn-gold:disabled, .btn-emerald:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Header bar */
header.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1f23;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hdr-icon-btn {
  background: #252b30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
}

/* Category & Tab Pills */
.category-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 14px 12px 14px;
}

.category-pill-item {
  flex: 0 0 auto;
  background: #22282d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.category-pill-item.active {
  background: #2a3137;
  border-color: var(--emerald-light);
  color: #fff;
}

/* Form controls */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%;
  background: #181d21;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--emerald-light);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #22282d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* Fullscreen modal view */
.game-view-modal {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: #14181b;
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.game-view-modal.active {
  display: flex;
}

/* Bottom navigation bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: #1a1f23;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  width: 20%;
}

.nav-item.active {
  color: var(--emerald-light);
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
  color: var(--emerald-light);
}

.nav-item.center-diamond {
  position: relative;
  top: -10px;
}

.nav-item.center-diamond .diamond-wrapper {
  width: 48px;
  height: 48px;
  background: var(--emerald-gradient);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.5);
  color: #000;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #22282d;
  border: 1.5px solid var(--emerald-light);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  border-color: var(--danger-neon);
}

/* ==========================================
   GLOBAL MOBILE OVERFLOW FIXES
   ========================================== */
html {
  overflow-x: hidden;
}

p, span, div, td, th, label, h1, h2, h3, h4, h5 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ==========================================
   CSS VARIABLES & MOBILE LAYOUT FIXES
   ========================================== */
:root {
  --surface-2: #22282d;
  --hairline: rgba(255,255,255,0.07);
  --gold: #ffd54f;
  --emerald: #00e676;
  --emerald-deep: #00b85e;
  --danger: #ff3d00;
  --ink-muted: #8e99a2;
  --shadow-lift: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-soft: 0 2px 10px rgba(0,0,0,0.25);
}

.view-submodal {
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: 100vh; background: #14181b;
  z-index: 2000; display: none;
  flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
}
.view-submodal.active { display: flex; }

.empty-state-box {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 50px 20px; text-align: center;
}
.empty-state-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.06); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; color: #8e99a2;
}
.empty-state-icon svg { width: 26px; height: 26px; }
.empty-state-title { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.empty-state-text  { font-size: 12px; color: #8e99a2; line-height: 1.5; max-width: 240px; }

/* Admin panel styles */
.panel {
  background: #22282d; border: 1px solid rgba(255,213,79,0.2);
  border-radius: 12px; margin: 10px 12px; overflow: hidden;
}
.panel-header {
  background: rgba(0,230,118,0.08); border-bottom: 1px solid rgba(255,213,79,0.15);
  padding: 12px 16px; font-size: 13px; font-weight: 800; color: #ffd54f;
}
.badge-status {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 900; text-transform: uppercase; white-space: nowrap;
}
.badge-status.pending  { background: rgba(255,171,0,0.2);  color: #ffab00; border: 1px solid rgba(255,171,0,0.4); }
.badge-status.approved { background: rgba(0,200,83,0.2);   color: #00c853; border: 1px solid rgba(0,200,83,0.4); }
.badge-status.rejected { background: rgba(255,61,0,0.15);  color: #ff3d00; border: 1px solid rgba(255,61,0,0.3); }

/* Notifications & Txn Cards */
.notif-card-v2 {
  background: #22282d; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
}
.notif-card-body { flex: 1; min-width: 0; }
.notif-card-title { font-size: 13.5px; font-weight: 800; margin-bottom: 4px; }
.notif-card-msg { font-size: 12px; color: #8e99a2; line-height: 1.5; margin-bottom: 6px; }
.notif-card-time { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #6a757e; }
.notif-card-time svg { width: 12px; height: 12px; flex-shrink: 0; }
.notif-tabs { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.notif-subtab-btn {
  background: transparent; border: 1.5px solid rgba(255,255,255,0.1);
  color: #8e99a2; padding: 7px 18px; border-radius: 50px; font-size: 13px; font-weight: 800; cursor: pointer;
}
.notif-subtab-btn.active { background: rgba(0,230,118,0.12); border-color: #00e676; color: #00e676; }
.floating-allread-btn {
  position: sticky; bottom: 80px; background: #22282d;
  border: 1.5px solid rgba(0,230,118,0.4); color: #00e676;
  padding: 9px 20px; border-radius: 50px; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  width: fit-content; float: right; margin-right: 14px;
}
.floating-allread-btn svg { width: 14px; height: 14px; }
.floating-cs-btn {
  position: fixed; bottom: 88px; right: calc(50vw - 230px);
  background: linear-gradient(135deg,#22282d,#1a1f23);
  border: 1.5px solid rgba(0,230,118,0.35); color: #00e676;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.floating-cs-btn svg { width: 20px; height: 20px; }

/* 3D Icons & Layout */
.icon3d {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon3d svg { width: 20px; height: 20px; }
.icon3d.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon3d.sm svg { width: 16px; height: 16px; }
.i-crown   { background: linear-gradient(150deg,#ffe28a,#ffb100); box-shadow: 0 3px 8px rgba(255,177,0,0.4); }
.i-gift    { background: linear-gradient(150deg,#ff8a80,#e91e63); box-shadow: 0 3px 8px rgba(233,30,99,0.35); }
.i-chart   { background: linear-gradient(150deg,#80d8ff,#0091ea); box-shadow: 0 3px 8px rgba(0,145,234,0.35); }
.i-swap    { background: linear-gradient(150deg,#69f0ae,#00c853); box-shadow: 0 3px 8px rgba(0,200,83,0.35); }
.i-bell    { background: linear-gradient(150deg,#ffd740,#ff6d00); box-shadow: 0 3px 8px rgba(255,109,0,0.35); }
.i-headset { background: linear-gradient(150deg,#ea80fc,#aa00ff); box-shadow: 0 3px 8px rgba(170,0,255,0.35); }
.i-ticket  { background: linear-gradient(150deg,#ff6e40,#dd2c00); box-shadow: 0 3px 8px rgba(221,44,0,0.35); }
.i-exit    { background: linear-gradient(150deg,#ff5252,#b71c1c); box-shadow: 0 3px 8px rgba(183,28,28,0.35); }

.menu-card-section {
  background: #22282d; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; overflow: hidden; margin-bottom: 10px;
}
.menu-item-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
}
.menu-item-row:last-child { border-bottom: none; }
.menu-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.menu-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-item-title { font-size: 14px; font-weight: 800; color: #fff; }
.menu-item-sub { font-size: 11px; color: #8e99a2; }
.chevron-right { color: #8e99a2; flex-shrink: 0; }
.chevron-right svg { width: 14px; height: 14px; }

