:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --accent-emerald: #10b981;
  --accent-sapphire: #3b82f6;
  --accent-whatsapp: #25d366;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

[data-theme="emerald"] {
  --accent-gold: #10b981;
  --accent-gold-glow: rgba(16, 185, 129, 0.25);
}

[data-theme="sapphire"] {
  --accent-gold: #3b82f6;
  --accent-gold-glow: rgba(59, 130, 246, 0.25);
}

[data-theme="clean"] {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.9);
  --accent-gold: #38bdf8;
  --accent-gold-glow: rgba(56, 189, 248, 0.25);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

/* ================= AUTH SCREEN ================= */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: fadeInDown 0.4s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-gold), #fff2b2);
  color: #0b0f19;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 18px var(--accent-gold-glow);
}

.logo-text {
  text-align: left;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: block;
  line-height: 1.1;
}

.logo-title span {
  color: var(--accent-gold);
}

.logo-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

select.form-control option {
  background: #111827;
  color: #fff;
}

.help-text {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.4;
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #e8c458);
  color: #0b0f19;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px var(--accent-gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-gold-glow);
}

.btn-block {
  width: 100%;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-footer a:hover {
  color: var(--accent-gold);
}

/* ================= DASHBOARD ================= */
.dashboard-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.venue-active-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  padding-left: 24px;
  border-left: 1px solid var(--border-glass);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-logout {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ================= CONTENT & STATS ================= */
.dashboard-content {
  max-width: 1340px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px 64px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.icon-gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.icon-sapphire {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-sapphire);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.icon-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  color: var(--accent-whatsapp);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================= EDIT FORM GRID ================= */
.edit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-header i {
  color: var(--accent-gold);
  font-size: 18px;
}

.panel-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.panel-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* THEME SELECTION */
.theme-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.theme-card {
  position: relative;
  cursor: pointer;
}

.theme-card input {
  position: absolute;
  opacity: 0;
}

.theme-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.theme-card input:checked + .theme-preview {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.theme-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.theme-tag {
  font-size: 11px;
  color: var(--text-dim);
}

/* IMAGES & UPLOAD */
.image-upload-wrapper {
  display: flex;
  gap: 16px;
  align-items: center;
}

.current-cover-preview {
  width: 140px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.current-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-upload {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-gold);
}

.btn-upload-multi {
  width: 100%;
  margin-top: 12px;
}

.gallery-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-thumb-item {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* FORM ROWS */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

.input-with-icon .form-control {
  padding-left: 40px;
}

/* SAVE BAR */
.save-bar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.save-status {
  font-size: 14px;
  font-weight: 600;
}

.save-status.success {
  color: #10b981;
}

.save-status.error {
  color: #ef4444;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
  }
  .venue-active-title {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .theme-selector-grid {
    grid-template-columns: 1fr;
  }
  .image-upload-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .current-cover-preview {
    width: 100%;
    height: 160px;
  }
  .save-bar-panel {
    flex-direction: column;
    text-align: center;
  }
  .btn-large {
    width: 100%;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
