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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky navigation header */
}

:root {
  /* Color Palette - Hungarian Brandy & Burning Man Fire */
  --bg-base: #0a0604;
  --bg-surface: rgba(22, 14, 10, 0.7);
  --bg-card: rgba(36, 22, 16, 0.55);
  --border-glow: rgba(230, 95, 30, 0.25);
  --border-glow-focus: rgba(255, 120, 50, 0.5);
  
  --color-primary: #e65f1e;       /* Deep flame orange */
  --color-primary-glow: #ff7832;  /* Bright neon orange */
  --color-secondary: #d4af37;    /* Coppery gold */
  --color-accent: #c1549c;       /* Sunset violet */
  
  --text-primary: #fbf9f8;
  --text-secondary: #c7bbb6;
  --text-muted: #8c7e79;
  
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bg-avatar-default: rgba(0, 0, 0, 0.45);
  --color-avatar-placeholder: rgba(255, 255, 255, 0.3);
  --bg-dialog-box: rgba(0, 0, 0, 0.2);
  --border-dialog-box: 1px solid rgba(255, 255, 255, 0.05);
  --bg-progress-track: rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

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

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(230, 95, 30, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--color-secondary) 70%, var(--color-primary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

a {
  color: var(--color-primary-glow);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-secondary);
}

/* --- NAVIGATION --- */
header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 6, 4, 0.75);
  border-bottom: 1px solid rgba(255, 120, 50, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-section h1 {
  font-size: 1.5rem;
  font-weight: 800;
  white-space: nowrap;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  fill: var(--color-primary);
  filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

nav a.active, nav a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 120, 50, 0.4);
}

/* --- LAYOUTS --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

section {
  margin-bottom: 4.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  padding: 2.5rem;
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(255, 120, 50, 0.35);
  box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.6), 0 0 20px rgba(230, 95, 30, 0.05);
}

/* --- HERO SECTION --- */
.hero {
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.folk-tulip-decor {
  width: 100px;
  height: auto;
  color: var(--color-primary-glow);
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 4px rgba(255, 120, 50, 0.4));
}

.hero h2 {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  text-align: left;
}

.folk-line {
  width: 100%;
  max-width: 320px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-glow), var(--color-secondary), transparent);
  margin: 1.25rem 0;
  position: relative;
}

.folk-line::after {
  content: '◆';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-secondary);
  font-size: 0.75rem;
  text-shadow: 0 0 4px var(--color-primary-glow);
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-showcase {
  position: relative;
  height: 380px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.photo-frame {
  background: #fdfbf7; /* Off-white warm paper */
  padding: 0.75rem;
  padding-bottom: 2.25rem;
  border-radius: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 0, 0, 0.3);
  position: absolute;
  width: 250px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-origin: center center;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  filter: brightness(0.95) contrast(1.05);
}

.photo-caption {
  font-family: var(--font-display);
  color: #2b211a;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.75rem;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Stack rotations and positions */
.stack-1 {
  transform: rotate(-6deg);
  z-index: 3;
  left: 10px;
  top: 15px;
}
.stack-2 {
  transform: rotate(5deg);
  z-index: 2;
  left: 130px;
  top: 40px;
}
.stack-3 {
  transform: rotate(-3deg);
  z-index: 1;
  left: 70px;
  top: 150px;
}

/* Interactive hover effects: bring to front and straighten */
.photo-frame:hover {
  transform: scale(1.18) rotate(0deg) translateY(-10px);
  z-index: 10;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85), 0 0 15px rgba(230, 95, 30, 0.2);
  cursor: pointer;
}

@media (max-width: 900px) {
  .hero {
    padding: 3rem 1.5rem;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-text {
    align-items: center;
  }
  .hero h2 {
    text-align: center;
  }
  .folk-line {
    margin: 1.25rem auto;
    background: linear-gradient(90deg, transparent, var(--color-primary-glow), var(--color-secondary), var(--color-primary-glow), transparent);
  }
  .folk-line::after {
    left: 50%;
  }
  .hero p {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .hero-showcase {
    height: 320px;
    max-width: 360px;
  }
  .photo-frame {
    width: 200px;
  }
  .stack-2 {
    left: 110px;
  }
  .stack-3 {
    left: 60px;
    top: 120px;
  }
}

/* --- BUTTONS --- */
.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-primary {
  background: #e5a93c;
  color: #11090a;
  border: none;
  box-shadow: 0 4px 15px var(--border-glow);
}

.btn-primary:hover {
  background: #e5a93c;
  filter: brightness(1.15);
  box-shadow: 0 6px 20px var(--border-glow-focus);
  transform: translateY(-2px);
  color: #11090a;
}

.btn-secondary {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--color-secondary);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-secondary);
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #ff6b5b;
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: var(--danger);
}

.btn-visitor {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.4);
  color: var(--info);
}

.btn-visitor:hover {
  background: rgba(52, 152, 219, 0.25);
  border-color: var(--info);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-success:hover {
  background: var(--success);
  filter: brightness(1.1);
  color: #ffffff;
}


.btn-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
}

/* --- FORMS & INPUTS --- */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  background: rgba(10, 6, 4, 0.5);
  border: 1px solid rgba(255, 120, 50, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  padding: 0.85rem 1.1rem;
  width: 100%;
  transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary-glow);
  box-shadow: 0 0 12px rgba(255, 120, 50, 0.25);
  background: rgba(10, 6, 4, 0.8);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.65) sepia(1) saturate(5) hue-rotate(340deg);
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  cursor: pointer;
}

.checkbox-group input {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--color-primary);
}

/* --- TAB NAVIGATION --- */
.tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0.25rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--text-primary);
  background: rgba(255, 120, 50, 0.15);
  border: 1px solid rgba(255, 120, 50, 0.25);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* --- SCHEDULE GRID --- */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.schedule-card {
  background: var(--bg-card);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  transition: var(--transition);
}

.schedule-card:hover {
  background: rgba(36, 22, 16, 0.8);
  transform: translateX(4px);
}

.schedule-card.member-only {
  border-left-color: var(--color-secondary);
}

.schedule-details h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.schedule-time {
  color: var(--color-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.schedule-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 150px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  text-transform: uppercase;
  line-height: 1;
}

.badge-public {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.badge-private {
  background: rgba(52, 152, 219, 0.15);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.badge-pending {
  background: rgba(243, 156, 18, 0.15);
  color: var(--warning);
  border: 1px solid rgba(243, 156, 18, 0.4);
}

.badge-upcoming,
.badge-todo {
  background: rgba(52, 152, 219, 0.15);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.badge-active,
.badge-inprogress,
.badge-approved {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.badge-past,
.badge-completed {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-early-pass {
  background: rgba(243, 156, 18, 0.15);
  color: var(--warning);
  border: 1px solid rgba(243, 156, 18, 0.4);
}

.badge-coordinator {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-secondary);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  text-transform: uppercase;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* --- GALLERY SYSTEM --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 120, 50, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary-glow);
}

.gallery-img-wrapper {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: #110c08;
  position: relative;
  overflow: hidden;
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 1rem;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gallery-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 5;
}

/* --- FINANCES LEDGER --- */
.finances-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.stat-val.income { color: var(--success); }
.stat-val.spending { color: var(--danger); }
.stat-val.balance { color: var(--color-secondary); }

.ledger-table-wrapper {
  overflow-x: auto;
}

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

th, td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.amount-income {
  color: var(--success);
  font-weight: 600;
}

.amount-spending {
  color: var(--danger);
  font-weight: 600;
}

/* --- TASKS DASHBOARD & WORKLOAD BALANCER --- */
.tasks-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .tasks-grid {
    grid-template-columns: 1fr;
  }
}

/* Task Filter Chips */
.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip:hover {
  background: rgba(255, 120, 50, 0.12);
  border-color: rgba(255, 120, 50, 0.25);
  color: var(--color-primary-glow);
}

.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #11090a;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  cursor: pointer;
}

.task-card:hover {
  border-color: rgba(255, 120, 50, 0.2);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.task-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.task-difficulty {
  display: inline-flex;
  gap: 2px;
}

.diff-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.diff-dot.fill {
  background: var(--color-primary);
  box-shadow: 0 0 4px var(--color-primary-glow);
}

.task-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.task-assignees {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Workload Balancer UI */
.balancer-panel {
  position: sticky;
  top: 100px;
}

.balancer-title {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.balancer-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.member-workload {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.workload-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.workload-bar-wrapper {
  background: var(--bg-progress-track);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.workload-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-glow), var(--color-primary));
  border-radius: 4px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* --- ADMIN PANEL SYSTEM --- */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.admin-card-full {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .admin-card-full {
    grid-column: span 1;
  }
}

.admin-user-item, .admin-image-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0;
}

.admin-user-item:last-child, .admin-image-item:last-child {
  border-bottom: none;
}

/* Modal Dialog Styles */
dialog:not([open]) {
  display: none !important;
}

dialog {
  border: 1px solid var(--color-primary);
  background: #110a08;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  margin: auto;
  max-width: 500px;
  width: 90%;
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  outline: none;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

dialog h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

dialog .actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Onboarding Wizard Styles */
.onboarding-dialog {
  max-width: 600px;
  width: 95%;
  border: 1px solid var(--color-primary);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  outline: none;
  padding: 2rem !important;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dialog-box);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.onboarding-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-primary-glow);
}

.onboarding-progress {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.progress-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-progress-track);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.active {
  background: var(--color-primary-glow);
  box-shadow: 0 0 8px var(--color-primary-glow);
  transform: scale(1.25);
}

.progress-step.completed {
  background: var(--color-accent);
}

.setup-step {
  display: none;
}

.setup-step.active {
  display: block;
  animation: onboardingFadeIn 0.35s ease-out;
}

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

.onboarding-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.onboarding-option {
  background: var(--bg-dialog-box);
  border: var(--border-dialog-box);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.onboarding-option:hover {
  border-color: var(--color-primary-glow);
  background: rgba(176, 30, 35, 0.05);
  transform: translateY(-2px);
}

.onboarding-option.active {
  border-color: var(--color-primary-glow);
  background: rgba(176, 30, 35, 0.12);
  box-shadow: 0 0 12px rgba(176, 30, 35, 0.2);
}

.onboarding-option.active .option-icon {
  transform: scale(1.15);
}

.option-icon {
  font-size: 1.75rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.option-content strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.option-content span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.onboarding-footer {
  border-top: 1px solid var(--border-dialog-box);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
}

/* RSVP Buttons Dashboard Collapsed Style */
.rsvp-buttons.collapsed .rsvp-btn:not(.active) {
  display: none !important;
}

.rsvp-buttons.collapsed .rsvp-btn.active {
  position: relative;
  padding-right: 2.25rem;
}

.rsvp-buttons.collapsed .rsvp-btn.active::after {
  content: '▼';
  position: absolute;
  right: 0.85rem;
  font-size: 0.65rem;
  opacity: 0.7;
}

/* Google Sign-in Styling */
.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glow);
}

.auth-separator:not(:empty)::before {
  margin-right: .75em;
}

.auth-separator:not(:empty)::after {
  margin-left: .75em;
}

.auth-separator span {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.google-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Alerts and Notifications */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(46, 204, 113, 0.12);
  color: #58d68d;
  border-color: rgba(46, 204, 113, 0.25);
}

.alert-error {
  background: rgba(231, 76, 60, 0.12);
  color: #f1948a;
  border-color: rgba(231, 76, 60, 0.25);
}

.alert-info {
  background: rgba(52, 152, 219, 0.12);
  color: #85c1e9;
  border-color: rgba(52, 152, 219, 0.25);
}

/* Enhanced Task Card styling */
.task-date-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-secondary);
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 0.75rem;
}

.task-timing-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.task-staffing-detail {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.staff-danger {
  color: var(--danger) !important;
}

.staff-warning {
  color: var(--warning) !important;
}

.staff-success {
  color: var(--success) !important;
}

.staff-everyone {
  color: var(--color-primary-glow) !important;
  font-weight: 600;
}

/* --- DETAIL DRAWER & OVERLAY --- */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: -600px;
  width: 580px;
  max-width: 100vw;
  height: 100vh;
  background: rgba(18, 12, 9, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(255, 120, 50, 0.15);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.detail-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-primary-glow);
  margin: 0;
  font-weight: 700;
}

.btn-close-drawer {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.btn-close-drawer:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.drawer-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 0.95rem;
}

.drawer-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.drawer-tab-btn.active {
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
  background: rgba(255, 120, 50, 0.03);
}

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

.drawer-form-actions-sticky {
  position: sticky;
  bottom: -1.75rem;
  background: rgba(18, 12, 9, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 0;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.schedule-card {
  cursor: pointer;
}

/* Schedule Detail Dialog */
#schedule-detail-dialog {
  background: var(--bg-card);
  border: 1px solid rgba(255, 120, 50, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: var(--text-primary);
}

.crew-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.crew-member-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.sched-task-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  cursor: pointer;
}

.sched-task-item:hover {
  background: rgba(255, 120, 50, 0.05);
  border-color: rgba(255, 120, 50, 0.2);
}

.sched-task-item .task-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sched-task-item .task-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sched-task-item .task-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drawer-tab-content {
  display: none;
}

.drawer-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.drawer-section {
  margin-bottom: 1.75rem;
}

.drawer-section label,
.drawer-meta-grid label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.drawer-text-block {
  background: var(--bg-dialog-box);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: var(--border-dialog-box);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.drawer-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.drawer-meta-grid > div {
  background: var(--bg-dialog-box);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  border: var(--border-dialog-box);
}

.drawer-meta-grid .badge {
  display: inline-block;
  margin-top: 0.25rem;
}

.assignees-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.assignee-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.assignee-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Side Chat styles */
.drawer-chat-container {
  height: 280px;
  border-top: 1px solid rgba(255, 120, 50, 0.15);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.drawer-chat-container.collapsed {
  height: 36px;
}

.drawer-chat-container.collapsed .chat-messages,
.drawer-chat-container.collapsed .chat-form {
  display: none !important;
}

.drawer-chat-container .chat-header {
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.drawer-chat-container .chat-header::after {
  content: '▲';
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.drawer-chat-container.collapsed .chat-header::after {
  transform: rotate(180deg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  max-width: 85%;
  align-self: flex-start;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  position: relative;
}

.chat-message.user {
  background: rgba(255, 120, 50, 0.12);
  border: 1px solid rgba(255, 120, 50, 0.2);
  color: var(--text-primary);
}

.chat-message.self {
  align-self: flex-end;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
}

.chat-message.system {
  max-width: 95%;
  align-self: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  font-style: italic;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.chat-msg-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.chat-msg-time {
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 0.5rem;
  font-weight: 400;
}

.chat-form {
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-form input {
  flex: 1;
  background: rgba(10, 6, 4, 0.6);
  border: 1px solid rgba(255, 120, 50, 0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--color-primary-glow);
  background: rgba(10, 6, 4, 0.8);
}

.translation-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Proposal Comparison styles */
.proposal-banner {
  background: rgba(243, 156, 18, 0.08);
  border: 1px solid rgba(243, 156, 18, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.comparison-table {
  background: rgba(0, 0, 0, 0.2);
}

.comparison-table th, 
.comparison-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.diff-value-old {
  color: #ff6b5b;
  text-decoration: line-through;
  opacity: 0.8;
}

.diff-value-new {
  color: #2ecc71;
  font-weight: 600;
}

/* --- DRAG & DROP ZONE & PROGRESS QUEUE --- */
.drop-zone {
  border: 2px dashed rgba(255, 120, 50, 0.25);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(10, 6, 4, 0.3);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.drop-zone:hover, 
.drop-zone.drop-zone--over {
  border-color: var(--color-primary-glow);
  background: rgba(255, 120, 50, 0.05);
  box-shadow: 0 0 15px rgba(255, 120, 50, 0.1);
}

.drop-zone-icon {
  transition: transform 0.3s ease;
}

.drop-zone:hover .drop-zone-icon, 
.drop-zone.drop-zone--over .drop-zone-icon {
  transform: translateY(-4px);
  fill: var(--color-primary-glow) !important;
}

.upload-queue-container {
  background: rgba(10, 6, 4, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.upload-progress-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.upload-progress-row:last-child {
  border-bottom: none;
}

.upload-file-name {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1rem;
}

.upload-file-percentage {
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
}

.upload-file-percentage.success {
  color: var(--success);
}

.upload-file-percentage.error {
  color: var(--danger);
}

/* --- LANGUAGE SELECTOR --- */
.lang-selector {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.5rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lang-btn:hover {
  background: rgba(255, 120, 50, 0.1);
  border-color: rgba(255, 120, 50, 0.4);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: rgba(230, 95, 30, 0.15);
  border-color: var(--color-primary-glow);
  box-shadow: 0 0 8px rgba(255, 120, 50, 0.2);
}

/* --- MEMBERS DIRECTORY & PROFILES --- */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary-glow);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 15px rgba(255, 120, 50, 0.1);
}

.member-card.unverified {
  opacity: 0.6;
  filter: grayscale(85%);
  border: 1px dashed rgba(255, 120, 50, 0.4);
}

.member-card.unverified:hover {
  opacity: 0.85;
  filter: grayscale(40%);
  border-style: solid;
}

.member-avatar-wrapper {
  margin: 0 auto 1rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-avatar-default);
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.member-card:hover .member-avatar-wrapper {
  border-color: var(--color-primary-glow);
  transform: scale(1.05);
}

.member-avatar-wrapper.online {
  border-color: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.member-card:hover .member-avatar-wrapper.online {
  border-color: #55efc4;
  box-shadow: 0 0 15px rgba(85, 239, 196, 0.5);
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.member-role {
  font-size: 0.8rem;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.member-years {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.member-rsvp-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.member-rsvp-badge.rsvp-member {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.member-rsvp-badge.rsvp-visitor {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.member-rsvp-badge.rsvp-unsure {
  background: rgba(241, 196, 15, 0.12);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.member-rsvp-badge.rsvp-not-going {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* --- PROFILE HOVER BUBBLE --- */
.profile-hover-bubble {
  display: none;
  position: absolute;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 12, 8, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-primary-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  padding: 0.75rem 1rem;
  max-width: 280px;
  width: max-content;
  color: var(--text-primary);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hover-bubble-content {
  display: flex;
  flex-direction: column;
}

/* Username links across the app */
.member-link {
  color: var(--color-primary-glow);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: var(--transition);
}

.member-link:hover {
  color: var(--color-secondary);
}

/* --- RESPONSIVE TABS MENU --- */
@media (max-width: 1250px) {
  .tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.35rem;
  }

  .tab-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* --- RESPONSIVE MENU AND HEADER --- */
@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1rem;
  }

  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
  }
}

/* --- ADMIN CONTROL ROOM STYLES --- */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.admin-stat-card {
  background: linear-gradient(135deg, rgba(255, 120, 50, 0.04) 0%, rgba(200, 80, 200, 0.04) 100%), var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 120, 50, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 120, 50, 0.4);
  box-shadow: 0 8px 24px rgba(255, 120, 50, 0.15);
}

.admin-stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-glow);
  margin-bottom: 0.35rem;
  text-shadow: 0 0 10px rgba(255, 120, 50, 0.3);
}

.admin-stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Adjustments to Grid & Cards to prevent horizontal overflow */
.admin-card {
  min-width: 0; /* key fix for grid blowout */
}

.admin-card-full {
  min-width: 0; /* key fix for grid blowout */
}

/* Scrollable container for the roster table */
.admin-table-container {
  width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 0.5rem;
}

/* Custom Scrollbar for table container to match dark coppery-orange theme */
.admin-table-container::-webkit-scrollbar {
  height: 8px;
}

.admin-table-container::-webkit-scrollbar-track {
  background: rgba(20, 12, 8, 0.5);
  border-radius: 4px;
}

.admin-table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 120, 50, 0.3);
  border-radius: 4px;
  border: 1px solid rgba(20, 12, 8, 0.5);
}

.admin-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 120, 50, 0.5);
}

/* Roster table specific styles */
.admin-table-container table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px; /* Ensures table headers don't squish too much, forces scroll instead of layout breakage */
}

.admin-table-container th {
  background: rgba(20, 12, 8, 0.4);
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid rgba(255, 120, 50, 0.2);
}

.admin-table-container td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.admin-table-container tr {
  transition: background-color 0.15s ease;
}

.admin-table-container tr:hover {
  background-color: rgba(255, 120, 50, 0.02);
}

/* Force action cell to not wrap buttons */
.admin-table-container td:last-child {
  white-space: nowrap;
  width: 1%;
}

.admin-table-container td:last-child div,
.admin-table-container td:last-child {
  display: flex !important;
  gap: 0.5rem;
}

/* Role Badges for Roster Table */
.badge-role-admin {
  background: rgba(241, 196, 15, 0.1);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.4);
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.15);
}

.badge-role-member {
  background: rgba(255, 120, 50, 0.08);
  color: var(--color-secondary);
  border: 1px solid rgba(255, 120, 50, 0.3);
}

/* Responsive adjustments for Stats Card */
@media (max-width: 990px) {
  .admin-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 580px) {
  .admin-stats-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Burning Man Countdown Widget */
.countdown-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 120, 50, 0.08);
  border: 1px solid rgba(255, 120, 50, 0.25);
  box-shadow: 0 0 15px rgba(255, 120, 50, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-family: 'Outfit', 'Inter', sans-serif;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  animation: glowPulse 3s infinite ease-in-out;
  vertical-align: middle;
  flex-shrink: 0;
}

header nav ul {
  gap: 1.1rem;
}

.countdown-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-days {
  color: var(--color-primary-glow);
  font-size: 1.15rem;
  font-weight: 700;
  text-shadow: 0 0 8px var(--border-glow);
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}

.countdown-seconds {
  color: var(--color-primary);
}

.countdown-suffix {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px var(--border-glow);
    border-color: var(--border-glow);
  }
  50% {
    box-shadow: 0 0 25px var(--border-glow-focus);
    border-color: var(--border-glow-focus);
  }
}

/* --- CAMP DIRECTORY SUB-TABS --- */
.sub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.sub-tab-btn {
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-muted) !important;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sub-tab-btn:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.sub-tab-btn.active {
  background: rgba(212, 175, 55, 0.12) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: var(--color-secondary) !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* --- SEARCHABLE DROPDOWN SELECT --- */
.searchable-select-container {
  position: relative;
  flex: 1;
}

.searchable-select-input {
  width: 100%;
  min-height: 38px;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.95rem !important;
  cursor: pointer;
}

.searchable-select-input:focus {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: var(--color-primary-glow) !important;
  box-shadow: 0 0 10px rgba(255, 120, 50, 0.25) !important;
}

.searchable-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(20, 14, 10, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 120, 50, 0.2);
  border-radius: var(--radius-sm);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  margin-top: 4px;
}

.searchable-dropdown-list.active {
  display: block;
}

.searchable-dropdown-item {
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.searchable-dropdown-item:last-child {
  border-bottom: none;
}

.searchable-dropdown-item:hover {
  background: rgba(255, 120, 50, 0.15);
  color: var(--color-primary-glow);
}

.searchable-dropdown-item.selected {
  background: rgba(255, 120, 50, 0.25);
  color: var(--color-primary-glow);
  font-weight: 600;
}

.searchable-dropdown-no-results {
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

/* --- CAMP CHAT STYLES --- */
.chat-messages-box {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
}

.chat-role-badge {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.chat-role-badge.admin {
  background: var(--color-primary);
  color: black;
}

.chat-role-badge.member {
  background: var(--color-secondary);
  color: black;
}

.chat-role-badge.visitor {
  background: var(--text-muted);
  color: white;
}

/* Site Footer Styling */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-glow);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--color-secondary);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.2s ease;
  cursor: pointer;
}

.site-footer a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Terms and Privacy dialogue scroll limits */
dialog .dialog-content-scroll {
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding-right: 0.5rem;
}

dialog .dialog-content-scroll h3 {
  color: var(--color-secondary);
  font-size: 1.15rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

dialog .dialog-content-scroll p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- MOBILE RESPONSIVE OPTIMIZATIONS (< 600px) --- */
@media (max-width: 600px) {
  main {
    padding: 2rem 1rem;
  }
  
  .glass-panel {
    padding: 1.5rem 1rem;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero h2 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }
  
  .hero-actions .btn, .hero-actions a.btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  
  .countdown-widget {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .schedule-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .schedule-meta {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
  }

  .nav-container h1 {
    font-size: 1.35rem;
  }
}

@media (max-width: 360px) {
  .hero-showcase {
    height: 260px;
    max-width: 280px;
  }
  .photo-frame {
    width: 160px;
  }
  .stack-2 {
    left: 90px;
  }
  .stack-3 {
    left: 45px;
    top: 100px;
  }
}

.schedule-not-public-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-glow);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.schedule-not-public-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.schedule-not-public-card p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-style: italic;
  max-width: 500px;
  margin: 0 auto;
}

/* Facebook Sign-In Button */
.facebook-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 40px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1877F2, #155fa0);
  border: 1px solid rgba(24, 119, 242, 0.4);
  color: #ffffff;
  font-family: 'Roboto', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.2);
}

.facebook-signin-btn:hover {
  background: linear-gradient(135deg, #166fe5, #12548c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
  border-color: rgba(24, 119, 242, 0.6);
}

.facebook-signin-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(24, 119, 242, 0.2);
}

/* Push Notification Banner */
.notification-banner {
  background: rgba(255, 120, 50, 0.08);
  border: 1px solid rgba(255, 120, 50, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.notification-banner.hidden {
  display: none !important;
}

.notification-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-banner-icon {
  font-size: 1.5rem;
  animation: notification-wiggle 1s ease-in-out infinite alternate;
}

.notification-banner-text {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

@keyframes notification-wiggle {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(8deg); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust banner for small screens */
@media (max-width: 600px) {
  .notification-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .notification-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- CHAT AUTOCOMPLETE SUGGESTIONS --- */
.chat-autocomplete-container {
  position: relative;
  width: 100%;
  flex: 1;
}

.chat-autocomplete-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(20, 12, 8, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--color-primary-glow);
  border-radius: 6px;
  z-index: 10000;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.25rem;
  display: none;
  flex-direction: column;
}

.chat-autocomplete-item {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-autocomplete-item:hover,
.chat-autocomplete-item.highlighted {
  background: rgba(255, 120, 50, 0.15);
  color: var(--color-secondary);
}

.chat-autocomplete-item .autocomplete-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* --- SMOOTH TRANSITION FOR DIMENSIONAL COLLAPSE (ELIMINATE JUMP) --- */
.alert, .alert-fcm-popup, #pwa-install-banner {
  transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease, border-width 0.4s ease, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  max-height: 200px; /* Safe starting maximum height */
}

/* Member Finances Grid */
.member-expense-grid {
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: start;
}

/* Chat Card Panel styling */
.chat-card-panel {
  padding: 1.5rem;
  flex-direction: column;
  height: 500px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Camp Tasks Mobile Improvements */
  .tasks-grid {
    gap: 1.25rem !important;
  }
  .balancer-panel {
    position: static !important;
  }
  .task-card {
    padding: 0.85rem !important;
  }
  .task-header {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .task-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .task-assignees {
    flex-wrap: wrap !important;
  }

  /* Member Finances Grid Mobile Improvements */
  .member-expense-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  table th, table td {
    padding: 0.6rem 0.35rem !important;
    font-size: 0.85rem !important;
  }

  /* Camp Chat Mobile Keyboard Sizing & Margins */
  .chat-header-section {
    margin-bottom: 0.75rem !important;
  }
  .chat-header-section p#chat-subtitle {
    display: none !important; /* Hide subtitle to save vertical space when keyboard is open */
  }
  #chat-tabs-nav {
    margin-bottom: 0.75rem !important;
  }
  .chat-rooms-container {
    gap: 0.75rem !important;
  }
  .chat-card-panel {
    height: 340px !important;
    padding: 0.85rem !important;
  }
}

/* --- RSVP Selector --- */
.rsvp-container {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.rsvp-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rsvp-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.rsvp-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  white-space: nowrap;
}

.rsvp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.rsvp-btn.active[data-status="member"] {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.2);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
  transform: scale(1.05);
}

.rsvp-btn.active[data-status="visitor"] {
  border-color: #a3e635;
  background: rgba(163, 230, 53, 0.2);
  box-shadow: 0 0 12px rgba(163, 230, 53, 0.4);
  transform: scale(1.05);
}

.rsvp-btn.active[data-status="unsure"] {
  border-color: #e67e22;
  background: rgba(230, 126, 34, 0.2);
  box-shadow: 0 0 12px rgba(230, 126, 34, 0.4);
  transform: scale(1.05);
}

.rsvp-btn.active[data-status="not_going"] {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.4);
  transform: scale(1.05);
}

.rsvp-status-text {
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.25rem;
  transition: color 0.25s ease;
}

.rsvp-status-text.member { color: #2ecc71; }
.rsvp-status-text.visitor { color: #a3e635; }
.rsvp-status-text.unsure { color: #e67e22; }
.rsvp-status-text.not_going { color: #e74c3c; }

/* --- HUNDROID CHAT WIDGET --- */
#hundroid-chat-widget {
  position: static;
  font-family: var(--font-sans);
}

#hundroid-chat-trigger {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--color-primary-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 120, 50, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
  overflow: hidden;
  animation: hundroid-glow 3s infinite alternate;
  z-index: 990; /* behind detail drawer (999) and dialogs */
}

#hundroid-chat-trigger:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--color-secondary);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 120, 50, 0.4);
}

#hundroid-chat-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#hundroid-chat-dialog {
  display: none;
  width: 360px;
  height: 480px;
  background: rgba(18, 12, 8, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--color-primary-glow);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-lg);
  flex-direction: column;
  position: fixed;
  bottom: 100px;
  right: 25px;
  overflow: hidden;
  animation: chat-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000; /* on top of everything */
}

#hundroid-chat-widget.active #hundroid-chat-dialog {
  display: flex;
}

@keyframes chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hundroid-glow {
  0% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 5px rgba(255, 120, 50, 0.15);
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(255, 120, 50, 0.45);
  }
}

#hundroid-chat-dialog .chat-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 120, 50, 0.08);
  border-bottom: 1px solid rgba(255, 120, 50, 0.15);
  gap: 0.75rem;
}

#hundroid-chat-dialog .chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-primary-glow);
  object-fit: cover;
}

#hundroid-chat-dialog .chat-title-area {
  flex: 1;
}

#hundroid-chat-dialog .chat-title-area h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 700;
}

#hundroid-chat-dialog .chat-title-area .chat-subtitle {
  font-size: 0.75rem;
  color: var(--color-secondary);
}

#hundroid-chat-dialog .btn-close-chat {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

#hundroid-chat-dialog .btn-close-chat:hover {
  color: var(--color-primary-glow);
}

#hundroid-chat-dialog .btn-resize-chat {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

#hundroid-chat-dialog .btn-resize-chat:hover {
  color: var(--color-primary-glow);
  transform: scale(1.1);
}

#hundroid-chat-dialog.expanded {
  width: 460px;
  height: 650px;
}

@media (max-width: 768px) {
  #hundroid-chat-dialog.expanded {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

#hundroid-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 120, 50, 0.3) rgba(0, 0, 0, 0.2);
}

#hundroid-chat-messages::-webkit-scrollbar {
  width: 6px;
}

#hundroid-chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

#hundroid-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 120, 50, 0.3);
  border-radius: 3px;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom-left-radius: 2px;
  align-self: flex-start;
}

.chat-bubble.user {
  background: rgba(255, 120, 50, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(255, 120, 50, 0.25);
  border-bottom-right-radius: 2px;
  align-self: flex-end;
}

.chat-bubble.system {
  background: rgba(200, 80, 200, 0.05);
  color: var(--text-muted);
  border: 1px dashed rgba(200, 80, 200, 0.2);
  align-self: center;
  text-align: center;
  font-style: italic;
  font-size: 0.8rem;
}

.chat-input-area {
  display: flex;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 0.5rem;
}

.chat-input-area input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem !important;
  font-size: 0.88rem !important;
  outline: none;
  min-height: auto !important;
}

.chat-input-area input:focus {
  border-color: var(--color-primary-glow) !important;
}

.chat-input-area button {
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  align-self: flex-start;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  #hundroid-chat-dialog {
    width: calc(100vw - 40px);
    right: -10px;
    height: 420px;
  }
}

.chat-debug-block {
  flex-shrink: 0;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid #ff007f;
  margin: 5px 10px;
  padding: 8px;
  border-radius: 4px;
  font-family: monospace;
  color: #00ffcc;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.chat-debug-container {
  margin: 5px 10px;
  flex-shrink: 0;
}

.chat-debug-container summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  user-select: none;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  display: inline-block;
  transition: background 0.2s;
}

.chat-debug-container summary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #00ffcc;
}

.chat-debug-container[open] summary {
  margin-bottom: 5px;
}

/* --- TICKETS BOARD STYLE --- */
.ticket-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 120, 50, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-height: 220px;
}

.ticket-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 120, 50, 0.35);
  box-shadow: 0 8px 24px rgba(255, 120, 50, 0.1);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.ticket-type-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-type-badge.type-ticket_main {
  background: rgba(255, 120, 50, 0.08);
  color: var(--color-secondary);
  border: 1px solid rgba(255, 120, 50, 0.25);
}

.ticket-type-badge.type-ticket_fomo {
  background: rgba(155, 89, 182, 0.08);
  color: #9b59b6;
  border: 1px solid rgba(155, 89, 182, 0.25);
}

.ticket-type-badge.type-ticket_aid {
  background: rgba(52, 152, 219, 0.08);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.25);
}

.ticket-type-badge.type-vehicle_pass {
  background: rgba(46, 204, 113, 0.08);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.25);
}

.ticket-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ticket-price::before {
  content: '$';
  font-size: 1rem;
  margin-right: 0.05rem;
  color: var(--text-muted);
}

.ticket-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.ticket-status-pill.status-available {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.ticket-status-pill.status-sold {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.ticket-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
  line-height: 1.4;
  word-break: break-word;
  flex-grow: 1;
}

.ticket-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ticket-seller-link {
  color: var(--color-primary-glow);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
  font-weight: 600;
}

.ticket-seller-link:hover {
  color: var(--color-secondary);
}

.ticket-actions {
  display: flex;
  gap: 0.5rem;
}

.ticket-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  color: var(--text-muted);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ticket-action-btn:hover {
  color: var(--text-primary);
}

.ticket-action-btn.btn-delete:hover {
  color: var(--danger);
}

/* Custom Compact Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.25s ease;
  outline: none;
  padding: 0;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Tricolor Light Theme Selector Adjustments */
[data-theme="tricolor-light"] .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-primary);
}

[data-theme="tricolor-light"] .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* --- NEW VERSION UPLOADED BANNER --- */
.new-version-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(90deg, #d44f1c, #9c27b0);
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10000;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: slideDownBanner 0.4s ease-out;
  text-align: center;
  padding: 0 1rem;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

body.has-version-banner header {
  top: 36px !important;
}

body.has-version-banner {
  padding-top: 36px !important;
}

/* --- DASHBOARD NEWS CARD STYLING & HOVER --- */
.dashboard-news-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.dashboard-news-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-primary-glow);
  transform: translateX(4px);
}

.avatar-placeholder {
  font-size: 2rem;
  color: var(--color-avatar-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- HUNDROID CHAT GREETING BUBBLE --- */
#hundroid-chat-bubble {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--color-primary-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 0.75rem 2rem 0.75rem 0.75rem;
  z-index: 985;
  font-size: 0.85rem;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#hundroid-chat-bubble.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#hundroid-chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border-right: 1px solid var(--color-primary-glow);
  border-bottom: 1px solid var(--color-primary-glow);
  transform: rotate(45deg);
}

#btn-close-hundroid-bubble {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

#btn-close-hundroid-bubble:hover {
  color: var(--color-primary);
}

/* --- GALLERY LIGHTBOX & TAG FILTER STYLES --- */
.lightbox-layout {
  display: flex;
  min-height: 400px;
  height: 80vh;
  max-height: 800px;
  flex-direction: row;
  position: relative;
}

@media (max-width: 768px) {
  .lightbox-layout {
    flex-direction: column !important;
    height: 90vh !important;
  }
  .lightbox-details-panel {
    max-width: 100% !important;
    border-left: none !important;
    border-top: 1px solid var(--border-glow);
    flex: 1.2 !important;
  }
  .lightbox-image-area {
    flex: 1 !important;
  }
}

.lightbox-details-panel {
  transition: all 0.3s ease;
}

.lightbox-details-panel.hidden {
  display: none !important;
}

.gallery-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-card:hover {
  transform: scale(1.02);
}

.gallery-tags-filter-bar button {
  margin: 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.gallery-tags-filter-bar button:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary-glow);
}

/* Tag Input Styles */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  min-height: 38px;
  box-sizing: border-box;
  align-items: center;
  cursor: text;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tags-input-container:focus-within {
  border-color: var(--color-primary-glow, #f39c12);
  box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-primary, #e67e22);
  color: white;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  user-select: none;
  animation: tagAppear 0.15s ease-out;
}

@keyframes tagAppear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tag-pill-remove {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 0 0.15rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.tag-pill-remove:hover {
  color: white;
}

/* Styled Role Options Selector */
.role-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.role-option {
  flex: 1;
  background: rgba(10, 6, 4, 0.4);
  border: 1.5px solid rgba(255, 120, 50, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.role-option:hover {
  border-color: rgba(255, 120, 50, 0.4);
  background: rgba(10, 6, 4, 0.6);
}

.role-option.active {
  border-color: var(--color-primary-glow);
  background: rgba(255, 120, 50, 0.1);
  box-shadow: 0 0 12px rgba(255, 120, 50, 0.15);
}

.role-option-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.role-option-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Light theme overrides for role-option to look consistent */
html[data-theme="tricolor-light"] .role-option {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="tricolor-light"] .role-option:hover {
  border-color: rgba(176, 30, 35, 0.35);
  background: rgba(0, 0, 0, 0.02);
}

html[data-theme="tricolor-light"] .role-option.active {
  border-color: var(--color-primary);
  background: rgba(176, 30, 35, 0.06);
  box-shadow: 0 0 12px rgba(176, 30, 35, 0.1);
}

/* Gallery Header Layout Empty Space Fix */
@media (max-width: 992px) {
  .gallery-main-layout {
    grid-template-columns: 1fr !important;
  }
  #gallery-upload-box {
    margin-top: 1.5rem !important;
  }
}

/* --- GLASSMORPHISM SYSTEM & HERO PAGE LAYERING --- */

/* Glass Edge Specular Highlight & Layering on Base Panels */
.glass-panel {
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.card, .task-card, .poll-card, .event-card, .stat-card, .schedule-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.card:hover, .task-card:hover, .poll-card:hover, .event-card:hover, .stat-card:hover, .schedule-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 15px var(--border-glow) !important;
}

/* Light Theme tweaks for cards to look elegant and soft-layered */
html[data-theme="tricolor-light"] .glass-panel {
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
}

html[data-theme="tricolor-light"] .card, 
html[data-theme="tricolor-light"] .task-card, 
html[data-theme="tricolor-light"] .poll-card, 
html[data-theme="tricolor-light"] .event-card, 
html[data-theme="tricolor-light"] .stat-card, 
html[data-theme="tricolor-light"] .schedule-card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="tricolor-light"] .card:hover, 
html[data-theme="tricolor-light"] .task-card:hover, 
html[data-theme="tricolor-light"] .poll-card:hover, 
html[data-theme="tricolor-light"] .event-card:hover, 
html[data-theme="tricolor-light"] .stat-card:hover, 
html[data-theme="tricolor-light"] .schedule-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 10px rgba(176, 30, 35, 0.08) !important;
}

/* Hero Background and Layout overrides */
.hero {
  background-image: linear-gradient(180deg, rgba(17, 9, 10, 0.8) 0%, rgba(17, 9, 10, 0.85) 100%), url('gate-night.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-clip: padding-box !important;
  isolation: isolate;
}

html[data-theme="tricolor-light"] .hero {
  background-image: none !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="tricolor-light"] .hero::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-image: linear-gradient(90deg, rgba(244, 243, 240, 0.95) 0%, rgba(244, 243, 240, 0.85) 50%, rgba(244, 243, 240, 0.4) 100%), url('gate-day.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-clip: padding-box !important;
  filter: blur(4px) !important; /* Tiny bit of blur */
  transform: scale(1.03) !important; /* Prevent blur bleed outline/fading edges */
  z-index: -1 !important;
  pointer-events: none !important;
}

/* Glass Actions Box inside Hero Section */
.hero-actions-container {
  margin-top: 2rem;
  background: rgba(36, 18, 21, 0.45);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

html[data-theme="tricolor-light"] .hero-actions-container {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-actions-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.countdown-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  cursor: pointer;
}

.countdown-display .countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.countdown-display .countdown-days {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  color: var(--color-primary-glow);
  letter-spacing: 0.02em;
}

.hero-actions-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
  width: 100%;
}

html[data-theme="tricolor-light"] .hero-actions-divider {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.hero-actions-bottom-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.btn-link-action {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  text-shadow: none !important;
  box-shadow: none !important;
}

.btn-link-action:hover {
  color: var(--color-primary-glow) !important;
  text-decoration: underline;
  transform: translateY(-1px);
}

.divider-dot {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Glass Polaroid Frames override */
.photo-frame {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 0, 0, 0.2) !important;
}

.photo-caption {
  color: rgba(255, 255, 255, 0.9) !important;
}

.photo-frame:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.1) !important;
}

/* Polaroid overrides for Light theme */
html[data-theme="tricolor-light"] .photo-frame {
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="tricolor-light"] .photo-caption {
  color: #2b211a !important;
}

html[data-theme="tricolor-light"] .photo-frame:hover {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* --- TITLE SVG COLORING & DIMENSIONS --- */
.hero-title-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  color: var(--color-primary-glow);
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  display: block;
}

.hero-title-svg path {
  fill: currentColor !important;
}

/* --- HERO CONTAINER PADDING CORRECTION --- */
.hero {
  padding: 3.5rem 3rem 2.25rem 3rem !important; /* Balanced visual spacing bottom vs sides */
}

html[data-theme="tricolor-light"] .hero {
  padding: 3.5rem 3rem 2.25rem 3rem !important;
}

/* --- PHOTO FRAMES SIZE & SPACED OUT LAYOUT --- */
@media (min-width: 901px) {
  .photo-frame {
    width: 275px !important; /* Slightly larger scale */
  }

  .hero-showcase {
    max-width: 500px !important; /* Distribute over wider horizontal space */
    height: 420px !important; /* Slightly taller stack area */
  }

  /* Spaced stack locations to reduce overlapping */
  .stack-1 {
    left: 0px !important;
    top: 10px !important;
    transform: rotate(-8deg) !important;
    z-index: 3;
  }

  .stack-2 {
    right: 0px !important;
    left: auto !important;
    top: 30px !important;
    transform: rotate(6deg) !important;
    z-index: 2;
  }

  .stack-3 {
    left: 95px !important;
    top: 180px !important;
    transform: rotate(-3deg) !important;
    z-index: 1;
  }
}

.photo-frame {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              background 0.4s ease,
              border-color 0.4s ease,
              z-index 0s 0.4s !important;
}

.photo-frame:hover {
  transform: scale(1.15) rotate(0deg) translateY(-10px) !important;
  z-index: 10 !important;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              background 0.4s ease,
              border-color 0.4s ease,
              z-index 0s 0s !important;
}

/* --- GALLERY LIGHTBOX IMPROVEMENTS --- */
.lightbox-nav-controls {
  display: flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center !important;
}

.lightbox-nav-controls button {
  white-space: nowrap !important;
  color: #ffffff !important; /* Enforce white color on light theme */
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.lightbox-nav-controls button:hover {
  color: var(--color-primary-glow) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

#btn-lightbox-info-toggle {
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  white-space: nowrap !important;
}

#btn-lightbox-info-toggle:hover {
  color: var(--color-primary-glow) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Smooth transitions during theme changes for browsers without View Transitions support */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* --- BACKGROUND WATERMARK STENCILS --- */
.bg-watermarks-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.bg-watermark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: -2;
  opacity: 0.12; /* Subtle but clearly visible on dark background */
  max-width: 520px; /* Bounding box to prevent oversized stencils (increased by 30%) */
  max-height: 520px; /* Bounding box to prevent vertical overlaps of tall assets (increased by 30%) */
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.6); /* Boost brightness of the #373535 shapes */
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Adjust watermarks for tricolor light theme */
html[data-theme="tricolor-light"] .bg-watermark {
  opacity: 0.045; /* Less visible, faint elegant outlines */
  filter: grayscale(1) invert(1) brightness(0.3); /* Dark gray outlines */
}

/* Hide background watermarks on small screens to avoid overlaying and clutter */
@media (max-width: 768px) {
  .bg-watermarks-container {
    display: none !important;
  }
}



