@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Palettes - ISKCON Heritage & Modern Vibrant Youth */
  --color-primary-base: #1E3A8A;       /* Royal Vedic Blue */
  --color-primary-accent: #F59E0B;     /* Sacred Saffron / Kesariya */
  --color-primary-gold: #D97706;       /* Warm Divine Gold */
  
  /* Department Identity Accents */
  --color-dept-boys: #2563EB;          /* Vibrant Sapphire */
  --color-dept-girls: #EC4899;         /* Rose / Padma Pink */
  
  /* Neutrals & Surfaces */
  --color-bg-canvas: #F8FAFC;          /* Clean soft pearl white */
  --color-surface-card: #FFFFFF;       /* Crisp white surface */
  --color-surface-elevated: #FFFFFF;
  --color-border-subtle: #E2E8F0;
  --color-border-focus: #F59E0B;
  --color-text-main: #0F172A;          /* Deep Slate */
  --color-text-muted: #64748B;
  --color-success: #10B981;
  --color-danger: #EF4444;

  /* Semantic helpers (used by the dark theme layer) */
  --color-surface-sunken: #F1F5F9;
  --color-surface-hover: #F8FAFC;
  --color-border-strong: #CBD5E1;
  --color-text-inverse: #FFFFFF;
  --color-link: #1D4ED8;
  --color-link-hover: #1E3A8A;
  --color-primary-text: #1E3A8A;        /* brand blue that is readable as text */

  /* Soft tinted surfaces (chips, callouts, status blocks) */
  --tint-blue-bg: #EFF6FF;
  --tint-blue-border: #BFDBFE;
  --tint-blue-text: #1D4ED8;
  --tint-green-bg: #ECFDF5;
  --tint-green-border: #A7F3D0;
  --tint-green-text: #065F46;
  --tint-amber-bg: #FFFBEB;
  --tint-amber-border: #FDE68A;
  --tint-amber-text: #92400E;
  --tint-red-bg: #FEF2F2;
  --tint-red-border: #FECACA;
  --tint-red-text: #991B1B;
  --tint-violet-bg: #F5F3FF;
  --tint-violet-border: #DDD6FE;
  --tint-violet-text: #6D28D9;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-card: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-glow: 0 0 25px -5px rgba(245, 158, 11, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-blur: blur(12px);

  /* Typography */
  --font-family-heading: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, sans-serif;
  --font-family-body: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, sans-serif;
  --font-family-mr: 'Noto Sans Devanagari', sans-serif;

  /* Layout & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

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

/* =========================================================
   SLEEK THEME SCROLLBAR SYSTEM (Modern WebKit & Firefox)
   Tailored to ISKCON Royal Vedic Blue & Warm Saffron Palette
   ========================================================= */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 58, 138, 0.35) transparent;
}

*:hover {
  scrollbar-color: rgba(30, 58, 138, 0.55) transparent;
}

/* WebKit / Chromium / Edge / Safari Global Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.35) 0%, rgba(217, 119, 6, 0.4) 100%);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: background 0.25s ease, transform 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.7) 0%, rgba(217, 119, 6, 0.8) 100%);
}

::-webkit-scrollbar-thumb:active {
  background: var(--color-primary-base);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--color-bg-canvas);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  width: 100%;
}

/* Dark-mode first-paint gate (set by the head bootstrap, cleared by app.js).
   Prevents a flash of light inline styles before the adapter runs. */
html.iys-booting {
  background-color: #0B1220;
}

html.iys-booting body {
  visibility: hidden;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* =========================================================
   GLOBAL STANDARDIZED FORM CONTROLS DESIGN SYSTEM
   Standardizes typography, sizing, heights, borders, focus rings,
   and placeholder styling across ALL input elements, selects, and textareas.
   ========================================================= */
:root {
  --input-height-base: 46px;
  --input-height-sm: 38px;
  --input-height-lg: 52px;
  --input-padding-x: 0.95rem;
  --input-font-size: 0.935rem;
  --input-border-color: #CBD5E1;
  --input-border-hover: #94A3B8;
  --input-border-focus: #2563EB;
  --input-bg: #FFFFFF;
  --input-bg-disabled: #F1F5F9;
  --input-color-disabled: #64748B;
  --input-shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

/* Universal Input Field Standards */
.form-input,
.form-control,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: var(--input-font-size);
  font-weight: 500;
  color: var(--color-text-main);
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem var(--input-padding-x);
  min-height: var(--input-height-base);
  line-height: 1.45;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

/* Single-line specific height lock */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="url"],
select {
  height: var(--input-height-base);
}

/* Select specific dropdown chevron */
select {
  cursor: pointer;
  padding-right: 2.25rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-position: right 0.85rem center;
  background-repeat: no-repeat;
  background-size: 1.15rem;
}

/* Textarea standard */
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Interactive States: Hover & Focus */
.form-input:hover:not(:disabled),
.form-control:hover:not(:disabled),
input[type="text"]:hover:not(:disabled),
input[type="tel"]:hover:not(:disabled),
input[type="email"]:hover:not(:disabled),
input[type="password"]:hover:not(:disabled),
input[type="number"]:hover:not(:disabled),
input[type="date"]:hover:not(:disabled),
input[type="datetime-local"]:hover:not(:disabled),
input[type="search"]:hover:not(:disabled),
input[type="url"]:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--input-border-hover);
}

.form-input:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--input-border-focus) !important;
  box-shadow: var(--input-shadow-focus) !important;
  background-color: #FFFFFF !important;
}

/* Disabled & Readonly State */
.form-input:disabled,
.form-input[readonly],
.form-control:disabled,
.form-control[readonly],
input:disabled,
input[readonly],
select:disabled,
textarea:disabled,
textarea[readonly] {
  background-color: var(--input-bg-disabled) !important;
  color: var(--input-color-disabled) !important;
  border-color: #E2E8F0 !important;
  cursor: not-allowed;
  opacity: 0.85;
}

/* Compact / Filter Input Modifier */
.form-input-sm,
.filter-group input,
.filter-group select {
  height: var(--input-height-sm);
  min-height: var(--input-height-sm);
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}

/* Checkbox & Radio Alignment */
input[type="checkbox"],
input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-primary-base);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Elegant, subtle, non-distracting input placeholders */
::placeholder {
  color: #94A3B8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
  font-size: 0.92em;
  letter-spacing: normal !important;
}

::-webkit-input-placeholder {
  color: #94A3B8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
  font-size: 0.92em;
  letter-spacing: normal !important;
}

::-moz-placeholder {
  color: #94A3B8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
  font-size: 0.92em;
  letter-spacing: normal !important;
}

:-ms-input-placeholder {
  color: #94A3B8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
  font-size: 0.92em;
  letter-spacing: normal !important;
}

/* Special fix for PIN password inputs so dots only appear when typing */
input[type="password"] {
  letter-spacing: normal;
}
input[type="password"]:not(:placeholder-shown) {
  letter-spacing: 0.25rem;
}

/* =========================================================
   THOUGHTFUL HEADER & NAVIGATION ARCHITECTURE
   ========================================================= */

/* 1. Sacred Persistent Top Bar */
.header-top-bar {
  background: linear-gradient(90deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  color: #E2E8F0;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0;
  line-height: 1.4;
}

.top-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sacred-crest-badge {
  color: var(--color-primary-accent);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.top-bar-temple {
  font-weight: 700;
  color: #F8FAFC;
  font-size: 0.78rem;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.top-bar-sep {
  color: #64748B;
  opacity: 0.5;
  flex-shrink: 0;
}

.top-bar-prabhupada {
  color: #FDE68A;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  gap: 0.25rem;
  align-items: baseline;
}

.prabhupada-prefix {
  opacity: 0.8;
  font-weight: 500;
}

.prabhupada-name {
  font-weight: 700;
  color: #FEF3C7;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.top-bar-mantra-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(254, 243, 199, 0.08);
  border: 1px solid rgba(253, 230, 138, 0.2);
  color: #FDE68A;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* 2. Main Sticky Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
  padding: 0.55rem 0;
  transition: all 0.2s ease;
}

.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

/* Brand Identity */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-crest-img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 2px;
  border: 1.5px solid #FDE68A;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.brand-link:hover .brand-crest-img {
  transform: scale(1.03);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-organization {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #B45309;
  white-space: nowrap;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--color-primary-base);
  letter-spacing: -0.2px;
  white-space: nowrap;
  line-height: 1.15;
  margin-top: 1px;
}

/* 3. Center Navigation Menu */
.nav-center-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  background: #F8FAFC;
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid #E2E8F0;
}

.nav-link {
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.38rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

.nav-link:hover {
  color: var(--color-primary-base);
  background: rgba(255, 255, 255, 0.8);
}

.nav-link.active {
  color: #FFFFFF;
  background: var(--color-primary-base);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.nav-link.active .nav-icon {
  opacity: 1;
}

/* Staff Dropdown Button inside Nav */
.nav-dropdown-item {
  position: relative;
}

.nav-dropdown-btn {
  border: none;
  cursor: pointer;
  background: none;
  font-family: inherit;
}

.staff-badge {
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid #FCD34D;
}

.dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 2px;
  color: #92400E;
}

/* Dropdown Menu Container */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 6px 16px -2px rgba(15, 23, 42, 0.08);
  min-width: 260px;
  padding: 0.5rem;
  z-index: 200;
  animation: dropdownFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-dropdown-menu.show {
  display: block;
}

/* ======================================================== */
/* EXECUTIVE MEGA-MENU (SEVAK PORTAL CONTROLS)              */
/* ======================================================== */
.nav-dropdown-mega {
  width: 820px;
  max-width: 95vw;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid #CBD5E1;
  overflow: hidden;
  background: #FFFFFF;
}

/* Top bar with Branding & Instant Search */
.mega-menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  border-bottom: 1px solid #E2E8F0;
}

.mega-title-wrap {
  flex: 1;
  min-width: 0;
}

.mega-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}

.mega-subtitle {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-search-wrap {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}

.mega-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.6;
}

.mega-search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2rem;
  font-size: 0.82rem;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-pill);
  outline: none;
  color: #1E293B;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.mega-search-input:focus {
  border-color: var(--color-primary-accent, #F59E0B);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Multi-Column Categorized Grid */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-height: 480px;
  overflow-y: auto;
  background: #FFFFFF;
}

@media (max-width: 1200px) {
  .nav-dropdown-mega {
    width: 680px;
  }
  .mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mega-col {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.75rem 1rem;
  border-right: 1px solid #F1F5F9;
  background: #FFFFFF;
}

.mega-col:last-child {
  border-right: none;
}

.mega-col-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  border-bottom: 2px solid #F1F5F9;
}

.mega-col:nth-child(1) .mega-col-header {
  border-bottom-color: rgba(37, 99, 235, 0.25);
}
.mega-col:nth-child(2) .mega-col-header {
  border-bottom-color: rgba(245, 158, 11, 0.35);
}
.mega-col:nth-child(3) .mega-col-header {
  border-bottom-color: rgba(16, 185, 129, 0.35);
}

.mega-col-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.mega-col-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.2;
}

.mega-col-desc {
  font-size: 0.68rem;
  color: #64748B;
  margin-top: 1px;
  line-height: 1.25;
}

.mega-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

/* Individual Link in Mega Menu */
.mega-link {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.55rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  background: transparent;
}

.mega-link:hover {
  background: #F8FAFC;
  transform: translateX(2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.mega-link.mega-link-featured {
  background: #FEFCE8;
  border: 1px solid rgba(252, 211, 77, 0.4);
}

.mega-link.mega-link-featured:hover {
  background: #FEF9C3;
}

.mega-priority-badge {
  font-size: 0.62rem;
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-block;
}

.mega-link-text {
  flex: 1;
  min-width: 0;
}

.mega-link .dd-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.25;
}

.mega-link:hover .dd-title {
  color: var(--color-primary-accent, #B45309);
}

.mega-link .dd-desc {
  font-size: 0.7rem;
  color: #64748B;
  margin-top: 2px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty Search Feedback */
.mega-no-results {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748B;
}

.mega-no-results p {
  font-size: 0.82rem;
  margin-top: 0.5rem;
  color: #64748B;
}

/* Footer of Mega Menu */
.mega-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.15rem;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  font-size: 0.74rem;
}

.mega-footer-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #475569;
}

.mega-footer-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.mega-footer-link {
  color: #2563EB;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.mega-footer-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Legacy single-column dropdown fallback */
.dropdown-header {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.5rem 0.75rem 0.35rem;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 0.35rem;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.dropdown-link:hover {
  background: #F8FAFC;
  transform: translateX(2px);
}

.dd-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.dd-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.2;
}

.dd-desc {
  font-size: 0.7rem;
  color: #64748B;
  margin-top: 2px;
}

/* 4. Nav Actions & User Profile Toolbar */
.nav-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Compact light/dark switch (desktop header + drawer) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #334155;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle-btn:hover {
  background: #F1F5F9;
  border-color: var(--color-primary-base);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--color-primary-accent);
  outline-offset: 2px;
}

.theme-toggle-btn [data-theme-icon] {
  display: block;
  transform: translateY(-0.5px);
}

.lang-pill-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1px;
  gap: 2px;
}

.lang-btn {
  text-decoration: none;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 12px;
  color: #CBD5E1;
  line-height: 1.25;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: #F59E0B;
  color: #0F172A;
  font-weight: 800;
}

/* Micro language toggle button */
.lang-micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF !important;
  padding: 2px 7px;
  border-radius: 4px;
  text-decoration: none !important;
  line-height: 1;
  transition: all 0.15s ease;
}
.lang-micro-pill * {
  color: inherit !important;
}
.lang-micro-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #F59E0B;
  color: #FDE68A !important;
}

/* Specific contrast for language toggle in mobile drawer header */
.drawer-header .lang-micro-pill {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: var(--color-primary-base, #1E3A8A) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.drawer-header .lang-micro-pill:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: var(--color-primary-base, #1E3A8A) !important;
}

/* User Pill (When Logged In) */
.btn-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-user:hover {
  background: #DBEAFE;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.user-avatar-pill {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-base) 0%, #1e293b 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-greeting {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-primary-base);
  line-height: 1.15;
}

.user-type-tag {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #2563EB;
}

/* Auth Action Buttons (When Logged Out) */
.btn-nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.46rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-nav-auth:hover {
  border-color: var(--color-primary-base);
  color: var(--color-primary-base);
  background: #F8FAFC;
}

.btn-icon {
  font-size: 0.95rem;
}

.btn-nav-join {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1E293B;
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  border: 1px solid #F59E0B;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-nav-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #FDE68A 0%, #D97706 100%);
}

/* 5. Mobile Toggle Button & Off-Canvas Drawer */
.mobile-toggle-btn {
  display: none;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.mobile-toggle-btn .bar {
  width: 20px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #FFFFFF;
  z-index: 1001;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.drawer-logo {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

.drawer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary-base);
}

.drawer-sub {
  font-size: 0.7rem;
  color: #64748B;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748B;
  padding: 0.25rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.drawer-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary-base);
  color: #FFF;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-primary-base);
}

.drawer-user-role {
  font-size: 0.72rem;
  color: #2563EB;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94A3B8;
  letter-spacing: 0.8px;
  margin-bottom: 0.65rem;
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.drawer-link:hover, .drawer-link.active {
  background: #F1F5F9;
  color: var(--color-primary-base);
  font-weight: 700;
}

/* Shared drawer tool button (theme switch, install, alerts, cache) */
.drawer-tool-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--color-text-main);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.drawer-tool-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
}

.drawer-tool-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.drawer-tool-icon {
  font-size: 1.15rem;
  background: var(--color-surface-card);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-tool-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.25;
}

.drawer-tool-sub {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.drawer-tool-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--tint-blue-bg);
  color: var(--tint-blue-text);
  border: 1px solid var(--tint-blue-border);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.drawer-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #E2E8F0;
}

/* Drawer Mantra Banner */
.drawer-mantra-banner {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.drawer-mantra-banner div:first-child {
  color: #92400E;
}

.drawer-mantra-banner div:last-child {
  color: #78350F;
}

/* Drawer Featured Badge (Staff Panel) */
.drawer-featured-badge {
  font-size: 0.58rem;
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 800;
}

/* Drawer Tool Button State Variants */
.drawer-tool-btn-installed {
  background: #F0FDF4;
  border-color: #A7F3D0;
}

.drawer-tool-btn-installed .drawer-tool-icon {
  background: #D1FAE5;
}

.drawer-tool-btn-installed .drawer-tool-badge {
  background: #16A34A;
}

.drawer-tool-btn-granted {
  background: #F0FDF4;
  border-color: #A7F3D0;
}

.drawer-tool-btn-granted .drawer-tool-icon {
  background: #D1FAE5;
}

.drawer-tool-btn-granted .drawer-tool-badge {
  background: #16A34A;
}

.drawer-tool-btn-denied {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.drawer-tool-btn-denied .drawer-tool-icon {
  background: #F1F5F9;
}

.drawer-tool-btn-denied .drawer-tool-badge {
  background: #94A3B8;
}

.drawer-tool-btn-unsupported {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.drawer-tool-btn-unsupported .drawer-tool-icon {
  background: #F1F5F9;
}

.drawer-tool-btn-unsupported .drawer-tool-badge {
  background: #94A3B8;
}

.drawer-tool-btn-default {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.drawer-tool-btn-default .drawer-tool-icon {
  background: #FEF3C7;
}

.drawer-tool-btn-default .drawer-tool-badge {
  background: #2563EB;
}

/* Button Danger Variant */
.btn-danger {
  background: transparent;
  border: 1.5px solid #EF4444;
  color: #EF4444;
}

.btn-danger:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* Small Button Modifier */
.btn-sm {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8rem !important;
}

/* Modern Buttons Core */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-accent), var(--color-primary-gold));
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary-base);
  color: var(--color-primary-base);
}

.btn-outline:hover {
  background: var(--color-primary-base);
  color: #FFFFFF;
}

/* Cards & Grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 992px) {
  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  }
}

@media (min-width: 1280px) {
  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(270px, 340px));
  }
}

.card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  border-color: var(--color-primary-accent);
}

/* Digital Gate Pass Card Visual */
.gate-pass-badge {
  background: linear-gradient(135deg, #1E3A8A, #0F172A);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 2px solid var(--color-primary-accent);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.gate-pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.qr-box {
  background: #FFFFFF;
  padding: 1rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  background: #0F172A;
  color: #94A3B8;
  padding: 3.5rem 0 2rem;
  border-top: 3px solid var(--color-primary-accent);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
  .nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-center-menu {
    display: none;
  }
  .mobile-toggle-btn {
    display: flex;
  }
}

@media (min-width: 993px) and (max-width: 1200px) {
  .nav-wrap {
    gap: 0.5rem;
  }
  .brand-title {
    font-size: 1rem;
  }
  .nav-menu {
    gap: 0.1rem;
    padding: 0.2rem 0.25rem;
  }
  .nav-link {
    font-size: 0.74rem;
    padding: 0.32rem 0.5rem;
    gap: 0.2rem;
  }
  .btn-nav-auth {
    padding: 0.38rem 0.7rem;
    font-size: 0.78rem;
  }
  .btn-nav-join {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  /* Container & Layout */
  .container {
    padding-inline: 1rem;
  }
  
  /* Universal Cards Mobile Padding */
  .card, 
  div.card {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

  /* Two-column responsive grids collapse to 1 column */
  .grid-2col-responsive,
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Mobile Touch Targets & Inputs (16px to prevent iOS Safari auto-zoom) */
  .form-input,
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  /* Typography Sizing */
  h1 {
    font-size: 1.65rem !important;
  }
  h2 {
    font-size: 1.35rem !important;
  }

  /* Social Share Widget */
  .social-share-widget {
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
  }
  .social-share-widget > div {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }
  .social-share-widget .btn-share-icon {
    flex: 1 1 auto;
    justify-content: center;
  }

  /* Tables: Horizontal scroll wrapper */
  .table-responsive,
  div[style*="overflow-x: auto"] {
    -webkit-overflow-scrolling: touch;
    margin-inline: -1rem;
    padding-inline: 1rem;
    border-radius: 0;
  }

  /* Grids */
  .grid-cards { 
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 480px) {
  /* Extra-small screens: 320px - 480px (iPhone SE, Galaxy A-series) */
  .container {
    padding-inline: 0.75rem;
  }
  
  .card, 
  div.card {
    padding: 1.1rem 0.85rem !important;
  }

  .brand-text {
    max-width: 140px;
  }
  .brand-title {
    font-size: 0.92rem;
  }
  .brand-crest-img {
    height: 34px;
    width: 34px;
  }

  /* Buttons Full-width where applicable on small screens */
  .btn-mobile-full {
    width: 100% !important;
  }
}

/* =========================================================
   MODULAR COMPONENTS: SOCIAL SHARE & BACK TO TOP
   ========================================================= */

/* Social Share Widget */
.btn-share-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-share-icon.wa {
  background: #DCFCE7;
  color: #15803D;
  border-color: #86EFAC;
}

.btn-share-icon.wa:hover {
  background: #25D366;
  color: #FFFFFF;
  border-color: #25D366;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  transform: translateY(-1px);
}

.btn-share-icon.tg {
  background: #E0F2FE;
  color: #0369A1;
  border-color: #BAE6FD;
}

.btn-share-icon.tg:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

.btn-share-icon.tw {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
  padding: 0.48rem 0.75rem;
}

.btn-share-icon.tw:hover {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
  transform: translateY(-1px);
}

.btn-share-icon.copy {
  background: #F8FAFC;
  color: #475569;
  border-color: #CBD5E1;
  font-family: inherit;
}

.btn-share-icon.copy:hover {
  background: #FFFFFF;
  color: var(--color-primary-base);
  border-color: var(--color-primary-base);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Back to Top Floating Action Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-base) 0%, #0F172A 100%);
  color: #FFFFFF;
  border: 1.5px solid var(--color-primary-accent);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25), 0 0 15px rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-accent) 0%, var(--color-primary-gold) 100%);
  color: #0F172A;
  border-color: #FDE68A;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}

@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
}

/* =========================================================
   HELP & SOP CENTER (PUBLIC & ADMIN)
   ========================================================= */

.help-hero {
  background: linear-gradient(135deg, var(--color-primary-base) 0%, #0F172A 70%, #020617 100%);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  color: #FFFFFF;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}

.help-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.help-hero p {
  color: #CBD5E1;
  font-size: 1.05rem;
  max-width: 760px;
  line-height: 1.6;
}

.help-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.help-toc {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.help-toc h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748B;
  font-weight: 800;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.help-toc a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  color: #334155;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.help-toc a:hover {
  background: #FEF3C7;
  color: #92400E;
}

.help-toc .help-toc-reg-btn {
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--color-primary-base), #1e293b);
  color: #FFFFFF !important;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.help-toc .help-toc-reg-btn:hover {
  background: var(--color-primary-base);
  transform: translateY(-1px);
}

.help-main {
  flex: 1;
  min-width: 0;
}

.help-sec {
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  scroll-margin-top: 90px;
  box-shadow: var(--shadow-sm);
}

.help-sec h2 {
  color: var(--color-primary-base);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-sub {
  color: #64748B;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.help-steps {
  counter-reset: hstep;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.help-steps li {
  position: relative;
  counter-increment: hstep;
  padding: 0.9rem 1.1rem 0.9rem 3.5rem;
  background: #F8FAFC;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

.help-steps li::before {
  content: counter(hstep);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: #F59E0B;
  color: #0F172A;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.88rem;
}

.help-tip {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 1rem;
}

.help-warn {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  margin-top: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 800;
  color: var(--color-primary-base);
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { 
  display: none; 
}

.faq-item summary::after {
  content: '+';
  font-size: 1.35rem;
  font-weight: 800;
  color: #F59E0B;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { 
  content: '–'; 
  transform: rotate(180deg);
}

.faq-item[open] {
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155;
}

.help-contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.help-contact-card {
  background: #F8FAFC;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  text-align: center;
}

.help-contact-card .hcc-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748B;
  margin-bottom: 0.35rem;
}

.help-contact-card a {
  color: var(--color-primary-base);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.help-contact-card .hcc-note {
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 0.25rem;
}

.sec-top-link {
  text-align: right;
  margin-top: 1rem;
}

.sec-top-link a {
  font-size: 0.8rem;
  color: #64748B;
  text-decoration: none;
  font-weight: 600;
}

.sec-top-link a:hover {
  color: var(--color-primary-base);
}

@media (max-width: 992px) {
  .help-layout {
    flex-direction: column;
  }
  .help-toc {
    width: 100%;
    position: static;
  }
  
  /* Header Responsive: Tablet & Mobile Switch */
  .nav-center-menu {
    display: none !important;
  }
  
  .mobile-toggle-btn {
    display: flex !important;
  }
  
  .top-bar-mantra-pill {
    display: none !important;
  }
  
  .btn-nav-join span {
    font-size: 0.8rem;
  }
  
  .btn-nav-auth {
    padding: 0.38rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .header-top-bar {
    padding: 0.3rem 0;
    font-size: 0.72rem;
  }
  
  .top-bar-container {
    gap: 0.5rem;
  }
  
  .top-bar-sep,
  .top-bar-prabhupada {
    display: none !important;
  }
  
  .top-bar-temple {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Sleek, minimal language switcher on mobile top bar */
  .header-top-bar .lang-pill-wrap {
    padding: 1.5px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    gap: 2px;
  }

  .header-top-bar .lang-btn {
    padding: 1px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 4px;
    color: #CBD5E1;
  }

  .header-top-bar .lang-btn.active {
    background: #F59E0B;
    color: #0F172A;
    font-weight: 800;
  }

  .site-header {
    padding: 0.45rem 0;
  }

  .brand-crest-img {
    height: 40px;
    width: 40px;
  }

  .brand-organization {
    font-size: 0.58rem;
    letter-spacing: 0.5px;
  }

  .nav-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.35rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-actions-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .nav-bell-desktop,
  .auth-desktop-only {
    display: none !important;
  }

  .brand-link {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 0.5rem !important;
    overflow: visible !important;
  }

  .brand-crest-img {
    height: 40px !important;
    width: 40px !important;
  }

  .brand-text {
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .brand-organization {
    font-size: 0.62rem !important;
    letter-spacing: 0.3px !important;
    line-height: 1.1 !important;
  }

  .brand-title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  .brand-founder {
    display: none;
  }

  /* Mobile Header Actions & Hamburger Polish */
  .mobile-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    padding: 0;
    border-radius: 8px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #1E293B;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }

  .mobile-toggle-btn .bar {
    width: 16px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    margin: 1.5px 0;
  }

  .theme-toggle-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.92rem;
  }

  .btn-nav-join {
    padding: 0.32rem 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-radius: var(--radius-pill);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .btn-nav-user {
    padding: 0.25rem 0.5rem 0.25rem 0.25rem !important;
    gap: 0.35rem;
    flex-shrink: 0 !important;
  }

  .user-avatar-pill {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.72rem;
  }

  .user-type-tag {
    display: none;
  }

  .user-greeting {
    font-size: 0.74rem;
    max-width: 65px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 380px) {
  .brand-organization {
    font-size: 0.58rem !important;
    display: block !important;
  }
  .brand-title {
    font-size: 0.82rem !important;
  }
  .btn-nav-auth span:not(.btn-icon) {
    display: none !important; /* On extremely narrow screens, show 🔐 icon only */
  }
  .btn-nav-auth {
    padding: 0.32rem 0.45rem !important;
  }
}

/* =========================================================
   FOOTER DESIGN SYSTEM & RESPONSIVE POLISH
   ========================================================= */
.site-footer {
  background: linear-gradient(180deg, #0B132B 0%, #060913 100%);
  color: #CBD5E1;
  padding: 3.5rem 0 2rem;
  border-top: 3px solid var(--color-primary-accent);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
}

.footer-link-item {
  color: #94A3B8;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-link-item:hover {
  color: #FDE68A;
  transform: translateX(3px);
}

.footer-contact-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 280px;
}

.footer-whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.footer-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.footer-social-pill:hover {
  transform: scale(1.05);
}

.footer-social-link:hover {
  transform: translateY(-4px) scale(1.08);
}

.footer-social-link:active {
  transform: translateY(0) scale(0.98);
}

.footer-bottom-bar {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: #64748B;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: #FDE68A;
  text-decoration: underline;
}

@media (max-width: 768px) {
  /* Ensure natural mobile vertical scrolling */
  body.drawer-open {
    overflow: hidden;
  }

  /* Container mobile padding refinement */
  .container {
    padding-inline: 1rem !important;
  }

  /* Admin & Dashboard Pages Mobile Alignment & Touch Polish */
  .admin-header-flex,
  div[style*="justify-content: space-between"][style*="align-items: flex-start"],
  div[style*="justify-content: space-between"][style*="align-items: center"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  /* Action Button Toolbars full width on mobile */
  div[style*="display: flex; gap: 0.75rem"],
  div[style*="display: flex; gap: 0.5rem"] {
    flex-wrap: wrap !important;
  }

  div[style*="display: flex; gap: 0.75rem"] > a,
  div[style*="display: flex; gap: 0.75rem"] > button,
  div[style*="display: flex; gap: 0.5rem"] > a,
  div[style*="display: flex; gap: 0.5rem"] > button {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
    text-align: center;
    justify-content: center;
  }

  /* All CSS Grids with high minmax switch cleanly to 1fr on mobile to prevent overflow */
  div[style*="grid-template-columns"],
  .grid-cards {
    grid-template-columns: 1fr !important;
  }

  /* Cards mobile padding */
  .card, div[style*="padding: 2rem"] {
    padding: 1.25rem 1rem !important;
  }

  /* Admin Data Tables Smooth Touch Scrolling */
  div[style*="overflow-x: auto"] {
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-subtle);
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    width: 100%;
  }

  table {
    min-width: 580px;
  }

  /* Admin Modal dialogs on mobile */
  div[style*="position: fixed"][style*="z-index: 1000"] > div,
  div[style*="position: fixed"][style*="z-index: 2000"] > div {
    width: 95% !important;
    max-width: 95% !important;
    margin: 1rem auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 1.25rem 1rem !important;
  }

  /* Manual search form on mobile scanner */
  form[onsubmit*="handleManualSearch"] {
    flex-direction: column !important;
  }
  form[onsubmit*="handleManualSearch"] button {
    width: 100% !important;
  }

  /* Admin Filter tab bars */
  .filter-tabs-wrap {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .top-bar-temple {
    font-size: 0.68rem;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 2.75rem 0 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  .footer-whatsapp-btn {
    width: 100%;
    max-width: 100%;
  }
}

/* ========================================================= */
/* SACRED VEDIC WISDOM CARD (DAILY BHAGAVAD GITA SECTION)     */
/* ========================================================= */
.wisdom-section {
  position: relative;
  background: linear-gradient(135deg, #FFFDF7 0%, #FEF9EE 50%, #FFF5DE 100%);
  border-top: 1px solid rgba(217, 119, 6, 0.15);
  border-bottom: 1px solid rgba(217, 119, 6, 0.2);
  padding: 1rem 0;
  overflow: hidden;
}

.wisdom-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F59E0B, #D97706, #B45309, #D97706, #F59E0B);
  opacity: 0.85;
}

.wisdom-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 15px -3px rgba(217, 119, 6, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wisdom-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -4px rgba(217, 119, 6, 0.12);
}

.wisdom-content-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.wisdom-icon-crest {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid rgba(217, 119, 6, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #B45309;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(245, 158, 11, 0.12);
}

.wisdom-badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.wisdom-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.wisdom-ref-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #FFFBEB;
  color: #B45309;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.wisdom-shloka {
  font-family: var(--font-family-mr);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 700;
  color: #78350F;
  line-height: 1.4;
  margin: 0.15rem 0 0.25rem;
  letter-spacing: 0.1px;
}

.wisdom-translation {
  position: relative;
  font-size: 0.85rem;
  color: #4B5563;
  line-height: 1.45;
  padding-left: 0.65rem;
  border-left: 2.5px solid #F59E0B;
  font-style: italic;
  margin: 0;
}

.wisdom-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.2);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wisdom-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(180, 83, 9, 0.3);
  background: linear-gradient(135deg, #B45309 0%, #92400E 100%);
  color: #FFFFFF !important;
}

@media (max-width: 860px) {
  .wisdom-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.85rem;
  }

  .wisdom-action-btn {
    width: 100%;
    text-align: center;
    padding: 0.55rem 1rem;
  }
}

@media (max-width: 480px) {
  .wisdom-content-wrap {
    flex-direction: column;
    gap: 0.75rem;
  }

  .wisdom-icon-crest {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.5rem;
  }
}

/* =========================================================
   RESPONSIVE KPI STAT CARDS (2x2 on Mobile, Clickable Micro-interactions)
   ========================================================= */
.kpi-grid-responsive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .kpi-grid-responsive {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .kpi-grid-responsive {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }
}

.kpi-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.kpi-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
}

.kpi-card-link:active {
  transform: translateY(0) scale(0.985);
}

.kpi-card-link.active-filter .card {
  box-shadow: 0 0 0 2px var(--color-primary-base), 0 4px 12px rgba(30, 58, 138, 0.12) !important;
}

@media (max-width: 640px) {
  .kpi-card-link .card {
    padding: 0.85rem !important;
  }
  .kpi-card-link .kpi-num {
    font-size: 1.5rem !important;
  }
  .kpi-card-link .kpi-title {
    font-size: 0.72rem !important;
  }
  .kpi-card-link .kpi-sub {
    font-size: 0.7rem !important;
  }
  .kpi-card-link .kpi-icon-wrap {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
  }
}

/* =========================================================
   ADMIN PARTICIPANTS DIRECTORY ENHANCEMENTS
   ========================================================= */
.admin-filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-filter-bar .filter-group {
  display: flex;
  flex-direction: column;
}

.admin-filter-bar select,
.admin-filter-bar input[type="text"] {
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md, 8px);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  background-color: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-filter-bar select:focus,
.admin-filter-bar input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary-base);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.table-action-btn:hover {
  transform: translateY(-1px);
}

.table-action-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .admin-hero-banner {
    padding: 1.25rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  .admin-hero-banner .dept-toggle-wrap {
    width: 100% !important;
    justify-content: center !important;
  }

  .admin-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .admin-filter-bar .filter-group {
    width: 100% !important;
    min-width: 0 !important;
    flex: unset !important;
  }

  .admin-filter-bar .filter-actions {
    width: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  .admin-filter-bar .filter-actions button,
  .admin-filter-bar .filter-actions a {
    flex: 1 !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* =========================================================
   UNIVERSAL TABLE / CARD VIEW SWITCHER
   ========================================================= */
.view-mode-toggle {
  display: inline-flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid #CBD5E1;
  gap: 2px;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1;
}

.view-mode-btn:hover {
  color: var(--color-primary-base);
}

.view-mode-btn.active {
  background: #FFFFFF;
  color: var(--color-primary-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

@media (max-width: 640px) {
  .admin-card-grid {
    grid-template-columns: 1fr;
    padding: 0.85rem;
    gap: 0.85rem;
  }
}

.participant-record-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.participant-record-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: #93C5FD;
}

/* =========================================================
   THOUGHTFUL MODERN DASHBOARD STYLES
   ========================================================= */
.dashboard-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #0F172A 100%);
  border-radius: var(--radius-lg, 16px);
  padding: 2.25rem 2.25rem;
  color: #FFFFFF;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.dashboard-user-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-size: 1.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.dashboard-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

@media (max-width: 640px) {
  .dashboard-stats-strip {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

.dashboard-stat-tile {
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.dashboard-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.dashboard-pass-card {
  background: #FFFFFF;
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-lg, 14px);
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-pass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.14);
}

.dashboard-pass-card::after {
  content: '🎟️';
  position: absolute;
  right: -10px;
  bottom: -15px;
  font-size: 6rem;
  opacity: 0.06;
  pointer-events: none;
}

.admin-quick-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .admin-quick-hub {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.admin-hub-link {
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.admin-hub-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: #93C5FD;
}

.admin-hub-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* =========================================================
   BUTTON STYLES (Enhanced)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.25);
}

.btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.25);
}

.btn:active {
  transform: translateY(1px);
}

.btn.btn-primary {
  background: var(--color-primary-base);
  color: #FFF;
  box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.btn.btn-primary:hover {
  background: var(--color-primary-base);
  opacity: 0.9;
  box-shadow: 0 6px 8px -1px rgba(30, 58, 138, 0.3);
}

.btn.btn-primary:active {
  box-shadow: 0 2px 4px -1px rgba(30, 58, 138, 0.2);
}

.btn.btn-secondary {
  background: #F1F5F9;
  color: #64748B;
}

.btn.btn-secondary:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.btn.btn-outline {
  background: #FFF;
  color: var(--color-primary-base);
  border-color: var(--color-primary-base);
}

.btn.btn-outline:hover {
  background: var(--color-primary-base);
  color: #FFF;
}

.btn.btn-danger {
  background: var(--color-danger);
  color: #FFF;
}

.btn.btn-danger:hover {
  background: #DC2626;
  opacity: 0.9;
}

.btn.btn-success {
  background: var(--color-success);
  color: #FFF;
}

.btn.btn-success:hover {
  background: #059669;
  opacity: 0.9;
}

/* =========================================================
   CARD STYLES
   ========================================================= */
.card {
  background: #FFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-subtle);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 15px 20px -5px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
}

.card.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card.card-body {
  padding: 1.5rem;
}

.card.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* =========================================================
   BADGE STYLES
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.badge-primary {
  background: #E0E7FF;
  color: #3730A3;
}

.badge.badge-secondary {
  background: #F1F5F9;
  color: #64748B;
}

.badge.badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.badge.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

.badge.badge-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.badge.badge-lg {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* =========================================================
   AVATAR STYLES
   ========================================================= */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-base), var(--color-primary-accent));
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.avatar.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.avatar.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

.avatar.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
}

.avatar-group {
  display: flex;
  gap: -8px;
}

.avatar-group .avatar {
  transition: transform 0.2s ease;
}

.avatar-group .avatar:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 2.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.hidden { display: none !important; }
.visible { display: block !important; }
.invisible { visibility: hidden; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-end { justify-content: flex-end; }

.w-full { width: 100%; }
.w-auto { width: auto; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333%; }
.w-2\/3 { width: 66.667%; }
.w-1\/4 { width: 25%; }
.w-3\/4 { width: 75%; }

.max-w-md { max-width: 400px; }
.max-w-lg { max-width: 600px; }
.max-w-xl { max-width: 800px; }
.max-w-2xl { max-width: 1000px; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-pill); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-card { box-shadow: var(--shadow-card); }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* =========================================================
   RESPONSIVE GRID
   ========================================================= */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .grid-2col, .grid-3col, .grid-4col, .grid-5col {
    grid-template-columns: 1fr;
  }
  
  .card {
    box-shadow: var(--shadow-sm);
  }
  
  .card:hover {
    transform: none;
  }
}

/* =========================================================
   ACCESSIBILITY HIGHLIGHTERS (Focus States)
   ========================================================= */
*:focus-visible {
  outline: 2px solid var(--color-primary-base);
  outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary-base);
  color: #FFF;
  padding: 8px;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
/* =========================================================
   MOBILE TOUCH OPTIMIZATIONS
   ========================================================= */
@media (max-width: 768px) {
  /* Touch target sizing */
  .btn, .nav-link, .footer-link-item, a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better spacing on mobile */
  .container {
    padding-inline: 1rem;
  }

  /* Responsive grid */
  .grid-2col, .grid-3col, .grid-4col, .grid-5col {
    grid-template-columns: 1fr !important;
  }

  /* Stack cards on mobile */
  .admin-quick-hub {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Better mobile form spacing */
  .form-group {
    margin-bottom: 1rem;
  }

  /* Touch-friendly modals */
  .modal-container {
    margin: 1rem;
    max-height: 95vh;
  }

  /* Mobile pull-to-refresh hint */
  .pull-to-refresh-hint {
    text-align: center;
    padding: 20px;
    color: #64748B;
    font-size: 0.85rem;
    display: none;
  }

  .pull-to-refresh-hint.visible {
    display: block;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }

  /* Better mobile scrollbar */
  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
}

/* Touch highlight removal for faster feedback */
* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Better mobile focus management */
@media (hover: none) and (pointer: coarse) {
  .btn:focus, .nav-link:focus, .form-input:focus {
    outline: none;
  }
  
  .btn:focus-visible, .nav-link:focus-visible {
    outline: 2px solid var(--color-primary-base);
    outline-offset: 2px;
  }
}

/* =========================================================
   PULL TO REFRESH SUPPORT
   ========================================================= */
body {
  overscroll-behavior-y: contain;
}

/* =========================================================
   PRINT STYLES (For Gate Passes, Reports)
   ========================================================= */
@media print {
  .no-print {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #DDD;
  }
  
  .btn, .nav-link, .modal-close-btn, .toast-close {
    display: none !important;
  }
  
  body {
    background: #FFF;
    color: #000;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* =========================================================
   DARK THEME TOKENS
   The <html data-theme="dark"> attribute is set by the inline
   bootstrap in views/layouts/main.layout.php before first paint.
   Component-level overrides live in public/css/dark.css.
   ========================================================= */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --color-bg-canvas: #0B1220;
  --color-surface-card: #111C2E;
  --color-surface-elevated: #16233A;
  --color-surface-sunken: #0E1728;
  --color-surface-hover: #1B2A42;

  /* Borders */
  --color-border-subtle: #24344D;
  --color-border-strong: #33465F;
  --color-border-focus: #F59E0B;

  /* Text */
  --color-text-main: #E8EEF7;
  --color-text-muted: #9AA9BE;
  --color-text-inverse: #0B1220;
  --color-link: #93C5FD;
  --color-link-hover: #BFDBFE;
  --color-primary-text: #93C5FD;

  /* Form controls */
  --input-border-color: #2B3B55;
  --input-border-hover: #3E5474;
  --input-border-focus: #F59E0B;
  --input-bg: #0F1A2B;
  --input-bg-disabled: #16233A;
  --input-color-disabled: #7C8BA1;
  --input-shadow-focus: 0 0 0 3px rgba(245, 158, 11, 0.22);

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.45);
  --shadow-card: 0 12px 26px -8px rgb(0 0 0 / 0.55), 0 4px 8px -4px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 28px -6px rgba(245, 158, 11, 0.4);
  --glass-bg: rgba(11, 18, 32, 0.88);

  /* Soft tinted surfaces */
  --tint-blue-bg: rgba(37, 99, 235, 0.14);
  --tint-blue-border: rgba(96, 165, 250, 0.38);
  --tint-blue-text: #93C5FD;
  --tint-green-bg: rgba(16, 185, 129, 0.13);
  --tint-green-border: rgba(52, 211, 153, 0.36);
  --tint-green-text: #6EE7B7;
  --tint-amber-bg: rgba(245, 158, 11, 0.13);
  --tint-amber-border: rgba(251, 191, 36, 0.38);
  --tint-amber-text: #FCD34D;
  --tint-red-bg: rgba(239, 68, 68, 0.13);
  --tint-red-border: rgba(248, 113, 113, 0.36);
  --tint-red-text: #FCA5A5;
  --tint-violet-bg: rgba(139, 92, 246, 0.15);
  --tint-violet-border: rgba(167, 139, 250, 0.36);
  --tint-violet-text: #C4B5FD;
}

/* Dark scrollbars (theme.css sets light gradients above) */
:root[data-theme="dark"] * {
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

:root[data-theme="dark"] *:hover {
  scrollbar-color: rgba(245, 158, 11, 0.55) transparent;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.35) 0%, rgba(245, 158, 11, 0.4) 100%);
  border-color: rgba(11, 18, 32, 0.6);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.6) 0%, rgba(245, 158, 11, 0.8) 100%);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:active {
  background: var(--color-primary-accent);
}

/* =========================================================
   VIEW CONTROLS TOOLBAR (.vc-*) — search / filter / sort /
   cards-list toggle used by public + admin listing pages.
   Markup lives in views/partials/components/view-controls.partial.php
   ========================================================= */
.vc-bar {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.9rem 1rem;
  align-items: end;
  box-shadow: var(--shadow-sm);
}

.vc-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.vc-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-text-muted);
}

/* Search */
.vc-search-wrap {
  position: relative;
  min-width: 200px;
}

.vc-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.85rem;
  pointer-events: none;
}

.vc-search-wrap .form-input {
  width: 100%;
  padding-left: 2.2rem;
  padding-right: 2rem;
  font-size: 0.85rem;
}

.vc-clear {
  display: none;
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.15rem;
  border-radius: 6px;
}

.vc-clear:hover {
  color: var(--color-text-main);
  background: #F1F5F9;
}

/* Dropdowns */
.vc-select {
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  background-color: #FFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  max-width: 100%;
}

.vc-select:hover {
  border-color: var(--color-border-focus);
}

.vc-select:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 1px;
  border-color: var(--color-border-focus);
}

/* Count + view toggle cluster */
.vc-view {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-bottom: 0.1rem;
}

.vc-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.vc-toggle {
  display: inline-flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}

.vc-toggle-btn {
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: #64748B;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.vc-toggle-btn:hover {
  color: var(--color-text-main);
}

.vc-toggle-btn.active {
  background: #FFF;
  color: #1E293B;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vc-toggle-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* List-mode overrides for the controlled grid */
.view-mode-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
}

.view-mode-list > .card,
.view-mode-list > .event-public-card,
.view-mode-list > .event-admin-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1rem 1.25rem !important;
  gap: 1.25rem !important;
  flex-wrap: wrap !important;
}

.view-mode-list .event-card-actions,
.view-mode-list a.btn-primary {
  width: auto !important;
  margin-top: 0 !important;
}

/* --- Professional compact rows for public event cards (.ev-*) ---
   Card internals reflow: badges stack left, title + one-line meta
   take the middle, CTA pins right. Description and upcoming-date
   chips are hidden to keep rows scannable. */
.view-mode-list .ev-card {
  gap: 1rem 1.25rem !important;
  padding: 0.8rem 1.1rem !important;
}

.view-mode-list .ev-card:hover {
  transform: none;
}

.view-mode-list .ev-badges {
  margin-bottom: 0 !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.3rem !important;
  min-width: 118px;
}

.view-mode-list .ev-cat,
.view-mode-list .ev-fee {
  font-size: 0.7rem !important;
}

.view-mode-list .ev-title {
  font-size: 1rem !important;
  margin: 0 !important;
  flex: 1 1 220px;
}

.view-mode-list .ev-desc,
.view-mode-list .ev-upcoming {
  display: none !important;
}

.view-mode-list .ev-meta {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.2rem 0.9rem !important;
  font-size: 0.8rem !important;
  flex: 2 1 260px;
}

.view-mode-list .ev-meta-row {
  flex-wrap: nowrap !important;
}

.view-mode-list .ev-recur {
  margin: 0 !important;
}

.view-mode-list .ev-cta {
  padding: 0.55rem 1.1rem !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* Responsive: tablet 2-col, mobile stacked */
@media (max-width: 900px) {
  .vc-bar {
    grid-template-columns: 1fr 1fr;
  }

  .vc-search {
    grid-column: 1 / -1;
  }

  .vc-view {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .view-mode-list > .card,
  .view-mode-list > .event-public-card,
  .view-mode-list > .event-admin-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Compact rows stack cleanly: badges inline, CTA full-width */
  .view-mode-list .ev-card {
    gap: 0.6rem !important;
  }

  .view-mode-list .ev-badges {
    flex-direction: row !important;
    align-items: center !important;
  }

  .view-mode-list .ev-title {
    flex: none;
  }

  .view-mode-list .ev-meta {
    flex: none;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .view-mode-list .ev-cta {
    width: 100% !important;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .vc-bar {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .vc-select {
    width: 100%;
  }
}

/* =========================================================
   PUBLIC EVENT CARD (.ev-*) — views/partials/events/event-card.partial.php
   NOTE: hover uses --shadow-card; the old inline handler pointed at
   --shadow-md which was never defined (no-op hover). Fixed here.
   ========================================================= */
.ev-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

@media (hover: hover) {
  .ev-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
  }
}

.ev-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ev-cat {
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid #BFDBFE;
  white-space: nowrap;
}

.ev-fee {
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.ev-fee-free {
  color: var(--color-success, #16A34A);
  background: #DCFCE7;
}

.ev-fee-paid {
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
}

.ev-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
  color: var(--color-text-main);
  line-height: 1.35;
}

.ev-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  flex: 1;
}

/* Logistics block as a description list */
.ev-meta {
  margin: 0 0 1.25rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
}

.ev-meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
  flex-wrap: wrap;
}

.ev-meta-ic {
  margin: 0;
  flex-shrink: 0;
}

.ev-meta-tx {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.ev-recur {
  margin: 0 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  background: #EDE9FE;
  color: #6D28D9;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid #DDD6FE;
  white-space: nowrap;
}

.ev-prasadam {
  color: #B45309;
  font-weight: 700;
}

.ev-upcoming {
  border-top: 1px dashed #CBD5E1;
  padding-top: 0.4rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.ev-upcoming-t {
  font-weight: 700;
  color: #475569;
}

.ev-chips {
  display: flex;
  gap: 0.35rem;
  margin-top: 3px;
  flex-wrap: wrap;
}

.ev-chip {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.ev-chip-on {
  background: #ECFDF5;
  color: #047857;
  font-weight: 700;
  border: 1px solid #A7F3D0;
}

.ev-chip-off {
  background: #FEE2E2;
  color: #991B1B;
  text-decoration: line-through;
}

.ev-cta {
  width: 100%;
  text-align: center;
  font-weight: 800;
  padding: 0.75rem 1rem;
  margin-top: auto;
}
