/* =============================================
   AgendaSync - Global Styles
   ============================================= */

/* CSS Variables */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1e1e35;
  --bg-input: #12121f;
  --border: rgba(99, 102, 241, 0.15);
  --border-light: rgba(255, 255, 255, 0.06);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
}

/* Utilities */
.hidden { display: none !important; }

/* =============================================
   LOADING SCREEN
   ============================================= */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.loader-icon {
  font-size: 64px;
  animation: pulse 1.5s ease-in-out infinite;
}
.loader-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  animation: loading 1.5s ease-in-out infinite;
}
@keyframes loading {
  0% { width: 0%; transform: translateX(0); }
  50% { width: 80%; }
  100% { width: 100%; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
}
.auth-page {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 560px;
  margin: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease;
}
.auth-card {
  flex: 1;
  background: var(--bg-card);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.auth-visual {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #0ea5e9 100%);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -100px;
  right: -100px;
}
.auth-visual::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  bottom: -80px;
  left: -60px;
}
.visual-content {
  color: white;
  position: relative;
  z-index: 1;
}
.visual-content h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}
.visual-content p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 32px;
}
.visual-features { display: flex; flex-direction: column; gap: 14px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  background: rgba(255,255,255,0.1);
  padding: 12px 16px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}
.feature-item span { font-size: 20px; }

.auth-header { text-align: center; }
.auth-logo { font-size: 48px; margin-bottom: 8px; }
.auth-header h1 {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.auth-header p { color: var(--text-secondary); font-size: 14px; }

.auth-footer { text-align: center; color: var(--text-secondary); font-size: 13px; }
.auth-footer a { color: var(--primary-light); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* =============================================
   FORMS
   ============================================= */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #16162a;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); }
.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.form-actions { display: flex; gap: 12px; align-items: center; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: rgba(99, 102, 241, 0.2); border-color: var(--primary); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1.5px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn-full { width: 100%; justify-content: center; padding: 13px; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}
.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

/* =============================================
   APP LAYOUT
   ============================================= */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-logo { font-size: 28px; }
.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-toggle { display: none; }

.user-info-sidebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.user-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.user-name-small { font-size: 13px; font-weight: 600; }
.user-role-badge {
  font-size: 11px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
}
.nav-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.nav-icon { font-size: 18px; width: 22px; text-align: center; }
.nav-label { flex: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
}
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}
.page-title { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* Pages */
.pages-wrapper { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 0; }
.page { display: none; flex-direction: column; gap: 24px; animation: fadeIn 0.3s ease; }
.page.active { display: flex; }

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

/* =============================================
   DASHBOARD
   ============================================= */
.welcome-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.welcome-banner h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.welcome-banner p { color: var(--text-secondary); font-size: 15px; }
.welcome-date {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
  border-radius: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.stat-icon { font-size: 28px; }
.stat-number { font-size: 28px; font-weight: 800; color: var(--primary-light); }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }

.quick-actions {}
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.action-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
}
.action-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}
.action-icon { font-size: 32px; }
.action-text strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.action-text span { font-size: 13px; color: var(--text-secondary); }

/* =============================================
   SECTION CARDS
   ============================================= */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-header h3 { font-size: 16px; font-weight: 700; }
.section-header h4 { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.badge-new {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}

/* =============================================
   FILTERS BAR
   ============================================= */
.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.filter-group label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.filter-group select,
.filter-group input {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =============================================
   TEAM MEMBERS GRID
   ============================================= */
.team-members-section h4,
.slots-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.member-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.member-card:hover,
.member-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}
.member-card.selected {
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}
.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.member-info {}
.member-name { font-size: 14px; font-weight: 600; }
.member-role { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* =============================================
   SLOTS GRID
   ============================================= */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.slot-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.slot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: var(--transition);
}
.slot-card:hover::before,
.slot-card.available:hover::before { transform: scaleX(1); }
.slot-card.available { cursor: pointer; }
.slot-card.available:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}
.slot-card.booked { opacity: 0.5; cursor: not-allowed; }
.slot-date {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 6px;
}
.slot-time {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.slot-duration {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.slot-member {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
}
.slot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.slot-status-badge.available {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.slot-status-badge.booked {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.slot-status-badge.cancelled {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* =============================================
   BOOKINGS LIST
   ============================================= */
.bookings-list { display: flex; flex-direction: column; gap: 12px; }
.booking-item {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
}
.booking-item:hover { border-color: var(--border); }
.booking-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.booking-icon { font-size: 24px; }
.booking-info {}
.booking-subject { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.booking-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}
.booking-meta span { display: flex; align-items: center; gap: 4px; }
.booking-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.booking-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.booking-status.confirmed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.booking-status.cancelled {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.booking-status.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.booking-subject-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.badge-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.badge-type.meet {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.badge-type.whatsapp {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-type.phone {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.btn-meet-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-meet-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-whatsapp-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white !important;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-whatsapp-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-phone-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white !important;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-phone-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* =============================================
   SLOTS LIST (TEAM VIEW)
   ============================================= */
.slots-list { display: flex; flex-direction: column; gap: 10px; }
.team-slot-item {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}
.team-slot-item:hover { border-color: var(--border); }
.team-slot-info { display: flex; align-items: center; gap: 16px; }
.team-slot-date { font-size: 13px; color: var(--primary-light); font-weight: 600; }
.team-slot-time { font-size: 16px; font-weight: 700; }
.team-slot-actions { display: flex; align-items: center; gap: 10px; }

/* =============================================
   WEEKLY INTERACTIVE CALENDAR & TEAM SELECTOR
   ============================================= */
.cal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.cal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 20px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.cal-current-week .week-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 30px;
  color: var(--primary-light);
  font-weight: 700;
  font-size: 14px;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.legend-dot.empty {
  border: 1.5px dashed rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.legend-dot.avail {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.legend-dot.busy {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.legend-dot.past {
  background: #64748b;
}

/* Team members horizontal selector */
.team-members-section {
  margin-bottom: 18px;
}

.team-members-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.team-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.member-card:hover {
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.member-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.member-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
}

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

.member-name {
  font-size: 13px;
  font-weight: 700;
}

.member-role {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Calendar Grid */
.calendar-view-container {
  width: 100%;
  margin-top: 12px;
}

.cal-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.cal-grid {
  display: grid;
  min-width: 780px;
}

.cal-cell {
  min-height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  position: relative;
  transition: var(--transition);
}

.cal-corner {
  background: rgba(18, 18, 31, 0.9);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cal-utc {
  opacity: 0.7;
}

.cal-day-header {
  background: rgba(18, 18, 31, 0.95);
  flex-direction: column;
  padding: 10px 4px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 9;
  border-bottom: 2px solid var(--border);
}

.cal-day-header.is-today {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.2) 0%, rgba(18, 18, 31, 0.95) 100%);
  border-bottom: 2px solid var(--primary);
}

.cal-dname {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-day-header.is-today .cal-dname {
  color: var(--primary-light);
}

.cal-dnum-wrap {
  margin: 3px 0 2px 0;
}

.cal-dnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.cal-day-header.is-today .cal-dnum {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

.cal-dmonth {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.cal-time-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(18, 18, 31, 0.6);
  user-select: none;
}

.cal-slot-empty {
  cursor: pointer;
  background: transparent;
  border-radius: 6px;
  margin: 2px;
}

.cal-slot-empty:hover {
  background: rgba(99, 102, 241, 0.16);
  border: 1.5px dashed var(--primary-light);
  transform: scale(0.97);
}

.cal-slot-empty:hover::after {
  content: '+ Libre';
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-light);
}

.cal-slot-none {
  background: rgba(0, 0, 0, 0.05);
}

.cal-slot-none.is-past {
  background: rgba(0, 0, 0, 0.25);
  opacity: 0.4;
  cursor: not-allowed;
}

.cal-slot-avail {
  cursor: pointer;
  padding: 4px;
}

.slot-inner.avail {
  width: 100%;
  height: 100%;
  min-height: 42px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.15));
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.cal-slot-avail:hover .slot-inner.avail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  transform: scale(0.98);
}

.cal-slot-avail:hover .slot-text {
  display: none;
}

.cal-slot-avail:hover .slot-icon::before {
  content: '🗑 Retirer';
  font-size: 11px;
}

.cal-day-end {
  min-height: 28px;
  border-bottom: 0;
}

.cal-slot-common {
  cursor: pointer;
  background: transparent;
  border-top: 0;
  border-left: 0;
  font: inherit;
}

.cal-slot-common .slot-inner {
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}

.cal-slot-common .slot-action {
  font-size: 11px;
  font-weight: 500;
}

.cal-slot-common:not(:disabled):hover .slot-inner,
.cal-slot-common:focus-visible .slot-inner {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
  transform: translateY(-1px);
}

.cal-slot-common:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: -2px;
}

.cal-slot-common:disabled {
  cursor: default;
}

.cal-slot-common:disabled .slot-inner {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.35);
  color: var(--text-secondary);
  box-shadow: none;
}

.common-availability-note {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
}

.cal-slot-book {
  cursor: pointer;
  padding: 4px;
}

.slot-inner.book {
  width: 100%;
  height: 100%;
  min-height: 42px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #e0e7ff;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.cal-slot-book:hover .slot-inner.book {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(139, 92, 246, 0.4));
  border-color: var(--primary-light);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.slot-avatar {
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.cal-slot-busy {
  cursor: not-allowed;
  padding: 4px;
}

.slot-inner.busy {
  width: 100%;
  height: 100%;
  min-height: 42px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
}

/* =============================================
   INLINE FORM
   ============================================= */
.inline-form {
  background: rgba(99, 102, 241, 0.05);
  border: 1.5px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}
.inline-form h4 { font-size: 15px; font-weight: 700; color: var(--primary-light); }

/* =============================================
   EMPTY STATE & LOADING
   ============================================= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
  grid-column: 1/-1;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
  grid-column: 1/-1;
  animation: pulse 1.5s ease-in-out infinite;
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }

.slot-summary {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
}
.slot-summary strong { color: var(--primary-light); }

/* Meeting Type Options */
.meeting-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.meeting-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 6px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.meeting-type-option input[type="radio"] {
  display: none;
}
.meeting-type-option .mto-icon {
  font-size: 24px;
  margin-bottom: 4px;
}
.meeting-type-option .mto-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.meeting-type-option .mto-text small {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.2;
}
.meeting-type-option:hover {
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}
.meeting-type-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.15));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.meeting-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}
.meeting-hint .hint-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  z-index: 9999;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 360px;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .menu-btn { display: flex; }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .auth-page { flex-direction: column; max-width: 440px; }
  .auth-visual { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .pages-wrapper { padding: 16px; }
  .welcome-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .cal-section-header { flex-direction: column; align-items: flex-start; }
  .cal-header-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .booking-item { flex-direction: column; align-items: flex-start; }
  .booking-right { width: 100%; }
  .filters-bar { flex-direction: column; }
  .filter-group { min-width: 100%; }
  .cal-controls { width: 100%; justify-content: space-between; }
  .cal-legend { font-size: 11px; gap: 8px; }
}
