/* ==========================================================================
   Design System & Styling - EventSphere (Multi-Theme, Premium Glassmorphism)
   ========================================================================== */

/* --- ROOT THEME VARIABLES --- */
:root {
  /* Default: Deep Ocean Theme */
  --bg-app: #030712;
  --bg-glow: radial-gradient(circle at 50% 0%, #0d1e3d 0%, #030712 70%);
  --bg-card: rgba(8, 12, 24, 0.9);
  --bg-card-hover: rgba(15, 23, 42, 0.95);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(0, 242, 254, 0.35);
  
  --primary: #00f2fe;
  --primary-hover: #4facfe;
  --secondary: #3b82f6;
  --accent: #00f2fe;
  
  --text-main: #ffffff;
  --text-muted: #d1d5db;
  --text-inverse: #030712;
  
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
}

/* --- THEME 2: EMERALD FOREST --- */
body.theme-forest {
  --bg-app: #020b05;
  --bg-glow: radial-gradient(circle at 50% 0%, #0b3117 0%, #020b05 70%);
  --bg-card: rgba(4, 12, 7, 0.92);
  --bg-card-hover: rgba(8, 24, 14, 0.98);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(16, 185, 129, 0.35);
  
  --primary: #10b981;
  --primary-hover: #34d399;
  --secondary: #059669;
  --accent: #f59e0b;
  
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.18);
}

/* --- THEME 3: SUNSET WARMTH --- */
body.theme-sunset {
  --bg-app: #0d0408;
  --bg-glow: radial-gradient(circle at 50% 0%, #3a0d1d 0%, #0d0408 70%);
  --bg-card: rgba(15, 5, 10, 0.92);
  --bg-card-hover: rgba(26, 9, 17, 0.98);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(244, 63, 94, 0.35);
  
  --primary: #f43f5e;
  --primary-hover: #fb7185;
  --secondary: #be123c;
  --accent: #fbbf24;
  
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  
  --shadow-glow: 0 0 25px rgba(244, 63, 94, 0.18);
}

/* --- THEME 4: CLEAN LIGHT MINIMAL --- */
body.theme-light {
  --bg-app: #f1f5f9;
  --bg-glow: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #f1f5f9 100%);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-glow: rgba(37, 99, 235, 0.2);
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --accent: #4f46e5;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.08);
}

/* --- BASE STYLING --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body {
  background-color: var(--bg-app);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

code {
  font-family: Consolas, Monaco, monospace;
}

/* --- APP LAYOUT HEADER --- */
.app-header {
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.88);
}

body.theme-light .app-header {
  background: rgba(255, 255, 255, 0.7);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  color: var(--primary);
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px var(--primary));
}

.logo h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

body.theme-light .nav-link:hover {
  background: rgba(15, 23, 42, 0.05);
}

.nav-link.active {
  color: var(--text-inverse);
  background: var(--primary);
  box-shadow: var(--shadow-glow);
}

body.theme-light .nav-link.active {
  color: #fff;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* --- ROLE SELECTOR SWITCH --- */
.role-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid var(--glass-border);
}

body.theme-light .role-selector {
  background: rgba(15, 23, 42, 0.05);
}

.role-selector .nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.role-selector .nav-btn i {
  width: 12px;
  height: 12px;
}

.role-selector .nav-btn.active {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
}

body.theme-light .role-selector .nav-btn.active {
  color: #fff;
}

/* --- CONTAINER MAIN ZONE --- */
.app-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px;
}

.zone {
  display: none;
}

.zone.active {
  display: block;
}

.hero-section {
  margin-bottom: 35px;
  text-align: center;
}

.hero-section h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.5);
}

.hero-section p {
  color: #ffffff;
  font-size: 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 0, 0, 0.4);
}

/* --- GENERAL BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
}

body.theme-light .btn-primary {
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  color: var(--text-main);
}

body.theme-light .btn-secondary {
  background: rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

body.theme-light .btn-secondary:hover {
  background: rgba(15, 23, 42, 0.08);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

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

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
}

/* --- FILTERS BAR --- */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

body.theme-light .search-box {
  background: rgba(255, 255, 255, 0.6);
}

.search-box i {
  color: var(--text-muted);
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  width: 100%;
  outline: none;
}

.filter-group {
  display: flex;
  gap: 12px;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0 12px;
}

body.theme-light .select-wrapper {
  background: rgba(255, 255, 255, 0.6);
}

.select-wrapper i {
  color: var(--text-muted);
  margin-right: 6px;
  width: 14px;
  height: 14px;
}

.select-wrapper select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 24px 8px 0;
  outline: none;
  cursor: pointer;
  appearance: none;
}

/* --- CLIENT CATALOGUE CARDS --- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-glow);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow), 0 20px 40px rgba(0,0,0,0.3);
}

.event-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
}

.event-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.badge-valide {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}

.badge-en-attente {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.badge-annulee {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.badge-reporte {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid #0ea5e9;
  color: #38bdf8;
}

.badge-supprime {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #64748b;
  color: #cbd5e1;
}

.event-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-meta-info {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-item i {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.event-card-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.3;
}

.event-card-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--glass-border);
  padding-top: 15px;
  margin-top: auto;
}

.event-price-start {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* --- CONTACT ZONE STYLING --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 800px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-info-card, .contact-form-card, .profile-sidebar, .profile-history, .settings-monitoring-card, .settings-forms-container {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 25px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-detail-item i {
  color: var(--primary);
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
}

body.theme-light .contact-detail-item i {
  background: rgba(15, 23, 42, 0.05);
}

.contact-detail-item h5 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.contact-detail-item p {
  font-size: 15px;
  font-weight: 500;
}

/* --- INPUT FORMS LAYOUT --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

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

.form-group.full-width {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  width: 100%;
}

body.theme-light .form-group input, body.theme-light .form-group select, body.theme-light .form-group textarea {
  background: rgba(255, 255, 255, 0.7);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

/* Specific styling for input[type="color"] to be fully visible and beautiful */
.form-group input[type="color"] {
  padding: 4px;
  height: 42px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
}
.form-group input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.form-group input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--glass-border);
  border-radius: 4px;
}

body.theme-light .form-group input[type="color"] {
  background: rgba(255, 255, 255, 0.7);
}

/* Fix select options contrast (prevents white-on-white text dropdown issue) */
select option {
  background-color: #111827;
  color: #ffffff;
}
body.theme-light select option {
  background-color: #ffffff;
  color: #0f172a;
}

.required {
  color: var(--danger);
  margin-left: 2px;
}

/* --- PROFILE DASHBOARD --- */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}

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

.profile-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.user-avatar-big {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--glass-border-glow);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  box-shadow: var(--shadow-glow);
}

body.theme-light .user-avatar-big {
  background: rgba(15, 23, 42, 0.05);
}

.user-avatar-big i {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.profile-meta-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--glass-border);
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.profile-meta-details strong {
  color: var(--text-muted);
}

/* --- TABLES STYLING --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}

body.theme-light .data-table th {
  background: rgba(15, 23, 42, 0.03);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

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

body.theme-light .data-table tbody tr:hover {
  background: rgba(0,0,0,0.01);
}

.row-title {
  font-weight: 600;
  display: block;
  font-size: 14px;
}

.row-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* --- CRM DASHBOARD COUNTERS --- */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-icon-wrapper {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-wrapper.revenue { background: rgba(16, 185, 129, 0.15); border: 1px solid #10b981; color: #10b981; }
.stat-icon-wrapper.reservations { background: rgba(59, 130, 246, 0.15); border: 1px solid #3b82f6; color: #3b82f6; }
.stat-icon-wrapper.conversion { background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #f59e0b; }
.stat-icon-wrapper.events { background: rgba(139, 92, 246, 0.15); border: 1px solid #8b5cf6; color: #8b5cf6; }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 3px;
}

/* --- TAB BTNS CONTROLS --- */
.manager-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  overflow-x: auto;
  padding: 10px 15px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, var(--bg-card) 100%);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

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

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn i {
  width: 15px;
  height: 15px;
}

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

body.theme-light .tab-btn:hover {
  background: rgba(15, 23, 42, 0.05);
}

.tab-btn.active {
  color: var(--text-inverse);
  background: var(--primary);
  box-shadow: var(--shadow-glow);
}

body.theme-light .tab-btn.active {
  color: #fff;
}

.tab-content {
  display: none;
}

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

.tab-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

/* --- AGENDA / CALENDAR VIEW --- */
.agenda-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

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

.calendar-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-cell {
  aspect-ratio: 1.2;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0,0,0,0.1);
  transition: all 0.2s;
}

body.theme-light .calendar-cell {
  background: rgba(0,0,0,0.02);
}

.calendar-cell:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--primary);
}

body.theme-light .calendar-cell:hover {
  background: #ffffff;
}

.calendar-cell.inactive {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.calendar-cell.selected {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0,242,254,0.15);
  background: rgba(0, 242, 254, 0.05);
}

.calendar-day-num {
  font-weight: 700;
  font-size: 12.5px;
}

.calendar-events-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.event-dot.valide { background: #10b981; }
.event-dot.en-attente { background: #f59e0b; }
.event-dot.reporte { background: #0ea5e9; }
.event-dot.annulee { background: #ef4444; }

.calendar-day-details-panel {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
}

.agenda-day-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.agenda-event-mini-card {
  background: rgba(0,0,0,0.15);
  border-left: 3px solid var(--primary);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
}

body.theme-light .agenda-event-mini-card {
  background: rgba(15,23,42,0.03);
}

/* --- DRAG & DROP PHOTO UPLOADER --- */
.drag-drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.2s;
}

body.theme-light .drag-drop-zone {
  background: rgba(15,23,42,0.02);
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(0, 242, 254, 0.03);
  color: var(--text-main);
}

.photo-previews-container {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.photo-preview-thumbnail {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
}

.photo-preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-thumbnail .btn-delete-photo {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 68, 68, 0.85);
  border: none;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  font-weight: 700;
}

/* --- CLIENT IMAGE CAROUSEL --- */
.carousel-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--glass-border);
}

.carousel-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  font-weight: bold;
}

.carousel-control:hover {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
}

.carousel-control.prev { left: 15px; }
.carousel-control.next { right: 15px; }

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}

.indicator-dot.active {
  background: var(--primary);
  width: 16px;
  border-radius: 4px;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--glass-border-glow);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border-radius: 12px;
  z-index: 9999;
  padding: 20px;
  display: none;
  backdrop-filter: blur(16px);
}

body.theme-light .cookie-banner {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

.cookie-banner.active {
  display: block;
  animation: slideUp 0.3s ease;
}

.cookie-banner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
}

.cookie-text h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cookie-text p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

/* --- MAINTENANCE OVERLAY --- */
.maintenance-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  background-image: var(--bg-glow);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body.maintenance-active .maintenance-screen {
  display: flex;
}

.maintenance-content {
  text-align: center;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.spinning-compass {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  animation: spin 6s infinite linear;
}

.maintenance-content h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}

.maintenance-content p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 15px;
}

.maintenance-sub {
  font-size: 12.5px !important;
  font-style: italic;
}

.maintenance-admin-link {
  margin-top: 25px;
  border-top: 1px solid var(--glass-border);
  padding-top: 15px;
}

/* --- SETTINGS TAB CONFIG PANELS --- */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}

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

.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  margin-top: 12px;
}

.theme-card {
  cursor: pointer;
  position: relative;
}

.theme-card input {
  display: none;
}

.theme-preview {
  border: 2px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.1);
  text-align: center;
}

body.theme-light .theme-preview {
  background: rgba(0,0,0,0.02);
}

.theme-preview .color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.theme-preview span {
  font-size: 12px;
  font-weight: 600;
}

.theme-card input:checked + .theme-preview {
  border-color: var(--primary);
  background: rgba(0, 242, 254, 0.05);
  box-shadow: var(--shadow-glow);
}

.form-section {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.form-section h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* --- OPERATIONAL TOGGLE SWITCH --- */
.toggle-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch-wrapper input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 22px;
  background: #374151;
  border-radius: 11px;
  position: relative;
  transition: all 0.2s;
}

.toggle-slider::before {
  content: "";
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}

.toggle-switch-wrapper input:checked + .toggle-slider {
  background: var(--danger);
}

.toggle-switch-wrapper input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
}

/* --- MONITORING DETAILS SCREEN --- */
.monitoring-stats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.monitoring-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
  border: 1px solid var(--glass-border);
}

body.theme-light .monitoring-item {
  background: rgba(15,23,42,0.02);
}

.monitoring-label {
  color: var(--text-muted);
  font-weight: 500;
}

.monitoring-value {
  font-weight: 600;
}

.monitoring-help-note {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: rgba(0, 242, 254, 0.03);
  border: 1px solid var(--glass-border-glow);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.monitoring-help-note i {
  color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- GDPR Client tools sidebar box --- */
.gdpr-tools-box {
  margin-top: 18px;
  border-top: 1px dashed var(--glass-border);
  padding-top: 15px;
  width: 100%;
  text-align: left;
}

.gdpr-tools-box h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.gdpr-tools-box .section-subtitle {
  font-size: 10px;
  margin-bottom: 8px;
}

/* --- MODALS OVERLAY --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border-glow);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.large-modal { max-width: 850px; }
.xlarge-modal { max-width: 1000px; }

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* --- FOOTER ELEMENTS --- */
.app-footer {
  border-top: 1px solid var(--glass-border);
  padding: 20px 0;
  margin-top: auto;
  background: rgba(3, 7, 18, 0.2);
  backdrop-filter: blur(6px);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12.5px;
}

.footer-link-btn:hover {
  color: var(--primary);
}

.legal-text-box {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  max-height: 60vh;
  overflow-y: auto;
  background: rgba(0,0,0,0.15);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

body.theme-light .legal-text-box {
  background: rgba(0,0,0,0.02);
}

/* --- BOOKING LAYOUT INSIDE MODAL --- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 25px;
}

@media (max-width: 750px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }
}

.activity-info-panel h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 8px 0;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 5px;
}

.activity-description {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.info-sheet-content {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.activity-details-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-badge {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

body.theme-light .info-badge {
  background: rgba(15,23,42,0.03);
}

.warning-deadline {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--warning);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.warning-deadline i {
  flex-shrink: 0;
}

.booking-form-panel {
  border-left: 1px solid var(--glass-border);
  padding-left: 25px;
}

@media (max-width: 750px) {
  .booking-form-panel {
    border-left: none;
    padding-left: 0;
    margin-top: 20px;
  }
}

.auth-guard-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
  gap: 15px;
}

body.theme-light .auth-guard-panel {
  background: rgba(15,23,42,0.02);
}

.auth-guard-panel p {
  font-size: 13px;
  color: var(--text-muted);
}

.client-mini-profile-recap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  margin-bottom: 15px;
}

body.theme-light .client-mini-profile-recap {
  background: rgba(15,23,42,0.03);
}

.client-mini-profile-recap i {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.client-mini-profile-recap div {
  display: flex;
  flex-direction: column;
}

.client-mini-profile-recap span:first-child {
  font-weight: 700;
  font-size: 13px;
}

.client-mini-profile-recap span:last-child {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- PRICING SELECTOR CARDS --- */
.pricing-modes-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.pricing-mode-card {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
}

body.theme-light .pricing-mode-card {
  background: rgba(15,23,42,0.02);
}

.pricing-mode-card input {
  margin-top: 4px;
}

.mode-info {
  display: flex;
  flex-direction: column;
}

.mode-title {
  font-size: 13.5px;
  font-weight: 700;
}

.mode-price {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--primary);
  margin: 2px 0;
}

.mode-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

.pricing-mode-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0, 242, 254, 0.05);
}

.booking-articles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.1);
  font-size: 12.5px;
}

body.theme-light .option-article-row {
  background: rgba(15,23,42,0.02);
}

.option-article-details {
  display: flex;
  flex-direction: column;
}

.option-article-name {
  font-weight: 600;
}

.option-article-price {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
}

.qty-input-sm {
  width: 60px;
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
}

.price-recap-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--glass-border);
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-light .price-recap-box {
  background: rgba(255,255,255,0.7);
}

.recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.recap-row.total {
  border-top: 1px solid var(--glass-border);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 15px;
}

.recap-row.total span:last-child {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
}

/* --- EVENT COMPOSER (MANAGER ROW) --- */
.editor-layout {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.articles-comp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.composer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.composer-table input {
  width: 100%;
  box-sizing: border-box;
}

.composer-table th {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.composer-table td {
  padding: 8px 6px;
  border-bottom: 1px dashed var(--glass-border);
}

.btn-remove-row {
  color: var(--danger);
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.empty-composer-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  gap: 10px;
  font-size: 13px;
}

.empty-composer-notice i {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

/* --- INVOICE DOCUMENT DISPLAY --- */
.invoice-modal {
  max-width: 800px;
}

.invoice-container {
  background: #ffffff;
  color: #1e293b !important;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
}

.invoice-container * {
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.company-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.company-logo h2 {
  font-size: 20px;
  font-weight: bold;
}

.invoice-title-box {
  text-align: right;
}

.invoice-title-box h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 5px;
}

.invoice-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.invoice-detail-block h5 {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b !important;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.invoice-detail-block p {
  font-size: 13px;
  line-height: 1.4;
}

.invoice-event-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 25px;
  font-size: 13.5px;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  font-size: 13px;
}

.invoice-items-table th {
  background: #f1f5f9;
  padding: 10px;
  font-weight: bold;
  border-bottom: 2px solid #cbd5e1;
}

.invoice-items-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.invoice-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
}

.totals-block {
  width: 280px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.total-row.grand-total {
  border-top: 2px solid #1e293b;
  padding-top: 10px;
  font-size: 16px;
  font-weight: bold;
}

.invoice-footer {
  text-align: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  font-size: 12px;
  color: #64748b !important;
}

.invoice-footer * {
  color: #64748b !important;
}

.thank-you-msg {
  font-style: italic;
  margin: 10px 0;
}

.invoice-legal {
  font-size: 9.5px;
  line-height: 1.3;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* --- TOAST --- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--glass-border-glow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), var(--shadow-glow);
  border-radius: 8px;
  padding: 12px 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13.5px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

body.theme-light .toast {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.toast.active {
  transform: translateX(0);
}

/* --- ANIMATIONS --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* --- AUTH TABS & FORMS (FIX FOR VERTICAL STACKING BUG) --- */
.auth-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
}

.auth-tab-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

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

.auth-tab-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-form {
  display: none !important;
}

.auth-form.active {
  display: block !important;
}

.auth-help-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 15px;
}

/* --- CALENDAR BADGES (FIX FOR DISAPPEARED CADRES) --- */
.calendar-day-event-badge {
  font-size: 9.5px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  display: block;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* --- DYNAMIC THEMES & TEMPLATE MANAGER --- */
.theme-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--glass-border);
}

body.theme-light .theme-card-wrapper {
  background: rgba(255, 255, 255, 0.4);
}

.theme-card-wrapper .theme-card {
  margin: 0;
  padding: 0;
}

.theme-card-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 6px;
}

/* --- CRM EVENTS GRID LAYOUT --- */
.crm-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.crm-event-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.crm-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: var(--primary);
}

.crm-event-card-img-container {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

.crm-event-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-event-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.crm-event-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.crm-event-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.crm-event-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 12px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.15);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

body.theme-light .crm-event-card-meta {
  background: rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   PRINT STYLES (INVOICE EXCLUSION & ISOLATION)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
  }
  
  .no-print, header, footer, .app-header, .app-footer, nav, button, .modal-header, .close-btn {
    display: none !important;
  }
  
  .modal {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    display: block !important;
    padding: 0 !important;
  }
  
  .modal-content {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
  }
  
  .invoice-container {
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
  }
}
