/* CRM de clientes · lorenacantos.com — blanco y negro, DM Sans, acento amarillo */

@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --accent: #f5df4d;
  --ink: #111111;
  --ink-2: #4a4a4a;
  --muted: #8a8a8a;
  --line: #e7e7e4;
  --line-2: #f1f1ee;
  --bg: #ffffff;
  --soft: #fafaf7;
  --up: #1f7a4a;
  --down: #b2471f;
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-weight: 300; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; margin-top: 1.6em; }
h3 { font-size: 16px; font-weight: 500; }
strong, b { font-weight: 500; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--line-2); padding: .1em .35em; border-radius: 4px; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 400; font-size: 16px; line-height: 1.2; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.brand-icon { display: block; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.side-foot .ver { text-decoration: none; color: var(--muted); }
.side-foot .ver.on, .side-foot .ver:hover { color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }
.main { padding: 32px 40px 64px; max-width: 1240px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Componentes ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); margin-bottom: 20px; }
.card.narrow { max-width: 440px; margin: 0 auto; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card.soft { background: var(--soft); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--radius); }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-weight: 400; vertical-align: middle; white-space: nowrap; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.accent { background: var(--accent); color: var(--ink); }
.pill.warn { background: #fff4d6; color: #7a5a00; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-weight: 400; text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #2b2b2b; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.ghost { border-color: var(--line); }
.btn.danger { border-color: #e2c3b6; color: var(--down); }
.btn.danger:hover { background: #fdf3ee; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Formularios */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 400; font-size: 14px; }
label small { font-weight: 300; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 300; }
input, select, textarea { font: inherit; font-weight: 300; color: var(--ink); padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--ink); }
input[type=color] { padding: 2px; height: 40px; width: 64px; }
input[type=file] { padding: 8px; background: var(--soft); }
textarea { min-height: 96px; resize: vertical; }
.code-input { font-size: 24px; letter-spacing: .3em; text-align: center; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
legend { padding: 0 6px; font-weight: 500; }
.inline-form { display: inline; }
details > summary { cursor: pointer; }
details.edit > summary { list-style: none; display: inline-block; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit[open] { width: 100%; }
details.edit[open] > .edit-body { margin-top: 12px; padding: 16px; background: var(--soft); border-radius: 12px; }
.hint { font-size: 14px; color: var(--ink-2); }

/* Avisos */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--soft); }
.flash-ok { border-color: #cfe5d6; background: #f2faf5; }
.flash-error { border-color: #efc9b9; background: #fdf3ee; color: #7d2f12; }
.flash-info { border-color: var(--accent); background: #fffbe3; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
th { font-weight: 400; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.item { max-width: 420px; word-break: break-word; }
tfoot td { font-weight: 500; background: var(--soft); }

/* Variaciones */
.delta { font-size: 13px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat, .delta.none { color: var(--muted); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k-label { font-size: 13px; color: var(--muted); }
.kpi .k-val { font-size: 26px; font-weight: 400; letter-spacing: -0.01em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .k-cmp { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--muted); }
.kpi.highlight { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.highlight .k-label, .kpi.highlight .k-cmp { color: #bdbdbd; }

/* Tarjetas de cliente (home) */
.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.client-card:hover { border-color: var(--ink); box-shadow: 0 6px 22px rgba(0, 0, 0, .05); }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-name { font-size: 17px; font-weight: 400; line-height: 1.25; }
.cc-sector { font-size: 12px; color: var(--muted); }
.cc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cc-metric .m-label { font-size: 12px; color: var(--muted); }
.cc-metric .m-val { font-size: 18px; font-weight: 400; font-variant-numeric: tabular-nums; }
.cc-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.up { background: #eaf6ee; color: var(--up); }
.status.down { background: #fff7cc; color: #8a6d00; }
.status.down::before { background: var(--accent); box-shadow: 0 0 0 1px #c9b02a; }
.status.flat { background: var(--line-2); color: var(--ink-2); }
.status.none { background: #fff; color: var(--muted); border: 1px dashed var(--line); }

.spark { display: block; }
.spark path { fill: none; stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--accent); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.spark-empty { font-size: 12px; color: var(--muted); height: 40px; display: flex; align-items: center; }

/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 400; }
.tabs a .pill { margin-left: 4px; }

/* Gráficas */
.chart-wrap { margin: 0 0 8px; }
.chart-wrap figcaption { font-size: 14px; font-weight: 400; margin-bottom: 6px; }
.chart { display: block; height: auto; overflow: visible; }
.ch-grid { stroke: #ececea; stroke-width: 1; }
.ch-axis { fill: #8a8a8a; font-size: 13px; font-family: var(--font); }
.ch-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line.ch-s1 { stroke: #111; }
.ch-line.ch-s2 { stroke: #a3a3a3; stroke-dasharray: 5 4; }
.ch-dot.ch-s1 { fill: #111; }
.ch-dot.ch-s2 { fill: #a3a3a3; }
.ch-dot { stroke: #fff; stroke-width: 1.5; }
.ch-marker line { stroke: var(--accent); stroke-width: 2; opacity: .9; }
.ch-marker circle { fill: var(--accent); stroke: #111; stroke-width: 1.4; }
.ch-marker:hover line { stroke-width: 3; }
.ch-bar-past { fill: #111; }
.ch-bar-now { fill: var(--accent); stroke: #111; stroke-width: 1; }
.ch-bar-future { fill: #dcdcd8; }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: #111; }
.sw.ch-s2 { background: #a3a3a3; }
.sw.ch-mk { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 1px solid #111; }

/* Roadmap y diario */
.timeline { display: flex; flex-direction: column; gap: 22px; }
.tl-month h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tl-month.now h3::after { content: "Este mes"; font-size: 11px; font-weight: 400; background: var(--accent); padding: 2px 8px; border-radius: 999px; }
.tl-item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; align-items: flex-start; flex-wrap: wrap; }
.tl-item.done { background: var(--soft); }
.tl-item.done .tl-title { text-decoration: line-through; text-decoration-color: #bbb; color: var(--ink-2); }
.tl-main { flex: 1 1 280px; min-width: 0; }
.tl-title { font-weight: 400; }
.tl-desc { font-size: 14px; color: var(--ink-2); white-space: pre-line; margin-top: 4px; }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tl-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.state-pendiente { background: #fff; border: 1px solid var(--line); }
.state-en_curso { background: var(--accent); }
.state-hecho { background: var(--ink); color: #fff; }

.entry { padding: 14px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 16px; flex-wrap: wrap; }
.entry:last-child { border-bottom: 0; }
.entry-date { width: 96px; flex: none; font-size: 13px; color: var(--muted); }
.entry-body { flex: 1 1 300px; min-width: 0; }
.entry-text { white-space: pre-line; word-break: break-word; }
.entry-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }

/* Instalación y 2FA */
body.bare { background: var(--soft); }
.bare-main { max-width: 720px; margin: 0 auto; padding: 48px 20px; }
.bare-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checks .ok { color: var(--up); }
.checks .ko { color: var(--down); }
.checks .warn { color: #8a6d00; }
.qr-block { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.qr { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; line-height: 0; }
.secret { font-size: 15px; letter-spacing: .08em; display: inline-block; margin-top: 6px; word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0 0 20px; }
.codes code { display: block; text-align: center; padding: 8px; font-size: 15px; letter-spacing: .06em; }
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 6px; }

.alert-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.alert-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }

.changelog article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.changelog article:last-child { border-bottom: 0; }
.changelog h2 { margin: 0 0 4px; }
.changelog ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Móvil ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; gap: 12px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav a { white-space: nowrap; padding: 7px 11px; }
  .side-foot { flex-direction: row; justify-content: space-between; margin-top: 0; }
  .main { padding: 20px 16px 48px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .entry-date { width: 100%; }
}

.mt { margin-top: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.list-plain li { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.section-title.flush { margin-top: 0; }
.sw.sw-future { background: #dcdcd8; height: 10px; width: 10px; border-radius: 2px; }
.logo-preview { max-height: 48px; max-width: 200px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--ink); }
.clients-grid { margin-bottom: 20px; }

/* ================= v1.1 · Sube / baja muy visual ================= */
:root { --up: #137333; --up-bg: #e6f4ea; --up-line: #a8dab5; --down: #c5221f; --down-bg: #fce8e6; --down-line: #f4b5ae; }

.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.6; }
.delta b { font-size: 10px; font-weight: 500; }
.delta.up { color: var(--up); background: var(--up-bg); }
.delta.down { color: var(--down); background: var(--down-bg); }
.delta.flat { color: var(--ink-2); background: var(--line-2); }
.delta.none { color: var(--muted); background: none; padding: 0; }

.trend { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.trend b { font-size: 11px; }
.trend small { font-weight: 400; color: inherit; opacity: .85; }
.trend-up { background: var(--up); color: #fff; }
.trend-down { background: var(--down); color: #fff; }
.trend-flat { background: var(--line-2); color: var(--ink-2); }
.trend-none { background: #fff; color: var(--muted); border: 1px dashed var(--line); }
.trend-big { font-size: 18px; padding: 8px 18px; }
.trend-big b { font-size: 15px; }

.kpi.is-up { border-color: var(--up-line); background: linear-gradient(180deg, var(--up-bg), #fff 70%); }
.kpi.is-down { border-color: var(--down-line); background: linear-gradient(180deg, var(--down-bg), #fff 70%); }
.kpi.is-up .k-val { color: var(--up); }
.kpi.is-down .k-val { color: var(--down); }
.kpi .k-cmp span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kpis-6 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
i.src { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 9px; font-style: normal; font-weight: 500; vertical-align: middle; }

/* Resumen del inicio */
.summary-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sum-box { display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 14px; font-size: 15px; }
.sum-box b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; }
.sum-box strong { font-size: 22px; font-weight: 500; margin-right: 4px; }
.sum-up { background: var(--up-bg); color: var(--up); }
.sum-up b { background: var(--up); color: #fff; }
.sum-down { background: var(--down-bg); color: var(--down); }
.sum-down b { background: var(--down); color: #fff; }
.sum-flat { background: var(--line-2); color: var(--ink-2); }
.sum-flat b { background: #d6d6d2; color: var(--ink); }
.sum-none { background: #fff; border: 1px dashed var(--line); color: var(--muted); }
.sum-none b { background: var(--line-2); }

/* Tarjetas de cliente con color de tendencia */
.client-card { border-top-width: 5px; }
.client-card.cc-up { border-top-color: var(--up); }
.client-card.cc-down { border-top-color: var(--down); background: linear-gradient(180deg, #fff6f5, #fff 45%); }
.client-card.cc-flat { border-top-color: #bdbdb8; }
.client-card.cc-up .spark path { stroke: var(--up); }
.client-card.cc-down .spark path { stroke: var(--down); }
.client-card.cc-up .spark circle { fill: var(--up); stroke: #fff; }
.client-card.cc-down .spark circle { fill: var(--down); stroke: #fff; }
.cc-svcs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cc-svcs span { display: inline-flex; color: var(--ink-2); }
.cc-metric .delta { margin-top: 2px; }

/* Menú con iconos */
.nav a { display: flex; align-items: center; gap: 10px; }
.nav a .ic { opacity: .75; flex: none; }
.nav a.on .ic { opacity: 1; }
.section-title h2, .section-title h3 { display: flex; align-items: center; gap: 8px; }

/* ================= Panel del cliente ================= */
.client-hero { display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: start; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 18px; background: var(--soft); border-left: 6px solid #d6d6d2; }
.client-hero.hero-up { border-left-color: var(--up); background: linear-gradient(90deg, var(--up-bg), var(--soft) 60%); }
.client-hero.hero-down { border-left-color: var(--down); background: linear-gradient(90deg, var(--down-bg), var(--soft) 60%); }
.hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-title h1 { margin: 0; }
.hero-sub { color: var(--muted); margin-top: 2px; }
.hero-services { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.svc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.svc-web, .svc-gbp { border-color: var(--ink); color: var(--ink); }
.svc-cell { white-space: nowrap; }
.hero-trend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hero-trend small { color: var(--muted); font-size: 12px; }
.hero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.hero-stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.hero-stats dt { font-size: 12px; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 400; }

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.group-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, background .15s; }
.group-card:hover { border-color: var(--ink); }
.group-card strong { display: block; font-size: 17px; font-weight: 500; }
.group-card small { color: var(--muted); }
.group-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--line-2); flex: none; }
.group-card.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.group-card.on small { color: #c9c9c9; }
.group-card.on .group-ic { background: var(--accent); color: var(--ink); }

.tabs { gap: 6px; border-bottom: 0; padding: 6px; background: var(--line-2); border-radius: 14px; align-items: center; flex-wrap: wrap; }
.tabs a { border: 0; margin: 0; padding: 8px 14px; border-radius: 10px; }
.tabs a.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); border: 0; }
.tabs a.tab-out { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }

/* Servicios en la ficha */
.service-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.service-pick { flex-direction: row; cursor: pointer; position: relative; }
.service-pick input { position: absolute; opacity: 0; pointer-events: none; }
.service-pick > span { flex: 1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.service-pick > span .ic { grid-row: 1 / 3; }
.service-pick strong { font-weight: 500; }
.service-pick small { color: var(--muted); }
.service-pick input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.service-pick input:checked + span small { color: #c9c9c9; }
.service-pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Formulario de Business Profile */
.gbp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gbp-field { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.gbp-field.is-up { border-color: var(--up-line); background: linear-gradient(180deg, var(--up-bg), #fff 60%); }
.gbp-field.is-down { border-color: var(--down-line); background: linear-gradient(180deg, var(--down-bg), #fff 60%); }
.gbp-head strong { display: block; font-weight: 500; }
.gbp-head small { color: var(--muted); }
.gbp-inputs { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.gbp-inputs label { font-size: 12.5px; }
.extra > summary { color: var(--ink-2); }

/* Reuniones */
.meet { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.meet-cancelada { opacity: .65; }
.meet-date { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px; border-radius: 12px; background: var(--ink); color: #fff; line-height: 1.1; }
.meet-date .d { font-size: 24px; font-weight: 400; }
.meet-date .m { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.meet-date .t { font-size: 11px; margin-top: 4px; color: var(--accent); }
.meet-hecha .meet-date { background: var(--line-2); color: var(--ink); }
.meet-hecha .meet-date .t { color: var(--muted); }
.meet-body { flex: 1 1 300px; min-width: 0; }
.meet-title { font-size: 16px; font-weight: 500; }
.meet-agree { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fffbe3; border: 1px solid var(--accent); }
.state-r-programada { background: var(--accent); }
.state-r-hecha { background: var(--up-bg); color: var(--up); }
.state-r-cancelada { background: var(--line-2); color: var(--muted); text-decoration: line-through; }
.agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-item { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.agenda-item:hover { border-color: var(--ink); }
.agenda-item.today { border-color: var(--accent); background: #fffbe3; }
.agenda-body { display: flex; flex-direction: column; min-width: 0; }
.agenda-body small { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Facturación */
.year-block { margin-bottom: 18px; }
.year-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.year-head h3 { margin: 0; font-size: 18px; font-weight: 400; }
.year-head strong { font-size: 18px; font-weight: 500; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hbar { width: 100%; height: 12px; display: block; }
.hbar-bg { fill: var(--line-2); }
.hbar-fg { fill: var(--ink); }
.gb.b1 { fill: #111; }
.gb.b2 { fill: #d9d9d4; }
.sw.sq { width: 12px; height: 12px; border-radius: 3px; }
.sw.sq.b1 { background: #111; }
.sw.sq.b2 { background: #d9d9d4; }
.services { background: var(--soft); }

@media (max-width: 820px) {
  .client-hero { grid-template-columns: 1fr; padding: 16px; }
  .hero-trend { align-items: flex-start; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs a.tab-out { margin-left: 0; }
  .trend-big { font-size: 16px; }
}
