:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-card-subtle: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --morning-bg: rgba(245, 158, 11, 0.15);
  --morning-border: #f59e0b;
  --morning-text: #fbbf24;

  --afternoon-bg: rgba(139, 92, 246, 0.15);
  --afternoon-border: #8b5cf6;
  --afternoon-text: #c084fc;

  --rest-bg: rgba(16, 185, 129, 0.15);
  --rest-border: #10b981;
  --rest-text: #34d399;

  --vacation-bg: rgba(14, 165, 233, 0.15);
  --vacation-border: #0ea5e9;
  --vacation-text: #38bdf8;

  --holiday-bg: rgba(244, 63, 94, 0.15);
  --holiday-border: #f43f5e;
  --holiday-text: #fb7185;

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 90px; /* Espacio para barra de navegación fija */
  min-height: 100vh;
  user-select: none;
}

input, textarea, select {
  user-select: text;
  font-family: inherit;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  padding-bottom: 0;
  min-height: calc(66px + env(safe-area-inset-top, 0px));
  height: calc(66px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* User Profile Header (Left side) */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.user-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  text-transform: uppercase;
  user-select: none;
}

.user-profile-text {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user-profile-text h1 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin: 0;
}

.user-profile-text p {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-top: 2px;
}

/* Legacy support */
.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  max-width: 50%;
  flex-shrink: 1;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-text {
  overflow: hidden;
  white-space: nowrap;
}

.logo-text h1 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.logo-text p {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* New Generous Touch Header Buttons */
.btn-primary-header {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #3b82f6;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.84rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-primary-header:active {
  transform: scale(0.95);
  background: #1d4ed8;
}

.btn-hdr-icon {
  font-size: 1rem;
}

.btn-icon-menu {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #f8fafc;
  font-size: 1.35rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.btn-icon-menu:active {
  transform: scale(0.95);
  background: var(--bg-card-subtle);
  border-color: #60a5fa;
}

/* Modal Menu Tactil de Opciones (Pantalla completa en móvil sin hueco arriba) */
#headerMenuModal {
  align-items: stretch;
}

#headerMenuModal .modal-sheet {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100%;
  border-radius: 0;
  border: none;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  background: #0f172a;
}

@media (min-width: 600px) {
  #headerMenuModal {
    align-items: center;
  }
  #headerMenuModal .modal-sheet {
    height: auto;
    max-height: 90vh;
    max-width: 480px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: #1e293b;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

#headerMenuModal .modal-handle {
  display: none;
}

#headerMenuModal .modal-menu-header {
  margin-bottom: 8px;
  flex-shrink: 0;
}

#headerMenuModal .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: #f8fafc;
}

#headerMenuModal .modal-subtitle {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 0;
}

#headerMenuModal .menu-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-evenly;
  margin: 10px 0;
}

#headerMenuModal .menu-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

#headerMenuModal .menu-action-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

#headerMenuModal .menu-action-card:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.985);
}

#headerMenuModal .menu-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

#headerMenuModal .menu-action-info {
  flex: 1;
  min-width: 0;
}

#headerMenuModal .menu-action-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

#headerMenuModal .menu-action-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#headerMenuModal .menu-action-arrow {
  display: block;
  font-size: 1.2rem;
  color: #64748b;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 4px;
}

#headerMenuModal #btnCloseHeaderMenu {
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  flex-shrink: 0;
}

.menu-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.menu-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  color: inherit;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.menu-action-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.menu-action-card:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.985);
}

.menu-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.menu-action-icon.bg-blue {
  background: rgba(37, 99, 235, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.menu-action-icon.bg-emerald {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.menu-action-icon.bg-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.menu-action-icon.bg-purple {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.menu-action-icon.bg-rose {
  background: rgba(225, 29, 72, 0.16);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.menu-action-info {
  flex: 1;
  min-width: 0;
}

.menu-action-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.menu-action-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
  margin-top: 2px;
}

.menu-action-arrow {
  font-size: 1.2rem;
  color: #64748b;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 2px;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.btn-icon:active {
  transform: scale(0.94);
  background: var(--bg-card-subtle);
}

/* ===================================================
   MODO PAREJA / DOBLE HORARIO / COINCIDENCIAS
   =================================================== */
.couple-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: calc(66px + env(safe-area-inset-top, 0px));
  z-index: 38;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.couple-pill {
  flex: 1;
  max-width: 140px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.couple-pill:active {
  transform: scale(0.96);
}

.couple-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.couple-pill[data-profile="partner"].active {
  background: linear-gradient(135deg, #e11d48, #be123c);
  border-color: #f43f5e;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.35);
}

.couple-pill[data-profile="both"].active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: #a78bfa;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.couple-pill-avatar {
  font-size: 0.85rem;
}

.couple-both-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Dual Day Card */
.dual-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.dual-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.dual-day-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dual-day-date {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.dual-coincidence-banner {
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dual-coincidence-banner.both-off {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.dual-coincidence-banner.same-shift {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.dual-coincidence-banner.cross-shift {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.dual-coincidence-banner.one-off {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.dual-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 360px) {
  .dual-cards-grid {
    grid-template-columns: 1fr;
  }
}

.dual-person-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dual-person-card.user-card {
  border-top: 3px solid #3b82f6;
}

.dual-person-card.partner-card {
  border-top: 3px solid #f43f5e;
}

.dual-person-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.dual-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}

.dual-avatar.user {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}

.dual-avatar.partner {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #fff;
}

.dual-person-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dual-role-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.dual-person-name {
  font-size: 0.82rem;
  color: #f8fafc;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.dual-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  align-self: flex-start;
}

.dual-shift-time {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
  margin-top: 4px;
}

.dual-shift-note {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.25;
}

/* Month Calendar Dual Highlights */
.cal-day-cell.cell-both-free {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.cal-both-free-badge {
  font-size: 0.6rem;
  font-weight: 800;
  color: #34d399;
  line-height: 1;
  margin-top: 2px;
  white-space: nowrap;
}

.cal-dual-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
}

.cal-dual-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.partner-status-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Main Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* Date Selector Ribbon */
.date-selector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.date-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.date-nav-btn:active {
  background: var(--accent);
}

.date-center {
  text-align: center;
  cursor: pointer;
  flex: 1;
}

.date-center .date-label {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.date-center .date-display {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hidden-date-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Hero Shift Card (Vistoso y claro) */
.hero-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.hero-card.type-mañana {
  border-color: var(--morning-border);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.hero-card.type-tarde {
  border-color: var(--afternoon-border);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.hero-card.type-descanso {
  border-color: var(--rest-border);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

.hero-card.type-vacaciones {
  border-color: var(--vacation-border);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

.hero-card.type-festivo {
  border-color: var(--holiday-border);
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.2);
}

.hero-card.type-noche {
  border-color: #6366f1;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.hero-card.type-partido {
  border-color: #06b6d4;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

.hero-card.type-guardia {
  border-color: #ec4899;
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-date-pill {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 12px;
  border-radius: 20px;
}

.hero-main {
  text-align: center;
  padding: 12px 0 16px;
}

.hero-time {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.detail-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.detail-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

/* Quick Action Buttons */
.quick-action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:active {
  transform: scale(0.97);
  background: var(--bg-card-subtle);
}

.action-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: white;
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.section-header .section-tag {
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Next Shifts Mini Horizontal Scroll */
.upcoming-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.upcoming-scroller::-webkit-scrollbar {
  display: none;
}

.mini-day-card {
  min-width: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mini-day-card.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.mini-day-name {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.mini-day-num {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 4px 0;
}

.mini-day-shift {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Month Calendar Grid View */
.calendar-view-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.cal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-month-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: capitalize;
}

.cal-grid-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
}

.cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}

.cal-day-cell:active {
  transform: scale(0.92);
}

.cal-day-cell.other-month {
  opacity: 0.25;
}

.cal-day-cell.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.cal-day-cell.today {
  border-color: var(--accent);
}

.cal-day-number {
  font-size: 0.85rem;
  font-weight: 700;
}

.cal-day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 3px;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

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

/* Shift List View */
.shift-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shift-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.shift-list-item:active {
  background: var(--bg-card-subtle);
}

.shift-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shift-day-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shift-day-badge .dow {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 700;
}

.shift-day-badge .num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.shift-item-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.shift-item-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.shift-item-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.stat-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item .nav-icon {
  font-size: 1.25rem;
}

/* Modal Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: #1e293b;
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-dim);
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 16px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.dropzone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone strong {
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  top: calc(75px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #2563eb;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Demo & Privacy Helpers (Web Pública) */
.demo-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-banner:active {
  transform: scale(0.99);
  background: rgba(37, 99, 235, 0.25);
}

.demo-banner-text strong {
  display: block;
  font-size: 0.86rem;
  color: #fff;
}

.demo-banner-text span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.demo-banner-cta {
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.privacy-note {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-bottom: 14px;
  text-align: left;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 8px;
}

.verify-badge.ok {
  background: rgba(16, 185, 129, 0.14);
  color: var(--rest-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.verify-badge.warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--morning-text);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.share-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.action-btn.danger {
  border-color: rgba(244, 63, 94, 0.35);
  color: var(--holiday-text);
  background: rgba(244, 63, 94, 0.08);
}

@media (max-width: 400px) {
  .app-header {
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: calc(10px + env(safe-area-inset-left, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
    padding-bottom: 0;
  }
  .user-avatar-badge {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
  .user-profile-text h1 {
    font-size: 1.02rem;
  }
  .btn-primary-header {
    height: 38px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
  .btn-icon-menu {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
  .btn-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  .logo-text h1 {
    font-size: 1rem;
  }
  .nav-item {
    padding: 6px 6px;
    font-size: 0.66rem;
  }
}

/* ===================================================
   PROGRAMADOR DE EVENTOS Y AVISOS PERSONALIZADOS
   =================================================== */
.upcoming-alert-banner {
  background: rgba(59, 130, 246, 0.13);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.upcoming-alert-banner:active {
  background: rgba(59, 130, 246, 0.22);
}

.upcoming-alert-banner.conflict {
  background: rgba(244, 63, 94, 0.13);
  border-color: rgba(244, 63, 94, 0.42);
}

.upcoming-alert-banner strong {
  display: block;
  color: #fff;
  font-size: 0.82rem;
}

.upcoming-alert-banner span {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.upcoming-alert-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.upcoming-alert-banner.conflict .upcoming-alert-pill {
  color: var(--holiday-text);
  background: rgba(244, 63, 94, 0.18);
}

/* Tarjeta Eventos del Día & Agenda */
.day-events-card,
.agenda-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  margin-bottom: 20px;
}

.day-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.day-events-header h3 {
  font-size: 0.96rem;
  font-weight: 700;
}

.mini-add-btn {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 5px 11px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mini-add-btn:active {
  transform: scale(0.96);
}

.event-empty-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 6px 0 2px;
}

.events-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
  border-left: 3px solid #ec4899;
  border-radius: 12px;
  padding: 10px 12px;
}

.event-row.has-conflict {
  border-left-color: var(--holiday-border);
  background: rgba(244, 63, 94, 0.07);
}

.event-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.event-row-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.event-row-notes {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.event-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.event-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.event-chip.time {
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

.event-chip.remind {
  background: rgba(139, 92, 246, 0.16);
  color: #ddd6fe;
}

.event-chip.conflict {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

.event-chip.ok {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.event-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
}

.event-icon-btn.del {
  color: var(--holiday-text);
}

.event-icon-btn:active {
  transform: scale(0.92);
}

/* Indicadores en Mini Card, Calendario Mes y Lista */
.mini-day-card {
  position: relative;
}

.mini-day-event-pip {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.85);
}

.cal-event-pip {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ec4899;
}

.list-event-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: #f472b6;
  font-weight: 600;
}

/* Controles de Configuración de Avisos & Formulario Eventos */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 11px 12px;
}

.setting-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.setting-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
}

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-switch {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.custom-reminder-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.preview-status-box {
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.preview-status-box.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.preview-status-box.warn {
  background: rgba(244, 63, 94, 0.13);
  border: 1px solid rgba(244, 63, 94, 0.38);
  color: #fda4af;
}

.preview-status-box.neutral {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

/* ===================================================
   MODO HOSPITALARIO (OCULTO CON CUADRANTES CARREFOUR)
   =================================================== */
.hospital-panel {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.14), rgba(37, 99, 235, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  margin-bottom: 14px;
}

.hospital-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hospital-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7dd3fc;
}

.hospital-month-input {
  width: auto;
  padding: 4px 8px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--accent);
  border-color: #60a5fa;
  color: #fff;
}

.hospital-worker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.hero-time.compact-room {
  font-size: 1.75rem;
  line-height: 1.18;
  word-break: break-word;
}

.compare-modal-sheet {
  max-width: 780px;
  max-height: 92vh;
}

.compare-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
}

.compare-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}

.compare-chip.checked {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.6);
}

.compare-chip input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.compare-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #0f172a;
  margin-bottom: 10px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  min-width: 540px;
}

.compare-table th,
.compare-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 6px;
  text-align: center;
  vertical-align: top;
}

.compare-table th {
  background: #1e293b;
  color: #e2e8f0;
  font-weight: 700;
  white-space: nowrap;
}

.compare-table .sticky-col {
  position: sticky;
  left: 0;
  background: #172033;
  text-align: left;
  min-width: 112px;
  max-width: 138px;
  z-index: 2;
  font-weight: 700;
}

.cmp-cell-pill {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.cmp-cell-pill.M { background: var(--morning-bg); color: var(--morning-text); }
.cmp-cell-pill.T { background: var(--afternoon-bg); color: var(--afternoon-text); }
.cmp-cell-pill.N { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }

.cmp-cell-room {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.cmp-cell-area {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.cmp-cell-coincide {
  box-shadow: inset 0 0 0 2px #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.cmp-cell-highlight {
  background: rgba(250, 204, 21, 0.12);
}

.print-only-header {
  display: none;
}

.sample-preview-pre {
  margin-top: 6px;
  max-height: 150px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-template-preview-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #d1fae5;
}

.templates-list-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.template-card-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}

.template-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.template-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
}

.template-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.vision-preview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
}

.vision-img-frame img {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.vision-img-frame img:hover {
  transform: scale(1.02);
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
  body {
    background: #fff !important;
    color: #111827 !important;
    padding: 0 !important;
    min-height: auto !important;
  }
  .app-header,
  .container,
  .bottom-nav,
  .toast,
  .modal-overlay:not(#hospitalCompareModal),
  .no-print {
    display: none !important;
  }
  #hospitalCompareModal {
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    display: block !important;
  }
  #hospitalCompareModal .modal-sheet {
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111827 !important;
    padding: 0 !important;
    transform: none !important;
  }
  .print-only-header {
    display: block !important;
    margin-bottom: 10px;
    border-bottom: 2px solid #111827;
    padding-bottom: 6px;
  }
  .compare-table-scroll {
    overflow: visible !important;
    border: 1px solid #334155 !important;
    background: #fff !important;
    border-radius: 0 !important;
  }
  .compare-table {
    min-width: 100% !important;
    font-size: 9pt !important;
    color: #111827 !important;
  }
  .compare-table th,
  .compare-table td {
    border: 1px solid #64748b !important;
    color: #111827 !important;
  }
  .compare-table th,
  .compare-table .sticky-col {
    position: static !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }
  .cmp-cell-room {
    color: #0f172a !important;
  }
  .cmp-cell-area {
    color: #475569 !important;
  }
  .cmp-cell-pill {
    border: 1px solid #475569 !important;
    color: #0f172a !important;
    background: #e2e8f0 !important;
  }
  .cmp-cell-coincide {
    background: #dcfce7 !important;
  }
  .cmp-cell-highlight {
    background: #fef9c3 !important;
  }
}

/* ==========================================================================
   Presets y Creación Manual de Horarios (v9)
   ========================================================================== */
.edit-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (min-width: 480px) {
  .edit-presets-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.edit-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.edit-preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.edit-preset-btn:active,
.edit-preset-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
  transform: scale(0.98);
}

.preset-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 3px;
}

.preset-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
}

.preset-time {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
}

.edit-profile-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  gap: 4px;
}

.edit-profile-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.edit-profile-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.edit-profile-btn.partner.active {
  background: #e11d48;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

