/* =============================================
   LUCKY STAR LOTTERY — GLOBAL STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Oswald:wght@600;700&display=swap');

:root {
  --purple:     #5B2ECC;
  --purple-dark:#3D1A99;
  --purple-light:#7B52E8;
  --blue:       #1A3FBB;
  --red:        #E02020;
  --gold:       #FFD600;
  --orange:     #FF8C00;
  --green:      #18B86A;
  --pink:       #E8006A;
  --white:      #FFFFFF;
  --bg:         #F0F2F8;
  --card-bg:    #FFFFFF;
  --text:       #1A1A2E;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
  --shadow:     0 2px 12px rgba(91,46,204,0.10);
  --shadow-lg:  0 8px 32px rgba(91,46,204,0.18);
  --radius:     14px;
  --radius-sm:  8px;
  --nav-h:      64px;
  --bottom-h:   70px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

body.admin-body {
  max-width: 100%;
  background: #0F0A2A;
}

/* ---- SVG Icon Helper ---- */
.icon {
  display: inline-block;
  width: 1em; height: 1em;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}
.icon-fill { fill: currentColor; stroke: none; }

/* ---- Top Nav ---- */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  height: var(--nav-h);
  background: var(--white);
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
.top-nav .logo {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.logo-img { height: 38px; width: auto; display: block; }

.wallet-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border-radius: 20px;
  padding: 6px 10px 6px 8px;
  font-weight: 700; font-size: 14px; color: var(--text);
  border: 1.5px solid var(--border);
}
.wallet-badge .wallet-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px;
}
.wallet-badge .add-btn {
  width: 24px; height: 24px;
  background: var(--purple);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 700;
  cursor: pointer; border: none; margin-left: 2px;
}

/* ---- Tab Nav (secondary) ---- */
.tab-nav {
  display: flex; align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 14px;
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  text-decoration: none;
}
.tab-item svg { font-size: 20px; width: 20px; height: 20px; }
.tab-item.active { color: var(--purple); border-bottom-color: var(--purple); font-weight: 600; }

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--bottom-h);
  background: var(--white);
  display: flex; align-items: center;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.10);
  z-index: 100;
  border-top: 1px solid var(--border);
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; padding: 8px 0; text-decoration: none;
  transition: color .2s;
}
.bnav-item svg { width: 22px; height: 22px; }
.bnav-item.active { color: var(--purple); }
.bnav-center {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex; align-items: center; justify-content: center;
  color: white; margin-top: -20px;
  box-shadow: 0 4px 16px rgba(91,46,204,0.4);
  border: 3px solid white;
}
.bnav-center svg { width: 24px; height: 24px; }

/* ---- Page Scroll Area ---- */
.page-content {
  padding-bottom: calc(var(--bottom-h) + 16px);
  min-height: 100vh;
}

/* ---- Hero Banner / Carousel ---- */
.hero-carousel { position: relative; overflow: hidden; margin: 12px 12px 0; border-radius: var(--radius); }
.hero-slides { display: flex; transition: transform 0.4s ease; }
.hero-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a0050, #0a1f6e);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 12px 14px;
  position: relative;
  display: flex; flex-direction: column;
}
.hero-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='400' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='200' cy='180' rx='250' ry='100' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") center/cover;
}
.slide-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gold); color: var(--text);
  font-size: 9px; font-weight: 800;
  padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
  align-self: flex-start;
}
.slide-prize-label {
  color: rgba(255,255,255,0.8); font-size: 11px; margin-top: 4px;
  font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
}
.slide-prize-amount {
  font-family: 'Oswald', sans-serif;
  font-size: 38px; font-weight: 700;
  color: var(--red);
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 4px;
}
.slide-prize-amount .rupee { font-size: 26px; color: white; }
.slide-prize-amount .lakhs { font-size: 18px; color: white; align-self: flex-end; padding-bottom: 4px; }
.slide-sub { color: rgba(255,255,255,0.6); font-size: 9px; margin-top: 1px; }
.slide-meta {
  display: flex; gap: 6px; margin-top: auto;
}
.slide-meta-item {
  background: rgba(255,255,255,0.12); border-radius: 7px;
  padding: 4px 8px; flex: 1;
}
.slide-meta-item .label { color: rgba(255,255,255,0.6); font-size: 8px; text-transform: uppercase; letter-spacing: .5px; }
.slide-meta-item .value { color: var(--gold); font-size: 11px; font-weight: 700; }
.slide-ticket-no {
  position: absolute; top: 12px; right: 12px;
  background: white; border-radius: 7px;
  padding: 4px 10px; text-align: center;
}
.slide-ticket-no .label { font-size: 8px; color: var(--text-muted); }
.slide-ticket-no .value { font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.hero-buy-btn {
  display: block; width: 100%;
  background: var(--gold); color: var(--text);
  font-weight: 800; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px;
  border: none; border-radius: 9px; padding: 9px;
  margin-top: 8px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,214,0,0.4);
  transition: transform .15s;
  text-decoration: none; text-align: center;
}
.hero-buy-btn:active { transform: scale(0.97); }
.hero-dots {
  display: flex; justify-content: center; gap: 6px; margin-top: 10px; padding-bottom: 2px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: all .3s;
}
.dot.active { background: var(--purple); width: 20px; border-radius: 4px; }

/* ---- Quick Actions Grid ---- */
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding: 16px 12px 0;
}
.qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text);
}
.qa-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 22px;
}
.qa-icon svg { width: 24px; height: 24px; }
.qa-icon.purple { background: linear-gradient(135deg, var(--purple), var(--purple-light)); }
.qa-icon.blue   { background: linear-gradient(135deg, var(--blue), #3B6FFF); }
.qa-icon.green  { background: linear-gradient(135deg, var(--green), #34D399); }
.qa-icon.orange { background: linear-gradient(135deg, var(--orange), #FFB347); }
.qa-label { font-size: 11px; font-weight: 600; color: var(--text); }
.qa-sub   { font-size: 9px; color: var(--text-muted); margin-top: -4px; }

/* ---- Section Header ---- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 12px 8px;
}
.section-title { font-size: 16px; font-weight: 700; }
.view-all {
  font-size: 12px; font-weight: 600; color: var(--purple);
  text-decoration: none; display: flex; align-items: center; gap: 2px;
}

/* ---- Draw Card ---- */
.draw-card {
  margin: 0 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.draw-card-logo { width: 100px; }
.draw-card-logo img { width: 100%; }
.draw-card-info { flex: 1; }
.draw-date-badge {
  display: inline-block;
  background: var(--bg); border-radius: 20px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--text);
  margin-bottom: 2px;
}
.draw-time-badge {
  display: inline-block;
  background: #FFF0F5; border-radius: 20px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--pink);
}
.draw-prize { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 6px; }
.draw-prize-sub { font-size: 9px; color: var(--text-muted); }
.play-now-btn {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white; font-weight: 700; font-size: 13px;
  border: none; border-radius: 10px; padding: 10px 16px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  display: inline-block;
}

/* ---- How It Works ---- */
.how-it-works {
  margin: 0 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.hiw-steps { display: flex; align-items: center; justify-content: space-between; }
.hiw-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.hiw-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; position: relative;
}
.hiw-icon svg { width: 22px; height: 22px; }
.hiw-icon .step-num {
  position: absolute; bottom: -2px; left: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text); color: white; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}
.hiw-step p { font-size: 10px; font-weight: 600; text-align: center; color: var(--text); }
.hiw-connector { flex: 0.3; border-top: 2px dashed var(--border); margin-top: -20px; }

/* ---- Promo Banner ---- */
.promo-banner {
  margin: 12px 12px 0;
  background: linear-gradient(135deg, #3D1A99, #1A3FBB);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.promo-banner .promo-gift { font-size: 44px; }
.promo-text .label { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.promo-text .title { color: white; font-size: 16px; font-weight: 700; }
.promo-text .title span { color: var(--gold); }
.promo-btn {
  margin-left: auto;
  background: var(--gold); color: var(--text);
  font-size: 11px; font-weight: 800;
  border: none; border-radius: 8px; padding: 8px 12px;
  cursor: pointer; white-space: nowrap; text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- Buy Ticket Page ---- */
.buy-page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.back-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; color: var(--text); text-decoration: none;
}
.back-btn svg { width: 20px; height: 20px; }
.page-title { font-size: 17px; font-weight: 700; }

.search-row {
  display: flex; gap: 10px; padding: 14px 12px;
}
.search-input-wrap {
  flex: 1; position: relative;
}
.search-input-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted);
}
.search-input {
  width: 100%; padding: 11px 12px 11px 38px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Poppins', sans-serif; font-size: 13px;
  background: var(--white); outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--purple); }
.scan-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1.5px solid var(--purple);
  color: var(--purple); font-size: 13px; font-weight: 600;
  border-radius: 10px; padding: 0 14px; cursor: pointer;
  white-space: nowrap;
}
.scan-btn svg { width: 18px; height: 18px; }

/* ---- Ticket Carousel ---- */
.ticket-carousel-wrap { padding: 0 12px; }
.ticket-slide-container { position: relative; overflow: hidden; }
.ticket-slides { display: flex; transition: transform 0.35s cubic-bezier(.4,0,.2,1); }
.ticket-card {
  min-width: 100%;
  background: white; border-radius: var(--radius);
  overflow: hidden; border: 2px solid transparent;
  transition: border-color .2s, transform .15s;
  position: relative; cursor: pointer;
}
.ticket-card.selected { border-color: var(--purple); }
.ticket-card.selected::after {
  content: '✓ Selected';
  position: absolute; bottom: 8px; left: 8px;
  background: var(--purple); color: white;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.ticket-card:active { transform: scale(0.98); }

/* Ticket design — real ticket photo (img/ticket-template.jpg) + dynamic ticket no. overlay */
.ticket-image-wrap { position: relative; line-height: 0; }
.ticket-bg-img {
  width: 100%; height: auto; display: block;
  -webkit-user-drag: none; pointer-events: none; user-select: none;
}
.ticket-no-overlay {
  position: absolute;
  left: 78.3%; top: 17.4%; width: 15%; height: 9.7%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 700; letter-spacing: 0.5px; color: var(--text);
  font-size: clamp(10px, 3.4vw, 15px);
  white-space: nowrap;
}

.ticket-counter {
  text-align: center; margin-top: 10px;
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}
.ticket-dots {
  display: flex; justify-content: center; gap: 5px; margin-top: 8px;
}
.ticket-dots .dot { width: 6px; height: 6px; }

.ticket-nav-btns {
  display: flex; justify-content: space-between; margin-top: 8px;
}
.tnav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.tnav-btn svg { width: 18px; height: 18px; }
.tnav-btn:disabled { opacity: 0.3; }

/* ---- Buy Bottom Bar ---- */
.buy-bottom-bar {
  position: fixed; bottom: var(--bottom-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: white; padding: 12px 16px;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  z-index: 99;
}
.buy-bottom-meta {
  display: flex; justify-content: space-between; margin-bottom: 10px;
}
.buy-meta-item { text-align: center; }
.buy-meta-item .label { font-size: 10px; color: var(--text-muted); }
.buy-meta-item .value { font-size: 15px; font-weight: 700; color: var(--text); }
.buy-meta-item .value svg { width: 18px; height: 18px; color: var(--purple); }
.divider-v { width: 1px; background: var(--border); }
.buy-now-btn {
  width: 100%; background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white; font-weight: 700; font-size: 15px;
  border: none; border-radius: 12px; padding: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(91,46,204,0.35);
}
.buy-now-btn svg { width: 20px; height: 20px; }

/* ---- Admin Panel ---- */
.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 240px; background: #0F0A2A;
  display: flex; flex-direction: column;
  z-index: 200;
}
.admin-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-logo .version { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.admin-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.55); cursor: pointer;
  transition: all .2s; text-decoration: none; border: none; background: none; width: 100%; text-align: left;
}
.admin-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-nav-item.active { background: rgba(91,46,204,0.3); color: white; border-right: 3px solid var(--purple-light); }
.admin-nav-item.active svg { color: var(--purple-light); }
.admin-nav-section { padding: 16px 20px 4px; font-size: 9px; color: rgba(255,255,255,0.25); letter-spacing: 1px; text-transform: uppercase; }
.admin-logout { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.admin-logout a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.4); font-size: 13px; text-decoration: none;
  transition: color .2s;
}
.admin-logout a:hover { color: #ff6b6b; }
.admin-logout svg { width: 18px; height: 18px; }

.admin-main {
  margin-left: 240px;
  min-height: 100vh;
  background: #0F0A2A;
  color: white;
}
.admin-topbar {
  height: 60px; background: #160D35;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.admin-topbar h1 { font-size: 18px; font-weight: 700; }
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.admin-content { padding: 24px; }

/* Admin Stats Cards */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #160D35; border-radius: 12px; padding: 18px;
  border: 1px solid rgba(255,255,255,0.06);
}
.stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card .stat-icon.purple { background: rgba(91,46,204,0.2); color: var(--purple-light); }
.stat-card .stat-icon.green  { background: rgba(24,184,106,0.2); color: var(--green); }
.stat-card .stat-icon.gold   { background: rgba(255,214,0,0.15); color: var(--gold); }
.stat-card .stat-icon.pink   { background: rgba(232,0,106,0.2); color: var(--pink); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.stat-change { font-size: 11px; margin-top: 6px; color: var(--green); }

/* Admin OCR Upload Section */
.admin-card {
  background: #160D35; border-radius: 14px; padding: 20px;
  border: 1px solid rgba(255,255,255,0.06); margin-bottom: 20px;
}
.admin-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-card h2 svg { width: 18px; height: 18px; color: var(--purple-light); }

.upload-zone {
  border: 2px dashed rgba(91,46,204,0.4);
  border-radius: 12px; padding: 32px;
  text-align: center; cursor: pointer;
  transition: all .2s; background: rgba(91,46,204,0.05);
}
.upload-zone:hover { border-color: var(--purple-light); background: rgba(91,46,204,0.1); }
.upload-zone svg { width: 40px; height: 40px; color: var(--purple-light); margin-bottom: 8px; }
.upload-zone p { color: rgba(255,255,255,0.6); font-size: 13px; }
.upload-zone span { color: var(--purple-light); font-weight: 600; }
#ticket-file-input { display: none; }

.ocr-preview { display: none; }
.ocr-preview.show { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; }
.ocr-img-wrap { width: 200px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.ocr-img-wrap img { width: 100%; display: block; }
.ocr-result-box { flex: 1; }
.ocr-field { margin-bottom: 12px; }
.ocr-field label { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.ocr-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 14px;
  color: white; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 700;
  outline: none; letter-spacing: 1px;
  transition: border-color .2s;
}
.ocr-input:focus { border-color: var(--purple-light); }
.ocr-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; margin-bottom: 12px;
  padding: 8px 12px; border-radius: 8px;
}
.ocr-status.processing { background: rgba(255,214,0,0.1); color: var(--gold); }
.ocr-status.success    { background: rgba(24,184,106,0.1); color: var(--green); }
.ocr-status.error      { background: rgba(224,32,32,0.1); color: #ff6b6b; }
.ocr-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ocr-dot.pulse { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.admin-btn {
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-btn svg { width: 16px; height: 16px; }
.admin-btn.primary { background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: white; }
.admin-btn.success { background: rgba(24,184,106,0.2); color: var(--green); border: 1px solid var(--green); }
.admin-btn.danger  { background: rgba(224,32,32,0.15); color: #ff6b6b; border: 1px solid #ff6b6b; }
.admin-btn:hover   { transform: translateY(-1px); }

/* Admin Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 10px 14px;
  color: rgba(255,255,255,0.4); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.status-badge.active  { background: rgba(24,184,106,0.15); color: var(--green); }
.status-badge.pending { background: rgba(255,214,0,0.15); color: var(--gold); }
.status-badge.closed  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.4); }
.status-badge.won     { background: rgba(91,46,204,0.2); color: var(--purple-light); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Toast */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1A1A2E; color: white; padding: 12px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600; z-index: 9999;
  opacity: 0; transition: all .3s; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; }
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid #ff6b6b; }

/* Shimmer loading */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 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} }

/* Responsive admin */
@media (max-width: 900px) {
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}

/* ---- Side Drawer Menu (hamburger / More) ---- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 998; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 78%; max-width: 300px;
  background: var(--white);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.drawer-panel.open { transform: translateX(0); }
.drawer-header {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  padding: 24px 18px 18px;
  display: flex; align-items: center; gap: 12px;
}
.drawer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 18px;
}
.drawer-header .name { color: white; font-weight: 700; font-size: 15px; }
.drawer-header .sub { color: rgba(255,255,255,0.75); font-size: 11px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
}
.drawer-link:active { background: var(--bg); }
.drawer-link svg { width: 19px; height: 19px; color: var(--purple); flex-shrink: 0; }
.drawer-divider { height: 1px; background: var(--border); margin: 8px 0; }
.drawer-link.logout { color: var(--red); }
.drawer-link.logout svg { color: var(--red); }
.drawer-close {
  position: absolute; top: 18px; right: 14px;
  background: rgba(255,255,255,0.2); border: none; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white;
}
