/* ============================================================
   SummaGestión Pro — Custom Theme
   Inspirado en diseño Alegra: teal/mint, cards limpias, sans-serif moderno
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --primary:        #0BBFAA;
  --primary-dark:   #099E8E;
  --primary-light:  #E6FAF8;
  --primary-50:     #F0FDFB;
  --secondary:      #3B82F6;
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #0EA5E9;

  --dark:           #1E293B;
  --gray-700:       #374151;
  --gray-600:       #4B5563;
  --muted:          #64748B;
  --gray-300:       #D1D5DB;
  --border:         #E2E8F0;
  --bg:             #F8FAFC;
  --card-bg:        #FFFFFF;

  --sidebar-width:  260px;
  --topbar-height:  64px;

  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-md:      0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-lg:      0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.04);

  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:     all 0.18s ease;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}

.text-muted  { color: var(--muted) !important; }
.text-primary { color: var(--primary) !important; }
.fw-600 { font-weight: 600; }

/* ── Bootstrap overrides ────────────────────────────────── */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--dark); background: var(--bg); }

.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  transition: var(--transition);
  background: #fff;
  color: var(--dark);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 191, 170, 0.12);
  outline: none;
}
.form-control.is-invalid {
  border-color: var(--danger);
}
.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.invalid-feedback { font-size: 0.8rem; color: var(--danger); }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
}
.card-body { padding: 1.5rem; }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.25em 0.7em;
  letter-spacing: 0.02em;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #DCFCE7; color: #15803D; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #B91C1C; }
.badge-info    { background: #E0F2FE; color: #0369A1; }

.alert-danger  { background: #FEE2E2; border-color: #FECACA; color: #B91C1C; border-radius: var(--radius-sm); }
.alert-success { background: #DCFCE7; border-color: #BBF7D0; color: #15803D; border-radius: var(--radius-sm); }
.alert-warning { background: #FEF3C7; border-color: #FDE68A; color: #92400E; border-radius: var(--radius-sm); }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner-border-sm { width: 1em; height: 1em; border-width: 0.15em; }

/* ══════════════════════════════════════════════════════════
   PUBLIC LAYOUT
   ══════════════════════════════════════════════════════════ */

/* ── Public Navbar ──────────────────────────────────────── */
.navbar-public {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-height);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-public .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark) !important;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.brand-name span { color: var(--primary); }

.navbar-nav-public {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav-public a {
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.navbar-nav-public a:hover { color: var(--dark); background: var(--bg); }

/* ── Public Footer ───────────────────────────────────────── */
.footer-public {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
  font-size: 0.85rem;
}
.footer-public a { color: rgba(255,255,255,0.65); }
.footer-public a:hover { color: #fff; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer-copy { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1.5rem; }

/* ══════════════════════════════════════════════════════════
   AUTH LAYOUT (Login / Register)
   ══════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-50) 0%, #EEF9FD 100%);
  padding: 2rem 1rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .brand-logo {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  margin: 0 auto 0.75rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 1.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-google:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); color: var(--dark); }

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.password-wrapper {
  position: relative;
}
.password-wrapper .form-control { padding-right: 2.75rem; }
.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}
.password-toggle:hover { color: var(--dark); }

/* ══════════════════════════════════════════════════════════
   APP LAYOUT (Autenticado)
   ══════════════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.75rem 0.75rem 0.35rem;
  display: block;
}

.nav-item-app {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item-app:hover {
  background: var(--bg);
  color: var(--dark);
}

.nav-item-app.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item-app i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-item-app.active i { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12em 0.5em;
  border-radius: 20px;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 99;
  gap: 1rem;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: 2px solid var(--border);
}

.user-dropdown {
  position: relative;
}

.user-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.user-dropdown-menu a,
.user-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: var(--bg);
  color: var(--dark);
}

.user-dropdown-menu .divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

/* ── Main content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  flex: 1;
}

.page-content {
  padding: 1.75rem;
}

/* ── Hamburger (mobile) ──────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.35rem;
  color: var(--dark);
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .sidebar-toggle { display: flex; align-items: center; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }
}

/* ══════════════════════════════════════════════════════════
   SUMMARY CARDS (Dashboard)
   ══════════════════════════════════════════════════════════ */

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.stat-icon.teal   { background: var(--primary-light); color: var(--primary-dark); }
.stat-icon.blue   { background: #EFF6FF; color: #1D4ED8; }
.stat-icon.green  { background: #DCFCE7; color: #15803D; }
.stat-icon.orange { background: #FFF7ED; color: #C2410C; }
.stat-icon.purple { background: #F5F3FF; color: #6D28D9; }

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   PRICING (Planes)
   ══════════════════════════════════════════════════════════ */

.plans-hero {
  text-align: center;
  padding: 5rem 0 3rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, #EEF9FD 100%);
}

.plans-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.plans-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.billing-toggle-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.billing-toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

.annual-badge {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2em 0.55em;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #FDE68A;
}

.plan-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.plan-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.plan-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.plan-badge-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2em 1em;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-name {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.plan-price-amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1;
}

.plan-price-currency {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muted);
  align-self: flex-start;
  margin-top: 0.5rem;
}

.plan-price-period {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.plan-description {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  padding: 0.4rem 0;
  color: var(--gray-600);
  border-bottom: 1px solid var(--bg);
}

.plan-features li:last-child { border-bottom: none; }

.plan-features .feat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.05rem;
  font-size: 0.9rem;
}
.plan-features .feat-icon.yes { color: var(--success); }
.plan-features .feat-icon.no  { color: var(--gray-300); }

.plan-features li.disabled { color: var(--gray-300); }

.plan-trial-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* ── Limits chips ─────────────────────────────────────────── */
.plan-limits {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.plan-limit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2em 0.7em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
}

/* ══════════════════════════════════════════════════════════
   DATA TABLES
   ══════════════════════════════════════════════════════════ */

.data-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.data-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.table-custom {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.table-custom thead th {
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-custom tbody td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--gray-700);
}

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

.table-custom tbody tr:hover { background: var(--bg); }

/* ── Status badges ───────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2em 0.7em;
  border-radius: 20px;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-pending   { background: #FEF3C7; color: #92400E; }
.status-confirmed { background: #DCFCE7; color: #15803D; }
.status-cancelled { background: #FEE2E2; color: #B91C1C; }
.status-completed { background: #EFF6FF; color: #1D4ED8; }
.status-noshow    { background: #F5F3FF; color: #6D28D9; }

/* ══════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════ */

.filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════
   CHART CARDS
   ══════════════════════════════════════════════════════════ */

.chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
}

.chart-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════ */

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

.page-header-left h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.page-header-left p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--muted);
  margin: 0 auto 1.25rem;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.empty-state p {
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 300px;
  margin: 0 auto 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   CALENDAR (FullCalendar overrides)
   ══════════════════════════════════════════════════════════ */

.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 700; }
.fc .fc-button-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}
.fc .fc-button-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.fc .fc-today-button { background: var(--primary-light) !important; border-color: transparent !important; color: var(--primary-dark) !important; }
.fc .fc-daygrid-day.fc-day-today { background: var(--primary-50) !important; }
.fc .fc-event {
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  padding: 1px 5px;
}
.fc .fc-scrollgrid { border-color: var(--border); }
.fc th { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fc-event-status-0 { background: #2563EB !important; border-color: #1D4ED8 !important; color: #fff !important; } /* Pendiente  */
.fc-event-status-1 { background: #DC2626 !important; border-color: #B91C1C !important; color: #fff !important; } /* Cancelado  */
.fc-event-status-2 { background: #1D4ED8 !important; border-color: #1E40AF !important; color: #fff !important; } /* Confirmado */
.fc-event-status-3 { background: #16A34A !important; border-color: #15803D !important; color: #fff !important; } /* Completado */
.fc-event-status-4 { background: #1F2937 !important; border-color: #111827 !important; color: #fff !important; } /* No asistió */

/* ══════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════ */

.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.modal-title { font-size: 1rem; font-weight: 700; }

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════ */

.toast-container-custom {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--dark);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  animation: slideIn 0.25s ease;
}

.toast-custom.success { border-left: 4px solid var(--success); }
.toast-custom.error   { border-left: 4px solid var(--danger); }
.toast-custom.warning { border-left: 4px solid var(--warning); }
.toast-custom.info    { border-left: 4px solid var(--info); }

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

/* ══════════════════════════════════════════════════════════
   UTILS
   ══════════════════════════════════════════════════════════ */

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* Subscription blocked banner */
.blocked-banner {
  background: #FEF3C7;
  border-bottom: 2px solid #FDE68A;
  padding: 0.65rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #92400E;
  position: fixed;
  top: var(--topbar-height);
  left: var(--sidebar-width);
  right: 0;
  z-index: 98;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* Fade in */
[x-cloak] { display: none !important; }

.fade-in {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (< 768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {

  /* Hide secondary table columns on mobile */
  .d-mobile-none { display: none !important; }

  /* Filter bars: stack vertically */
  .filter-bar {
    flex-direction: column;
    align-items: stretch !important;
  }
  .filter-bar input,
  .filter-bar select,
  .filter-bar .form-control,
  .filter-bar .form-select {
    width: 100% !important;
    max-width: none !important;
  }

  /* Page header: stack title and buttons */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }
  .page-header .d-flex { flex-wrap: wrap; gap: 0.5rem; }

  /* Tables: smaller font, tighter padding */
  .table-custom th,
  .table-custom td {
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
  }
  .table-custom th { font-size: 0.72rem; }

  /* Stat cards: reduce padding */
  .stat-card { padding: 0.875rem 1rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; }

  /* Modals: full-width form columns */
  .modal-body .col-md-3,
  .modal-body .col-md-4,
  .modal-body .col-md-6,
  .modal-body .col-md-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Action buttons: icon-only on mobile */
  .btn-action-text { display: none; }

  /* Main content: reduce padding */
  .main-content { padding: 0.75rem; }
  .main-content > .py-4 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Small phones (< 576px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {

  /* Further reduce table size */
  .table-custom th,
  .table-custom td {
    padding: 0.35rem 0.3rem;
    font-size: 0.72rem;
  }

  /* Stat cards: full width */
  .stat-card .stat-value { font-size: 1.2rem; }

  /* Buttons: smaller */
  .btn-sm { font-size: 0.72rem; padding: 0.2rem 0.5rem; }

  /* Topbar: tighter */
  .topbar { padding: 0 0.75rem; }

  /* Modals: reduce padding */
  .modal-body { padding: 0.75rem; }
  .modal-header { padding: 0.75rem; }
  .modal-footer { padding: 0.5rem 0.75rem; }
}
