/* VAMO Turnos · estilos de los componentes reutilizables (los usan el panel y las páginas públicas). */

/* ------------------------------------------------------------ estadística */
.stat-card { display: flex; flex-direction: column; gap: var(--s-2); position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; gap: var(--s-3); }
.stat-icon { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--black); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-label { font-size: var(--fs-sm); font-weight: 600; color: var(--gray-600); }
.stat-value { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: var(--fs-xs); color: var(--gray-600); }
.stat-warn .stat-icon { background: var(--st-pending-bg); color: var(--st-pending); }

/* ------------------------------------------------------------ tarjeta de un turno */
.appt-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3); border: 1px solid var(--gray-100); border-left: 4px solid var(--pro, var(--lime)); border-radius: var(--r-md); background: var(--white); text-align: left; font: inherit; color: inherit; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
button.appt-card { cursor: pointer; }
button.appt-card:hover { transform: translateX(2px); box-shadow: var(--shadow-md); }
.appt-card.is-cancelled { opacity: 0.6; }
.appt-card.is-cancelled .appt-name { text-decoration: line-through; }
.appt-time { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.appt-time strong { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.appt-date { font-size: var(--fs-xs); font-weight: 600; color: var(--gray-600); text-transform: capitalize; margin-bottom: 2px; }
.appt-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-sub { font-size: var(--fs-sm); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-meta { display: flex; gap: var(--s-2); margin-top: 4px; flex-wrap: wrap; }
.appt-meta:empty { display: none; }
.appt-main { min-width: 0; }

/* ------------------------------------------------------------ servicios */
.svc-card { display: flex; flex-direction: column; gap: var(--s-3); text-align: left; font: inherit; color: inherit; cursor: pointer; position: relative; padding: var(--s-4); }
div.svc-card { cursor: default; }
.svc-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); }
.svc-card.is-inactive { opacity: 0.6; }
.svc-icon { width: 52px; height: 52px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; }
.svc-img { margin: calc(var(--s-4) * -1) calc(var(--s-4) * -1) 0; height: 130px; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--gray-100); }
.svc-img img { width: 100%; height: 100%; object-fit: cover; }
.svc-name { font-size: var(--fs-lg); }
.svc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-meta { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip-static { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--gray-50); border: 1px solid var(--gray-100); font-size: var(--fs-xs); font-weight: 600; color: var(--gray-600); }
.svc-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--gray-100); }
.svc-price { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }

/* ------------------------------------------------------------ profesionales */
.pro-card { display: flex; align-items: center; gap: var(--s-4); text-align: left; font: inherit; color: inherit; cursor: pointer; position: relative; padding: var(--s-4); }
div.pro-card { cursor: default; }
.pro-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); }
.pro-card.is-inactive { opacity: 0.6; }
.pro-body { flex: 1 1 auto; min-width: 0; }
.pro-avail { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--brand-deep); font-weight: 600; }
.pro-check { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ------------------------------------------------------------ pasos de la reserva */
.stepper { display: flex; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.step:last-child { flex: 0 0 auto; }
.step::after { content: ''; flex: 1 1 auto; height: 2px; margin: 0 var(--s-2); background: var(--gray-200); border-radius: 2px; }
.step:last-child::after { display: none; }
.step-done::after { background: var(--black); }
.step-btn { display: inline-flex; align-items: center; gap: var(--s-2); border: 0; background: none; padding: 0; font: inherit; color: inherit; }
button.step-btn { cursor: pointer; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; flex: none; background: var(--gray-100); color: var(--gray-600); transition: all var(--dur) var(--ease); }
.step-current .step-dot { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.step-done .step-dot { background: var(--black); color: var(--white); }
.step-label { font-size: var(--fs-sm); font-weight: 600; color: var(--gray-600); white-space: nowrap; }
.step-current .step-label, .step-done .step-label { color: var(--black); }

/* ------------------------------------------------------------ resumen y pago */
.summary { display: flex; flex-direction: column; gap: var(--s-4); }
.sum-row { display: flex; align-items: center; gap: var(--s-3); }
.sum-icon { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sum-value { font-weight: 600; }
.sum-total { border-top: 1px dashed var(--gray-200); padding-top: var(--s-3); display: flex; flex-direction: column; gap: 6px; }
.pay-options { display: flex; flex-direction: column; gap: var(--s-3); }
.pay-opt { display: flex; align-items: center; gap: var(--s-4); width: 100%; padding: var(--s-4); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-md); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: all var(--dur) var(--ease); }
.pay-opt:hover:not(:disabled) { border-color: var(--black); }
.pay-opt:disabled { opacity: 0.5; cursor: not-allowed; }
.pay-opt.is-selected { border-color: var(--black); box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.pay-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--black); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pay-text { display: flex; flex-direction: column; flex: 1 1 auto; gap: 2px; }
.pay-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gray-300); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pay-opt.is-selected .pay-radio { background: var(--black); border-color: var(--black); color: var(--white); }

/* ------------------------------------------------------------ selector de fecha y de hora */
.datepicker { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--shadow-sm); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.dp-title { text-transform: capitalize; font-size: var(--fs-lg); }
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--gray-400); margin-bottom: var(--s-2); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-day { aspect-ratio: 1; min-height: 40px; border: 0; border-radius: var(--r-md); background: transparent; font: inherit; font-weight: 500; color: var(--gray-300); display: flex; align-items: center; justify-content: center; position: relative; }
.dp-day.is-avail { color: var(--black); font-weight: 700; background: var(--gray-50); cursor: pointer; transition: all var(--dur) var(--ease); }
.dp-day.is-avail:hover { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.dp-day.is-avail::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand-deep); }
.dp-day.is-selected, .dp-day.is-selected:hover { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-soft); }
.dp-day.is-selected::after { background: var(--brand-ink); }
.dp-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 2px var(--black); }
.dp-day:disabled { cursor: default; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s-2); }
.slot { min-height: 44px; border: 1px solid var(--gray-200); border-radius: var(--r-md); background: var(--white); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: all var(--dur) var(--ease); }
.slot:hover { border-color: var(--black); transform: translateY(-1px); }
.slot-spots { display: block; font-size: var(--fs-xs); font-weight: 500; line-height: 1.2; opacity: 0.8; }
.slot.is-selected { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ------------------------------------------------------------ foto */
.img-upload { display: flex; align-items: center; gap: var(--s-4); }
.img-preview { width: 96px; height: 96px; border-radius: var(--r-md); background: var(--gray-100); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-xl); flex: none; }
.img-upload.is-round .img-preview { border-radius: 50%; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ gráficos */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-label { font-size: 11px; fill: var(--gray-400); font-family: var(--font); }
.ring-text { font-size: 26px; font-weight: 800; fill: var(--black); font-family: var(--font); }
@keyframes vt-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vt-ring { from { stroke-dasharray: 0 999; } to { stroke-dasharray: var(--len) 999; } }

/* ------------------------------------------------------------ ventanas flotantes y notificaciones */
.popover-host { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 92vw); max-height: 70vh; overflow: auto; background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 70; animation: vt-rise 0.25s var(--ease) both; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-100); }
.bell-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--lime); color: var(--black); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--white); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; gap: var(--s-3); width: 100%; padding: var(--s-3) var(--s-4); border: 0; background: none; font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--gray-50); }
.notif:hover { background: var(--gray-50); }
.notif.is-unread { background: var(--lime-soft); }
.notif-icon { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--black); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.notif-icon .icon { width: 17px; height: 17px; }
.notif-title { display: block; font-weight: 600; font-size: var(--fs-sm); }
.notif-body { display: block; font-size: var(--fs-xs); color: var(--gray-600); }

/* ------------------------------------------------------------ calendario */
.calendar { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal-grid { display: flex; max-height: calc(100dvh - 250px); min-height: 420px; overflow: auto; position: relative; }
.cal-axis { flex: 0 0 56px; position: sticky; left: 0; z-index: 5; background: var(--white); border-right: 1px solid var(--gray-100); }
.cal-corner { height: 56px; border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; background: var(--white); z-index: 6; }
.cal-hour { position: relative; font-size: var(--fs-xs); color: var(--gray-400); text-align: right; padding-right: 8px; }
.cal-hour span { position: relative; top: -7px; }
.cal-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(150px, 1fr)); flex: 1 1 auto; min-width: 0; }
.cal-week .cal-cols { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.cal-col { border-right: 1px solid var(--gray-100); min-width: 0; }
.cal-col:last-child { border-right: 0; }
.cal-col-head { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: sticky; top: 0; background: var(--white); z-index: 4; border-bottom: 1px solid var(--gray-100); }
.cal-col.is-today .cal-col-head { background: var(--lime-soft); }
.cal-pro { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.cal-daybtn { border: 0; background: none; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.cal-daynum { font-size: var(--fs-xl); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-col.is-today .cal-daynum { background: var(--black); color: var(--lime); }
.cal-col-body { position: relative; cursor: cell; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--gray-100); pointer-events: none; }
.cal-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, var(--gray-50), var(--gray-50) 6px, #f0f1f3 6px, #f0f1f3 12px); pointer-events: none; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.cal-event { position: absolute; padding: 4px 8px; border: 0; border-left: 4px solid var(--pro, var(--lime)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--pro, var(--lime)) 28%, white); color: var(--black); text-align: left; font: inherit; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; line-height: 1.2; z-index: 2; transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.cal-event:hover { box-shadow: var(--shadow-md); transform: scale(1.01); z-index: 3; }
.cal-event.is-compact { flex-direction: row; align-items: center; gap: 6px; }
.ev-time { font-size: var(--fs-xs); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.ev-name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-svc { font-size: var(--fs-xs); color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.st-pending { background: repeating-linear-gradient(135deg, #fff, #fff 5px, color-mix(in srgb, var(--pro, var(--lime)) 30%, white) 5px, color-mix(in srgb, var(--pro, var(--lime)) 30%, white) 10px); border-left-style: dashed; }
.cal-event.st-completed { background: var(--st-completed-bg); border-left-color: var(--st-completed); color: #243b8f; }
.cal-event.st-no_show { background: var(--st-no_show-bg); border-left-color: var(--st-no_show); color: #43307c; }
.cal-event.st-cancelled { background: var(--st-cancelled-bg); border-left-color: var(--st-cancelled); color: #8f2626; opacity: 0.75; }
.cal-event.st-cancelled .ev-name { text-decoration: line-through; }

.cal-month { display: flex; flex-direction: column; }
.mo-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.mo-head span { padding: var(--s-2); text-align: center; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); }
.mo-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(var(--weeks), minmax(104px, 1fr)); }
.mo-cell { border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); padding: 6px; cursor: pointer; min-width: 0; transition: background-color var(--dur) var(--ease); }
.mo-cell:nth-child(7n) { border-right: 0; }
.mo-cell:hover { background: var(--gray-50); }
.mo-cell.is-out { background: #fafafb; color: var(--gray-400); }
.mo-num { font-size: var(--fs-sm); font-weight: 700; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mo-cell.is-today .mo-num > :first-child { background: var(--black); color: var(--lime); border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; margin: -2px; }
.mo-count { font-size: 11px; font-weight: 700; background: var(--lime); border-radius: var(--r-pill); padding: 0 7px; }
.mo-events { display: flex; flex-direction: column; gap: 3px; }
.mo-chip { display: block; width: 100%; border: 0; border-left: 3px solid var(--pro, var(--lime)); border-radius: 4px; background: color-mix(in srgb, var(--pro, var(--lime)) 25%, white); padding: 2px 6px; font: inherit; font-size: 11.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mo-chip.st-completed { background: var(--st-completed-bg); border-left-color: var(--st-completed); }
.mo-chip.st-no_show { background: var(--st-no_show-bg); border-left-color: var(--st-no_show); }
.mo-chip.st-pending { border-left-style: dashed; background: #fff; }
.mo-more { font-size: 11px; font-weight: 600; color: var(--gray-600); padding-left: 4px; }
.mo-dots { display: none; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.mo-dots .dot { width: 6px; height: 6px; }

.agenda { display: flex; flex-direction: column; }
.agenda-day { padding: var(--s-3) var(--s-4) var(--s-4); border-bottom: 1px solid var(--gray-100); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); text-transform: capitalize; }
.agenda-head.is-today strong::after { content: 'Hoy'; margin-left: 8px; font-size: 11px; background: var(--black); color: var(--lime); padding: 2px 8px; border-radius: var(--r-pill); text-transform: none; }
.agenda-empty { display: flex; align-items: center; justify-content: space-between; padding: var(--s-2) 0; }

@media (max-width: 760px) {
  .stat-value { font-size: var(--fs-3xl); }
  .step-label { display: none; }
  .step-current .step-label { display: inline; }
  .mo-grid { grid-template-rows: repeat(var(--weeks), minmax(64px, 1fr)); }
  .mo-events { display: none; }
  .mo-dots { display: flex; }
  .mo-cell { padding: 4px; }
  .mo-count { display: none; }
  .appt-card { grid-template-columns: 48px 1fr; }
  .appt-card > .badge { grid-column: 2; justify-self: start; }
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(40px); }
  .modal-lg, .modal-sm { max-width: none; }
  .modal-foot { position: sticky; bottom: 0; background: var(--white); }
  .modal-foot .btn { flex: 1 1 auto; }
  .img-upload { flex-direction: column; align-items: flex-start; }
}

.dp-grid, .dp-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dp-day { min-width: 0; }

/* firma "by Código Austral" (pie de las páginas públicas, ingreso y barra lateral del panel) */
.by-austral { display: inline-flex; align-items: center; gap: 6px; }
.by-austral img { width: 22px; height: 22px; object-fit: contain; }
.side-by { display: flex; justify-content: center; padding: var(--s-3) 0 var(--s-1); font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--gray-400); }
.side-by strong { color: var(--gray-300); }
