/* Chatbot IA · panel (tablero) con el estilo "Curvas" de la página de inicio.
   Todo está acotado a body.curvas: las demás páginas siguen con assets/tema.css hasta que adopten la clase.
   Solo cambia la presentación; IDs, clases funcionales y scripts no se tocan. Se carga DESPUÉS de tema.css. */

/* ============ 1 · tokens y fondo ============ */
body.curvas {
  --ink: #08202a; --t1: #1d3a46; --t2: #3d5762; --t3: #566d78;
  --line: #dde9ee; --line-2: #c5d7df; --ice: #f3f9fb; --ice-2: #e8f3f7;
  --deep: #0a6b5d; --sky: #14b8a0; --g1: #22c98f; --g2: #0e93a8; --g1d: #0a8466; --g2d: #0b7f96; --ink-h: #17404f; --tint: #d4ece6;
  --bg1: #f3fbf8; --bg2: #e3f3ef; --glow1: rgba(61,220,151,.22); --glow2: rgba(34,211,238,.22);
  --grad: linear-gradient(140deg, var(--g1), var(--g2));
  --out: cubic-bezier(.23, 1, .32, 1);
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: var(--bg1); --surface: #fff; --text: var(--ink); --text-2: #3d5762; --text-3: #566d78;
  --edge: var(--line); --edge-strong: var(--line-2); --cyan: var(--sky); --blue: var(--deep); --teal: var(--deep);
  --teal-deep: var(--g1d); --blue-deep: var(--g2d); --green: #46b47d;
  --ok: #0e7a52; --bad: #d14656; --warn: #b07a12;
  --card-shadow: 0 30px 50px -38px rgba(10, 106, 130, .5);
  --wide: 268px;
  font-family: var(--sans) !important; color: var(--ink); font-size: 0.96875rem; line-height: 1.55;
  font-feature-settings: "ss01", "tnum" 0;
}
html:has(body.curvas) { background: var(--bg2, #eaf6f2); }
body.curvas::before {
  inset: 0; animation: none; background:
    radial-gradient(60% 70% at 100% 0%, var(--glow1), transparent 65%),
    radial-gradient(50% 70% at 0% 100%, var(--glow2), transparent 68%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}
body.curvas::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url(patrones/ondas-t.svg) center / cover no-repeat; opacity: .12;
}
body.curvas ::selection { background: rgba(61,220,151,.35); }
body.curvas h1, body.curvas h2, body.curvas h3 { font-family: var(--sans); color: var(--ink); }
body.curvas h1, body.curvas h2 { font-weight: 300 !important; letter-spacing: -.035em; }
body.curvas h3, body.curvas h4 { font-weight: 500; letter-spacing: -.015em; }
body.curvas :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
body.curvas .font-bold, body.curvas .font-extrabold { font-weight: 600; }
body.curvas .font-semibold { font-weight: 500; }

/* ============ 2 · textos (escala Curvas sobre fondo claro) ============ */
body.curvas .text-white { color: var(--ink) !important; }
body.curvas .text-gray-200 { color: var(--t1) !important; }
body.curvas .text-gray-300 { color: var(--t2) !important; }
body.curvas .text-gray-400 { color: var(--t2) !important; }
body.curvas .text-gray-500, body.curvas .text-gray-600 { color: var(--t3) !important; }
body.curvas .text-primary, body.curvas .text-primary-hover { color: var(--deep) !important; }
body.curvas .text-primary.tracking-\[0\.2em\] { color: var(--deep) !important; font-weight: 500; letter-spacing: .16em; }
body.curvas button.text-primary:not([class*="bg-"]), body.curvas a.text-primary:not([class*="bg-"]) { text-decoration: underline; text-underline-offset: 3px; }
body.curvas .hover\:text-white:hover { color: var(--ink) !important; }
body.curvas .hover\:text-primary-hover:hover { color: var(--ink) !important; }
body.curvas .text-red-300, body.curvas .text-red-400, body.curvas .text-red-500 { color: var(--bad) !important; }
body.curvas .hover\:text-red-300:hover { color: #a82f3e !important; }
body.curvas .text-green-300, body.curvas .text-green-400 { color: var(--ok) !important; }
body.curvas .text-yellow-300, body.curvas .text-yellow-400, body.curvas .text-amber-300, body.curvas .text-amber-400, body.curvas .text-amber-400\/90 { color: #8a5a00 !important; }
body.curvas .text-blue-300 { color: #0a6b8a !important; }
body.curvas .placeholder-gray-500::placeholder, body.curvas input::placeholder, body.curvas textarea::placeholder { color: var(--t3) !important; opacity: .8; }
body.curvas .text-gray-900 { color: var(--ink); }

/* ============ 3 · superficies: tarjetas blancas, bordes finos, sombra suave ============ */
body.curvas .card, body.curvas div.bg-gray-900.rounded-2xl, body.curvas div.bg-gray-900.rounded-3xl, body.curvas section.bg-gray-900.rounded-2xl, body.curvas .glass-tema {
  background: #fff !important; border: 1px solid var(--line) !important; border-radius: 24px !important;
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--card-shadow) !important;
}
body.curvas .card h2, body.curvas .card h3 { color: var(--ink); }
body.curvas .bg-gray-950 { background-color: transparent !important; }
body.curvas .bg-gray-950\/60 { background-color: rgba(255,255,255,.7) !important; }
body.curvas .bg-gray-900, body.curvas .bg-gray-900\/50, body.curvas .bg-gray-900\/60, body.curvas .bg-gray-900\/40 { background-color: #fff !important; }
body.curvas .bg-gray-800:not(input):not(select):not(textarea), body.curvas .bg-gray-800\/40, body.curvas .bg-gray-800\/50, body.curvas .bg-gray-800\/60, body.curvas .bg-gray-800\/80 { background-color: var(--ice) !important; }
body.curvas .bg-gray-700:not(input):not(select):not(textarea), body.curvas .bg-gray-600 { background-color: var(--ice-2) !important; }
body.curvas .hover\:bg-gray-800:hover, body.curvas .hover\:bg-gray-700:hover, body.curvas .hover\:bg-gray-600:hover { background-color: var(--ice-2) !important; }
body.curvas .bg-gray-300 { background-color: var(--line-2) !important; }
body.curvas .bg-white\/10 { background-color: var(--ice-2) !important; }
body.curvas .border-gray-900, body.curvas .border-gray-800, body.curvas .border-gray-700, body.curvas .border-gray-700\/70, body.curvas .border-gray-700\/60 { border-color: var(--line) !important; }
body.curvas .border-gray-600, body.curvas .hover\:border-gray-500:hover, body.curvas .hover\:border-gray-600:hover { border-color: var(--line-2) !important; }
body.curvas .hover\:border-gray-500:hover, body.curvas .hover\:border-primary:hover { border-color: var(--ink) !important; }
body.curvas .border-primary, body.curvas .border-primary\/40, body.curvas .border-primary\/25 { border-color: var(--ink) !important; }
body.curvas .divide-gray-800 > :not([hidden]) ~ :not([hidden]), body.curvas .divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: var(--line) !important; }
body.curvas .ring-gray-900 { --tw-ring-color: #fff; }
body.curvas .ring-primary\/30, body.curvas .focus\:ring-primary:focus { --tw-ring-color: color-mix(in srgb, var(--sky) 30%, transparent); }
body.curvas .shadow-primary\/30, body.curvas .shadow-primary\/5 { --tw-shadow-color: rgba(10,107,93,.2); }
body.curvas .bg-primary\/10, body.curvas .bg-primary\/15, body.curvas .bg-primary\/20 { background-color: var(--ice-2) !important; color: var(--deep); }
body.curvas .hover\:bg-primary\/25:hover, body.curvas .hover\:bg-primary\/30:hover { background-color: var(--tint) !important; }
body.curvas .bg-primary\/70 { background-color: var(--sky) !important; }
body.curvas .bg-red-500\/15, body.curvas .bg-red-400\/15 { background-color: rgba(209,70,86,.1) !important; }
body.curvas .hover\:bg-red-500\/25:hover, body.curvas .hover\:bg-red-500\/30:hover, body.curvas .hover\:bg-red-500\/10:hover { background-color: rgba(209,70,86,.18) !important; }
body.curvas .bg-yellow-400\/10, body.curvas .bg-yellow-400\/15, body.curvas .bg-amber-500\/10 { background-color: #fdf4dc !important; }
body.curvas .border-yellow-400\/30, body.curvas .border-amber-500\/40 { border-color: #ecd28c !important; }
body.curvas .bg-green-500\/15, body.curvas .bg-green-400\/15, body.curvas .hover\:bg-green-500\/25:hover { background-color: #dcf3e8 !important; }
body.curvas .bg-blue-400\/15 { background-color: #dff1f6 !important; }
body.curvas .border-red-500\/60, body.curvas .border-red-500 { border-color: rgba(209,70,86,.55) !important; }
body.curvas .bg-black\/70, body.curvas .bg-black\/60 { background-color: rgba(8,32,42,.42) !important; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.curvas .fixed.inset-0 > div.bg-gray-900 { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.curvas .rounded-2xl, body.curvas .rounded-xl { border-radius: 18px; }

/* ============ 4 · botones: principal en tinta, secundario blanco con borde ============ */
body.curvas .bg-primary, body.curvas .btn-primary, body.curvas .btn-primary-tema {
  background: var(--ink) !important; color: #fff !important; border: 1px solid transparent !important; box-shadow: none !important; font-weight: 500;
  transition: transform 160ms var(--out), background 200ms ease, border-color 200ms ease, color 200ms ease !important;
}
body.curvas .bg-primary .text-white, body.curvas .btn-primary .text-white, body.curvas .bg-primary.text-gray-900 { color: #fff !important; }
body.curvas .hover\:bg-primary-hover:hover, body.curvas .btn-primary:hover:not(:disabled), body.curvas .bg-primary:hover { background: var(--ink-h) !important; box-shadow: none !important; }
body.curvas .hover\:bg-primary:hover { background: var(--ink) !important; color: #fff !important; }
body.curvas .btn-primary, body.curvas .btn-secondary, body.curvas .btn-danger { border-radius: 13px !important; font-weight: 500 !important; letter-spacing: -.01em; }
body.curvas .btn-secondary { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; }
body.curvas .btn-secondary:hover:not(:disabled) { background: #fff !important; border-color: var(--ink) !important; }
body.curvas .btn-danger, body.curvas .bg-red-500:not([class*="/"]) { background: var(--bad) !important; color: #fff !important; box-shadow: none !important; }
body.curvas .btn-primary:active, body.curvas .btn-secondary:active, body.curvas .bg-primary:active { transform: scale(.97); }
body.curvas .disabled\:bg-gray-700:disabled { background: var(--ice-2) !important; color: var(--t3) !important; box-shadow: none !important; }
body.curvas .disabled\:text-gray-500:disabled { color: var(--t3) !important; }
body.curvas .hover\:scale-105:hover { transform: translateY(-1px) !important; }
body.curvas .link-back { color: var(--t2); } body.curvas .link-back:hover { color: var(--ink); }
body.curvas .btn-trash { border-color: rgba(209,70,86,.35) !important; background: rgba(209,70,86,.08) !important; color: var(--bad) !important; }
body.curvas .btn-trash:hover { background: rgba(209,70,86,.16) !important; border-color: rgba(209,70,86,.6) !important; box-shadow: none; }

/* ============ 5 · campos y menús desplegables ============ */
body.curvas input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
body.curvas select, body.curvas textarea, body.curvas .field {
  background-color: #fff !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; border-radius: 12px !important;
  color-scheme: light; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 15px;
}
body.curvas input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):hover:not(:focus):not(:disabled),
body.curvas select:hover:not(:focus):not(:disabled), body.curvas textarea:hover:not(:focus):not(:disabled), body.curvas .field:hover:not(:focus):not(:disabled) { border-color: var(--ink) !important; background-color: #fff !important; }
body.curvas input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):focus,
body.curvas select:focus, body.curvas textarea:focus, body.curvas .field:focus, body.curvas .focus\:border-primary:focus {
  border-color: var(--sky) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 22%, transparent) !important; outline: none !important; background-color: #fff !important;
}
body.curvas select, body.curvas select.field { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233d5762' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") !important; }
body.curvas select option, body.curvas select optgroup { background: #fff; color: var(--ink); }
body.curvas input:disabled, body.curvas select:disabled, body.curvas textarea:disabled { background-color: var(--ice) !important; }
body.curvas input[type="checkbox"], body.curvas input[type="radio"], body.curvas input[type="range"], body.curvas .accent-cyan-400 { accent-color: var(--deep); }
body.curvas input[type="date"]::-webkit-calendar-picker-indicator, body.curvas input[type="time"]::-webkit-calendar-picker-indicator, body.curvas input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: none; opacity: .65; }
body.curvas input:-webkit-autofill, body.curvas input:-webkit-autofill:hover, body.curvas input:-webkit-autofill:focus, body.curvas select:-webkit-autofill, body.curvas textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px #fff inset !important; }
body.curvas label { color: var(--t1); }
body.curvas label.text-gray-300, body.curvas label.text-sm { color: var(--t1) !important; font-weight: 500; }

/* menús con buscador (assets/tema.js) */
body.curvas .dd-btn { background-color: #fff !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; border-radius: 12px !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.curvas .dd-btn:hover:not(:disabled) { border-color: var(--ink) !important; background-color: #fff !important; }
body.curvas .dd-btn:focus-visible, body.curvas .dd-btn[aria-expanded="true"] { border-color: var(--sky) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 22%, transparent) !important; }
body.curvas .dd-btn svg, body.curvas .dd-search-wrap svg { color: var(--t2); }
body.curvas .dd-btn .dd-label.ph { color: var(--t3); }
.dd-panel { background: #fff !important; border: 1px solid var(--line-2) !important; border-radius: 18px !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 30px 60px -28px rgba(3,40,56,.4) !important; color: var(--ink); font-family: 'Geist', system-ui, sans-serif; }
.dd-panel .dd-opt { color: var(--t1); border-radius: 10px; }
.dd-panel .dd-opt svg { color: var(--deep); }
.dd-panel .dd-opt.act { background: var(--ice); color: var(--ink); }
.dd-panel .dd-opt[aria-selected="true"] { background: var(--ice-2); color: var(--ink); font-weight: 500; }
.dd-panel .dd-opt[aria-selected="true"].act { background: var(--tint); }
.dd-panel .dd-group { color: var(--t3); }
.dd-panel .dd-empty { color: var(--t3); }
.dd-panel .dd-search { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line-2) !important; border-radius: 10px !important; }
.dd-panel .dd-search-wrap svg { color: var(--t2); }

/* ============ 6 · opciones elegibles, chips, interruptores ============ */
body.curvas #editBusinessView button.border-2, body.curvas .ob-card button.border-2 {
  border: 1px solid var(--line-2) !important; border-radius: 16px !important; background: #fff !important; color: var(--ink);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms var(--out), box-shadow 200ms ease;
}
body.curvas #editBusinessView button.border-2:hover:not(.border-primary) { background: var(--ice) !important; border-color: var(--ink) !important; }
body.curvas #editBusinessView button.border-2.border-primary, body.curvas .opt.selected, body.curvas .ob-card button.border-2.border-primary {
  background: var(--ice-2) !important; background-image: none !important; border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; animation: none !important;
}
body.curvas #editBusinessView label.flex:has(input[type="radio"]) { border: 1px solid var(--line-2) !important; background: #fff; border-radius: 14px !important; }
body.curvas #editBusinessView label.flex:has(input[type="radio"]):hover { border-color: var(--ink); }
body.curvas #editBusinessView label.flex:has(input[type="radio"]:checked) { border-color: var(--ink) !important; background-color: var(--ice-2) !important; box-shadow: inset 0 0 0 1px var(--ink); }
body.curvas #editBusinessView input[type="radio"] { accent-color: var(--deep); }
body.curvas #editBusinessView input:focus, body.curvas #editBusinessView textarea:focus, body.curvas #editBusinessView select:focus { border-color: var(--sky) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 22%, transparent) !important; }
body.curvas #editLocationsSection .bg-gray-800:not(input):not(select):not(textarea), body.curvas #editSchedulesSection .bg-gray-900\/50:not(input):not(select):not(textarea) { border: 1px solid var(--line); border-radius: 1rem !important; background: var(--ice) !important; }

body.curvas .opt { background: #fff !important; border: 1px solid var(--line-2) !important; border-radius: 16px !important; color: var(--ink); }
body.curvas .opt:hover:not(:disabled):not(.locked) { background: var(--ice) !important; border-color: var(--ink) !important; }
body.curvas .opt.locked:hover { background: #fff !important; border-color: var(--line-2) !important; }
body.curvas .day { color: var(--ink) !important; }
body.curvas .day:hover:not(.disabled):not(.selected) { background: var(--ice-2) !important; }
body.curvas .day.today:not(.selected) { box-shadow: inset 0 0 0 1.5px var(--ink) !important; }
body.curvas .day.selected, body.curvas .slot.selected { background: var(--ink) !important; color: #fff !important; box-shadow: none !important; border-color: var(--ink) !important; }
body.curvas .slot { background: #fff !important; border: 1px solid var(--line-2) !important; color: var(--ink); border-radius: 12px !important; }
body.curvas .slot:hover { background: var(--ice) !important; border-color: var(--ink) !important; }
body.curvas .step-bar { background: var(--ice-2) !important; } body.curvas .step-bar.done { background: var(--grad) !important; box-shadow: none !important; }

body.curvas .loc-n { border: 1px solid var(--line-2); background: #fff; color: var(--ink); border-radius: 14px; }
body.curvas .loc-n:hover { background: var(--ice); border-color: var(--ink); transform: none; }
body.curvas .loc-n.on { background: var(--ice-2); background-image: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); animation: none; color: var(--ink); }

body.curvas .sch-note { border: 1px solid var(--line); background: var(--ice); color: var(--ink); }
body.curvas .sch-note svg { color: var(--deep); }
body.curvas .sch-note p { color: var(--t2); }
body.curvas .sch-bulk, body.curvas .sch-presets, body.curvas .fer-rangos { border: 1px solid var(--line); background: var(--ice); }
body.curvas .sch-presets p { color: var(--t2); }
body.curvas .sch-chip, body.curvas .sch-tab, body.curvas .sch-quick { border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
body.curvas .sch-chip:hover, body.curvas .sch-tab:hover, body.curvas .sch-quick:hover { background: var(--ice); border-color: var(--ink); color: var(--ink); }
body.curvas .sch-chip.on, body.curvas .sch-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
body.curvas .sch-apply, body.curvas .sch-add { box-shadow: none; }
body.curvas .sch-add { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
body.curvas .sch-add:hover { background: var(--ice); border-color: var(--ink); }
body.curvas .sch-axis { color: var(--t3); }
body.curvas .sch-day { border: 1px solid var(--line); background: #fff; }
body.curvas .sch-day:hover { background: var(--ice); border-color: var(--line-2); }
body.curvas .sch-day.err { border-color: rgba(209,70,86,.6); }
body.curvas .sch-dot { background: var(--line-2); } body.curvas .sch-day.open .sch-dot { background: var(--sky); }
body.curvas .sch-bar { background-color: var(--ice-2); background-image: linear-gradient(90deg, transparent 24.8%, rgba(8,32,42,.14) 25%, transparent 25.2%, transparent 49.8%, rgba(8,32,42,.14) 50%, transparent 50.2%, transparent 74.8%, rgba(8,32,42,.14) 75%, transparent 75.2%); }
body.curvas .sch-bar i { background: var(--grad); box-shadow: none; }
body.curvas .sch-sw { background: var(--line-2); border-color: transparent; }
body.curvas .sch-sw.on { background: var(--grad); }
body.curvas .sch-x { color: var(--t3); }
body.curvas .sch-copy { border: 1px solid var(--line-2); background: var(--ice); }
body.curvas .sch-copy > p, body.curvas .sch-closed, body.curvas .sch-range span, body.curvas .sch-name small { color: var(--t2); }
body.curvas .fer-sub { border-top-color: var(--line); }

body.curvas .sug { border: 1px solid var(--line); background: #fff; }
body.curvas .sug > summary { background: var(--ice); }
body.curvas .sug > summary svg { color: var(--t2); }
body.curvas .sug-t b, body.curvas .sug-q { color: var(--ink); } body.curvas .sug-t small, body.curvas .sug-tag { color: var(--t2); }
body.curvas .sug-item:hover, body.curvas .sug-item.open { background: var(--ice); border-color: var(--line); }
body.curvas .sug-st { border: 1px solid var(--line-2); background: #fff; color: var(--t1); }
body.curvas .sug-item.done .sug-st { color: var(--ok); border-color: rgba(14,122,82,.4); background: #e3f6ec; }
body.curvas .sug-item.done .sug-p, body.curvas .sug-cancel { color: var(--t3); } body.curvas .sug-cancel:hover { color: var(--ink); }

/* ============ 7 · panel lateral, manija y barra inferior ============ */
body.curvas .side-panel {
  background: rgba(255,255,255,.94) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-right: 1px solid var(--line) !important; box-shadow: 30px 0 60px -50px rgba(3,40,56,.4);
}
body.curvas .side-brand img:first-child { height: 30px; } body.curvas .side-brand img:last-child { height: 14px; }
body.curvas .panel-nav-btn { color: var(--t1); font-weight: 400; font-size: 14.5px; border-radius: 12px; gap: 12px; transition: background 180ms ease, color 180ms ease; }
body.curvas .panel-nav-btn svg, body.curvas .side-item svg { color: var(--t2); transition: color 180ms ease; }
body.curvas .panel-nav-btn:hover, body.curvas .side-item:hover { background: var(--ice); color: var(--ink); }
body.curvas .panel-nav-btn:hover svg, body.curvas .side-item:hover svg { color: var(--ink); }
body.curvas .panel-nav-btn.is-on { background: var(--ink) !important; background-image: none !important; border-color: transparent; color: #fff; box-shadow: none; animation: none !important; font-weight: 500; }
body.curvas .panel-nav-btn.is-on svg { color: #fff; }
body.curvas .side-item { color: var(--t1); font-weight: 400; border-radius: 12px; }
body.curvas .side-tools { border-top: 1px solid var(--line); }
body.curvas .side-user { border: 1px solid var(--line); background: var(--ice); color: var(--ink); border-radius: 14px; }
body.curvas .side-user:hover { background: var(--ice-2); }
body.curvas .side-user .av { background: var(--grad); color: #fff; }
body.curvas .side-user svg { color: var(--t2); }
body.curvas .side-user #userNameDisplay { font-weight: 500; }
body.curvas .nav-handle { background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-left: 0; box-shadow: 8px 8px 24px -12px rgba(3,40,56,.35); }
body.curvas .nav-handle:hover { background: var(--ice); }
body.curvas .nav-scrim { background: rgba(8,32,42,.34); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
body.curvas .nav-dock { background: rgba(255,255,255,.94); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px rgba(3,40,56,.45); }
body.curvas .nav-dock button { color: var(--t2); font-family: var(--sans); }
body.curvas .nav-dock svg { color: var(--t2); }
body.curvas .nav-dock button:hover { color: var(--ink); background: var(--ice); }
body.curvas .crm-badge, body.curvas .side-item .badge-n { background: var(--bad); color: #fff; }
@media (max-width: 900px) { body.curvas .nav-open .side-panel { box-shadow: 24px 0 60px rgba(3,40,56,.35); } }

/* menús flotantes (notificaciones, usuario) */
body.curvas #notificationsDropdown, body.curvas #userMenuDropdown, body.curvas .absolute.bg-gray-900[class*="shadow"] {
  background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line-2) !important; border-radius: 18px !important;
  box-shadow: 0 30px 60px -28px rgba(3,40,56,.4) !important;
}
body.curvas #userMenuDropdown button:hover, body.curvas #notificationsDropdown button:hover { background: var(--ice) !important; }
body.curvas #notificationsDropdown .bg-gray-800 { background: var(--ice) !important; }
body.curvas #userMenuDropdown .text-primary, body.curvas #notificationsDropdown .text-primary { color: var(--deep) !important; }
body.curvas #userMenuDropdown button.text-red-400:hover { background: rgba(209,70,86,.08) !important; }

/* ============ 8 · encabezado de sección y contenido ============ */
body.curvas main { color: var(--ink); }
body.curvas #panelTitle { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -.045em; font-weight: 300 !important; color: var(--ink) !important; }
body.curvas #editBusinessView .mb-6 > p.text-primary { color: var(--deep) !important; letter-spacing: .16em; font-weight: 500; }
body.curvas #editBusinessView .space-y-6 > div.bg-gray-900, body.curvas #editBusinessView .panel-pane > div.bg-gray-900 {
  border: 1px solid var(--line) !important; border-radius: 24px !important; box-shadow: var(--card-shadow) !important; padding: clamp(20px, 3vw, 32px);
}
body.curvas #editBusinessView .space-y-6 > div.bg-gray-900:hover { border-color: color-mix(in srgb, var(--sky) 50%, #fff) !important; box-shadow: 0 40px 70px -40px rgba(10,106,90,.45) !important; }
body.curvas #editBusinessView h2 { font-size: 1.3rem; font-weight: 400 !important; letter-spacing: -.025em; }
body.curvas #editBusinessView h2::before { background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); border-radius: 12px; font-weight: 500; }
body.curvas .panel-pane h3.text-lg, body.curvas .panel-pane h3.text-xl { letter-spacing: -.02em; }
body.curvas .loading-dots { color: var(--deep) !important; }
body.curvas hr, body.curvas .border-t, body.curvas .border-b { border-color: var(--line); }
body.curvas table { color: var(--ink); } body.curvas th { color: var(--t2); font-weight: 500; }
body.curvas .light-theme #editBusinessView .bg-gray-800 { background-color: var(--ice) !important; }

/* calendario */
body.curvas .cal-view-btn { color: var(--t2); }
body.curvas #calBody { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--card-shadow); overflow: hidden; }
body.curvas #calBody .border-gray-800 { border-color: var(--line) !important; }
body.curvas #calBody .text-gray-500 { color: var(--t2) !important; }
body.curvas #calBody button.rounded-lg { border-radius: 14px !important; background: var(--ice); border-color: var(--line) !important; }
body.curvas #calBody button.rounded-lg:hover { background: var(--ice-2); border-color: var(--line-2) !important; }
body.curvas #pane-calendario > div { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }

/* avisos */
body.curvas #toastContainer > div, #toastContainer > div {
  background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line-2) !important; border-radius: 16px !important;
  box-shadow: 0 30px 60px -28px rgba(3,40,56,.45) !important; color: var(--ink); font-family: 'Geist', system-ui, sans-serif;
}
body.curvas #toastContainer > div.border-primary { border-color: rgba(14,122,82,.5) !important; }
body.curvas #toastContainer > div.border-red-500 { border-color: rgba(209,70,86,.5) !important; }
body.curvas #toastContainer .text-primary { color: var(--ok) !important; background: #dcf3e8; border: 1px solid rgba(14,122,82,.3); }
body.curvas #toastContainer .text-red-500 { color: var(--bad) !important; background: rgba(209,70,86,.1); border: 1px solid rgba(209,70,86,.3); }
body.curvas #toastContainer h4 { color: var(--ink); font-weight: 500; }
body.curvas #toastContainer p { color: var(--t2) !important; }

/* simulador del chatbot */
body.curvas .sim-ventana { border: 1px solid var(--line); background: #fff; box-shadow: var(--card-shadow); }
body.curvas .sim-cabecera { background: var(--ice); border-bottom: 1px solid var(--line); }
body.curvas .sim-cabecera small { color: var(--ok); }
body.curvas .sim-mensajes { background: linear-gradient(180deg, #f6fbf9, #eef7f4); }
body.curvas .sim-avatar { background: var(--grad); }
body.curvas .sim-fila.bot .sim-burbuja { background: #fff; border: 1px solid var(--line); color: var(--ink); }
body.curvas .sim-fila.yo .sim-burbuja { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
body.curvas .sim-burbuja a { color: var(--deep); } body.curvas .sim-fila.yo .sim-burbuja a { color: #7ff0c8; }
body.curvas .sim-accion { border: 1px solid var(--line-2); background: #fff; color: var(--deep); }
body.curvas .sim-accion:hover:not(:disabled) { background: var(--ice); border-color: var(--ink); }
body.curvas .sim-fila-lista { color: var(--ink); }
body.curvas .sim-nota { color: #6f4a00; background: #fdf4dc; border: 1px solid #ecd28c; }
body.curvas .sim-nota.error { color: #8a2433; background: #fbe6e9; border-color: #efb4bd; }
body.curvas .sim-entrada { border-top: 1px solid var(--line); background: #fff; }
body.curvas .sim-entrada button { background: var(--ink); border: 0; color: #fff; }
body.curvas .sim-sugerencia { border: 1px solid var(--line-2); background: #fff; color: var(--t1); }
body.curvas .sim-sugerencia:hover { background: var(--ice); color: var(--ink); border-color: var(--ink); }
body.curvas .perfil-dia { border-bottom-color: var(--line); }

/* mapa (Leaflet) y selección de ubicación */
body.curvas .leaflet-container { font-family: var(--sans); border-radius: 18px; background: var(--ice-2); }
body.curvas .leaflet-container a { color: var(--deep); }
body.curvas .leaflet-bar a, body.curvas .leaflet-bar a:hover { background: #fff; color: var(--ink); border-color: var(--line-2); }
body.curvas .leaflet-bar a:hover { background: var(--ice); }
body.curvas .leaflet-popup-content-wrapper, body.curvas .leaflet-popup-tip { background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(3,40,56,.5); }

/* barras de desplazamiento discretas */
body.curvas * { scrollbar-width: thin !important; scrollbar-color: var(--line-2) transparent; }
body.curvas *::-webkit-scrollbar { display: block; width: 8px; height: 8px; }
body.curvas *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
body.curvas #panelNav::-webkit-scrollbar, body.curvas .side-panel *::-webkit-scrollbar { display: none; }

/* pie */
body.curvas footer, body.curvas footer * { color: var(--t3) !important; }

/* ============ 9 · CRM de WhatsApp: mismo estilo y distribución que la sección CRM de la página de inicio ============ */
body.curvas .crm-win { border-radius: 20px; background: #fff; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 50px 90px -50px rgba(3,40,56,.55); }
body.curvas .crm-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
body.curvas .crm-tab { padding: 6px 13px; border: 0; border-radius: 9px; font: 400 13.5px var(--sans); color: var(--t2); background: transparent; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
body.curvas .crm-tab:hover { background: var(--ice); color: var(--ink); }
body.curvas .crm-tab.is-on { background: var(--ink); color: #fff; }
body.curvas .crm-top em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--t3); }
body.curvas .crm-badge { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px; background: linear-gradient(140deg, var(--g1d), var(--g2d)); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
body.curvas .crm-badge.hidden { display: none; }
body.curvas .crm-3 { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; height: clamp(520px, calc(100vh - 250px), 760px); }
body.curvas .crm-3.hidden { display: none; }
/* lista de chats */
body.curvas .cl { background: var(--ice); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
body.curvas .cl-q { margin: 12px 12px 8px; padding: 9px 12px; border-radius: 10px; background: #fff !important; border: 1px solid var(--line) !important; font-size: 13px; color: var(--ink) !important; min-height: 40px; width: calc(100% - 24px); }
body.curvas .cl-f { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; align-items: center; }
body.curvas .cl-f button { font: 400 12px var(--sans); padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--t2); cursor: pointer; transition: border-color 160ms ease; }
body.curvas .cl-f button:hover:not(.on) { border-color: var(--ink); }
body.curvas .cl-f button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
body.curvas .cl-f .dd-btn, body.curvas .cl-f select { min-height: 0 !important; height: 26px; padding: 0 8px !important; font-size: 12px; border-radius: 8px !important; gap: 4px; width: auto; border: 1px solid var(--line) !important; background: #fff !important; color: var(--t2) !important; }
body.curvas .cl-f .dd-btn svg { width: 12px; height: 12px; }
body.curvas .cl-list { flex: 1; overflow-y: auto; min-height: 0; }
body.curvas .cl-i { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background 160ms ease, transform 160ms var(--out); }
body.curvas .cl-i:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { body.curvas .cl-i:hover { background: rgba(255,255,255,.7); } }
body.curvas .cl-i[aria-pressed="true"] { background: #fff; box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--deep) 50%, transparent); }
body.curvas .cav { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 500; font-size: 13px; background: linear-gradient(140deg, var(--g1d), var(--g2d)); }
body.curvas .cav.a1 { background: linear-gradient(140deg, var(--g2), var(--g1d)); } body.curvas .cav.a2 { background: linear-gradient(140deg, var(--g1), var(--g2d)); } body.curvas .cav.a3 { background: linear-gradient(140deg, var(--g2d), var(--g1)); }
body.curvas .cl-i .tx { min-width: 0; flex: 1; }
body.curvas .cl-i .nm { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
body.curvas .cl-i .nm time { font-size: 11.5px; font-weight: 400; color: var(--t3); flex: none; }
body.curvas .cl-i .pv { display: block; font-size: 12.5px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
body.curvas .cl-i .tg, body.curvas .cp .tg { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
body.curvas .cn { margin-left: 4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px; background: linear-gradient(140deg, var(--g1d), var(--g2d)); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; align-self: center; }
body.curvas .pill-s { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--ice-2); color: var(--t2); }
body.curvas .pill-s i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--sky)); }
body.curvas .pill-s.g { background: #e3f6ee; color: #0b5c3e; } body.curvas .pill-s.y { background: #fff1d6; color: #7a4d00; } body.curvas .pill-s.b { background: var(--tint); color: var(--deep); } body.curvas .pill-s.r { background: #fbe6e9; color: #8a2433; }
body.curvas .cl-vacio { padding: 20px 16px; font-size: 13px; color: var(--t3); text-align: center; }
/* conversación */
body.curvas .cc { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
body.curvas .cc-vacio { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; font-size: 14px; color: var(--t3); }
body.curvas .cc-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
body.curvas .cc-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
body.curvas .cc-h b { font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
body.curvas .cc-h small { color: var(--t3); font-size: 13px; }
body.curvas .cc-h .estado { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--ice-2); font-size: 12.5px; }
body.curvas .estado button, body.curvas .estado > span { padding: 5px 11px; border-radius: 8px; border: 0; background: transparent; color: var(--t2); font: inherit; cursor: pointer; }
body.curvas .estado .on { background: linear-gradient(140deg, var(--g1d), var(--g2d)); color: #fff; cursor: default; } body.curvas .estado .on.bad { background: var(--bad); }
body.curvas .cc-b { padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 400 12.5px var(--sans); cursor: pointer; }
body.curvas .cc-b:hover { border-color: var(--ink); }
body.curvas .cc-perfil { display: none; }
body.curvas .cc-m { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 8px; align-content: start; padding: 16px 18px; background-image: radial-gradient(color-mix(in srgb, var(--deep) 10%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
body.curvas .cm { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
body.curvas .cm small { display: block; font-size: 11px; font-weight: 600; margin-bottom: 2px; }
body.curvas .cm.in { justify-self: start; background: var(--ice-2); border-bottom-left-radius: 4px; }
body.curvas .cm.bot { justify-self: end; color: #fff; background: linear-gradient(140deg, var(--g1d), var(--g2d)); border-bottom-right-radius: 4px; } body.curvas .cm.bot small { color: rgba(255,255,255,.85); }
body.curvas .cm.own { justify-self: end; background: #e3f6ee; color: #0b3d2b; border-bottom-right-radius: 4px; } body.curvas .cm.own small { color: #0b5c3e; }
body.curvas .cm.sys { justify-self: center; max-width: 92%; background: #fff; border: 1px dashed var(--line-2); color: var(--t2); font-size: 12.5px; padding: 6px 12px; border-radius: 10px; }
body.curvas .cm.hist { opacity: .75; }
body.curvas .cm .crm-med { display: block; margin: 2px 0 4px; white-space: normal; }
body.curvas .cm .crm-med img, body.curvas .cm .crm-med video { display: block; max-width: min(260px, 100%); max-height: 300px; border-radius: 10px; cursor: zoom-in; background: rgba(0,0,0,.06); }
body.curvas .cm .crm-med video { cursor: default; }
body.curvas .cm .crm-med audio { display: block; width: min(260px, 100%); height: 36px; }
body.curvas .cm .crm-med a { color: inherit; text-decoration: underline; }
body.curvas .cm .crm-med.nota { font-size: 12.5px; opacity: .75; font-style: italic; }
body.curvas .cc-c .inp .adj { background: transparent; color: var(--t2); } body.curvas .cc-c .inp .adj:hover:not(:disabled) { background: var(--ice-2); color: var(--ink); }
body.curvas .cc-adj { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 6px 10px; border-radius: 10px; background: var(--ice-2); font-size: 12.5px; color: var(--ink); }
body.curvas .cc-adj span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.curvas .cc-adj button { border: 0; background: transparent; color: var(--t2); cursor: pointer; font-size: 12.5px; text-decoration: underline; }
body.curvas .cm .meta { display: flex; justify-content: flex-end; gap: 6px; font-size: 10.5px; opacity: .75; margin-top: 3px; }
body.curvas .cm .crm-card { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--deep) 50%, transparent); display: grid; gap: 2px; white-space: normal; }
body.curvas .cm .crm-card > b { font-weight: 500; font-size: 13px; } body.curvas .cm .crm-card span { color: var(--t2); } body.curvas .cm .crm-card b.ok { color: var(--ok); } body.curvas .cm .crm-card a { color: var(--deep); text-decoration: underline; }
body.curvas .cm .crm-leido { color: #7ff0c8; } body.curvas .cm.in .crm-leido, body.curvas .cm.own .crm-leido { color: var(--deep); } body.curvas .cm .crm-fallo { color: #ffd0d6; } body.curvas .cm.in .crm-fallo, body.curvas .cm.own .crm-fallo { color: var(--bad); }
/* redactar */
body.curvas .cc-c { padding: 12px 16px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
body.curvas .cc-c .inp { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--ice); }
body.curvas .cc-c .inp textarea { flex: 1; min-width: 0; resize: none; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 7px 0 !important; min-height: 0 !important; max-height: 120px; font-size: 14px; color: var(--ink) !important; outline: none; }
body.curvas .cc-c .inp button { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
body.curvas .cc-c .inp button:hover:not(:disabled) { background: var(--ink-h); } body.curvas .cc-c .inp button:disabled { opacity: .5; } body.curvas .cc-c .inp svg { width: 18px; height: 18px; }
body.curvas .cc-c .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.curvas .cc-c .row button { font: 400 12.5px var(--sans); padding: 5px 11px; border-radius: 8px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; transition: border-color 160ms ease; }
body.curvas .cc-c .row button:hover { border-color: var(--ink); }
body.curvas .cc-pausa { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t2); cursor: pointer; }
body.curvas .cc-pausa input { position: absolute; opacity: 0; pointer-events: none; }
body.curvas .cc-pausa i { position: relative; width: 30px; height: 17px; border-radius: 999px; background: var(--line-2); transition: background 200ms ease; flex: none; }
body.curvas .cc-pausa i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform 200ms var(--out); }
body.curvas .cc-pausa:has(input:checked) i { background: linear-gradient(140deg, var(--g1d), var(--g2d)); } body.curvas .cc-pausa:has(input:checked) i::after { transform: translateX(13px); }
body.curvas .cc-pausa:has(input:focus-visible) i { outline: 2px solid var(--blue); outline-offset: 2px; }
body.curvas .cc-aviso { padding: 9px 12px; border-radius: 10px; font-size: 12.5px; color: #6f4a00; background: #fdf4dc; border: 1px solid #ecd28c; }
/* ficha del cliente */
body.curvas .cp { background: var(--ice); border-left: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow-y: auto; }
body.curvas .cp-vacio { font-size: 13px; color: var(--t3); text-align: center; padding: 20px 8px; }
body.curvas .cp-h { display: flex; align-items: center; gap: 12px; } body.curvas .cp-h .cav { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; } body.curvas .cp-h b { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; } body.curvas .cp-h small { color: var(--t3); font-size: 12.5px; }
body.curvas .cp .tg { margin-top: 0; }
body.curvas .cp-k { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } body.curvas .cp-k > div { padding: 10px 12px; border-radius: 12px; background: #fff; font-size: 12px; color: var(--t2); }
body.curvas .cp-k b { display: block; font-size: 19px; font-weight: 300; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; } body.curvas .cp-k b.sm { font-size: 14px; padding-top: 4px; font-weight: 400; letter-spacing: 0; }
body.curvas .cp-r { display: grid; gap: 6px; font-size: 13px; } body.curvas .cp-r > div { display: flex; justify-content: space-between; gap: 10px; } body.curvas .cp-r span { color: var(--t2); } body.curvas .cp-r b { font-weight: 500; text-align: right; }
body.curvas .cp h4 { font-size: 12px; font-weight: 500; color: var(--t2); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
body.curvas .cp-n { width: 100%; padding: 10px 12px !important; border-radius: 12px !important; background: #fff !important; border: 1px solid transparent !important; font-size: 13px; color: var(--t1) !important; min-height: 64px; resize: vertical; }
body.curvas .cp-n:focus { border-color: var(--sky) !important; }
body.curvas .cp-hist { display: grid; gap: 6px; } body.curvas .cp-hist > div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; background: #fff; font-size: 12.5px; } body.curvas .cp-hist span { color: var(--t2); } body.curvas .cp-hist b { font-weight: 500; white-space: nowrap; }
body.curvas .cp-b { display: flex; gap: 8px; margin-top: auto; } body.curvas .cp-b button { flex: 1; text-align: center; font: 400 12.5px var(--sans); padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; } body.curvas .cp-b button:hover { border-color: var(--ink); } body.curvas .cp-b button.p { background: var(--ink); border-color: var(--ink); color: #fff; }
body.curvas .crm-atras { display: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
/* contactos dentro de la ventana */
body.curvas #crmContactos { background: #fff !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 18px !important; }
/* pantallas medianas y chicas: la ficha pasa al botón "Perfil"; en el celular se ve un panel por vez */
@media (max-width: 1100px) { body.curvas .crm-3 { grid-template-columns: 260px minmax(0, 1fr); } body.curvas .cp { display: none; } body.curvas .cc-perfil { display: inline-block; } }
@media (max-width: 720px) {
  body.curvas .crm-3 { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 300px); min-height: 460px; }
  body.curvas .crm-3 .cc { display: none; } body.curvas .crm-3.ver-chat .cl { display: none; } body.curvas .crm-3.ver-chat .cc { display: flex; }
  body.curvas .crm-atras { display: inline-grid; place-items: center; } body.curvas .cm { max-width: 90%; } body.curvas .crm-top em { display: none; }
  body.curvas .cc-pausa { margin-left: 0; }
}

/* gráficos y tarjetas de datos */
body.curvas .h-2.rounded-full.bg-primary, body.curvas .h-2.bg-primary { background: var(--grad) !important; }
body.curvas .h-2.bg-gray-800 { background-color: var(--ice-2) !important; }
body.curvas .rounded-full.bg-primary.ring-2 { background: var(--sky) !important; }
body.curvas .bg-primary\/70 { background: var(--grad) !important; opacity: .85; }
body.curvas .hover\:bg-primary\/70:hover, body.curvas .bg-primary\/70:hover { opacity: 1; background: var(--grad) !important; }
body.curvas .bg-gray-800\/60.border.rounded-xl { background: var(--ice) !important; border-color: var(--line) !important; }
body.curvas .text-2xl.font-light.text-primary { color: var(--deep) !important; }

/* íconos de tarjeta: cuadrado con el degradado de marca y símbolo blanco */
body.curvas div.bg-primary\/15.ring-1, body.curvas div.rounded-full.bg-primary\/20, body.curvas div.rounded-xl.bg-primary\/20 { background: var(--grad) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); --tw-ring-color: transparent; color: #fff; }
body.curvas div.bg-primary\/15.ring-1 svg, body.curvas div.rounded-full.bg-primary\/20 svg, body.curvas div.rounded-xl.bg-primary\/20 svg { color: #fff !important; }

/* selección de cantidad: el brillo animado de tema.css se anula con la misma prioridad */
body.curvas .loc-n.on { background: var(--ice-2) !important; background-image: none !important; border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); animation: none !important; }
body.curvas .opt.selected, body.curvas .nav[aria-current="page"] { background-image: none !important; animation: none !important; }

/* asistente: todas las opciones elegibles comparten superficie (blanco), igual que en el panel */
body.curvas #onboardingModal .ob-card button.border-2:not(.border-primary), body.curvas #onboardingModal .ob-card div.border-2:not(.border-primary) { background-color: #fff !important; border: 1px solid var(--line-2) !important; border-radius: 16px !important; }
body.curvas #onboardingModal .ob-card button.border-2:not(.border-primary):hover { background-color: var(--ice) !important; border-color: var(--ink) !important; transform: translateY(-1px); }
body.curvas #onboardingModal .ob-card button.border-2.border-primary { background-color: var(--ice-2) !important; border: 1px solid var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; }

body.curvas button.bg-primary\/20, body.curvas button.bg-primary\/15, body.curvas button.bg-primary\/10 { background: var(--ice-2) !important; color: var(--deep) !important; border: 1px solid transparent; font-weight: 500; border-radius: 12px; }
body.curvas button.bg-primary\/20:hover, body.curvas button.bg-primary\/15:hover { background: var(--tint) !important; }

/* calendario: una sola tarjeta con barra de herramientas, leyenda y grilla */
body.curvas #pane-calendario > div { background: #fff !important; border: 1px solid var(--line) !important; border-radius: 24px !important; box-shadow: var(--card-shadow) !important; padding: clamp(14px, 2.4vw, 24px) !important; }
body.curvas #calBody { border: 1px solid var(--line); border-radius: 18px; box-shadow: none; }
body.curvas #calBody .bg-white\/10 { background-color: var(--ice-2) !important; }

/* ============ 10 · páginas públicas (agendar, reprogramar, mis turnos, cancelar, invitación, restablecer) ============ */
body.curvas header:not(.side-panel) { background: rgba(255,255,255,.86) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line) !important; }
body.curvas header:not(.side-panel) img.h-10 { height: 34px; width: auto; } body.curvas header:not(.side-panel) img.h-6 { height: 15px; }
body.curvas footer { border-color: var(--line) !important; background: transparent !important; }
body.curvas main h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.06; letter-spacing: -.04em; }
body.curvas .card { padding: clamp(20px, 3.4vw, 36px); }
body.curvas .card h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 300 !important; letter-spacing: -.03em; }
body.curvas .opt { padding: 1rem 1.25rem; transition: transform 220ms var(--out), border-color 200ms ease, background 200ms ease, box-shadow 200ms ease; }
body.curvas .opt h3 { color: var(--ink); font-weight: 500; }
body.curvas .opt.selected { background: var(--ice-2) !important; border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; }
body.curvas .day.disabled { opacity: .35; }
body.curvas .slot.selected small { opacity: .85; }
body.curvas .btn-primary, body.curvas .btn-secondary, body.curvas .btn-danger { min-height: 50px; }
body.curvas .btn-danger:hover:not(:disabled) { background: #b83a49 !important; }
body.curvas #confirmRows > div { border-color: var(--line) !important; }
body.curvas .border-gray-800\/70 { border-color: var(--line) !important; }
body.curvas .bg-gray-950\/80 { background-color: rgba(255,255,255,.86) !important; }

/* ============ 11 · ajustes de usabilidad ============ */
/* progreso del asistente: un degradado continuo que se estira, con un corte por paso */
body.curvas #onboardingModal .ob-bars, body.curvas .ob-bars {
  display: block !important; position: relative; height: 8px; margin-top: 4px; border-radius: 999px; overflow: hidden; background: var(--line);
  --corte: 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--corte)), transparent 0); mask-image: linear-gradient(90deg, #000 calc(100% - var(--corte)), transparent 0);
  -webkit-mask-size: calc(100% / var(--n, 10)) 100%; mask-size: calc(100% / var(--n, 10)) 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
}
body.curvas .ob-bars .ob-fill { display: block; height: 100%; width: 0; border-radius: 0; background: linear-gradient(90deg, var(--g1), var(--g2)) !important; background-image: linear-gradient(90deg, var(--g1), var(--g2)) !important; box-shadow: none !important; transition: width 900ms var(--out); }
body.curvas .ob-step { font-size: 12.5px; letter-spacing: .1em; font-weight: 500; }
body.curvas .ob-step-name { color: var(--deep); font-weight: 600; }

/* horarios: sin barra de 24 h; la hora se lee en los campos y el resumen del día */
body.curvas .sch-day { grid-template-columns: 190px minmax(0, 1fr); align-items: center; padding: 14px 18px; }
body.curvas .sch-name { grid-row: auto; }
body.curvas .sch-name small { color: var(--deep); font-weight: 500; font-size: 12.5px; }
body.curvas .sch-day.closed .sch-name small { color: var(--t3); font-weight: 400; }
body.curvas .sch-acts { margin-left: auto; }
@media (max-width: 640px) { body.curvas .sch-day { grid-template-columns: minmax(0, 1fr); } }

/* ubicación: la dirección en el mapa es lo primero y se nota */
body.curvas .loc-pick { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 16px 18px; text-align: left; cursor: pointer; border-radius: 18px; border: 2px dashed var(--sky); background: linear-gradient(135deg, var(--ice-2), var(--ice)); color: var(--ink); transition: transform 200ms var(--out), box-shadow 200ms ease, border-color 200ms ease; animation: locPulse 2.6s ease-in-out infinite; }
body.curvas .loc-pick:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -22px rgba(10,106,90,.7); border-color: var(--deep); }
body.curvas .loc-pick-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
body.curvas .loc-pick-ic svg { width: 24px; height: 24px; }
body.curvas .loc-pick-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
body.curvas .loc-pick-tx b { font-weight: 500; font-size: 16px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.curvas .loc-pick-tx small { color: var(--t2); font-size: 13px; }
body.curvas .loc-pick-go { flex: none; padding: 9px 16px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; }
body.curvas .loc-pick.ok { border: 1px solid var(--line-2); background: #fff; animation: none; }
body.curvas .loc-pick.ok .loc-pick-ic { background: linear-gradient(140deg, #46b47d, #0e8f78); }
body.curvas .loc-pick.ok .loc-pick-go { background: var(--ice-2); color: var(--ink); }
@keyframes locPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sky) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sky) 16%, transparent); } }
@media (max-width: 560px) { body.curvas .loc-pick { flex-wrap: wrap; } body.curvas .loc-pick-go { width: 100%; text-align: center; } body.curvas .loc-pick-tx b { white-space: normal; } }
body.curvas .sch-ranges { display: grid; gap: 8px; justify-items: start; }
body.curvas .sch-acts { margin-left: 0; }
body.curvas .loc-pick.sacude { animation: locSacude 500ms ease both; border-color: var(--bad); }
@keyframes locSacude { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* selector de ubicación: más grande y con pasos a la vista */
body.curvas #mapPickerModal > div { width: min(860px, 100%); max-height: 94vh; }
body.curvas #mapContainer { min-height: 340px; border: 1px solid var(--line-2); border-radius: 16px; }
body.curvas .map-pasos { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: -4px 0 0; font-size: 13.5px; color: var(--t1); }
body.curvas .map-pasos li { display: inline-flex; align-items: center; gap: 8px; }
body.curvas .map-pasos b { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--grad); }
body.curvas #mapSugerencias { border-color: var(--line-2) !important; border-radius: 14px; box-shadow: 0 30px 60px -28px rgba(3,40,56,.4); }
body.curvas #mapSugerencias button { color: var(--t1) !important; } body.curvas #mapSugerencias button:hover { background: var(--ice) !important; }
body.curvas #mapSugerencias li { color: var(--t2); }
/* el botón fijo "Guardar cambios" no tapa la última tarjeta */
body.curvas #editBusinessView { padding-bottom: 96px; }
/* fondo atenuado en todas las ventanas emergentes (algunas no traían uno propio) */
body.curvas .fixed.inset-0.z-50.items-center.justify-center:not(.ob-modal) { background-color: rgba(8,32,42,.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ============ 12 · pantalla de carga: un chat que "escribe" sobre un fondo claro con luces que flotan ============ */
body.curvas #pageLoader {
  position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 30px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #f3fbf8, #e3f3ef) !important;
}
body.curvas #pageLoader::before {
  content: ""; position: absolute; inset: -25%; z-index: -2; pointer-events: none; will-change: transform;
  background:
    radial-gradient(30% 36% at 22% 30%, rgba(40,205,140,.75), transparent 72%),
    radial-gradient(32% 38% at 78% 24%, rgba(34,200,230,.65), transparent 72%),
    radial-gradient(36% 40% at 70% 78%, rgba(25,194,138,.7), transparent 72%),
    radial-gradient(30% 34% at 26% 76%, rgba(14,147,168,.55), transparent 72%);
  animation: plLuces 9s ease-in-out infinite alternate;
}
body.curvas #pageLoader::after { content: none; }
body.curvas #pageLoader img.pl-mark { position: relative; z-index: 1; order: 1; width: 112px; height: 112px; padding: 25px; border-radius: 34px; background: #fff; filter: none !important; box-shadow: 0 30px 50px -28px rgba(10,106,130,.6), 0 0 0 1px rgba(8,32,42,.05); animation: plFlota 3s ease-in-out infinite; }
body.curvas #pageLoader .loading-dots { position: relative; z-index: 1; order: 2; display: inline-flex; align-items: center; gap: 9px; padding: 0; background: none; box-shadow: none; animation: plBurbuja 600ms var(--out) both; }
body.curvas #pageLoader .loading-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); opacity: .9; animation: plTecleo 1.2s ease-in-out infinite both; }
body.curvas #pageLoader .loading-dots span:nth-child(1) { animation-delay: 0s; } body.curvas #pageLoader .loading-dots span:nth-child(2) { animation-delay: .15s; } body.curvas #pageLoader .loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes plLuces { 0% { transform: translate3d(-4%, 3%, 0) rotate(0deg) scale(1); } 100% { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.12); } }
@keyframes plFlota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes plBurbuja { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes plTecleo { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.curvas #pageLoader::before, body.curvas #pageLoader img.pl-mark, body.curvas #pageLoader .loading-dots span { animation: none !important; } }

/* aviso de horario fuera del negocio: alerta amable, no bloquea */
body.curvas .aviso-horario { grid-column: 1 / -1; flex-basis: 100%; display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; color: #6f4a00; background: #fdf4dc; border: 1px solid #ecd28c; }
body.curvas .aviso-horario svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }


/* ============ 13 · personalización: temas de color y preferencias visuales (se guardan por usuario) ============ */
html[data-tema="oceano"] body.curvas { --g1: #38a3e8; --g2: #2563c9; --g1d: #1f7fc7; --g2d: #1b57b0; --deep: #0f4f8a; --sky: #2f8fe0; --ink: #0a1f33; --ink-h: #1b3d5f; --ice: #f2f7fc; --ice-2: #e6eff9; --line: #dbe6f2; --line-2: #c3d3e6; --tint: #d3e5f8; --bg1: #f2f7fd; --bg2: #e1edf9; --glow1: rgba(80,160,240,.24); --glow2: rgba(120,200,255,.24); --t1: #1d3550; --t2: #3d5873; --t3: #566f8a; }
html[data-tema="violeta"] body.curvas { --g1: #8b6cf0; --g2: #5b3fd0; --g1d: #6f4fe0; --g2d: #4f34b8; --deep: #4a2fa6; --sky: #7c5ce8; --ink: #1a1033; --ink-h: #34285a; --ice: #f7f4fd; --ice-2: #eee9fa; --line: #e6e0f3; --line-2: #d0c7e6; --tint: #e1d9f8; --bg1: #f7f4fd; --bg2: #ebe5f8; --glow1: rgba(150,120,240,.24); --glow2: rgba(240,150,220,.2); --t1: #36295a; --t2: #5a4d7e; --t3: #72668f; }
html[data-tema="coral"] body.curvas { --g1: #ff8a65; --g2: #e5456b; --g1d: #e0674a; --g2d: #c93556; --deep: #a82b46; --sky: #f2674f; --ink: #2b1119; --ink-h: #4a2430; --ice: #fdf5f3; --ice-2: #faeae6; --line: #f0e0dc; --line-2: #e3cbc5; --tint: #f8d9d2; --bg1: #fdf6f3; --bg2: #f8e6e1; --glow1: rgba(255,150,110,.24); --glow2: rgba(240,110,150,.2); --t1: #4a2a33; --t2: #6e4a54; --t3: #876570; }
html[data-tema="ambar"] body.curvas { --g1: #f0a21e; --g2: #d9671a; --g1d: #c98a12; --g2d: #b8630f; --deep: #8a5200; --sky: #e89a1c; --ink: #251a08; --ink-h: #43331a; --ice: #fdf9f0; --ice-2: #f8f0dc; --line: #efe6d2; --line-2: #dccfae; --tint: #f5e6c0; --bg1: #fdf9f0; --bg2: #f7edd3; --glow1: rgba(250,200,80,.28); --glow2: rgba(250,150,60,.18); --t1: #43341a; --t2: #665331; --t3: #80704a; }
html[data-tema="grafito"] body.curvas { --g1: #6b7c8a; --g2: #2f3f4c; --g1d: #4f6070; --g2d: #2b3a46; --deep: #2f3f4c; --sky: #5b6b78; --ink: #11181d; --ink-h: #2a353d; --ice: #f4f6f8; --ice-2: #e9edf0; --line: #e0e5e9; --line-2: #cbd2d8; --tint: #dde3e8; --bg1: #f5f7f8; --bg2: #e8ecef; --glow1: rgba(120,140,155,.22); --glow2: rgba(150,170,185,.2); --t1: #27323a; --t2: #46535d; --t3: #5f6c76; }

/* tamaño de texto */
html[data-texto="grande"] { font-size: 112.5%; }
/* espacios */
html[data-densidad="compacta"] body.curvas { --card-shadow: 0 18px 30px -26px rgba(10,106,130,.45); line-height: 1.45; }
html[data-densidad="compacta"] body.curvas main { padding-top: 24px; }
html[data-densidad="compacta"] body.curvas #editBusinessView .space-y-6 > * + * { margin-top: 14px !important; }
html[data-densidad="compacta"] body.curvas #editBusinessView .space-y-6 > div.bg-gray-900, html[data-densidad="compacta"] body.curvas #editBusinessView .panel-pane > div.bg-gray-900, html[data-densidad="compacta"] body.curvas #pane-calendario > div { padding: 16px !important; border-radius: 20px !important; }
html[data-densidad="compacta"] body.curvas .panel-nav-btn, html[data-densidad="compacta"] body.curvas .side-item { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
html[data-densidad="compacta"] body.curvas .sch-day { padding-top: 8px; padding-bottom: 8px; }
html[data-densidad="compacta"] body.curvas input:not([type="checkbox"]):not([type="radio"]), html[data-densidad="compacta"] body.curvas select, html[data-densidad="compacta"] body.curvas textarea { min-height: 38px; }
/* fondo liso */
html[data-fondo="liso"] body.curvas::after { display: none; }
html[data-fondo="liso"] body.curvas::before { background: var(--bg1); }
/* animaciones reducidas */
html[data-movimiento="reducido"] *, html[data-movimiento="reducido"] *::before, html[data-movimiento="reducido"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ventana de personalización */
body.curvas .pz { width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 40px 80px -40px rgba(3,40,56,.6); overflow: hidden; color: var(--ink); }
body.curvas .pz-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 8px; }
body.curvas .pz-h h3 { font-size: 24px; font-weight: 300; letter-spacing: -.03em; }
body.curvas .pz-h p { color: var(--t2); font-size: 13.5px; margin-top: 4px; }
body.curvas .pz-x { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 0; background: var(--ice); color: var(--t2); font-size: 20px; line-height: 1; cursor: pointer; }
body.curvas .pz-x:hover { background: var(--ice-2); color: var(--ink); }
body.curvas .pz-b { padding: 8px 24px 12px; overflow-y: auto; display: grid; gap: 20px; }
body.curvas .pz-b h4 { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--t2); margin-bottom: 10px; }
body.curvas .pz-temas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
body.curvas .pz-tema { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; text-align: left; font: 500 14px var(--sans); color: var(--ink); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--out); }
body.curvas .pz-tema:hover { border-color: var(--ink); transform: translateY(-1px); }
body.curvas .pz-tema[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--ice); }
body.curvas .pz-sw { width: 100%; height: 34px; border-radius: 10px; }
body.curvas .pz-opc { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--ice-2); flex-wrap: wrap; }
body.curvas .pz-opc button { padding: 8px 16px; border-radius: 10px; border: 0; background: transparent; color: var(--t1); font: 400 14px var(--sans); cursor: pointer; }
body.curvas .pz-opc button:hover { background: rgba(255,255,255,.7); }
body.curvas .pz-opc button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 500; }
body.curvas .pz-f { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); background: #fff; }
body.curvas .pz-f .rest { background: none; border: 0; color: var(--t2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: 400 14px var(--sans); }
body.curvas .pz-f .acts { display: flex; gap: 8px; margin-left: auto; }
body.curvas .pz-f .acts button { min-height: 44px; padding: 0 20px; border-radius: 13px; font: 500 15px var(--sans); cursor: pointer; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
body.curvas .pz-f .acts button.p { background: var(--ink); border-color: var(--ink); color: #fff; }
body.curvas .pz-f .acts button.p:hover { background: var(--ink-h); }
@media (max-width: 520px) { body.curvas .pz-temas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* alta rápida dentro de "Nuevo turno" */
body.curvas .tn-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
body.curvas .tn-fila p { margin: 0 !important; }
body.curvas .tn-mas { padding: 4px 10px; border-radius: 9px; border: 1px dashed var(--sky); background: color-mix(in srgb, var(--sky) 8%, #fff); color: var(--deep); font: 500 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
body.curvas .tn-mas:hover { background: var(--ice-2); border-style: solid; }
body.curvas .tn-quick { padding: 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--ice); display: grid; gap: 12px; }
body.curvas .tn-quick h4 { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
body.curvas .tn-quick .acts { display: flex; gap: 8px; justify-content: flex-end; }
body.curvas .tn-quick .acts button { min-height: 40px; padding: 0 16px; border-radius: 11px; font: 500 14px var(--sans); cursor: pointer; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
body.curvas .tn-quick .acts button.p { background: var(--ink); border-color: var(--ink); color: #fff; }
body.curvas .tn-sinemp { padding: 10px 12px; border-radius: 12px; background: #fdf4dc; border: 1px solid #ecd28c; color: #6f4a00; font-size: 13px; }

/* ============ 14 · calendario con el estilo del tablero de la página de inicio ============ */
body.curvas #calTitle { font-size: 18px; font-weight: 500; letter-spacing: -.02em; color: var(--ink) !important; }
body.curvas #pane-calendario button[onclick^="calShift"], body.curvas #pane-calendario button[onclick="calToday()"] { background: #fff !important; border: 1px solid var(--line-2); color: var(--ink) !important; border-radius: 10px; font-weight: 500; }
body.curvas #pane-calendario button[onclick^="calShift"]:hover, body.curvas #pane-calendario button[onclick="calToday()"]:hover { border-color: var(--ink); }
body.curvas #pane-calendario .flex.bg-gray-800.rounded-xl { padding: 3px; border-radius: 10px; background: var(--ice-2) !important; }
body.curvas .cal-view-btn { padding: 6px 14px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 400 !important; color: var(--t2); }
body.curvas .cal-view-btn.bg-primary { background: var(--ink) !important; color: #fff !important; font-weight: 500 !important; }
body.curvas #pane-calendario button[onclick="turnoNuevo()"] { background: #fff !important; border: 1px solid var(--line-2); color: var(--ink) !important; border-radius: 11px; font-weight: 500; }
body.curvas #pane-calendario button[onclick="turnoNuevo()"]:hover { border-color: var(--ink); }

/* tarjetas de resumen */
body.curvas .cal-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
body.curvas .cal-kpi { padding: 14px 16px; border-radius: 14px; background: var(--ice); }
body.curvas .cal-kpi small { font-size: 12.5px; color: var(--t2); }
body.curvas .cal-kpi b { display: block; font-size: 30px; font-weight: 300; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 720px) { body.curvas .cal-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.curvas .cal-kpi b { font-size: 24px; } }

/* grilla de semana y día */
body.curvas #calBody { border: 1px solid var(--line); border-radius: 14px; box-shadow: none; background: #fff; }
body.curvas .cal-headrow { background: var(--ice); border-bottom: 1px solid var(--line); }
body.curvas .cal-h { padding: 8px 6px; font-size: 12.5px; font-weight: 500; color: var(--t2); border-left: 1px solid var(--line); }
body.curvas .cal-h b { font-weight: 500; }
body.curvas .cal-h.hoy { color: var(--deep); background: var(--ice-2); }
body.curvas .cal-ev { left: 4px !important; border-radius: 9px !important; padding: 3px 7px !important; font-size: 11.5px; line-height: 1.25;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 52%, white), color-mix(in srgb, var(--c) 34%, white));
  border: 1px solid color-mix(in srgb, var(--c) 75%, white); box-shadow: 0 6px 14px -9px color-mix(in srgb, var(--c) 85%, transparent); transition: transform 160ms var(--out), box-shadow 160ms ease; }
body.curvas .cal-ev-t { font-weight: 500; color: var(--ink); }
body.curvas .cal-ev-s { color: var(--t1); opacity: .85; }
@media (hover: hover) and (pointer: fine) { body.curvas .cal-ev.cursor-pointer:hover { transform: translateY(-1px) scale(1.01); box-shadow: 0 12px 20px -10px color-mix(in srgb, var(--c) 90%, transparent); z-index: 3; } }

/* vista de mes: cada día se tiñe según cuántos turnos tiene */
body.curvas .cal-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 8px; }
body.curvas .cal-mh { text-align: center; font-size: 12px; font-weight: 500; color: var(--t2); padding: 4px 0 2px; text-transform: none; }
body.curvas .cal-md { display: flex; flex-direction: column; justify-content: space-between; min-height: 78px; padding: 7px 10px; border: 0; border-radius: 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: color-mix(in srgb, var(--g1) calc(var(--q, 0) * 1%), var(--ice)); animation: pop-ev 380ms var(--out) both; animation-delay: calc(var(--n, 0) * 11ms); transition: transform 160ms var(--out), box-shadow 160ms ease; }
body.curvas .cal-md b { font-weight: 500; font-size: 14px; }
body.curvas .cal-md small { font-size: 11.5px; color: var(--t2); min-height: 1em; }
body.curvas .cal-md-pts { display: flex; gap: 3px; min-height: 6px; } body.curvas .cal-md-pts i { width: 6px; height: 6px; border-radius: 50%; }
body.curvas .cal-md.fuera { background: transparent; color: var(--t3); opacity: .6; }
body.curvas .cal-md.hoy { box-shadow: inset 0 0 0 2px var(--deep); }
body.curvas .cal-md.cerrado { background: repeating-linear-gradient(135deg, var(--ice), var(--ice) 6px, var(--ice-2) 6px, var(--ice-2) 12px); }
@media (hover: hover) and (pointer: fine) { body.curvas .cal-md:hover { transform: translateY(-3px); box-shadow: 0 12px 20px -12px color-mix(in srgb, var(--deep) 60%, transparent); } }
body.curvas .cal-md:active { transform: scale(.96); }
@media (max-width: 720px) { body.curvas .cal-md { min-height: 52px; padding: 5px 6px; } body.curvas .cal-md small { display: none; } body.curvas .cal-mes { gap: 4px; padding: 4px; } }
@keyframes pop-ev { from { opacity: 0; transform: scale(.9) translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ 15 · ventas y estadísticas: mismo estilo y distribución que el panel de ventas de la página de inicio ============ */
body.curvas .dash { padding: clamp(16px, 2.2vw, 24px); border-radius: 24px; background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 50px 90px -50px rgba(2,30,44,.55); display: grid; gap: 14px; }
body.curvas .dash-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
body.curvas .dash-top > b { font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
body.curvas .dash-ctl, body.curvas .dash-per { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.curvas .dash-sel { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body.curvas .seg { position: relative; display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 10px; background: var(--ice-2); font-size: 13px; }
body.curvas .seg button { padding: 5px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--t2); font: inherit; cursor: pointer; transition: background 160ms ease, color 160ms ease; }
body.curvas .seg button:hover { color: var(--ink); }
body.curvas .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
body.curvas .dk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
body.curvas .dk4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } body.curvas .dk2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.curvas .dk > div { padding: 12px 14px; border-radius: 14px; background: var(--ice); font-size: 12.5px; color: var(--t2); }
body.curvas .dk b { display: block; font-size: clamp(20px, 2.2vw, 28px); font-weight: 300; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.2; }
body.curvas .dk b.neg { color: var(--bad); }
body.curvas .dk em { display: block; font-style: normal; font-size: 12px; color: var(--ok); font-weight: 500; } body.curvas .dk em.neg { color: var(--bad); }
body.curvas .dk small { display: block; font-size: 12px; color: var(--t3); }
body.curvas .dg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.curvas .dc { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); min-width: 0; }
body.curvas .dc h4 { font-size: 13px; font-weight: 500; color: var(--t2); margin-bottom: 10px; letter-spacing: 0; }
body.curvas .dc.wide { grid-column: span 2; }
body.curvas .dc-h { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
body.curvas .dc-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.curvas .dash-sec { font-size: 15px; font-weight: 500; letter-spacing: -.01em; margin-top: 4px; }
body.curvas .dash-vacio { font-size: 13.5px; color: var(--t3); padding: 6px 0; }
body.curvas .dash-aviso { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: #6f4a00; background: #fdf4dc; border: 1px solid #ecd28c; }
/* área */
body.curvas .area { position: relative; }
body.curvas .area svg { width: 100%; height: auto; display: block; overflow: visible; }
body.curvas .area .ln { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1600ms cubic-bezier(.77,0,.175,1) 200ms; }
body.curvas .area .fl { opacity: 0; transition: opacity 900ms ease 900ms; }
body.curvas .area .pt { fill: #fff; stroke: var(--sky); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 300ms ease 1500ms, transform 200ms var(--out), fill 200ms ease; }
body.curvas .area .cur { fill: #fff; stroke: #fff; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.5); transition: opacity 160ms ease, transform 200ms var(--out); }
body.curvas .area .cur.act { opacity: 1; transform: scale(1.7); fill: var(--g1); }
body.curvas .dash.on .area .ln { stroke-dashoffset: 0; } body.curvas .dash.on .area .fl, body.curvas .dash.on .area .pt { opacity: 1; }
body.curvas .area .hit { fill: transparent; cursor: pointer; }
body.curvas .area .gl { stroke: var(--sky); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity 200ms ease; }
body.curvas .area svg.has-act .gl { opacity: .7; }
body.curvas .area .pt.act { transform: scale(1.7); fill: var(--g1); stroke: #fff; }
body.curvas .area .tip { position: absolute; top: 14px; transform: translateX(-50%) translateY(6px); display: grid; gap: 1px; padding: 7px 11px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 180ms ease, transform 180ms var(--out), left 220ms var(--out); z-index: 3; box-shadow: 0 16px 28px -14px rgba(3,40,56,.7); }
body.curvas .area .tip.on { opacity: 1; transform: translateX(-50%); } body.curvas .area .tip b { font-weight: 500; } body.curvas .area .tip span { color: #b9ecd9; font-size: 12px; }
body.curvas .area .ax { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--t3); margin-top: 6px; gap: 4px; }
body.curvas .area .ax span { cursor: pointer; outline: none; transition: color 160ms ease, font-weight 160ms ease; } body.curvas .area .ax span.act { color: var(--ink); font-weight: 600; }
/* listas con barras */
body.curvas .bl { display: grid; gap: 9px; padding: 0; margin: 0; } body.curvas .bl li { list-style: none; font-size: 13px; cursor: pointer; border-radius: 8px; outline: none; transition: opacity 200ms ease, transform 200ms var(--out); }
body.curvas .bl .t { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; } body.curvas .bl .t b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; } body.curvas .bl .t span { color: var(--t2); min-width: 0; overflow-wrap: anywhere; }
body.curvas .bl .bar { height: 7px; border-radius: 4px; background: var(--ice-2); overflow: hidden; transition: height 200ms ease; }
body.curvas .bl .bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--g1), var(--sky), var(--g2)); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--out); transition-delay: calc(var(--i, 0) * 90ms + 500ms); }
body.curvas .dash.on .bl .bar i { transform: none; }
body.curvas .bl li.dim { opacity: .42; } body.curvas .bl li.act { transform: translateX(3px); } body.curvas .bl li.act .bar { height: 9px; margin-top: -1px; }
body.curvas .bl li.act .t span::after { content: " · " attr(data-p); color: var(--deep); font-weight: 500; }
body.curvas .bl li:focus-visible { box-shadow: 0 0 0 2px var(--sky); }
/* columnas */
body.curvas .cols { display: flex; align-items: flex-end; gap: 6px; height: 74px; }
body.curvas .cols i { position: relative; flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--g1), var(--g2)); height: var(--h); transform: scaleY(0); transform-origin: bottom; opacity: .9; cursor: pointer; outline: none; transition: transform 700ms var(--out) calc(var(--i, 0) * 60ms + 600ms), filter 160ms ease, opacity 160ms ease; }
body.curvas .cols i.mx { background: linear-gradient(180deg, var(--g1d), var(--g2d)); opacity: 1; }
body.curvas .dash.on .cols i { transform: none; }
body.curvas .cols:has(i.act) i:not(.act) { opacity: .45; } body.curvas .cols i.act { filter: saturate(1.4) brightness(1.08); opacity: 1; }
body.curvas .cols i::after { content: attr(data-t); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); padding: 5px 9px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms var(--out); z-index: 4; }
body.curvas .cols i.act::after { opacity: 1; transform: translateX(-50%); }
body.curvas .cols i:first-child::after { left: 0; transform: translateY(4px); } body.curvas .cols i:first-child.act::after { transform: none; }
body.curvas .cols i:last-child::after { left: auto; right: 0; transform: translateY(4px); } body.curvas .cols i:last-child.act::after { transform: none; }
body.curvas .cols-lab { display: flex; justify-content: space-between; font-size: 11px; color: var(--t3); margin-top: 6px; } body.curvas .cols-lab span { text-align: center; flex: 1; }
/* detalle de cobros */
body.curvas .cobros { display: grid; gap: 6px; }
body.curvas .cobros > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--ice); font-size: 12.5px; transition: background 160ms ease, transform 160ms var(--out); flex-wrap: wrap; }
body.curvas .cobros span { color: var(--t2); min-width: 0; } body.curvas .cobros b { font-weight: 500; font-variant-numeric: tabular-nums; } body.curvas .cobros b.cl { color: var(--ink); } body.curvas .cobros small { color: #8a5a00; font-weight: 400; }
@media (hover: hover) { body.curvas .cobros > div:hover { background: var(--ice-2); transform: translateX(3px); } }
body.curvas .csv { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 0; border-radius: 9px; background: var(--ink); color: #fff; font: 400 12.5px var(--sans); cursor: pointer; } body.curvas .csv:hover { background: var(--ink-h); } body.curvas .csv svg { width: 14px; height: 14px; }
body.curvas .dash .cl-q { padding: 8px 12px; border-radius: 10px; background: #fff !important; border: 1px solid var(--line) !important; font-size: 13px; min-height: 36px; width: min(300px, 100%); }
@media (max-width: 900px) { body.curvas .dk4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { body.curvas .dg { grid-template-columns: minmax(0, 1fr); } body.curvas .dc.wide { grid-column: auto; } body.curvas .dk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { body.curvas .area .ln, body.curvas .area .fl, body.curvas .area .pt, body.curvas .bl .bar i, body.curvas .cols i { transition: none; } }
body.curvas .cc-vacio.hidden, body.curvas .cc-panel.hidden, body.curvas .cc-aviso.hidden, body.curvas #crmLibre.hidden, body.curvas #crmPlantillaBox.hidden { display: none !important; }

/* progreso de botones de turno enviados: etiquetas que se encienden (como en la página de inicio) */
body.curvas .cm.track { justify-self: end; max-width: min(92%, 460px); background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--deep) 50%, transparent); border-bottom-right-radius: 14px; padding: 11px 14px; white-space: normal; }
body.curvas .cm.track > b { display: block; font-weight: 500; font-size: 13px; margin-bottom: 8px; }
body.curvas .cm.track ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
body.curvas .cm.track li { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--ice-2); color: var(--t3); transition: background 300ms ease, color 300ms ease; }
body.curvas .cm.track li.d { background: #e3f6ee; color: #0b5c3e; animation: luz2 400ms ease both; animation-delay: calc(var(--k, 0) * 120ms); }
body.curvas .cm.track li.x { background: #fbe6e9; color: #8a2433; }
@keyframes luz2 { from { background: var(--ice-2); color: var(--t3); } }
/* avisos del sistema: derivar, devolver al bot, turno agendado */
body.curvas .cm.sys { justify-self: center; text-align: center; }

/* ============ 16 · franjas con degradado, patrón y grano (como las zonas vívidas de la página de inicio) ============ */
/* encabezado de sección: franja vívida con el nombre del negocio en grande */
body.curvas .sec-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; border-radius: 28px; padding: clamp(22px, 3.4vw, 40px) clamp(20px, 3.4vw, 44px); color: #fff;
  background: radial-gradient(50% 60% at 100% 0%, color-mix(in srgb, var(--g1) 50%, transparent), transparent 62%), radial-gradient(60% 80% at 0% 100%, color-mix(in srgb, var(--g1) 70%, transparent), transparent 66%), radial-gradient(45% 60% at 60% 110%, color-mix(in srgb, var(--g2) 65%, transparent), transparent 70%), linear-gradient(160deg, color-mix(in srgb, var(--g1d) 62%, #000) 0%, var(--g1d) 50%, var(--g2d) 100%);
  box-shadow: 0 40px 70px -44px color-mix(in srgb, var(--deep) 70%, transparent); }
body.curvas .sec-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: url(patrones/ondas-b.svg) center / cover no-repeat; opacity: .32; }
body.curvas .sec-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--noise); background-size: 240px; mix-blend-mode: overlay; opacity: .5; }
body.curvas .sec-hero #secEyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.85) !important; margin: 0 0 6px; }
body.curvas .sec-hero #panelTitle { color: #fff !important; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -.045em; font-weight: 300 !important; text-shadow: 0 1px 18px rgba(2,48,48,.3); }
body.curvas .sec-hero-fecha { font-size: 13px; padding: 6px 13px; border-radius: 10px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45); color: #fff; white-space: nowrap; }
@media (max-width: 640px) { body.curvas .sec-hero { border-radius: 22px; } body.curvas .sec-hero-fecha { display: none; } }

/* patrón de la franja: alterna entre secciones */
body.curvas .sec-hero[data-patron="rejilla"]::before { background-image: url(patrones/rejilla-b.svg); opacity: .3; }

/* botón "Conectar con Facebook" con el degradado del tema */
body.curvas .btn-fb { background: var(--grad); color: #fff !important; border: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 24px -16px color-mix(in srgb, var(--deep) 80%, transparent); transition: transform 160ms var(--out), box-shadow 200ms ease, filter 200ms ease; }
body.curvas .btn-fb svg { color: #fff; }
@media (hover: hover) and (pointer: fine) { body.curvas .btn-fb:hover { filter: brightness(1.08) saturate(1.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 18px 28px -14px color-mix(in srgb, var(--deep) 90%, transparent); } }
body.curvas .btn-fb:active { transform: scale(.97); }

/* ============ 17 · casilleros y opciones: mismo estilo en todo el panel ============ */
body.curvas input[type="checkbox"], body.curvas input[type="radio"] { -webkit-appearance: none; appearance: none; flex: none; width: 18px !important; height: 18px !important; margin: 0; display: inline-grid; place-content: center; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; vertical-align: middle; transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--out); accent-color: var(--deep); }
body.curvas input[type="checkbox"] { border-radius: 6px; }
body.curvas input[type="radio"] { border-radius: 50%; }
body.curvas input[type="checkbox"]::after { content: ""; width: 10px; height: 10px; background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); transform: scale(0); transition: transform 160ms var(--out); }
body.curvas input[type="radio"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform 160ms var(--out); }
body.curvas input[type="checkbox"]:checked, body.curvas input[type="radio"]:checked { background: var(--grad); border-color: transparent; }
body.curvas input[type="checkbox"]:checked::after, body.curvas input[type="radio"]:checked::after { transform: scale(1); }
@media (hover: hover) and (pointer: fine) { body.curvas input[type="checkbox"]:not(:checked):not(:disabled):hover, body.curvas input[type="radio"]:not(:checked):not(:disabled):hover { border-color: var(--ink); } }
body.curvas input[type="checkbox"]:focus-visible, body.curvas input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 28%, transparent); }
body.curvas input[type="checkbox"]:disabled, body.curvas input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }
body.curvas label:has(> input[type="checkbox"]), body.curvas label:has(> input[type="radio"]) { cursor: pointer; }
/* Opciones tipo etiqueta (chip-check) y opciones del asistente (v3-sub): mismo casillero con tilde, la etiqueta se marca en turquesa suave */
body.curvas .chip-check:has(input:checked) { border-color: var(--deep); background: var(--ice-2); }
body.curvas .chip-check:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 28%, transparent); }
body.curvas .v3-sub { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
body.curvas .v3-sub:hover { border-color: var(--deep); }
body.curvas .v3-sub.on { border-color: var(--deep); background: var(--ice-2); }
body.curvas .v3-sub i { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; transition: background 160ms ease, border-color 160ms ease; }
body.curvas .v3-sub.on i { background: var(--grad); border-color: transparent; }
body.curvas .v3-sub i { display: inline-grid; place-content: center; } body.curvas .v3-sub i::after { content: ""; width: 10px; height: 10px; background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); transform: scale(0); transition: transform 160ms var(--out); } body.curvas .v3-sub.on i::after { transform: scale(1); }
/* opciones tipo etiqueta (Correo, WhatsApp, recursos, servicios del perfil, etiquetas del CRM) */
body.curvas .chip-check { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 14.5px; line-height: 1.2; cursor: pointer; user-select: none; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
body.curvas .chip-check:hover { border-color: var(--ink); }
body.curvas .chip-check.fila { display: flex; width: 100%; padding: 12px 14px; }
body.curvas .chip-check.fila .flex-1 { flex: 1; min-width: 0; }

/* aviso de cargos de Meta en recordatorios */
body.curvas .aviso-costo { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: #fdf4dc; border: 1px solid #ecd28c; color: #5f4200; font-size: 13.5px; line-height: 1.5; }
body.curvas .aviso-costo svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #8a5a00; }
body.curvas .aviso-costo b { display: block; font-weight: 500; color: #4a3300; margin-bottom: 2px; font-size: 14px; }
body.curvas .aviso-costo p { margin: 0 0 4px; color: #6f4a00 !important; } body.curvas .aviso-costo p:last-child { margin-bottom: 0; }
body.curvas .chip-aviso { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #fdf4dc; color: #7a4d00; border: 1px solid #ecd28c; white-space: nowrap; }

/* ============ 18 · menú por grupos, pestañas, barra de guardado y aviso al salir ============ */
body.curvas .nav-sec { display: block; padding: 12px 12px 4px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); }
body.curvas .nav-sec:first-child { padding-top: 2px; }
body.curvas .sec-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 18px; padding: 4px; width: fit-content; max-width: 100%; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--card-shadow); overflow-x: auto; }
body.curvas .sec-tabs.hidden { display: none; }
body.curvas .sec-tab { padding: 8px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--t2); font: 400 14px var(--sans); cursor: pointer; white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
body.curvas .sec-tab:hover { background: var(--ice); color: var(--ink); }
body.curvas .sec-tab.on { background: var(--ink); color: #fff; font-weight: 500; }
body.curvas #pane-chatbot [data-tab] { display: none; }
body.curvas #pane-chatbot[data-tab-activa="probar"] [data-tab="probar"], body.curvas #pane-chatbot[data-tab-activa="conexion"] [data-tab="conexion"], body.curvas #pane-chatbot[data-tab-activa="personalidad"] [data-tab="personalidad"] { display: block; }
body.curvas .margen-ejemplo { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--ice); color: var(--t2); font-size: 13.5px; }

/* barra de guardado */
body.curvas .savebar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 18px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line-2); box-shadow: 0 24px 40px -24px rgba(3,40,56,.45); transition: border-color 200ms ease, box-shadow 200ms ease; }
body.curvas .savebar.hidden { display: none; }
body.curvas .savebar-estado { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--t2); }
body.curvas .savebar-estado i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
body.curvas .savebar.sucio { border-color: #e2b84d; box-shadow: 0 24px 40px -24px rgba(138,90,0,.45), 0 0 0 4px rgba(236,210,140,.35); }
body.curvas .savebar.sucio .savebar-estado { color: #6f4a00; font-weight: 500; } body.curvas .savebar.sucio .savebar-estado i { background: #e2a21e; animation: savePulso 1.6s ease-in-out infinite; }
body.curvas .savebar.guardando .savebar-estado i { background: var(--sky); animation: savePulso 700ms ease-in-out infinite; }
@keyframes savePulso { 50% { transform: scale(1.5); opacity: .55; } }
body.curvas .savebar-btn { min-height: 46px; padding: 0 26px; border-radius: 13px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 15px var(--sans); cursor: pointer; transition: background 160ms ease, transform 160ms var(--out), opacity 160ms ease; }
body.curvas .savebar-btn:hover:not(:disabled) { background: var(--ink-h); } body.curvas .savebar-btn:active:not(:disabled) { transform: scale(.97); }
body.curvas .savebar-btn:disabled { background: var(--ice-2); border-color: var(--line); color: var(--t3); cursor: default; }
@media (max-width: 520px) { body.curvas .savebar { padding-left: 14px; } body.curvas .savebar-btn { padding: 0 18px; } }

/* aviso al salir con cambios sin guardar */
body.curvas .salida { width: min(440px, 100%); padding: 28px 26px 22px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(3,40,56,.6); text-align: center; color: var(--ink); }
body.curvas .salida-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: #fdf4dc; color: #8a5a00; border: 1px solid #ecd28c; } body.curvas .salida-ic svg { width: 26px; height: 26px; }
body.curvas .salida h3 { font-size: 22px; font-weight: 400; letter-spacing: -.03em; margin-bottom: 6px; }
body.curvas .salida p { color: var(--t2); font-size: 14.5px; margin-bottom: 20px; }
body.curvas .salida-acts { display: grid; gap: 8px; }
body.curvas .salida-acts button { min-height: 48px; border-radius: 13px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
body.curvas .salida-acts button:hover:not(:disabled) { border-color: var(--ink); }
body.curvas .salida-acts button.p { background: var(--ink); border-color: var(--ink); color: #fff; } body.curvas .salida-acts button.p:hover:not(:disabled) { background: var(--ink-h); }
body.curvas .salida-acts button.t { border-color: transparent; background: transparent; color: var(--t2); font-weight: 400; }
body.curvas .salida-acts button:disabled { opacity: .6; cursor: default; }

/* el menú no se ensancha con correos largos: el nombre se corta con "…" */
body.curvas .side-inner { min-width: 0; }
body.curvas .side-tools { grid-template-columns: minmax(0, 1fr); min-width: 0; }
body.curvas .side-tools .relative, body.curvas .side-tools > * { min-width: 0; max-width: 100%; }
body.curvas .side-user { min-width: 0; max-width: 100%; overflow: hidden; }
body.curvas .side-user #userNameDisplay { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.curvas .side-user svg:last-child { flex: none; }
body.curvas .side-item { min-width: 0; overflow: hidden; }
body.curvas .side-item .badge-n { flex: none; }

/* las opciones tipo etiqueta no cambian de borde ni de fondo al marcarse: solo aparece la tilde en el casillero */
body.curvas .chip-check { -webkit-tap-highlight-color: transparent; }

/* lugar del error al guardar */
body.curvas .err-foco { border-radius: 16px; }
body.curvas input.err-foco, body.curvas select.err-foco, body.curvas textarea.err-foco, body.curvas button.err-foco { border-radius: 12px; }
/* resaltado del campo que falta: un aro suave que aparece, late una vez más y se desvanece.
   Se anima una variable (--err-a) y no el box-shadow, así gana también sobre el estilo de foco del campo (que usa !important). */
@property --err-a { syntax: '<number>'; inherits: false; initial-value: 0; }
body.curvas .err-foco, body.curvas .err-foco:focus, body.curvas .err-foco:hover {
  animation: errAviso 2s cubic-bezier(.4, 0, .2, 1) 1 both;
  border-color: color-mix(in srgb, #d14656 calc(var(--err-a) * 90%), #c5d7df) !important;
  box-shadow: 0 0 0 1px rgba(209,70,86,calc(var(--err-a) * .85)), 0 0 0 calc(1px + var(--err-a) * 3px) rgba(209,70,86,calc(var(--err-a) * .16)), 0 8px 22px -10px rgba(209,70,86,calc(var(--err-a) * .4)) !important;
}
#onboardingModal .err-foco, #onboardingModal .err-foco:focus, #onboardingModal .err-foco:hover { border-color: color-mix(in srgb, #d14656 calc(var(--err-a) * 90%), #c5d7df) !important; }
@keyframes errAviso { 0% { --err-a: 0; } 18% { --err-a: 1; } 38% { --err-a: .5; } 58% { --err-a: 1; } 100% { --err-a: 0; } }
@media (prefers-reduced-motion: reduce) { body.curvas .err-foco, body.curvas .err-foco:focus { animation: none; --err-a: .8; } }/* en el asistente de alta nunca va texto de error bajo los campos: solo el aviso emergente y el resaltado del campo */
#onboardingModal p.text-red-300, #onboardingModal p.text-red-400, #onboardingModal p.text-red-500, #onboardingModal .sch-err, #onboardingModal .field-error { display: none !important; }

/* ============ página de reservas del negocio: nombre en el link ============ */
body.curvas .link-pref { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color 160ms ease; }
body.curvas .link-pref:focus-within { border-color: var(--ink); }
body.curvas .link-pref span { display: grid; place-items: center; padding: 0 12px 0 16px; background: var(--ice-2); color: var(--t3); font-size: 14px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
body.curvas .link-pref input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; padding: 13px 14px; color: var(--ink); outline: none !important; box-shadow: none !important; border-radius: 0 !important; }
body.curvas .link-estado { margin-top: 8px; font-size: 13px; color: var(--t3); min-height: 1.4em; }
body.curvas .link-estado.ok { color: var(--ok); }
body.curvas .link-estado.mal { color: var(--bad); }

/* ============ responsive · celulares, tablets y pantallas bajas ============ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.curvas { overflow-x: clip; }
body.curvas main, body.curvas main > div, body.curvas .panel-pane { min-width: 0; max-width: 100%; }
body.curvas main img, body.curvas main video, body.curvas main canvas, body.curvas main svg { max-width: 100%; }
body.curvas main :is(h1, h2, h3, h4, p, label, td, th, span, button) { overflow-wrap: anywhere; }
body.curvas main .flex > * { min-width: 0; }
body.curvas main :is(table, pre) { max-width: 100%; }
body.curvas main .overflow-x-auto, body.curvas #calBody { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

@media (max-width: 900px) {
  body.curvas .side-panel { padding-top: env(safe-area-inset-top, 0px) !important; height: 100dvh; }
  body.curvas .crm-3 { height: calc(100dvh - 300px); }
  body.curvas #asisPanel { right: 8px !important; left: 8px; width: auto !important; max-height: calc(100dvh - 7rem); }
  body.curvas .sec-tabs { overflow-x: auto; flex-wrap: nowrap; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body.curvas .sec-tabs::-webkit-scrollbar { display: none; }
  body.curvas .sec-tabs > * { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 720px) {
  /* iOS hace zoom al enfocar campos de menos de 16px */
  body.curvas :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { font-size: 16px !important; }
  /* áreas táctiles cómodas */
  body.curvas main :is(button, select, .cal-view-btn, [role=button]) { min-height: 40px; }
  body.curvas .nav-dock button { min-height: 48px; }
  /* encabezados y tarjetas más compactos */
  body.curvas main h1 { font-size: clamp(26px, 8vw, 34px); }
  body.curvas .sec-hero { border-radius: 22px; }
  /* barra de calendario: controles a todo el ancho */
  body.curvas #pane-calendario .flex-wrap > * { max-width: 100%; }
  body.curvas #pane-calendario .flex-wrap button, body.curvas #pane-calendario .flex-wrap select { flex: 1 1 auto; }
  /* formularios en una columna */
  body.curvas main :is(.grid-cols-2, .grid-cols-3, .grid-cols-4):not(.cal-mes):not(.cal-kpis) { grid-template-columns: minmax(0, 1fr); }
  /* tablas y listas anchas se deslizan en vez de romper el layout */
  body.curvas main table { display: block; overflow-x: auto; white-space: nowrap; }
  /* modales como hoja inferior */
  body.curvas :is(#blockModal, #conflictModal, #mapPickerModal) { align-items: flex-end !important; padding: 0 !important; }
  body.curvas :is(#blockModal, #conflictModal, #mapPickerModal) > div {
    max-width: 100% !important; width: 100% !important; border-radius: 22px 22px 0 0 !important; max-height: 92dvh !important;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important; overflow-y: auto;
  }
  body.curvas .ob-modal { padding: 0 !important; }
  body.curvas #notificationsDropdown, body.curvas #userMenuDropdown { max-width: calc(100vw - 24px); }
}

@media (max-width: 400px) {
  body.curvas main.px-6 { padding-left: 10px !important; padding-right: 10px !important; }
  body.curvas .nav-dock { left: 8px; right: 8px; padding: 4px; height: 60px; }
  body.curvas .nav-dock button { font-size: 10.5px; }
  body.curvas .cal-kpis { gap: 6px; } body.curvas .cal-kpi { padding: 10px; } body.curvas .cal-kpi b { font-size: 20px; }
  body.curvas .sec-hero { padding-left: 16px; padding-right: 16px; }
}

/* celular horizontal / pantallas bajas */
@media (max-height: 480px) and (orientation: landscape) {
  body.curvas .nav-dock { height: 52px; } body.curvas .nav-dock button { min-height: 40px; flex-direction: row; gap: 6px; }
  body.curvas :is(#blockModal, #conflictModal, #mapPickerModal) > div { max-height: 96dvh !important; }
  body.curvas .crm-3 { height: calc(100dvh - 120px); min-height: 320px; }
}

@media (hover: none) { body.curvas .cal-ev.cursor-pointer:active { transform: scale(.99); } }

/* chat del CRM: el adjunto solo se ve si hay un archivo elegido */
body.curvas .cc-adj.hidden { display: none !important; }
body.curvas .cc-adj { margin-bottom: 8px; }

/* botones para mandarle al cliente */
body.curvas .cc-btns { display: grid; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
body.curvas .cc-btns-t { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
body.curvas .cc-btns-t small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--t2); line-height: 1.35; }
body.curvas .cc-btns-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
body.curvas .cc-c .cc-btns-g button { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 9px 11px; border-radius: 12px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; font-family: var(--sans); transition: border-color 160ms ease, background 160ms ease; }
body.curvas .cc-btns-g button svg { width: 20px; height: 20px; grid-row: span 2; color: var(--deep); }
body.curvas .cc-btns-g button b { font-size: 13px; font-weight: 600; }
body.curvas .cc-btns-g button small { font-size: 11.5px; color: var(--t2); line-height: 1.25; }
body.curvas .cc-btns-g button:hover { border-color: var(--deep); background: var(--ice); }
body.curvas .cc-btns .cc-pausa { margin-left: 0; }
@media (max-width: 520px) { body.curvas .cc-btns-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.curvas .cc-btns-g button small { display: none; } }

/* botones para el cliente: plegados hasta que se necesitan */
body.curvas .cc-btns { gap: 0; padding-top: 8px; }
body.curvas .cc-btns-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
body.curvas .cc-c .cc-btns-tg { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 12.5px var(--sans); cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
body.curvas .cc-btns-tg:hover { border-color: var(--deep); background: var(--ice); }
body.curvas .cc-btns-tg svg { width: 14px; height: 14px; transition: transform 200ms ease; }
body.curvas .cc-btns.open .cc-btns-tg svg { transform: rotate(180deg); }
body.curvas .cc-btns-g { display: none; margin-top: 10px; }
body.curvas .cc-btns.open .cc-btns-g { display: grid; }
body.curvas .cc-btns-g .cc-btns-t { grid-column: 1 / -1; font-weight: 400; font-size: 12px; color: var(--t2); }
body.curvas .cc-btns .cc-pausa { margin-left: 0; }

/* listas y botones de WhatsApp dentro del chat del CRM (como los ve el cliente) */
body.curvas .cm .crm-ops { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; white-space: normal; }
body.curvas .cm .crm-op { display: block; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.3; text-align: left; }
body.curvas .cm .crm-op small { display: block; margin: 2px 0 0; font-size: 11.5px; font-weight: 400; color: var(--t2); }
body.curvas .cm .crm-ops.btns { flex-direction: row; flex-wrap: wrap; }
body.curvas .cm .crm-ops.btns .crm-op { flex: 1 1 auto; text-align: center; color: var(--deep); font-weight: 600; }
body.curvas .cm .crm-ops.list { padding: 8px; border-radius: 12px; background: rgba(255,255,255,.18); }
body.curvas .cm.in .crm-ops.list, body.curvas .cm.own .crm-ops.list { background: var(--ice); }
body.curvas .cm .crm-ops-h { display: flex; align-items: center; gap: 6px; padding: 0 2px 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; opacity: .85; }
body.curvas .cm .crm-ops-h svg { width: 14px; height: 14px; }
body.curvas .cm .crm-ops-s { padding: 4px 2px 0; font-size: 11.5px; font-weight: 600; opacity: .8; }

/* ===== CRM: ventanas ajustables (ancho de lista y ficha, alto, lados intercambiados) ===== */
@media (min-width: 1101px) {
  body.curvas .crm-3 { grid-template-columns: var(--wl, 300px) 8px minmax(0, 1fr) 8px var(--wp, 300px); height: var(--h, clamp(520px, calc(100vh - 250px), 760px)); }
  body.curvas .crm-3 > .cl { grid-column: 1; } body.curvas .crm-3 > .rz-l { grid-column: 2; } body.curvas .crm-3 > .cc { grid-column: 3; }
  body.curvas .crm-3 > .rz-p { grid-column: 4; } body.curvas .crm-3 > .cp { grid-column: 5; }
  body.curvas .crm-3.inv { grid-template-columns: var(--wp, 300px) 8px minmax(0, 1fr) 8px var(--wl, 300px); }
  body.curvas .crm-3.inv > .cp { grid-column: 1; border-left: 0; border-right: 1px solid var(--line); } body.curvas .crm-3.inv > .rz-p { grid-column: 2; }
  body.curvas .crm-3.inv > .rz-l { grid-column: 4; } body.curvas .crm-3.inv > .cl { grid-column: 5; border-right: 0; border-left: 1px solid var(--line); }
  body.curvas .crm-rz { cursor: col-resize; position: relative; background: transparent; touch-action: none; outline: none; }
  body.curvas .crm-rz::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 38px; border-radius: 3px; transform: translate(-50%, -50%); background: var(--line-2); transition: background 160ms ease, height 160ms ease; }
  body.curvas .crm-rz:hover::after, body.curvas .crm-rz:focus-visible::after, body.crm-resizing .crm-rz::after { background: var(--deep); height: 60px; }
  body.curvas .crm-rzh { height: 14px; cursor: row-resize; position: relative; touch-action: none; outline: none; }
  body.curvas .crm-rzh::after { content: ""; position: absolute; left: 50%; top: 5px; width: 54px; height: 4px; border-radius: 4px; transform: translateX(-50%); background: var(--line-2); transition: background 160ms ease; }
  body.curvas .crm-rzh:hover::after, body.curvas .crm-rzh:focus-visible::after { background: var(--deep); }
  body.crm-resizing { user-select: none; cursor: col-resize; }
}
@media (max-width: 1100px) { body.curvas .crm-rz, body.curvas .crm-rzh, body.curvas .crm-lay { display: none !important; } }
body.curvas .crm-lay { margin-left: auto; display: inline-flex; gap: 6px; }
body.curvas .crm-lay button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--t1); font: 400 12px var(--sans); cursor: pointer; }
body.curvas .crm-lay button:hover { border-color: var(--deep); color: var(--ink); }
body.curvas:has(#crmChats.hidden) .crm-rzh, body.curvas:has(#crmChats.hidden) .crm-lay { display: none !important; }

/* ===== CRM · sección Etiquetas ===== */
body.curvas #crmEtq { background: #fff !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 18px !important; }
body.curvas .etq-head h3 { color: var(--ink) !important; } body.curvas .etq-head p { color: var(--t2) !important; margin-top: 2px; }
body.curvas .etq-nueva { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; padding: 12px; border-radius: 14px; background: var(--ice); border: 1px solid var(--line); }
body.curvas .etq-nueva input { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: #fff !important; border: 1px solid var(--line-2) !important; color: var(--ink) !important; font-size: 14px; }
body.curvas .etq-colores { display: inline-flex; gap: 6px; }
body.curvas .etq-col { width: 24px; height: 24px; min-height: 0 !important; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; transition: transform 140ms ease; }
body.curvas .etq-col:hover { transform: scale(1.12); } body.curvas .etq-col.on { box-shadow: 0 0 0 2px var(--ink); }
body.curvas .etq-btn { padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; transition: border-color 160ms ease, background 160ms ease; }
body.curvas .etq-btn:hover { border-color: var(--ink); } body.curvas .etq-btn.p { background: var(--ink); color: #fff; border-color: var(--ink); } body.curvas .etq-btn.p:hover { background: var(--ink-h); }
body.curvas .etq-btn.mal { color: var(--bad); border-color: rgba(209,70,86,.35); } body.curvas .etq-btn.mal:hover { background: rgba(209,70,86,.08); border-color: var(--bad); }
body.curvas .etq-lista { display: grid; gap: 10px; }
body.curvas .etq-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
body.curvas .etq-item.open { border-color: var(--line-2); box-shadow: 0 14px 30px -24px rgba(3,40,56,.5); }
body.curvas .etq-fila { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
body.curvas .etq-dot { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-2); overflow: hidden; }
body.curvas .etq-dot input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0 !important; }
body.curvas .etq-nom { flex: 1 1 160px; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent !important; background: transparent !important; color: var(--ink) !important; font: 500 14.5px var(--sans); }
body.curvas .etq-nom:hover { border-color: var(--line-2) !important; } body.curvas .etq-nom:focus { border-color: var(--deep) !important; background: #fff !important; outline: none; }
body.curvas .etq-n { font-size: 12.5px; color: var(--t2); white-space: nowrap; }
body.curvas .etq-asig { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--ice); display: grid; gap: 8px; }
body.curvas .etq-asig input[type=search] { padding: 8px 12px; border-radius: 10px; background: #fff !important; border: 1px solid var(--line-2) !important; color: var(--ink) !important; font-size: 13.5px; min-width: 0; width: 100%; }
body.curvas .etq-chats { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; }
body.curvas .etq-chat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); cursor: pointer; min-width: 0; }
body.curvas .etq-chat:hover { border-color: var(--deep); }
body.curvas .etq-chat input { flex: none; width: 17px; height: 17px; accent-color: var(--deep); }
body.curvas .etq-chat-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13.5px; }
body.curvas .etq-chat small { color: var(--t2); font-size: 12px; white-space: nowrap; }
body.curvas .etq-vacio { padding: 18px; text-align: center; color: var(--t2); font-size: 13.5px; }
@media (max-width: 560px) { body.curvas #crmEtq { padding: 12px !important; } body.curvas .etq-fila .etq-n { order: 5; flex-basis: 100%; } body.curvas .etq-btn { flex: 1 1 auto; } }

/* ===== Mi página de reservas ===== */
body.curvas .pg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
body.curvas .pg-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1 1 280px; }
body.curvas .pg-url { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 12px; border-radius: 10px; background: var(--ice); border: 1px solid var(--line); color: var(--t1); font-size: 13.5px; }
body.curvas .pg-acc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.curvas .pg-sucio { font-size: 12.5px; color: #b45309; font-weight: 500; } body.curvas .pg-sucio.hidden { display: none; }
body.curvas .etq-btn:disabled { opacity: .5; cursor: not-allowed; }
body.curvas a.etq-btn { text-decoration: none; display: inline-flex; align-items: center; }
body.curvas label.etq-btn { display: inline-flex; align-items: center; cursor: pointer; }
body.curvas .pg-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 1100px) { body.curvas .pg-cols { grid-template-columns: minmax(0, 1fr) 420px; } body.curvas .pg-vp { position: sticky; top: 16px; } }
body.curvas .pg-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); scrollbar-width: none; }
body.curvas .pg-tabs::-webkit-scrollbar { display: none; }
body.curvas .pg-tab { flex: 0 0 auto; padding: 7px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--t2); font: 400 13.5px var(--sans); cursor: pointer; white-space: nowrap; }
body.curvas .pg-tab:hover { background: var(--ice); color: var(--ink); } body.curvas .pg-tab.on { background: var(--ink); color: #fff; }
body.curvas .pg-cuerpo { display: grid; gap: 14px; }
body.curvas .pg-card { padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; gap: 12px; }
body.curvas .pg-card h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink) !important; letter-spacing: -.01em; }
body.curvas .pg-nota { margin: 0; font-size: 13px; color: var(--t2) !important; line-height: 1.45; } body.curvas .pg-vacio { margin: 0; font-size: 13px; color: var(--t3); }
body.curvas .pg-f { display: grid; gap: 5px; } body.curvas .pg-f > span { font-size: 13px; font-weight: 500; color: var(--ink); } body.curvas .pg-f small { font-size: 12px; color: var(--t2); line-height: 1.35; }
body.curvas .pg-f input, body.curvas .pg-f textarea { width: 100%; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2) !important; background: #fff !important; color: var(--ink) !important; font-size: 14px; resize: vertical; }
body.curvas .pg-f input:focus, body.curvas .pg-f textarea:focus { border-color: var(--deep) !important; outline: none; }
body.curvas .pg-img { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
body.curvas .pg-img-v { flex: none; width: 96px; height: 96px; border-radius: 16px; border: 1px dashed var(--line-2); background: var(--ice); display: grid; place-items: center; overflow: hidden; color: var(--t3); font-size: 12px; }
body.curvas .pg-img-v.portada { width: 160px; height: 96px; } body.curvas .pg-img-v img { width: 100%; height: 100%; object-fit: contain; } body.curvas .pg-img-v.portada img { object-fit: cover; }
body.curvas .pg-img-t { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; } body.curvas .pg-img-t b { font-weight: 500; color: var(--ink); font-size: 14px; } body.curvas .pg-img-t small { font-size: 12px; color: var(--t2); line-height: 1.4; }
body.curvas .pg-img-b { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
body.curvas .pg-sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
body.curvas .pg-sw { position: relative; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 400 13.5px var(--sans); cursor: pointer; text-align: left; }
body.curvas .pg-sw i { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-2); }
body.curvas .pg-sw:hover { border-color: var(--deep); } body.curvas .pg-sw.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
body.curvas .pg-sw input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
body.curvas .pg-opc { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } body.curvas .pg-opc b { font-weight: 500; font-size: 13.5px; color: var(--ink); }
body.curvas .pg-opc > div { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--ice-2); gap: 2px; }
body.curvas .pg-opc button { padding: 6px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--t1); font: 400 13px var(--sans); cursor: pointer; } body.curvas .pg-opc button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(3,40,56,.15); }
body.curvas .pg-tg { display: grid; gap: 8px; }
body.curvas .pg-tgf { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--ice); border: 1px solid var(--line); cursor: pointer; }
body.curvas .pg-tgf > span:first-child { display: grid; gap: 1px; min-width: 0; } body.curvas .pg-tgf b { font-weight: 500; font-size: 14px; color: var(--ink); } body.curvas .pg-tgf small { font-size: 12px; color: var(--t2); }
body.curvas .pg .cc-pausa { margin-left: 0; flex: none; }
body.curvas .pg-sec { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ice); } body.curvas .pg-sec.off { opacity: .65; }
body.curvas .pg-sec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.curvas .pg-sec input.pg-sec-n, body.curvas .pg-sec input.pg-sec-d { min-width: 0; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line-2) !important; background: #fff !important; color: var(--ink) !important; font-size: 14px; }
body.curvas .pg-sec-n { flex: 1 1 160px; font-weight: 500; } body.curvas .pg-sec-d { width: 100%; font-size: 13px !important; }
body.curvas .pg-mover { display: inline-flex; flex-direction: column; gap: 2px; flex: none; }
body.curvas .pg-mover button { width: 26px; height: 20px; min-height: 0 !important; padding: 0; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; color: var(--t1); font-size: 12px; line-height: 1; cursor: pointer; } body.curvas .pg-mover button:disabled { opacity: .35; cursor: default; } body.curvas .pg-mover button:not(:disabled):hover { border-color: var(--deep); }
body.curvas .pg-sv { display: grid; gap: 4px; }
body.curvas .pg-svi { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
body.curvas .pg-svn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ink); } body.curvas .pg-svn em { color: var(--t3); font-style: normal; font-size: 12px; }
body.curvas .pg-x { width: 26px; height: 26px; min-height: 0 !important; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--bad); font-size: 16px; line-height: 1; cursor: pointer; } body.curvas .pg-x:hover { background: rgba(209,70,86,.08); }
body.curvas .pg-add { width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px dashed var(--line-2) !important; background: #fff !important; color: var(--t1) !important; font-size: 13.5px; }
body.curvas .pg-vp { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
body.curvas .pg-vp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; } body.curvas .pg-vp-h b { font-weight: 500; color: var(--ink); font-size: 14px; }
body.curvas .pg-vp-sw { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--ice-2); gap: 2px; }
body.curvas .pg-vp-sw button { padding: 5px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--t1); font: 400 12.5px var(--sans); cursor: pointer; } body.curvas .pg-vp-sw button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(3,40,56,.15); }
body.curvas .pg-vp-box { height: 640px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ice); overflow: hidden; display: flex; justify-content: center; }
body.curvas .pg-vp-box iframe { border: 0; height: 100%; background: #fff; width: 100%; } body.curvas .pg-vp-box.cel iframe { width: 390px; max-width: 100%; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
body.curvas .pg-vp-n { margin: 0; font-size: 12px; color: var(--t3); line-height: 1.4; }
@media (max-width: 1099px) { body.curvas .pg-vp-box { height: 560px; } }
@media (max-width: 560px) { body.curvas .pg-card { padding: 14px; } body.curvas .pg-img-v.portada { width: 100%; } }

/* avisos: icono y texto centrados entre sí (también cuando el aviso tiene una sola línea) */
#toastContainer > div { align-items: center !important; }
#toastContainer h4 { line-height: 1.35; }
#toastContainer > div > div:first-child:not(:last-child) { margin-top: 0 !important; }
#toastContainer > div { display: flex !important; align-items: center !important; }
#toastContainer > div > div.flex-1 { align-self: center; padding-top: 3px; }
#toastContainer h4 { margin: 0; line-height: 1.3; }
#toastContainer h4 + p { margin-top: 3px; }

/* horarios: "Agregar intervalo" y "Copiar a otro día" van al costado del último intervalo */
body.curvas .sch-range { flex-wrap: wrap; }
body.curvas .sch-range .sch-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 0 0 0 6px; }
/* CRM de chats: la fila de la grilla no crece con el chat; la cabecera con acciones y el redactor quedan fijos y solo los mensajes se desplazan */
body.curvas .crm-3 { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
body.curvas .crm-3 > .cl, body.curvas .crm-3 > .cc, body.curvas .crm-3 > .cp { min-height: 0; max-height: 100%; }
body.curvas .cc-panel { height: 100%; overflow: hidden; }
body.curvas #crmCabecera, body.curvas .cc-h, body.curvas .cc-c { flex: none; }
body.curvas .cc-m { flex: 1 1 0; min-height: 0; overscroll-behavior: contain; }
body.curvas .cc-c { max-height: 55%; overflow-y: auto; }

/* CRM en pantalla completa */
body.curvas .crm-full-btn { margin-left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--t1); font: 400 12px var(--sans); cursor: pointer; }
body.curvas .crm-full-btn svg { width: 14px; height: 14px; }
body.curvas .crm-full-btn:hover { border-color: var(--deep); color: var(--ink); }
body.curvas .crm-top em + .crm-full-btn { margin-left: auto; }
body.crm-fs { overflow: hidden; }
body.curvas .crm-win.crm-full { position: fixed; inset: 0; z-index: 80; border-radius: 0; border: 0; box-shadow: none; display: flex; flex-direction: column; background: #fff; }
body.curvas .crm-win.crm-full .crm-top { flex: none; }
body.curvas .crm-win.crm-full .crm-3 { flex: 1 1 0; min-height: 0; height: auto; }
body.curvas .crm-win.crm-full .crm-rzh { display: none !important; }
body.curvas .crm-win.crm-full #crmEtq, body.curvas .crm-win.crm-full #crmContactos { flex: 1 1 0; min-height: 0; overflow: auto; }
@media (max-width: 640px) { body.curvas .crm-full-btn span { display: none; } }
