:root {
  --brand: #b0306a;
  --brand-ink: #fff;
  --ink: #1f1a24;
  --muted: #6c6676;
  --surface: #ffffff;
  --canvas: #f6f4f8;
  --line: #e7e3ec;
  --sidebar-w: 240px;
  --slot-h: 22px; /* alto de cada fila de 15 min en la agenda */
}

body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--canvas); }
.site { background: #fff; }
h1, h2, h3, .brand-logo, .public-name { letter-spacing: -0.01em; }
.font-display { font-family: 'Playfair Display', Georgia, serif; }

/* Botón de marca (usa el color de cada salón en las páginas públicas) */
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-brand:hover, .btn-brand:focus { background: color-mix(in srgb, var(--brand) 85%, black); border-color: color-mix(in srgb, var(--brand) 85%, black); color: var(--brand-ink); }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover, .btn-check:checked + .btn-outline-brand { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: color-mix(in srgb, var(--brand) 10%, white); }
a { color: var(--brand); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: color-mix(in srgb, var(--brand) 50%, white); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 20%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.card { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(30, 20, 40, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }

/* ===== Sitio de la plataforma ===== */
.brand-logo { font-weight: 700; color: var(--brand) !important; font-size: 1.35rem; }
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 400px at 70% -10%, color-mix(in srgb, var(--brand) 14%, white), white); }
.hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); font-size: 1.3rem; }
.plan-card.featured { border: 2px solid var(--brand); }
.auth-card { max-width: 440px; margin: 48px auto; }

/* ===== Layout del panel ===== */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 1040; transition: transform .2s; }
.sidebar-brand { padding: 18px 20px; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; color: var(--brand); border-bottom: 1px solid var(--line); }
.sidebar .nav { padding: 10px; gap: 2px; overflow-y: auto; }
.sidebar .nav-link { color: var(--ink); border-radius: 10px; padding: 9px 12px; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.sidebar .nav-link:hover { background: var(--canvas); }
.sidebar .nav-link.active { background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); }
.sidebar-footer { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); }
.sidebar-footer .nav-link { color: var(--muted); font-size: .9rem; padding: 8px 12px; display: block; }
.sidebar-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 4px; font-weight: 600; }
.sidebar-dark .sidebar-section { color: #8f8799; }
.sidebar-dark { background: #1f1a24; border-color: #1f1a24; }
.sidebar-dark .sidebar-brand { color: #fff; border-color: #342d3b; }
.sidebar-dark .nav-link { color: #d6d0dd; }
.sidebar-dark .nav-link:hover { background: #2c2533; }
.sidebar-dark .nav-link.active { background: var(--brand); color: #fff; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 1.15rem; font-weight: 600; margin: 0; }
.content { padding: 24px; flex: 1; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1030; }
  .main { margin-left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
}

.stat-card .stat-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .6; }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }

/* ===== Agenda (vista diaria por profesional) ===== */
.agenda-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.agenda { display: grid; min-width: 100%; position: relative; }
.agenda-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 8px; font-weight: 600; font-size: .9rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-times { border-right: 1px solid var(--line); }
.agenda-time { height: calc(var(--slot-h) * 4); font-size: .72rem; color: var(--muted); text-align: right; padding: 0 6px; transform: translateY(-.5em); }
.agenda-col { position: relative; border-right: 1px solid var(--line); min-width: 170px; }
.agenda-col:last-child { border-right: 0; }
.agenda-slot { height: var(--slot-h); border-bottom: 1px dashed #f0edf3; display: block; }
.agenda-slot.hour { border-bottom: 1px solid var(--line); }
.agenda-slot:hover { background: color-mix(in srgb, var(--brand) 6%, white); }
.agenda-slot.closed { background: repeating-linear-gradient(45deg, #faf9fb, #faf9fb 6px, #f3f1f5 6px, #f3f1f5 12px); }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 4px 8px; font-size: .78rem; line-height: 1.25; color: var(--ink); overflow: hidden; text-decoration: none; border-left: 4px solid; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.appt:hover { filter: brightness(.97); z-index: 4; }
.appt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.status-pending { border-style: dashed; }
.appt.status-completed { opacity: .7; }
.appt.status-no_show { opacity: .55; text-decoration: line-through; }
.timeoff { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #eee, #eee 6px, #e4e4e4 6px, #e4e4e4 12px); color: #777; font-size: .75rem; padding: 4px 8px; z-index: 1; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid #e53935; z-index: 5; pointer-events: none; }

/* ===== Páginas públicas del salón ===== */
.public { background: #fbfafc; }
.public-header { background: #fff; border-bottom: 1px solid var(--line); }
.public-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.public-logo-letter { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.4rem; }
.public-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; font-weight: 700; }
.public-hero { background: color-mix(in srgb, var(--brand) 9%, white); border-radius: 18px; padding: 32px; }
.service-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }

/* Asistente de reserva */
.step { display: none; }
.step.active { display: block; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.steps-bar span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps-bar span.done { background: var(--brand); }
.choice { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; cursor: pointer; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; transition: border-color .15s, background .15s; }
.choice:hover { border-color: color-mix(in srgb, var(--brand) 50%, white); }
.choice.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, white); }
.choice-check { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); display: inline-grid; place-items: center; flex-shrink: 0; color: transparent; transition: background .15s, border-color .15s; }
.choice.selected .choice-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice.blocked { opacity: .55; cursor: not-allowed; }
.choice-note:empty { display: none; }
.cart-bar { position: sticky; bottom: 12px; margin-top: 16px; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(30, 20, 40, .12); }
.cart-bar[hidden] { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; flex-shrink: 0; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.day-btn { flex: 0 0 64px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 4px; text-align: center; scroll-snap-align: start; }
.day-btn small { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.day-btn b { font-size: 1.2rem; }
.day-btn.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.day-btn.selected small { color: rgba(255,255,255,.85); }
.day-btn:disabled { opacity: .35; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 4px; font-weight: 500; }
.slot-btn:hover { border-color: var(--brand); }
.slot-btn.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.summary-box { background: color-mix(in srgb, var(--brand) 7%, white); border-radius: 12px; padding: 14px 16px; }

/* Filas de servicios en el formulario de cita: que los números siempre se lean */
.appt-items .f-time { min-width: 110px; }
.appt-items .f-duration { min-width: 70px; text-align: right; }
.appt-items .f-price { min-width: 100px; }

/* Impresión de recibos */
@media print {
  .sidebar, .topbar, .no-print, .alert { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; }
}
