@import url('tokens.css');
@import url('components.css');

/* ===== AMBIENT BACKGROUND ===== */
.ambient-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
.ambient-bg .bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(60px) saturate(1.2); transform: scale(1.15);
}
.ambient-bg .bg-img-1 { opacity: 0.35; }
.ambient-bg .bg-img-2 { opacity: 0.2; filter: blur(100px); }
.ambient-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.3;
  animation: orbFloat 25s ease-in-out infinite;
}
.ambient-bg .orb:nth-child(3) { width: 700px; height: 700px; background: radial-gradient(circle, #22d3ee, #0891b2); top: -15%; left: -8%; animation-delay: -5s; }
.ambient-bg .orb:nth-child(4) { width: 600px; height: 600px; background: radial-gradient(circle, #a78bfa, #7c3aed); bottom: -20%; right: -10%; animation-delay: -10s; }
.ambient-bg .orb:nth-child(5) { width: 400px; height: 400px; background: radial-gradient(circle, #fbbf24, #f59e0b); top: 50%; left: 60%; animation-delay: -15s; }
.ambient-bg .grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

@keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(40px, -50px) scale(1.1); } 50% { transform: translate(-30px, 20px) scale(0.95); } 75% { transform: translate(20px, -30px) scale(1.05); } }

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content { margin-left: var(--sidebar-width); padding: 0 28px 28px; min-height: 100vh; position: relative; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.page-header { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.page-title { color: white; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== GLASS SIDEBAR ===== */
.ambient-sidebar {
  background: rgba(15,23,42,0.9); backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid rgba(255,255,255,0.06);
  position: fixed; overflow: hidden;
}
.ambient-sidebar .sidebar-header { padding: 16px 16px 12px; }
.ambient-sidebar .sidebar-nav { padding: 8px 8px; gap: 1px; }
.ambient-sidebar .sidebar-link { padding: 8px 12px; font-size: 13px; }
.ambient-sidebar .sidebar-link svg { width: 18px; height: 18px; }
.ambient-sidebar .sidebar-footer { padding: 8px 8px; }
.ambient-sidebar .sidebar-footer a, .ambient-sidebar .sidebar-footer button { font-size: 13px; padding: 8px 12px; }
.ambient-sidebar::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,145,178,0.08) 0%, rgba(124,58,237,0.05) 100%);
  pointer-events: none;
}
.ambient-sidebar .sidebar-logo { color: white; }
.ambient-sidebar .sidebar-link { color: rgba(255,255,255,0.55); }
.ambient-sidebar .sidebar-link:hover { background: rgba(255,255,255,0.06); color: white; }
.ambient-sidebar .sidebar-link.active { background: rgba(8,145,178,0.15); color: var(--primary-light); box-shadow: inset 3px 0 0 var(--primary-light); }
.ambient-sidebar .sidebar-footer { border-top-color: rgba(255,255,255,0.06); }
.ambient-sidebar .sidebar-footer a { color: rgba(255,255,255,0.45); }
.ambient-sidebar .sidebar-footer a:hover { background: rgba(239,68,68,0.12); color: #fca5a5; }
.ambient-sidebar .sidebar-brand { display: flex; align-items: center; gap: 10px; }
.ambient-sidebar .sidebar-brand-icon { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: white; box-shadow: 0 4px 12px rgba(8,145,178,0.3); }

/* Hamburger menu button */
#menuToggle {
  position: fixed; top: 12px; left: 12px; z-index: 99;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: white; font-size: 18px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: rgba(255,255,255,0.06); backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  transition: all var(--transition-slow);
}
.glass-card:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.12); }
.glass-card-padded { padding: 24px; }

/* ===== STAT CARDS (glass) ===== */
.glass-stat {
  background: rgba(255,255,255,0.05); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 18px 22px;
  position: relative; overflow: hidden; transition: all var(--transition-slow);
}
.glass-stat:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
.glass-stat .stat-label { color: rgba(255,255,255,0.4); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.glass-stat .stat-value { color: white; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.glass-stat .stat-trend { color: rgba(255,255,255,0.35); font-size: 11px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ===== AMBIENT TABLE ===== */
.ambient-table {
  width: 100%; border-collapse: collapse;
}
.ambient-table th {
  padding: 12px 16px; text-align: left; font-weight: 500; font-size: 11px;
  color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ambient-table td {
  padding: 12px 16px; font-size: 14px; color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ambient-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ===== AMBIENT FORM ELEMENTS ===== */
.ambient-input, .ambient-select {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; outline: none; width: 100%; font-family: inherit;
  transition: all var(--transition);
}
.ambient-input::placeholder { color: rgba(255,255,255,0.25); }
.ambient-input:focus, .ambient-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,145,178,0.15); }
.ambient-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #1e293b inset; -webkit-text-fill-color: white; border-color: rgba(255,255,255,0.1); }
.ambient-select { appearance: none; cursor: pointer; }
.ambient-select option { background: #1e293b; color: white; }

/* ===== AMBIENT BADGES ===== */
.ambient-badge {
  display: inline-flex; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.08);
}
.ambient-badge-success { background: rgba(16,185,129,0.15); color: #6ee7b7; border-color: rgba(16,185,129,0.2); }
.ambient-badge-warning { background: rgba(245,158,11,0.15); color: #fcd34d; border-color: rgba(245,158,11,0.2); }
.ambient-badge-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
.ambient-badge-info { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: rgba(59,130,246,0.2); }

/* ===== AMBIENT CARDS (glass variants) ===== */
.whatsapp-glass {
  background: rgba(255,255,255,0.04); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); padding: 20px 24px;
}
.whatsapp-glass h3 { color: white; font-size: 16px; margin: 0; }
.whatsapp-glass label { color: rgba(255,255,255,0.4); font-size: 12px; }

.appt-glass {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); transition: all var(--transition-slow); cursor: pointer;
}
.appt-glass:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.1); }
.appt-glass .apt-time { font-size: 16px; font-weight: 700; color: var(--primary-light); min-width: 50px; }
.appt-glass .apt-name { flex: 1; font-size: 14px; color: rgba(255,255,255,0.9); }

.patient-glass {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius); overflow: hidden; transition: all var(--transition);
}
.patient-glass:hover { background: rgba(255,255,255,0.06); }

.empty-glass { text-align: center; padding: 60px 24px; }
.empty-glass svg { width: 48px; height: 48px; color: rgba(255,255,255,0.15); margin-bottom: 16px; }
.empty-glass h3 { color: rgba(255,255,255,0.6); font-size: 16px; margin-bottom: 6px; }
.empty-glass p { color: rgba(255,255,255,0.3); font-size: 13px; }

/* ===== MODAL GLASS ===== */
.modal-glass { background: rgba(15,23,42,0.95); backdrop-filter: blur(40px); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); }
.modal-glass .modal-title { color: white; }
.modal-glass .modal-close { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; outline: none; }
.lang-switcher option { background: #1e293b; color: white; }

/* ===== TAB SYSTEM ===== */
.tab-nav { display: flex; gap: 2px; margin-bottom: 24px; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 4px; }
.tab-btn { padding: 8px 20px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; background: transparent; color: rgba(255,255,255,0.45); border-radius: 10px; transition: all var(--transition); }
.tab-btn:hover { color: rgba(255,255,255,0.8); }
.tab-btn.active { background: rgba(255,255,255,0.1); color: white; font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: tabIn 0.35s ease; }

@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-slide-up > * { animation: fadeSlideUp 0.4s ease both; }
.fade-slide-up > *:nth-child(1) { animation-delay: 0.02s; }
.fade-slide-up > *:nth-child(2) { animation-delay: 0.06s; }
.fade-slide-up > *:nth-child(3) { animation-delay: 0.10s; }
.fade-slide-up > *:nth-child(4) { animation-delay: 0.14s; }
.fade-slide-up > *:nth-child(5) { animation-delay: 0.18s; }
.fade-slide-up > *:nth-child(6) { animation-delay: 0.22s; }
.stagger > * { animation: slideUp 0.4s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ===== AUTH PAGES (dark theme) ===== */
.auth-page-dark {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 40px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
}
.auth-page-dark .ambient-orb {
  position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.2;
  pointer-events: none; z-index: 0;
}
.auth-page-dark .ambient-orb:nth-child(1) {
  width: 500px; height: 500px; background: #22d3ee; top: -100px; right: -80px;
}
.auth-page-dark .ambient-orb:nth-child(2) {
  width: 400px; height: 400px; background: #a78bfa; bottom: -80px; left: -80px;
}
.auth-card-dark {
  width: 100%; max-width: 420px;
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 36px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  position: relative; z-index: 1;
  animation: slideUp 0.4s ease;
}
.auth-card-dark.auth-card-lg { max-width: 520px; }
.auth-card-dark .auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 28px; font-weight: 800; color: var(--primary);
  margin-bottom: 20px; letter-spacing: -0.5px; text-decoration: none;
}
.auth-card-dark h1 { font-size: 24px; font-weight: 700; color: rgba(255,255,255,0.95); text-align: center; margin-bottom: 4px; }
.auth-card-dark > p { font-size: 14px; color: rgba(255,255,255,0.4); text-align: center; margin-bottom: 24px; }
.auth-card-dark .form-group { margin-bottom: 16px; }
.auth-card-dark .form-group label { display: block; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5); margin-bottom: 5px; letter-spacing: 0.3px; text-transform: uppercase; }
.auth-card-dark .form-input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: white; font-size: 14px;
  outline: none; transition: all 0.2s; font-family: inherit;
}
.auth-card-dark .form-input::placeholder { color: rgba(255,255,255,0.15); }
.auth-card-dark .form-input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
  background: rgba(255,255,255,0.08);
}
.auth-card-dark .form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1e293b inset;
  -webkit-text-fill-color: white;
  border-color: rgba(255,255,255,0.08);
}
.auth-card-dark .btn-gradient {
  width: 100%; padding: 13px; font-size: 14px; font-weight: 700;
  border: none; border-radius: 10px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #0f172a; cursor: pointer; transition: all 0.2s;
  font-family: inherit; margin-top: 4px;
  box-shadow: 0 4px 16px rgba(8,145,178,0.2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-card-dark .btn-gradient:hover {
  box-shadow: 0 6px 24px rgba(8,145,178,0.3);
  transform: translateY(-1px);
}
.auth-card-dark .btn-gradient:active { transform: scale(0.98); }
.auth-card-dark .btn-gradient:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-card-dark .form-error {
  display: none; font-size: 13px; color: #f87171;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.12);
  padding: 10px 14px; border-radius: 8px; margin-bottom: 16px;
}
.auth-card-dark .form-error.visible { display: block; }
.auth-card-dark .form-success {
  display: none; font-size: 14px; color: #34d399;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.15);
  padding: 12px 14px; border-radius: 8px; margin-bottom: 16px;
}
.auth-card-dark .form-success.visible { display: block; }
.auth-card-dark .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-card-dark .auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: rgba(255,255,255,0.35); }
.auth-card-dark .auth-footer a { color: #22d3ee; text-decoration: none; font-weight: 600; }
.auth-card-dark .auth-footer a:hover { text-decoration: underline; }
.auth-card-dark .auth-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 20px 0; }
.auth-card-dark .auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,0.3); text-decoration: none; margin-bottom: 24px; transition: color 0.2s; }
.auth-card-dark .auth-back:hover { color: rgba(255,255,255,0.6); }
.auth-card-dark .lang-bar { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.auth-card-dark .lang-switcher { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); padding: 6px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; outline: none; }
.auth-card-dark .lang-switcher option { background: #1e293b; color: white; }

/* ===== FULLSCREEN AUTH SPLIT LAYOUT ===== */
.auth-split { display: flex; min-height: 100vh; background: #0f172a; }
.auth-split-left {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  padding: 48px; overflow: hidden;
}
.auth-split-left .bg {
  position: absolute; inset: 0;
  background: url('../images/gradient-purple.jpg') center/cover no-repeat;
  opacity: 0.15; filter: blur(4px) saturate(1.2);
}
.auth-split-left .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.4) 100%);
}
.auth-split-left .orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.25;
}
.auth-split-left .orb-1 { width: 600px; height: 600px; background: #22d3ee; top: -20%; left: -10%; animation: orbFloat 25s ease-in-out infinite; }
.auth-split-left .orb-2 { width: 500px; height: 500px; background: #a78bfa; bottom: -20%; right: -10%; animation: orbFloat 30s ease-in-out infinite reverse; }
.auth-split-left .orb-3 { width: 300px; height: 300px; background: #fbbf24; top: 50%; left: 50%; animation: orbFloat 20s ease-in-out infinite 5s; }
.auth-split-left .brand-content { position: relative; z-index: 1; max-width: 520px; }
.auth-split-left .brand-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.auth-split-left .brand-logo .icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(8,145,178,0.3);
}
.auth-split-left .brand-logo .icon svg { width: 24px; height: 24px; stroke: #0f172a; stroke-width: 2.5; fill: none; }
.auth-split-left .brand-logo .brand-text { display: flex; flex-direction: column; }
.auth-split-left .brand-logo .brand-text .name { font-size: 26px; font-weight: 800; color: white; letter-spacing: -0.5px; line-height: 1; }
.auth-split-left .brand-logo .brand-text .sub { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; margin-top: 2px; }
.auth-split-left .brand-tagline { font-size: 42px; font-weight: 800; color: white; line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px; }
.auth-split-left .brand-tagline span { background: linear-gradient(135deg, #22d3ee, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-split-left .brand-desc { font-size: 16px; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 40px; max-width: 440px; }
.auth-split-left .brand-stats { display: flex; gap: 40px; }
.auth-split-left .brand-stats .stat-value { font-size: 28px; font-weight: 800; color: white; letter-spacing: -1px; }
.auth-split-left .brand-stats .stat-label { font-size: 13px; color: rgba(255,255,255,0.35); margin-top: 2px; }
.auth-split-right {
  width: 460px; min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 48px 40px; position: relative;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,0.06);
}

/* ===== WHATSAPP ===== */
.whatsapp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 24px; }
.whatsapp-section { text-align: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 24px; }
.whatsapp-section h3 { font-size: 18px; margin-bottom: 8px; }
.whatsapp-section p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ===== STEP INDICATORS ===== */
.step-indicators { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.step-indicator { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--bg); border: 1.5px solid var(--border); color: var(--text-muted); transition: all var(--transition); }
.step-indicator.active { background: var(--primary); color: white; border-color: var(--primary); }
.step-indicator.completed { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

/* ===== TIME SLOTS ===== */
.time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 16px; }
.time-slot { padding: 10px 8px; text-align: center; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; transition: all var(--transition); font-size: 13px; }
.time-slot:hover { border-color: var(--primary); background: var(--primary-bg); }
.time-slot.selected { border-color: var(--primary); background: var(--primary); color: white; font-weight: 600; }
.time-slot.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ===== CALENDAR OVERRIDES (FullCalendar) ===== */
.fc {
  font-family: var(--font) !important;
  --fc-page-bg-color: rgba(255,255,255,0.04);
  --fc-neutral-bg-color: rgba(255,255,255,0.02);
  --fc-border-color: rgba(255,255,255,0.08);
  --fc-button-bg-color: rgba(255,255,255,0.06);
  --fc-button-border-color: rgba(255,255,255,0.1);
  --fc-button-text-color: rgba(255,255,255,0.7);
  --fc-button-hover-bg-color: rgba(255,255,255,0.1);
  --fc-button-hover-border-color: rgba(255,255,255,0.15);
  --fc-button-active-bg-color: var(--primary);
  --fc-button-active-border-color: var(--primary);
  --fc-today-bg-color: rgba(8,145,178,0.1);
  --fc-event-bg-color: var(--primary);
  --fc-event-border-color: var(--primary);
  --fc-event-text-color: #fff;
  --fc-list-event-hover-bg-color: rgba(255,255,255,0.03);
  border-radius: var(--radius);
}
.fc .fc-toolbar-title { color: rgba(255,255,255,0.9); font-size: 17px; font-weight: 700; }
.fc .fc-button { border-radius: 8px; font-size: 13px; padding: 6px 14px; }
.fc .fc-button-primary:not(:disabled).fc-button-active { font-weight: 700; color: #fff !important; }
.fc .fc-col-header-cell-cushion { color: rgba(255,255,255,0.5); font-weight: 600; font-size: 12px; }
.fc .fc-daygrid-day-number { color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 500; }
.fc .fc-day-other .fc-daygrid-day-top { opacity: 0.35; }
.fc .fc-daygrid-event { border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; border: none; margin: 2px 4px; }
.fc .fc-daygrid-more-link { color: rgba(255,255,255,0.4) !important; font-size: 11px; }

/* ===== RESPONSIVE: TABLES → CARDS (mobile) ===== */
@media (max-width: 768px) {
  .ambient-table thead { display: none; }
  .ambient-table tr {
    display: block; margin-bottom: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius); padding: 12px;
  }
  .ambient-table td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border: none;
    font-size: 13px; gap: 8px;
  }
  .ambient-table td:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.04); margin-bottom: 4px; padding-bottom: 8px; }
  .ambient-table td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35);
    text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0;
  }
  .ambient-table tr:hover td { background: transparent; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 14px; }
  .hero-title { font-size: 36px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .auth-split-left { display: none; }
  .auth-split-right { width: 100%; min-height: 100vh; border-left: none; padding: 40px 28px; }
}

@media (max-width: 768px) {
  .main-content { margin-left: 0; padding: 0 12px 12px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  #menuToggle { display: flex; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-title { font-size: 18px; }
  .glass-stat .stat-value { font-size: 20px; }
  .glass-stat { padding: 14px 16px; }
  .tab-nav { overflow-x: auto; flex-wrap: nowrap; gap: 0; }
  .tab-btn { white-space: nowrap; padding: 8px 14px; font-size: 12px; }
  .auth-card-dark { padding: 28px 20px; }
  .auth-card-dark .form-row { grid-template-columns: 1fr; }
  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  .cta-section h2 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand p { max-width: 100%; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 16px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-links a:not(.btn-nav) { display: block; }
}

@media (max-width: 480px) {
  .main-content { padding: 0 8px 8px; }
  .stats-grid { grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
  .glass-stat .stat-value { font-size: 18px; }
  .glass-stat { padding: 12px 14px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
