/* =====================================================================
   Panel de los salones · estilo «cristal» (tarjetas translúcidas, cápsulas
   negras, mucho aire). Se carga solo en /panel, después de app.css.
   ===================================================================== */
:root {
  --ink: #111113;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --muted-2: #a1a1aa;
  --bg: #eeeef0;
  --bg-grad: radial-gradient(1200px 700px at 85% -10%, #ffffff 0%, rgba(255,255,255,0) 60%), radial-gradient(900px 600px at 0% 100%, #f7f7f8 0%, rgba(247,247,248,0) 60%), linear-gradient(180deg, #ececee 0%, #e6e6e9 100%);
  --frame: rgba(250, 250, 251, .72);
  --surface: rgba(255, 255, 255, .62);
  --surface-solid: #ffffff;
  --surface-2: rgba(244, 244, 245, .9);
  --inner: #ffffff;
  --hover: rgba(0, 0, 0, .045);
  --line: rgba(0, 0, 0, .07);
  --line-strong: rgba(0, 0, 0, .11);
  --edge: rgba(255, 255, 255, .9);
  --primary: #0f0f10;
  --primary-ink: #ffffff;
  --soft: rgba(0, 0, 0, .055);
  --ok: #16a34a;
  --info: #2563eb;
  --warn: #d97706;
  --danger: #db2777;
  --lime: #d9f99d;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(16, 16, 20, .04), 0 8px 24px -12px rgba(16, 16, 20, .08);
  --shadow-pop: 0 24px 60px -18px rgba(16, 16, 20, .28), 0 2px 6px rgba(16, 16, 20, .06);
  --sidebar: 84px;
  --topbar: 56px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme='dark'] {
  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --bg: #0b0b0d;
  --bg-grad: radial-gradient(1000px 600px at 85% -10%, #1f1f24 0%, rgba(31,31,36,0) 60%), linear-gradient(180deg, #0d0d10, #08080a);
  --frame: rgba(22, 22, 26, .7);
  --surface: rgba(255, 255, 255, .045);
  --surface-solid: #18181b;
  --surface-2: rgba(255, 255, 255, .06);
  --inner: rgba(255, 255, 255, .06);
  --hover: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .13);
  --edge: rgba(255, 255, 255, .06);
  --primary: #f4f4f5;
  --primary-ink: #0f0f10;
  --soft: rgba(255, 255, 255, .09);
  --shadow: none;
  --shadow-pop: 0 24px 60px -18px rgba(0, 0, 0, .8);
}

/* Curvas de movimiento (más firmes que las de serie del navegador) */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
html, body { background: var(--bg); }
body { background: var(--bg-grad); background-attachment: fixed; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); letter-spacing: -.01em; font-feature-settings: 'cv11', 'ss01', 'ss03'; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; }
.svg { stroke-width: 1.7; }
a { color: var(--ink); }
.muted, .small.muted, small.muted { color: var(--muted); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); outline-offset: 2px; }

/* ---------- Marco ---------- */
.layout { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
@media (min-width: 1024px) {
  .layout {
    margin: 16px; min-height: calc(100vh - 32px); border-radius: 32px; background: var(--frame);
    backdrop-filter: blur(30px) saturate(140%); -webkit-backdrop-filter: blur(30px) saturate(140%);
    border: 1px solid var(--edge); box-shadow: 0 30px 80px -40px rgba(16, 16, 20, .35), inset 0 1px 0 rgba(255,255,255,.6);
  }
  [data-theme='dark'] .layout { box-shadow: 0 30px 80px -40px rgba(0,0,0,.9); }
  .layout.expanded { --sidebar: 236px; }
  .sidebar { top: 16px; height: calc(100vh - 32px); border-radius: 32px 0 0 32px; }
}
.main { background: transparent; }

/* ---------- Barra lateral (carril de iconos) ---------- */
.sidebar { background: transparent; border: 0; padding: 22px 14px 18px; gap: 4px; align-items: stretch; overflow: visible; }
.sb-top { padding: 0 0 18px; display: flex; justify-content: center; }
.brand { padding: 0; gap: 11px; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink); min-width: 0; letter-spacing: -.02em; }
.brand-logo { width: 46px; height: 46px; border-radius: 15px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); }
.brand-logo .svg { width: 21px; height: 21px; stroke-width: 2; }
.brand-txt { display: none; min-width: 0; line-height: 1.25; }
.brand-txt small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
.nav { display: grid; gap: 3px; justify-items: center; }
.nav-label { height: 1px; width: 24px; background: var(--line-strong); margin: 6px auto; padding: 0; }
.nav-label span { display: none; }
.nav a {
  position: relative; width: 44px; height: 42px; padding: 0; border-radius: 14px; display: grid; place-items: center;
  color: var(--ink-2); font-weight: 500; font-size: .875rem; border: 1px solid transparent; text-decoration: none; transition: background .15s, box-shadow .15s;
}
.nav a span, .nav-ext { display: none; }
.nav a .svg { width: 19px; height: 19px; color: inherit; }
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--surface-solid); color: var(--ink); border-color: var(--edge); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 16px -8px rgba(0,0,0,.18); }
/* Etiqueta al pasar el ratón */
@media (hover: hover) and (min-width: 640px) {
  .layout:not(.expanded) .nav a[data-tip]::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); opacity: 0; pointer-events: none;
    background: var(--primary); color: var(--primary-ink); font-size: .78rem; font-weight: 500; padding: 5px 10px; border-radius: 9px; white-space: nowrap; z-index: 80;
    transition: opacity 125ms var(--ease-out), transform 125ms var(--ease-out); transform-origin: left center;
  }
  /* Primera etiqueta con retardo (evita que salgan al pasar de largo); las siguientes, al instante y sin animación */
  .layout:not(.expanded) .nav a[data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); transition-delay: 400ms; }
  .layout:not(.expanded) .nav.tips-instant a[data-tip]::after { transition-duration: 0ms; transition-delay: 0ms; }
}
.sidebar-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 6px; justify-items: center; }
.trial { display: none; }
.user-card { position: relative; padding-top: 10px; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.avatar.sm { width: 46px; height: 46px; border-radius: 15px; font-size: .8rem; font-weight: 600; background: linear-gradient(135deg, #e4e4e7, #d4d4d8); color: #3f3f46; border: 1px solid var(--edge); flex: none; }
[data-theme='dark'] .avatar.sm { background: linear-gradient(135deg, #3f3f46, #27272a); color: #e4e4e7; }
.user-txt { display: none; min-width: 0; line-height: 1.3; }
.user-txt b { display: block; font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-txt small { display: block; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 240px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 6px; display: grid; z-index: 90; }
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu-head b { display: block; font-size: .85rem; }
.user-menu-head small { color: var(--muted); font-size: .75rem; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font: inherit; font-size: .85rem; color: var(--ink); background: none; border: 0; text-decoration: none; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--hover); }
.user-menu .svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.user-menu .nav-ext { display: inline; margin-left: auto; font-style: normal; color: var(--muted-2); }
@media (max-width: 1023px) { .user-menu .only-desktop { display: none; } }
/* Pantallas bajas: iconos un poco más pequeños para que quepa todo el menú */
@media (min-width: 640px) and (max-height: 860px) {
  .nav a { height: 36px; width: 40px; border-radius: 12px; }
  .nav a .svg { width: 18px; height: 18px; }
  .sb-top { padding-bottom: 12px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 13px; }
  .avatar.sm { width: 40px; height: 40px; border-radius: 13px; }
  .nav-label { margin: 4px auto; }
}

/* Menú con nombres (opcional en escritorio) */
@media (min-width: 1024px) {
  .layout.expanded .sb-top { justify-content: flex-start; padding-left: 4px; }
  .layout.expanded .brand-txt, .layout.expanded .user-txt { display: block; }
  .layout.expanded .nav { justify-items: stretch; gap: 3px; }
  .layout.expanded .nav a { width: auto; height: 36px; display: flex; gap: 12px; padding: 0 12px; justify-content: flex-start; border-radius: 11px; }
  .layout.expanded .nav a .svg { width: 18px; height: 18px; }
  .layout.expanded .sidebar { overflow-y: auto; scrollbar-width: none; }
  .layout.expanded .nav a span { display: inline; }
  .layout.expanded .nav-ext { display: inline; margin-left: auto; font-style: normal; color: var(--muted-2); }
  .layout.expanded .nav-label { width: auto; height: auto; background: none; margin: 8px 0 2px; padding: 0 12px; font-size: .72rem; color: var(--muted); font-weight: 500; }
  .layout.expanded .nav-label span { display: inline; }
  .layout.expanded .sidebar-foot { justify-items: stretch; }
  .layout.expanded .trial { display: block; background: var(--surface-solid); border: 1px solid var(--edge); border-radius: 16px; padding: 12px 14px; font-size: .8rem; line-height: 1.45; box-shadow: var(--shadow); }
  .layout.expanded .trial span[style] { color: var(--ink) !important; font-weight: 600 !important; }
  .layout.expanded .user-card { padding: 10px 2px 0; border-top: 1px solid var(--line); }
}

/* ---------- Cabecera ---------- */
.topbar { display: none; }
.page-head { display: flex; align-items: flex-start; gap: 18px; padding: 26px 30px 0 8px; flex-wrap: wrap; }
.page-title { flex: 1; min-width: 240px; }
.page-date { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.page-date::first-letter { text-transform: uppercase; }
.page-title h1 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.1; margin: 0; }
.page-title p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.page-title p:empty { display: none; }
.head-tools { display: flex; align-items: center; gap: 10px; position: relative; padding-top: 6px; }
.search-pill { position: relative; display: flex; align-items: center; gap: 10px; width: min(340px, 34vw); height: 48px; padding: 0 10px 0 18px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.search-pill > .svg { width: 18px; height: 18px; color: var(--ink); flex: none; }
.search-pill input { border: 0; outline: 0; background: transparent; font: inherit; font-size: .9rem; color: var(--ink); flex: 1; min-width: 0; }
.search-pill input::placeholder { color: var(--muted); }
.search-pill input::-webkit-search-cancel-button { display: none; }
.search-pill kbd { font: inherit; font-size: .72rem; color: var(--muted); background: var(--soft); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.search-res, .avisos-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 100%; min-width: 300px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 95; display: grid; }
.search-res[hidden], .avisos-pop[hidden] { display: none; }
.avisos-pop { width: 340px; }
.search-res a, .avisos-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px; text-decoration: none; color: var(--ink); }
.search-res a:hover, .search-res a.sel, .avisos-pop a:hover { background: var(--hover); }
.search-res b, .avisos-pop b { display: block; font-size: .86rem; font-weight: 600; }
.search-res small, .avisos-pop small { display: block; color: var(--muted); font-size: .76rem; }
.search-empty { padding: 14px 12px; color: var(--muted); font-size: .85rem; }
.avatar.xs { width: 30px; height: 30px; font-size: .68rem; border-radius: 50%; color: #fff; flex: none; }
.pop-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; }
.pop-head b { font-size: .95rem; }
.pop-foot { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 13px 13px !important; color: var(--ink-2) !important; font-size: .85rem; }
.pop-foot .svg { width: 16px; height: 16px; color: var(--muted); }
.round-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface-solid); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); flex: none; }
.round-btn:hover { background: var(--inner); filter: brightness(.98); }
.round-btn .svg { width: 19px; height: 19px; }
.round-btn .dot { position: absolute; top: 11px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 0 2px var(--surface-solid); }
.round-btn .dot[hidden] { display: none; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 30px 0 8px; }
.page-actions[hidden] { display: none; }
.content { padding: 20px 30px 40px 8px; }

/* ---------- Botones ---------- */
.btn { border-radius: 999px; border: 1px solid var(--edge); background: var(--surface-solid); color: var(--ink); font-weight: 500; font-size: .85rem; padding: 8px 16px; min-height: 40px; gap: 8px; box-shadow: var(--shadow); transition: background .15s, transform .1s, filter .15s; }
.btn:hover { filter: brightness(.97); text-decoration: none; }
[data-theme='dark'] .btn:hover { filter: brightness(1.2); }
.btn:active { transform: scale(.98); }
.btn .svg { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.danger { color: var(--danger); }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.sm { min-height: 32px; padding: 5px 13px; font-size: .8rem; }
.btn.icon { min-width: 40px; padding: 8px; }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface-solid); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; transition: filter .15s, transform .1s; }
.pill-btn:hover { filter: brightness(.97); text-decoration: none; }
.pill-btn:active { transform: scale(.98); }
.pill-btn .svg { width: 15px; height: 15px; }
.pill-btn.dark { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pill-btn.soft { background: var(--soft); border-color: transparent; box-shadow: none; }
.pill-btn.sm { height: 32px; padding: 0 14px; font-size: .8rem; }
.pill-btn:disabled { opacity: .5; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 1rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.card-head h2 .svg { width: 17px; height: 17px; color: var(--muted); }
.card-pad { padding: 22px; }
.grid, .stack { gap: 18px; }
.list-item { padding: 13px 22px; border-bottom: 1px solid var(--line); }
.list-item.click:hover, .ac-item:hover, .ac-item.sel { background: var(--hover); }
.table th { background: transparent; font-size: .75rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.kpi { padding: 18px 22px; }
.kpi .label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.kpi .value { font-size: 1.9rem; font-weight: 400; letter-spacing: -.04em; margin-top: 4px; }
.empty { color: var(--muted); }

/* ---------- Formularios ---------- */
.field { gap: 7px; }
.field label { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.input, select.input, textarea.input { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-solid); padding: 9px 14px; min-height: 42px; font-size: .875rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
[data-theme='dark'] .input, [data-theme='dark'] select.input, [data-theme='dark'] textarea.input { background: rgba(255,255,255,.05); }
.input:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.input:focus { border-color: color-mix(in srgb, var(--ink) 40%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input.sm { min-height: 34px; border-radius: 999px; }
.color-input { width: 48px; height: 36px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-solid); cursor: pointer; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: var(--surface-solid); }
.input-prefix span { display: flex; align-items: center; padding: 0 12px; background: var(--soft); color: var(--muted); font-size: .8rem; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-prefix .input { border: 0; border-radius: 0; flex: 1; min-width: 80px; }
.check { gap: 11px; align-items: center; font-size: .875rem; }
.check input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: rgba(120,120,128,.24); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.check input[type=checkbox]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.check input[type=checkbox]:checked { background: var(--primary); }
.check input[type=checkbox]:checked::after { transform: translateX(16px); background: var(--primary-ink); }
input[type=radio] { accent-color: var(--primary); }

/* ---------- Pestañas y chips ---------- */
.tabs { background: var(--soft); border: 0; border-radius: 999px; padding: 3px; gap: 2px; }
.tabs button { border-radius: 999px; font-weight: 500; font-size: .8rem; color: var(--muted); padding: 6px 14px; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { background: var(--surface-solid); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.utabs { display: flex; gap: 6px; margin: 0 0 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.utabs::-webkit-scrollbar { display: none; }
.utabs a { padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.utabs a:hover { background: var(--hover); }
.utabs a.active { background: var(--primary); color: var(--primary-ink); }
.chip { border: 1px solid var(--edge); background: var(--surface-solid); font-weight: 500; font-size: .8rem; border-radius: 999px; }
.chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip-dot { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .74rem; font-weight: 500; white-space: nowrap; background: var(--soft); color: var(--ink-2); flex: none; }
.chip-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip-dot.info { background: #dbeafe; color: #1d4ed8; }
.chip-dot.ok { background: #dcfce7; color: #15803d; }
.chip-dot.warn { background: #fef3c7; color: #b45309; }
.chip-dot.danger { background: #fce7f3; color: #be185d; }
[data-theme='dark'] .chip-dot.info { background: rgba(37,99,235,.2); color: #93c5fd; }
[data-theme='dark'] .chip-dot.ok { background: rgba(22,163,74,.2); color: #86efac; }
[data-theme='dark'] .chip-dot.warn { background: rgba(217,119,6,.2); color: #fcd34d; }
[data-theme='dark'] .chip-dot.danger { background: rgba(219,39,119,.2); color: #f9a8d4; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #ede9fe; color: #6d28d9; font-size: .74rem; font-weight: 600; vertical-align: middle; }
[data-theme='dark'] .count { background: rgba(139,92,246,.25); color: #c4b5fd; }
.badge { border-radius: 999px; font-weight: 500; font-size: .72rem; padding: 3px 9px; border: 0; background: var(--soft); color: var(--ink-2); }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.danger { background: #fce7f3; color: #be185d; }
[data-theme='dark'] .badge.ok { background: rgba(22,163,74,.2); color: #86efac; }
[data-theme='dark'] .badge.warn { background: rgba(217,119,6,.2); color: #fcd34d; }
[data-theme='dark'] .badge.danger { background: rgba(219,39,119,.2); color: #f9a8d4; }
.alert { border-radius: 16px; border: 0; background: var(--soft); font-size: .85rem; }

/* ---------- Ajustes ---------- */
.set-wrap { max-width: 1040px; }
.set-form { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 26px 8px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.set-section { padding: 20px 0 16px; border-bottom: 1px solid var(--line); }
.set-section h2 { font-size: 1.1rem; font-weight: 500; margin: 0; }
.set-section p { margin: 4px 0 0; color: var(--muted); font-size: .875rem; max-width: 640px; }
.set-section.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.set-section + .card { margin: 18px 0 14px; }
.set-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 14px 48px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child, .set-full:last-child { border-bottom: 0; }
.set-label b { font-weight: 500; font-size: .9rem; }
.set-label p { margin: 3px 0 0; color: var(--muted); font-size: .825rem; line-height: 1.45; }
.set-ctrl { display: grid; gap: 10px; align-content: start; max-width: 540px; }
.set-ctrl > .input, .set-ctrl > select.input { max-width: 380px; }
.set-full { padding: 20px 0; border-bottom: 1px solid var(--line); }
.set-link { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.set-link:hover { text-decoration: none; filter: brightness(.99); }
.set-link > .svg { color: var(--muted); }
code.copy { background: var(--soft); border: 0; border-radius: 12px; font-size: .75rem; }

/* ---------- Ventanas ---------- */
.modal-back { background: rgba(20, 20, 24, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { background: var(--surface-solid); border: 1px solid var(--edge); border-radius: 28px; box-shadow: var(--shadow-pop); }
.modal-head { padding: 20px 24px 14px; border-bottom: 0; }
.modal-head h2 { font-size: 1.15rem; font-weight: 500; letter-spacing: -.025em; }
.modal-body { padding: 6px 24px 20px; }
.modal-body .card { background: var(--surface-2); border: 0; box-shadow: none; backdrop-filter: none; border-radius: 18px; }
.modal-foot { padding: 14px 24px 20px; border-top: 0; }
.modal-foot .btn { min-height: 42px; }
.toast { background: var(--primary); color: var(--primary-ink); border-radius: 999px; font-size: .85rem; font-weight: 500; padding: 11px 20px; box-shadow: var(--shadow-pop); }

/* ---------- Agenda ---------- */
.cal { background: var(--surface-solid); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); max-height: calc(100vh - 290px); }
.cal-head-cell { font-weight: 500; font-size: .84rem; background: var(--surface-solid); }
.cal-head-cell.today { color: var(--ink); }
.cal-times { background: var(--surface-solid); }
.cal-ev { border-radius: 10px; }
.cal-ev b { font-weight: 600; }
.date-title { font-weight: 500; letter-spacing: -.02em; }

/* ---------- Acceso ---------- */
.auth { background: var(--bg-grad); }
.auth .card { background: var(--frame); border: 1px solid var(--edge); border-radius: 30px; box-shadow: var(--shadow-pop); padding: 36px 32px; backdrop-filter: blur(30px); }
.auth h1 { font-size: 1.8rem; font-weight: 400; letter-spacing: -.04em; }
.auth .brand-logo { width: 40px; height: 40px; border-radius: 13px; }
.auth .brand small { font-weight: 400; }
.auth .btn.primary { min-height: 46px; }

/* =====================================================================
   Inicio
   ===================================================================== */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: 28px; box-shadow: var(--shadow); padding: 22px 24px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); min-width: 0; display: flex; flex-direction: column; gap: 14px; color: var(--ink); text-decoration: none; }
a.tile:hover { text-decoration: none; }
.tile h2 { font-size: 1.15rem; font-weight: 500; margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: -.025em; }
.tile small { color: var(--muted); font-size: .78rem; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tile-top > div > small { display: block; margin-top: 1px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who b { display: block; font-weight: 600; font-size: .92rem; }
.who small { display: block; }
.orb { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 30%, #fdba74, #f97316 60%, #ea580c); box-shadow: 0 6px 16px -6px rgba(234,88,12,.6); flex: none; }
.orb .svg { width: 19px; height: 19px; stroke-width: 2; }
.brief { grid-column: span 8; }
.brief-text { font-size: clamp(1.15rem, 1.7vw, 1.55rem); line-height: 1.35; letter-spacing: -.025em; margin: 6px 0 4px; font-weight: 400; max-width: 760px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--edge); font-size: .8rem; font-weight: 500; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; }
.chip-btn:hover { text-decoration: none; filter: brightness(.97); }
.chip-btn .svg { width: 14px; height: 14px; }
.link-arrow, .muted-link { font-size: .85rem; font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; }
.link-arrow span { margin-left: 6px; }
.muted-link { color: var(--muted); font-weight: 400; }
.approve { grid-column: span 4; }
.inner { background: var(--inner); border-radius: 20px; padding: 16px; display: grid; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.sq { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); flex: none; }
.sq .svg { width: 18px; height: 18px; }
.hint { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 8px 12px; font-size: .8rem; color: var(--ink-2); }
.hint .svg { width: 14px; height: 14px; color: #7c3aed; }
.hint::first-letter { text-transform: uppercase; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.duo .pill-btn { height: 46px; }
.more-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); text-decoration: none; margin-top: auto; }
.more-line span { color: var(--ink); }
.ok-box { grid-template-columns: auto 1fr; align-items: center; }
.ok-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #dcfce7; color: #15803d; }
.ok-box b { display: block; font-weight: 600; }

/* Tarjetas de cifra con degradado */
.kpi-g { grid-column: span 3; color: #fff; border: 0; overflow: hidden; min-height: 230px; justify-content: space-between; gap: 10px; isolation: isolate; }
.kpi-g::before { content: ''; position: absolute; inset: 0; z-index: -1; }
.kpi-g.green::before { background: radial-gradient(120% 90% at 20% 0%, #bef264 0%, rgba(190,242,100,0) 55%), linear-gradient(160deg, #65c466 0%, #34a853 50%, #1e8a3c 100%); }
.kpi-g.orange::before { background: radial-gradient(120% 90% at 20% 0%, #fde68a 0%, rgba(253,230,138,0) 50%), linear-gradient(160deg, #fdba74 0%, #fb923c 45%, #f97316 75%, #ea580c 100%); }
.kpi-g .kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-g .tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: rgba(255,255,255,.7); backdrop-filter: blur(8px); font-size: .76rem; font-weight: 500; color: #18181b; }
.kpi-g .tag.light { background: #fff; color: #111; }
.kpi-g .go { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); color: #18181b; font-size: .85rem; }
.kpi-g .big-num { font-size: clamp(3rem, 5vw, 4.4rem); font-weight: 300; letter-spacing: -.05em; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0,0,0,.08); }
.kpi-g .big-num small { font-size: .42em; font-weight: 400; letter-spacing: 0; margin-left: 4px; color: #fff; }
.kpi-g .kpi-sub { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .78rem; color: rgba(255,255,255,.9); }
.ruler { display: flex; align-items: flex-end; justify-content: space-between; height: 18px; padding: 0 2px; }
.ruler i { width: 1.5px; height: 8px; background: rgba(255,255,255,.55); border-radius: 2px; }
.ruler i.mid { height: 11px; }
.ruler i.now { height: 18px; width: 2px; background: #fff; }

/* Línea de tiempo de hoy */
.sched { grid-column: span 6; }
.tl { position: relative; padding: 34px 6px 0; }
.tl-lanes { display: grid; gap: 8px; position: relative; padding-bottom: 12px; background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 22%, transparent) 1px, transparent 1.5px); background-size: 10px 4px; background-repeat: repeat-x; background-position: 0 100%; }
.tl-lane { position: relative; height: 30px; }
.tl-ev { position: absolute; top: 0; height: 30px; border: 0; border-radius: 9px; padding: 0 8px 0 10px; text-align: left; font: inherit; font-size: .74rem; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--c) 18%, var(--surface-solid)); overflow: hidden; cursor: pointer; white-space: nowrap; min-width: 6px; }
.tl-ev::before { content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--c); }
.tl-ev span { overflow: hidden; text-overflow: ellipsis; display: block; padding-left: 2px; line-height: 30px; }
.tl-ev.completada { opacity: .55; }
.tl-ev.pendiente { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--surface-solid)) 0 6px, var(--surface-solid) 6px 10px); }
.tl-ev:hover { filter: brightness(.96); }
.tl-empty { color: var(--muted); font-size: .85rem; padding: 6px 0 14px; }
.tl-now { position: absolute; top: 4px; bottom: 22px; width: 0; border-left: 2px solid var(--ink); z-index: 2; pointer-events: none; }
.tl-now span { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); background: var(--lime); color: #1a2e05; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tl-axis { position: relative; height: 22px; margin-top: 6px; }
.tl-axis span { position: absolute; transform: translateX(-50%); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.tl-axis span:first-child { transform: none; }
.tl-axis span:last-child { transform: translateX(-100%); }
.next { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; background: var(--inner); border-radius: 18px; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; margin-top: auto; }
.next.done { cursor: default; }
.next b { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next small { display: block; }
.next .grow { min-width: 0; }
.time-badge { min-width: 46px; height: 40px; padding: 0 8px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: .82rem; font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.time-badge .svg { width: 18px; height: 18px; }
.faces { display: flex; }
.faces i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .68rem; font-weight: 600; font-style: normal; margin-left: -7px; box-shadow: 0 0 0 2px var(--inner); }
.faces i.more { background: #e9f5d8; color: #3f6212; }
.arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); flex: none; }

/* Citas de hoy */
.today { grid-column: span 7; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { min-width: 0; }
.row b { display: block; font-weight: 500; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.is-done b { color: var(--muted); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.row.is-done .tick { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tick .svg { width: 13px; height: 13px; stroke-width: 2.6; }

/* Equipo */
.team { grid-column: span 5; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.member { background: var(--inner); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-height: 140px; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.member:hover { text-decoration: none; filter: brightness(.99); }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: auto; }
.m-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .74rem; font-weight: 600; }
.member b { font-weight: 500; font-size: .92rem; margin-top: 14px; }
.member small { line-height: 1.35; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  :root { --sidebar: 76px; }
  .sidebar { position: sticky; top: 0; height: 100vh; padding: 16px 10px; background: var(--frame); backdrop-filter: blur(20px); border-right: 1px solid var(--edge); }
  .page-head { padding: 22px 22px 0 18px; }
  .page-actions { padding: 12px 22px 0 18px; }
  .content { padding: 18px 22px 40px 18px; }
  .search-pill { width: min(280px, 40vw); }
  .brief, .approve, .sched, .today, .team { grid-column: span 12; }
  .kpi-g { grid-column: span 6; min-height: 200px; }
  .set-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 639px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; height: auto; background: var(--surface-solid); padding: 18px 14px; border-radius: 0 24px 24px 0; z-index: 70; align-items: stretch; }
  .sb-top { justify-content: flex-start; }
  .brand-txt, .user-txt { display: block; }
  .nav { justify-items: stretch; gap: 2px; }
  .nav a { width: auto; height: 44px; display: flex; gap: 12px; padding: 0 12px; justify-content: flex-start; }
  .nav a span, .nav-ext { display: inline; }
  .nav-ext { margin-left: auto; font-style: normal; color: var(--muted-2); }
  .nav-label { width: auto; height: auto; background: none; margin: 8px 0 2px; padding: 0 12px; font-size: .72rem; color: var(--muted); }
  .nav-label span { display: inline; }
  .sidebar-foot { justify-items: stretch; }
  .sidebar-foot .trial { display: block; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; font-size: .8rem; }
  .user-card { border-top: 1px solid var(--line); padding-top: 12px; }
  .avatar.sm { width: 40px; height: 40px; border-radius: 13px; }
  .scrim { z-index: 65; }
  .topbar { display: flex; height: 60px; padding: 0 12px; gap: 8px; background: transparent; border: 0; position: sticky; top: 0; z-index: 40; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: color-mix(in srgb, var(--bg) 70%, transparent); }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .sp { flex: 1; }
  .topbar-brand .brand-logo { width: 36px; height: 36px; border-radius: 12px; }
  .topbar-brand .brand-logo .svg { width: 17px; height: 17px; }
  .topbar .round-btn { width: 40px; height: 40px; }
  .topbar .round-btn .dot { top: 8px; right: 9px; }
  .head-tools > [data-avisos], .search-pill kbd { display: none; }
  .head-tools { display: none; width: 100%; padding: 0; }
  body.buscando .head-tools { display: flex; order: -1; }
  body.buscando .search-pill { width: 100%; }
  .search-res { min-width: 0; }
  .avisos-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .page-head { padding: 6px 16px 0; }
  .page-title h1 { font-size: 1.75rem; }
  .page-actions { padding: 12px 16px 0; justify-content: flex-start; }
  .content { padding: 14px 14px 100px; }
  .bottom-nav { background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--edge); }
  .bottom-nav a { font-weight: 500; color: var(--muted); }
  .bottom-nav a.active { color: var(--ink); }
  .cal { max-height: calc(100vh - 300px); }
  .modal, .modal.wide { border-radius: 26px 26px 0 0; }
  .dash { gap: 12px; }
  .tile { padding: 18px; border-radius: 24px; }
  .kpi-g { grid-column: span 6; min-height: 172px; padding: 14px; }
  .kpi-g .big-num { font-size: 2.6rem; }
  .kpi-g .kpi-sub span:last-child { display: none; }
  .chip-btn { height: 34px; }
  .tile-foot .link-arrow { display: none; }
  .row .chip-dot { display: none; }
  .next .faces { display: none; }
  .set-form { padding: 2px 18px 6px; }
  .set-row { padding: 16px 0; }
  .auth .card { padding: 28px 22px; }
}


/* =====================================================================
   Pulido de interacción (criterios de diseño de Emil Kowalski)
   ===================================================================== */
/* Respuesta al pulsar: todo lo que se pulsa se hunde un poco */
.btn, .pill-btn, .round-btn, .chip-btn, .user-btn, .member, .tl-ev, .next, .nav a, .utabs a, .tabs button, .chip, .sb-toggle, .user-more {
  transition-property: transform, background-color, border-color, color, filter, box-shadow, opacity;
  transition-duration: 160ms; transition-timing-function: var(--ease-out);
}
.btn:active, .pill-btn:active, .round-btn:active, .chip-btn:active, .user-btn:active, .tl-ev:active, .next:not(.done):active, .chip:active { transform: scale(.97); }
.nav a:active, .utabs a:active, .tabs button:active { transform: scale(.96); }
.member:active { transform: scale(.98); }
.list-item.click:active, .row:active { background: var(--hover); }
.check input[type=checkbox], .check input[type=checkbox]::after { transition-duration: 200ms; transition-timing-function: var(--ease-out); }

/* Ventanas: entran desde un poco más pequeñas (nunca desde cero) y salen más rápido de lo que entran */
.modal-back { animation: m-fade 200ms var(--ease-out); }
.modal { animation: m-pop 240ms var(--ease-out); transform-origin: center; }
.modal-back.closing { animation: m-fade-out 150ms var(--ease-out) forwards; pointer-events: none; }
.modal-back.closing .modal { animation: m-pop-out 150ms var(--ease-out) forwards; }
@keyframes m-fade { from { opacity: 0; } }
@keyframes m-fade-out { to { opacity: 0; } }
@keyframes m-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes m-pop-out { to { opacity: 0; transform: scale(.98); } }
@media (max-width: 639px) {
  /* En el móvil la ventana es una hoja que sube desde abajo, con la curva de iOS */
  .modal { animation: m-sheet 380ms var(--ease-drawer); }
  .modal-back.closing .modal { animation: m-sheet-out 220ms var(--ease-out) forwards; }
  @keyframes m-sheet { from { transform: translateY(100%); } }
  @keyframes m-sheet-out { to { transform: translateY(100%); } }
}

/* Avisos flotantes: bajan desde arriba y se van hacia arriba (misma dirección) */
.toast { animation: t-in 320ms var(--ease-out); }
.toast.out { animation: t-out 200ms var(--ease-out) forwards; }
@keyframes t-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes t-out { to { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* Menús desplegables: nacen desde el botón que los abre */
.user-menu, .avisos-pop, .search-res {
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), display 160ms allow-discrete;
  opacity: 1; transform: none;
}
.user-menu { transform-origin: bottom left; }
.avisos-pop { transform-origin: top right; }
.search-res { transform-origin: top center; }
@starting-style {
  .user-menu, .avisos-pop, .search-res { opacity: 0; transform: scale(.96); }
}
.user-menu[hidden], .avisos-pop[hidden], .search-res[hidden] { opacity: 0; transform: scale(.96); transition-duration: 100ms; }

/* Menú lateral del móvil: curva tipo iOS y fondo que aparece suave */
@media (max-width: 639px) {
  .sidebar { transition: transform 340ms var(--ease-drawer); }
  .scrim { animation: m-fade 240ms var(--ease-out); }
}

/* Los efectos al pasar el ratón solo en dispositivos con ratón (en el móvil se quedan «pegados») */
@media (hover: none), (pointer: coarse) {
  .btn:hover, .pill-btn:hover, .chip-btn:hover, .round-btn:hover, .set-link:hover, .member:hover, .tl-ev:hover { filter: none; }
  .nav a:hover:not(.active), .utabs a:hover:not(.active), .user-menu a:hover, .user-menu button:hover, .search-res a:hover, .avisos-pop a:hover,
  .list-item.click:hover, .btn.ghost:hover, .input:hover { background: inherit; }
  .input:hover { border-color: var(--line-strong); background: var(--surface-solid); }
  .nav a:hover:not(.active) { background: transparent; }
}

/* Movimiento reducido: se quitan desplazamientos y escalas; se mantienen los fundidos */
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-back.closing .modal, .toast, .toast.out { animation-name: m-fade; }
  .modal-back.closing .modal, .toast.out { animation-name: m-fade-out; }
  .btn:active, .pill-btn:active, .round-btn:active, .chip-btn:active, .user-btn:active, .tl-ev:active, .next:active, .chip:active,
  .nav a:active, .utabs a:active, .tabs button:active, .member:active { transform: none; }
  .user-menu, .avisos-pop, .search-res, .user-menu[hidden], .avisos-pop[hidden], .search-res[hidden] { transform: none; }
  @starting-style { .user-menu, .avisos-pop, .search-res { transform: none; } }
  .sidebar { transition-duration: 0ms; }
}

/* ---------- Plan Gratis: funciones de pago ---------- */
.nav a.locked, .bottom-nav a.locked { opacity: .5; }
.mejora { max-width: 560px; margin: 24px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mejora h2 { margin: 0; font-size: 1.25rem; }
.mejora p { margin: 0; max-width: 46ch; }
.mejora-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.mejora-ico .svg { width: 20px; height: 20px; }
.uso-plan { display: grid; gap: 10px; }
.uso-barra { height: 6px; border-radius: 99px; background: var(--surface-2, rgba(0,0,0,.06)); overflow: hidden; }
.uso-barra i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.uso-barra.lleno i { background: var(--danger, #c0392b); }
.lock-field { position: relative; }
.lock-note { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lock-note .svg { width: 13px; height: 13px; }
.mejora.mejora-sm { margin: 0 auto; padding: 18px 20px 22px; max-width: none; }
.mejora.mejora-sm h2 { font-size: 1rem; }
.mejora.mejora-sm p { font-size: .88rem; }
.uso-tile { grid-column: 1 / -1; }
.uso-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.uso-top { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
@media (min-width: 900px) { .uso-tile .uso-plan { grid-template-columns: 1.1fr 1fr 1fr; align-items: end; gap: 24px; } }
.mejora.mejora-sm { gap: 8px; padding: 16px 18px 20px; }
.mejora.mejora-sm p.muted { display: none; }
.mejora.mejora-sm .mejora-ico { width: 36px; height: 36px; border-radius: 11px; }

/* Logo de Citalma (icono con fondo propio) */
.brand-logo.marca { background: none !important; box-shadow: 0 6px 16px -8px rgba(127,35,80,.55); padding: 0; overflow: hidden; }
.brand-logo.marca img { width: 100%; height: 100%; display: block; }

/* ---------- WhatsApp automático ---------- */
.alert.danger { background: #fce7f3; color: #831843; }
[data-theme='dark'] .alert.danger { background: rgba(190,24,93,.18); color: #fbcfe8; }
.wa-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 18px; }
.wa-hero__txt { display: flex; flex-direction: column; gap: 12px; }
.wa-hero__estado { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wa-hero h2 { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
.wa-hero p { margin: 0; }
.wa-solicitar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.wa-solicitar .field { flex: 1 1 220px; margin: 0; }
.wa-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: paso; }
.wa-pasos li { counter-increment: paso; display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; padding: 12px 14px; border-radius: 16px; background: var(--soft); }
.wa-pasos li::before { content: counter(paso); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 600; font-size: .85rem; }
.wa-pasos b { font-size: .9rem; }
.wa-pasos span { font-size: .8rem; color: var(--muted); }
.wa-kpis { margin-bottom: 18px; }
.wa-kpis .kpi .value { font-size: 1.6rem; }
.wa-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; align-items: start; }
.wa-cols h2 { margin: 0; font-size: 1.05rem; }
.wa-importes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.wa-importe { flex-direction: column; height: auto; padding: 14px 8px; gap: 2px; border-radius: 16px; }
.wa-importe b { font-size: 1.2rem; letter-spacing: -.02em; }
.wa-importe span { font-size: .75rem; color: var(--muted); font-weight: 500; }
.wa-auto { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.wa-auto__fila .input { max-width: 260px; }
.wa-tipos { display: grid; gap: 14px; margin-top: 14px; }
.wa-tipo { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.wa-tipo:last-child { border-bottom: 0; padding-bottom: 0; }
.wa-burbuja { justify-self: start; max-width: 100%; background: #d9fdd3; color: #111b21; border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: .82rem; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
[data-theme='dark'] .wa-burbuja { background: #005c4b; color: #e9edef; }
.wa-imp { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .88rem; }
.wa-imp.mas { color: #15803d; }
@media (max-width: 980px) { .wa-hero, .wa-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .wa-hero { gap: 18px; }
  .wa-hero h2 { font-size: 1.15rem; }
  .wa-solicitar .btn { width: 100%; }
  .wa-importes { gap: 8px; }
  .wa-auto__fila .input { max-width: none; }
}

/* =====================================================================
   Rediseño 2026 · tarjetas blancas sobre lienzo claro, menú con nombres,
   tarjeta oscura de resumen y colores de la web (verde Citalma)
   ===================================================================== */
:root {
  --ink: #0f2420; --ink-2: #34504a; --muted: #6a7f7a; --muted-2: #9aaca7;
  --bg: #e6eeeb;
  --bg-grad: radial-gradient(1200px 700px at 90% -10%, #f6fbf9 0%, rgba(246,251,249,0) 60%), linear-gradient(180deg, #e9f0ed 0%, #e2ebe7 100%);
  --frame: #f3f7f5; --surface: #ffffff; --surface-solid: #ffffff; --surface-2: #f1f5f3; --inner: #f5f8f7;
  --hover: rgba(15,36,32,.05); --line: rgba(15,36,32,.08); --line-strong: rgba(15,36,32,.13); --edge: rgba(15,36,32,.06);
  --primary: #0c221d; --primary-ink: #ffffff; --soft: rgba(15,36,32,.06);
  --acc: #087a63; --acc-soft: #dbf3ea; --mint: #8ff0c4; --sun: #f0a43a;
  --ok: #12945f; --info: #0a7ea4; --warn: #c97a12; --danger: #d4405f;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(15,36,32,.04), 0 10px 28px -18px rgba(15,36,32,.22);
  --shadow-pop: 0 28px 60px -20px rgba(15,36,32,.35), 0 2px 8px rgba(15,36,32,.06);
  --font: 'Instrument Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme='dark'] {
  --ink: #eef5f2; --ink-2: #c8d6d1; --muted: #8fa29d; --muted-2: #6b7f7a;
  --bg: #07110f; --bg-grad: linear-gradient(180deg, #0a1513, #060d0b);
  --frame: #0d1916; --surface: #13211e; --surface-solid: #13211e; --surface-2: #1a2b27; --inner: #182824;
  --hover: rgba(255,255,255,.06); --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.13); --edge: rgba(255,255,255,.05);
  --primary: #e8f5f0; --primary-ink: #0c221d; --soft: rgba(255,255,255,.08); --acc-soft: rgba(18,148,95,.18);
  --shadow: none;
}
body { letter-spacing: -.005em; }
.card, .tile { backdrop-filter: none; -webkit-backdrop-filter: none; }
.btn.primary, .pill-btn.dark { background: var(--primary); border-color: var(--primary); }
.btn.primary:hover, .pill-btn.dark:hover { filter: none; background: color-mix(in srgb, var(--primary) 88%, var(--acc)); }
.check input[type=checkbox]:checked { background-color: var(--acc); border-color: var(--acc); }

/* ---------- Marco ---------- */
@media (min-width: 1024px) {
  .layout { margin: 14px; min-height: calc(100vh - 28px); border-radius: 30px; background: var(--frame); backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 1px solid rgba(255,255,255,.7); box-shadow: 0 30px 80px -50px rgba(15,36,32,.45); }
  .sidebar { top: 14px; height: calc(100vh - 28px); border-radius: 30px 0 0 30px; }
}
@media (min-width: 1180px) { .layout.expanded { --sidebar: 248px; } }
@media (min-width: 1024px) and (max-width: 1179px) { .layout.expanded { --sidebar: 84px; } }

/* ---------- Menú lateral ---------- */
.sidebar { padding: 20px 14px 16px; gap: 6px; }
.sb-top { padding: 0 0 12px; }
.brand { gap: 10px; }
.brand-logo { width: 40px; height: 40px; border-radius: 13px; box-shadow: 0 8px 18px -10px rgba(8,122,99,.7); }
.brand-name { display: none; height: 22px; width: auto; }
[data-theme='dark'] .brand-name { filter: invert(1) hue-rotate(180deg) brightness(1.4); }
.salon-card { display: none; align-items: center; gap: 10px; padding: 9px 10px; margin: 2px 0 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--edge); text-decoration: none; color: var(--ink); min-width: 0; }
.salon-card:hover { text-decoration: none; background: var(--surface); filter: brightness(.99); }
.salon-ini { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 600; font-size: .78rem; color: #fff; background: linear-gradient(140deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c)); }
.salon-txt { min-width: 0; flex: 1; line-height: 1.25; }
.salon-txt b { display: block; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.salon-txt small { display: block; font-size: .72rem; color: var(--muted); }
.salon-chev { width: 16px; height: 16px; color: var(--muted); flex: none; }
.nav { gap: 2px; }
.nav a { color: var(--ink-2); border-radius: 13px; }
.nav a .svg { width: 19px; height: 19px; }
.nav a.active { background: var(--surface); color: var(--ink); border-color: var(--edge); box-shadow: 0 1px 2px rgba(15,36,32,.05), 0 8px 18px -10px rgba(15,36,32,.25); }
.nav a.active .svg { color: var(--acc); }
.nav-count { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--acc); color: #fff; font-style: normal; font-size: .66rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.nav-count.soft { background: var(--soft); color: var(--ink-2); }
.nav-count[hidden] { display: none; }
.share-card { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--edge); text-decoration: none; color: var(--ink); position: relative; }
.share-card:hover { text-decoration: none; }
.share-orb { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, #8ff0c4, #12945f 55%, #087a63); box-shadow: 0 6px 14px -6px rgba(18,148,95,.8); flex: none; }
.share-orb .svg { width: 15px; height: 15px; }
.share-txt { display: none; min-width: 0; line-height: 1.25; }
.share-txt b { display: block; font-size: .84rem; font-weight: 600; }
.share-txt small { display: block; font-size: .72rem; color: var(--muted); }
.sb-toggle { display: none; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: .84rem; color: var(--muted); cursor: pointer; width: 100%; }
.sb-toggle .svg { width: 18px; height: 18px; flex: none; }
.sb-toggle:hover { background: var(--hover); color: var(--ink); }
.sidebar-foot { gap: 8px; }
.trial { font-size: .78rem; }
@media (min-width: 1024px) {
  .sb-toggle { display: flex; justify-content: center; padding: 0; width: 44px; margin: 0 auto; }
  .sb-toggle span { display: none; }
  .layout:not(.expanded) .share-card[data-tip]::after, .layout:not(.expanded) .sb-toggle[data-tip]:not([data-tip=''])::after { content: none; }
}
@media (min-width: 1180px) {
  .layout.expanded .sb-top { padding-left: 6px; }
  .layout.expanded .brand-name { display: block; }
  .layout.expanded .salon-card { display: flex; }
  .layout.expanded .nav a { height: 40px; padding: 0 12px; gap: 12px; border-radius: 13px; font-size: .9rem; }
  .layout.expanded .nav a .nav-count { position: static; margin-left: auto; }
  .layout.expanded .nav-label { margin: 10px 0 4px; padding: 0 12px; font-size: .74rem; color: var(--muted); font-weight: 500; }
  .layout.expanded .share-card { display: flex; width: auto; height: auto; padding: 12px; gap: 10px; place-items: initial; align-items: center; border-radius: 18px; }
  .layout.expanded .share-txt { display: block; }
  .layout.expanded .sb-toggle { width: 100%; justify-content: flex-start; padding: 0 12px; }
  .layout.expanded .sb-toggle span { display: inline; }
  .layout.expanded .trial { background: var(--surface); }
}
@media (min-width: 1024px) and (max-width: 1179px) {
  .layout.expanded .brand-txt, .layout.expanded .user-txt, .layout.expanded .nav a span:not(.nav-count), .layout.expanded .nav-label span, .layout.expanded .trial { display: none; }
  .layout.expanded .nav { justify-items: center; }
  .layout.expanded .nav a { width: 44px; height: 42px; padding: 0; display: grid; place-items: center; }
  .layout.expanded .nav-label { width: 24px; height: 1px; background: var(--line-strong); margin: 6px auto; padding: 0; }
  .layout.expanded .sb-top { justify-content: center; padding-left: 0; }
  .layout.expanded .sidebar-foot { justify-items: center; }
}
.layout:not(.expanded) .nav-label:first-child { display: none; }

/* ---------- Cabecera ---------- */
.page-head { align-items: center; gap: 14px; padding: 22px 26px 0 8px; flex-wrap: nowrap; }
.page-title { flex: 0 1 auto; min-width: 0; }
.page-title h1 { font-size: clamp(1.7rem, 2.2vw, 2.15rem); font-weight: 500; letter-spacing: -.035em; }
.page-date { order: 2; display: none; }
.page-title p { margin-top: 2px; font-size: .86rem; }
.search-pill { width: min(360px, 30vw); height: 46px; flex: 0 1 auto; margin-left: 10px; background: var(--surface); border: 1px solid var(--edge); }
.search-pill kbd { background: var(--surface-2); }
.head-tools { margin-left: auto; padding-top: 0; gap: 10px; }
.head-pill { height: 46px; padding: 0 18px; gap: 9px; font-weight: 500; }
.head-pill .svg { width: 16px; height: 16px; color: var(--muted); }
@media (max-width: 1320px) { .only-wide { display: none !important; } }
.round-btn { width: 46px; height: 46px; background: var(--surface); }
.round-btn .dot { background: var(--acc); top: 11px; right: 12px; }
.user-card { position: relative; padding: 0; border: 0; }
.head-tools .user-btn { gap: 10px; height: 46px; padding: 0 12px 0 4px; border-radius: 999px; }
.head-tools .user-btn:hover { background: var(--hover); }
.avatar.sm { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(140deg, color-mix(in srgb, var(--c, #087a63) 70%, #fff), var(--c, #087a63)); color: #fff; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--edge); font-size: .76rem; }
[data-theme='dark'] .avatar.sm { background: linear-gradient(140deg, color-mix(in srgb, var(--c, #087a63) 70%, #fff), var(--c, #087a63)); color: #fff; }
.head-tools .user-txt { display: block; }
.head-tools .user-txt b { font-size: .86rem; }
.head-tools .user-txt small { font-size: .74rem; }
.user-chev { width: 16px; height: 16px; color: var(--muted); }
.head-tools .user-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); }
@media (max-width: 1240px) { .head-tools .user-txt, .head-tools .user-chev { display: none; } .head-tools .user-btn { padding: 0 4px; } }
.content { padding: 18px 26px 40px 8px; }
.page-actions { padding: 12px 26px 0 8px; }

/* ---------- Avisos (pestañas) ---------- */
.avisos-pop { width: 400px; max-width: calc(100vw - 24px); padding: 0; right: 0; top: calc(100% + 10px); border-radius: 22px; overflow: hidden; gap: 0; }
.pop-head { padding: 16px 18px 10px; }
.pop-head b { font-size: 1rem; font-weight: 600; }
.pop-head .count { background: var(--primary); color: var(--primary-ink); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; padding: 0 6px; }
.pop-leido { margin-left: auto; border: 0; background: none; font: inherit; font-size: .8rem; color: var(--ink-2); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.pop-leido:hover { background: var(--hover); }
.pop-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 14px 6px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.pop-tabs button { border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 500; color: var(--muted); padding: 8px 6px; border-radius: 11px; cursor: pointer; white-space: nowrap; }
.pop-tabs button small { color: var(--muted-2); font-size: .72rem; margin-left: 3px; }
.pop-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15,36,32,.1); }
.pop-body { max-height: min(430px, 60vh); overflow-y: auto; padding: 0 8px 6px; }
.pop-grupo { font-size: .74rem; color: var(--muted); padding: 10px 10px 4px; }
.pop-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 11px 26px 11px 10px; border-radius: 14px; cursor: pointer; }
.pop-item:hover, .pop-item:focus-visible { background: var(--hover); outline: 0; }
.pop-item.nuevo { background: color-mix(in srgb, var(--acc) 5%, transparent); }
.pop-item.nuevo:hover { background: color-mix(in srgb, var(--acc) 9%, transparent); }
.pop-item b { display: block; font-size: .86rem; font-weight: 600; line-height: 1.3; }
.pop-item small { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.pop-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.pop-ic .svg { width: 17px; height: 17px; }
.pop-ic.warn { background: #fdf0dc; color: #b26a08; } .pop-ic.ok { background: #dcf5e8; color: #0d7a4c; } .pop-ic.info { background: #dcf0f6; color: #08708f; } .pop-ic.danger { background: #fbe4ea; color: #b8304e; }
[data-theme='dark'] .pop-ic.warn, [data-theme='dark'] .pop-ic.ok, [data-theme='dark'] .pop-ic.info, [data-theme='dark'] .pop-ic.danger { background: var(--surface-2); }
.pop-accion { display: inline-block; margin-top: 7px; font-size: .78rem; font-weight: 600; color: var(--ink); padding: 4px 11px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.pop-dot { position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.pop-foot2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .82rem; }
.pop-foot2 a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.pop-foot2 a:hover { color: var(--ink); }
.pop-foot2 .svg { width: 15px; height: 15px; }

/* ---------- Tarjetas y componentes generales ---------- */
.card { background: var(--surface); border-color: var(--edge); border-radius: var(--radius); }
.tabs { background: var(--surface-2); }
.tabs button.active { background: var(--surface); }
.chip.active { background: var(--primary); border-color: var(--primary); }
.badge.ok, .chip-dot.ok { background: #dcf5e8; color: #0d7a4c; }
.chip-dot.info { background: #dcf0f6; color: #08708f; }
.btn.primary { box-shadow: 0 8px 18px -10px rgba(12,34,29,.7); }
.alert.info { background: var(--acc-soft); }
.table th { color: var(--muted); }

/* ---------- Inicio ---------- */
.dboard { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dcard { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: 24px; box-shadow: var(--shadow); padding: 20px 22px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
a.dcard:hover { text-decoration: none; box-shadow: 0 1px 2px rgba(15,36,32,.05), 0 16px 34px -18px rgba(15,36,32,.3); }
.dcard h2 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.dc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dc-head small { display: block; margin-top: 2px; font-size: .78rem; }
.dc-label { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.dc-label .svg { width: 16px; height: 16px; color: var(--muted); }
.dc-link { border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer; padding: 0; }
.dc-link span { margin-left: 4px; }
.dc-link:hover { color: var(--acc); text-decoration: none; }
.d-uso { grid-column: span 12; }

.d-hero { grid-column: span 8; flex-direction: row; gap: 20px; padding: 22px; }
.d-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.big { display: flex; align-items: flex-start; gap: 14px; margin-top: 4px; }
.big-n { font-size: clamp(3.2rem, 5.2vw, 4.6rem); font-weight: 400; letter-spacing: -.06em; line-height: .95; font-variant-numeric: tabular-nums; }
.big-n sup { font-size: .36em; letter-spacing: 0; margin-left: 3px; vertical-align: top; position: relative; top: .25em; font-weight: 500; }
.delta { display: flex; flex-direction: column; padding-top: 10px; }
.delta b { font-size: .86rem; font-weight: 600; }
.delta.up b { color: var(--ok); } .delta.down b { color: var(--warn); }
.delta small { font-size: .74rem; color: var(--muted); }
.slider { position: relative; margin-top: 8px; padding-bottom: 20px; }
.slider-track { position: relative; height: 6px; border-radius: 999px; background: var(--surface-2); }
.slider-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); }
.slider-track b { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--sun); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(240,164,58,.45); }
.slider-target { position: absolute; top: 14px; transform: translateX(-50%); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.slider-target::before { content: ''; position: absolute; left: 50%; top: -14px; width: 1px; height: 10px; background: var(--muted-2); }
.slider-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted-2); margin-top: -18px; }
.hero-stats { display: flex; gap: 26px; margin-top: auto; padding-top: 6px; }
.hero-stats b { display: block; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hero-stats small { font-size: .74rem; color: var(--muted); }
.next-card { width: 250px; flex: none; position: relative; overflow: hidden; border: 0; border-radius: 20px; padding: 16px; text-align: left; font: inherit; cursor: pointer; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; isolation: isolate;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--c) 60%, transparent), transparent 60%), linear-gradient(160deg, #13342c 0%, #0c221d 70%); box-shadow: 0 16px 30px -18px rgba(12,34,29,.8); }
.next-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 20% 110%, rgba(143,240,196,.18), transparent 70%); }
.next-card:hover { filter: brightness(1.06); }
.next-card.done { cursor: default; }
.next-tag { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0c221d; font-size: .72rem; font-weight: 600; }
.next-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.next-av { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); font-size: 1rem; margin-top: 46px; }
.next-av .svg { width: 22px; height: 22px; }
.next-txt b { display: block; font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.next-txt small { display: block; font-size: .78rem; color: rgba(255,255,255,.72); margin-top: 2px; }

.d-brief { grid-column: span 4; color: #e9f5f0; border: 0; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 70% at 100% 0%, rgba(18,148,95,.55), transparent 60%), radial-gradient(80% 60% at 0% 100%, rgba(15,159,174,.28), transparent 65%), linear-gradient(150deg, #0e2b25 0%, #0a1d19 100%);
  box-shadow: 0 24px 50px -24px rgba(8,40,33,.85); }
.brief-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brief-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; }
.brief-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, #8ff0c4, #12945f); color: #0c221d; }
.brief-ic .svg { width: 16px; height: 16px; stroke-width: 2; }
.brief-time { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: rgba(233,245,240,.7); }
.brief-time i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(143,240,196,.2); }
.brief-txt { font-size: clamp(1.2rem, 1.55vw, 1.5rem); line-height: 1.3; letter-spacing: -.025em; margin: 4px 0 2px; color: rgba(233,245,240,.72); font-weight: 400; }
.brief-txt em { font-style: normal; color: #fff; font-weight: 500; background: linear-gradient(90deg, #8ff0c4, #c6f3dd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brief-ask { margin-top: auto; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 10px; display: grid; gap: 10px; }
.brief-input { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; color: rgba(233,245,240,.65); font-size: .86rem; cursor: pointer; padding: 4px 6px; text-align: left; }
.brief-input .svg { width: 16px; height: 16px; }
.brief-input span { flex: 1; }
.brief-input kbd { font: inherit; font-size: .7rem; padding: 2px 7px; border-radius: 7px; background: rgba(255,255,255,.1); color: rgba(233,245,240,.8); }
.brief-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brief-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #e9f5f0; font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; text-decoration: none; }
.brief-chip:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.brief-chip .svg { width: 14px; height: 14px; }
.brief-go { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #0c221d; background: radial-gradient(circle at 30% 25%, #ffffff, #c6f3dd 45%, #8ff0c4); box-shadow: 0 6px 16px -6px rgba(143,240,196,.8); }
.brief-go .svg { width: 18px; height: 18px; stroke-width: 2.2; }

.d-kpi { grid-column: span 4; gap: 10px; }
.trend { font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.trend.up { color: var(--ok); } .trend.down { color: var(--warn); }
.trend small { font-weight: 400; color: var(--muted); }
.kpi-n { font-size: 2.3rem; font-weight: 400; letter-spacing: -.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-n small { font-size: .42em; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.split-nums { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; }
.split-nums b { display: block; font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-nums small { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--muted); }
.split-nums .r { text-align: right; }
.split-nums i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.split-nums i.d1 { background: var(--primary); } .split-nums i.d2 { background: #9fd9c3; } .split-nums i.d3 { background: var(--muted-2); }
.split-bar { display: flex; gap: 4px; height: 9px; }
.split-bar i { border-radius: 999px; background: var(--primary); }
.split-bar i:last-child { flex: 1; background: #b9e6d4; }
[data-theme='dark'] .split-bar i:last-child { background: rgba(143,240,196,.25); }
.squares { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.squares i { height: 14px; border-radius: 4px; background: #d6efe5; }
.squares i.on { background: linear-gradient(180deg, #12945f, #087a63); }
[data-theme='dark'] .squares i { background: rgba(255,255,255,.08); }
.d-gauge { align-items: stretch; }
.gauge-wrap { position: relative; width: min(220px, 100%); margin: 0 auto -4px; }
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
.gauge-ticks line { stroke: var(--line-strong); stroke-width: 1.2; stroke-linecap: round; }
.gauge-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; stroke-linecap: round; }
.gauge-fg { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease-out); }
.gauge-dot { fill: var(--surface); stroke: var(--sun); stroke-width: 4; }
.gauge-n { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 2.2rem; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-n sup { font-size: .45em; margin-left: 2px; letter-spacing: 0; }
.gauge-legend { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 6px; }

.d-team { grid-column: span 7; padding: 20px 8px 10px; }
.d-team > .dc-head { padding: 0 14px; }
.team-table { display: grid; margin-top: 4px; }
.tt-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 70px 90px minmax(120px, 1.5fr) 118px; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); border-radius: 14px; }
a.tt-row:hover { background: var(--hover); text-decoration: none; }
.tt-row:last-child { border-bottom: 0; }
.tt-h { font-size: .74rem; color: var(--muted); padding-top: 6px; padding-bottom: 8px; border-radius: 0; }
.tt-row .n { text-align: right; font-variant-numeric: tabular-nums; }
.tt-row .n b { display: block; font-size: .88rem; font-weight: 600; }
.tt-row .n small { display: block; font-size: .72rem; color: var(--muted); }
.tt-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tt-who b { display: block; font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-who small { display: block; font-size: .74rem; color: var(--muted); }
.tt-who > span:last-child { min-width: 0; }
.tt-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: .76rem; font-weight: 600; flex: none; }
.tt-av.all { background: var(--surface-2); color: var(--ink-2); }
.tt-av .svg { width: 18px; height: 18px; }
.tt-total { background: var(--inner); }
.ocup { display: flex; align-items: center; gap: 10px; }
.ocup b { font-size: .86rem; font-weight: 600; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.ocup-bar { position: relative; flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); }
.ocup-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); }
.ocup-bar i.ok { background: var(--acc); } .ocup-bar i.low { background: #e48aa0; }
.ocup-bar s { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 2px; background: var(--sun); text-decoration: none; }
.st { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); font-size: .76rem; font-weight: 500; white-space: nowrap; color: var(--ink-2); }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.st.ok::before { background: var(--ok); } .st.info::before { background: var(--info); } .st.warn::before { background: var(--sun); } .st.danger::before { background: var(--danger); }

.d-todo { grid-column: span 5; }
.todo-title { display: flex; align-items: center; gap: 10px; }
.count-pill { height: 26px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); font-size: .76rem; font-weight: 500; display: inline-flex; align-items: center; color: var(--ink-2); }
.todo-g { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.todo-g .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.todo-g .dot.warn { background: var(--sun); }
.todo { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.todo:hover { text-decoration: none; }
.todo:hover b { color: var(--acc); }
.todo-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.todo-ic .svg { width: 18px; height: 18px; }
.todo b { display: block; font-size: .9rem; font-weight: 600; transition: color .15s; }
.todo small { display: block; font-size: .76rem; color: var(--muted); }
.todo-d { font-size: .82rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.todo-d.go { color: var(--acc); }
.todo-ok { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--inner); }
.todo-ok span { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #dcf5e8; color: #0d7a4c; flex: none; }
.todo-ok b { display: block; font-weight: 600; }
.todo-ok small { color: var(--muted); font-size: .78rem; }
.cta-dark { margin-top: auto; height: 50px; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 12px 24px -14px rgba(12,34,29,.9); transition: transform .15s var(--ease-out), filter .15s; }
.cta-dark:hover { filter: brightness(1.15); }
.cta-dark:active { transform: scale(.98); }

@media (max-width: 1279px) {
  .d-hero, .d-brief { grid-column: span 12; }
  .d-brief .brief-txt { max-width: 760px; }
  .d-team, .d-todo { grid-column: span 12; }
}
@media (max-width: 1023px) {
  .page-head { flex-wrap: wrap; }
  .search-pill { width: min(300px, 38vw); }
  .d-kpi { grid-column: span 6; }
  .d-kpi.d-gauge { grid-column: span 6; }
  .d-kpi:last-of-type { grid-column: span 12; }
}
@media (max-width: 639px) {
  .page-head { flex-wrap: wrap; padding: 6px 16px 0; }
  .page-title p { display: none; }
  .search-pill { display: none; margin: 0; }
  body.buscando .search-pill { display: flex; width: 100%; order: -1; }
  .head-tools { display: none; }
  .content { padding: 12px 12px 100px; }
  .dboard { gap: 12px; }
  .dcard { padding: 16px; border-radius: 22px; }
  .d-hero { flex-direction: column; padding: 16px; }
  .next-card { width: auto; }
  .next-av { margin-top: 38px; }
  .hero-stats { gap: 18px; }
  .d-kpi, .d-kpi.d-gauge, .d-kpi:last-of-type { grid-column: span 12; }
  .d-team { padding: 16px 4px 6px; }
  .d-team > .dc-head { padding: 0 12px; }
  .tt-row { grid-template-columns: minmax(0, 1fr) 54px 108px; gap: 8px; padding: 10px 12px; }
  .tt-row .hide-s, .tt-row > .ocup, .tt-h > span:nth-child(4) { display: none; }
  .st { height: 26px; padding: 0 9px; font-size: .72rem; }
  .avisos-pop { position: fixed; left: 10px; right: 10px; top: 62px; width: auto; }
  .salon-card, .brand-name { display: flex; }
  .brand-name { display: block; }
  .share-card { display: flex; width: auto; height: auto; padding: 12px; gap: 10px; place-items: initial; align-items: center; border-radius: 18px; }
  .share-txt { display: block; }
  .nav a .nav-count { position: static; margin-left: auto; }
}
.next-card { --c: #12945f; }
.grow { flex: 1; min-width: 0; }
.head-tools .user-card { border: 0 !important; padding: 0 !important; margin: 0; }
@media (min-width: 1180px) { .layout.expanded .nav { overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: none; margin: 0 -6px; padding: 0 6px 6px; } .layout.expanded .nav::-webkit-scrollbar { display: none; } }
@media (min-width: 1024px) and (max-height: 860px) { .layout:not(.expanded) .nav a, .layout.expanded .nav a { height: 38px; } }
@media (max-width: 639px) { .page-actions { padding: 8px 16px 0; } .page-head { padding: 6px 16px 0; } }
@media (min-width: 640px) and (max-width: 1023px) { .page-head, .page-actions { padding-left: 22px; padding-right: 22px; } .content { padding: 16px 22px 40px; } }

/* ---------- Avisos de la plataforma ---------- */
.anuncios { display: grid; gap: 10px; padding: 14px 26px 0 8px; }
.anuncio { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.anuncio.aviso { background: #fdf3e4; border-color: rgba(201,122,18,.25); }
.anuncio.novedad { background: linear-gradient(120deg, #e3f6ee, #f2fbf7); border-color: rgba(8,122,99,.18); }
[data-theme='dark'] .anuncio.aviso, [data-theme='dark'] .anuncio.novedad { background: var(--surface-2); }
.anuncio-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--acc-soft); color: var(--acc); }
.anuncio.aviso .anuncio-ic { background: #fbe3c0; color: #9a5a05; }
.anuncio-ic .svg { width: 18px; height: 18px; }
.anuncio-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.anuncio-txt b { font-size: .92rem; font-weight: 600; }
.anuncio-txt span { font-size: .84rem; color: var(--ink-2); }
.anuncio-link { flex: none; height: 36px; }
.anuncio-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.anuncio-x:hover { background: var(--hover); color: var(--ink); }
.anuncio-x .svg { width: 16px; height: 16px; }
@media (min-width: 640px) and (max-width: 1023px) { .anuncios { padding: 12px 22px 0; } }
@media (max-width: 639px) {
  .anuncios { padding: 10px 12px 0; }
  .anuncio { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .anuncio-txt { flex-basis: calc(100% - 100px); }
  .anuncio-link { order: 5; margin-left: 46px; }
}

/* ---------- Ayuda y Recomienda ---------- */
.ayuda { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ayuda-chat { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 240px); overflow: hidden; }
.ayuda-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; display: grid; gap: 4px; }
.msg.yo { align-self: flex-end; justify-items: end; }
.msg-b { padding: 11px 14px; border-radius: 18px; background: var(--surface-2); font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.msg.yo .msg-b { background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 6px; }
.msg.el .msg-b { border-bottom-left-radius: 6px; }
.msg.yo .msg-b a { color: inherit; }
.msg small { font-size: .72rem; color: var(--muted); }
.ayuda-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.ayuda-form textarea { flex: 1; resize: none; min-height: 46px; }
.ayuda-form .btn { height: 46px; }
.ayuda-vacia { margin: auto; text-align: center; display: grid; justify-items: center; gap: 6px; padding: 24px; max-width: 380px; }
.ayuda-vacia .svg { width: 34px; height: 34px; color: var(--acc); }
.ayuda-vacia h3 { margin: 4px 0 0; }
.ayuda-vacia p { margin: 0; }
.ayuda-lado { display: grid; gap: 10px; }
.ayuda-lado .btn { justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; }
.recomendar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rec-hero { display: grid; gap: 12px; background: radial-gradient(90% 80% at 100% 0%, rgba(143,240,196,.35), transparent 60%), var(--surface); }
.rec-hero h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.rec-hero p { margin: 0; }
.rec-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 25%, #8ff0c4, #12945f 55%, #087a63); }
.rec-ic .svg { width: 22px; height: 22px; }
.rec-link { display: flex; gap: 8px; }
.rec-link .input { flex: 1; min-width: 0; }
@media (max-width: 1023px) { .ayuda, .recomendar { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) {
  .ayuda-chat { max-height: calc(100vh - 230px); min-height: 360px; }
  .ayuda-msgs { padding: 14px; }
  .msg { max-width: 88%; }
  .ayuda-form .btn span { display: none; }
  .rec-link { flex-direction: column; }
}
.ayuda-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ayuda-top .grow { min-width: 0; display: grid; gap: 2px; }
.ayuda-top .grow small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ayuda-top .st, .ayuda-tk .st { height: 22px; padding: 0 8px; font-size: .7rem; vertical-align: 1px; }
.ayuda-nota { padding: 8px 16px; background: var(--inner); }
.ayuda-tks { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.ayuda-tk { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-radius: 12px; padding: 9px 10px; cursor: pointer; }
.ayuda-tk:hover { background: var(--hover); }
.ayuda-tk.on { background: var(--inner); box-shadow: inset 0 0 0 1px var(--line); }
.ayuda-tk .grow { min-width: 0; }
.ayuda-tk small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ayuda-tk .nav-count { position: static; }
.ayuda > * { min-width: 0; }
.ayuda-top .st { justify-self: start; }
.ayuda-tk .st { display: inline-flex; }
.ayuda-tks { grid-template-columns: minmax(0, 1fr); } .ayuda .card, .ayuda .stack { min-width: 0; } .ayuda-lado .btn { max-width: 100%; }

/* ---------- Ayuda: preguntas frecuentes, novedades e ideas ---------- */
.ayuda-tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0; border-radius: 14px; padding: 4px; }
.ayuda-tabs button { padding: 8px 14px; border-radius: 11px; font-weight: 500; }
.ayuda-buscar { display: grid; gap: 12px; text-align: center; justify-items: center; padding: 28px 20px; background: radial-gradient(80% 90% at 50% 0%, rgba(143,240,196,.3), transparent 70%), var(--surface); }
.ayuda-buscar h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.ayuda-buscar .search-pill { display: flex !important; width: min(560px, 100%); margin: 0; }
.ayuda-arts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.ayuda-cat { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 4px; align-content: start; }
.ayuda-cat h3 { margin: 0 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.ayuda-art { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: .92rem; color: var(--ink); background: none; border: 0; border-radius: 12px; padding: 10px 8px; cursor: pointer; }
.ayuda-art:hover { background: var(--hover); }
.ayuda-art .svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ayuda-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ayuda-cta b { display: block; } .ayuda-cta small { display: block; }
.articulo p { margin: 0 0 12px; line-height: 1.55; }
.articulo-util { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); font-size: .88rem; }
.encuesta { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--inner); font-size: .9rem; font-weight: 500; flex-wrap: wrap; }
.encuesta-b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.4rem; cursor: pointer; transition: transform .15s; }
.encuesta-b:hover { transform: scale(1.12); }
.sugerencias { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px 0; }
.novedades { display: grid; gap: 14px; max-width: 760px; }
.novedad time { font-size: .76rem; color: var(--acc); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.novedad h3 { margin: 4px 0 8px; }
.novedad p { margin: 0 0 8px; line-height: 1.55; }
.ideas-nueva { max-width: 760px; margin-bottom: 14px; }
.ideas { display: grid; gap: 10px; max-width: 760px; }
.idea { display: flex; gap: 14px; align-items: flex-start; }
.idea .grow { min-width: 0; }
.idea-voto { flex: none; width: 52px; display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.idea-voto b { font-size: 1rem; color: var(--ink); }
.idea-voto.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }
.idea .st { height: 22px; padding: 0 8px; font-size: .7rem; vertical-align: 1px; }
.idea-resp { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--inner); }
.idea-resp .svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--acc); }
@media (max-width: 639px) { .ayuda-tabs { display: flex; width: 100%; } .ayuda-tabs button { flex: 1; padding: 8px 4px; font-size: .78rem; } .ayuda-buscar h2 { font-size: 1.2rem; } }

/* ---------- Facturas del salón ---------- */
.facturas-top{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:16px;margin-bottom:16px}
.fact-kpi{display:flex;flex-direction:column;gap:4px}
.fact-kpi b{font-size:28px;letter-spacing:-.02em;line-height:1.15}
.fact-datos{display:flex;align-items:center;gap:14px}
.fact-datos .grow{display:flex;flex-direction:column;gap:3px;min-width:0}
.fact-it{gap:14px;align-items:center}
.fact-ic{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--brand-soft,#e6f4ef);color:var(--brand,#1f8a6f)}
.fact-ic svg{width:20px;height:20px}
.fact-total{flex:none;font-size:16px;white-space:nowrap}
.fact-acc{flex:none;display:flex;gap:6px}
.fact-acc .btn svg{width:16px;height:16px}
@media (max-width:720px){
  .facturas-top{grid-template-columns:minmax(0,1fr)}
  .fact-datos{flex-wrap:wrap}
  .list .fact-it{display:grid;grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"ic txt txt" ". tot acc";gap:8px 12px;align-items:center}
  .list .fact-it .fact-ic{grid-area:ic}
  .list .fact-it .grow{grid-area:txt;min-width:0}
  .list .fact-it .fact-total{grid-area:tot;margin:0}
  .list .fact-it .fact-acc{grid-area:acc;margin:0}
}

/* =====================================================================
   Agenda con fotos y colores vivos
   ===================================================================== */
/* Avatar de profesional: foto o iniciales sobre su color */
.pavatar { --s: 40px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 70%); color: #fff; font-size: calc(var(--s) * .36); letter-spacing: .01em; }
.pavatar b { font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.pavatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pavatar img[src$='.svg'] { object-fit: contain; top: 6%; }
.pavatar.xs { --s: 24px; } .pavatar.sm { --s: 34px; } .pavatar.md { --s: 44px; } .pavatar.lg { --s: 56px; } .pavatar.xl { --s: 84px; }
.prof-foto { display: flex; align-items: center; gap: 16px; padding: 14px; margin-bottom: 16px; border-radius: 18px; background: var(--surface-2, rgba(0,0,0,.03)); border: 1px solid var(--edge); }
.prof-foto .pavatar { box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px var(--c); }
.chip-prof { gap: 7px; padding-left: 4px; }
.prof-foto-wrap { margin-bottom: 16px; }
.prof-foto-wrap .prof-foto { margin-bottom: 0; }
.av-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; padding: 12px; margin-top: 8px; border-radius: 18px; border: 1px solid var(--edge); background: var(--surface-solid); }
.av-op { border: 0; background: none; padding: 3px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: transform .12s; }
.av-op:hover { transform: scale(1.08); }
.av-op.active .pavatar { box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px var(--c); }

/* Cabecera de columnas */
.cal-head-cell.prof { flex-direction: column; gap: 6px; padding: 14px 8px 12px; }
.cal-head-cell.prof .pavatar { box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px var(--c), 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent); margin-bottom: 4px; }
.cal-head-cell .ph-name { font-weight: 600; font-size: .9rem; max-width: 100%; }
.cal-head-cell .count { display: inline-block; font-weight: 500; font-size: .72rem; color: var(--muted); background: var(--surface-2, rgba(0,0,0,.04)); border-radius: 999px; padding: 2px 9px; }
.cal-head-cell.prof .count { background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.cal-head-cell.dia { flex-direction: column; gap: 2px; cursor: pointer; padding: 10px 6px; }
.cal-head-cell.dia.es-hoy small { color: var(--brand); }
.cal-head-cell.dia small { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.cal-head-cell.dia b { font-size: 1.35rem; font-weight: 500; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.cal-head-cell.dia.es-hoy b { background: var(--brand); color: #fff; }
.cal-head-cell.dia:hover b { background: var(--surface-2, rgba(0,0,0,.05)); }
.cal-head-cell.dia.es-hoy:hover b { background: var(--brand); }

/* Rejilla más limpia */
.cal-line { border-top-color: color-mix(in srgb, var(--line) 75%, transparent); }
.cal-line.half { opacity: .45; }
.cal-time { font-size: .72rem; font-weight: 500; }
.cal-col { transition: background .15s; }
.cal-col:hover { background: color-mix(in srgb, var(--brand) 3%, transparent); }

/* Citas: bloques de color vivo */
.cal-ev { left: 4px; right: 4px; border: 0; border-radius: 12px; padding: 7px 10px; font-size: .8rem; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 50%, #fff); color: #0f1d1a;
  box-shadow: 0 0 0 2px var(--surface-solid), inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); transition: transform .12s, box-shadow .12s, filter .12s; }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 62%, #fff); transform: translateY(-1px); z-index: 5;
  box-shadow: 0 0 0 2px var(--surface-solid), 0 8px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.cal-ev .ev-time { font-size: .74rem; font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; margin-bottom: 1px; }
.cal-ev b { font-weight: 700; color: inherit; padding-right: 30px; }
.cal-ev b i { font-style: normal; font-weight: 500; opacity: .8; margin-right: 3px; }
.cal-ev span { color: inherit; opacity: .78; }
.cal-ev.corto { padding: 3px 9px; display: flex; align-items: center; }
.cal-ev .ev-icons { top: 6px; right: 7px; gap: 4px; opacity: .8; }
.cal-ev .ev-icons span { display: inline-flex; opacity: 1; }
.cal-ev .ev-icons .ev-alerta { color: #b42318; opacity: 1; }
.cal-ev.corto .ev-icons { top: 50%; transform: translateY(-50%); }
.cal-ev.pendiente { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #fff) 0 8px, color-mix(in srgb, var(--c) 22%, #fff) 8px 16px);
  box-shadow: 0 0 0 2px var(--surface-solid), inset 0 0 0 2px var(--c); border-left: 0; }
.cal-ev.completada { background: color-mix(in srgb, var(--c) 28%, #fff); }
.cal-ev.cancelada { background: var(--surface-2, #f1f1f1); color: var(--muted); box-shadow: 0 0 0 2px var(--surface-solid), inset 0 0 0 1px var(--edge); }
.cal-ev.no_show { background: color-mix(in srgb, #8a8a8a 20%, #fff); color: var(--muted); }
.cal-ev .ev-pausa { background: repeating-linear-gradient(135deg, rgba(255,255,255,.75) 0 6px, rgba(255,255,255,.45) 6px 12px); color: #3b4a46; }
[data-theme='dark'] .cal-ev { background: color-mix(in srgb, var(--c) 46%, #17191c); color: #fff; }
[data-theme='dark'] .cal-ev:hover { background: color-mix(in srgb, var(--c) 58%, #17191c); }
[data-theme='dark'] .cal-ev.pendiente { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 34%, #17191c) 0 8px, color-mix(in srgb, var(--c) 24%, #17191c) 8px 16px); }
[data-theme='dark'] .cal-ev.completada { background: color-mix(in srgb, var(--c) 26%, #17191c); }
[data-theme='dark'] .cal-ev .ev-pausa { background: repeating-linear-gradient(135deg, rgba(0,0,0,.35) 0 6px, rgba(0,0,0,.2) 6px 12px); color: #e4e4e7; }
.now-line { z-index: 6; }

/* Lista del día */
.day-list .list-item .pavatar { margin-right: 2px; }

@media (max-width: 720px) {
  .cal-head-cell.prof { padding: 10px 4px 8px; gap: 4px; }
  .pavatar.lg { --s: 44px; }
  .cal-head-cell .ph-name { font-size: .8rem; }
  .cal-ev { padding: 5px 8px; font-size: .76rem; }
  .prof-foto { flex-direction: column; text-align: center; }
  .prof-foto .btn-row { justify-content: center; }
}

/* =====================================================================
   App instalada: instalar, versión nueva, sin conexión
   ===================================================================== */
.inst-tarjeta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 22px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--surface-solid)), var(--surface-solid) 60%); }
.inst-tarjeta img { border-radius: 12px; flex: none; box-shadow: 0 6px 16px rgba(8,122,99,.25); }
.inst-tarjeta .grow { min-width: 0; }
.inst-cab { display: flex; gap: 14px; align-items: center; }
.inst-cab img { border-radius: 16px; flex: none; box-shadow: 0 8px 20px rgba(8,122,99,.25); }
.inst-pasos { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.45; }
.inst-ic { display: inline-flex; vertical-align: -4px; padding: 2px 5px; border-radius: 6px; background: var(--surface-2, rgba(0,0,0,.05)); }
.inst-ic svg, .inst-pasos svg { width: 16px; height: 16px; }
.inst-tiendas { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--edge); display: grid; gap: 10px; }
.inst-tiendas-bts { display: flex; flex-wrap: wrap; gap: 10px; }
.inst-tienda { gap: 10px; padding: 8px 14px 8px 12px; height: auto; text-align: left; line-height: 1.1; background: #111; color: #fff; border-color: #111; }
.inst-tienda span { display: flex; flex-direction: column; font-weight: 600; }
.inst-tienda small { font-weight: 400; font-size: .7rem; opacity: .8; }
.inst-tienda .svg-logo { width: 22px; height: 22px; }
.btn.block { width: 100%; justify-content: center; }
.barra-version, .barra-offline { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 16px; border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: .88rem; max-width: calc(100vw - 24px); }
.barra-version { bottom: calc(18px + env(safe-area-inset-bottom)); background: var(--surface-solid); color: var(--ink); border: 1px solid var(--edge); }
.barra-offline { top: calc(10px + env(safe-area-inset-top)); background: #3b2f0b; color: #fff4d6; padding-right: 16px; }
.barra-version svg, .barra-offline svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 720px) {
  .barra-version { bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .barra-version span { flex: 1; }
  .inst-tarjeta { flex-wrap: wrap; }
  .inst-tarjeta .grow { flex: 1 1 calc(100% - 100px); }
  .inst-tarjeta [data-instalar-app] { margin-left: 58px; }
}
/* Instalada: respetar la muesca y la barra de estado del móvil */
.es-app body { padding-top: env(safe-area-inset-top); }
.inst-cerrar { width: 34px; padding: 0; justify-content: center; }
.inst-cerrar svg { width: 16px; height: 16px; }
@media (max-width: 720px) { .inst-tarjeta .inst-cerrar { position: absolute; top: 10px; right: 10px; } .inst-tarjeta { position: relative; } .inst-tarjeta .grow { padding-right: 30px; } }
.avisos-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0f9fae, #3dbb6e); box-shadow: 0 8px 18px rgba(8,122,99,.25); }
.avisos-ic svg { width: 24px; height: 24px; }
.zona-peligro { border-color: color-mix(in srgb, var(--danger) 25%, var(--edge)); }
.zona-peligro .card-head h2 { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
/* Apps de las tiendas (App Store y Google Play): sin compras ni enlaces para pagar */
.sin-pagos a[href="#/suscripcion"], .sin-pagos .solo-web { display: none !important; }
