/* =====================================================
   Shubh Graphics Photo Studio - Premium Black & Gold Theme
   ===================================================== */

:root {
  --bg-dark: #0a0a0a;
  --bg-card: #121212;
  --bg-elevated: #1a1a1a;
  --gold: #d4af37;
  --gold-light: #f0d878;
  --gold-dark: #b8860b;
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f0d878 50%, #b8860b 100%);
  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --text-muted: #888888;
  --border-gold: rgba(212, 175, 55, 0.35);
  --success: #28a745;
  --danger: #dc3545;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.25);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--gold-light);
}

/* ---------- Typography ---------- */
.logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold-gradient);
}

/* ---------- Buttons ---------- */
.btn-gold {
  background: var(--gold-gradient);
  color: #000 !important;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
  color: #000 !important;
}
.btn-gold:active {
  transform: translateY(0);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold) !important;
  border: 1.5px solid var(--gold);
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: #000 !important;
}

.btn-dark-gold {
  background: var(--bg-elevated);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: all 0.2s;
}
.btn-dark-gold:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
}

/* ---------- Cards ---------- */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card-dark:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.1);
}

.card-header-gold {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), transparent);
  border-bottom: 1px solid var(--border-gold);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--gold);
}

/* ---------- Navbar ---------- */
.navbar-shubh {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  padding: 0.75rem 0;
}
.navbar-brand {
  font-size: 1.35rem;
}
.nav-link-shubh {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-link-shubh:hover,
.nav-link-shubh.active {
  color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.1);
}

/* ---------- Mobile Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 18, 0.98);
  border-top: 1px solid var(--border-gold);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  transition: color 0.2s;
}
.bottom-nav a i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}
.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--gold);
}

/* ---------- Forms ---------- */
.form-control-dark {
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
}
.form-control-dark:focus {
  background: var(--bg-elevated);
  border-color: var(--gold);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}
.form-control-dark::placeholder {
  color: var(--text-muted);
}
.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

/* ---------- Photo Grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.25s;
  cursor: pointer;
  background: var(--bg-elevated);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.photo-item:hover img {
  transform: scale(1.05);
}
.photo-item.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}
.photo-item .select-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s;
}
.photo-item.selected .select-check {
  background: var(--gold);
  color: #000;
}

/* ---------- Splash ---------- */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}
.splash-screen.hide {
  opacity: 0;
  visibility: hidden;
}
.splash-logo {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: pulse-gold 2s infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

/* ---------- Hero / Home ---------- */
.hero-section {
  background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.12), transparent 60%),
              var(--bg-dark);
  padding: 2rem 0 3rem;
  text-align: center;
}
.hero-tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ---------- Event Cards ---------- */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}
.event-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.event-card-body {
  padding: 1rem;
}
.event-type-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.4rem;
}

/* ---------- Face Scan ---------- */
.face-scan-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
}
.face-scan-circle::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--gold-light);
  animation: spin 1.5s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Billing / Invoice ---------- */
.invoice-box {
  background: #fff;
  color: #111;
  border-radius: var(--radius);
  padding: 1.5rem;
}
.invoice-box .table {
  color: #111;
}

/* ---------- Admin Sidebar ---------- */
.admin-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border-gold);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  left: 0;
  top: 0;
  padding-top: 70px;
  z-index: 100;
}
.admin-sidebar .nav-link {
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border-left-color: var(--gold);
}
.admin-content {
  margin-left: 260px;
  padding: 1.5rem;
  min-height: 100vh;
}
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-content {
    margin-left: 0;
  }
}

/* ---------- Stats Cards ---------- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Utilities ---------- */
.text-gold { color: var(--gold) !important; }
.bg-dark-card { background: var(--bg-card); }
.border-gold { border-color: var(--border-gold) !important; }
.shadow-gold { box-shadow: var(--shadow-gold); }

.page-wrapper {
  padding-bottom: 80px; /* space for bottom nav on mobile */
}
@media (min-width: 992px) {
  .page-wrapper {
    padding-bottom: 2rem;
  }
}

/* Loading spinner */
.spinner-gold {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Alert styling */
.alert-shubh {
  border-radius: var(--radius-sm);
  border: 1px solid;
}
.alert-success-shubh {
  background: rgba(40, 167, 69, 0.15);
  border-color: #28a745;
  color: #7dcea0;
}
.alert-danger-shubh {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #f5a9a9;
}
.alert-info-shubh {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* PWA install banner */
.pwa-banner {
  position: fixed;
  bottom: 70px;
  left: 12px;
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: none;
  z-index: 1100;
  box-shadow: var(--shadow);
}
.pwa-banner.show {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
