/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary:      #FFD700;
  --primary-dim:  rgba(255, 215, 0, 0.15);
  --accent:       #E94560;
  --success:      #00C851;
  --dark:         #000000;
  --card:         #111111;
  --card2:        #1A1A1A;
  --border:       rgba(255, 215, 0, 0.15);
  --text-light:   #EEEEEE;
  --text-muted:   #777777;
  --gold-gradient: linear-gradient(135deg, #FFD700, #B8860B);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: #000;
  color: var(--text-light);
  min-height: 100vh;
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--primary-dim); border-radius: 10px; }

/* ── Navbar ─────────────────────────────────────── */
.navbar {
  background: #000 !important;
  border-bottom: 1px solid rgba(255,215,0,0.1);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar-brand img { width: 36px; height: 36px; object-fit: contain; }
.navbar-brand span {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 2px;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; color: #000;
  box-shadow: 0 0 12px rgba(255,215,0,0.3);
}
.nav-name { font-size: 14px; font-weight: 600; color: var(--text-light); }
.btn-logout {
  background: rgba(233,69,96,0.15);
  border: 1px solid rgba(233,69,96,0.4);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-logout:hover { background: var(--accent); color: #fff; }

/* ── Tab nav ─────────────────────────────────────── */
.tab-nav {
  background: #000;
  border-bottom: 1px solid rgba(255,215,0,0.08);
  display: flex;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
}
.tab-nav::-webkit-scrollbar { height: 0; }
.tab-btn {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  text-decoration: none;
}
.tab-btn:hover { color: var(--text-light); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-btn i { font-size: 15px; }

/* ── Cards ───────────────────────────────────────── */
.card-dark {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.card-dark2 {
  background: var(--card2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-gold {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(255,215,0,0.25);
  width: 100%;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,215,0,0.35); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-outline-gold {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(255,215,0,0.5);
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline-gold:hover { background: var(--primary-dim); color: var(--primary); }

.btn-success-fill {
  background: rgba(0,200,81,0.15);
  border: 1px solid rgba(0,200,81,0.4);
  color: var(--success);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-success-fill:hover { background: var(--success); color: #000; }

.btn-danger-fill {
  background: rgba(233,69,96,0.15);
  border: 1px solid rgba(233,69,96,0.4);
  color: var(--accent);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger-fill:hover { background: var(--accent); color: #fff; }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn-whatsapp:hover { background: #1ebe5d; color: #fff; transform: translateY(-1px); }

/* ── Form fields ─────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control-dark {
  width: 100%;
  background: #000;
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  color: var(--text-light);
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}
.form-control-dark:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,215,0,0.1); }
.form-control-dark::placeholder { color: var(--text-muted); }
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 15px;
}
.input-suffix {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
}
.input-suffix:hover { color: var(--text-light); }

/* ── Auth pages ─────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo img { width: 90px; height: 90px; object-fit: contain; margin-bottom: 12px; }
.auth-logo h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 4px;
}
.auth-logo p { font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 2px; }
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 0 40px rgba(255,215,0,0.12);
}
.auth-card h2 { font-size: 20px; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; }
.auth-card p { font-size: 13px; color: #666; margin-bottom: 24px; }
/* Light fields inside white card */
.field-light {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  color: #1a1a1a;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.field-light:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,215,0,0.15); }
.field-light::placeholder { color: #aaa; }
.field-icon-light {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 15px;
}
.field-suffix-light {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
}
.field-suffix-light:hover { color: #555; }
.form-label-light {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.forgot-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  float: right;
}
.forgot-link:hover { text-decoration: underline; color: var(--primary); }
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.45);
}
.auth-switch a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.error-msg {
  background: rgba(233,69,96,0.1);
  border: 1px solid rgba(233,69,96,0.3);
  color: var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ── Draw cards ─────────────────────────────────── */
.draw-card {
  border-radius: 20px;
  border: 1.5px solid;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.draw-card:hover { transform: translateY(-2px); }
.draw-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.draw-emoji-circle {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.draw-title { font-size: 16px; font-weight: 800; flex: 1; line-height: 1.3; }
.draw-subtitle { font-size: 11px; opacity: 0.65; margin-top: 2px; }
.draw-body { padding: 16px 18px; }
.draw-info-row { display: flex; gap: 10px; margin-bottom: 10px; }
.draw-info-tile {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.draw-info-tile .tile-label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.draw-info-tile .tile-value { font-size: 14px; font-weight: 800; }
.countdown-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.06);
}
.progress-block {
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}
.progress-block .prog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.progress-bar-wrap {
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar-fill { height: 100%; border-radius: 8px; transition: width 0.5s ease; }
.prog-sub { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); }

/* Status badges */
.badge-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.badge-active   { background: rgba(255,215,0,0.15); color: var(--primary); border: 1px solid rgba(255,215,0,0.4); }
.badge-completed{ background: rgba(0,200,81,0.15);  color: var(--success); border: 1px solid rgba(0,200,81,0.4); }
.badge-cancelled{ background: rgba(233,69,96,0.15); color: var(--accent);  border: 1px solid rgba(233,69,96,0.4); }
.badge-upcoming { background: rgba(100,100,255,0.15); color: #aaaaff; border: 1px solid rgba(100,100,255,0.4); }
.badge-pending  { background: rgba(255,215,0,0.1);  color: var(--primary); border: 1px solid rgba(255,215,0,0.3); }
.badge-approved { background: rgba(0,200,81,0.12);  color: var(--success); border: 1px solid rgba(0,200,81,0.3); }
.badge-rejected { background: rgba(233,69,96,0.12); color: var(--accent);  border: 1px solid rgba(233,69,96,0.3); }

/* Ticket section */
.ticket-section {
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
  transition: all 0.2s;
}
.ticket-section.clickable { cursor: pointer; }
.ticket-section.clickable:hover { transform: translateY(-1px); }
.ticket-icon-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ticket-label { font-size: 13px; font-weight: 700; }
.ticket-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.view-chip {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* ── Section label ───────────────────────────────── */
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-label h3 { font-size: 15px; font-weight: 800; color: #fff; }
.section-count {
  background: var(--card2);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── Empty state ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
}
.empty-state .empty-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-dim);
  border: 1px solid rgba(255,215,0,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  margin: 0 auto 16px;
}
.empty-state h4 { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ── Greet card ──────────────────────────────────── */
.greet-card {
  background: #000;
  border-bottom: 1px solid #1a1a1a;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.greet-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: #000;
  box-shadow: 0 0 16px rgba(255,215,0,0.3);
  flex-shrink: 0;
}
.greet-text h3 { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.2; }
.greet-text p  { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.live-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,200,81,0.12);
  border: 1px solid rgba(0,200,81,0.35);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 1px;
  flex-shrink: 0;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── History cards ───────────────────────────────── */
.history-card {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid;
  transition: transform 0.2s;
}
.history-card:hover { transform: translateY(-1px); }
.history-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-body { padding: 14px 16px; }

/* ── Winner cards ────────────────────────────────── */
.winner-card {
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1.5px solid;
  transition: transform 0.2s;
}
.winner-card:hover { transform: translateY(-2px); }
.winner-card.first {
  box-shadow: 0 8px 28px rgba(255,215,0,0.2);
}

/* ── Toast ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-light);
  min-width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-color: rgba(0,200,81,0.4); }
.toast.error   { border-color: rgba(233,69,96,0.4); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modal ───────────────────────────────────────── */
.modal-dark .modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-light);
}
.modal-dark .modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 24px 16px;
}
.modal-dark .modal-title { font-weight: 800; color: var(--primary); font-size: 18px; }
.modal-dark .modal-body  { padding: 20px 24px; }
.modal-dark .modal-footer{
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
}
.modal-dark .btn-close { filter: invert(1); opacity: 0.5; }

/* ── Upload area ─────────────────────────────────── */
.upload-area {
  border: 2px dashed rgba(255,215,0,0.3);
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-dim); }
.upload-area.has-file { border-style: solid; border-color: var(--success); }
.upload-area img.preview {
  max-height: 180px;
  border-radius: 8px;
  object-fit: contain;
}

/* ── Participants grid ───────────────────────────── */
.participant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card2);
  border-radius: 10px;
  margin-bottom: 8px;
  border-left: 3px solid;
}
.ticket-num-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 576px) {
  .draw-info-row { flex-wrap: wrap; }
  .draw-info-tile { min-width: calc(50% - 5px); }
  .greet-text h3 { font-size: 17px; }
  .auth-card { padding: 22px 18px; }
}
