:root {
  --bg-primary: #0a1114;
  --bg-secondary: #101c20;
  --bg-card: rgba(20, 34, 40, 0.75);
  --bg-card-hover: rgba(27, 45, 54, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-festive: rgba(229, 184, 105, 0.35);
  --border-danger: rgba(239, 68, 68, 0.4);
  
  --accent-red: #c0392b;
  --accent-red-hover: #d63031;
  --accent-ruby: #e74c3c;
  
  --accent-gold: #e5b869;
  --accent-gold-hover: #f39c12;
  --accent-gold-glow: rgba(229, 184, 105, 0.25);
  
  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-cyan: #06b6d4;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-gold: #fde047;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--border-subtle);
  --shadow-festive: 0 0 25px rgba(229, 184, 105, 0.15);
  --shadow-red: 0 10px 25px rgba(192, 57, 43, 0.3);
  
  --font-heading: 'Cinzel', serif, Georgia;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(192, 57, 43, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(229, 184, 105, 0.04) 0%, transparent 50%);
}

#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.app-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.app-header {
  background: rgba(13, 27, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-festive);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(229, 184, 105, 0.4));
  animation: floatSlow 4s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body);
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--accent-red) 0%, #8e1c14 100%);
  color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.4);
}

.snow-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.snow-toggle-btn:hover {
  color: #fff;
  border-color: var(--accent-gold);
}

/* =========================================
   CONTAINER & LAYOUT
========================================= */
.main-content {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

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

/* Page Header & Actions */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.view-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* =========================================
   BUTTONS
========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  font-family: var(--font-body);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red) 0%, #991b1b 100%);
  color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-ruby) 0%, var(--accent-red) 100%);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #e5b869 0%, #b8860b 100%);
  color: #0b1315;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(229, 184, 105, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #f5d089 0%, #d4af37 100%);
  box-shadow: 0 6px 20px rgba(229, 184, 105, 0.45);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.4);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
  border-color: #ef4444;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   CARDS & GRIDS
========================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-festive);
  box-shadow: var(--shadow-card), var(--shadow-festive);
  transform: translateY(-2px);
}

.card-festive-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-gold) 50%, var(--accent-emerald) 100%);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-drawn {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-archived {
  background: rgba(229, 184, 105, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 184, 105, 0.4);
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  margin-top: auto;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-festive);
  border-radius: var(--radius-lg);
  max-width: 600px;
  margin: 3rem auto;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px rgba(229, 184, 105, 0.4));
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* =========================================
   EVENT DETAIL VIEW & TABS
========================================= */
.event-hero {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.25) 0%, rgba(13, 27, 30, 0.8) 100%);
  border: 1px solid var(--border-festive);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: var(--shadow-card), var(--shadow-festive);
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-back-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  margin-bottom: 0.3rem;
  transition: transform 0.2s;
}

.hero-back-link:hover {
  transform: translateX(-3px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-btn.active .tab-badge {
  background: var(--accent-gold);
  color: #0d1b1e;
}

.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: block;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(10, 17, 20, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
  background: rgba(15, 25, 30, 0.95);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: #cbd5e1;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

/* =========================================
   TABLES & LISTS
========================================= */
.custom-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.custom-table th {
  background: rgba(13, 27, 30, 0.9);
  padding: 0.9rem 1.2rem;
  color: #cbd5e1;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

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

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.sent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.not_sent {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-badge.no_email {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* =========================================
   DRAW & RESULTS SPECIAL SECTIONS
========================================= */
.draw-action-box {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.2) 0%, rgba(13, 27, 30, 0.95) 100%);
  border: 2px dashed var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-festive);
}

.draw-action-box .draw-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulseGold 3s infinite;
}

@keyframes pulseGold {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(229, 184, 105, 0.3)); }
  50% { filter: drop-shadow(0 0 30px rgba(229, 184, 105, 0.7)); }
}

.draw-action-box h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.draw-action-box p {
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 1.8rem auto;
  font-size: 1rem;
}

.drawn-success-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(13, 27, 30, 0.9) 100%);
  border: 1px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.banner-icon {
  font-size: 2.5rem;
}

.banner-text h4 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.banner-text p {
  color: #cbd5e1;
  font-size: 0.9rem;
}

/* =========================================
   MODALS
========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-festive);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), var(--shadow-festive);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

/* =========================================
   TOAST NOTIFICATIONS
========================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 1rem 1.4rem;
  border-radius: var(--radius-sm);
  background: #1e293b;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border-left: 4px solid var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease forwards;
  max-width: 400px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success {
  border-left-color: var(--accent-emerald);
}

.toast.toast-error {
  border-left-color: var(--accent-red);
}

/* =========================================
   FOOTER
========================================= */
.app-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.app-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* =========================================
   FAST EXCLUSIONS & MATRIX STYLES
========================================= */
.sub-tabs-bar {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sub-tab-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.sub-tab-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sub-tab-pill.active {
  background: linear-gradient(135deg, var(--accent-red) 0%, #991b1b 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.4);
}

/* Participant Chips Selector */
.chip-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-festive);
  min-height: 54px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  user-select: none;
  font-family: var(--font-body);
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.chip-btn.selected {
  background: linear-gradient(135deg, rgba(229, 184, 105, 0.25) 0%, rgba(192, 57, 43, 0.3) 100%);
  border-color: var(--accent-gold);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(229, 184, 105, 0.3);
  transform: scale(1.03);
}

.chip-btn.selected .chip-check {
  display: inline-block;
  color: var(--accent-gold);
}

.chip-check {
  display: none;
}

/* Couple & Household Cards */
.couple-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(229, 184, 105, 0.05);
  border: 1px solid rgba(229, 184, 105, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
}

.couple-card:hover {
  background: rgba(229, 184, 105, 0.08);
  border-color: var(--accent-gold);
}

.couple-names {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.couple-badge {
  background: rgba(229, 184, 105, 0.2);
  color: var(--accent-gold);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
}

/* Interactive Matrix Grid */
.matrix-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 1rem;
  box-shadow: var(--shadow-card);
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 0.85rem;
}

.matrix-table th {
  padding: 0.6rem 0.4rem;
  background: rgba(13, 27, 30, 0.95);
  color: #cbd5e1;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  font-size: 0.8rem;
  line-height: 1.25;
  vertical-align: bottom;
  width: 68px;
  max-width: 80px;
  min-width: 44px;
}

.matrix-table th.matrix-giver-header {
  text-align: left;
  vertical-align: middle;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #111d21;
  width: 110px;
  max-width: 130px;
  min-width: 85px;
  padding: 0.6rem 0.75rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.matrix-cell {
  padding: 0.55rem 0.4rem;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-weight: 600;
  font-size: 0.95rem;
  width: 68px;
  max-width: 80px;
  min-width: 44px;
}

.matrix-cell.self {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-dim);
  cursor: not-allowed;
}

.matrix-cell.allowed {
  background: rgba(16, 185, 129, 0.08);
  color: rgba(52, 211, 153, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.matrix-cell.allowed:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.04);
}

.matrix-cell.excluded {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.matrix-cell.excluded:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
  transform: scale(1.04);
}

.matrix-cell.history {
  background: rgba(229, 184, 105, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 184, 105, 0.4);
  cursor: help;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-header {
    padding: 0.8rem 1rem;
  }
  .main-content {
    padding: 0 1rem;
  }
  .event-hero {
    padding: 1.25rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .draw-action-box {
    padding: 2rem 1rem;
  }
}
