/* AgendaPro – estilos del panel y de la página de reservas. El color de marca viene de --brand */
:root { --brand: #6c5ce7; --side: 240px; --bg: #f5f6fa; --ink: #191919; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: color-mix(in srgb, var(--brand) 85%, #000); border-color: color-mix(in srgb, var(--brand) 85%, #000); color: #fff; }
.nav-pills .nav-link.active { background: var(--brand); }
.nav-pills .nav-link { color: #444; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--side); background: #15141a; color: #cfcfd6; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; font-weight: 600; color: #fff; border-bottom: 1px solid #ffffff14; }
.sidebar .brand img { max-height: 34px; max-width: 60px; border-radius: 6px; background: #fff; padding: 2px; }
.sidebar .brand i { color: var(--brand); font-size: 1.4rem; }
.sidebar nav { padding: .6rem; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: 8px; color: #cfcfd6; text-decoration: none; font-size: .93rem; }
.sidebar nav a:hover { background: #ffffff10; color: #fff; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.nav-sep { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7d7c88; padding: 1rem .8rem .3rem; }
.main { flex: 1; margin-left: var(--side); min-width: 0; }
.topbar { display: flex; align-items: center; gap: .8rem; background: #fff; padding: .75rem 1.4rem; border-bottom: 1px solid #e8e8ef; position: sticky; top: 0; z-index: 1030; }
.content { padding: 1.4rem; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px #0006; }
  .main { margin-left: 0; }
  .content { padding: 1rem .8rem; }
}
.card { border: 1px solid #e8e8ef; border-radius: 12px; box-shadow: 0 1px 2px #0000000a; }
.table > :not(caption) > * > * { padding: .6rem .7rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #666; font-weight: 600; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; }

/* KPI */
.kpi { background: #fff; border: 1px solid #e8e8ef; border-radius: 12px; padding: .8rem 1rem; height: 100%; color: inherit; }
.kpi small { display: block; color: #666; font-size: .78rem; }
.kpi b { font-size: 1.35rem; font-weight: 650; display: block; line-height: 1.3; font-variant-numeric: tabular-nums; }
.kpi .chg { font-size: .78rem; font-weight: 600; }
.kpi .chg.up { color: #0a7d24; } .kpi .chg.down { color: #c62828; }
.kpi-danger { border-color: #f1b0b0; background: #fff6f6; }

/* Gráficos */
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 240px; }
.chart-box.is-empty::after { content: "Sin datos en el periodo"; position: absolute; inset: 0; display: grid; place-items: center; color: #999; font-size: .9rem; background: #fff; }
.today-list { max-height: 330px; overflow-y: auto; }

/* Agenda */
.fc { --fc-border-color: #ececf2; --fc-today-bg-color: color-mix(in srgb, var(--brand) 7%, #fff); font-size: .88rem; }
.fc .fc-button-primary { background: #fff; color: #333; border-color: #ddd; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--brand); border-color: var(--brand); color: #fff; }
.fc a { text-decoration: none; color: inherit; }
.fc-ev { font-size: .76rem; line-height: 1.2; overflow: hidden; padding: 1px 2px; }
.fc-event.st-cancelada { opacity: .4; text-decoration: line-through; }
.fc-event.st-pendiente { background-image: repeating-linear-gradient(45deg, transparent 0 6px, #ffffff33 6px 12px); }
.fc-event.st-no_asistio { opacity: .55; }
.fc-event.st-completada { filter: saturate(.6); }

/* Ficha cliente */
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 600; }
.note { border-left: 3px solid var(--brand); background: #fafafe; padding: .6rem .9rem; border-radius: 0 8px 8px 0; margin-bottom: .7rem; }
.totals td, .totals th { border: 0; }

/* Login */
.login-bg { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #15141a); }
.login-card { width: 100%; max-width: 410px; border-radius: 16px; }

/* Página pública de reservas */
.book-bg { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 14%, #fff) 0, var(--bg) 320px); }
.book-wrap { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem; }
.book-head { text-align: center; margin-bottom: 1.2rem; }
.book-head img { max-height: 80px; margin-bottom: .5rem; }
.book-head h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.book-head p { color: #666; margin: .2rem 0 0; font-size: .9rem; }
.book-card { border-radius: 18px; box-shadow: 0 10px 40px #00000012; }
.step { margin-bottom: 1.6rem; }
.step .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; margin-right: .3rem; }
.opt { display: flex; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid #e3e3ea; border-radius: 12px; padding: .75rem 1rem; transition: .15s; }
.opt:hover { border-color: var(--brand); }
.opt.active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.chip, .slot { border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; }
.chip.active, .slot.active, .day.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.days { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.day { flex: 0 0 62px; border: 1px solid #ddd; background: #fff; border-radius: 12px; padding: .4rem 0; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.day b { font-size: 1.2rem; } .day small { font-size: .7rem; text-transform: uppercase; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .5rem; }
.slot { border-radius: 10px; }

@media print {
  .sidebar, .topbar, .no-print, .btn, form.period, .nav-pills { display: none !important; }
  .main { margin: 0; } .content { padding: 0; } body { background: #fff; }
  .card { border: 0; box-shadow: none; }
}
