:root {
  --coral: #FF6B6B;
  --coral-dark: #E85555;
  --teal: #4ECDC4;
  --teal-dark: #3DBDB5;
  --cream: #FFF8F0;
  --cream-dark: #F5EDE3;
  --navy: #2D3436;
  --navy-light: #636E72;
  --white: #FFFFFF;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #D63031;
  --shadow: 0 4px 24px rgba(45, 52, 54, 0.08);
  --shadow-lg: 0 12px 40px rgba(45, 52, 54, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--navy);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; }

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}

.brand-icon {
  width: 44px; height: 44px;
  background: var(--coral);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.brand-icon .lucide-icon { color: var(--white); }

/* Lucide icons global */
.lucide-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.nav-icon .lucide-icon { width: 18px; height: 18px; }

.search-icon {
  display: flex;
  color: var(--navy-light);
}

.search-icon .lucide-icon { width: 16px; height: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn .lucide-icon { width: 16px; height: 16px; }

.birthday-hero h3,
.hotel-hero h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
}

.gift-sent {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pet-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-icon .lucide-icon { color: var(--coral); }

.automation-icon .lucide-icon { color: var(--coral); }

.birthday-pet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: var(--cream);
  border-radius: 50%;
  color: var(--coral);
}

.suite-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.suite-guest {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: var(--cream);
  padding: 0.65rem;
  border-radius: 8px;
  margin: 0.65rem 0;
  font-size: 0.8rem;
}

.suite-guest strong { display: block; }
.suite-guest span { display: block; color: var(--navy-light); font-size: 0.75rem; }
.suite-dates { margin-top: 0.2rem !important; color: var(--coral) !important; font-weight: 600; }

.suite-empty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy-light);
  font-size: 0.8rem;
  padding: 0.65rem 0;
}

.stats-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Hotel */
.hotel-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #3d4f5f 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hotel-hero p { opacity: 0.85; font-size: 0.9rem; max-width: 480px; }

.hotel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

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

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

.dot-available { background: var(--success); }
.dot-occupied { background: var(--coral); }
.dot-cleaning { background: var(--warning); }
.dot-maintenance { background: var(--navy-light); }

.hotel-stats-bar {
  display: flex;
  gap: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.hotel-stats-bar div { text-align: center; }
.hotel-stats-bar strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  color: var(--navy);
}
.hotel-stats-bar span { font-size: 0.75rem; color: var(--navy-light); }

.suites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.suite-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--success);
}

.suite-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.suite-card.suite-occupied { border-left-color: var(--coral); }
.suite-card.suite-cleaning { border-left-color: var(--warning); }
.suite-card.suite-maintenance { border-left-color: var(--navy-light); opacity: 0.85; }

.suite-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.suite-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-light);
  letter-spacing: 0.05em;
}

.suite-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--navy-light);
  margin-bottom: 0.25rem;
}

.suite-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.suite-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}

.suite-price {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--coral);
}

.tier-vip { background: #FFF3CD; color: #856404; }
.tier-premium { background: #E8DAFF; color: #5B2C8E; }
.tier-standard { background: var(--cream); color: var(--navy-light); }

.status-available { background: #D4EDDA; color: #155724; }
.status-occupied { background: #F8D7DA; color: #721C24; }
.status-cleaning { background: #FFF3CD; color: #856404; }
.status-maintenance { background: #E2E3E5; color: #383D41; }

.suite-detail-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.suite-detail-grid p { font-size: 0.85rem; margin-bottom: 0.35rem; }

.suite-detail-guest {
  background: var(--cream);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.suite-detail-guest h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.suite-detail-guest p { font-size: 0.85rem; color: var(--navy-light); margin-bottom: 0.25rem; }

.suite-detail-empty {
  color: var(--navy-light);
  font-size: 0.85rem;
  font-style: italic;
}


.brand h1 { font-size: 1.35rem; color: var(--white); line-height: 1.2; }
.brand p { font-size: 0.75rem; opacity: 0.6; font-family: 'DM Sans', sans-serif; }

.nav { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-item.active { background: var(--coral); color: var(--white); }
.nav-icon { font-size: 1.1rem; }

.sidebar-footer {
  padding: 1rem 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
}

.demo-badge {
  display: inline-block;
  background: var(--teal);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-footer p { font-size: 0.7rem; opacity: 0.5; line-height: 1.4; }

/* Main */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 1.5rem 2rem;
  min-height: 100vh;
}

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

.topbar-left h2 { font-size: 1.75rem; }
.topbar-left p { color: var(--navy-light); font-size: 0.9rem; }

.topbar-right { display: flex; gap: 0.75rem; align-items: center; }

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  min-width: 240px;
}

.search-box input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.875rem;
  background: transparent;
  width: 100%;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary { background: var(--coral); color: var(--white); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary { background: var(--cream-dark); color: var(--navy); }
.btn-secondary:hover { background: #E8DFD5; }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--coral);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--cream-dark);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover { border-color: var(--coral); color: var(--coral); }

/* Views */
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

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

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--coral), #FF8E8E);
  color: var(--white);
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-trend { opacity: 0.85; color: var(--white); }

.stat-label { font-size: 0.8rem; color: var(--navy-light); font-weight: 500; }
.stat-value { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-trend { font-size: 0.75rem; color: var(--navy-light); }
.stat-trend.up { color: var(--success); }
.stat-card.highlight .stat-trend.up { color: rgba(255,255,255,0.9); }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.card-header h3 { font-size: 1.05rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

/* Timeline */
.timeline { padding: 1rem 1.5rem 1.5rem; }

.timeline-item {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--cream-dark);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-time {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--coral);
  min-width: 50px;
}

.timeline-content h4 { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; }
.timeline-content p { font-size: 0.8rem; color: var(--navy-light); }

/* Activity */
.activity-feed { padding: 0.5rem 1.5rem 1.5rem; }

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.85rem;
}

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-item p { color: var(--navy-light); }
.activity-item strong { color: var(--navy); }
.activity-item time { display: block; font-size: 0.75rem; opacity: 0.6; margin-top: 0.15rem; }

/* CRM */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-chips { display: flex; gap: 0.5rem; }

.chip {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--cream-dark);
  background: var(--white);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active, .chip:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.client-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.client-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.client-avatar .lucide-icon { color: var(--white); }

.client-name { font-weight: 700; font-size: 1rem; }
.client-phone { font-size: 0.8rem; color: var(--navy-light); }

.pet-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }

.pet-tag {
  background: var(--cream);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.client-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--navy-light);
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-vip { background: #FFF3CD; color: #856404; }
.badge-nuevo { background: #D4EDDA; color: #155724; }
.badge-success { background: #D4EDDA; color: #155724; }

/* Citas */
.citas-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.calendar-card { padding-bottom: 1rem; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 1.5rem 1rem;
}

.cal-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy-light);
  padding: 0.5rem 0;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  border: 2px solid transparent;
}

.cal-day:hover { background: var(--cream); }
.cal-day.other-month { opacity: 0.3; }
.cal-day.today { border-color: var(--teal); font-weight: 700; }
.cal-day.selected { background: var(--coral); color: var(--white); }
.cal-day.has-appointments::after {
  content: '';
  width: 6px; height: 6px;
  background: var(--coral);
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
}
.cal-day.selected.has-appointments::after { background: var(--white); }

.appointments-list { padding: 0.5rem 1.5rem 1.5rem; }

.appointment-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  align-items: center;
}

.appointment-card:last-child { margin-bottom: 0; }

.appt-time {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--coral);
  min-width: 48px;
}

.appt-info { flex: 1; }
.appt-info h4 { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; }
.appt-info p { font-size: 0.8rem; color: var(--navy-light); }

.status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.status-confirmed { background: #D4EDDA; color: #155724; }
.status-pending { background: #FFF3CD; color: #856404; }
.status-completed { background: #E2E3E5; color: #383D41; }

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--navy-light);
  font-size: 0.9rem;
}

/* Automatizaciones */
.auto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.automation-list { padding: 0.5rem 1.5rem 1.5rem; }

.automation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.automation-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.automation-info { flex: 1; }
.automation-info h4 { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; }
.automation-info p { font-size: 0.78rem; color: var(--navy-light); }

.toggle {
  width: 44px; height: 24px;
  background: #ccc;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle.on { background: var(--success); }

.toggle::after {
  content: '';
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle.on::after { transform: translateX(20px); }

.notifications-log { padding: 0.5rem 1.5rem 1.5rem; max-height: 320px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.85rem;
}

.notif-item:last-child { border-bottom: none; }

.notif-channel {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.notif-whatsapp { background: #D4EDDA; color: #155724; }
.notif-email { background: #CCE5FF; color: #004085; }
.notif-sms { background: #FFF3CD; color: #856404; }

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
}

.template-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.template-card h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--coral);
}

/* Cumpleaños */
.birthday-hero {
  background: linear-gradient(135deg, var(--coral) 0%, #FF8E8E 50%, var(--teal) 100%);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.birthday-hero h3 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--white); }
.birthday-hero p { opacity: 0.9; font-size: 0.9rem; max-width: 480px; }

.birthday-stats {
  display: flex;
  gap: 2rem;
}

.birthday-stats div {
  text-align: center;
}

.birthday-stats strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
}

.birthday-stats span { font-size: 0.75rem; opacity: 0.85; }

.birthday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.birthday-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.birthday-pet-emoji { font-size: 2.5rem; }

.birthday-info { flex: 1; }
.birthday-info h4 { font-family: 'DM Sans', sans-serif; font-weight: 700; }
.birthday-info p { font-size: 0.8rem; color: var(--navy-light); }

.birthday-date {
  font-weight: 700;
  color: var(--coral);
  font-size: 0.85rem;
}

.birthday-actions { display: flex; flex-direction: column; gap: 0.4rem; }

.gift-sent {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 52, 54, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 { font-size: 1.1rem; }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--navy-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--coral); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--navy);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 360px;
}

.toast.success { background: var(--success); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .citas-layout, .auto-grid { grid-template-columns: 1fr; }
  .templates-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { width: 70px; padding: 1rem 0.5rem; }
  .sidebar .brand div, .sidebar .nav-item span:not(.nav-icon),
  .sidebar-footer { display: none; }
  .brand { justify-content: center; padding-bottom: 1rem; }
  .nav-item { justify-content: center; padding: 0.75rem; }
  .main { margin-left: 70px; padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
