/*
 * Panel de Anexeo. La marca: violeta #4d32ef para lo principal (botones, enlaces y lo elegido, con texto
 * blanco encima), lima #c9ff4a para destacar (contadores, la acción principal de cada pantalla, lo nuevo;
 * siempre con texto tinta encima), tinta #17152a para el texto, fondo #f7f6fb y lienzo #e9e7f3.
 * Parkinsans en títulos y cifras grandes, Archivo en el resto y el logotipo en Poppins. Cabecera arriba
 * (logotipo, negocio, acción principal y cuenta) y el menú en una columna blanca a la izquierda; en el
 * móvil, cajón y barra abajo. Modo oscuro (el del sistema o el elegido). Sin sombras ni degradados; los
 * iconos solo en el menú, para orientarse. Fuentes alojadas aquí (licencia SIL OFL 1.1).
 */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Parkinsans"; src: url("../fonts/parkinsans-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/parkinsans-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --ink: #17152a;
    --ink-2: #2a2742;
    --ink-3: #3d3a57;
    --paper: #ffffff;
    --canvas: #f7f6fb;
    --lienzo: #e9e7f3;
    --frame: #e9e7f3;           /* el lienzo alrededor del menú y la hoja blanca del panel */
    --soft: #f2f1f7;
    --hover: #f9f8fc;
    --muted: #5b5870;
    --line: #e4e1ea;
    --line-2: #cdc9d9;
    --line-3: #a9a4bb;
    --accent: #4d32ef;          /* violeta de marca: botones, enlaces y lo elegido, con texto blanco encima */
    --accent-hover: #4126d8;
    --on-accent: #ffffff;
    --accent-ink: #4126d8;      /* texto violeta sobre fondo claro */
    --accent-soft: #f1eeff;     /* fondos suaves: lo elegido y los estados */
    --accent-line: #4d32ef;     /* foco, pestañas y bordes de lo elegido */
    --accent-ring: rgba(77, 50, 239, .25);
    --lime: #c9ff4a;            /* lima para destacar, siempre con texto tinta encima */
    --lime-hover: #bbf53a;
    --on-lime: #17152a;
    --lime-soft: #f3ffd6;
    --on-ink-link: #c9ff4a;     /* enlaces y botones de texto sobre fondo tinta (avisos): lima en claro, violeta en oscuro */
    --brand-ink: #4d32ef;       /* el logotipo: violeta sobre claro, lima sobre oscuro */
    --ok: #17703f;
    --ok-soft: #e6f4ec;
    --warn: #7a4d00;
    --warn-soft: #fcf1d6;
    --bad: #c02626;
    --bad-soft: #fce9e9;
    --bad-line: #f3b9b9;
    --late: #b54708;
    --radius: 10px;
    --radius-l: 16px;
    --radius-xl: 20px;
    --display: "Parkinsans", "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --text: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: var(--text);        /* cifras y horas: Archivo con números tabulares */
    --logo: "Poppins", "Parkinsans", Arial, sans-serif;
    --code: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;   /* solo trazas de errores */
    font-family: var(--text);
    color: var(--ink);
    background: var(--paper);
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}
/* Modo oscuro del panel: el que elige cada persona (claro, oscuro o como el sistema). */
:root.panel[data-theme=dark] {
    --ink: #f4f3fa; --ink-2: #dedbea; --ink-3: #c8c4da; --paper: #1b1830; --canvas: #110f20; --frame: #0d0b19; --lienzo: #24203d; --soft: #24203d; --hover: #211d38;
    --muted: #a6a1bd; --line: #2e2a4a; --line-2: #433e66; --line-3: #5a547f;
    --accent: #6a52ff; --accent-hover: #7d68ff; --accent-ink: #b3a8ff; --accent-soft: rgba(132, 116, 255, .17); --accent-line: #a99dff; --accent-ring: rgba(169, 157, 255, .4);
    --lime-soft: rgba(201, 255, 74, .14); --brand-ink: #c9ff4a; --on-ink-link: #4d32ef;
    --ok: #5ee08f; --ok-soft: rgba(64, 209, 124, .14); --warn: #ffca45; --warn-soft: rgba(255, 202, 69, .14);
    --bad: #ff7b7b; --bad-soft: rgba(255, 100, 100, .14); --bad-line: rgba(255, 100, 100, .4); --late: #ffa25c;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root.panel:not([data-theme=light]) {
        --ink: #f4f3fa; --ink-2: #dedbea; --ink-3: #c8c4da; --paper: #1b1830; --canvas: #110f20; --frame: #0d0b19; --lienzo: #24203d; --soft: #24203d; --hover: #211d38;
        --muted: #a6a1bd; --line: #2e2a4a; --line-2: #433e66; --line-3: #5a547f;
        --accent: #6a52ff; --accent-hover: #7d68ff; --accent-ink: #b3a8ff; --accent-soft: rgba(132, 116, 255, .17); --accent-line: #a99dff; --accent-ring: rgba(169, 157, 255, .4);
        --lime-soft: rgba(201, 255, 74, .14); --brand-ink: #c9ff4a; --on-ink-link: #4d32ef;
        --ok: #5ee08f; --ok-soft: rgba(64, 209, 124, .14); --warn: #ffca45; --warn-soft: rgba(255, 202, 69, .14);
        --bad: #ff7b7b; --bad-soft: rgba(255, 100, 100, .14); --bad-line: rgba(255, 100, 100, .4); --late: #ffa25c;
        color-scheme: dark;
    }
}
/* Planos, códigos QR y dibujos se ven siempre sobre blanco, también en modo oscuro. */
.room-plan, .ed-canvas, .nail-preview, .qr, .preview {
    --ink: #17152a; --ink-2: #2a2742; --paper: #ffffff; --soft: #f2f1f7; --muted: #5b5870; --line: #e4e1ea; --line-2: #cdc9d9;
    --accent: #4d32ef; --accent-ink: #4126d8; --accent-soft: #f1eeff; --accent-line: #4d32ef; --accent-ring: rgba(77, 50, 239, .25); color: #17152a; color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.5; background: var(--paper); }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--accent-ink); text-decoration-color: var(--accent-line); }
h1, h2 { font-family: var(--display); }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; margin: .15em 0 .45em; }
h2 { font-size: 1.4rem; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: 2.2em 0 .7em; }
h3 { font-size: 1.05rem; line-height: 1.3; font-weight: 700; letter-spacing: -.005em; margin: 1.6em 0 .4em; }
p { margin: 0 0 .9em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.brand { font-family: var(--logo); font-weight: 700; font-size: 1.55rem; letter-spacing: -.03em; line-height: 1; color: var(--brand-ink); text-decoration: none; }
.brand:hover { color: var(--brand-ink); }

/* Cabecera tinta de las demos públicas (la sala en directo): logotipo y enlaces */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; padding: 0 24px; min-height: 64px; background: #17152a; color: #ffffff; }
.top .brand, .top .brand:hover { color: #c9ff4a; }
.who { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; align-items: center; font-size: .9rem; font-weight: 600; }
.who a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.who a:hover { color: #ffffff; }
.top :focus-visible { outline: 2px solid #c9ff4a; outline-offset: 3px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 28px 24px 88px; }

/* ---- Estructura del panel: cabecera, menú a la izquierda y contenido; en el móvil, cajón y barra abajo -- */
body.app { background: var(--canvas); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 8px 14px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Cabecera: logotipo, el negocio (y cambiar de negocio), la acción principal y la cuenta */
.appbar { position: sticky; top: 0; z-index: 30; background: var(--canvas); border-bottom: 1px solid var(--line); }
.appbar-in { display: flex; align-items: center; gap: 14px; max-width: 1560px; min-height: 70px; margin: 0 auto; padding: 0 28px; }
.appbar .brand { margin-right: 10px; font-size: 1.6rem; }
.appbar :focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.bar-menu, .bar-plus { display: none; }
.bar-acts { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--lime); color: var(--on-lime); font-family: var(--display); font-weight: 700; font-size: .98rem; line-height: 1; }
.mark.small { width: 28px; height: 28px; border-radius: 8px; background: var(--soft); color: var(--ink); font-size: .8rem; }
.mark.round { border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--text); font-size: .82rem; letter-spacing: .02em; }
/* Menús que se despliegan desde la cabecera (negocio y cuenta): se cierran al tocar fuera o con Escape. */
.pop { position: relative; min-width: 0; }
.pop > summary { list-style: none; cursor: pointer; }
.pop > summary::-webkit-details-marker { display: none; }
.pop-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 300px; max-width: calc(100vw - 24px); padding: 8px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-l); }
.pop-menu.end { left: auto; right: 0; width: 280px; }
.pop-menu ul { list-style: none; margin: 0; padding: 0; }
.pop-menu form { margin: 0; }
.pop-label { margin: 6px 8px 4px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 8px; border: 0; border-radius: var(--radius); background: none; color: var(--ink); font: inherit; font-size: .93rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.pop-item:hover { background: var(--soft); color: var(--ink); }
.pop-item .i { width: 18px; height: 18px; color: var(--muted); }
.pop-item .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-item .tag { margin-left: auto; }
.pop-sep { margin: 6px 0; border: 0; border-top: 1px solid var(--line); }
.switch > summary, .switch.static { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 14px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.switch > summary:hover { border-color: var(--line-3); }
.switch[open] > summary { border-color: var(--accent-line); }
.switch summary .i { width: 16px; height: 16px; color: var(--muted); }
.switch-name, .me-head { display: grid; min-width: 0; line-height: 1.25; }
.switch-name { max-width: 260px; }
.switch-name b, .me-head b { font-weight: 700; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-name small, .me-head small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-all { color: var(--accent-ink); font-weight: 700; }
.me-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.me-menu > summary .mark { width: 38px; height: 38px; }
.me-menu > summary:hover .mark, .me-menu[open] > summary .mark { outline: 3px solid var(--accent-ring); }
.me-head { padding: 6px 8px 8px; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 4px 8px; font-size: .93rem; }
.theme { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { display: grid; place-items: center; width: 34px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent-ink); }
.theme .i { width: 16px; height: 16px; }

/* El menú: una columna blanca a la izquierda, por bloques */
.frame { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1560px; margin: 0 auto; padding: 24px 28px 0; }
.side { position: sticky; top: 94px; display: flex; flex-direction: column; max-height: calc(100vh - 118px); padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.side a { color: inherit; text-decoration: none; }
.side :focus-visible { outline: 3px solid var(--accent-line); outline-offset: -1px; }
.side-head, .side-close, .scrim { display: none; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side-label { margin: 14px 10px 4px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.side-nav li a, .side-foot li a { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 7px 10px; border-radius: 12px; color: var(--ink-2); font-size: .93rem; font-weight: 500; }
.side-nav li a .i, .side-foot li a .i { color: var(--muted); }
.side-nav li a:hover, .side-foot li a:hover { background: var(--soft); color: var(--ink); }
.side-nav li a.on, .side-foot li a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.side-nav li a.on .i, .side-foot li a.on .i { color: var(--accent-ink); }
.side .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .count, .pop .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--lime); color: var(--on-lime); font-size: .74rem; font-weight: 700; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.side-more { margin-top: 10px !important; padding-top: 10px !important; border-top: 1px solid var(--line); }
.side-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.tabbar { display: none; }
.app .wrap { max-width: none; min-width: 0; margin: 0; padding: 4px 0 96px; }
.app .wrap:focus { outline: 0; }
.app h1 { font-size: clamp(1.8rem, 3.2vw, 2.3rem); letter-spacing: -.025em; margin: .1em 0 .4em; }
.app h2 { font-size: 1.3rem; }
.app .crumb { margin: 0 0 10px; }
.app .crumb .tag { margin-left: 0; border-color: var(--lime); color: var(--on-lime); background: var(--lime); }
@media (max-width: 960px) {
    .appbar-in { gap: 8px; min-height: 60px; padding: env(safe-area-inset-top) 10px 0 6px; }
    .appbar .brand, .bar-acts .btn { display: none; }
    .bar-menu { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
    .bar-menu:hover { background: var(--soft); color: var(--ink); }
    .bar-plus { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }
    .bar-plus:hover { background: var(--lime-hover); color: var(--on-lime); }
    .bar-plus .i { stroke-width: 2.2; }
    .switch > summary, .switch.static { min-height: 42px; padding-right: 10px; }
    .switch-name { max-width: 52vw; }
    .pop-menu, .pop-menu.end { position: fixed; top: calc(env(safe-area-inset-top) + 64px); left: 10px; right: 10px; width: auto; max-width: none; max-height: calc(100vh - 140px); overflow-y: auto; }
    .frame { display: block; padding: 18px 16px 0; }
    .side { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(304px, 86vw); max-height: none; padding: calc(10px + env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom)); border: 0; border-right: 1px solid var(--line); border-radius: 0; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
    .side:target, .menu-open .side { transform: none; visibility: visible; transition: transform .22s ease; }
    .side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 8px 10px; }
    .side-head .brand { font-size: 1.5rem; }
    .side-close { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); }
    .side-close:hover { background: var(--soft); color: var(--ink); }
    .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(23, 21, 42, .5); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .side:target ~ .scrim, .menu-open .scrim { opacity: 1; pointer-events: auto; }
    .app .wrap { padding: 0 0 calc(100px + env(safe-area-inset-bottom)); }
    .tabbar { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
    .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 2px; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; }
    .tabbar a:hover { color: var(--ink); }
    .tabbar a.on { color: var(--ink); font-weight: 700; }
    .tab-icon { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 99px; }
    .tabbar a.on .tab-icon { background: var(--lime); color: var(--on-lime); }
    .tabbar .lbl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tabbar .count { position: absolute; top: -5px; right: 6px; min-width: 18px; padding: 0 5px; border: 2px solid var(--paper); border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: .62rem; font-weight: 700; line-height: 1.55; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .side, .scrim { transition: none !important; }
}
@media print {
    .side, .appbar, .tabbar, .scrim, .skip, .frame > .sheet > .sheet-head, .cmdk { display: none !important; }
    .frame > .sheet { margin: 0 !important; border-radius: 0 !important; }
    .frame { display: block; padding: 0; }
    body.app { background: #ffffff; }
}
/* ---- Distribución como el panel de Fideliar (ordenador): el menú sobre el lienzo, a la izquierda, a toda
   altura (negocio, buscar, secciones y abajo ayuda y cuenta) y el contenido en una hoja blanca redondeada
   con su cabecera fija. En el móvil sigue la cabecera de arriba, el cajón y la barra de abajo. ---- */
.side-biz, .side-search, .side-help, .side-me, .side-logo, .frame > .sheet > .sheet-head { display: none; }
.frame > .sheet { min-width: 0; }
@media (min-width: 961px) {
    html.panel { scroll-padding-top: 96px; }
    body.app { background: var(--frame); }
    .appbar { display: none; }
    .frame { grid-template-columns: 256px minmax(0, 1fr); gap: 0; max-width: none; padding: 0; align-items: start; }
    .side { top: 0; height: 100vh; height: 100dvh; max-height: none; gap: 12px; padding: 12px; background: transparent; border: 0; border-radius: 0; overflow: hidden; }
    .side-nav { flex: 1 1 auto; min-height: 0; margin: 0 -6px; padding: 0 6px 18px; overflow-y: auto; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
    .side-label { margin: 12px 10px 4px; font-size: .74rem; }
    .side-nav li a, .side-foot li a { min-height: 36px; padding: 7px 10px; border-radius: 10px; color: #403d57; font-size: .875rem; }
    .side-nav li a .i, .side-foot li a .i { width: 18px; height: 18px; color: #5b5870; }
    .side-nav li a:hover, .side-foot li a:hover { background: rgba(255, 255, 255, .55); color: var(--ink); }
    .side-nav li a.on, .side-foot li a.on { background: var(--paper); color: var(--accent-ink); font-weight: 700; box-shadow: 0 0 0 1px rgba(81, 53, 245, .14), 0 1px 2px rgba(23, 21, 42, .08); }
    .side-nav li a.on .i, .side-foot li a.on .i { color: var(--accent); }
    .side-foot { display: grid; gap: 12px; margin-top: 0; padding-top: 0; border-top: 0; }
    .side-foot ul { display: grid; gap: 1px; }
    .side .mar-side { margin: 0; padding: 12px 14px; border-color: rgba(255, 255, 255, .7); border-radius: 16px; background: rgba(255, 255, 255, .38); }
    .side .mar-side:hover, .side .mar-side[aria-current] { border-color: var(--accent-line); }

    /* El negocio arriba, en tarjeta blanca */
    .side-biz { display: grid; gap: 6px; padding: 8px; border-radius: 16px; background: var(--paper); box-shadow: 0 1px 2px rgba(23, 21, 42, .06); }
    .side-switch > summary, .side-switch.static { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 2px 4px 2px 2px; border-radius: 10px; }
    .side-switch > summary:hover { background: var(--soft); }
    .side-switch summary > .i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
    .side-switch .switch-name { max-width: none; flex: 1 1 auto; }
    .side-switch .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
    .side-switch .pop-menu { width: 232px; }
    .side-biz-acts { display: flex; gap: 6px; }
    .side-web, .side-copy { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 0; border-radius: 10px; background: var(--soft); color: var(--ink); font: inherit; font-size: .84rem; font-weight: 600; text-decoration: none; cursor: pointer; }
    .side-web { flex: 1 1 auto; padding: 0 10px; }
    .side-copy { flex: none; width: 34px; padding: 0; border: 1px solid var(--line); background: var(--paper); }
    .side-web:hover, .side-copy:hover { background: var(--lienzo); color: var(--ink); }
    .side-web .i, .side-copy .i { width: 16px; height: 16px; }
    .side-copy .ok, .side-copy.done .i:not(.ok) { display: none; }
    .side-copy.done .ok { display: block; color: var(--ok); }

    /* Buscar */
    .side-search { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 0 6px 0 10px; border: 1px solid transparent; border-radius: 10px; background: var(--paper); color: var(--muted); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(23, 21, 42, .05); }
    .side-search:hover { border-color: var(--line-2); color: var(--ink); }
    .side-search .i { width: 17px; height: 17px; }
    .side-search span { flex: 1 1 auto; }

    /* ¿Te trabaste? */
    .side-help { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .5); }
    .side-help p { display: grid; gap: 2px; margin: 0; line-height: 1.3; }
    .side-help b { font-size: .875rem; }
    .side-help small { color: var(--muted); font-size: .78rem; }
    .side-help div { display: flex; gap: 6px; }
    .side-help a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 8px; border-radius: 10px; background: var(--paper); color: var(--ink); font-size: .8rem; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(23, 21, 42, .06); }
    .side-help a:hover { color: var(--accent-ink); }
    .side-help .i { width: 15px; height: 15px; }

    /* Tu cuenta, abajo */
    .side-me { display: block; }
    .side-me > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 10px; }
    .side-me > summary:hover, .side-me[open] > summary { background: rgba(255, 255, 255, .55); }
    .side-me > summary > .i { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
    .side-me .mark { width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent-ink); }
    .side-me .switch-name { max-width: none; flex: 1 1 auto; }
    .pop-menu.up { top: auto; bottom: calc(100% + 6px); width: 232px; }
    .side .side-logo { display: block; justify-self: center; color: var(--brand-ink); font-size: 1.25rem; }

    /* La hoja blanca y su cabecera */
    .frame > .sheet { display: flex; flex-direction: column; min-height: calc(100vh - 16px); min-height: calc(100dvh - 16px); margin: 8px 8px 8px 0; border-radius: 20px; background: var(--paper); }
    .frame > .sheet > .sheet-head { display: block; position: sticky; top: 8px; z-index: 20; border-bottom: 1px solid var(--line); border-radius: 20px 20px 0 0; background: color-mix(in srgb, var(--paper) 90%, transparent); box-shadow: 0 -8px 0 0 var(--frame); -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5); }
    .sheet-head-in { display: flex; align-items: center; gap: 16px; max-width: 1280px; min-height: 71px; margin: 0 auto; padding: 12px 32px; }
    .sheet-crumb { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 500; }
    .sheet-crumb .i { width: 14px; height: 14px; color: var(--line-3); }
    .sheet-crumb a { color: var(--muted); text-decoration: none; }
    .sheet-crumb a:hover { color: var(--ink); }
    .sheet-crumb b { overflow: hidden; color: var(--ink); font-family: var(--display); font-size: 1.05rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
    .sheet-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
    .sheet-acts .btn .i { width: 16px; height: 16px; stroke-width: 2.2; }
    .sheet-acts .tag.demo { margin: 0; border-color: var(--lime); background: var(--lime); color: var(--on-lime); }
    .sheet-help { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
    .sheet-help:hover { border-color: var(--line-3); color: var(--ink); }
    .sheet-help .i { width: 16px; height: 16px; color: var(--muted); }
    .app .wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 32px 64px; }
    .app .demo-crumb { display: none; }
}
:root.panel[data-theme=dark] .side-nav li a, :root.panel[data-theme=dark] .side-foot li a { color: var(--ink-2); }
:root.panel[data-theme=dark] .side-nav li a .i, :root.panel[data-theme=dark] .side-foot li a .i { color: var(--muted); }
:root.panel[data-theme=dark] .side-nav li a:hover, :root.panel[data-theme=dark] .side-foot li a:hover, :root.panel[data-theme=dark] .side-me > summary:hover { background: rgba(255, 255, 255, .05); }
:root.panel[data-theme=dark] .side-nav li a.on, :root.panel[data-theme=dark] .side-foot li a.on { background: var(--paper); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(169, 157, 255, .25); }
:root.panel[data-theme=dark] .side-help, :root.panel[data-theme=dark] .side .mar-side { background: rgba(255, 255, 255, .04); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
    :root.panel:not([data-theme=light]) .side-nav li a, :root.panel:not([data-theme=light]) .side-foot li a { color: var(--ink-2); }
    :root.panel:not([data-theme=light]) .side-nav li a .i, :root.panel:not([data-theme=light]) .side-foot li a .i { color: var(--muted); }
    :root.panel:not([data-theme=light]) .side-nav li a:hover, :root.panel:not([data-theme=light]) .side-foot li a:hover, :root.panel:not([data-theme=light]) .side-me > summary:hover { background: rgba(255, 255, 255, .05); }
    :root.panel:not([data-theme=light]) .side-nav li a.on, :root.panel:not([data-theme=light]) .side-foot li a.on { background: var(--paper); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(169, 157, 255, .25); }
    :root.panel:not([data-theme=light]) .side-help, :root.panel:not([data-theme=light]) .side .mar-side { background: rgba(255, 255, 255, .04); border-color: var(--line); }
}
@media (max-width: 960px) {
    /* En el cajón del móvil: buscar, ver la web y la ayuda; el negocio y la cuenta ya están en la cabecera. */
    .side { gap: 0; }
    .side-search { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; margin: 2px 0 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--muted); font: inherit; font-size: .93rem; text-align: left; }
    .side-search span { flex: 1 1 auto; }
    .side-search kbd { display: none; }
    .side-help { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--soft); }
    .side-help p { display: grid; gap: 2px; margin: 0; }
    .side-help small { color: var(--muted); }
    .side-help div { display: flex; gap: 8px; }
    .side-help a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; font-weight: 600; }
    .side-help .i { width: 16px; height: 16px; }
}
kbd { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); color: var(--muted); font: 600 .72rem/1 var(--text); }

/* Buscar en el panel (Ctrl K) */
.cmdk { width: min(560px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 80px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(23, 21, 42, .45); overflow: hidden; }
.cmdk[open] { display: flex; flex-direction: column; }
.cmdk::backdrop { background: rgba(23, 21, 42, .38); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cmdk-in .i { color: var(--muted); }
.cmdk-in input { flex: 1 1 auto; min-width: 0; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; outline: 0; box-shadow: none; }
.cmdk-in input::-webkit-search-cancel-button { display: none; }
.cmdk-list { flex: 1 1 auto; margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
.cmdk-list a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 10px; color: var(--ink); font-size: .93rem; text-decoration: none; }
.cmdk-list a .i { width: 18px; height: 18px; color: var(--muted); }
.cmdk-list a span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cmdk-list a small { color: var(--muted); font-size: .78rem; }
.cmdk-list a.on, .cmdk-list a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.cmdk-list a.on .i { color: var(--accent); }
.cmdk-empty { margin: 0; padding: 18px 16px; color: var(--muted); text-align: center; }
.cmdk-foot { display: flex; gap: 16px; margin: 0; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .cmdk { margin-top: 12px; } .cmdk-foot { display: none; } }

.crumb { margin: 0; color: var(--muted); font-size: .86rem; font-weight: 600; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.eyebrow b { color: var(--accent-ink); font-weight: 700; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 9px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--muted); font-size: .76rem; font-weight: 600; line-height: 1.55; vertical-align: middle; }
.tag.warn { color: var(--bad); border-color: var(--bad-line); }

.flash { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper); }
.flash p { margin: 0 0 6px; }
.flash ul { margin: 0; padding-left: 20px; }
.errors { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--bad-line); border-left: 3px solid var(--bad); border-radius: var(--radius); background: var(--bad-soft); }
.errors p, .errors ul { margin: 0; }
.error { color: var(--bad); margin: 0; font-weight: 600; }

/* Botones: píldoras. Violeta para guardar y lo de cada día; lima para la acción principal de cada pantalla. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 18px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.accent { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.btn.accent:hover { background: var(--lime-hover); border-color: var(--lime-hover); color: var(--on-lime); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--soft); border-color: var(--ink); color: var(--ink); }
.btn.small { min-height: 34px; padding: 5px 13px; font-size: .86rem; }
.btn:disabled { opacity: .5; cursor: default; }
.link { font: inherit; background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }


/* Formularios */
input, select, textarea { font: inherit; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
textarea { min-height: 0; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none; }
input[type=time] { width: auto; font-family: var(--mono); font-size: .92rem; }
input[type=date] { font-family: var(--mono); font-size: .92rem; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 1px; border-color: var(--accent-line); }
.btn:focus-visible, a:focus-visible, .link:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
label .muted { font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
fieldset { display: grid; gap: 10px; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper); min-width: 0; }
legend { padding: 0 6px; font-size: .9rem; font-weight: 700; color: var(--ink); }

.stack { display: grid; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; margin-top: 14px; }
.grid .wide { grid-column: 1 / -1; }
.grid > p.wide { margin: 0; }
.grid > .btn, .stack > .btn, form > .btn { justify-self: start; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 10px 0 18px; }
.inline input { flex: 1 1 220px; width: auto; min-width: 0; max-width: 100%; }
.inline > select { flex: 0 1 240px; width: auto; min-width: 0; max-width: 100%; }
.inline label { display: grid; }
.danger { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Listas y tablas */
.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.list th, .list td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th:first-child, .list td:first-child { padding-left: 18px; }
.list th:last-child, .list td:last-child { padding-right: 18px; }
.list thead th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--soft); padding-top: 10px; padding-bottom: 10px; }
.list thead th:first-child { border-top-left-radius: var(--radius-l); }
.list thead th:last-child { border-top-right-radius: var(--radius-l); }
.list > tbody:last-child > tr:last-child > * { border-bottom: 0; }
.list tbody tr:hover > * { background: var(--hover); }
.list > tbody:last-child > tr:last-child > :first-child { border-bottom-left-radius: var(--radius-l); }
.list > tbody:last-child > tr:last-child > :last-child { border-bottom-right-radius: var(--radius-l); }
.list a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.list .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hours td { white-space: nowrap; }

.rows { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.rows li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows li form { margin: 0 0 0 auto; }

/* Cifras */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.facts div { padding: 14px 16px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.facts dt { font-size: .84rem; font-weight: 600; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts dd a { text-decoration: none; }
.facts.text dd { font-family: var(--text); font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.3; }
.facts dd.open::before, .facts dd.closed::before { content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; margin-right: .35em; vertical-align: .15em; }
.facts dd.open::before { background: var(--ok); }
.facts dd.closed::before { background: var(--bad); }

.pager { display: flex; gap: 16px; align-items: center; margin: 16px 0; color: var(--muted); }

/* Entrar e instalar */
body.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.login { width: min(400px, 100%); padding: 32px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
/* Para entrar, el logotipo va en su pastilla violeta con letras lima, como el icono de la app. */
.login .brand, .login .brand:hover { display: inline-block; margin: 0 0 28px; padding: .16em .42em .26em; border-radius: 12px; background: #4d32ef; color: #c9ff4a; font-size: 1.9rem; }
.login h1 { font-size: 1.9rem; }
.login .btn { width: 100%; }

@media (max-width: 900px) {
    .top { padding: 10px 16px; gap: 6px 16px; }
    .wrap { padding: 22px 16px 72px; }
}
@media (max-width: 640px) {
    .list thead { display: none; }
    .list tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .list td, .list th { display: flex; gap: 10px; border: 0; padding: 3px 0; text-align: left; }
    .list td:empty { display: none; }
    .list td[data-label]::before { content: attr(data-label); color: var(--muted); min-width: 6.5em; font-size: .85rem; }
    .list td:first-child, .list th[scope=row] { font-weight: 700; }
    .list tr { padding: 12px 16px; }
    .list tbody tr:last-child { border-bottom: 0; }
    .list th:first-child, .list td:first-child, .list th:last-child, .list td:last-child { padding-left: 0; padding-right: 0; border-radius: 0 !important; }
    .list tbody tr:hover > * { background: none; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .list .num { text-align: left; }
    .hours td { flex-wrap: wrap; align-items: center; }
    .facts dd { font-size: 1.6rem; }
}

/* Ficha, fotos y profesionales */
.grid h2 { margin: 1.2em 0 0; }
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type=color] { width: 48px; height: 44px; padding: 3px; }
.order { width: 4.6em; }
.thumbs { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 12px; }
.thumbs li { display: grid; gap: 4px; justify-items: start; }
.thumbs img { width: 140px; height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); }
.preview { max-width: 320px; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; margin: 8px 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
input[type=file] { padding: 8px; max-width: 100%; min-width: 0; font-size: .9rem; }

/* Reservas y citas: el día */
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.title-row h1 { margin-bottom: .2em; }
.title-row .acts { align-items: center; padding-bottom: .5em; }
.daynav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; }
.daynav > .btn.ghost[aria-label] { width: 42px; padding: 0; font-size: 1.2rem; }
.dayform { display: flex; gap: 8px; margin: 0; }
.dayform input { width: auto; }
.dayname { margin: 6px 0 0; font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.box { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 16px; margin: 16px 0; background: var(--paper); }
.box summary { cursor: pointer; font-weight: 700; }
.box[open] summary { margin-bottom: 4px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.acts form { margin: 0; }
.acts.start { justify-content: flex-start; margin: 16px 0; }
.res tr.off th, .res tr.off td:not(.acts) { color: var(--muted); }
.res tr.off th { text-decoration: line-through; }
.res th[scope=row] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.res .note { display: block; font-size: .9rem; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st-pending, .st-wait-waiting { background: var(--warn-soft); color: var(--warn); }
.st-confirmed, .st-wait-contacted { background: var(--accent-soft); color: var(--accent-ink); }
.st-seated, .st-done, .st-wait-booked { background: var(--ok-soft); color: var(--ok); }
.st-no_show { background: var(--bad-soft); color: var(--bad); }
.st-cancelled, .st-rejected, .st-finished, .st-wait-left, .st-wait-removed { background: var(--soft); color: var(--muted); }
.wait .free { display: flex; flex-wrap: wrap; gap: 4px; }
.wait .free .chip { min-width: 0; padding: 3px 8px; }
.slots { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 22px; }
.chip { display: inline-block; min-width: 66px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--paper); text-align: center; text-decoration: none; font-family: var(--mono); font-size: .88rem; font-variant-numeric: tabular-nums; }
a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.off { color: var(--muted); background: var(--soft); text-decoration: line-through; border-color: transparent; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 16px; }
.pick p { margin: 4px 0 2px; font-size: .85rem; }
.short { width: 6em; }

/* Ajustes */
.jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: .9rem; font-weight: 600; }
.jump a { text-decoration-thickness: 1px; }
h2[id] { scroll-margin-top: 16px; }
.list.edit input:not([type=checkbox]), .list.edit select { min-height: 38px; padding: 6px 8px; }
.list.edit input[name=name]:not(.short) { min-width: 9em; }
.days { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.list .days { gap: 2px 6px; flex-wrap: nowrap; }
.list.edit input.mid { width: 8em; }
.list.edit .acts { flex-wrap: nowrap; }
.list .days label { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; }
.durations { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.durations > div { display: flex; gap: 8px; align-items: end; }
@media (max-width: 640px) {
    .list.edit td { align-items: center; }
    .list.edit td[data-label]::before { min-width: 8.5em; }
}

/* Agenda de citas: una columna por profesional */
.agenda { display: grid; gap: 28px; margin-top: 28px; }
.agenda-col header { padding: 12px 0 10px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.agenda-col h2 { margin: 0; font-size: 1.15rem; }
.agenda-col header p { margin: 2px 0 0; font-family: var(--mono); font-size: .76rem; font-variant-numeric: tabular-nums; }
.agenda .empty { margin: 0; padding: 14px 0; }
.appt { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: 4px 12px; padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--accent); }
.appt p { margin: 2px 0; }
.appt h3 { margin: 0; font-size: 1rem; }
.appt h3 a { text-decoration: none; }
.appt h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.appt .note { font-size: .9rem; }
.appt .acts { justify-content: flex-start; margin-top: 8px; }
.appt-time { margin: 0; font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.appt-time span { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.appt:has(.st-done) { border-left-color: var(--ink); }
.appt.off { border-left-color: var(--line); color: var(--muted); }
.appt.off h3 a { text-decoration: line-through; }
.gap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 9px 0 9px 15px; border-bottom: 1px dashed var(--line-2); color: var(--muted); font-family: var(--mono); font-size: .8rem; font-variant-numeric: tabular-nums; }
.gap a { font-family: var(--text); font-size: .9rem; color: var(--ink); font-weight: 600; }
@media (min-width: 760px) {
    .agenda { grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 0 20px; overflow-x: auto; padding-bottom: 4px; }
}

/* Resumen: saludo, lo pendiente, preparar el negocio, lo de hoy, lo que viene y las cifras */
.dash { display: grid; gap: 16px; }
.dash > * { min-width: 0; }
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 6px; }
.app .hello h1 { margin: 0 0 .3em; }
.hello .acts { justify-content: flex-start; padding-bottom: 2px; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; margin-right: .45em; background: var(--muted); vertical-align: .05em; }
.dot.open { background: var(--ok); }
.dot.closed { background: var(--bad); }
.card { min-width: 0; padding: 18px 20px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 0 0 14px; }
.app .card-head h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; }
.card-head p { margin: 0; font-size: .88rem; }
.card-head > a { font-size: .9rem; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card h3 { margin: 20px 0 4px; font-size: .95rem; }
.card > :last-child { margin-bottom: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-top: 18px; }
.app .sec-head h2 { margin: 0; font-size: 1.25rem; }
.sec-head p { margin: 2px 0 0; font-size: .9rem; }
.todo { list-style: none; margin: -6px -10px -8px; padding: 0; }
.todo li + li { border-top: 1px solid var(--line); }
.todo a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 11px 10px; border-radius: var(--radius); text-decoration: none; }
.todo a:hover { background: var(--hover); color: inherit; }
.todo-n { min-width: 2.6em; padding: 3px 9px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-family: var(--mono); font-size: .92rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.todo-text { display: grid; min-width: 0; line-height: 1.35; }
.todo-text b { font-weight: 600; }
.todo-text small { color: var(--muted); font-size: .86rem; }
.todo-go { color: var(--accent-ink); font-size: .9rem; font-weight: 600; }
.todo a:hover .todo-go { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.all-clear { display: flex; align-items: center; margin: 0; padding: 12px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); color: var(--muted); }
.progress { height: 6px; margin: -4px 0 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress span { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--accent); }
.steps { list-style: none; display: grid; gap: 0 28px; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; }
.step-mark { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border: 1.5px solid var(--line-3); border-radius: 50%; }
.steps li.done .step-mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step-mark .i { width: 14px; height: 14px; stroke-width: 2.6; }
.step-text { display: grid; min-width: 0; line-height: 1.35; }
.step-text a { font-weight: 600; text-decoration: none; }
.step-text a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.steps li.done .step-text a { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-3); }
.step-text small { color: var(--muted); font-size: .86rem; }
.board, .board-main, .board-side { display: grid; gap: 16px; align-items: start; min-width: 0; }
.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 4px; margin: 0; padding: 6px; border-radius: var(--radius); background: var(--soft); }
.mini div { display: flex; flex-direction: column; justify-content: space-between; padding: 6px 10px; }
.mini dt { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mini dd { margin: 2px 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.next { list-style: none; margin: 0; padding: 0; }
.next li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.next li:last-child { border-bottom: 0; padding-bottom: 0; }
.next time { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.next .who-line { min-width: 0; }
.next .who-line a { font-weight: 700; text-decoration: none; }
.next .who-line a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.next .who-line span { display: block; color: var(--muted); font-size: .9rem; }
.card .empty { margin: 8px 0 0; }
.card .flash { margin: 16px 0 0; }
.chart-total { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.card .cols { margin-top: 4px; }
.card .col-plot { height: 150px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; }
.tile { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.tile dt { font-size: .84rem; font-weight: 600; color: var(--muted); }
.tile dd { margin: 0; }
.tile-value { margin-top: 6px !important; font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile-delta { margin-top: 4px !important; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.tile-delta b { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.tile-delta b.up { color: var(--ok); }
.spark { display: flex; align-items: flex-end; gap: 5px; height: 30px; margin-top: auto !important; padding-top: 16px; box-sizing: content-box; }
.spark i { flex: 1 1 0; max-width: 16px; height: max(3px, var(--h)); border-radius: 3px 3px 1px 1px; background: var(--accent); }
.spark i[style*="--h: 0%"] { background: var(--line-2); }
.tile-note { margin-top: 10px !important; font-size: .84rem; }
.tile-note a { color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tile-note a:hover { color: var(--ink); }
.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.promos > section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.promos > section > div { flex: 1 1 300px; min-width: 0; }
.app .promos h2 { margin: 0 0 4px; font-size: 1.08rem; }
.promos p { margin: 0; }
.promos p + p { margin-top: 6px; }
@media (min-width: 900px) {
    .steps { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1180px) {
    .board { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); }
}
@media (max-width: 640px) {
    .card { padding: 16px; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tile { padding: 14px; }
    .tile-value { font-size: 1.7rem; }
    .todo a { grid-template-columns: auto minmax(0, 1fr); }
    .todo-go { display: none; }
    .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .next li { grid-template-columns: 3.2em minmax(0, 1fr); }
    .next .st { grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* Tus negocios: una tarjeta por negocio, toda ella enlace al panel */
.biz-group { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.biz-group .mono { font-size: .8rem; font-weight: 500; }
.title-row + .biz-grid { margin-top: 18px; }
.biz-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.biz { position: relative; display: grid; gap: 14px; padding: 16px 18px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.biz:hover { border-color: var(--line-3); }
.biz-top { display: flex; align-items: flex-start; gap: 10px; }
.biz-main { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.biz-main::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-l); }
.biz-main:hover { color: inherit; }
.biz-main:focus-visible { outline: 0; }
.biz-main:focus-visible::after { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.biz .mark { width: 40px; height: 40px; border-radius: 10px; font-size: 1.1rem; }
.biz-name { display: grid; min-width: 0; line-height: 1.3; }
.biz-name b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-name small { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz .tag { flex: none; margin: 3px 0 0; }
.biz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .88rem; }
.biz-foot > span { color: var(--accent-ink); font-weight: 600; }
.biz:hover .biz-foot > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.biz-web { position: relative; z-index: 1; color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.biz-web:hover { color: var(--ink); }

/* Equipo, Equipo de Anexeo y Tu cuenta: personas con acceso, invitaciones y papeles. */
.team { display: grid; gap: 16px; margin-top: 18px; }
.team > * { min-width: 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; padding-top: 0; }
.people li:last-child { padding-bottom: 0; }
.people .mark.round { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.people .person { flex: 1 1 240px; display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
.people .person small { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.people .tag { margin-left: 0; }
.people form, .row-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.people select { width: auto; min-height: 34px; padding: 4px 10px; font-size: .9rem; }
.roles { gap: 8px; }
.roles label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 2px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 400; cursor: pointer; }
.roles label input { grid-row: span 2; margin-top: 2px; }
.roles label small { color: var(--muted); font-size: .86rem; }
.roles label:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.team .card > form + p { margin-top: 12px; }
.invite-ready { border-color: var(--accent-line); }
.invite-ready > p { max-width: 72ch; }

/* Página del enlace de una invitación */
.login.invite { width: min(460px, 100%); }
.login h2 { margin: 28px 0 12px; font-size: 1.1rem; }
.invite-who { margin: 0 0 8px; }
.invite-role { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--soft); font-size: .92rem; }
.invite-alt { margin-top: 14px; text-align: center; }
.login input[readonly] { background: var(--soft); color: var(--muted); }

/* Diseño de uñas elegido por la clienta (simulador de uñas). */
.design { display: flex; align-items: center; gap: 8px; }
.design svg { flex: none; width: 12px; height: 12px; }
.design circle { stroke: rgba(0, 0, 0, .2); stroke-width: 1; }
.nail-design { margin: 24px 0; }
.nail-design h2 { margin: 0 0 12px; font-size: 1.15rem; }
.nail-preview { width: min(280px, 100%); aspect-ratio: 200 / 175; background: var(--soft); border-radius: var(--radius); overflow: hidden; }
.nail-preview svg { display: block; width: 100%; height: 100%; }
.nail-design p { margin: 10px 0 0; font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Estadísticas: periodo, cifras, columnas por día u hora y barras de reparto */
.views { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 6px 0 0; border-bottom: 1px solid var(--line); }
.views a { display: inline-flex; align-items: center; padding: 8px 0 7px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; text-decoration: none; }
.views a:hover { color: var(--ink); }
.views a.on { color: var(--ink); border-bottom-color: var(--accent-line); }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 14px 0 0; }
.period .daynav { margin: 0; }
.period .dayname { margin: 0; }
.note-line { margin: 8px 0 0; font-size: .9rem; }
.stat > h2 { margin-top: 1.8em; }
.facts dd.hint { margin-top: 4px; font-family: var(--text); font-size: .82rem; font-weight: 400; letter-spacing: 0; line-height: 1.35; color: var(--muted); }
.facts dd.hint a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.small { font-size: .85rem; }
.cols { list-style: none; display: flex; gap: 6px; margin: 12px 0 0; padding: 0; }
.cols li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.col-plot { height: 160px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; border-bottom: 1px solid var(--ink); }
.col-val { font-family: var(--mono); font-size: .72rem; line-height: 1.4; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-bar { height: calc(var(--h) * .84); background: var(--accent-soft); border: 1px solid var(--accent-line); border-bottom: 0; border-radius: 2px 2px 0 0; }
.col-bar[style*="--h: 0%"] { border: 0; }
.cols li.past .col-bar { background: var(--accent); }
.col-lbl { margin-top: 6px; font-family: var(--mono); font-size: .7rem; line-height: 1.3; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.col-lbl a { color: inherit; text-decoration: none; }
.col-lbl a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.cols li.hoy .col-lbl { color: var(--ink); font-weight: 700; }
.cols.dense { gap: 2px; }
.cols.dense .col-val { visibility: hidden; }
.cols.dense li:hover .col-val { visibility: visible; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.legend .key { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 2px; margin-left: 10px; }
.legend .key:first-child { margin-left: 0; }
.legend .key.past { background: var(--accent); }
.bars { list-style: none; display: grid; grid-template-columns: minmax(6.5em, 9em) minmax(60px, 1fr) auto; gap: 10px 12px; margin: 10px 0 14px; padding: 0; }
.bars li { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(6.5em, 9em) minmax(60px, 1fr) auto; gap: 12px; align-items: center; }
@supports (grid-template-columns: subgrid) {
    .bars li { grid-template-columns: subgrid; }
}
.bar-lbl { font-weight: 600; overflow-wrap: anywhere; }
.bar { display: block; height: 10px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w); background: var(--accent); }
.bar-val { font-family: var(--mono); font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.meter { display: inline-flex; align-items: center; gap: 10px; width: 100%; max-width: 220px; }
.meter .bar { flex: 1 1 auto; }
.meter .mono { min-width: 3.4em; text-align: right; font-size: .85rem; }
.stat-table { margin-top: 6px; }
.stat-cols { display: grid; gap: 0 40px; }
@media (min-width: 900px) {
    .stat-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .col-plot { height: 130px; }
    .cols.dense li:nth-child(even) .col-lbl { visibility: hidden; }
    .bars li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
    .bars .bar { grid-column: 1 / -1; grid-row: 2; }
    .meter { max-width: none; }
}

/* Panel › Mensajes */
.list .msg-text { max-width: 46ch; white-space: pre-line; overflow-wrap: anywhere; }
.messages .inline { margin: 0 0 8px; }
.messages .msg-actions { flex-wrap: wrap; align-items: center; }
.messages .msg-actions .inline { margin: 0; }

/* Panel › NFC y QR */
.qr-list { list-style: none; margin: 18px 0 36px; padding: 0; }
.qr-list > li { display: grid; grid-template-columns: 132px 1fr; gap: 8px 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.qr-list > li:first-child { border-top: 1px solid var(--line); }
.qr-list .qr { margin: 0; width: 132px; height: 132px; background: #fff; }
.qr-list .qr svg { display: block; width: 100%; height: 100%; }
.qr-list > li.off .qr { opacity: .3; }
.qr-list h2 { margin: 0 0 4px; font-size: 1.15rem; }
.qr-list .qr-info p { margin: 4px 0; }
.qr-list .warn { color: var(--bad); }
.qr-list .url { display: grid; gap: 4px; margin: 10px 0 8px; color: var(--muted); font-size: .85rem; }
.qr-list .url code { justify-self: start; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.qr-list .qr-info .btn { margin-top: 6px; }
.qr-list .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.qr-list .actions .btn { margin-top: 0; }
.qr-list .qr-edit { grid-column: 1 / -1; }
.qr-list .qr-edit summary { cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.qr-list .qr-edit form { margin-top: 12px; }
.howto { padding-left: 20px; }
.howto li { margin: 6px 0; }
@media (max-width: 560px) {
    .qr-list > li { grid-template-columns: 92px 1fr; gap: 8px 14px; }
    .qr-list .qr { width: 92px; height: 92px; }
}

/* Admin › Solicitudes y Contactos: el diagnóstico (preguntas y respuestas) */
.diag summary { cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.diag-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; margin: 10px 0; font-size: .88rem; }
.diag-dl dt { color: var(--muted); }
.diag-dl dd { margin: 0; }
.diag .adds { margin: 10px 0 0; font-size: .88rem; }
@media (max-width: 560px) { .diag-dl { grid-template-columns: minmax(0, 1fr); } .diag-dl dd { margin-bottom: 6px; } }

/* CRM: Contactos */
.inline .grow { flex: 1 1 280px; }
.inline .grow input, .inline .grow select { width: 100%; }
.jump a[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink); }
.st-lead-nuevo { background: var(--accent-soft); color: var(--accent-ink); }
.st-lead-contactado, .st-lead-estudio, .st-lead-prueba, .st-lead-propuesta { background: var(--soft); color: var(--ink-2); }
.st-lead-cliente { background: var(--ok-soft); color: var(--ok); }
.st-lead-descartado { background: var(--soft); color: var(--muted); }
.due-hoy { color: var(--accent-ink); font-weight: 600; }
.due-atrasada { color: var(--bad); font-weight: 600; }
.crm-bar { display: flex; flex-wrap: wrap; gap: 0 32px; margin: 18px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.crm-bar .inline { margin: 12px 0; }
.crm { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
@media (max-width: 900px) { .crm { grid-template-columns: minmax(0, 1fr); } }
.grid.one { grid-template-columns: minmax(0, 1fr); }
.tasks { list-style: none; margin: 0 0 6px; padding: 0; border-top: 1px solid var(--line); }
.tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tasks li.late { padding-left: 10px; border-left: 3px solid var(--bad); }
.tasks form { margin: 0; }
.tasks.done { border-top: 0; margin-top: 8px; }
.tasks.done li { grid-template-columns: auto minmax(0, 1fr); color: var(--muted); }
.tick { position: relative; width: 22px; height: 22px; margin-top: 2px; padding: 0; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); cursor: pointer; }
.tick:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.tick.on { background: var(--accent); border-color: var(--accent); }
.tick.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { padding: 12px 0 12px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-2); }
.timeline li.tl-solicitud, .timeline li.tl-alta { border-left-color: var(--accent); }
.timeline li.tl-etapa { border-left-color: var(--ink); }
.tl-meta { margin: 0; font-size: .85rem; color: var(--muted); }
.tl-meta b { color: var(--ink); }
.tl-body { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Fidelización: tarjeta de sellos */
.back { margin: 0 0 4px; font-size: .9rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }
.lead-line { max-width: 72ch; }
.stamps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; padding: 0; }
.stamps li { width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; }
.stamps li.goal { border-style: dashed; }
.stamps li.on { background: var(--lime); border: 2px solid var(--ink); }
.loyal-now .count { margin: 0 0 14px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.rewards { list-style: none; margin: 10px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.rewards li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rewards li > div { display: flex; flex-direction: column; gap: 2px; }
.rewards form { margin: 0; }
.card-share { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.card-share .qr { flex: none; width: 168px; height: 168px; margin: 0; background: #fff; }
.card-share .qr svg { display: block; width: 100%; height: 100%; }
.card-share > div { flex: 1 1 260px; }
.card-share p { margin: 0 0 10px; }
.card-share .url { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; }
.card-share .url code { justify-self: start; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.stamps-log form { margin: 0; }
.loyal-box { margin-top: 36px; padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
    .stamps { gap: 8px; }
    .stamps li { width: 34px; height: 34px; }
    .card-share .qr { width: 140px; height: 140px; }
}

/* Reseñas: pedir opinión a mano */
.cols.pair .col-bar { position: relative; overflow: hidden; }
.cols.pair .col-in { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: var(--accent); }
.msg-preview { max-width: 60ch; margin: 12px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper); font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
p.note { max-width: 72ch; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper); }
.share { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.copy-row { display: grid; gap: 4px; max-width: 60ch; margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.copy-src { width: 100%; font-family: var(--mono); font-size: .9rem; color: var(--ink); }
.status-list { margin: 8px 0; padding-left: 18px; }
.status-list li { margin: 4px 0; }
.list.ask td.act { text-align: right; }
.list.ask form { margin: 0; }
.admin-links code { font-family: var(--mono); font-size: .9rem; letter-spacing: .02em; }
.admin-links tr.off td { color: var(--muted); }

/* CRM: mensajes con plantilla y presupuestos */
.msg-form { max-width: 720px; margin-top: 8px; }
.msg-pick { max-width: 720px; }
.msg-form .share { margin: 0; }
.st-quote-borrador { background: var(--soft); color: var(--ink-2); }
.st-quote-enviado { background: var(--accent-soft); color: var(--accent-ink); }
.st-quote-aceptado { background: var(--ok-soft); color: var(--ok); }
.st-quote-rechazado { background: var(--soft); color: var(--muted); }
.timeline li.tl-mensaje { border-left-color: var(--accent); }
.timeline li.tl-presupuesto { border-left-color: var(--ok); }
.lines-edit { padding-bottom: 6px; }
.lines-edit .list { margin-top: 2px; }
.list.lines { background: none; border: 0; border-radius: 0; }
.list.lines thead th { background: none; }
.list.lines tbody tr:hover > * { background: none; }
.list.lines th, .list.lines td, .list.lines th:first-child, .list.lines td:first-child { padding: 6px 8px 6px 0; border-bottom: 0; vertical-align: top; }
.list.lines td:first-child { width: 52%; }
.list.lines .qty { width: 5.5em; }
.list.lines .price { width: 8em; font-family: var(--mono); }
.list.lines select { width: auto; }
.list.lines input[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
@media (max-width: 640px) {
    .list.lines tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .list.lines td { align-items: center; padding: 3px 0; }
    .list.lines td:first-child { width: auto; font-weight: 400; }
    .list.lines td[data-label]::before { min-width: 7.5em; }
    .list.lines .qty, .list.lines .price { width: auto; flex: 1 1 auto; }
}
.tpl-list .tpl-body { display: block; max-width: 60ch; color: var(--muted); font-size: .9rem; white-space: pre-line; overflow-wrap: anywhere; }
.holes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 8px 0 0; font-size: .9rem; }
.holes dt { font-family: var(--mono); font-size: .85rem; }
.holes dd { margin: 0; color: var(--muted); }

/* Ayuda (panel) e incidencias (admin) */
.st-ticket-abierta, .st-ticket-b-esperando { background: var(--warn-soft); color: var(--warn); }
.st-ticket-en_curso, .st-ticket-b-abierta, .st-ticket-b-en_curso { background: var(--accent-soft); color: var(--accent-ink); }
.st-ticket-esperando { background: var(--soft); color: var(--muted); }
.st-ticket-resuelta, .st-ticket-b-resuelta { background: var(--ok-soft); color: var(--ok); }
.tag.new { color: var(--on-lime); border-color: var(--lime); background: var(--lime); }
.ticket-msgs { list-style: none; max-width: 72ch; margin: 18px 0 20px; padding: 0; border-top: 1px solid var(--line); }
.ticket-msgs li { padding: 12px 0 12px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--line-2); }
.ticket-msgs li.from-staff { border-left-color: var(--accent); }
.support-new { margin-top: 40px; }
.inline.narrow { max-width: 480px; }

/* Admin › Negocios: estado de cada negocio y su ficha */
.st-biz-active { background: var(--ok-soft); color: var(--ok); }
.st-biz-suspended { background: var(--warn-soft); color: var(--warn); }
.st-biz-cancelled { background: var(--soft); color: var(--muted); }
.st-biz-demo { background: var(--accent-soft); color: var(--accent-ink); }
p.note.warn { border-left-color: var(--bad); }
.biz-admin .card > p { max-width: 72ch; }
.biz-admin .row-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.biz-admin .row-acts form { margin: 0; }
.biz-admin .tiles { margin: 0; }
.modules { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.modules legend { grid-column: 1 / -1; }
.danger-zone { border-color: var(--bad-line); }
.danger-zone h2 { color: var(--bad); }
.danger-zone label { max-width: 420px; }
.biz-admin .row-acts + p, .biz-admin .people + p { margin-top: 12px; }
.biz-admin .people + p + p { margin-top: 4px; }
.modules label { align-content: start; }

/* Admin › Resumen */
.mini dt a { color: inherit; text-decoration: none; white-space: normal; }
.mini dt a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.biz-latest + p { margin-top: 12px; }
.stage-bars { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.stage-bars li { display: grid; grid-template-columns: minmax(7.5em, 10em) minmax(0, 1fr) 2.6em; align-items: center; gap: 12px; font-size: .92rem; }
.stage-bars .bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.stage-bars .bar i { display: block; height: 100%; width: var(--w); min-width: 2px; border-radius: inherit; background: var(--accent); }
.stage-bars .bar i[style*="--w: 0%"] { display: none; }
.stage-bars a { color: inherit; text-decoration: none; }
.stage-bars a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.stage-bars b { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

/* Las cifras de las tarjetas de una misma fila quedan a la misma altura aunque una etiqueta ocupe dos
   líneas: cada tarjeta usa las filas de la rejilla (etiqueta, cifra, comparación, gráfica y nota). */
@supports (grid-template-rows: subgrid) {
    .tiles, .biz-admin .tiles { row-gap: 0; margin-bottom: -12px; }
    .tile { display: grid; grid-row: span 5; grid-template-rows: subgrid; margin-bottom: 12px; }
}

/* Admin › Errores */
.error-list .err-msg { color: var(--muted); font-size: .88rem; font-weight: 400; overflow-wrap: anywhere; }
.err-message { margin: 0; font-family: var(--code); font-size: .9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.st-error-open { background: var(--bad-soft); color: var(--bad); }
.st-error-done { background: var(--ok-soft); color: var(--ok); }
.error-detail .err-message + p { margin-top: 12px; }
.tile-value.tile-date { font-size: 1.5rem; }
.kv { display: grid; margin: 0; }
.kv div { display: grid; grid-template-columns: minmax(8em, 12em) minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv div:first-child { padding-top: 0; }
.kv div:last-child { padding-bottom: 0; border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv .mono { font-size: .88rem; }
.trace { margin: 0; padding: 14px 16px; max-height: 480px; overflow: auto; border-radius: var(--radius); background: var(--soft); color: var(--ink); font-family: var(--code); font-size: .78rem; line-height: 1.65; white-space: pre; }
@media (max-width: 640px) {
    .kv div { grid-template-columns: minmax(0, 1fr); }
}

/* Tu cuenta › Verificación en dos pasos */
.two-factor .setup { margin: 0; padding-left: 1.2em; display: grid; gap: 14px; }
.two-factor .setup li > p:first-child { margin-top: 0; }
.two-factor .qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; line-height: 0; }
.two-factor .qr svg { width: 180px; height: 180px; }
.two-factor .secret { overflow-wrap: anywhere; color: var(--ink); }
.code-input { font-size: 1.25rem; letter-spacing: .25em; }
.two-factor .code-input { max-width: 14em; }
.two-factor .acts { justify-content: flex-start; gap: 10px; }
.login .back-link { margin: 18px 0 0; }
.codes-box { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); }
.codes-box p { margin: 0; }
.codes { width: 100%; max-width: 14em; resize: none; font-size: 1rem; line-height: 1.6; }
.two-factor-acts { align-items: start; }
.two-factor form.stack > .grid { max-width: 30em; }

/* Admin › Integraciones */
.integration-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.integration .bad { color: var(--bad); }
.login .forgot { margin: -4px 0 0; text-align: right; }

/* Tu plan (App\Billing): la cuota del negocio. */
.plan-now { display: grid; gap: 10px; max-width: 72ch; margin-top: 14px; }
.plan-now p { margin: 0; }
.plan-buy { display: grid; gap: 16px; max-width: 72ch; }
.plan-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.plan-option { position: relative; display: flex; gap: 12px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); cursor: pointer; }
.plan-option:has(input:checked) { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.plan-option input { margin-top: 4px; accent-color: var(--accent); }
.plan-option-body { display: grid; gap: 4px; }
.plan-option-label { font-weight: 700; }
.plan-option-price b { font-family: var(--display, inherit); font-size: 1.6rem; letter-spacing: -.02em; }
.plan-gift { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: var(--lime); color: var(--ink-on-lime, #17152a); font-size: .76rem; font-weight: 700; vertical-align: middle; }
.plan-facts { max-width: 72ch; padding-left: 1.1em; }
.plan-facts li { margin: 4px 0; }
h1 .st { margin-left: 8px; vertical-align: middle; font-size: .8rem; }
.plan-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; background: var(--lime-soft); border-radius: var(--radius); }
.plan-switch p { margin: 0; flex: 1 1 32ch; }
:root.panel[data-theme=dark] .plan-switch { background: var(--soft); }
.plan-pay { display: grid; gap: 14px; max-width: 560px; margin-top: 20px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.plan-pay h2 { margin: 0; }
.plan-element { min-height: 120px; }
.plan-pay-actions, .plan-actions, .plan-buy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plan-actions form { margin: 0; }
.plan-secure { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.plan-secure .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.plan-facts-grid dd { font-family: inherit; font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.plan-invoices td:last-child { text-align: right; }
.plan-fiscal { max-width: 72ch; }
.plan-fiscal summary { cursor: pointer; padding: 12px 0; }
.plan-fiscal summary .link { margin-left: 6px; }
.plan-fiscal-form { max-width: 72ch; }
.plan-switch { margin-top: 16px; }

/* Las preguntas «¿Seguro?» (js/dialogo.js): nunca la ventana del navegador. */
.ask { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper); color: var(--ink); }
.ask::backdrop { background: rgba(23, 21, 42, .5); }
.ask[open]:not(:modal) { position: fixed; inset: 0; z-index: 100; }
.ask h2 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.ask p { margin: 0; color: var(--muted); }
.ask-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn.bad { border-color: var(--bad); background: var(--bad); color: #ffffff; }
.btn.bad:hover { border-color: var(--bad); background: var(--bad); color: #ffffff; filter: brightness(.92); }
@media (max-width: 480px) { .ask-acts .btn { flex: 1 1 auto; } }
.plan-send { display: grid; gap: 8px; margin: 4px 0 12px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius); }
.plan-send p { margin: 0; }
.plan-send input[readonly] { flex: 1 1 280px; width: auto; min-width: 0; font-family: var(--mono); font-size: .86rem; }
.plan-buy { max-width: 72ch; }
.plan-card-box { display: grid; gap: 12px; max-width: 560px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.plan-card-box p { margin: 0; }
.plan-card-title { font-size: 1rem; }
.plan-charge { font-weight: 600; }
.plan-card-box .btn.big { min-width: 200px; }

/* Páginas de error (errors/page.blade.php). */
.err-body { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 24px 16px; background: var(--canvas, #f7f6fb); }
.err { display: grid; gap: 14px; width: min(520px, 100%); padding: 32px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.err-logo { font-family: "Poppins", var(--display); font-weight: 700; font-size: 1.5rem; color: var(--accent); text-decoration: none; letter-spacing: -.02em; }
.err h1 { margin: 6px 0 0; font-size: 1.7rem; line-height: 1.2; }
.err p { margin: 0; }
.err-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Admin › Integraciones › Correo: cómo se manda y a quién va la prueba. */
.choice-row label.choice { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.choice-row label.choice input { width: auto; margin: 0; accent-color: var(--accent); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input[type="email"] { width: auto; min-width: 240px; flex: 1 1 240px; }
.integration:has(input[name="method"][value="hosting"]:checked) .smtp-only { display: none; }

/* Móvil: la página nunca se acerca ni se mueve hacia los lados. Con letra de menos de 16 px, el iPhone acerca la
   página al tocar un campo; y nada desborda de lado (lo que se recorre de lado lo hace dentro de su caja). */
html, body { overflow-x: clip; }
@media (max-width: 900px), (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]), select, textarea { font-size: 16px !important; }
}
