/* =====================================================================
   NFKings · AGENDA (admin y portal) + PÁGINA PÚBLICA DE RESERVAS
   Usa los mismos colores, botones y tarjetas de admin.css.
   ===================================================================== */

/* Barra inferior del celular: Inicio, Clientes, Menús, Agendas, Más */
@media (max-width: 900px) { .tabbar { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Estructura de una agenda ---------- */
.page-agenda { gap: 0; }
.ag { display: grid; gap: 16px; min-width: 0; }
.ag-head { display: grid; gap: 10px; }
.ag-head .back-link { margin-bottom: 0; }
.ag-id { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ag-logo { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--c, var(--brand)) 14%, #fff); color: var(--c, var(--brand)); border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 25%, transparent); }
.ag-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ag-logo .ico { width: 24px; height: 24px; }
.ag-title { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.ag-title h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; }
.ag-title p { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #e9ebf3; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 20; }
.ag-tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: .86rem; text-decoration: none; white-space: nowrap; }
.ag-tab .ico { width: 17px; height: 17px; }
.ag-tab:hover { color: var(--ink); }
.ag-tab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.ag-tab.on .ico { color: var(--brand); }
.ag-panel { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ag-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ag-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ag-tabs { top: 56px; margin: 0 -16px; border-radius: 0; padding: 6px 12px; background: rgb(233 235 243 / .96); backdrop-filter: blur(10px); }
  .ag-title h1 { font-size: 1.3rem; }
  .ag-new { width: 100%; }
}

/* ---------- Indicadores ---------- */
.akpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .akpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .akpis .akpi:first-child { grid-column: span 3; } }
.akpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.akpi-ico { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--k-soft); color: var(--k); }
.akpi-ico .ico { width: 19px; height: 19px; }
.akpi strong { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.akpi small { color: var(--muted); font-weight: 650; font-size: .76rem; }
.akpi-violet { --k: #6c4dff; --k-soft: #efeaff; }
.akpi-amber { --k: #c47a06; --k-soft: #fff1d6; }
.akpi-blue { --k: #2f6fe4; --k-soft: #e4edff; }
.akpi-green { --k: #10a35a; --k-soft: #e4f7ec; }
.akpi-gray { --k: #6b7088; --k-soft: #eef0f5; }
@media (max-width: 520px) { .akpi { grid-template-columns: 1fr; padding: 10px; text-align: left; } .akpi-ico { display: none; } .akpi strong { font-size: 1.3rem; } }
.callout-link { text-decoration: none; align-items: center; }
.callout-link > .ico:last-child { margin-left: auto; color: var(--muted); }

/* ---------- Estados de cita ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: .74rem; font-weight: 750; white-space: nowrap; background: var(--s-soft); color: var(--s); }
.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-amber { --s: #8a5300; --s-soft: #fff1d6; }
.st-violet { --s: #4b2fe0; --s-soft: #efeaff; }
.st-green { --s: #0b7a43; --s-soft: #e4f7ec; }
.st-gray { --s: #5b6078; --s-soft: #eef0f5; }
.st-red { --s: #c0243d; --s-soft: #fde8ec; }

/* ---------- Lista de citas ---------- */
.appt-list { display: grid; gap: 8px; }
.appt { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; color: inherit;
  border-left: 4px solid var(--s, var(--line)); transition: border-color .15s, box-shadow .15s, transform .1s; }
.appt-wrap { display: flex; align-items: center; gap: 8px; }
.appt-wrap .appt { flex: 1; min-width: 0; }
.appt-wa { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: var(--shadow-sm); }
.appt-wa:hover { background: #1ebe5b; }
.appt-wa .ico { width: 22px; height: 22px; }
.appt:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.appt-pendiente { --s: #e8a019; } .appt-confirmada { --s: #6c4dff; } .appt-completada { --s: #10a35a; }
.appt-cancelada, .appt-no_asistio { --s: #c9ccd8; }
.appt-cancelada .appt-info strong, .appt-no_asistio .appt-info strong { text-decoration: line-through; color: var(--muted); }
.appt-time { display: grid; line-height: 1.2; }
.appt-time strong { font-size: .95rem; font-weight: 800; white-space: nowrap; }
.appt-time small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.appt-info { display: grid; min-width: 0; }
.appt-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt-info small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.appt-note .ico { width: 14px; height: 14px; color: var(--brand); }
@media (max-width: 480px) { .appt { grid-template-columns: 62px minmax(0, 1fr); } .appt > .st { grid-column: 2; justify-self: start; } }
.empty-mini { display: grid; justify-items: center; gap: 6px; padding: 26px 10px; color: var(--muted); text-align: center; }
.empty-mini > .ico { width: 30px; height: 30px; color: #b6b9cc; }
.day-group { display: grid; gap: 8px; margin-bottom: 16px; }
.day-title { display: flex; align-items: baseline; gap: 8px; font-size: .95rem; font-weight: 800; }
.day-title small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.day-count { margin-left: auto; font-size: .74rem; color: var(--muted); background: #e9ebf3; padding: 1px 8px; border-radius: 999px; }

/* Primeros pasos */
.setup { background: linear-gradient(135deg, #f4f0ff, #fff 70%); border-color: #e3dcff; }
.setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .setup-steps { grid-template-columns: 1fr; } }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.setup-step > span:nth-child(2) { flex: 1; display: grid; }
.setup-step small { color: var(--muted); font-size: .78rem; }
.setup-step > .ico { color: var(--muted); }
.setup-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: .85rem; }
.setup-step.done { opacity: .7; }
.setup-step.done .setup-n { background: var(--ok); }
.setup-n .ico { width: 16px; height: 16px; stroke-width: 3; }

/* Detalle de cita */
.appt-detail { display: grid; gap: 14px; padding: 4px 22px 22px; }
.ad-when { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--brand-soft); }
.ad-when p { color: var(--ink-2); font-size: .86rem; }
.ad-when > div > strong { font-size: 1.15rem; }
.ad-cal { width: 54px; flex: none; border-radius: 12px; background: #fff; text-align: center; overflow: hidden; box-shadow: var(--shadow-sm); }
.ad-cal small { display: block; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; padding: 2px 0; }
.ad-cal strong { display: block; font-size: 1.35rem; padding: 2px 0 4px; }
.ad-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.ad-list dt { color: var(--muted); font-size: .84rem; font-weight: 650; }
.ad-list dd { margin: 0; font-weight: 600; word-break: break-word; }
.st-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.st-opt { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2); font-weight: 700; font-size: .84rem; cursor: pointer; }
.st-opt i { width: 9px; height: 9px; border-radius: 50%; background: var(--s); }
.st-opt.on { border-color: var(--s); background: var(--s-soft); color: var(--s); }
.st-opt:hover:not(.on) { border-color: #b3b7c8; }

/* ---------- Calendario ---------- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 1.1rem; font-weight: 800; margin-left: 6px; text-transform: capitalize; }
.cal-seg { margin-left: 0; }
.seg-txt { width: auto; padding: 0 14px; font-weight: 700; font-size: .84rem; }
@media (max-width: 560px) { .cal-bar { flex-direction: column; align-items: stretch; } .cal-seg { display: grid; grid-template-columns: repeat(3, 1fr); } .cal-title { font-size: 1rem; } }
.tg { border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.tg-scroll { overflow: auto; max-height: calc(100vh - 260px); min-height: 360px; }
.tg-week .tg-head, .tg-week .tg-body { min-width: 760px; }
.tg-head, .tg-body { display: grid; grid-template-columns: 58px repeat(var(--n, 7), minmax(0, 1fr)); }
.tg-day .tg-head, .tg-day .tg-body { grid-template-columns: 58px minmax(0, 1fr); }
.tg-head { position: sticky; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid var(--line); }
.tg-day .tg-head { display: none; }
.tg-head .tg-day { display: grid; justify-items: center; padding: 8px 0; }
.tg-head .tg-day small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.tg-head .tg-day strong { font-size: 1.05rem; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.tg-head .tg-day.today strong { background: var(--brand); color: #fff; }
.tg-ruler { position: relative; border-right: 1px solid var(--line); }
.tg-ruler span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .68rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tg-ruler span:first-child { transform: none; }
.tg-col { position: relative; border-right: 1px solid var(--line); background: repeating-linear-gradient(135deg, #f6f7fb 0 6px, #f1f2f7 6px 12px); cursor: copy; }
.tg-col:last-child { border-right: 0; }
.tg-col.today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }
.tg-open { position: absolute; left: 0; right: 0; background: #fff; }
.tg-line { position: absolute; left: 0; right: 0; border-top: 1px solid #eceef4; pointer-events: none; }
.tg-now { position: absolute; left: -4px; right: 0; height: 2px; background: #e5484d; z-index: 3; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }
.ev { position: absolute; left: 4px; right: 4px; z-index: 2; display: grid; align-content: start; gap: 1px; padding: 4px 7px; border-radius: 9px; border: 0; border-left: 3px solid var(--s); background: var(--s-soft); color: var(--s); text-align: left; font: inherit; font-size: .74rem; line-height: 1.25; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.ev strong { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:hover { filter: brightness(.97); z-index: 3; }
.ev-amber { --s: #8a5300; --s-soft: #fff1d6; } .ev-violet { --s: #4b2fe0; --s-soft: #efeaff; } .ev-green { --s: #0b7a43; --s-soft: #e4f7ec; }
.ev-gray { --s: #5b6078; --s-soft: #eef0f5; } .ev-red { --s: #c0243d; --s-soft: #fde8ec; }
.ev-off { opacity: .55; left: 40%; text-decoration: line-through; }
.tg-day .ev { font-size: .82rem; padding: 6px 10px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--line); gap: 1px; box-shadow: var(--shadow-sm); }
.month-dow { background: #fff; padding: 8px 4px; text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.month-cell { position: relative; display: grid; align-content: start; gap: 3px; min-height: 104px; padding: 6px; border: 0; background: #fff; text-align: left; font: inherit; cursor: pointer; color: inherit; min-width: 0; }
.month-cell:hover { background: #fafbff; }
.month-cell.other { background: #fafafc; color: #b3b7c8; }
.month-cell.closed:not(.other) { background: repeating-linear-gradient(135deg, #fff 0 6px, #f6f7fb 6px 12px); }
.month-n { font-weight: 750; font-size: .84rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.month-cell.today .month-n { background: var(--brand); color: #fff; }
.month-ev { display: block; padding: 2px 6px; border-radius: 6px; background: var(--s-soft); color: var(--s); font-size: .68rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-more { font-size: .68rem; color: var(--muted); font-weight: 700; padding-left: 4px; }
.month-dot { display: none; position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800; place-items: center; }
@media (max-width: 640px) {
  .month-cell { min-height: 62px; padding: 4px; }
  .month-ev, .month-more { display: none; }
  .month-dot { display: grid; position: static; margin: 2px auto 0; }
  .month-n { margin: 0 auto; }
}

/* ---------- Clientes ---------- */
.cust-list { display: grid; gap: 8px; }
.cust { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: left; cursor: pointer; color: inherit; }
.cust:hover { box-shadow: var(--shadow-sm); }
.cust-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); font-weight: 800; }
.cust-av.lg { width: 56px; height: 56px; font-size: 1.3rem; }
.cust-info, .cust-meta { display: grid; min-width: 0; }
.cust-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-info small, .cust-meta small { color: var(--muted); font-size: .76rem; }
.cust-meta strong { font-size: .86rem; }
.cust-total { display: grid; justify-items: center; min-width: 48px; padding: 4px 8px; border-radius: 10px; background: var(--surface-2); }
.cust-total small { color: var(--muted); font-size: .68rem; }
@media (max-width: 560px) { .cust { grid-template-columns: auto minmax(0, 1fr) auto; } .cust-meta { display: none; } }
.cust-head { display: flex; align-items: center; gap: 14px; }
.cust-head strong { font-size: 1.15rem; }
.cust-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cust-stats > div { display: grid; justify-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cust-stats small { color: var(--muted); font-size: .74rem; }

/* ---------- Servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.svc { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 12px 14px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.svc.is-off .svc-body, .svc.is-off .svc-img { opacity: .5; }
.svc-img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.svc-img-empty { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.svc-body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.svc-body h3 { font-size: 1rem; font-weight: 750; }
.svc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.svc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 650; color: var(--ink-2); }
.svc-chip .ico { width: 14px; height: 14px; }
.svc-price { font-weight: 800; }
.svc-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.svc-tools .order { display: flex; gap: 4px; }
.svc-tools .order-btn { width: 30px; height: 28px; }

/* ---------- Horarios ---------- */
.hours-days { display: grid; gap: 8px; }
.hday { border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.hday.open { background: #fff; }
.hday-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.hday-head strong { min-width: 92px; }
.hday-sum { margin-left: auto; color: var(--muted); font-size: .84rem; font-weight: 600; text-align: right; }
.hday:not(.open) .hday-sum { color: #a3a7bd; }
.hday-blocks { display: grid; gap: 8px; padding: 0 14px 14px 62px; }
.hblock { display: flex; align-items: center; gap: 8px; }
.hblock input[type=time] { width: auto; min-width: 118px; flex: 0 1 140px; }
.hday-blocks .row { gap: 14px; }
@media (max-width: 560px) { .hday-blocks { padding-left: 14px; } .hday-sum { display: none; } .hblock input[type=time] { flex: 1; min-width: 0; } }
.hs-dirty { display: none !important; color: var(--brand-deep); }
.hours-save.is-dirty .hs-dirty { display: flex !important; }
.hours-save.is-dirty .hs-clean { display: none !important; }
.hours-save.is-dirty { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent); }
.closures { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.closures li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.closures li > span { flex: 1; display: grid; }
.closures small { color: var(--muted); font-size: .78rem; }

/* ---------- Configuración y enlace ---------- */
.ag-settings { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.switch-row > span:last-child { display: grid; }
.switch-row small { color: var(--muted); font-size: .8rem; }
.switch-row.on { background: #f3fbf6; border-color: #c6ecd6; }
.link-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .link-layout { grid-template-columns: minmax(0, 1fr); } .link-preview { display: none; } }
.link-col { display: grid; gap: 16px; }
.link-hero { display: grid; justify-items: start; gap: 10px; padding: 24px; border-radius: 22px; color: #fff; background: var(--side); position: relative; overflow: hidden; }
.link-hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, transparent), transparent 66%); }
.link-hero > * { position: relative; }
.link-hero .eyebrow { color: #c9bfff; margin: 0 !important; }
.link-hero p { color: #c3c6dc; }
.link-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; }
.link-url { font-size: 1.3rem; word-break: break-all; }
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.link-actions .btn:not(.btn-primary) { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .2); }
.link-actions .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
@media (max-width: 560px) { .link-actions .btn { flex: 1 1 100%; } }
.soon-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .soon-actions { grid-template-columns: 1fr; } }
.soon-act { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); }
.soon-act > span:nth-child(2) { flex: 1; display: grid; }
.soon-act strong { color: var(--ink-2); font-size: .9rem; }
.soon-act small { font-size: .76rem; }
.link-preview .phone { width: 100%; height: 640px; flex: none; }

/* ---------- Admin: agendas y accesos ---------- */
.agenda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.agenda-card { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.agenda-card .menu-card-actions { padding: 6px 0 0; }
.agc-main { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-wrap: wrap; }
.agc-text { flex: 1; display: grid; min-width: 0; }
.agc-text strong { font-size: 1.05rem; }
.agc-text small { color: var(--muted); }
.agenda-card-new { place-content: center; justify-items: center; min-height: 170px; border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; cursor: pointer; color: var(--ink-2); }
.agenda-card-new:hover { border-color: var(--brand); background: #faf8ff; }
.mc-project-agenda { grid-template-columns: 52px minmax(0, 1fr) auto; }
@media (max-width: 760px) { .mc-project-agenda { grid-template-columns: 52px minmax(0, 1fr); } }
.pu-list { display: grid; gap: 8px; }
.pu-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.pu-info { flex: 1; display: grid; min-width: 140px; }
.pu-info small { color: var(--muted); font-size: .78rem; }
.cred-box { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--brand-soft); }
.cred-box pre { margin: 0; padding: 12px; border-radius: 10px; background: #fff; font: 600 .9rem/1.6 ui-monospace, monospace; white-space: pre-wrap; word-break: break-all; }
.pass-row { display: flex; gap: 8px; }
.pass-row input { font-family: ui-monospace, monospace; }
.danger-card { border-color: #f7c8d0; }
.btn-danger { color: var(--err); border-color: #f2b8c2; }
.btn-danger:hover:not(:disabled) { background: var(--err-soft); border-color: var(--err); }

/* ---------- Portal ---------- */
.sb-client { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--side-2); }
.sb-client small { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6f7494; }
.sb-client strong { color: #fff; font-size: .95rem; }
.admin-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; background: #fff4dc; color: #7a4a00; font-size: .82rem; font-weight: 700; }
.admin-strip .ico { width: 16px; height: 16px; }
.m-logout { color: #c3c6dc; }
.portal .tabbar { display: none !important; }
.center { text-align: center; }
.portal .page { padding-bottom: 60px; }
@media (max-width: 900px) { .portal .save-bar { bottom: 12px; } .portal .toast { bottom: 16px; } }

/* =====================================================================
   PÁGINA PÚBLICA DE RESERVAS
   ===================================================================== */
.bk-body { background: #f5f6fa; }
.bk { max-width: 620px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 14px; }
.bk-head { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.bk-head::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--brand); }
.bk-head h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.bk-head p { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.bk-logo { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; overflow: hidden; background: var(--brand); color: var(--brand-ink, #fff); font-weight: 800; font-size: 1.5rem; }
.bk-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.bk-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .8rem; color: var(--ink-2); }
.bk-info > * { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.bk-info .ico { width: 14px; height: 14px; color: var(--brand); }
.bk-step { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.bk-step-head { display: flex; align-items: center; gap: 10px; }
.bk-step-head h2 { font-size: 1.02rem; font-weight: 800; }
.bk-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink, #fff); font-weight: 800; font-size: .84rem; }
.bk-n .ico { width: 15px; height: 15px; stroke-width: 3; }
.bk-step.done .bk-n { background: var(--ok); color: #fff; }
.bk-sum { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.bk-services { display: grid; gap: 8px; }
.bk-svc { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; text-align: left; cursor: pointer; color: inherit; transition: border-color .15s, background .15s; }
.bk-svc img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.bk-svc-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.bk-svc-text small { color: var(--muted); font-size: .8rem; }
.bk-svc-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: .78rem; font-weight: 650; }
.bk-svc-meta .ico { width: 14px; height: 14px; }
.bk-price { font-weight: 800; white-space: nowrap; }
.bk-svc.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.bk-dates-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.bk-dates-nav { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; color: inherit; cursor: pointer; padding: 0; }
.bk-dates-nav:hover { border-color: var(--brand); }
.bk-dates-nav svg { width: 18px; height: 18px; }
.bk-dates { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.bk-date { flex: 0 0 64px; display: grid; justify-items: center; gap: 1px; padding: 8px 0; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; color: inherit; scroll-snap-align: start; }
.bk-date small { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.bk-date strong { font-size: 1.2rem; font-weight: 800; }
.bk-date:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.bk-date.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink, #fff); }
.bk-date.on small { color: inherit; opacity: .85; }
.bk-slot-groups { display: grid; gap: 12px; }
.bk-slot-group > small { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bk-slot { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; font: inherit; font-weight: 750; font-size: .9rem; cursor: pointer; color: inherit; }
.bk-slot:hover { border-color: var(--brand); }
.bk-slot.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink, #fff); }
.bk-loading { display: flex; align-items: center; gap: 8px; }
.bk-none { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: .9rem; }
.bk-form { display: grid; gap: 12px; }
.bk-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--err-soft); color: #a3192f; font-weight: 650; font-size: .88rem; }
.bk-error .ico { width: 18px; height: 18px; }
.bk-review { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-weight: 700; font-size: .88rem; }
.bk-review .ico { color: var(--brand); width: 18px; height: 18px; }
.bk .btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink, #fff); }
.bk .btn-primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--brand); }
.bk-foot { text-align: center; font-size: .76rem; color: #a3a7bd; padding-top: 6px; }
.bk-msg { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 60px 20px; }
.bk-msg h1 { font-size: 1.4rem; }
.bk-msg p { color: var(--muted); max-width: 380px; }
.bk-msg.small { padding: 24px; background: #fff; border-radius: 20px; border: 1px solid var(--line); }
.bk-msg-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.bk-done { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 30px 18px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.bk-done h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.bk-done-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; animation: pop .3s ease-out; box-shadow: 0 0 0 10px var(--ok-soft); }
.bk-done-ico .ico { width: 36px; height: 36px; stroke-width: 3; }
.bk-ticket { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 8px 0; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--line-2); text-align: left; }
.bk-ticket dt { color: var(--muted); font-size: .84rem; font-weight: 650; }
.bk-ticket dd { margin: 0; font-weight: 750; }
.bk-done-actions { width: 100%; display: grid; gap: 8px; }

/* =====================================================================
   AVISOS DE CITAS NUEVAS
   ===================================================================== */
.ag-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .7rem; font-weight: 800; margin-left: 2px; animation: pop .25s ease-out; }
.ag-badge[hidden] { display: none; }
.appt.is-new { background: linear-gradient(90deg, #f4f0ff, #fff 60%); border-color: #d9cfff; }
.new-chip { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: #e5484d; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; }
.fresh-card { border-color: #d9cfff; box-shadow: 0 0 0 4px rgb(108 77 255 / .08), var(--shadow-sm); }
.fresh-card h2 { display: flex; align-items: center; gap: 8px; }
.fresh-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgb(229 72 77 / .18); animation: pulse 1.4s ease-in-out infinite; }
.notice-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, #f4f0ff, #fff 70%); border-color: #e3dcff; }
.notice-ico { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.notice-text { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.notice-text p { color: var(--ink-2); font-size: .86rem; }
.notice-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* =====================================================================
   QR Y NFC
   ===================================================================== */
.share-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 640px) { .share-grid { grid-template-columns: 1fr; justify-items: center; } .share-actions { width: 100%; } }
.qr-preview { width: 220px; aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.qr-preview img { width: 100%; height: 100%; object-fit: contain; }
.share-actions { display: grid; gap: 8px; align-content: start; }
.share-actions .label { margin-top: 4px; }
.share-actions .btn { justify-content: flex-start; }
.nfc-help { align-items: flex-start; }
.nfc-dialog { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 8px 22px 22px; }
.nfc-anim { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.nfc-anim .ico { width: 44px; height: 44px; }
.nfc-dialog.ok .nfc-anim { background: var(--ok-soft); color: var(--ok); animation: none; }
.nfc-dialog.err .nfc-anim { background: var(--err-soft); color: var(--err); animation: none; }
.nfc-status { font-weight: 700; }
.nfc-dialog .form-actions { justify-content: center; width: 100%; }
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; }
  body.printing #print-area img { width: 100%; max-width: 12cm; display: block; margin: 0 auto; }
}

/* Eliminar cliente */
.blocked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.blocked-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: .86rem; }
.blocked-list .ico { width: 16px; height: 16px; color: var(--muted); }

/* ---------- Borrar con contraseña ---------- */
.danger-card .btn-danger { justify-self: start; }
.del-form { display: grid; gap: 14px; }
.del-warn { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--err-soft); color: var(--err); }
.del-warn .ico { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.del-warn strong { display: block; color: var(--ink, #0f1222); }
.del-warn p { margin: 2px 0 0; font-size: .88rem; }
.del-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--err-soft); color: var(--err); font-weight: 600; font-size: .9rem; }
.btn-danger-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { filter: brightness(.92); }
.btn-danger-solid:disabled { opacity: .6; }

/* =====================================================================
   DISEÑO DE LA PÁGINA DE RESERVAS (Agenda → Diseño)
   ===================================================================== */
.dz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.dz-col { display: grid; gap: 16px; min-width: 0; }
.dz-preview { position: sticky; top: 16px; display: grid; gap: 10px; justify-items: center; }
.dz-preview .phone { width: 100%; height: min(720px, calc(100vh - 90px)); flex: none; }
@media (max-width: 1000px) {
  .dz-layout { grid-template-columns: minmax(0, 1fr); }
  .dz-preview { position: static; order: -1; }
  .dz-preview .phone { width: min(100%, 380px); height: 560px; }
}
.bk-variants { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.dz-photos { display: grid; gap: 12px; }
.dz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.dz-shot { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.dz-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dz-shot-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.dz-mini-btn { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgb(15 18 34 / .72); color: #fff; cursor: pointer; }
.dz-mini-btn .ico { width: 15px; height: 15px; }
.dz-add { aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 4px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 650; cursor: pointer; }
.dz-add:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.dz-add:disabled { opacity: .5; cursor: not-allowed; }

/* Miniatura de cada diseño (colores reales de la plantilla) */
.bmini { display: grid; gap: 6px; height: 150px; padding: 8px; border-radius: 10px; overflow: hidden; background: var(--m-bg); text-align: left; }
.bmini .m-hero { position: relative; display: grid; align-items: end; height: 62px; padding: 6px 8px; border-radius: var(--m-r); overflow: hidden; background: var(--m-sf); border: 1px solid var(--m-ln); }
.bmini .m-art { position: absolute; inset: 0; }
.bmini .m-art svg { width: 100%; height: 100%; display: block; }
.bmini .m-name { position: relative; font: 700 .9rem/1.1 var(--m-hf), system-ui, sans-serif; color: var(--m-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-cover .m-hero::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, var(--m-sf)); }
.bm-cover .m-name { z-index: 1; }
.bm-split .m-hero { grid-template-columns: 1fr 44px; align-items: center; gap: 6px; }
.bm-split .m-art { position: relative; inset: auto; grid-column: 2; grid-row: 1; height: 46px; border-radius: 999px 999px 6px 6px; overflow: hidden; }
.bm-split .m-name { grid-column: 1; grid-row: 1; white-space: normal; }
.bm-band .m-hero { background: var(--m-br); border-color: transparent; }
.bm-band .m-art { opacity: .2; --art-bg: transparent; --art-ink: var(--m-bi); --art-hi: var(--m-bi); }
.bm-band .m-name { color: var(--m-bi); font-size: 1.05rem; text-transform: uppercase; }
.bm-clasico .m-hero { border-top: 4px solid var(--m-br); }
.bmini .m-svc { display: grid; grid-template-columns: 16px 1fr 22px; align-items: center; gap: 6px; height: 20px; padding: 0 6px; border-radius: min(var(--m-r), 8px); background: var(--m-sf); border: 1px solid var(--m-ln); }
.bmini .m-svc i { width: 12px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--m-br) 30%, var(--m-sf)); }
.bmini .m-svc b { height: 5px; border-radius: 3px; background: var(--m-mu); opacity: .55; }
.bmini .m-svc em { height: 5px; border-radius: 3px; background: var(--m-br); }
.bmini .m-slots { display: flex; gap: 5px; }
.bmini .m-slots i { flex: 1; height: 14px; border-radius: min(var(--m-r), 7px); background: var(--m-sf); border: 1px solid var(--m-ln); }
.bmini .m-slots i.on { background: var(--m-br); border-color: var(--m-br); }

/* Página de reservas: botones de Ubicación, Facebook e Instagram */
.bk-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bk-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: .84rem; font-weight: 700; text-decoration: none; }
.bk-link:hover { border-color: var(--brand); }
.bk-link .ico { width: 18px; height: 18px; color: var(--brand-text, var(--brand)); }
.bk-link.icon-only { width: 38px; padding: 0; }

/* ---------- Tatuadores (agendas de tatuajes) ---------- */
.staff-photo { border-radius: 50%; font-weight: 800; font-size: 1.4rem; }
.staff-meta { flex-wrap: wrap; }
.staff-meta a.svc-chip { text-decoration: none; }
.svc-chip.is-on { background: var(--ok-soft); border-color: transparent; color: #0b7a43; }
.staff-card .svc-tools { flex-wrap: wrap; gap: 6px; }
.staff-limit .row { gap: 8px; }
.staff-limit-in { width: 90px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 6px; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: .88rem; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.btn-danger-text { color: var(--err); margin-right: auto; }
.staff-hours { display: grid; gap: 14px; }
.appt-staff { color: var(--ink-2); font-weight: 650; }
.cal-staff { width: auto; min-width: 180px; }

/* Página de reservas: elegir tatuador */
.bk-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.bk-st { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; }
.bk-st.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.bk-st-pick { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; border-radius: 10px; }
.bk-st-photo { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink, #fff); font-weight: 800; font-size: 1.3rem; }
.bk-st-text { display: grid; gap: 1px; min-width: 0; }
.bk-st-text small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.bk-st-wa { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line-2); color: var(--ink); font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.bk-st-wa .ico { width: 16px; height: 16px; color: #1fa855; }
/* Agenda personal de un tatuador (diálogo con el calendario) */
.dialog.wide:has(.staff-agenda) { width: min(1100px, calc(100% - 24px)); }
.staff-agenda { display: grid; gap: 12px; min-width: 0; }
/* Aviso de privacidad corto y enlaces legales de la página de reservas */
.bk-legal { margin: 8px 0 0; text-align: center; font-size: .78rem; color: #8b8fa3; }
.bk-foot .foot-legal { display: block; margin-top: 4px; }
.bk-legal a, .bk-foot .foot-legal a { color: inherit; text-decoration: underline; }
