/* ═══════════════════════════════════════════════════════════════════
   POLICLÍNICA VECA — Sistema de Diseño "Clínica de Lujo"
   Paleta: Azul Marino Profundo + Dorado Suave + Blanco Marfil
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ────────────────────────────────────────────────────── */
:root {
  --navy:        #1a2540;
  --navy-light:  #243255;
  --navy-dark:   #111827;
  --gold:        #c9a96e;
  --gold-light:  #e5c99e;
  --gold-dark:   #a8793d;
  --ivory:       #f8f6f1;
  --platinum:    #e8e6e1;
  --white:       #ffffff;
  --text-dark:   #1a1a2e;
  --text-mid:    #4a5568;
  --text-light:  #9ca3af;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 8px rgba(26,37,64,.08);
  --shadow-md:  0 6px 20px rgba(26,37,64,.12);
  --shadow-lg:  0 16px 40px rgba(26,37,64,.18);
  --shadow-gold: 0 4px 20px rgba(201,169,110,.25);

  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: var(--text-dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--navy);
}

/* ── Navbar ───────────────────────────────────────────────────────── */
.navbar-luxe {
  background: var(--navy) !important;
  box-shadow: 0 2px 16px rgba(26,37,64,.3);
  padding: .8rem 1.5rem;
  transition: var(--transition);
}

.navbar-luxe .navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold) !important;
  letter-spacing: .03em;
}

.navbar-luxe .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .85rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.navbar-luxe .nav-link:hover,
.navbar-luxe .nav-link.active {
  color: var(--gold) !important;
  background: rgba(201,169,110,.1);
}

.navbar-luxe .nav-link.btn-gold {
  background: var(--gold);
  color: var(--navy) !important;
  font-weight: 600;
  margin-left: .5rem;
}

.navbar-luxe .nav-link.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

/* ── Hero Section ─────────────────────────────────────────────────── */
.hero-luxe {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  overflow: hidden;
}

.hero-luxe::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a96e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-luxe .hero-content { position: relative; z-index: 2; }

.hero-luxe h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero-luxe h1 span { color: var(--gold); }

.hero-luxe p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(201,169,110,.15);
  border: 1px solid rgba(201,169,110,.3);
  color: var(--gold-light);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-dark) !important;
  font-weight: 600;
  font-size: .9rem;
  padding: .75rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,169,110,.4);
  color: var(--navy-dark) !important;
}

.btn-navy {
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 600;
  font-size: .9rem;
  padding: .75rem 2rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.btn-navy:hover {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy) !important;
}

.btn-outline-gold {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold) !important;
  font-weight: 600;
  font-size: .9rem;
  padding: .7rem 1.8rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy) !important;
  box-shadow: var(--shadow-gold);
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card-luxe {
  background: var(--white);
  border: 1px solid rgba(26,37,64,.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card-luxe:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(201,169,110,.25);
}

.card-luxe .card-header-luxe {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: 0;
}

.card-luxe .card-header-luxe h5, 
.card-luxe .card-header-luxe h4 {
  color: var(--gold);
  font-family: var(--font-heading);
  margin: 0;
}

/* ── Visual Cards (estilo Pedrosa) ───────────────────────────────── */
.visual-card {
  position: relative;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
  margin-bottom: 20px;
  text-decoration: none;
  display: block;
}

.visual-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26,37,64,.35);
  text-decoration: none;
}

.visual-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.55);
  transition: transform .4s;
}

.visual-card:hover .visual-card-bg { transform: scale(1.05); }

.visual-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
}

.visual-card-content::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transition: transform .3s;
}

.visual-card:hover .visual-card-content::before { transform: scaleX(1); }

.visual-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin: 0;
}

.visual-card-subtitle {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  margin-top: .5rem;
  font-weight: 400;
}

.visual-card-icon {
  font-size: 2rem;
  margin-bottom: .6rem;
}

/* Visual card pequeña */
.visual-card.sm { height: 150px; }
.visual-card.sm .visual-card-title { font-size: 1.1rem; }

/* ── Dashboard Stats ──────────────────────────────────────────────── */
.stat-card-luxe {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.stat-card-luxe::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(201,169,110,.15);
}

.stat-card-luxe:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card-luxe .stat-number { font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.stat-card-luxe .stat-label  { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: .2rem; }
.stat-card-luxe .stat-icon   { font-size: 2rem; position: absolute; top: 1.2rem; right: 1.5rem; opacity: .3; }

/* ── Service Cards ───────────────────────────────────────────────── */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26,37,64,.05);
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(201,169,110,.3);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card .service-body { padding: 1.25rem; }
.service-card .service-title { font-family: var(--font-heading); font-size: 1.2rem; color: var(--navy); margin-bottom: .4rem; }
.service-card .service-desc  { font-size: .85rem; color: var(--text-mid); }
.service-card .service-price { font-weight: 700; color: var(--gold-dark); font-size: 1.1rem; }
.service-card .service-dur   { font-size: .8rem; color: var(--text-light); }

.service-card .service-footer {
  padding: 1rem 1.25rem;
  background: var(--ivory);
  border-top: 1px solid var(--platinum);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toggle activo/inactivo */
.toggle-service-btn {
  width: 42px; height: 22px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  outline: none;
}

.toggle-service-btn.active { background: #10b981; }
.toggle-service-btn.inactive { background: #d1d5db; }

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

.toggle-service-btn.active::after  { left: 22px; }
.toggle-service-btn.inactive::after { left: 3px; }

/* ── Schedule Grid ───────────────────────────────────────────────── */
.schedule-row {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  border: 1px solid var(--platinum);
  display: grid;
  grid-template-columns: 120px 1fr 1fr 120px 120px auto;
  gap: .75rem;
  align-items: center;
  transition: var(--transition);
}

.schedule-row.closed {
  opacity: .55;
  background: #f3f4f6;
}

.schedule-row.closed:hover { opacity: .75; }

.day-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── Calendar ────────────────────────────────────────────────────── */
.calendar-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--platinum);
}

.fc .fc-toolbar-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--navy);
}

.fc .fc-button-primary {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
}

.fc .fc-button-primary:hover {
  background: var(--navy-light) !important;
}

.fc .fc-event {
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 500;
  padding: 2px 4px;
}

/* ── Forms Luxe ──────────────────────────────────────────────────── */
.form-luxe .form-control,
.form-luxe .form-select {
  border: 1.5px solid var(--platinum);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  font-size: .9rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
}

.form-luxe .form-control:focus,
.form-luxe .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
  outline: none;
}

.form-luxe label {
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: .35rem;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-no_show   { background: #f3f4f6; color: #6b7280; }

.status-badge {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
}

/* ── Invoice ─────────────────────────────────────────────────────── */
.invoice-row {
  display: grid;
  grid-template-columns: 160px 1fr 1fr auto auto auto;
  gap: .75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: .5rem;
  border: 1px solid var(--platinum);
}

/* ── Section Header ──────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin: 0;
}

.section-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer-luxe {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 1.5rem;
}

.footer-luxe h5 {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-luxe a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .85rem;
  transition: var(--transition);
}

.footer-luxe a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: .8rem;
  text-align: center;
}

/* ── Messenger / Employee profile card ───────────────────────────── */
.employee-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--platinum);
  transition: var(--transition);
  text-align: center;
}

.employee-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.employee-card .emp-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin: 1.25rem auto .75rem;
}

.employee-card .emp-name { font-family: var(--font-heading); font-size: 1.15rem; color: var(--navy); }
.employee-card .emp-bio  { font-size: .82rem; color: var(--text-mid); padding: 0 1rem; }

.employee-card .emp-color-bar {
  height: 4px;
  margin-top: 1rem;
}

/* ── PWA Install banner ───────────────────────────────────────────── */
.pwa-install-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  animation: slideUp .4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .invoice-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero-luxe { min-height: 80vh; }
  .hero-luxe h1 { font-size: 2rem; }

  .visual-card { height: 160px; }
}
