:root {
  --bg-main: #07090e;
  --bg-sidebar: #0d121c;
  --bg-card: rgba(18, 24, 38, 0.95);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-gold: rgba(212, 175, 55, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-gold: #d4af37;
  --accent-gold-bright: #fcd34d;
  --accent-gold-glow: rgba(212, 175, 55, 0.3);
  --accent-emerald: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

* {
  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;
}

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

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  text-align: center;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-gold), #fff2b2);
  color: #0b0f19;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

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

.logo-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.auth-card h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

/* FIX SELECT & OPTION VISIBILITY */
.form-control, select.form-control {
  width: 100%;
  background: #111827 !important;
  color: #f8fafc !important;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
}

select.form-control option {
  background: #111827 !important;
  color: #f8fafc !important;
  padding: 8px;
}

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

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  margin-bottom: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-bright));
  color: #0b0f19;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-gold-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-block { width: 100%; }

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

.admin-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 20px 16px;
}

.sidebar-header {
  margin-bottom: 28px;
  padding-left: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  color: var(--accent-gold-bright);
}

.sidebar-footer {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  display: flex;
  gap: 8px;
}

.btn-sidebar-link, .btn-sidebar-logout {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.btn-sidebar-logout { color: #f87171; }

/* MAIN CONTENT */
.admin-main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  max-width: 1300px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.tab-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tab-header p {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* DATA TABLE */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-glass);
}

.data-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-glass);
  vertical-align: middle;
}

.table-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.creds-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-family: monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.action-btns-row {
  display: flex;
  gap: 6px;
}

.btn-icon-table {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  text-decoration: none;
}

.btn-icon-table.btn-del { color: #f87171; }

/* VENUE FORM GRID */
.venue-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.panel-head {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head i { color: var(--accent-gold); }

.panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-with-btn {
  display: flex;
  gap: 6px;
}

.btn-inline-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-resolve-loc {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.mail-alert-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12px;
  color: #a7f3d0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  line-height: 1.4;
}

.image-upload-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.img-preview-thumb {
  width: 90px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-glass);
}

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

.upload-btn-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-upload {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-upload-block { width: 100%; }

.gallery-thumbs-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

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

.admin-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-del-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  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: 10px;
}

.save-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.save-status {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.save-status.success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.save-status.error { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* CMS POINTS */
.cms-points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.cms-point-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cms-point-box h4 {
  font-size: 13px;
  color: var(--accent-gold);
}

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

@media (max-width: 768px) {
  .dashboard-wrapper { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
}
