/* =====================================================================
   NFKings · Rediseño del panel (admin, portal e inicio de sesión)
   Solo apariencia: se carga después de admin.css / agenda.css y los sobrescribe.
   Criterio: fondo neutro, bordes de 1px, casi sin sombras, color de marca
   solo en acciones y estados activos, títulos en tipo normal (sin mayúsculas).
   ===================================================================== */
:root {
  /* Paleta 60/30/10: blanco polar (fondo y tarjetas) · azul glaciar (menú, íconos, pestañas) · rojo racing (acción principal) */
  --bg: #f3f7fa; --surface: #fff; --surface-2: #f7fafc; --ink: #10243a; --ink-2: #34506b; --muted: #637a90;
  --line: #dde8f0; --line-2: #c9dae6;
  --brand: #d1222e; --brand-deep: #a8141f; --brand-soft: #fdeaec;
  --glacier: #4682ad; --glacier-soft: #e3eff7; --glacier-edge: #356a91;
  --glacier-grad: linear-gradient(180deg, #8fbddb 0%, #5c97c0 60%, #4682ad 100%);
  --racing-grad: linear-gradient(180deg, #e8424c 0%, #d1222e 55%, #b51a25 100%);
  --grad: var(--glacier-grad);
  --ok: #16884d; --ok-soft: #eaf6ef; --warn: #a66300; --warn-soft: #fdf5e6; --err: #c8323f; --err-soft: #fcecee;
  --side: #d7e8f3; --side-2: #c9e0ef; --side-ink: #234360; --side-hi: var(--ink);
  --radius: 12px; --r-sm: 8px;
  --shadow-sm: 0 1px 2px rgb(23 24 28 / .04);
  --shadow: 0 4px 14px -6px rgb(23 24 28 / .12);
  --shadow-lg: 0 20px 50px -20px rgb(23 24 28 / .28);
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body { font-size: 14.5px; letter-spacing: -.003em; }
h1, h2, h3 { letter-spacing: -.015em; }
::selection { background: var(--brand-soft); }

/* ---------- Botones y controles ---------- */
.btn { min-height: 38px; border-radius: 8px; font-weight: 550; font-size: .9rem; box-shadow: none; }
.btn:hover:not(:disabled) { border-color: #c4c7cf; box-shadow: none; background: var(--surface-2); }
.btn-primary, .btn-primary:hover:not(:disabled) { box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: var(--brand-deep); }
.btn-ghost:hover:not(:disabled) { background: rgb(23 24 28 / .05); }
.btn-sm { min-height: 32px; border-radius: 7px; }
.btn-lg { min-height: 44px; border-radius: 9px; font-size: .95rem; }
.icon-btn { border-radius: 8px; }
.link { font-weight: 550; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], input[type=date], input[type=time], input[type=tel], textarea, select {
  border-radius: 8px; min-height: 40px; padding: 8px 12px; font-size: .92rem; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.field > label, .label { font-weight: 550; font-size: .85rem; color: var(--ink-2); }
.slug-row .prefix, .money-row .prefix { min-height: 40px; border-radius: 8px 0 0 8px; }
.slug-row input, .money-row input { border-radius: 0 8px 8px 0; }
.form-sub, .set-title, .ct-head, .st-table th { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .8rem; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); }

/* ---------- Etiquetas ---------- */
.pill { font-weight: 550; font-size: .75rem; padding: 2px 9px 2px 7px; }
.pill-live .pill-dot { box-shadow: none; }
.badge { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .72rem; border-radius: 5px; padding: 2px 7px; }
.badge.plan-pro { background: var(--brand-soft); color: var(--brand-deep); }
.badge.plan-plus { background: #eaf0fc; color: #2a4fa8; }
.soon-tag { background: none; padding: 0; color: #9a9da8; font-weight: 500; font-size: .74rem; letter-spacing: 0; text-transform: none; }
.soon-tag.big { padding: 3px 9px; border-radius: 6px; background: var(--side-2); color: var(--muted); }
.count-chip { font-weight: 650; }
.eyebrow { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .85rem; color: var(--muted); }
.eyebrow::first-letter { text-transform: uppercase; }
.demo-note { border-radius: 8px; border: 1px solid #f1dfb8; }

/* ---------- Tarjetas: borde fino, sin elevación ---------- */
.card, .ecard, .acc, .module-card, .step-card, .client-card, .menu-card, .agenda-card, .brand-card, .callout, .kpi, .akpi, .set-card, .bk-step, .client-hero, .soon-hero {
  border-radius: var(--radius); box-shadow: none; }
.card { padding: 18px 20px; }
.card-head h2, .ecard-head h3 { font-size: .98rem; font-weight: 600; }
.section-title h2 { font-weight: 650; }
.client-card:hover, .menu-card:hover, .recent:hover, .kpi:hover, .quick-btn:hover, .np-opt:hover:not(:disabled) { transform: none; box-shadow: none; border-color: #c9ccd4; }
.acc[open] { box-shadow: none; border-color: var(--line-2); }
.acc > summary { border-radius: var(--radius); padding: 13px 16px; }
.acc[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.callout-soft { background: var(--surface-2); border: 1px solid var(--line); }
.empty { border-radius: var(--radius); border-width: 1px; }
.dialog { border-radius: 14px; }
.dialog::backdrop { background: rgb(23 24 28 / .4); backdrop-filter: none; }
.toast { border-radius: 10px; font-weight: 500; }

/* Cuadros de icono: neutros en vez de degradados de color */
.quick-ico, .new-ico, .np-ico, .mc-ico, .mod-ico, .step-num, .soon-ico, .empty-ico, .acc-ico, .set-ico, .tl-ico, .link-ico {
  background: var(--side-2); color: var(--ink-2); border: 0; box-shadow: none; }
.module-card.is-ready .mc-ico, .mod-tile.is-ready .mod-ico { background: var(--brand-soft); color: var(--brand); }
.np-opt.is-soon .np-ico { background: var(--side-2); color: #a4a7b1; }
.empty-ico { border-radius: 12px; width: 52px; height: 52px; }
.acc-ico { width: 34px; height: 34px; border-radius: 8px; }
.step-num { border-radius: 8px; font-weight: 650; background: var(--glacier); color: #fff; }
.plan-card-pro .plan-card-head strong { background: none; color: var(--brand-deep); }
.plan-fill-pro { background: var(--brand) !important; }
.plan-card, .choice, .np-opt { border-radius: 10px; border-width: 1px; }
.plan-card:has(input:checked), .np-opt:hover:not(:disabled) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.choice:has(input:checked), .tree li.is-ready, .menu-card-new:hover, .agenda-card-new:hover { background: var(--brand-soft); }
.mod-tile.is-ready { background: var(--surface); }

/* ---------- Inicio de sesión ---------- */
.login-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--surface); }
.login-art { background: var(--bg); color: var(--ink); border-right: 1px solid var(--line); align-items: center; padding: 56px 64px; }
.login-art::before, .login-art::after { display: none; }
.login-art-inner { gap: 20px; max-width: 420px; }
.login-kicker { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 550; color: var(--brand); }
.login-art h2 { font-size: 1.85rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.login-art ul { color: var(--ink-2); gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 20px; }
.login-art li .ico { color: var(--brand); width: 17px; height: 17px; }
.login { width: min(380px, 100%); gap: 18px; }
.login h1 { font-size: 1.45rem; font-weight: 650; }
.login-brand { margin-bottom: 18px; }
.login-brand strong { font-size: 1.05rem; font-weight: 650; }
.login .btn-primary { min-height: 42px; margin-top: 4px; }

/* ---------- Barra lateral clara ---------- */
.sidebar { background: var(--side); color: var(--side-ink); border-right: 1px solid var(--line); gap: 14px; padding: 16px 12px; scrollbar-color: var(--line-2) transparent; }
.sb-brand { color: var(--ink); padding: 4px 8px 8px; }
.sb-brand-text strong { font-size: 1rem; font-weight: 650; }
.sb-brand-text small { color: var(--muted); }
.sb-label { margin: 16px 10px 4px; font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: #5f7f9c; }
.nav-link { gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--side-ink); font-weight: 500; font-size: .9rem; }
.nav-link .ico { width: 18px; height: 18px; color: #4f7391; }
.nav-link:hover { background: var(--side-2); color: var(--ink); }
.nav-link.on { background: #ececf0; color: var(--ink); font-weight: 600; }
.nav-link.on::before { display: none; }
.nav-link.on .ico { color: var(--ink); }
.nav-count { color: #5f7f9c; font-weight: 500; }
.nav-link[data-nav^="modulo-"] { color: #5f7f9c; }
.nav-link[data-nav^="modulo-"]:hover, .nav-link[data-nav^="modulo-"].on { color: var(--ink); }
.sb-foot { border-top: 1px solid var(--line); }
.sb-user-av { background: var(--glacier); font-weight: 600; width: 28px; height: 28px; font-size: .78rem; }
.sb-user-mail { color: var(--ink-2); }
.sb-logout { color: #4f7391; border-radius: 7px; }
.sb-logout:hover { background: var(--side-2); color: var(--ink); }
.sb-client { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.sb-client small { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .74rem; color: var(--muted); }
.sb-client strong { color: var(--ink); font-weight: 600; }
body.in-editor .nav-link { padding: 10px; }

/* Celular */
@media (max-width: 900px) {
  .m-top { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
  .m-brand { color: var(--ink); }
  .m-logout { color: var(--muted); }
  .tabbar { background: rgb(255 255 255 / .97); grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-inline: 4px; }
  .tab-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .66rem; }
  .tab-link { font-weight: 550; }
  .tab-link.on { color: var(--ink); }
  .tab-link.on .ico { background: var(--side-2); color: var(--ink); }
  .ed-nav-link.on { background: var(--glacier); }
  .ed-nav-link.on .ico { color: #fff; }
}
.sheet-mod .ico { color: var(--ink-2); }
.sheet-mod small { color: var(--muted); font-weight: 500; text-transform: none; }

/* ---------- Páginas ---------- */
.page { padding: 28px 36px 90px; gap: 20px; max-width: 1180px; }
.page-title h1 { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; }
.page-title p { font-size: .92rem; }
.chip { min-height: 32px; border-radius: 7px; font-weight: 500; font-size: .84rem; }
.chip.on { background: var(--glacier); border-color: var(--glacier); }
.chip-n { font-weight: 500; }
.seg { border-radius: 8px; background: var(--side-2); }
.seg-btn { border-radius: 6px; }
.search .search-input { min-height: 36px; }
.sort-select { min-height: 32px; }
.avatar { font-weight: 650; }
.av-xl { box-shadow: none; border-radius: 18px; }
.meter { height: 5px; background: var(--side-2); }

/* Inicio: encabezado sencillo en vez del bloque oscuro */
.hero-dash { padding: 4px 0 0; border-radius: 0; background: none; color: var(--ink); box-shadow: none; align-items: center; }
.hero-dash::before, .hero-dash::after { display: none; }
.hero-dash .eyebrow { color: var(--muted); margin-bottom: 2px !important; }
.hero-dash h1 { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; }
.hero-sub { color: var(--muted); margin-top: 2px !important; }
.hero-dash .btn-primary, .hero-dash .btn-primary:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: none; }
.hero-dash .btn-primary:hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
.hero-dash .btn-primary .ico { color: #fff; }
.hero-dash .btn-lg { min-height: 38px; font-size: .9rem; padding: 0 15px; }

/* Indicadores en una sola franja con divisiones */
.kpis { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kpi { border: 0; border-radius: 0; padding: 16px 20px; background: transparent; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi:hover { background: var(--surface-2); }
.kpi-ico { width: auto; height: auto; background: none; color: #a0a3ad; grid-row: 1; }
.kpi-ico .ico { width: 17px; height: 17px; }
.kpi-label { grid-row: 1; grid-column: 1; order: -1; font-size: .84rem; font-weight: 500; color: var(--muted); }
.kpi-value { grid-row: 2; grid-column: 1 / -1; font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.kpi-foot { margin-top: 6px; }
@media (max-width: 1000px) { .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }

.dash-grid { gap: 16px; }
.dash-col { gap: 16px; }
.recent { border-radius: 10px; }
.quick { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.quick-btn { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 11px 14px; border: 0; border-radius: 0; background: var(--surface); }
.quick-btn + .quick-btn { border-top: 1px solid var(--line); }
.quick-btn:hover { background: var(--surface-2); }
.quick-ico { grid-row: 1 / 3; margin: 0; width: 30px; height: 30px; border-radius: 7px; }
.quick-btn strong { font-weight: 550; }
.all-good { border-radius: 8px; font-weight: 500; }
.tl-ico { width: 30px; height: 30px; border-radius: 7px; }
.mod-tile { border-radius: 10px; }

/* Clientes y menús */
.client-card, .menu-card { border-radius: var(--radius); }
.cc-main h3, .mcb-title h3 { font-weight: 600; font-size: 1rem; }
.cc-foot { background: var(--surface); }
.mod-chip { border-radius: 6px; background: var(--side-2); }
.mod-chip.is-on { font-weight: 600; }
.menu-card-new, .agenda-card-new { border-width: 1px; }
.mc-project { border-radius: 10px; }
.client-hero { background-image: none; padding: 22px; }
.ch-title h1 { font-size: 1.55rem; font-weight: 650; }
.info-chip { border-radius: 6px; }
.soon-hero { background-image: none; }
.soon-hero h1 { font-weight: 650; font-size: 1.7rem; }
.tree-root { border-radius: 8px; font-weight: 600; }
.tree li { border-radius: 8px; }
.tree li small { color: var(--muted); text-transform: none; font-weight: 500; }
.set-ico { border-radius: 8px; width: 36px; height: 36px; }

/* ---------- Editor de menú ---------- */
.ed-top { background: rgb(255 255 255 / .95); }
.ed-back { border-radius: 8px; width: 34px; height: 34px; }
.ed-id h1 { font-size: 1.05rem; font-weight: 650; }
.ed-url { font-weight: 500; }
.ed-nav { padding: 20px 12px; }
.ed-nav-link { padding: 8px 10px; border-radius: 7px; font-weight: 500; font-size: .9rem; }
.ed-nav-link:hover { background: var(--side-2); }
.ed-nav-link.on { background: #ececf0; box-shadow: none; font-weight: 600; }
.ed-nav-link.on .ico { color: var(--ink); }
.ed-nav-meta { font-weight: 550; background: var(--side-2); }
.ed-nav-link.on .ed-nav-meta { background: #fff; color: var(--ink-2); }
.sec-ico { display: none; }
.sec-head h2 { font-size: 1.3rem; font-weight: 650; }
.ed-preview { background: var(--bg); }
/* 390 px por dentro (408 - 2 × 9 de marco): el ancho de un celular común, para acomodar igual que en uno real */
.phone { width: 408px; border-width: 9px; border-color: #1c1d22; box-shadow: 0 20px 40px -24px rgb(23 24 28 / .45); }
.phone-notch { background: #1c1d22; }
.pv-mode { font-weight: 550; }
.preview-fab { background: var(--glacier); font-weight: 550; }
.preview-fab .ico { color: #fff; }
.save-bar { border-radius: 10px; box-shadow: 0 8px 24px -14px rgb(23 24 28 / .3); }
.ed.is-dirty .save-bar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent), 0 8px 24px -14px rgb(23 24 28 / .3); }
.save-state { font-weight: 600; }
.brand-card { border-radius: var(--radius); }

/* ---------- Agenda y portal ---------- */
.ag-title h1 { font-weight: 650; font-size: 1.45rem; }
.ag-tabs { border-radius: 9px; background: var(--side-2); }
.ag-tab { border-radius: 7px; font-weight: 550; min-height: 36px; }
.ag-tab.on .ico { color: var(--ink); }
.akpis { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.akpi { border: 0; border-radius: 0; background: transparent; }
.akpi + .akpi { border-left: 1px solid var(--line); }
.akpi-ico { background: none; color: #a0a3ad; width: 30px; }
.akpi strong { font-weight: 600; }
.akpi small { font-weight: 500; }
@media (max-width: 900px) { .akpi + .akpi { border-left: 0; } .akpis .akpi { border-top: 1px solid var(--line); } .akpis .akpi:first-child { border-top: 0; } .akpis .akpi:nth-child(n+3) { border-left: 1px solid var(--line); } }
.ad-cal small, .tg-head .tg-day small, .month-dow, .bk-slot-group > small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.setup, .notice-card, .appt.is-new { background: var(--surface); }
.notice-card, .setup { border-color: var(--line); border-left: 3px solid var(--brand); }
.appt.is-new { border-left: 3px solid var(--brand); }
.new-chip { text-transform: none; letter-spacing: 0; font-weight: 600; }
.link-hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.link-hero::before { display: none; }
.link-hero .eyebrow { color: var(--muted); }
.link-hero p { color: var(--muted); }
.link-ico { background: var(--brand-soft); color: var(--brand); border-radius: 10px; }
.link-actions .btn:not(.btn-primary) { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.link-actions .btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.cred-box { border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.pu-row { border-radius: 9px; }
.admin-strip { font-weight: 550; }
.switch-row { border-radius: 10px; }
/* Celular: la pestaña activa del editor va oscura (debe ir después de la regla de escritorio) */
@media (max-width: 900px) { .ed-nav-link.on { background: var(--glacier); color: #fff; } .ed-nav-link.on .ico { color: #fff; } }
.badge.plan-especial { background: #fdf3e6; color: #8f4700; }
.plan-card-especial .plan-card-head strong { color: #8f4700; }
.url-hero-orders { margin-top: 8px; border-style: dashed; }
.ed-body { grid-template-columns: 216px minmax(0, 1fr) 440px; }
.pv-head { max-width: 408px; }
@media (max-width: 1320px) { .ed-body { grid-template-columns: 200px minmax(0, 1fr); } .phone { width: min(408px, 100%); } }
@media (max-width: 900px) { .ed-body { grid-template-columns: minmax(0, 1fr); } .phone { width: 100%; border-width: 8px; } }

/* Contornos decorativos (Apariencia, solo administrador) */
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.frame-opt { display: grid; gap: 6px; justify-items: center; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: #11161d; color: #e9eef5; cursor: pointer; }
.frame-opt.on { outline: 2px solid var(--brand, #6c4dff); outline-offset: 1px; }
.frame-demo { display: block; width: 80px; height: 34px; border: 6px solid transparent; box-sizing: border-box; }
.frame-opt .frame-demo:not(.frame-drawn) { border: 2px dashed #5b6472; border-radius: 6px; }
.frame-demo.frame-drawn { position: relative; border: 0; overflow: visible; }

/* Personajes animados (Apariencia, solo administrador) */
.critter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.critter-opt { display: grid; justify-items: center; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; }
.critter-opt.on { outline: 2px solid var(--brand, #6c4dff); outline-offset: 1px; }
.critter-opt input { justify-self: start; }
/* Cabe siempre en su cuadro: los anchos (trineo) se achican sin deformarse. */
.critter-opt { min-width: 0; }
.critter-opt img { width: 100%; height: 96px; object-fit: contain; }

/* ---------- Relieve: botones e íconos con acción se ven como botones; títulos principales en 3D ---------- */
.btn {
  background: linear-gradient(180deg, #fff 0%, #eef0f5 100%); border: 1px solid #cfd2dc; font-weight: 650;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c4c7d3, 0 4px 10px -4px rgb(23 24 28 / .25);
}
.btn:hover:not(:disabled) { background: linear-gradient(180deg, #fff 0%, #e7e9f0 100%); border-color: #babecc; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #babecc, 0 6px 14px -6px rgb(23 24 28 / .3); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 3px rgb(23 24 28 / .2); }
.btn-primary, .hero-dash .btn-primary {
  background: var(--racing-grad); border-color: #9e1520; color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 3px 0 #85111b, 0 8px 18px -6px rgb(209 34 46 / .5); text-shadow: 0 1px 0 rgb(0 0 0 / .2);
}
.btn-primary:hover:not(:disabled), .hero-dash .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #d9333d 0%, #a8141f 100%); border-color: #85111b;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 3px 0 #85111b, 0 10px 22px -6px rgb(209 34 46 / .6);
}
.btn-primary:active:not(:disabled), .hero-dash .btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 2px 6px rgb(0 0 0 / .25); }
.btn-ghost { background: linear-gradient(180deg, #fff 0%, #f1f2f6 100%); border-color: #d8dae0; color: var(--ink); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #d0d2db; }
.btn-ghost:hover:not(:disabled) { background: linear-gradient(180deg, #fff 0%, #e8e9ef 100%); border-color: #c4c7cf; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c4c7cf; }
/* Botones de solo ícono (regresar, copiar, cerrar sesión…) */
.icon-btn, .ed-back, .sb-logout {
  background: linear-gradient(180deg, #fff 0%, #eef0f5 100%); border: 1px solid #d3d6df; color: var(--ink-2);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c9ccd7;
}
.icon-btn:hover:not(:disabled), .ed-back:hover, .sb-logout:hover { background: linear-gradient(180deg, #fff 0%, #e6e8ef 100%); color: var(--ink); }
.icon-btn:active:not(:disabled), .ed-back:active, .sb-logout:active { transform: translateY(2px); box-shadow: inset 0 1px 3px rgb(23 24 28 / .2); }
/* Cuadros de ícono de acciones, tarjetas y secciones: botón morado con relieve */
.quick-ico, .kpi-ico, .acc-ico, .new-ico, .np-ico, .mc-ico, .mod-ico, .link-ico, .set-ico,
.module-card.is-ready .mc-ico, .mod-tile.is-ready .mod-ico {
  background: var(--glacier-grad); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .18), 0 3px 0 var(--glacier-edge), 0 6px 12px -4px rgb(53 106 145 / .55);
}
.np-opt.is-soon .np-ico { background: var(--side-2); color: #a4a7b1; box-shadow: none; }
.kpi-ico { width: 36px; height: 36px; border-radius: 10px; }
.kpi-ico .ico { width: 18px; height: 18px; }
.quick-btn:active .quick-ico, .acc summary:active .acc-ico { transform: translateY(2px); box-shadow: inset 0 2px 4px rgb(0 0 0 / .25); }
/* Títulos principales con volumen */
.hero-dash h1, .page-head h1, .sec-head h2 {
  color: var(--ink); letter-spacing: -.02em;
  text-shadow: 0 1px 0 #fff, 0 2px 0 #b7d3e7, 0 3px 0 #9cc1dc, 0 6px 10px rgb(23 24 28 / .18);
}
/* Navegación (menú lateral y barra inferior del celular): cada ícono es un botón; el activo, morado */
.nav-link .ico, .tab-link .ico {
  box-sizing: content-box; width: 20px; height: 20px; padding: 6px; margin: 0; border-radius: 9px;
  background: linear-gradient(180deg, #fff 0%, #eef0f5 100%); border: 1px solid #d3d6df; color: var(--ink-2);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c9ccd7;
}
.nav-link.on .ico, .tab-link.on .ico {
  width: 20px; height: 20px; padding: 6px; margin: 0;
  background: var(--glacier-grad); border-color: var(--glacier-edge); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 3px 0 var(--glacier-edge), 0 6px 12px -4px rgb(53 106 145 / .55);
}
.nav-link:active .ico, .tab-link:active .ico { transform: translateY(2px); box-shadow: inset 0 1px 3px rgb(23 24 28 / .2); }
body.in-editor .sidebar .nav-link { padding: 6px; }
/* Tarjetas de menús, clientes, agendas y proyectos recientes: recuadro con borde en relieve */
.menu-card, .client-card, .agenda-card:not(.agenda-card-new), .recent {
  background: linear-gradient(180deg, #fff 0%, #f6f7fa 100%); border: 1px solid #d6d9e2; border-radius: 18px;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 3px rgb(255 255 255 / .7), 0 4px 0 #d2d5df, 0 14px 26px -14px rgb(23 24 28 / .35);
  transition: transform .15s, box-shadow .15s;
}
.menu-card:hover, .client-card:hover, .agenda-card:not(.agenda-card-new):hover, .recent:hover {
  transform: translateY(-3px); border-color: #c9ccd6;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 3px rgb(255 255 255 / .7), 0 7px 0 #c9ccd6, 0 20px 32px -14px rgb(53 106 145 / .35);
}
.menu-card:active, .client-card:active, .recent:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 #c9ccd6, 0 6px 12px -8px rgb(23 24 28 / .3); }

/* ---------- Aspecto de aplicación en todo el panel ---------- */
/* Fondo con un toque de color de marca en lugar de hoja plana */
body { background: radial-gradient(1200px 500px at 70% -10%, #e6e9f1 0%, transparent 60%), linear-gradient(180deg, #f3f3f8 0%, #f6f6f9 100%) fixed; }
/* Paneles y secciones: recuadros levantados */
.card, .ecard, .acc, .prod-group, .variant, .callout:not(.callout-soft), .kpis, .stat {
  background: linear-gradient(180deg, #fff 0%, #fafafc 100%); border: 1px solid #dcdfe7;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #dfe1e9, 0 12px 24px -16px rgb(23 24 28 / .3);
}
.callout.callout-warn { background: linear-gradient(180deg, #fffdf6, #fff8e8); border-color: #f1dca8; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #f0e0b8, 0 12px 24px -16px rgb(166 99 0 / .3); }
.callout.callout-err { background: linear-gradient(180deg, #fffafa, #fff1f3); border-color: #f2c8cf; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #f1d2d8, 0 12px 24px -16px rgb(200 50 63 / .3); }
.acc[open] > summary { border-bottom: 1px solid #e6e8ee; }
/* Filtros (Todos, Publicados, En borrador…) y botones pequeños de opción: teclas con relieve */
.chip, .chip-btn, .order-btn {
  background: linear-gradient(180deg, #fff 0%, #eef0f5 100%); border: 1px solid #d3d6df; color: var(--ink-2); font-weight: 600;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c9ccd7;
}
.chip:hover, .chip-btn:hover, .order-btn:hover:not(:disabled) { background: linear-gradient(180deg, #fff 0%, #e6e8ef 100%); border-color: #c4c7cf; color: var(--ink); }
.chip:active, .chip-btn:active, .order-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 3px rgb(23 24 28 / .2); }
.chip.on, .chip-btn.on {
  background: var(--glacier-grad); border-color: var(--glacier-edge); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 2px 0 var(--glacier-edge), 0 6px 12px -6px rgb(53 106 145 / .6);
}
.chip.on .chip-n { background: rgb(255 255 255 / .22); color: #fff; }
.chip-n { background: rgb(23 24 28 / .07); }
/* Pestañas y selectores de vista: charola hundida con la opción elegida levantada */
.seg, .subtabs, .ag-tabs { background: var(--glacier-soft); box-shadow: inset 0 2px 4px rgb(16 36 58 / .12), inset 0 0 0 1px #cfe0ec; }
.seg-btn.on, .subtab.on, .ag-tab.on {
  background: linear-gradient(180deg, #fff 0%, #f1f2f6 100%); color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c9ccd7, 0 4px 8px -4px rgb(23 24 28 / .3);
}
.seg-btn.on .ico, .subtab.on .ico, .ag-tab.on .ico { color: var(--glacier); }
/* Campos de texto y listas: hundidos, como en una app */
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], input[type=date], input[type=time], input[type=tel], textarea, select {
  background: linear-gradient(180deg, #f7f8fb 0%, #fff 60%); border: 1px solid #d3d6df;
  box-shadow: inset 0 2px 3px rgb(23 24 28 / .08);
}
input:focus, textarea:focus, select:focus { border-color: var(--glacier); box-shadow: inset 0 2px 3px rgb(23 24 28 / .06), 0 0 0 3px color-mix(in srgb, var(--glacier) 18%, transparent); }
input[readonly] { background: #f1f2f6; }
select { background-color: #fff; }
/* Interruptores: carril hundido y botón levantado */
.vis-track, .switch-track { box-shadow: inset 0 2px 3px rgb(23 24 28 / .25); }
.vis-track::after, .switch-track::after { background: linear-gradient(180deg, #fff, #eceef3); box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgb(0 0 0 / .3); }
/* Etiquetas de estado y plan con un poco de volumen */
.pill, .badge { box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 1px 0 rgb(23 24 28 / .08); }
/* Barra de guardar flotante */
.save-bar { background: linear-gradient(180deg, #fff, #f8f8fb); border: 1px solid #d9dce4; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #dcdfe7, 0 16px 30px -14px rgb(23 24 28 / .35); }
.search .search-input { background: linear-gradient(180deg, #f7f8fb 0%, #fff 60%); }
/* Menú lateral como panel de app */
.sidebar { background: linear-gradient(180deg, #e2eff7 0%, #bcd7ea 100%); box-shadow: inset -1px 0 0 #b3cfe3, 6px 0 20px -14px rgb(23 24 28 / .3); }
.nav-link.on { background: linear-gradient(180deg, #fff, #eef0f5); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #cfd3de, 0 6px 12px -8px rgb(53 106 145 / .45); color: var(--ink); }
/* Pestañas del editor (Información, Apariencia, Productos…): botones con texto que contrasta */
.ed-nav-link { color: var(--ink); font-weight: 600; background: linear-gradient(180deg, #fff 0%, #f1f2f6 100%); border: 1px solid #dcdfe7; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #d3d6df; margin-bottom: 4px; }
.ed-nav-link .ico { color: var(--ink-2); }
.ed-nav-link:hover { background: linear-gradient(180deg, #fff 0%, #e8e9ef 100%); }
.ed-nav-link.on, .ed-nav-link.on:hover {
  background: var(--glacier-grad); border-color: var(--glacier-edge); color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 3px 0 var(--glacier-edge), 0 6px 12px -6px rgb(53 106 145 / .55);
}
.ed-nav-link.on .ico { color: #fff; }
.ed-nav-link.on .ed-nav-meta { background: rgb(255 255 255 / .2); color: #fff; }

/* ===== Animaciones tipo app: entrada en cascada al abrir cada pantalla + tarjetas que se elevan ===== */
@keyframes nfk-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes nfk-pop { from { opacity: 0; transform: translateY(18px) scale(.96); filter: blur(4px); } }
@media (prefers-reduced-motion: no-preference) {
  /* backwards: al terminar suelta el transform y el hover de cada tarjeta sigue funcionando */
  .view > .page > *, .view > .editor-page > * { animation: nfk-in .5s cubic-bezier(.22,1,.36,1) backwards; }
  .view > * > :nth-child(2) { animation-delay: .06s; } .view > * > :nth-child(3) { animation-delay: .12s; }
  .view > * > :nth-child(4) { animation-delay: .18s; } .view > * > :nth-child(5) { animation-delay: .24s; }
  .view > * > :nth-child(n+6) { animation-delay: .3s; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat) { animation: nfk-pop .55s cubic-bezier(.22,1,.36,1) backwards; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat):nth-child(2) { animation-delay: .1s; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat):nth-child(3) { animation-delay: .16s; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat):nth-child(4) { animation-delay: .22s; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat):nth-child(5) { animation-delay: .28s; }
  :is(.kpi, .quick-btn, .menu-card, .client-card, .agenda-card, .recent, .acc, .stat):nth-child(n+6) { animation-delay: .34s; }
  :is(.kpi, .menu-card, .client-card, .agenda-card, .recent) { transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s; }
  :is(.kpi, .menu-card, .client-card, .agenda-card, .recent):hover { transform: translateY(-5px); }
  .nav-link, .tab-link, .ed-nav-link { transition: background-color .2s, color .2s, transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s; }
  .nav-link:hover, .ed-nav-link:hover { transform: translateX(3px); }
  dialog[open] { animation: nfk-pop .3s cubic-bezier(.22,1,.36,1); }
}

/* Horario del menú por día (Información → Horario) */
.week-hours { display: grid; gap: 6px; }
.wh-row { display: grid; grid-template-columns: 70px minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; min-height: 40px; }
.wh-day { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wh-row input[type=time] { min-width: 0; }
.wh-row input[type=time]:disabled { opacity: .45; }
.wh-closed { display: none; color: var(--muted, #6b7088); }
.wh-row.is-closed :is(input[type=time], .wh-a) { display: none; }
.wh-row.is-closed .wh-closed { display: block; grid-column: 2 / -1; }

/* ===== Presupuestos ===== */
.quote-list { display: grid; gap: 10px; }
.quote-row { display: grid; grid-template-columns: 80px 1fr auto auto; align-items: center; gap: 14px; padding: 14px 18px; color: inherit; text-decoration: none; }
.quote-folio { font-variant-numeric: tabular-nums; }
.quote-who { display: grid; gap: 2px; min-width: 0; } .quote-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-st { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: #eef0f6; color: #3a3f55; }
.quote-st.st-enviado { background: #e6efff; color: #1d4ed8; }
.quote-st.st-aceptado { background: var(--ok-soft, #e3f6ec); color: #0b7a43; }
.quote-st.st-rechazado, .quote-st.st-vencido { background: #fde8e8; color: #b42318; }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.quote-col { display: grid; gap: 18px; min-width: 0; }
.quote-side { position: sticky; top: 18px; }
.quote-card { display: grid; gap: 14px; padding: 20px; }
.quote-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.quote-items { display: grid; gap: 10px; }
.qi-row { display: grid; grid-template-columns: 130px 76px 110px minmax(0, 1fr) auto; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--line, #e5e7f0); }
.qi-main { display: grid; gap: 6px; min-width: 0; grid-column: 1 / -1; } .qi-main input { font-weight: 700; } .qi-main .qi-desc { font-weight: 400; font-size: .86rem; }
.qi-num { display: grid; gap: 2px; } .qi-num small { color: var(--muted, #6b7088); font-size: .72rem; } .qi-num input { min-width: 0; }
.qi-total { text-align: right; font-variant-numeric: tabular-nums; padding-bottom: 10px; }
.quote-sum { display: grid; gap: 6px; }
.qs-line { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.qs-line.qs-disc b { color: #0b7a43; } .qs-line.qs-total { padding-top: 8px; border-top: 1.5px solid currentColor; font-size: 1.1rem; }
.qs-discount input { flex: 1; min-width: 0; } .qs-discount select { width: 70px; }
.quote-actions { display: grid; gap: 8px; }
.quote-catalog { display: grid; gap: 18px; max-height: 68vh; overflow: auto; padding-right: 4px; margin-bottom: 12px; }
.quote-catalog h3 { margin: 0 0 8px; font-size: .95rem; }
.qc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.qc-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e5e7f0); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.qc-item:hover { border-color: var(--glacier); transform: translateY(-1px); }
.qc-item span { display: grid; gap: 2px; } .qc-item small { font-size: .76rem; } .qc-item strong { white-space: nowrap; }
@media (max-width: 960px) {
  .quote-layout { grid-template-columns: 1fr; } .quote-side { position: static; }
}
@media (max-width: 640px) {
  .quote-row { grid-template-columns: 1fr auto; } .quote-folio { grid-column: 1 / -1; font-size: .8rem; color: var(--muted, #6b7088); }
  .qi-row { grid-template-columns: 70px minmax(0, 1fr) auto auto; } .qi-row > select { grid-column: 1 / -1; }
  .qi-total { padding-bottom: 6px; }
}
.badge.plan-nfpos { background: #e7f6ee; color: #1f6b43; }

/* ===== Paleta 60/30/10: el rojo racing marca dónde estás y la acción principal; lo demás oscuro pasa a azul glaciar ===== */
.nav-link.on .ico, .tab-link.on .ico {
  background: var(--racing-grad); border-color: #9e1520; color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 3px 0 #85111b, 0 6px 12px -4px rgb(209 34 46 / .5);
}
.nav-link .ico, .tab-link .ico { border-color: #b9d2e4; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #a9c8de; }
.nav-link.on { box-shadow: 0 2px 0 #a9c8de, 0 6px 12px -8px rgb(16 36 58 / .45); }
.toast, .tree-root, .font-picker[open] .font-change, .sd-btn { background: var(--glacier-edge); border-color: var(--glacier-edge); }
.variant-crown { background: var(--racing-grad); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgb(209 34 46 / .35); }
.soon-ico { box-shadow: 0 16px 40px -14px rgb(53 106 145 / .6); }
.badge.plan-plus { background: var(--glacier-soft); color: var(--glacier-edge); }
.kpi-violet, .akpi-violet { --k: var(--glacier); --k-soft: var(--glacier-soft); }
.st-violet, .ev-violet { --s: var(--glacier-edge); --s-soft: var(--glacier-soft); }
.appt-confirmada { --s: var(--glacier); }
.frame-opt.on, .critter-opt.on { outline-color: var(--brand); }

/* Catálogo de servicios en desplegables (presupuestos) */
.quote-catalog { gap: 10px; }
.qc-group { border: 1px solid var(--line, #dde3ea); border-radius: 14px; background: var(--surface, #fff); overflow: hidden; }
.qc-group summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 52px; }
.qc-group summary::-webkit-details-marker { display: none; }
.qc-group summary:focus-visible { outline: 2px solid var(--brand, #4682ad); outline-offset: -2px; }
.qc-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand, #4682ad) 12%, transparent); color: var(--brand, #4682ad); }
.qc-ico svg { width: 19px; height: 19px; }
.qc-title { flex: 1; display: grid; gap: 1px; }
.qc-title b { font-size: .95rem; }
.qc-chev { flex: none; transition: transform .2s; }
.qc-group[open] .qc-chev { transform: rotate(180deg); }
.qc-group[open] summary { border-bottom: 1px solid var(--line, #dde3ea); }
.qc-group .qc-grid { padding: 12px 14px 14px; }
/* NF POS (views/pos.js) */
.pos-prices { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.pos-list { display: grid; gap: 8px; margin-bottom: 14px; }
.pos-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--soft, #f4f4f5); color: inherit; text-decoration: none; }
.pos-row small { display: block; }
.pos-dot { width: 10px; height: 10px; border-radius: 50%; background: #a1a1aa; }
.pos-dot.on { background: #22c55e; box-shadow: 0 0 0 4px rgb(34 197 94 / .18); }
