/* ============================================================
   Leula Events Management Portal — Liquid Orange & White Design System
   Exact match to Neilos Portal Architecture with Orange & White Identity
   Primary Accent: #FF7A00 | Surface: #FFFFFF | Background: #F7F7F8
   ============================================================ */

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

/* ============================================================
   1. Design Tokens & Theme Variables
   ============================================================ */
:root {
  /* Surfaces & Backgrounds */
  --bg:             #F7F7F8;
  --surface:        #FFFFFF;
  --surface-2:      #FFFFFF;
  --surface-3:      #F4F4F6;
  --surface-hover:  #FFF5EB;

  /* Borders */
  --border:         rgba(0, 0, 0, 0.08);
  --border-hover:   rgba(0, 0, 0, 0.16);
  --border-focus:   rgba(255, 122, 0, 0.5);

  /* Typography Colors */
  --text-primary:   #09090B;
  --text-secondary: #52525B;
  --text-muted:     #A1A1AA;
  --text-inverse:   #FFFFFF;

  /* Primary Accent — Liquid Vibrant Orange */
  --accent:         #FF7A00;
  --accent-light:   #FFA64D;
  --accent-dark:    #E96800;
  --accent-glow:    rgba(255, 122, 0, 0.16);
  --accent-pale:    rgba(255, 122, 0, 0.08);
  --accent-rgb:     255, 122, 0;

  /* Semantic Colors */
  --success:        #059669;
  --success-light:  rgba(5, 150, 105, 0.09);
  --success-text:   #065F46;
  --warning:        #D97706;
  --warning-light:  rgba(217, 119, 6, 0.09);
  --warning-text:   #92400E;
  --danger:         #DC2626;
  --danger-light:   rgba(220, 38, 38, 0.09);
  --danger-text:    #991B1B;
  --info:           #2563EB;
  --info-light:     rgba(37, 99, 235, 0.09);
  --info-text:      #1E40AF;

  /* Layout Measurements */
  --sidebar-w:      264px;
  --sidebar-w-mini: 68px;
  --header-h:       64px;

  /* Border Radii */
  --radius:         16px;
  --radius-sm:      10px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --radius-full:    9999px;

  /* Crisp Premium Shadows */
  --shadow:         0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md:      0 4px 12px rgba(0, 0, 0, 0.07), 0 12px 32px rgba(0, 0, 0, 0.05);
  --shadow-lg:      0 20px 60px rgba(0, 0, 0, 0.09), 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-accent:  0 4px 20px rgba(255, 122, 0, 0.28);
  --shadow-glow:    0 0 0 1px rgba(255, 122, 0, 0.25), 0 0 20px rgba(255, 122, 0, 0.12);

  /* Transitions */
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
  --transition:     all 240ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow:all 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   2. Base Reset & Typography
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 200ms ease;
}
a:hover { color: var(--accent-dark); }

img, canvas, svg { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6,
.page-title, .card-title, .modal-title, .brand-title {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ============================================================
   3. Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.25); }

/* ============================================================
   4. Layout Architecture
   ============================================================ */
.portal-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================================================
   5. Sidebar Navigation (Neilos Clean Light Structure)
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s var(--ease), width 0.3s var(--ease);
}

.sidebar-logo {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: #FFFFFF;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: 100%;
}

.sidebar-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF7A00 0%, #E96800 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.35);
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}
.sidebar-logo-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: #09090B;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sidebar-logo-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #FF7A00;
  letter-spacing: 0.8px;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-section-label {
  padding: 16px 20px 6px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  margin: 1px 10px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  text-decoration: none;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-link.active {
  color: var(--accent-dark);
  background: var(--accent-pale);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.22);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 3.5px;
  background: var(--accent);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-link svg, .nav-link .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 200ms, color 200ms;
}
.nav-link:hover svg, .nav-link:hover .nav-icon {
  opacity: 1;
  color: var(--accent);
}
.nav-link.active svg, .nav-link.active .nav-icon {
  opacity: 1;
  color: var(--accent);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
  flex-shrink: 0;
}

/* Sidebar Footer Profile */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #FFFFFF;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  color: inherit;
}
.sidebar-user:hover { background: var(--surface-hover); }

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF7A00 0%, #FFA64D 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.28);
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Collapsed Sidebar State (Desktop Mini Rail) */
.sidebar.collapsed { width: var(--sidebar-w-mini); }
.sidebar.collapsed .sidebar-logo { padding: 14px 0; justify-content: center; }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-user-info { display: none !important; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px 0; margin: 1px 8px; }
.sidebar.collapsed .nav-link.active::after { display: none; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 6px 0; }

/* ============================================================
   6. Main Content Area & Fixed Topbar
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1 1 0%;
  min-width: 0;
  max-width: calc(100% - var(--sidebar-w));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  box-sizing: border-box;
  transition: margin-left 0.3s var(--ease), max-width 0.3s var(--ease);
}
.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-w-mini);
  max-width: calc(100% - var(--sidebar-w-mini));
}

.topbar {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hamburger {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.hamburger:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 122, 0, 0.35);
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.hamburger:hover span { background: var(--accent); }

.topbar-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.topbar-btn:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: rgba(255, 122, 0, 0.35);
}

/* ============================================================
   7. Page Content & Page Header
   ============================================================ */
.page-content {
  padding: 28px;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  animation: fadeUp 0.45s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 4px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   8. Stats Grid & Cards (Neilos Signature Clean Cards)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 260ms var(--ease), border-color 260ms var(--ease), transform 260ms var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 122, 0, 0.3);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.stat-icon.orange { background: rgba(255, 122, 0, 0.12); color: #FF7A00; }
.stat-icon.green  { background: rgba(5, 150, 105, 0.12); color: #059669; }
.stat-icon.yellow { background: rgba(217, 119, 6, 0.12); color: #D97706; }
.stat-icon.red    { background: rgba(220, 38, 38, 0.12); color: #DC2626; }
.stat-icon.blue   { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.stat-icon.navy   { background: rgba(15, 76, 129, 0.12); color: #0F4C81; }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

/* Generic Container Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.card:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body { padding: 24px; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-3);
  font-size: 0.85rem;
}

/* Grid Layout Helpers */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-dashboard { grid-template-columns: 2fr 1fr; }

/* ============================================================
   9. Buttons (Neilos Pill & Rounded Buttons with Orange Focus)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.3;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.32);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.42);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 122, 0, 0.35);
  color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-pale);
  color: var(--accent-dark);
}

.btn-success { background: var(--success); color: #FFFFFF !important; }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--danger); color: #FFFFFF !important; }
.btn-danger:hover { background: #B91C1C; }

.btn-sm  { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg  { padding: 12px 28px; font-size: 0.95rem; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--radius-sm); }

/* ============================================================
   10. Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.3;
}
.badge-primary   { background: var(--accent-pale); color: #E96800; border: 1px solid rgba(255, 122, 0, 0.28); }
.badge-success   { background: var(--success-light); color: var(--success-text); border: 1px solid rgba(5, 150, 105, 0.22); }
.badge-danger    { background: var(--danger-light); color: var(--danger-text); border: 1px solid rgba(220, 38, 38, 0.22); }
.badge-warning   { background: var(--warning-light); color: var(--warning-text); border: 1px solid rgba(217, 119, 6, 0.22); }
.badge-info      { background: var(--info-light); color: var(--info-text); border: 1px solid rgba(37, 99, 235, 0.22); }
.badge-secondary { background: var(--surface-3); color: var(--text-secondary); border: 1px solid var(--border); }

/* ============================================================
   11. Data Tables (Enterprise Neilos Clean Table Design)
   ============================================================ */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
}

.data-table thead tr {
  background: var(--surface-3);
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 13px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  vertical-align: middle;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}

.data-table tbody tr {
  transition: background 150ms ease;
}
.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

/* ============================================================
   12. Form Controls & Inputs
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: #FFFFFF;
  transition: var(--transition);
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

textarea.form-control { resize: vertical; min-height: 96px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Filter & Search Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  flex: 1 1 240px;
  min-height: 40px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-box input {
  border: none;
  background: none;
  outline: none;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 100%;
}
.search-box svg { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   13. Modals (Centred Overlay with Glass Blur)
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s var(--ease);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}
.modal-lg { max-width: 820px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger-text);
  border-color: rgba(220, 38, 38, 0.3);
}

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-3);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* ============================================================
   14. Tabs
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 4px;
  overflow-x: auto;
}

.tab-btn {
  padding: 11px 20px;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

/* ============================================================
   15. Alerts with Live Countdown Bar (Neilos Feature)
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-success { background: var(--success-light); color: var(--success-text); border: 1px solid rgba(5, 150, 105, 0.25); }
.alert-danger  { background: var(--danger-light);  color: var(--danger-text);  border: 1px solid rgba(220, 38, 38, 0.25); }
.alert-warning { background: var(--warning-light); color: var(--warning-text); border: 1px solid rgba(217, 119, 6, 0.25); }
.alert-info    { background: var(--info-light);    color: var(--info-text);    border: 1px solid rgba(37, 99, 235, 0.25); }

/* ============================================================
   16. Auth Pages (Login & Register)
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 44px 40px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FF7A00, #E96800);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(255, 122, 0, 0.35);
}
.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   17. QR Scanner & Digital Pass Specialized Styles
   ============================================================ */
.scanner-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .scanner-container { grid-template-columns: 1fr; }
}

.scanner-box {
  background: #09090B;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.scanner-laser {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #FF7A00;
  box-shadow: 0 0 16px #FF7A00;
  animation: laserScan 2s ease-in-out infinite alternate;
  z-index: 5;
}

@keyframes laserScan {
  from { top: 15%; }
  to   { top: 85%; }
}

/* Pass Presentation Card */
.digital-pass-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 440px;
  margin: 0 auto;
}
.digital-pass-header {
  background: linear-gradient(135deg, #FF7A00 0%, #E96800 100%);
  color: #FFFFFF;
  padding: 28px 24px;
  text-align: center;
  position: relative;
}
.digital-pass-body {
  padding: 28px 24px;
  text-align: center;
}
.digital-pass-qr {
  display: inline-block;
  padding: 14px;
  background: #FFFFFF;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  margin: 16px 0;
}

/* ============================================================
   18. Full Device Responsiveness (Neilos Exact Breakpoints)
   ============================================================ */
/* Mobile: <= 767px */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w);
    z-index: 1060;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 50px rgba(0, 0, 0, 0.35);
  }
  .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
  }
  .sidebar.collapsed + .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
  }

  .page-content { padding: 18px 16px !important; }
  .topbar { padding: 0 16px !important; }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .grid-2, .grid-3, .grid-dashboard,
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

/* Very Small Mobile: <= 480px */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .login-card {
    padding: 30px 20px;
  }
}

/* Tablet & Small Laptop: 768px – 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w);
    z-index: 1060;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 50px rgba(0, 0, 0, 0.35);
  }
  .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
  }
  .sidebar.collapsed + .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .grid-dashboard {
    grid-template-columns: 1fr !important;
  }
}

/* Desktop: 1025px+ */
@media (min-width: 1025px) {
  .sidebar { transform: translateX(0) !important; }
  .sidebar-overlay { display: none !important; }
}

/* Ultrawide Screens: >= 1440px */
@media (min-width: 1440px) {
  .page-content {
    max-width: 1540px;
    margin: 0 auto;
    padding: 32px;
  }
}

