/* ═══════════════════════════════════════════
   LED Billboard — User Panel style.css
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Exo+2:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ── Variables ── */
:root {
  --bg-primary:    #0a0c18;
  --bg-card:       #1a2332;
  --bg-secondary:  #141b28;
  --border:        rgba(26,42,69,.6);
  --border2:       rgba(26,42,69,.8);
  --accent-blue:   #4a9eff;
  --accent-cyan:   #00e6f6;
  --accent-green:  #00e676;
  --accent-red:    #ff3d71;
  --accent-yellow: #ffd700;
  --accent-purple: #7c4dff;
  --text-primary:  #e8eaed;
  --text-muted:    #8899bb;
  --text-sub:      #6b7688;
  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Exo 2', sans-serif;
  --font-mono:     'Share Tech Mono', monospace;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  
  /* Dark theme variables for compatibility */
  --dark-card:     #1a2332;
  --dark-border:   rgba(26,42,69,.6);
  --dark-secondary: #141b28;
  --text-danger:   #ff3d71;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(136,153,187,.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(136,153,187,.6); }

/* ── Typography helpers ── */
.font-raj { font-family: var(--font-display); }
.mono     { font-family: var(--font-mono); }

/* ════════════════════════
   SIDE NAVBAR
════════════════════════ */
.side-navbar {
  position: fixed;
  top: 0; left: 0;
  width: 220px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 999;
  overflow-y: auto;
  transition: transform .3s;
}
.side-nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.navbar-brand-logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.navbar-brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  white-space: nowrap;
}
.side-nav-links {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav-link-item {
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  display: flex;
  gap: 10px;
}
.nav-link-item i { font-size: 1rem; flex-shrink: 0; }
.nav-link-item:hover { color: var(--text-primary); background: rgba(255,215,0,.08); }
.nav-link-item.active { color: var(--accent-cyan); background: rgba(255,215,0,.14); }
.side-nav-bottom {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.side-nav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  margin-bottom: 12px;
}
.side-nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .8rem;
  width: 100%;
}
.side-nav-user {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.side-nav-user:hover { background: rgba(255,215,0,.08); }
.nav-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
  flex-shrink: 0;
  border: 2px solid var(--border2);
  transition: border-color .2s;
}
.nav-user-avatar:hover { border-color: var(--accent-blue); }
.side-nav-notif {
  position: relative; display: inline-flex;
}

/* Main content shifts right */
.main-content {
  margin-left: 220px;
  min-height: 100vh;
}

/* Top bar on mobile */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 998;
}
.hamburger-btn {
  background: none; border: none;
  color: var(--text-primary); font-size: 1.3rem;
  cursor: pointer; padding: 4px;
}


/* ════════════════════════
   CARDS
════════════════════════ */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-dark:hover { border-color: var(--border2); }

/* ════════════════════════
   FORM ELEMENTS
════════════════════════ */
.form-control, .form-select {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border2) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body);
  font-size: .84rem;
  border-radius: var(--radius-sm) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 3px rgba(255,215,0,.18) !important;
  outline: none;
}
.form-control::placeholder { color: var(--text-sub); }
.form-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
  font-weight: 600;
}
.form-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238899bb' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 36px !important;
  cursor: pointer !important;
}
.form-select option { background: var(--bg-secondary); }
.form-select:disabled { opacity: .42 !important; cursor: not-allowed !important; }

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2); cursor: pointer;
}

/* ════════════════════════
   BADGES
════════════════════════ */
.badge-active   { background: rgba(0,230,118,.12) !important; color: var(--accent-green)  !important; }
.badge-inactive { background: rgba(255,61,113,.10) !important; color: var(--accent-red)    !important; }
.badge-pending  { background: rgba(255,170,0,.10)  !important; color: var(--accent-yellow) !important; }
.badge-done     { background: rgba(255,215,0,.15) !important; color: var(--accent-cyan)   !important; }
.badge-booked   { background: rgba(255,170,0,.12)  !important; color: var(--accent-cyan)   !important; }
.badge-expired  { background: rgba(124,77,255,.15) !important; color: var(--accent-purple) !important; }
.badge-paid     { background: rgba(0,230,118,.12)  !important; color: var(--accent-green)  !important; }
.badge-unpaid   { background: rgba(255,61,113,.12) !important; color: var(--accent-red)    !important; }

/* ════════════════════════
   BUTTONS
════════════════════════ */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--accent-blue), #cc8800);
  border: none;
  color: #000;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .5px;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 15px rgba(255,215,0,.3);
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,215,0,.45); }

.btn-outline-custom {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-size: .82rem;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
}
.btn-outline-custom:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* ════════════════════════
   TABLES
════════════════════════ */
/* Bootstrap override — no white cells */
.table {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--text-primary) !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-hover-bg: rgba(255,215,0,.05) !important;
  --bs-table-border-color: rgba(26,42,69,.6) !important;
  color: var(--text-primary) !important;
}
.table > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--text-primary) !important;
  border-color: rgba(26,42,69,.6) !important;
}
.table thead > tr > * {
  background: var(--bg-secondary) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}
.table tbody tr:hover > * {
  background-color: rgba(255,215,0,.05) !important;
}

.tbl thead th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-color: var(--border);
  font-weight: 600;
  white-space: nowrap;
  padding: 10px 14px;
}
.tbl td {
  font-size: .82rem;
  color: var(--text-primary);
  border-color: rgba(26,42,69,.6);
  vertical-align: middle;
  padding: 11px 14px;
}
.tbl tbody tr:hover td { background: rgba(255,215,0,.04); }

/* ════════════════════════
   STAT ICON BOX
════════════════════════ */
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

/* ════════════════════════
   HERO / PAGE HEADER
════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, #0a0a00 0%, #141400 50%, #0a0a0a 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,215,0,.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ════════════════════════
   PROGRESS BAR
════════════════════════ */
.prog-bar { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 4px; transition: width .8s ease; }

/* ════════════════════════
   PAGINATION
════════════════════════ */
.page-link {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  font-size: .78rem;
}
.page-item.active .page-link {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #000 !important;
}

/* ════════════════════════
   FILTER BAR
════════════════════════ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar .form-select,
.filter-bar .form-control { font-size: .76rem; padding: 5px 10px; height: 34px; min-width: 130px; max-width: 180px; }
.filter-bar .form-control { max-width: 160px; }

/* ════════════════════════
   MOBILE BOTTOM NAV
════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 999;
  padding: 8px 0 10px;
}
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer; text-decoration: none;
  color: var(--text-muted); font-size: .58rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  transition: color .15s;
}
.mob-nav-item.active, .mob-nav-item:hover { color: var(--accent-cyan); }
.mob-nav-item i { font-size: 1.15rem; }

@media (max-width: 767px) {
  .side-navbar { transform: translateX(-100%); }
  .side-navbar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-topbar { display: flex; }
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 60px; }
  .side-nav-overlay { display: block; }
}
.side-nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 998;
}

/* ════════════════════════
   MAP
════════════════════════ */
.leaflet-container { background: #aad3df !important; font-family: var(--font-body); }
.leaflet-tile-pane { filter: brightness(.82) saturate(.65); }
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  color: var(--text-primary);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.leaflet-popup-tip { background: var(--bg-card); }
.leaflet-popup-content { font-size: .76rem; margin: 8px 12px; }
.leaflet-popup-content b { color: var(--accent-cyan); }
.leaflet-control-zoom a { background: var(--bg-card) !important; color: var(--text-primary) !important; border-color: var(--border2) !important; }
.leaflet-control-attribution { background: rgba(8,12,24,.8) !important; color: var(--text-muted) !important; font-size: .55rem !important; }

/* ════════════════════════
   ANIMATIONS
════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp .4s ease both; }
.delay-1   { animation-delay: .08s; }
.delay-2   { animation-delay: .16s; }
.delay-3   { animation-delay: .24s; }
.delay-4   { animation-delay: .32s; }

/* ════════════════════════
   MODAL
════════════════════════ */
.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border2) !important;
  color: var(--text-primary) !important;
}
.modal-header, .modal-footer { border-color: var(--border) !important; }

/* ════════════════════════
   TOAST
════════════════════════ */
.toast-custom {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: .82rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp .3s ease;
  max-width: 320px;
}
