/* =====================================================================
   NEW LAND — FINANCE OS · styles.css
   Dirección visual: editorial, hueso + verde New Land + negro carbón,
   naranja como acento, rojo solo para estados críticos. Grano de
   película constante. Números protagonistas. Nada de fintech azul.
   ===================================================================== */

@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('assets/fonts/switzer-black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('assets/fonts/eb-garamond-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('assets/fonts/eb-garamond-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bone: #F3F3F3;
  --paper: #FAFAF8;
  --ink: #272727;
  --ink-2: #4A4D4B;
  --muted: #6B6F6C;
  --line: rgba(39, 39, 39, 0.12);
  --line-2: rgba(39, 39, 39, 0.28);
  --forest: #1F3325;
  --forest-2: #2B4633;
  --forest-ink: #F3F3F3;
  --ember: #D1350A;       /* acento */
  --ember-ink: #FFFFFF;
  --rec: #DB1D1A;         /* solo crítico */
  --ok: #1F3325;
  --watch: #B2400B;
  --bad: #C11A17;
  --tint: rgba(31, 51, 37, 0.05);
  --tint-ember: rgba(209, 53, 10, 0.08);
  --tint-bad: rgba(219, 29, 26, 0.08);
  --chart-1: #1F3325;
  --chart-2: #D1350A;
  --chart-3: #8C918D;
  --chart-4: #C9CCC8;
  --grain-opacity: 0.07;
  --grain-blend: multiply;

  --sans: 'Switzer', 'Helvetica Neue', system-ui, sans-serif;
  --serif: 'EB Garamond', Garamond, Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --sidebar: 244px;
  --gutter: clamp(16px, 3vw, 40px);
  --radius: 2px;
  --t: 180ms;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bone: #101512;
  --paper: #161D18;
  --ink: #ECECE8;
  --ink-2: #C6C9C5;
  --muted: #9CA29E;
  --line: rgba(236, 236, 232, 0.12);
  --line-2: rgba(236, 236, 232, 0.28);
  --forest: #1F3325;
  --forest-2: #2E4A37;
  --forest-ink: #F3F3F3;
  --ember: #EA5A2C;
  --ember-ink: #101512;
  --rec: #F0443F;
  --ok: #8CC49C;
  --watch: #F0894F;
  --bad: #FF6B66;
  --tint: rgba(236, 236, 232, 0.04);
  --tint-ember: rgba(234, 90, 44, 0.12);
  --tint-bad: rgba(240, 68, 63, 0.14);
  --chart-1: #9CCBA8;
  --chart-2: #EA5A2C;
  --chart-3: #7E8580;
  --chart-4: #3A433D;
  --grain-opacity: 0.09;
  --grain-blend: screen;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bone: #101512; --paper: #161D18; --ink: #ECECE8; --ink-2: #C6C9C5; --muted: #9CA29E;
    --line: rgba(236, 236, 232, 0.12); --line-2: rgba(236, 236, 232, 0.28);
    --forest-2: #2E4A37; --ember: #EA5A2C; --ember-ink: #101512; --rec: #F0443F;
    --ok: #8CC49C; --watch: #F0894F; --bad: #FF6B66;
    --tint: rgba(236, 236, 232, 0.04); --tint-ember: rgba(234, 90, 44, 0.12); --tint-bad: rgba(240, 68, 63, 0.14);
    --chart-1: #9CCBA8; --chart-2: #EA5A2C; --chart-3: #7E8580; --chart-4: #3A433D;
    --grain-opacity: 0.09; --grain-blend: screen;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
  min-height: 100vh;
}
/* Grano de película: sutil, constante, nunca bloquea clics */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
::selection { background: var(--ember); color: var(--ember-ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--forest); color: var(--forest-ink);
  display: flex; flex-direction: column; gap: 20px;
  padding: 22px 0 18px;
  isolation: isolate;
}
/* Sangrado de luz: un destello cálido entrando a cuadro */
.sidebar::before {
  content: ''; position: absolute; inset: -10% -60% auto auto; width: 140%; height: 60%; z-index: -1;
  background: radial-gradient(closest-side, rgba(209, 53, 10, 0.28), rgba(209, 53, 10, 0) 70%);
  pointer-events: none;
}
.brand { display: flex; align-items: flex-end; gap: 12px; padding: 0 22px; text-decoration: none; color: inherit; }
.brand svg { width: 34px; height: auto; flex: none; }
.brand .brand-name { font-weight: 900; letter-spacing: -0.03em; font-size: 15px; line-height: 1; }
.brand .brand-name span { display: block; font-weight: 300; letter-spacing: 0.08em; font-size: 10.5px; text-transform: uppercase; margin-top: 4px; opacity: 0.75; }
.nav { display: flex; flex-direction: column; }
.nav a {
  display: grid; grid-template-columns: 28px 1fr; align-items: baseline;
  padding: 8px 22px; color: rgba(243, 243, 243, 0.72); text-decoration: none; font-size: 14px;
  border-left: 2px solid transparent; transition: color var(--t), background var(--t);
  min-height: 36px;
}
.nav a .k { font-size: 10.5px; letter-spacing: 0.06em; opacity: 0.6; font-variant-numeric: tabular-nums; }
.nav a:hover { color: #fff; background: rgba(243, 243, 243, 0.05); }
.nav a[aria-current="page"] { color: #fff; border-left-color: var(--ember); background: rgba(243, 243, 243, 0.07); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 0 22px; display: grid; gap: 10px; font-size: 12px; color: rgba(243, 243, 243, 0.7); }
.sidebar-foot select, .sidebar-foot button {
  background: rgba(243, 243, 243, 0.08); border: 1px solid rgba(243, 243, 243, 0.18); color: #fff;
  border-radius: var(--radius); padding: 6px 8px; min-height: 34px; cursor: pointer; width: 100%;
}
.sidebar-foot select option { color: #111; }
.sidebar-foot .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.local-note { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.local-note svg { flex: none; margin-top: 1px; }

.main { min-width: 0; padding: 28px var(--gutter) 120px; }
.view { max-width: 1440px; }

/* ---------------------------------------------------------------- page header */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: end; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.page-head .eyebrow { grid-column: 1 / -1; }
.page-head h1 { margin: 0; font-size: clamp(30px, 4.2vw, 52px); line-height: 0.95; letter-spacing: -0.05em; font-weight: 900; }
.page-head h1 .light { font-weight: 300; }
.page-head .question .pill, .page-head .question .small { font-family: var(--sans); font-style: normal; }
.page-head .question { margin: 8px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.6vw, 21px); color: var(--ink-2); line-height: 1.25; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.eyebrow .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); margin-right: 8px; vertical-align: 1px; }

/* ---------------------------------------------------------------- layout */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; }
.row-flex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; font-weight: 900; }
.section-head h2 .n { font-weight: 300; color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card.flat { background: transparent; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-title h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card.dark {
  background: var(--forest); color: var(--forest-ink); border-color: transparent; position: relative; overflow: hidden; isolation: isolate;
}
.card.dark::before { content: ''; position: absolute; right: -30%; top: -60%; width: 90%; height: 180%; z-index: -1; background: radial-gradient(closest-side, rgba(209, 53, 10, 0.30), rgba(209, 53, 10, 0)); pointer-events: none; }
.card.dark .eyebrow, .card.dark .muted, .card.dark .kpi small { color: rgba(243, 243, 243, 0.72); }
.card.dark .line { border-color: rgba(243, 243, 243, 0.16); }
.card.dark .btn.ghost { color: #fff; border-color: rgba(243, 243, 243, 0.35); }
.card.dark .btn.primary { background: var(--bone); color: var(--forest); }
:root[data-theme="dark"] .card.dark .btn.primary { background: #F3F3F3; }
.card.dark .pill { background: rgba(243, 243, 243, 0.08); }
.card.dark a { color: #fff; }

/* Bloques asimétricos: barra que no llega al borde */
.bar-mark { height: 6px; width: 38%; background: var(--forest); margin: 0 0 14px; }
.bar-mark.ember { background: var(--ember); width: 18%; }

/* ---------------------------------------------------------------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 0; background: var(--paper); border-style: solid; border-color: var(--line); border-width: 1px 0 0 1px; }
.kpis .kpi { background: var(--paper); padding: 14px 16px 16px; box-shadow: inset -1px -1px 0 var(--line); }
.kpi { container-type: inline-size; min-width: 0; }
.kpi small { display: block; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.kpi .v { display: block; font-size: clamp(17px, 11cqi, 27px); white-space: nowrap; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi.hero .v { font-size: clamp(26px, 12.5cqi, 60px); }
.kpi.accent .v { color: var(--ember); }
.big { font-size: clamp(40px, 5.4vw, 76px); font-weight: 900; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.big .cur { font-weight: 300; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.serif { font-family: var(--serif); }
.strong { font-weight: 700; }

/* ---------------------------------------------------------------- pills & states */
.pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  padding: 3px 8px 3px 6px; border: 1px solid currentColor; border-radius: var(--radius); line-height: 1.2;
}
.pill svg { width: 11px; height: 11px; flex: none; }
.pill.ok { color: var(--ok); }
.pill.watch { color: var(--watch); }
.pill.bad { color: var(--bad); background: var(--tint-bad); }
.pill.neutral { color: var(--muted); }
.pill.accent { color: var(--ember); }
.pill.solid-bad { background: var(--rec); color: #fff; border-color: var(--rec); }
.card.dark .pill.ok { color: #BFE3C8; }
.card.dark .pill.watch { color: #FFB38A; }
.card.dark .pill.bad { color: #fff; background: var(--rec); border-color: var(--rec); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  font-weight: 700; font-size: 13.5px; letter-spacing: -0.005em; cursor: pointer; text-decoration: none;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }
.btn.primary:hover { background: var(--forest-2); }
.btn.accent { background: var(--ember); color: var(--ember-ink); border-color: var(--ember); }
.btn.danger { color: var(--bad); border-color: currentColor; }
.btn.danger.solid { background: var(--rec); color: #fff; border-color: var(--rec); }
.btn.ghost { border-color: var(--line-2); }
.btn.link { border: 0; padding: 4px 2px; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { min-width: 40px; padding: 8px; }

/* ---------------------------------------------------------------- tabs & segmented */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { flex: none; padding: 10px 14px; min-height: 44px; border: 0; background: none; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ember); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg button, .seg label { border: 0; background: transparent; padding: 7px 12px; min-height: 36px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button + button, .seg label + label { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"], .seg input:checked + span { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--tint); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ember); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--tint); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ember); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--ember); outline-offset: -2px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line-2); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th:last-child, table.data td:last-child { padding-right: 4px; }
table.data th { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--muted); white-space: nowrap; position: sticky; top: 0; background: var(--bone); }
.card table.data th { background: var(--paper); }
table.data td.r, table.data th.r { text-align: right; white-space: nowrap; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--tint); }
table.data tr.total td { font-weight: 900; border-bottom: 1px solid var(--line-2); }
table.data tr.strong td { font-weight: 700; }
table.data td .sub { display: block; font-size: 12px; color: var(--muted); }
table.data .actions { white-space: nowrap; text-align: right; }
table.compact td, table.compact th { padding-top: 6px; padding-bottom: 6px; }

/* ---------------------------------------------------------------- progress bars */
.bar { position: relative; height: 8px; background: var(--tint); border: 1px solid var(--line); overflow: hidden; min-width: 80px; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--forest); }
:root[data-theme="dark"] .bar > span { background: var(--ok); }
.bar.watch > span { background: var(--watch); }
.bar.bad > span { background: var(--rec); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ink); }
.meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.meter .label { font-size: 13px; }
.meter .val { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter .bar { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.list li:last-child { border-bottom: 0; }
.list .meta { font-size: 12px; color: var(--muted); }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.alerts li { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--paper); padding: 12px 14px 12px 0; }
.alerts li::before { content: ''; align-self: stretch; background: var(--muted); }
.alerts li.CRITICAL::before { background: var(--rec); }
.alerts li.WARN::before { background: var(--watch); }
.alerts li.INFO::before { background: var(--line-2); }
.alerts .msg { font-size: 14px; }
.alerts .sev { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); display: block; margin-bottom: 2px; }
.alerts li.CRITICAL .sev { color: var(--bad); }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 14px; }
.form .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span:first-child, .field > legend { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.field .req { color: var(--ember); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 600; }
input[type="text"], input[type="number"], input[type="date"], input[type="month"], input[type="email"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font-size: 14.5px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ember); outline-offset: -1px; border-color: transparent; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
input.money { font-size: 22px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--forest); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-note { font-size: 13px; color: var(--muted); padding: 10px 12px; background: var(--tint); border-left: 2px solid var(--ember); }
.form-error { font-size: 13.5px; color: var(--bad); font-weight: 600; padding: 10px 12px; background: var(--tint-bad); }
.form-warn { font-size: 13.5px; color: var(--watch); font-weight: 600; padding: 10px 12px; background: var(--tint-ember); }
.calc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-line b { color: var(--ink); }
.splits-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }

/* ---------------------------------------------------------------- dialog */
dialog.modal {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--bone); color: var(--ink); overflow: hidden;
}
dialog.modal.wide { width: min(1080px, calc(100vw - 32px)); }
dialog.modal.narrow { width: min(460px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(16, 21, 18, 0.55); backdrop-filter: blur(2px); }
dialog.modal[open] { display: flex; flex-direction: column; animation: rise var(--t) ease-out; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; font-weight: 900; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--paper); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- toast */
.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; width: min(520px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: var(--bone); padding: 10px 12px 10px 16px; border-radius: var(--radius); font-size: 14px; animation: rise var(--t) ease-out; }
.toast .btn { color: var(--bone); border-color: rgba(243, 243, 243, 0.4); min-height: 34px; }
.toast.error { background: var(--rec); color: #fff; }

/* ---------------------------------------------------------------- FAB & mobile nav */
.fab {
  position: fixed; right: calc(var(--gutter)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px;
  background: var(--ember); color: var(--ember-ink); border: 0; border-radius: var(--radius); font-weight: 900; font-size: 14px; letter-spacing: 0.02em;
  cursor: pointer; box-shadow: 0 10px 26px -12px rgba(209, 53, 10, 0.7);
}
.fab svg { width: 20px; height: 20px; }
.mobile-nav { display: none; }
.mobile-top { display: none; }

/* ---------------------------------------------------------------- flow (Project → Payday) */
.flow { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.flow li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.flow li::before { counter-increment: f; content: counter(f, decimal-leading-zero); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow b { display: block; font-weight: 700; }
.flow .d { font-size: 12.5px; color: var(--muted); }
.flow .a { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.flow .a.minus { font-weight: 400; color: var(--muted); }
.flow li.key .a { font-size: 22px; }
.flow .split { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.flow .split div { border: 1px solid var(--line); padding: 8px 10px; background: var(--paper); }
.flow .split small { display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.flow .split strong { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; height: 260px; }
.chart.tall { height: 320px; }
.chart.short { height: 180px; }
.chart svg.fallback { width: 100%; height: 100%; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.legend i.dash { border-top-style: dashed; }
.legend i.dot { border-top-style: dotted; }

/* ---------------------------------------------------------------- empty & misc */
.empty { padding: 28px 20px; border: 1px dashed var(--line-2); text-align: left; color: var(--muted); display: grid; gap: 10px; justify-items: start; }
.empty strong { color: var(--ink); font-size: 16px; }
.divider { height: 1px; background: var(--line-2); margin: 24px 0; }
.line { border-top: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); font-size: 13px; cursor: pointer; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }
.chip .k { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.chip[aria-pressed="true"] .k { color: rgba(243, 243, 243, 0.7); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--line-2); background: var(--paper); margin-bottom: 18px; flex-wrap: wrap; }
.banner.demo { border-color: var(--ember); background: var(--tint-ember); }
.banner.crit { border-color: var(--rec); background: var(--tint-bad); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kv .total { font-weight: 900; border-top: 1px solid var(--line-2); padding-top: 6px; }
.reasons { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.steps span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); }
.steps span[aria-current="step"] { color: var(--ink); border-color: var(--ember); }
.steps span.done { color: var(--ok); }
.quote-line { font-family: var(--serif); font-size: clamp(19px, 2vw, 25px); line-height: 1.3; margin: 0; max-width: 46ch; }
.test-row.fail td { color: var(--bad); font-weight: 700; }
.health-ring { width: 120px; height: 120px; }
.tag { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.layer-REAL { color: var(--ink); }
.layer-PROGRAMADO { color: var(--ok); }
.layer-PROYECTADO { color: var(--watch); }
details.more summary { cursor: pointer; font-weight: 700; font-size: 13px; min-height: 36px; display: flex; align-items: center; }
.print-hide {}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-7, .span-8 { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main { padding: 16px 16px calc(120px + env(safe-area-inset-bottom, 0px)); }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -16px -16px 16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--forest); color: var(--forest-ink); position: sticky; top: 0; z-index: 50; }
  .mobile-top svg { width: 26px; }
  .mobile-top .t { font-weight: 900; letter-spacing: -0.02em; font-size: 14px; }
  .mobile-top .t span { font-weight: 300; }
  .mobile-top button { background: transparent; border: 1px solid rgba(243, 243, 243, 0.3); color: #fff; min-height: 36px; min-width: 44px; border-radius: var(--radius); }
  .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .g-12 > * { grid-column: 1 / -1 !important; }
  .page-head { grid-template-columns: minmax(0, 1fr); }
  .page-head .actions { justify-content: flex-start; }
  .form .cols, .form .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .fab { display: none; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--paper); border-top: 1px solid var(--line-2); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-nav a, .mobile-nav button { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; color: var(--muted); background: none; border: 0; min-height: 48px; padding: 4px; cursor: pointer; }
  .mobile-nav svg { width: 22px; height: 22px; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); }
  .mobile-nav .plus { align-self: center; justify-self: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ember); color: var(--ember-ink); display: grid; place-items: center; }
  .mobile-nav .plus svg { width: 24px; height: 24px; }
  dialog.modal, dialog.modal.wide { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 10px 10px 0 0; }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .splits-row { grid-template-columns: minmax(0, 1fr); }
}
.more-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.more-sheet a { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 700; min-height: 52px; background: var(--paper); }
.more-sheet a .k { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .sidebar, .fab, .mobile-nav, .mobile-top, .page-head .actions, body::after { display: none !important; }
  .app { grid-template-columns: 1fr; }
}

/* #view recibe foco programático al cambiar de pantalla (lectores de pantalla); no es interactivo. */
#view:focus { outline: none; }
.card.dark .kv dt, .card.dark .small.muted, .card.dark .xs.muted { color: rgba(243, 243, 243, 0.72); }
.card.dark .kv dd { color: #fff; }
.card.dark .reasons { color: rgba(243, 243, 243, 0.9); }
.card.dark .kpi .s { color: rgba(243, 243, 243, 0.72); }
.card.dark .kpi .s .pill { color: inherit; }

/* ---------------------------------------------------------------- ayuda contextual */
.kpi.has-info small, th.has-info, .kv dt.has-info, [data-info].has-info > .eyebrow {
  text-decoration: underline dotted; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help;
}
.card.dark .kv dt.has-info, .card.dark [data-info].has-info > .eyebrow, .card.dark .kpi.has-info small { text-decoration-color: rgba(243, 243, 243, 0.45); }
#info-pop {
  position: fixed; z-index: 2000; background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); border-top: 3px solid var(--ember);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 18px 40px -18px rgba(16, 21, 18, 0.45); font-size: 13.5px; line-height: 1.45;
  animation: rise var(--t) ease-out;
}
#info-pop .ip-title { display: block; font-size: 15px; font-weight: 900; letter-spacing: -0.01em; margin-bottom: 6px; }
#info-pop .ip-what { margin: 0 0 10px; }
#info-pop .ip-from { background: var(--tint); padding: 8px 10px; margin-bottom: 12px; }
#info-pop .ip-from p { margin: 4px 0 0; color: var(--ink-2); }
#info-pop .ip-go { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 6px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; border-radius: 999px; }
#info-pop .ip-go:hover { border-color: var(--ember); }
#info-pop .ip-i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: var(--ember-ink); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 16px; }

/* ---------------------------------------------------------------- cotizador: equipo y días */
.quote-sticky { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 1120px; margin: 0 0 16px; padding: 10px 14px; background: var(--forest); color: var(--forest-ink); font-size: 14px; }
.quote-sticky strong { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; }
.quote-sticky .btn { color: #fff; border-color: rgba(243, 243, 243, 0.4); }
@media (max-width: 900px) { .quote-sticky { top: calc(env(safe-area-inset-top, 0px) + 62px); } }
.eq-summary { margin: 0 0 6px; font-size: 14px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.eq-card { border: 1px solid var(--line-2); background: var(--paper); padding: 10px 12px; display: grid; gap: 8px; transition: background var(--t), border-color var(--t); }
.eq-card.on { border-color: var(--forest); background: var(--tint); box-shadow: inset 0 -3px 0 var(--ember); }
:root[data-theme="dark"] .eq-card.on { border-color: var(--ok); }
.eq-name { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; min-height: 40px; }
.eq-name input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--forest); }
.eq-name .sub { display: block; font-size: 12.5px; color: var(--muted); }
.eq-qty { display: none; align-items: center; gap: 6px; flex-wrap: wrap; }
.eq-card.on .eq-qty { display: flex; }
.eq-qty .btn { min-width: 40px; min-height: 40px; font-size: 18px; padding: 0; }
.eq-qty input { width: 64px; text-align: center; min-height: 40px; font-weight: 700; }
.days-card { border-top: 3px solid var(--ember); }
.days-stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.days-stepper .btn { min-width: 52px; min-height: 52px; font-size: 22px; }
.days-stepper input { width: 110px; min-height: 52px; font-size: 30px; font-weight: 900; text-align: center; letter-spacing: -0.03em; }
.days-stepper span { color: var(--muted); }

/* ---------------------------------------------------------------- menú lateral: ocultable y fijable (solo escritorio) */
.sidebar-pin { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 6px; border: 1px solid rgba(243, 243, 243, 0.2); background: rgba(243, 243, 243, 0.06); color: rgba(243, 243, 243, 0.7); cursor: pointer; transition: background var(--t), color var(--t); }
.sidebar-pin svg { width: 15px; height: 15px; transform: rotate(35deg); transition: transform var(--t); }
.sidebar-pin:hover { color: #fff; background: rgba(243, 243, 243, 0.14); }
.sidebar-pin[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: #fff; }
.sidebar-pin[aria-pressed="true"] svg { transform: none; }
.sidebar-edge { display: none; }
@media (min-width: 901px) {
  .app.nav-floating { grid-template-columns: minmax(0, 1fr); }
  .app.nav-floating .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); height: 100vh; z-index: 80; transform: translateX(-100%); transition: transform 200ms ease, box-shadow 200ms ease; }
  .app.nav-floating.nav-open .sidebar { transform: none; box-shadow: 18px 0 40px -18px rgba(16, 21, 18, 0.5); }
  .app.nav-floating .sidebar-edge { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 14px; z-index: 79; cursor: e-resize; }
  .app.nav-floating .sidebar-edge::after { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 72px; margin-top: -36px; border-radius: 0 3px 3px 0; background: var(--forest); opacity: 0.55; transition: opacity var(--t), width var(--t); }
  :root[data-theme="dark"] .app.nav-floating .sidebar-edge::after { background: var(--ok); }
  .app.nav-floating .sidebar-edge:hover::after { opacity: 1; width: 6px; }
  .app.nav-floating .main { padding-left: calc(var(--gutter) + 6px); }
}

.sidebar .brand { padding-right: 48px; }

/* ---------------------------------------------------------------- menú: pastilla que se desliza */
.nav { position: relative; }
.nav a { position: relative; z-index: 1; }
.nav a[aria-current="page"] { background: transparent; border-left-color: transparent; }
.nav-pill {
  position: absolute; left: 0; right: 0; top: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(243, 243, 243, 0.11), rgba(243, 243, 243, 0.04));
  border-left: 2px solid var(--ember);
  box-shadow: inset 18px 0 24px -20px rgba(234, 90, 44, 0.65);
  transition: transform 300ms cubic-bezier(0.65, 0, 0.25, 1), height 300ms cubic-bezier(0.65, 0, 0.25, 1), opacity 150ms;
}
.nav-pill.no-anim { transition: none; }

/* Entrada de cada pantalla: misma coreografía que Home (bloques escalonados, gráficas que se dibujan) */
.page-enter .pe-in { animation: homeIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 55ms); }
.page-enter .chart { animation: sparkDraw 1000ms cubic-bezier(0.45, 0, 0.2, 1) 220ms both; }
.page-enter .chart.pe-in { animation: homeIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--d, 0) * 55ms) both, sparkDraw 1000ms cubic-bezier(0.45, 0, 0.2, 1) 220ms both; }
.page-enter .bar > span, .page-enter .eq-card .bar > span { transform-origin: left; animation: barGrow 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms both; }
.page-enter .health-ring { animation: chIn 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 250ms both; }

/* ---------------------------------------------------------------- HOME */
.home { max-width: 1240px; }
.home-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 24px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2); }
.home-head .eyebrow { grid-column: 1 / -1; }
.hello { margin: 0; font-size: clamp(40px, 6.4vw, 88px); line-height: 0.92; letter-spacing: -0.05em; font-weight: 900; }
.hello .light { font-weight: 300; }
.hello .wd { display: inline-block; white-space: nowrap; }
.hello .ch { display: inline-block; }
.home-sub { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 1.7vw, 22px); color: var(--ink-2); grid-column: 1; }
.home-actions { grid-column: 2; grid-row: 2 / span 2; display: flex; gap: 8px; align-self: end; }

.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.home-hero { grid-column: span 8; grid-row: span 2; display: flex; flex-direction: column; }
.home-pay { grid-column: span 4; }
.home-runway { grid-column: span 4; }
.home-month { grid-column: span 4; }
.home-up { grid-column: span 4; }
.home-alerts { grid-column: span 4; }
.home-projects { grid-column: span 12; }
.home-grid .card { padding: 20px 22px; }

.home-big { font-size: clamp(44px, 6.2vw, 92px); font-weight: 900; letter-spacing: -0.05em; line-height: 0.95; margin-top: 10px; font-variant-numeric: tabular-nums; }
.home-hero .home-big .neg, .home-trio .neg { color: #FF8A7A; }
.home-spark-wrap { position: relative; margin-top: auto; padding-top: 22px; }
.home-spark { display: block; width: 100%; height: 150px; overflow: visible; }
.home-spark .hs-floor { stroke: rgba(234, 90, 44, 0.75); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.empty-spark { height: auto; padding: 30px 0; color: rgba(243, 243, 243, 0.6); font-size: 13px; }
.hs-box { position: relative; }
.hs-dot { position: absolute; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px rgba(234, 90, 44, 0.25), 0 0 18px 4px rgba(234, 90, 44, 0.55); transform: translateY(-50%); }
.home-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(243, 243, 243, 0.16); }
.home-trio dt { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: rgba(243, 243, 243, 0.72); }
.home-trio dd { margin: 4px 0 0; font-size: clamp(16px, 1.7vw, 22px); font-weight: 900; letter-spacing: -0.03em; }

/* Sangrado de luz del hero: entra a cuadro una vez y se queda */
.home-hero::before { background: radial-gradient(closest-side, rgba(234, 90, 44, 0.38), rgba(209, 53, 10, 0)); }
.home-hero::after { content: ''; position: absolute; left: -20%; bottom: -70%; width: 80%; height: 140%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(156, 203, 168, 0.16), rgba(156, 203, 168, 0)); }

.home-date { font-size: clamp(24px, 2.4vw, 32px); font-weight: 900; letter-spacing: -0.04em; margin: 8px 0 14px; }
.home-partners { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.home-partners li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; background: var(--paper); }
.home-partners strong { font-size: 22px; letter-spacing: -0.03em; font-weight: 900; }

.home-net { display: flex; align-items: baseline; gap: 8px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 900; letter-spacing: -0.04em; margin: 8px 0 12px; }
.home-bars { display: grid; gap: 10px; margin-bottom: 12px; }
.home-bars > div { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.home-bars .hb { height: 8px; background: var(--tint); position: relative; overflow: hidden; }
.home-bars .hb i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--forest); transform-origin: left; }
.home-bars .out .hb i { background: var(--ember); }
:root[data-theme="dark"] .home-bars .hb i { background: var(--chart-1); }
:root[data-theme="dark"] .home-bars .out .hb i { background: var(--ember); }

.home-gauge-wrap { position: relative; width: min(220px, 100%); margin: 8px 0 6px; }
.home-gauge { display: block; width: 100%; height: auto; }
.home-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.home-gauge .g-track { stroke: var(--line); }
.home-gauge .g-val { stroke: var(--forest); stroke-dasharray: 100 100; }
.home-gauge.ok .g-val { stroke: var(--ok); }
.home-gauge.watch .g-val { stroke: var(--watch); }
.home-gauge.bad .g-val { stroke: var(--rec); }
.home-gauge-v { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; line-height: 1; }
.home-gauge-v strong { font-size: 34px; font-weight: 900; letter-spacing: -0.04em; }

.home-list { list-style: none; margin: 10px 0 10px; padding: 0; display: grid; }
.home-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.home-list li:last-child { border-bottom: 0; }
.home-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.home-projects .home-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 24px; }
.home-projects .home-list li { grid-template-columns: minmax(0, 1fr) auto; border-bottom: 0; border-top: 1px solid var(--line); }
.home-projects .home-list li .xs { grid-column: 1; grid-row: 2; }
.home-projects .home-list li > .small { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.home-alerts .alerts li { padding-top: 10px; padding-bottom: 10px; }
.home-alerts .alerts .msg { font-size: 13.5px; }

.home-more { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 18px 22px; border: 1px solid var(--line-2); text-decoration: none; background: transparent; transition: background var(--t), border-color var(--t); }
.home-more > span:first-child { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; }
.home-more:hover { background: var(--tint); border-color: var(--ember); }

@media (max-width: 1100px) {
  .home-hero { grid-column: span 12; grid-row: auto; }
  .home-pay, .home-runway, .home-month, .home-up { grid-column: span 6; }
  .home-alerts { grid-column: span 12; }
}
@media (max-width: 700px) {
  .home-head { grid-template-columns: 1fr; }
  .home-actions { grid-column: 1; grid-row: auto; margin-top: 12px; }
  .home-pay, .home-runway, .home-month, .home-up, .home-alerts { grid-column: span 12; }
  .home-trio { grid-template-columns: 1fr 1fr; }
}

/* --- coreografía de entrada (solo con .animate; se pausa mientras corre la intro) --- */
.home.animate .h-in { opacity: 0; }
.home.animate.play .h-in { animation: homeIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--d, 0) * 45ms); }
@keyframes homeIn { from { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.home.animate .hello .ch { opacity: 0; }
.home.animate.play .hello .ch { animation: chIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(120ms + var(--i) * 32ms); }
@keyframes chIn { from { opacity: 0; transform: translateY(0.45em) rotate(4deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.home.animate.play .home-spark { animation: sparkDraw 1100ms cubic-bezier(0.45, 0, 0.2, 1) 260ms both; }
@keyframes sparkDraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.home.animate.play .hs-dot { animation: dotIn 400ms ease-out 1300ms both, dotPulse 1600ms ease-in-out 1700ms 2; }
@keyframes dotIn { from { opacity: 0; transform: translateY(-50%) scale(0); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes dotPulse { 50% { box-shadow: 0 0 0 9px rgba(234, 90, 44, 0), 0 0 26px 8px rgba(234, 90, 44, 0.7); } }
.home.animate.play .home-hero::before { animation: bleedIn 1400ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both; }
@keyframes bleedIn { from { opacity: 0; transform: translate(-45%, 10%); } to { opacity: 1; transform: none; } }
.home.animate.play .home-bars .hb i { animation: barGrow 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 70ms + 300ms); }
.home.animate.play .home-bars .out .hb i { animation-delay: calc(var(--d, 0) * 70ms + 420ms); }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: none; } }
.home.animate.play .home-gauge .g-val { animation: gaugeFill 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) 500ms both; }
@keyframes gaugeFill { from { stroke-dashoffset: 100; } }

/* --- intro: telón verde con saludo --- */
.home-intro {
  position: fixed; inset: 0; z-index: 3000; display: grid; align-items: center; padding: 0 clamp(24px, 8vw, 120px);
  background: var(--forest); color: #F3F3F3; overflow: hidden; isolation: isolate; cursor: pointer;
  animation: introIn 260ms ease-out both;
}
.home-intro::before { content: ''; position: absolute; right: -25%; top: -45%; width: 85%; height: 150%; z-index: -1; background: radial-gradient(closest-side, rgba(234, 90, 44, 0.42), rgba(209, 53, 10, 0)); animation: bleedIn 1600ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.home-intro::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.1; mix-blend-mode: screen; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.home-intro .hi-inner { display: grid; justify-items: start; gap: 22px; }
.home-intro .hi-iso svg { width: 54px; height: auto; display: block; animation: chIn 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.home-intro .hello { font-size: clamp(48px, 9vw, 132px); }
.home-intro .hello .ch { animation: chIn 560ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(200ms + var(--i) * 38ms); }
.home-intro .hi-slogan { margin: 0; font-size: 15px; font-weight: 300; letter-spacing: 0.01em; opacity: 0; animation: fadeUp 500ms ease-out 900ms both; }
.home-intro .hi-slogan b { font-weight: 900; }
.home-intro.out { animation: introOut 600ms cubic-bezier(0.7, 0, 0.3, 1) both; pointer-events: none; }
@keyframes introIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes introOut { to { transform: translateY(-100%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 0.85; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .home.animate .h-in, .home.animate .hello .ch { opacity: 1; }
  .nav-pill { transition: none; }
  .home-intro { display: none; }
}

/* ---------------------------------------------------------------- nube: pantalla de entrada */
.cloud-gate {
  position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 24px 16px;
  background: var(--forest); color: #F3F3F3; overflow-y: auto; isolation: isolate;
}
.cloud-gate::before { content: ''; position: absolute; right: -25%; top: -45%; width: 85%; height: 150%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(234, 90, 44, 0.38), rgba(209, 53, 10, 0)); }
.cloud-gate::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.1; mix-blend-mode: screen; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cg-card { width: min(480px, 100%); display: grid; gap: 14px; animation: homeIn 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cg-iso svg { width: 48px; height: auto; display: block; margin-bottom: 8px; }
.cloud-gate .eyebrow { color: rgba(243, 243, 243, 0.7); }
.cloud-gate h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 900; }
.cg-sub { margin: 0; color: rgba(243, 243, 243, 0.85); font-size: 15px; line-height: 1.45; }
.cg-form { display: grid; gap: 12px; margin-top: 6px; }
.cloud-gate .field span { color: rgba(243, 243, 243, 0.85); }
.cloud-gate input { background: rgba(243, 243, 243, 0.08); border: 1px solid rgba(243, 243, 243, 0.3); color: #fff; min-height: 48px; font-size: 16px; padding: 10px 12px; width: 100%; border-radius: var(--radius); }
.cloud-gate input::placeholder { color: rgba(243, 243, 243, 0.45); }
.cloud-gate .btn { min-height: 48px; }
.cloud-gate .btn.primary { background: #F3F3F3; color: var(--forest); border-color: #F3F3F3; }
.cloud-gate .btn.ghost { color: #fff; border-color: rgba(243, 243, 243, 0.4); background: transparent; }
.cloud-gate .btn.danger { background: var(--rec); border-color: var(--rec); color: #fff; }
.cloud-gate .muted { color: rgba(243, 243, 243, 0.65); }
.cg-err { margin: 0; padding: 10px 12px; background: rgba(240, 68, 63, 0.18); border-left: 3px solid #F0443F; color: #fff; font-size: 14px; }
.cg-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 4px 0; background: rgba(243, 243, 243, 0.2); border: 1px solid rgba(243, 243, 243, 0.2); }
.cg-cmp > div { background: var(--forest); padding: 12px; }
.cg-cmp dt { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: rgba(243, 243, 243, 0.7); }
.cg-cmp dd { margin: 6px 0 0; font-weight: 700; }
.cg-bar { height: 3px; background: rgba(243, 243, 243, 0.15); overflow: hidden; position: relative; }
.cg-bar i { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--ember); animation: cgBar 1.1s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes cgBar { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
#signout-btn { font-size: 12px; }
body[data-cloud="offline"] #storage-note, body[data-cloud="error"] #storage-note { color: #FFB59E; }
@media (prefers-reduced-motion: reduce) { .cg-bar i { animation: none; width: 100%; opacity: 0.5; } }
.cg-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; border: 0; margin: 0; padding: 0; }
.cg-who label { position: relative; cursor: pointer; }
.cg-who input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cg-who span { display: grid; place-items: center; min-height: 56px; padding: 10px; border: 1px solid rgba(243, 243, 243, 0.3); border-radius: var(--radius); font-size: 20px; font-weight: 900; letter-spacing: -0.03em; transition: background var(--t), border-color var(--t), color var(--t); }
.cg-who label:hover span { border-color: rgba(243, 243, 243, 0.6); }
.cg-who input:checked + span { background: #F3F3F3; color: var(--forest); border-color: #F3F3F3; box-shadow: inset 0 -3px 0 var(--ember); }
.cg-who input:focus-visible + span { outline: 2px solid var(--ember); outline-offset: 2px; }
.who-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.who-row select:disabled { opacity: 1; cursor: default; }
.sidebar-foot .signout { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; white-space: nowrap; }
.sidebar-foot .signout:hover { border-color: var(--ember); background: rgba(234, 90, 44, 0.16); }
.sidebar-foot .signout[hidden] { display: none; }
/* Tapa la pantalla mientras la app está en segundo plano (selector de apps) */
body.privacy-cover::before { content: ''; position: fixed; inset: 0; z-index: 2400; background: var(--forest); }
.cloud-gate.is-lock .btn.primary { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 0 22px; }
.cloud-gate .btn.primary svg { width: 18px; height: 18px; }
.cloud-gate input.cg-code { font-size: 32px; letter-spacing: 0.35em; font-weight: 900; font-variant-numeric: tabular-nums; min-height: 64px; font-family: var(--mono); }
.cloud-gate input.cg-code::placeholder { letter-spacing: 0.35em; }

/* ---------------------------------------------------------------- plan de pagos */
fieldset.pay-plan { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px 6px; margin: 0; min-width: 0; }
fieldset.pay-plan > legend { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 0 6px; }
.plan-card .plan-line { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 10px; font-size: 26px; letter-spacing: -0.03em; }
.plan-parts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.plan-parts li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--paper); }
.plan-parts li > div { display: grid; gap: 2px; }
.plan-parts li .r { text-align: right; justify-items: end; }
.income-box { padding: 12px 14px; background: var(--tint); border-left: 2px solid var(--forest); gap: 10px; }

/* =====================================================================
   REDISEÑO · etapa 1 (auditoría oct 2026)
   Menú de 5 secciones · 3 niveles de botón · movimiento corto · 44 px
   ===================================================================== */
/* --- menú lateral --- */
.nav { gap: 2px; padding: 0 10px; }
.nav a.nav-main { display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 44px; border-left: 0; font-size: 15px; font-weight: 600; color: rgba(243, 243, 243, 0.75); border-radius: 6px; }
.nav a.nav-main svg { width: 20px; height: 20px; flex: none; }
.nav a.nav-main[aria-current="page"] { color: #fff; font-weight: 700; background: transparent; }
.nav a.nav-main[aria-current="page"] svg { color: #F3A487; }
.nav-pill { left: 10px; right: 10px; border-radius: 6px; border-left: 0; background: rgba(243, 243, 243, 0.1); box-shadow: inset 3px 0 0 var(--rec); }
.nav-sub { display: none; flex-direction: column; margin: 2px 0 8px 44px; border-left: 1px solid rgba(243, 243, 243, 0.18); }
.nav-sub.open { display: flex; }
.nav-sub a { display: flex; align-items: center; min-height: 36px; padding: 0 12px; font-size: 13.5px; color: rgba(243, 243, 243, 0.68); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; transition: color var(--t), border-color var(--t); }
.nav-sub a:hover { color: #fff; }
.nav-sub a[aria-current="true"] { color: #fff; font-weight: 700; border-left-color: #F3A487; }
.nav a .k { display: none; }

/* --- pestañas de sección (solo celular; en escritorio están en el menú) --- */
.section-tabs { display: none; }
@media (max-width: 900px) {
  .section-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 16px; padding: 0 16px 2px; }
  .section-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 700; font-size: 13.5px; color: var(--muted); background: var(--paper); }
  .section-tabs a[aria-current="page"] { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); }
}

/* --- Más (hub) --- */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hub-item { display: grid; gap: 4px; padding: 18px 20px; background: var(--paper); text-decoration: none; color: var(--ink); min-height: 88px; align-content: center; transition: background var(--t); }
.hub-item strong { font-size: 18px; letter-spacing: -0.02em; font-weight: 900; }
.hub-item span { font-size: 13.5px; color: var(--muted); }
.hub-item:hover { background: var(--tint); }

/* --- botones: 3 niveles --- */
.btn { min-height: 40px; font-size: 14px; }
.btn.accent { background: var(--forest); color: var(--forest-ink); border-color: var(--forest); } /* el naranja ya no es botón */
.btn.ghost { border-color: transparent; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.btn.ghost:hover { border-color: transparent; text-decoration-color: currentColor; background: var(--tint); }
.btn.ghost.icon-btn, .btn.ghost.sm.icon-btn { text-decoration: none; }
.card.dark .btn.ghost { border-color: transparent; }
@media (pointer: coarse) { .btn, .btn.sm, .icon-btn { min-height: 44px; } .icon-btn { min-width: 44px; } .seg button, .seg label { min-height: 44px; } }

/* --- botón flotante "+ Movimiento" (acción global, fuera de la barra de secciones) --- */
.fab { background: var(--forest); color: var(--forest-ink); border-radius: 999px; font-weight: 700; letter-spacing: 0; font-size: 15px; min-height: 52px; padding: 0 22px 0 18px; box-shadow: 0 12px 28px -12px rgba(16, 21, 18, 0.55), inset 0 0 0 1px rgba(243, 243, 243, 0.12); transition: transform 160ms ease-out, background var(--t); }
.fab:hover { background: var(--forest-2); }
.fab:active { transform: scale(0.97); }
.fab svg { color: #F3A487; }

/* --- celular: barra de secciones --- */
@media (max-width: 900px) {
  .fab { display: inline-flex; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); min-height: 50px; }
  .mobile-nav { grid-template-columns: repeat(5, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: var(--paper); }
  .mobile-nav a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 56px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); text-decoration: none; }
  .mobile-nav a svg { width: 24px; height: 24px; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); font-weight: 800; }
  .mobile-nav a[aria-current="page"] svg { fill: currentColor; fill-opacity: 0.14; stroke-width: 2.2; }
  .mobile-nav a[aria-current="page"]::before { content: ''; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rec); }
  .toasts { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
}

/* --- movimiento: corto y sin desenfoque al cambiar de pantalla (≤ 300 ms) --- */
.page-enter .pe-in { animation: fadeQuick 200ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0ms; }
.page-enter .chart { animation: fadeQuick 200ms ease-out both; }
.page-enter .chart.pe-in { animation: fadeQuick 200ms ease-out both; }
.page-enter .bar > span, .page-enter .eq-card .bar > span { animation: barGrow 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.page-enter .health-ring { animation: fadeQuick 200ms ease-out both; }
@keyframes fadeQuick { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.nav-pill { transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), height 240ms cubic-bezier(0.16, 1, 0.3, 1), opacity 150ms; }

/* =====================================================================
   REDISEÑO · etapa 2: registrar dinero
   Una columna · primero "¿entró o salió?" · lo opcional en "Más detalles"
   ===================================================================== */
.tx-form { gap: 16px; }
.tx-form .cols { grid-template-columns: minmax(0, 1fr); }
.tx-form .cols.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .tx-form .cols.pair { grid-template-columns: minmax(0, 1fr); } }
.type-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; justify-items: start; min-width: 0; }
.seg.seg-big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.seg.seg-big label { justify-content: center; min-height: 54px; font-size: 16px; color: var(--ink-2); }
.seg.seg-big label:has(input:checked) { background: var(--forest); color: var(--forest-ink); box-shadow: none; }
.type-pick .more-types { display: none; }
.tx-form.show-types .type-pick .more-types { display: inline-flex; }
.tx-form.show-types .seg.seg-big label:has(input:checked) { background: var(--forest); }
.more-details { border-top: 1px solid var(--line-2); padding-top: 4px; }
.more-details > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; min-height: 44px; align-items: center; font-weight: 700; font-size: 14px; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 14px; line-height: 1; }
.more-details[open] > summary::before { content: '−'; }
.more-details > summary .muted { font-weight: 400; font-size: 13px; }
.more-details > .stack { padding: 6px 0 4px; gap: 14px; }
.tx-form .income-box { gap: 12px; }

/* --- lista de movimientos agrupada por día --- */
.list-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.list-toolbar b { color: var(--ink); }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 2px; min-width: 190px; padding: 6px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 16px 36px -18px rgba(16, 21, 18, 0.45); }
details.menu .menu-pop .btn { justify-content: flex-start; text-decoration: none; width: 100%; }
.tx-list { display: grid; gap: 18px; }
.tx-day header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px 6px; border-bottom: 1px solid var(--line-2); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tx-day ul { list-style: none; margin: 0; padding: 0; }
.tx-row { display: grid; grid-template-columns: auto 28px minmax(0, 1fr) minmax(0, 160px) auto; gap: 12px; align-items: center; min-height: 60px; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t); }
.tx-row:hover, .tx-row:focus-visible { background: var(--tint); }
.tx-row:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.tx-row .sel { display: grid; place-items: center; width: 28px; }
.tx-row .sel input { width: 20px; height: 20px; accent-color: var(--forest); }
.tx-row:not(:has(.sel)) { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 160px) auto; }
.tx-row .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--tint); color: var(--muted); }
.tx-row.in .ic { color: var(--ok); }
.tx-row.out .ic { color: var(--ink-2); }
.tx-row .what { display: grid; gap: 2px; min-width: 0; }
.tx-row .what strong { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .what .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .flags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tx-row .flag { font-size: 11px; color: var(--watch); display: inline-flex; align-items: center; }
.tx-row .flag svg { width: 14px; height: 14px; color: var(--muted); }
.tx-row .acc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .amt { text-align: right; font-weight: 800; font-size: 15px; display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.tx-row .amt .sub { font-size: 11.5px; font-weight: 400; color: var(--muted); }
@media (max-width: 700px) { .tx-row, .tx-row:not(:has(.sel)) { grid-template-columns: 28px minmax(0, 1fr) auto; } .tx-row:has(.sel) { grid-template-columns: auto 28px minmax(0, 1fr) auto; } .tx-row .acc { display: none; } }
.bulk-bar { position: sticky; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; background: var(--ink); color: var(--bone); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(16, 21, 18, 0.6); animation: fadeQuick 200ms ease-out both; }
.bulk-bar strong { margin-right: auto; }
.bulk-bar .btn { color: var(--bone); border-color: rgba(243, 243, 243, 0.35); }
.bulk-bar .btn.danger { color: #FFB1AA; }
@media (max-width: 900px) { .bulk-bar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.modal-foot .left { margin-right: 0; }
.modal-foot .left + .btn { margin-right: auto; }
.filters-bar { margin-bottom: 14px; }
.filters-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.filters-row > .field { margin: 0; }
.filters-more { position: relative; }
.filters-more > summary { list-style: none; min-height: 44px; }
.filters-more > summary::-webkit-details-marker { display: none; }
.filters-more[open] > summary { background: var(--tint); }
.filters-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; width: min(760px, calc(100vw - 32px)); display: grid; gap: 12px; box-shadow: 0 18px 40px -18px rgba(16, 21, 18, 0.45); }
body:has(.bulk-bar) .fab { display: none !important; }
.margin-cell { display: inline-flex; align-items: center; gap: 6px; }
.dot-light { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot-light.green { background: var(--ok); }
.dot-light.yellow { background: var(--watch); }
.dot-light.red { background: var(--rec); }
.kpis.kpis-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
details.more-kpis { margin-top: 10px; }
details.more-kpis > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; }
details.more-kpis > summary::-webkit-details-marker { display: none; }
details.more-kpis > summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 14px; }
details.more-kpis[open] > summary::before { content: '−'; }
details.more-kpis > summary .muted { font-weight: 400; font-size: 13px; }

/* =====================================================================
   REDISEÑO · etapa 4: legibilidad y áreas de toque
   ===================================================================== */
.kpi small, table.data th, .pill, .tag, .eyebrow, .chip .k, .flow .split small, .trio dt, .home-trio dt { font-size: 11.5px; }
.eyebrow { letter-spacing: 0.12em; }
.sidebar-foot select, .sidebar-foot button { min-height: 40px; font-size: 13px; }
.sidebar .brand .brand-name span { font-size: 11px; }
@media (pointer: coarse) {
  .sidebar-foot select, .sidebar-foot button, .tabs a, .tabs button, .chip, details.more summary, .section-tabs a { min-height: 44px; }
  .check input { width: 22px; height: 22px; }
}
.muted, .small.muted, .kpi .s { color: var(--muted); }

/* =====================================================================
   NEW LAND HUB · fase 1: entrada con contraseña, perfil y equipo
   ===================================================================== */
.hub-only .mobile-nav { grid-template-columns: repeat(3, 1fr); }
.hub-av { --s: 40px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--forest); color: var(--forest-ink); font-weight: 800; font-size: calc(var(--s) * 0.36); letter-spacing: -0.02em; }
.hub-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hub-me { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; color: inherit; text-decoration: none; transition: background var(--t); }
.hub-me:hover { background: rgba(243, 243, 243, 0.08); }
.hub-me > span:last-child { display: grid; min-width: 0; line-height: 1.2; }
.hub-me strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-me strong + span { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-me .hub-av { background: rgba(243, 243, 243, 0.14); color: #fff; }
.hub-form { display: grid; gap: 12px; }
.hub-form.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hub-form .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .hub-form.g2 { grid-template-columns: minmax(0, 1fr); } }
.hub-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding-top: 4px; cursor: pointer; }
.hub-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--forest); }
.hub-team { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 18px; }
.hub-person h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.hub-person.is-off { opacity: 0.6; }
.hub-mail { margin-top: 8px; overflow-wrap: anywhere; }
.hub-add { margin-bottom: 4px; }
.banner.warn { border-color: var(--watch); }
/* contraseña: mostrar / ocultar y lista de requisitos */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; }
.pw-eye[aria-pressed="true"], .pw-eye:hover { opacity: 1; }
.pw-checks { list-style: none; margin: -2px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.pw-checks li { display: flex; align-items: center; gap: 8px; color: rgba(243, 243, 243, 0.65); transition: color 200ms; }
.pw-checks li.ok { color: #fff; }
.pw-checks li.ok svg { color: #8CC49C; }

/* =====================================================================
   NEW LAND HUB · marco v2 — estética limpia (oct 2026)
   Barra de íconos + barra superior + tarjetas muy redondeadas sobre gris
   cálido, con la paleta de New Land: hueso, verde bosque, rojo REC solo
   como acento. Movimiento contenido (150–300 ms) y siempre con
   prefers-reduced-motion respetado.
   ===================================================================== */
:root {
  --hub-bg: #E9E9E5;
  --hub-card: rgba(255, 255, 255, 0.62);
  --hub-panel: #FFFFFF;
  --hub-line: rgba(39, 39, 39, 0.07);
  --hub-ink: #1F211F;
  --hub-muted: #737772;
  --hub-soft: rgba(31, 51, 37, 0.06);
  --hub-glow: rgba(255, 255, 255, 0.85);
  --hub-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 40px -30px rgba(31, 51, 37, 0.45);
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 14px;
  --hub-acc: #1F3325;        /* estado seleccionado */
  --hub-acc-ink: #F3F3F3;
  --hub-acc-text: #1F3325;   /* texto verde sobre claro */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root[data-theme="dark"] {
  --hub-bg: #0E1310;
  --hub-card: rgba(27, 35, 30, 0.7);
  --hub-panel: #18201B;
  --hub-line: rgba(236, 236, 232, 0.08);
  --hub-ink: #ECECE8;
  --hub-muted: #9CA29E;
  --hub-soft: rgba(236, 236, 232, 0.06);
  --hub-glow: rgba(156, 203, 168, 0.12);
  --hub-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.8);
  --hub-acc: #9CCBA8; --hub-acc-ink: #0E1310; --hub-acc-text: #9CCBA8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hub-bg: #0E1310; --hub-card: rgba(27, 35, 30, 0.7); --hub-panel: #18201B; --hub-line: rgba(236, 236, 232, 0.08);
    --hub-ink: #ECECE8; --hub-muted: #9CA29E; --hub-soft: rgba(236, 236, 232, 0.06); --hub-glow: rgba(156, 203, 168, 0.12);
    --hub-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.8);
    --hub-acc: #9CCBA8; --hub-acc-ink: #0E1310; --hub-acc-text: #9CCBA8;
  }
}

/* --- base --- */
body.nl-hub {
  --radius: var(--r-md);
  --bone: var(--hub-bg);
  --grain-opacity: 0.035;
  background:
    radial-gradient(1200px 700px at 8% -10%, var(--hub-glow), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(31, 51, 37, 0.12), transparent 60%),
    radial-gradient(700px 500px at 105% 105%, rgba(209, 53, 10, 0.06), transparent 60%),
    var(--hub-bg);
  background-attachment: fixed;
  color: var(--hub-ink);
}
.nl-hub .app.hub-app { display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }

/* --- barra de íconos --- */
.rail { grid-row: 1 / -1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 26px 0 24px; gap: 8px; z-index: 40; }
.rail-logo { display: grid; place-items: center; width: 52px; height: 52px; color: var(--hub-ink); border-radius: 16px; transition: transform 220ms var(--spring); }
.rail-logo:hover { transform: rotate(-4deg) scale(1.04); }
.rail-logo svg { width: 30px; height: auto; }
.rail-nav { position: relative; display: flex; flex-direction: column; gap: 10px; margin-top: 52px; }
.rail-foot { margin-top: auto; }
.rail-btn, .round-btn, .tb-icon {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--hub-card); border: 1px solid var(--hub-line); color: var(--hub-ink); cursor: pointer;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 220ms var(--spring), background 200ms, color 200ms, box-shadow 200ms;
  text-decoration: none; padding: 0;
}
.rail-btn svg, .round-btn svg, .tb-icon svg { width: 20px; height: 20px; }
.rail-btn:hover, .round-btn:hover, .tb-icon:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 22px -14px rgba(31, 51, 37, 0.6); }
.rail-btn:active, .round-btn:active, .tb-icon:active, .pill-btn:active, .tb-me:active { transform: scale(0.92); transition-duration: 90ms; }
.rail-btn[aria-current="page"] { color: var(--hub-acc-ink); background: transparent; border-color: transparent; }
.rail-ind { position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--hub-acc); box-shadow: 0 10px 24px -12px rgba(31, 51, 37, 0.8); opacity: 0; transition: transform 380ms var(--spring), opacity 200ms; pointer-events: none; }
.rail-ind::after { content: ''; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 2px var(--hub-bg); }
.rail-btn.loading::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--ember); animation: railSpin 900ms linear infinite; }
@keyframes railSpin { to { transform: rotate(360deg); } }
/* etiquetas al pasar el cursor */
[data-label] { --tip-x: calc(100% + 12px); }
.rail-btn::after, .tb-icon::after, .tb-me::after, .round-btn::after {
  content: attr(data-label); position: absolute; left: var(--tip-x); top: 50%; white-space: nowrap; pointer-events: none;
  background: var(--hub-ink); color: var(--hub-bg); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 10px;
  opacity: 0; transform: translate(-4px, -50%); transition: opacity 160ms, transform 200ms var(--ease-out); z-index: 60;
}
.tb-icon::after, .tb-me::after, .round-btn::after { left: auto; right: 0; top: calc(100% + 8px); transform: translateY(-4px); }
.rail-btn:hover::after, .rail-btn:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.tb-icon:hover::after, .tb-me:hover::after, .round-btn:hover::after, .tb-icon:focus-visible::after, .round-btn:focus-visible::after { opacity: 1; transform: none; }

/* --- barra superior --- */
.topbar { grid-column: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 26px 36px 6px 6px; }
.tb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; letter-spacing: -0.02em; font-weight: 400; color: var(--hub-ink); }
.tb-brand b { font-weight: 800; }
.tb-iso { display: none; }
.tb-iso svg { width: 22px; height: auto; display: block; }
.theme-switch { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--hub-card); border: 1px solid var(--hub-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.theme-switch button { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--hub-muted); display: grid; place-items: center; cursor: pointer; transition: color 200ms, transform 220ms var(--spring); }
.theme-switch button svg { width: 18px; height: 18px; }
.theme-switch button[aria-pressed="true"] { color: var(--hub-ink); }
.theme-switch button:active { transform: scale(0.86); }
.ts-knob { position: absolute; top: 4px; left: 4px; width: 38px; height: 38px; border-radius: 50%; background: var(--hub-panel); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.35); transition: transform 360ms var(--spring); }
.theme-switch[data-on="light"] .ts-knob { transform: translateX(40px); }
.tb-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.tb-me { position: relative; display: block; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; line-height: 0; transition: transform 220ms var(--spring); box-shadow: 0 0 0 3px var(--hub-card); }
.tb-me .hub-av { display: grid; }
.tb-me:hover { transform: scale(1.05); }

/* --- área principal --- */
.nl-hub .hub-main { grid-column: 2; min-width: 0; padding: 18px 36px 120px 6px; }
.nl-hub .view { max-width: 1480px; }
.nl-hub .view:focus { outline: none; }
.hub-enter .rise, .nl-hub .view.hub-enter > .page-head, .nl-hub .view.hub-enter > .hub-team, .nl-hub .view.hub-enter > .grid { animation: hubRise 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes hubRise { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: none; } }
.fin-loading { display: grid; gap: 12px; max-width: 320px; padding: 60px 0; }
.fin-loading .cg-bar { background: var(--hub-soft); }

/* --- botones --- */
.pill-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 26px 0 22px; border-radius: 999px; background: var(--forest); color: #F3F3F3; text-decoration: none; font-weight: 600; font-size: 15.5px; border: 0; cursor: pointer; box-shadow: 0 14px 30px -16px rgba(31, 51, 37, 0.9); transition: transform 220ms var(--spring), background 200ms; }
.pill-btn:hover { background: var(--forest-2); transform: translateY(-1px); }
.pill-btn svg { color: #F3A487; }
.nl-hub .btn { border-radius: 999px; transition: transform 200ms var(--spring), background var(--t), border-color var(--t); }
.nl-hub .btn:active { transform: scale(0.95); }
.soon-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; background: var(--hub-soft); color: var(--hub-muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; vertical-align: middle; }
.soon-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }

/* --- Inicio --- */
.h2-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 44px; margin: 10px 0 30px; }
.h2-hello { flex: 1 1 380px; min-width: 0; }
.h2-stats { flex-wrap: wrap; row-gap: 14px; }
.h2-hello h1 { margin: 0; font-size: clamp(38px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.045em; font-weight: 700; }
.h2-hello h1 .l { font-weight: 300; }
.h2-hello p { margin: 12px 0 0; color: var(--hub-muted); font-size: 16px; }
.h2-stats { display: flex; gap: 44px; }
.h2-stat { display: grid; gap: 4px; }
.h2-stat span { font-size: 14px; color: var(--hub-muted); }
.h2-stat strong { font-size: clamp(32px, 3.2vw, 46px); font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.h2-stat strong::after { content: '↗'; font-size: 0.42em; vertical-align: top; margin-left: 4px; color: var(--hub-muted); }
.h2-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.h-assist { grid-row: span 1; }
.h-day { grid-column: span 2; }
.hcard {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); padding: 16px; background: var(--hub-card); border: 1px solid var(--hub-line);
  box-shadow: var(--hub-shadow); backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px) saturate(1.1);
  transition: transform 300ms var(--ease-out), box-shadow 300ms;
}
.hcard::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 300ms; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--hub-glow), transparent 65%); }
@media (hover: hover) {
  .hcard:hover { transform: translateY(-2px); box-shadow: var(--hub-shadow), 0 26px 50px -34px rgba(31, 51, 37, 0.55); }
  .hcard:hover::before { opacity: 1; }
}
.hc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 6px 6px 14px; }
.hc-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.hc-head p { margin: 3px 0 0; font-size: 13px; color: var(--hub-muted); }
.hpanel { background: var(--hub-panel); border-radius: var(--r-lg); padding: 18px; min-height: 140px; }
.hpanel.empty { display: grid; justify-items: start; align-content: center; gap: 12px; }
.hpanel.empty p { margin: 0; color: var(--hub-muted); max-width: 34ch; }
.e-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--hub-soft); color: var(--hub-acc-text); }
.e-ic svg { width: 22px; height: 22px; }
.e-ic.big { width: 72px; height: 72px; border-radius: 22px; }
.e-ic.big svg { width: 34px; height: 34px; }
/* asistente */
.hc-tabs { display: flex; gap: 8px; padding: 4px 4px 14px; }
.hc-tabs span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hub-line); color: var(--hub-muted); }
.hc-tabs span.on { background: var(--hub-panel); color: var(--hub-ink); }
.hc-tabs svg { width: 19px; height: 19px; }
.hc-tabs .hc-bot { margin-left: auto; background: var(--forest); color: #F3A487; border-color: transparent; }
.hpanel.chat { display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.bubble { align-self: flex-start; max-width: 92%; padding: 14px 16px; border-radius: 18px 18px 18px 6px; background: var(--hub-soft); font-size: 14.5px; line-height: 1.45; }
.bubble .t { display: block; margin-top: 10px; }
.chat-input { margin-top: auto; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px 0 20px; border-radius: 999px; border: 1px solid var(--hub-line); color: var(--hub-muted); cursor: not-allowed; }
.chat-input svg { width: 18px; height: 18px; }
/* tu día */
.hpanel.day { padding: 16px 18px 18px; min-height: 300px; display: grid; grid-template-rows: auto 1fr; }
.day-hours { display: grid; grid-template-columns: repeat(14, 1fr); font-size: 12px; color: var(--hub-muted); font-variant-numeric: tabular-nums; }
.day-hours, .day-lanes { margin-left: 20px; margin-right: 6px; }
.day-hours span { transform: translateX(-50%); }
.day-lanes { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); margin-top: 10px; min-height: 220px; }
.day-lanes > i { border-left: 1px dashed var(--hub-line); }
.day-now { position: absolute; top: -6px; bottom: 0; width: 0; border-left: 1.5px solid var(--hub-ink); transition: left 600ms var(--ease-out); }
.day-now::before { content: ''; position: absolute; top: 0; left: -4.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: nowPulse 2.4s ease-in-out infinite; }
.day-now span { position: absolute; top: -26px; left: 0; transform: translateX(-50%); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--hub-ink); color: var(--hub-bg); }
@keyframes nowPulse { 50% { box-shadow: 0 0 0 6px rgba(219, 29, 26, 0.18); } }
.day-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; width: min(420px, 86%); padding: 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--hub-panel) 86%, transparent); border: 1px dashed var(--hub-line); color: var(--hub-muted); font-size: 14px; text-align: center; backdrop-filter: blur(6px); }
/* equipo */
.hpanel.people { display: grid; gap: 14px; align-content: start; }
.av-stack { display: flex; }
.av-stack .hub-av { box-shadow: 0 0 0 3px var(--hub-panel); margin-right: -10px; transition: transform 220ms var(--spring); }
.av-stack .hub-av:hover { transform: translateY(-3px) scale(1.08); z-index: 1; }
.hub-av.more { background: var(--hub-soft); color: var(--hub-ink); }
.ppl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ppl li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--hub-line); }
.ppl li:last-child { border-bottom: 0; padding-bottom: 0; }
.ppl span { color: var(--hub-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl li > * { min-width: 0; }
.ppl strong { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl span { flex: 0 1 auto; }
/* finance y perfil */
.hpanel.fin { display: grid; align-content: center; gap: 6px; background: linear-gradient(135deg, var(--forest) 0%, #24402D 55%, #3B2B1E 100%); color: #F3F3F3; position: relative; overflow: hidden; }
.hpanel.fin::after { content: ''; position: absolute; right: -30%; top: -60%; width: 90%; height: 180%; background: radial-gradient(closest-side, rgba(234, 90, 44, 0.32), transparent); pointer-events: none; }
.hpanel.fin strong { font-size: clamp(30px, 2.8vw, 40px); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hpanel.fin .f-l, .hpanel.fin .f-s { font-size: 13px; color: rgba(243, 243, 243, 0.75); }
.hpanel.me { display: flex; align-items: center; gap: 16px; }
.hpanel.me div { display: grid; }
.hpanel.me span { color: var(--hub-muted); font-size: 14px; }
/* próximamente */
.soon-panel { display: flex; gap: 26px; align-items: flex-start; padding: 28px; }
.soon-panel h2 { margin: 6px 0 12px; font-size: 20px; letter-spacing: -0.02em; }
.soon-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.soon-panel li { display: flex; gap: 10px; align-items: flex-start; }
.soon-panel li svg { flex: none; margin-top: 4px; color: var(--ember); }

/* --- Equipo y perfil dentro del marco nuevo --- */
.nl-hub .page-head { border-bottom: 0; margin-bottom: 18px; padding-bottom: 0; }
.nl-hub .page-head h1 { font-weight: 700; letter-spacing: -0.045em; }
.nl-hub .card { border-radius: var(--r-lg); border-color: var(--hub-line); box-shadow: var(--hub-shadow); }
.nl-hub .card:not(.dark) { background: var(--hub-panel); }
.nl-hub .card.dark { overflow: hidden; }
.nl-hub .hub-person { transition: transform 300ms var(--ease-out), box-shadow 300ms; }
@media (hover: hover) { .nl-hub .hub-person:hover { transform: translateY(-2px); } }
.nl-hub .banner { border-radius: var(--r-md); }
.nl-hub input, .nl-hub select, .nl-hub textarea { border-radius: 12px; }

/* --- Finance dentro del Hub --- */
.fin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 20px; }
.fin-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--hub-card); border: 1px solid var(--hub-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: none; }
.fin-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--hub-muted); white-space: nowrap; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
.fin-tabs a:hover { color: var(--hub-ink); }
.fin-tabs a:active { transform: scale(0.94); }
.fin-tabs a[aria-current="page"] { background: var(--hub-acc); color: var(--hub-acc-ink); }
.fin-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--hub-muted); }
.fin-tools label[for="actor"], .fin-tools .local-note svg { display: none; }
.fin-tools .who-row { display: contents; }
.fin-tools select#actor { display: none; }
.fin-tools .row { display: contents; }
.fin-tools button { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hub-line); background: var(--hub-card); cursor: pointer; font-size: 13px; font-weight: 600; transition: transform 220ms var(--spring); }
.fin-tools button:active { transform: scale(0.94); }
.fin-tools button[disabled] { opacity: 0.45; }
.fin-tools p { margin: 0 !important; opacity: 1 !important; }
.fin-tools .local-note { display: inline; }
.nl-hub .section-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -6px 0 18px; padding: 0 0 2px; }
.nl-hub .section-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hub-line); text-decoration: none; font-weight: 600; font-size: 13px; color: var(--hub-muted); background: var(--hub-card); }
.nl-hub .section-tabs a[aria-current="page"] { background: var(--hub-ink); color: var(--hub-bg); border-color: var(--hub-ink); }
body.nl-hub:not([data-mod="finance"]) .fab { display: none !important; }
.nl-hub .fab { border-radius: 999px; }
.nl-hub .home-hero, .nl-hub .kpi, .nl-hub .table-wrap { border-radius: var(--r-lg); }

/* --- vibración en iPhone: interruptor nativo oculto --- */
.haptic-switch { position: fixed; left: -100px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* --- celular --- */
.nl-hub .mobile-nav { display: none; }
@media (max-width: 900px) {
  .nl-hub .app.hub-app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { grid-column: 1; grid-template-columns: auto 1fr auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 4px; }
  .tb-iso { display: block; }
  .tb-brand { font-size: 16px; }
  .theme-switch { justify-self: end; transform: scale(0.88); }
  .tb-icon { display: none; }
  .nl-hub .hub-main { grid-column: 1; padding: 10px 16px calc(120px + env(safe-area-inset-bottom, 0px)); }
  .h2-head { gap: 18px; margin-bottom: 22px; }
  .h2-hello { flex-basis: 100%; }
  .h2-stats { gap: 28px; }
  .h2-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .h-day { grid-column: auto; }
  .hpanel.chat { min-height: 220px; }
  .hpanel.day { min-height: 240px; }
  .day-hours span:nth-child(even) { visibility: hidden; }
  .pill-btn { justify-self: start; min-height: 50px; }
  .soon-panel { flex-direction: column; padding: 22px; }
  .nl-hub .mobile-nav {
    display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 70;
    padding: 6px; border-radius: 26px; background: var(--hub-card); border: 1px solid var(--hub-line); box-shadow: 0 18px 40px -20px rgba(16, 21, 18, 0.5);
    backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  }
  .nl-hub .mobile-nav a { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 2px; border-radius: 20px; text-decoration: none; color: var(--hub-muted); font-size: 10.5px; font-weight: 700; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
  .nl-hub .mobile-nav a svg { width: 22px; height: 22px; }
  .nl-hub .mobile-nav a:active { transform: scale(0.9); }
  .nl-hub .mobile-nav a[aria-current="page"] { background: var(--hub-acc); color: var(--hub-acc-ink); }
  .nl-hub .mobile-nav a[aria-current="page"]::before { content: none; }
  .fin-bar { margin-bottom: 14px; }
  .fin-tools { display: none; }
  .nl-hub .fab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .nl-hub *, .nl-hub *::before, .nl-hub *::after { animation: none !important; transition-duration: 0ms !important; }
}

/* =====================================================================
   NEW LAND HUB · Fase 2: Tareas
   ===================================================================== */
.rail-btn[data-badge]::before, .mobile-nav a[data-badge]::before {
  content: attr(data-badge); position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--rec); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--hub-bg); z-index: 2;
  animation: badgeIn 360ms var(--spring) both;
}
.mobile-nav a { position: relative; }
.mobile-nav a[data-badge]::before { top: 2px; right: calc(50% - 22px); }
@keyframes badgeIn { from { transform: scale(0.3); opacity: 0; } }
.t-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.t-seg, .t-scope { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--hub-card); border: 1px solid var(--hub-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.t-seg a, .t-scope button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--hub-muted); white-space: nowrap; border: 0; background: transparent; cursor: pointer; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
.t-seg a:hover, .t-scope button:hover { color: var(--hub-ink); }
.t-seg a:active, .t-scope button:active { transform: scale(0.94); }
.t-seg a[aria-current="page"], .t-scope button[aria-pressed="true"] { background: var(--hub-acc); color: var(--hub-acc-ink); }
.t-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rec); color: #fff; font-size: 11px; font-weight: 800; }
.t-quick { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; margin-bottom: 22px; border-radius: 999px; background: var(--hub-panel); border: 1px solid var(--hub-line); box-shadow: var(--hub-shadow); transition: box-shadow 200ms, transform 220ms var(--spring); }
.t-quick:focus-within { box-shadow: var(--hub-shadow), 0 0 0 3px rgba(31, 51, 37, 0.18); }
.t-quick.pulse { animation: qPulse 480ms var(--spring); }
@keyframes qPulse { 40% { transform: scale(1.015); } }
.t-quick-ic { color: var(--ember); display: grid; }
.t-quick input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; outline: none; font-size: 16px; min-height: 40px; padding: 0 !important; box-shadow: none !important; color: var(--hub-ink); }
.t-quick .btn { min-height: 40px; }
/* lista */
.t-group { margin-bottom: 22px; }
.t-group h2, .t-group summary h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hub-muted); font-weight: 700; }
.t-group h2 span { font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 999px; background: var(--hub-soft); letter-spacing: 0; }
.t-group.overdue h2 { color: var(--rec); }
.t-group.done summary { list-style: none; cursor: pointer; }
.t-group.done summary::-webkit-details-marker { display: none; }
.t-list { display: grid; gap: 8px; }
.t-row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 14px 10px 12px; border-radius: 18px; background: var(--hub-panel); border: 1px solid var(--hub-line); cursor: pointer; transition: transform 240ms var(--spring), box-shadow 200ms, opacity 300ms; }
.t-row:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -20px rgba(31, 51, 37, 0.6); }
.t-row:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.t-row.is-done .t-title { text-decoration: line-through; color: var(--hub-muted); }
.t-row.is-pending { opacity: 0.6; }
.t-title { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.t-check { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--hub-ink) 35%, transparent); background: transparent; display: grid; place-items: center; color: transparent; cursor: pointer; transition: background 200ms, border-color 200ms, color 200ms, transform 240ms var(--spring); padding: 0; }
.t-check:hover { border-color: var(--forest); color: color-mix(in srgb, var(--forest) 45%, transparent); }
.t-check:active { transform: scale(0.82); }
.t-check.on { background: var(--hub-acc); border-color: var(--hub-acc); color: var(--hub-acc-ink); }
.t-check.sm { width: 22px; height: 22px; }
/* al completar: palomita que crece, tachado y la fila se va */
.completing .t-check { background: var(--hub-acc); border-color: var(--hub-acc); color: var(--hub-acc-ink); animation: chkPop 380ms var(--spring); }
.completing .t-title { text-decoration: line-through; color: var(--hub-muted); transition: color 200ms; }
.t-row.completing, .t-home-row.completing { animation: rowOut 420ms 160ms var(--ease-out) forwards; }
@keyframes chkPop { 0% { transform: scale(0.7); } 60% { transform: scale(1.18); } }
@keyframes rowOut { to { opacity: 0; transform: translateX(14px); } }
.t-prio { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.t-prio.urgent { background: var(--rec); color: #fff; }
.t-prio.high { background: var(--tint-ember); color: var(--ember); }
.t-due, .t-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--hub-muted); padding: 3px 8px; border-radius: 999px; background: var(--hub-soft); white-space: nowrap; }
.t-due svg, .t-chk svg { width: 12px; height: 12px; }
.t-due.today { color: var(--hub-acc-text); background: color-mix(in srgb, var(--hub-acc) 14%, transparent); }
.t-due.late { color: var(--rec); background: var(--tint-bad); }
.t-chk.full { color: var(--hub-acc-text); }
.t-ppl { display: inline-flex; }
.t-ppl .hub-av { box-shadow: 0 0 0 2px var(--hub-panel); margin-left: -6px; }
.t-ppl .hub-av:first-child { margin-left: 0; }
.t-empty { display: grid; justify-items: start; gap: 10px; padding: 34px; }
.t-empty h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.02em; }
.t-empty p { margin: 0; color: var(--hub-muted); max-width: 52ch; }
.t-inbox-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); margin: 0 9px; flex: none; }
/* tablero y por persona */
.t-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.t-col { display: flex; flex-direction: column; min-height: 320px; border-radius: var(--r-xl); background: var(--hub-card); border: 1px solid var(--hub-line); padding: 12px; scroll-snap-align: start; transition: background 200ms, box-shadow 200ms, transform 220ms var(--spring); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.t-col header { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.t-col header h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-count { font-size: 12px; font-weight: 700; color: var(--hub-muted); padding: 1px 8px; border-radius: 999px; background: var(--hub-soft); }
.t-col-add { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hub-line); background: var(--hub-panel); display: grid; place-items: center; cursor: pointer; color: var(--hub-ink); transition: transform 220ms var(--spring); }
.t-col-add:active { transform: scale(0.88); }
.t-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.s-todo { background: #8C918D; } .s-doing { background: var(--ember); } .s-review { background: #C9A227; } .s-done { background: var(--hub-acc); }
.t-col-body { display: grid; gap: 10px; align-content: start; flex: 1; }
.t-col-empty { margin: 0; padding: 20px 10px; text-align: center; color: var(--hub-muted); font-size: 13px; border: 1.5px dashed var(--hub-line); border-radius: 16px; }
.zone-over { background: color-mix(in srgb, var(--forest) 9%, var(--hub-card)) !important; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--forest) 45%, transparent); }
.zone-over.t-col { transform: scale(1.01); }
.t-card { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--hub-panel); border: 1px solid var(--hub-line); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 20px -18px rgba(31, 51, 37, 0.7); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform 240ms var(--spring), box-shadow 200ms, opacity 200ms; }
.t-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(31, 51, 37, 0.7); }
.t-card:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.t-card h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.t-card.is-done h3 { text-decoration: line-through; color: var(--hub-muted); }
.t-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.t-placeholder { opacity: 0.3; transform: scale(0.98); }
.t-ghost { position: fixed; z-index: 3000; pointer-events: none; margin: 0; box-shadow: 0 30px 60px -20px rgba(16, 21, 18, 0.55) !important; transition: none !important; cursor: grabbing; }
body.t-dragging, body.t-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.t-inline input { width: 100%; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--forest); background: var(--hub-panel); font-size: 15px; }
/* calendario */
.t-cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.t-cal { border-radius: var(--r-xl); background: var(--hub-card); border: 1px solid var(--hub-line); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.t-cal-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 14px; }
.t-cal-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.round-btn.sm { width: 38px; height: 38px; }
.round-btn.sm svg { width: 16px; height: 16px; }
.t-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.t-cal-wd { font-size: 12px; font-weight: 700; color: var(--hub-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 8px 4px; }
.t-day { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 108px; padding: 8px; border-radius: 16px; background: var(--hub-panel); border: 1px solid var(--hub-line); transition: background 200ms, box-shadow 200ms; min-width: 0; }
.t-day.out { opacity: 0.5; }
.t-day.is-today { box-shadow: inset 0 0 0 2px var(--hub-acc); }
.t-day-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-day.is-today .t-day-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rec); color: #fff; }
.t-day-add { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--hub-soft); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 160ms; color: var(--hub-ink); }
.t-day:hover .t-day-add, .t-day-add:focus-visible { opacity: 1; }
@media (hover: none) { .t-day-add { opacity: 0.6; } }
.t-pill { display: block; width: 100%; text-align: left; padding: 4px 8px; border-radius: 8px; border: 0; font-size: 12px; font-weight: 600; background: var(--hub-soft); color: var(--hub-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; touch-action: manipulation; border-left: 3px solid #8C918D; transition: transform 200ms var(--spring); }
.t-pill:active { transform: scale(0.96); }
.t-pill.p-urgent { border-left-color: var(--rec); } .t-pill.p-high { border-left-color: var(--ember); }
.t-pill.is-done { text-decoration: line-through; opacity: 0.6; }
.t-more { font-size: 11.5px; color: var(--hub-muted); padding-left: 4px; }
.t-nodate { padding: 16px; position: sticky; top: 16px; }
.t-nodate h2 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; }
.t-nodate h2 span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--hub-soft); }
.t-nodate .t-list { margin-top: 12px; gap: 6px; }
.t-nodate .t-pill { font-size: 13px; padding: 8px 10px; border-radius: 10px; }
/* Inicio */
.hpanel.t-home { display: grid; gap: 2px; padding: 10px; align-content: start; }
.t-home-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 14px; cursor: pointer; transition: background 200ms; }
.t-home-row:hover { background: var(--hub-soft); }
.t-home-row > div { display: grid; gap: 6px; min-width: 0; flex: 1; }
.t-home-row .t-title { white-space: normal; }
.t-home-row .t-meta { justify-content: flex-start; }
.t-home-row.overdue .t-check { border-color: var(--rec); }
.t-home-more { padding: 8px; font-size: 13px; font-weight: 600; }
/* panel de la tarea */
.t-drawer-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(16, 21, 18, 0); pointer-events: none; transition: background 260ms; }
.t-drawer-wrap.open { background: rgba(16, 21, 18, 0.28); pointer-events: auto; }
.t-drawer { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(520px, calc(100vw - 24px)); overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px 28px; border-radius: 28px; background: var(--hub-panel); color: var(--hub-ink); box-shadow: 0 40px 80px -30px rgba(16, 21, 18, 0.6); transform: translateX(calc(100% + 24px)); transition: transform 300ms var(--ease-out); }
.t-drawer-wrap.open .t-drawer { transform: none; }
.t-dr-top { display: flex; align-items: center; gap: 12px; }
.t-dr-state { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--hub-muted); text-transform: uppercase; letter-spacing: 0.08em; transition: color 200ms; }
.t-dr-state[data-saved]::after { content: ' · Guardado'; color: var(--hub-acc-text); }
.t-dr-title { width: 100%; min-height: 0; margin: 14px 0 16px; border: 0 !important; background: transparent !important; resize: none; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; padding: 0 !important; color: var(--hub-ink); overflow: hidden; box-shadow: none !important; }
.t-dr-title:focus { outline: none; }
.t-dr-grid { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.t-dr-l, .t-dr-h { font-size: 12.5px; font-weight: 700; color: var(--hub-muted); }
.t-dr-h { display: flex; gap: 8px; align-items: center; margin: 22px 0 10px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11.5px; }
.t-drawer select, .t-drawer input[type="date"] { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); max-width: 100%; }
.t-dr-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.t-dr-seg button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hub-line); background: transparent; font-size: 13px; font-weight: 600; color: var(--hub-muted); cursor: pointer; transition: background 200ms, color 200ms, transform 200ms var(--spring); }
.t-dr-seg button[aria-checked="true"] { background: var(--hub-acc); color: var(--hub-acc-ink); border-color: var(--hub-acc); }
.t-dr-seg button:active { transform: scale(0.92); }
.t-dr-collab { display: flex; flex-wrap: wrap; gap: 6px; }
.t-chip-p { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--hub-line); background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--hub-muted); transition: background 200ms, color 200ms; }
.t-chip-p[aria-pressed="true"] { background: var(--hub-soft); color: var(--hub-ink); border-color: var(--forest); }
.t-dr-date { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t-dr-notes, .t-dr-comment textarea { width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); resize: vertical; font-size: 15px; line-height: 1.45; }
.t-dr-check { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.t-dr-check li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 6px; border-radius: 12px; }
.t-dr-check li:hover { background: var(--hub-soft); }
.t-dr-check li span { flex: 1; }
.t-dr-check li.on span { text-decoration: line-through; color: var(--hub-muted); }
.t-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: var(--hub-muted); cursor: pointer; opacity: 0.6; }
.t-x:hover { opacity: 1; background: var(--hub-soft); }
.t-dr-add input { width: 100%; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--hub-line); background: transparent; }
.t-dr-comments { display: grid; gap: 14px; margin-bottom: 12px; }
.t-cm { display: flex; gap: 10px; }
.t-cm > div { flex: 1; min-width: 0; }
.t-cm-h { display: flex; align-items: center; gap: 8px; }
.t-cm-h .t-x { margin-left: auto; width: 28px; height: 28px; }
.t-cm p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.t-dr-comment { display: grid; gap: 8px; justify-items: end; }
.t-dr-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--hub-line); }
@media (max-width: 900px) {
  .t-board { grid-template-columns: repeat(var(--cols), 82%); }
  .t-cal-wrap { grid-template-columns: minmax(0, 1fr); }
  .t-day { min-height: 74px; padding: 5px; border-radius: 12px; }
  .t-pill { font-size: 10.5px; padding: 3px 5px; }
  .t-nodate { position: static; }
  .t-row { flex-wrap: wrap; }
  .t-title { white-space: normal; }
  .t-meta { width: 100%; justify-content: flex-start; padding-left: 42px; }
  .t-meta:empty { display: none; }
  .t-drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 28px 28px 0 0; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); }
  .t-dr-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .t-dr-l { margin-top: 8px; }
  .t-quick .btn { display: none; }
}

/* =====================================================================
   NEW LAND HUB · ventanita de cuenta (al tocar la foto)
   ===================================================================== */
.me-wrap { position: fixed; inset: 0; z-index: 950; pointer-events: none; background: rgba(16, 21, 18, 0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: background 220ms, backdrop-filter 220ms, -webkit-backdrop-filter 220ms; }
.me-wrap.open { pointer-events: auto; background: rgba(16, 21, 18, 0.16); backdrop-filter: blur(10px) saturate(0.9); -webkit-backdrop-filter: blur(10px) saturate(0.9); }
/* la foto queda nítida y encima, para volver a tocarla y cerrar */
body.me-open .tb-me { position: relative; z-index: 960; box-shadow: 0 0 0 3px var(--hub-panel), 0 0 0 5px var(--hub-acc); }
body.me-open .tb-me::after { opacity: 0 !important; }
.me-pop {
  position: absolute; top: 80px; right: 28px; width: min(380px, calc(100vw - 24px)); padding: 14px; border-radius: 28px;
  background: var(--hub-panel); color: var(--hub-ink); border: 1px solid var(--hub-line); box-shadow: 0 40px 80px -30px rgba(16, 21, 18, 0.55);
  transform-origin: calc(100% - 22px) -8px; opacity: 0; transform: scale(0.9) translateY(-8px); transition: opacity 180ms, transform 320ms var(--spring);
}
.me-wrap.open .me-pop { opacity: 1; transform: none; }
.mp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 10px 10px; font-size: 13px; color: var(--hub-muted); }
.mp-top b { color: var(--hub-ink); font-weight: 600; }
.mp-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--hub-soft); color: var(--hub-ink); display: grid; place-items: center; cursor: pointer; transition: transform 220ms var(--spring); }
.mp-x:active { transform: scale(0.88); }
.mp-id { display: flex; align-items: center; gap: 16px; padding: 18px 16px; border-radius: 22px; background: var(--hub-bg); }
.mp-av { position: relative; flex: none; cursor: pointer; border-radius: 50%; transition: transform 240ms var(--spring); }
.mp-av:hover { transform: scale(1.04); }
.mp-av:active { transform: scale(0.95); }
.mp-av.busy { opacity: 0.5; animation: avBusy 1s ease-in-out infinite alternate; }
@keyframes avBusy { to { opacity: 0.85; } }
.mp-pen { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--hub-panel); color: var(--hub-ink); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.3); }
.mp-av:focus-within .mp-pen, #mp-photo:focus-visible + .mp-who { outline: none; }
#mp-photo:focus-visible ~ * { outline: none; }
.mp-who { display: grid; gap: 2px; min-width: 0; }
.mp-who strong { font-size: 19px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.mp-who span { font-size: 13.5px; color: var(--hub-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-who .mp-role { color: var(--hub-ink); font-weight: 500; }
.mp-pass { display: flex; align-items: center; gap: 6px; margin: 10px 8px 4px; font-size: 12.5px; color: var(--hub-muted); }
.mp-pass.warn { color: var(--watch); font-weight: 600; }
.mp-actions { display: grid; gap: 2px; margin: 8px 0; }
.mp-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 12px; border-radius: 16px; border: 0; background: transparent; color: var(--hub-ink); text-decoration: none; font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; transition: background 180ms, transform 220ms var(--spring); }
.mp-link span { flex: 1; }
.mp-link svg { width: 20px; height: 20px; }
.mp-link svg:last-child { width: 16px; height: 16px; color: var(--hub-muted); transition: transform 220ms var(--spring); }
.mp-link:hover { background: var(--hub-soft); }
.mp-link:hover svg:last-child { transform: translateX(3px); }
.mp-link:active { transform: scale(0.97); }
.mp-out { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border-radius: 999px; border: 1px solid var(--hub-line); background: transparent; color: var(--hub-ink); font-weight: 600; cursor: pointer; transition: background 180ms, border-color 180ms, transform 220ms var(--spring); }
.mp-out svg { width: 18px; height: 18px; }
.mp-out:hover { border-color: var(--rec); color: var(--rec); }
.mp-out:active { transform: scale(0.97); }
.nl-hub .mobile-nav button { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 6px 2px; border-radius: 20px; border: 0; background: transparent; color: var(--hub-muted); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; position: relative; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
.nl-hub .mobile-nav button svg { width: 22px; height: 22px; }
.nl-hub .mobile-nav button[aria-expanded="true"], .nl-hub .mobile-nav button[aria-current="page"] { background: var(--hub-acc); color: var(--hub-acc-ink); }
@media (max-width: 900px) {
  .me-pop { top: auto; right: 12px; left: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: auto; transform-origin: calc(100% - 40px) 110%; transform: scale(0.92) translateY(14px); }
  body.me-open .nl-hub .mobile-nav, body.me-open .mobile-nav { z-index: 960; }
}
@media (prefers-reduced-motion: reduce) { .me-pop, .me-wrap { transition: none !important; } }

/* --- fotos: siempre círculo exacto --- */
.hub-av img { border-radius: 50%; }
.mp-av { display: block; line-height: 0; }

/* =====================================================================
   NEW LAND HUB · "Ajusta tu foto" (recortar y acercar)
   ===================================================================== */
.crop-wrap { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(16, 21, 18, 0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: background 220ms, backdrop-filter 220ms, -webkit-backdrop-filter 220ms; }
.crop-wrap.open { background: rgba(16, 21, 18, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.crop-card { width: min(420px, 100%); padding: 18px; border-radius: 30px; background: var(--hub-panel); color: var(--hub-ink); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6); opacity: 0; transform: scale(0.94) translateY(10px); transition: opacity 180ms, transform 320ms var(--spring); }
.crop-wrap.open .crop-card { opacity: 1; transform: none; }
.crop-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 14px 6px; }
.crop-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 22px; background: #0E1310; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage.grabbing { cursor: grabbing; }
.crop-stage:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
/* círculo de vista previa: todo lo de afuera se oscurece */
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(14, 19, 16, 0.58), inset 0 0 0 2px rgba(255, 255, 255, 0.85); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 12px; padding: 16px 6px 4px; color: var(--hub-muted); }
.crop-zoom svg { width: 20px; height: 20px; display: block; }
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--hub-acc); height: 28px; }
.crop-tip { margin: 6px 6px 14px; font-size: 13px; color: var(--hub-muted); }
.crop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.crop-actions .btn { min-height: 46px; padding: 0 20px; }
@media (prefers-reduced-motion: reduce) { .crop-card, .crop-wrap { transition: none !important; } }

/* =====================================================================
   NEW LAND HUB · Fase 3: Clientes y proyectos
   ===================================================================== */
.c-health { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--hub-soft); color: var(--hub-ink); white-space: nowrap; vertical-align: middle; }
.c-health i { width: 8px; height: 8px; border-radius: 50%; background: #8C918D; }
.c-health.h-ok i { background: #3E9B5C; }
.c-health.h-risk { background: var(--tint-ember); color: var(--ember); } .c-health.h-risk i { background: var(--ember); }
.c-health.h-stopped { background: var(--tint-bad); color: var(--rec); } .c-health.h-stopped i { background: var(--rec); }
.c-health.h-paused i, .c-health.h-archived i { background: #8C918D; }
.c-status { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hub-line); color: var(--hub-muted); white-space: nowrap; vertical-align: middle; }
.c-status.s-active { color: var(--hub-acc-text); border-color: color-mix(in srgb, var(--hub-acc) 40%, transparent); }
.c-risk-n { color: var(--ember); }
.c-fin-banner { align-items: center; }
.c-fin-banner > span { display: inline-flex; align-items: center; gap: 8px; }
.c-fin-banner > span > span { display: inline; }
.c-fin-banner svg, .c-fin svg, .c-fin-link svg { width: 18px; height: 18px; }
.c-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; margin-bottom: 16px; }
.c-add input, .c-add select { flex: 1 1 200px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hub-line); background: var(--hub-panel); font-size: 15px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.c-card { display: grid; gap: 8px; padding: 18px; text-decoration: none; color: inherit; min-height: 170px; align-content: start; }
.c-card h3 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.c-card-top { display: flex; justify-content: space-between; align-items: center; }
.c-fin { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hub-soft); color: var(--hub-muted); }
.c-card-meta { margin: 0; font-size: 13.5px; color: var(--hub-muted); }
.c-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; min-height: 30px; }
/* lista de proyectos */
.c-plist { display: grid; gap: 8px; }
.c-prow { display: grid; grid-template-columns: minmax(0, 2.2fr) auto auto minmax(120px, 1fr) minmax(90px, 0.8fr) 30px; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; background: var(--hub-panel); border: 1px solid var(--hub-line); text-decoration: none; color: inherit; transition: transform 240ms var(--spring), box-shadow 200ms; }
.c-prow:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -20px rgba(31, 51, 37, 0.6); }
.c-prow-name { display: grid; min-width: 0; }
.c-prow-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-prow-name span { font-size: 13px; color: var(--hub-muted); }
.c-dates { font-size: 13px; color: var(--hub-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-dates.late { color: var(--rec); font-weight: 600; }
.c-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--hub-muted); font-variant-numeric: tabular-nums; }
.c-prog > span { display: block; width: 60px; height: 6px; border-radius: 999px; background: var(--hub-soft); overflow: hidden; }
.c-prog i { display: block; height: 100%; background: var(--hub-acc); border-radius: 999px; transition: width 500ms var(--ease-out); }
.ps-planning { background: #8C918D; } .ps-active { background: var(--ember); } .ps-delivered { background: var(--hub-acc); } .ps-paused { background: #C9A227; }
.c-pcard h3 { margin-top: 2px; }
/* calendario de proyectos */
.c-legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.c-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg-due { background: var(--forest); } .lg-start { border: 1.5px dashed var(--hub-muted); }
.c-pill { display: block; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-pill.due { background: var(--hub-acc); color: var(--hub-acc-ink); cursor: grab; touch-action: manipulation; }
.c-pill.due.h-risk { background: var(--ember); color: #fff; } .c-pill.due.h-stopped { background: var(--rec); color: #fff; }
.c-pill.start { border: 1.5px dashed color-mix(in srgb, var(--hub-ink) 30%, transparent); color: var(--hub-muted); }
/* línea de tiempo */
.c-tl { padding: 16px; }
.c-tl-scroll { overflow-x: auto; }
.c-tl-grid { position: relative; min-width: 860px; --name: 200px; }
.c-tl-weeks, .c-tl-row { display: grid; grid-template-columns: var(--name) repeat(var(--weeks), minmax(0, 1fr)); }
.c-tl-weeks { font-size: 12px; color: var(--hub-muted); padding-bottom: 8px; border-bottom: 1px solid var(--hub-line); }
.c-tl-weeks span { padding-left: 6px; border-left: 1px dashed var(--hub-line); }
.c-tl-weeks span:first-child { border-left: 0; }
.c-tl-client { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hub-muted); }
.c-tl-row { grid-template-columns: var(--name) minmax(0, 1fr); align-items: center; min-height: 42px; }
.c-tl-name { font-size: 14px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
.c-tl-track { position: relative; height: 34px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--weeks) - 1px), var(--hub-line) calc(100% / var(--weeks) - 1px) calc(100% / var(--weeks))); border-radius: 8px; }
.c-tl-bar { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 3px; border-radius: 12px; background: var(--hub-acc); color: var(--hub-acc-ink); font-size: 12px; font-weight: 700; text-decoration: none; overflow: hidden; white-space: nowrap; min-width: 28px; box-shadow: 0 6px 16px -10px rgba(16, 21, 18, 0.6); transition: transform 220ms var(--spring), filter 200ms; }
.c-tl-bar:hover { transform: translateY(-1px); filter: brightness(1.05); }
.c-tl-bar.s-planning { background: color-mix(in srgb, var(--hub-acc) 35%, var(--hub-panel)); color: var(--hub-ink); }
.c-tl-bar.s-delivered { opacity: 0.55; }
.c-tl-bar.h-risk { background: var(--ember); color: #fff; } .c-tl-bar.h-stopped { background: var(--rec); color: #fff; }
.c-tl-bar.cut-s { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.c-tl-bar.cut-e { border-top-right-radius: 2px; border-bottom-right-radius: 2px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.c-tl-bar .hub-av { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
.c-tl-today { position: absolute; top: 0; bottom: 0; left: calc(var(--name) + (100% - var(--name)) * var(--x)); width: 0; border-left: 1.5px solid var(--rec); pointer-events: none; }
.c-tl-today::before { content: ''; position: absolute; top: -3px; left: -4.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); }
/* ficha del cliente y página del proyecto */
.c-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--hub-muted); text-decoration: none; transition: color 200ms; }
.c-back svg { width: 18px; height: 18px; transition: transform 220ms var(--spring); }
.c-back:hover { color: var(--hub-ink); }
.c-back:hover svg { transform: translateX(-3px); }
input.c-title { width: 100%; min-height: 0; height: auto; border: 0 !important; background: transparent !important; padding: 0 4px !important; margin-left: -4px; font-size: clamp(34px, 4vw, 54px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; color: var(--hub-ink); border-radius: 10px !important; box-shadow: none !important; }
input.c-title:hover { background: var(--hub-soft) !important; }
input.c-title:focus { outline: none; background: var(--hub-soft) !important; box-shadow: inset 0 -2px 0 var(--hub-acc) !important; }
.client-page .h2-hello p, .project-page .h2-hello p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.c-fin-link { display: inline-flex; align-items: center; gap: 4px; }
.c-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.c-main, .c-side { display: grid; gap: 20px; min-width: 0; }
.c-sec .hpanel { min-height: 0; }
.c-sec .hc-head { align-items: center; }
.c-pgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.c-pgroup h3 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hub-muted); }
.c-pgroup h3 span { padding: 1px 7px; border-radius: 999px; background: var(--hub-soft); letter-spacing: 0; }
.c-pmini { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; margin-bottom: 8px; border-radius: 16px; border: 1px solid var(--hub-line); text-decoration: none; color: inherit; transition: transform 240ms var(--spring), background 200ms; }
.c-pmini:hover { transform: translateY(-1px); background: var(--hub-soft); }
.c-pmini > span:first-child { display: grid; gap: 2px; flex: 1 1 100%; min-width: 0; }
.c-pmini strong { font-size: 14.5px; overflow-wrap: anywhere; }
.c-notes { width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); resize: vertical; font-size: 15px; line-height: 1.5; }
.c-notes-ro { margin: 0; white-space: pre-wrap; }
.c-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-contacts li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--hub-line); }
.c-contacts li:last-child { border-bottom: 0; padding-bottom: 0; }
.c-contacts li > span { font-size: 13px; color: var(--hub-muted); }
.c-ct-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.c-ct-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; font-size: 13.5px; color: var(--hub-ink); }
.c-ct-links svg { width: 15px; height: 15px; color: var(--hub-muted); }
.c-ct-form { display: grid; gap: 10px; }
.c-ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border: 0; margin: 0; padding: 0 0 10px; border-bottom: 1px solid var(--hub-line); }
.c-ct-row input { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--hub-line); background: var(--hub-bg); font-size: 14px; min-width: 0; }
.c-ct-form .btn { justify-self: start; }
.c-dates-list, .c-activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.c-dates-list li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.c-dates-list .t-due { flex: none; min-width: 64px; justify-content: center; }
.c-activity li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.c-activity li > span { display: inline-flex; gap: 6px; align-items: baseline; }
.c-activity svg { width: 12px; height: 12px; flex: none; color: var(--hub-muted); }
.c-del { justify-self: start; }
.c-props { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.c-props select, .c-props input[type="date"] { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); max-width: 100%; }
.c-props .t-dr-seg button[disabled], .c-props .t-chip-p[disabled] { opacity: 0.6; cursor: default; }
.c-fin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c-fin-stats > div { display: grid; gap: 2px; position: relative; z-index: 1; }
.c-fin-stats strong { font-size: 22px; }
.c-link { display: flex; gap: 8px; flex-wrap: wrap; }
.c-link select { flex: 1 1 180px; min-height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-bg); }
.p-ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--hub-acc) calc(var(--p) * 1%), var(--hub-soft) 0); position: relative; flex: none; }
.p-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--hub-bg); }
.p-ring span { position: relative; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.t-proj { display: inline-flex; align-items: center; gap: 4px; max-width: 200px; font-size: 12px; font-weight: 600; color: var(--hub-muted); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--hub-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-proj svg { width: 12px; height: 12px; flex: none; }
.t-drawer optgroup { font-weight: 700; }
@media (max-width: 1100px) {
  .c-cols { grid-template-columns: minmax(0, 1fr); }
  .c-prow { grid-template-columns: minmax(0, 1fr) auto; }
  .c-prow-dates, .c-prow-prog, .c-prow-lead, .c-prow .c-status { display: none; }
}
@media (max-width: 700px) {
  .c-pgroups { grid-template-columns: minmax(0, 1fr); }
  .c-ct-row { grid-template-columns: minmax(0, 1fr); }
  .c-tl-grid { --name: 130px; }
}

/* =====================================================================
   NEW LAND HUB · Fase 4: Contenidos
   ===================================================================== */
/* color de cada estado (se usa en puntos, etiquetas, píldoras y barras) */
.st-idea { --st: #8C918D; }
.st-script { --st: color-mix(in srgb, var(--forest) 40%, #8C918D); }
.st-production { --st: var(--ember); }
.st-editing { --st: color-mix(in srgb, var(--ember) 55%, #C9A227); }
.st-review { --st: #C9A227; }
.st-scheduled { --st: color-mix(in srgb, var(--hub-acc) 55%, #8C918D); }
.st-published { --st: var(--hub-acc); }
.st-on_hold { --st: transparent; }
.t-dot[class*="st-"] { background: var(--st); }
.t-dot.st-on_hold, .k-dot.st-on_hold { box-shadow: inset 0 0 0 1.5px #8C918D; }
.k-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--st) 16%, transparent); color: var(--hub-ink); white-space: nowrap; vertical-align: middle; }
.k-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--st); flex: none; }
.k-status.st-on_hold { background: var(--hub-soft); color: var(--hub-muted); } .k-status.st-on_hold i { box-shadow: inset 0 0 0 1.5px #8C918D; }
.k-type { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hub-line); color: var(--hub-muted); white-space: nowrap; }
.k-flag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.k-flag.crit { background: var(--tint-bad); color: var(--rec); }
.k-flag.warn { background: color-mix(in srgb, #C9A227 18%, transparent); color: color-mix(in srgb, #C9A227 60%, var(--hub-ink)); }
.k-plats { display: inline-flex; align-items: center; gap: 3px; color: var(--hub-muted); }
.k-plats span { display: inline-grid; place-items: center; }

/* cambiar de cliente */
.k-switch { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin: -4px 0 18px; scroll-snap-type: x proximity; }
.k-switch::-webkit-scrollbar { display: none; }
.k-switch a { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hub-line); background: var(--hub-card); color: var(--hub-muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; scroll-snap-align: start; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background 200ms, color 200ms, border-color 200ms, transform 220ms var(--spring); }
.k-switch a:hover { color: var(--hub-ink); }
.k-switch a:active { transform: scale(0.94); }
.k-switch a[aria-current="page"] { background: var(--hub-acc); border-color: var(--hub-acc); color: var(--hub-acc-ink); }
.k-switch svg { width: 16px; height: 16px; }
.k-late-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rec); }

/* overview */
.k-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.k-stat { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-xl); background: var(--hub-card); border: 1px solid var(--hub-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.k-stat span { font-size: 13.5px; font-weight: 600; color: var(--hub-muted); }
.k-stat strong { font-size: clamp(30px, 3vw, 40px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.k-stat strong em { font-style: normal; font-size: 0.5em; color: var(--hub-muted); letter-spacing: 0; }
.k-stat small { font-size: 12px; color: var(--hub-muted); }
.k-stat.warn strong { color: color-mix(in srgb, #C9A227 70%, var(--hub-ink)); }
.k-stat.crit { border-color: color-mix(in srgb, var(--rec) 35%, transparent); }
.k-stat.crit strong { color: var(--rec); }
.k-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; margin-bottom: 18px; scroll-snap-type: x proximity; }
.k-cards::-webkit-scrollbar { display: none; }
.k-ccard { display: grid; gap: 10px; padding: 16px 18px; text-decoration: none; color: inherit; scroll-snap-align: start; align-content: start; }
.k-ccard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.k-ccard h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.k-next { margin: 0; display: grid; gap: 2px; min-height: 40px; font-size: 14px; }
.k-when { font-size: 12px; font-weight: 700; color: var(--hub-acc-text); }
.k-next-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-month { display: flex; align-items: center; gap: 10px; }
.k-month > span { flex: 1; height: 6px; border-radius: 999px; background: var(--hub-soft); overflow: hidden; }
.k-month i { display: block; height: 100%; border-radius: 999px; background: var(--hub-acc); transition: width 500ms var(--ease-out); }
.k-month small { font-size: 12px; font-weight: 600; color: var(--hub-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* vista por cliente: verde con sangrado de luz cálida */
.k-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 26px 28px; margin-bottom: 18px; border-radius: 28px; color: #F3F3F3;
  background: radial-gradient(120% 160% at 92% -30%, rgba(209, 53, 10, 0.42), transparent 52%), radial-gradient(80% 120% at 10% 130%, rgba(243, 243, 243, 0.10), transparent 60%), linear-gradient(135deg, #1F3325 0%, #15241A 100%);
  box-shadow: 0 24px 50px -34px rgba(16, 21, 18, 0.9); }
.k-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%); }
.k-hero-txt { position: relative; z-index: 1; display: grid; gap: 4px; min-width: 0; }
.k-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(243, 243, 243, 0.7); }
.k-hero h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; overflow-wrap: anywhere; }
.k-hero p { margin: 4px 0 0; font-size: 14.5px; color: rgba(243, 243, 243, 0.82); max-width: 70ch; }
.k-hero p strong { color: #FF8A84; }
.k-hero-act { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.k-hero .btn { background: rgba(243, 243, 243, 0.12); color: #F3F3F3; border-color: rgba(243, 243, 243, 0.22); }
.k-hero .btn:hover { background: rgba(243, 243, 243, 0.2); }
.k-hero .btn svg { width: 16px; height: 16px; }

/* nueva pieza */
.k-add input[name="title"] { flex: 3 1 280px; }
.k-add select, .k-add input[type="date"] { flex: 1 1 150px; color: var(--hub-ink); }

/* calendario de publicación */
.k-day { min-height: 118px; }
.k-pill { display: grid; gap: 2px; width: 100%; text-align: left; padding: 5px 8px 5px 7px; border-radius: 9px; border: 0; border-left: 3px solid var(--st); background: color-mix(in srgb, var(--st) 13%, var(--hub-panel)); color: var(--hub-ink); font: inherit; cursor: grab; touch-action: manipulation; transition: transform 200ms var(--spring), box-shadow 200ms; }
.k-pill:hover { box-shadow: 0 8px 18px -14px rgba(31, 51, 37, 0.8); }
.k-pill:active { transform: scale(0.96); }
.k-pill:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.k-pill.st-on_hold { border-left: 3px dashed #8C918D; background: var(--hub-soft); color: var(--hub-muted); }
.k-pill.st-published .k-pill-t span { color: var(--hub-muted); }
.k-pill.late { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rec) 55%, transparent); }
.k-pill-t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.25; }
.k-pill-t span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.k-dot { display: none; }
.k-pill-m { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; color: var(--hub-muted); }
.k-pill-m small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-pill-m .k-plats { margin-left: auto; }
button.t-more { border: 0; background: transparent; text-align: left; cursor: pointer; padding: 2px 4px; min-height: 24px; }
button.t-more:hover { color: var(--hub-ink); }
/* "Sin fecha" va debajo del calendario: así cada día tiene espacio para leer los títulos. */
.k-cal-wrap { grid-template-columns: minmax(0, 1fr); }
.k-cal-wrap .t-nodate { position: static; }
.k-cal-wrap .t-nodate .t-list { display: flex; flex-wrap: wrap; gap: 6px; }
.k-cal-wrap .t-nodate .k-pill { width: auto; max-width: 280px; padding: 8px 10px 8px 9px; }

/* tablero por estado */
.k-board { grid-template-columns: repeat(var(--cols), minmax(220px, 1fr)); }
.k-card.is-pub h3 { color: var(--hub-muted); }
.k-card .t-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.k-card .t-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* todo y por plataforma */
.k-table { display: grid; gap: 2px; padding: 8px; margin-bottom: 16px; }
.k-thead, .k-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 92px 128px 96px 140px 104px 84px; align-items: center; gap: 12px; padding: 0 12px; }
.k-thead { min-height: 34px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hub-muted); border-bottom: 1px solid var(--hub-line); margin-bottom: 4px; }
.k-row { min-height: 56px; width: 100%; text-align: left; font: inherit; color: inherit; border: 0; border-radius: 14px; background: transparent; cursor: pointer; transition: background 200ms, transform 220ms var(--spring); }
.k-row:hover { background: var(--hub-soft); }
.k-row:active { transform: scale(0.99); }
.k-row:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.k-row-name { display: grid; min-width: 0; }
.k-row-name strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-row-name span { font-size: 12.5px; color: var(--hub-muted); }
.k-row-d { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--hub-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-row-d svg { width: 13px; height: 13px; flex: none; }
.k-row-d.pub { color: var(--hub-ink); }
.k-row-d.late { color: var(--rec); font-weight: 600; }
.k-pgroup { margin-bottom: 8px; }
.k-pgroup > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; list-style: none; cursor: pointer; }
.k-pgroup > summary::-webkit-details-marker { display: none; }
.k-ptag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--hub-card); border: 1px solid var(--hub-line); font-size: 14px; font-weight: 700; }

/* producción: de la grabación a la publicación */
.lg-film { border: 1.5px solid var(--hub-muted); } .lg-pub { background: var(--hub-acc); border-radius: 50% !important; }
.k-tl .c-tl-name { border: 0; background: transparent; text-align: left; font: inherit; font-size: 14px; font-weight: 600; color: var(--hub-ink); cursor: pointer; }
.k-bar { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 6px; min-width: 18px; padding: 0 22px 0 3px; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--st) 30%, var(--hub-panel)); color: var(--hub-ink); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; cursor: pointer; transition: transform 200ms var(--spring), filter 200ms; }
.k-bar::after { content: ''; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 2px var(--hub-panel); }
.k-bar:hover { transform: translateY(-1px); filter: brightness(1.04); }
.k-bar.cut-s { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.k-bar.cut-e { border-top-right-radius: 2px; border-bottom-right-radius: 2px; }
.k-bar.cut-e::after { display: none; }
.k-bar .hub-av { box-shadow: 0 0 0 2px var(--hub-panel); }

/* panel de la pieza */
.k-drawer .t-dr-top .k-status { flex: none; }
.k-seg button { display: inline-flex; align-items: center; gap: 6px; }
.k-seg button .t-dot { width: 8px; height: 8px; }
.k-seg button[aria-checked="true"] .t-dot { box-shadow: 0 0 0 2px var(--hub-acc-ink); }
.k-drawer input[type="time"], .k-drawer input[type="url"] { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); max-width: 100%; }
.k-drawer [disabled], .k-drawer [readonly].t-dr-title { opacity: 0.65; cursor: default; }
.k-chip-pl { padding-left: 10px; }
.k-chip-pl svg { width: 16px; height: 16px; }
.k-link { display: flex; gap: 6px; align-items: center; min-width: 0; }
.k-link input { flex: 1; min-width: 0; }
.k-count { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.k-count.over { color: var(--rec); }

/* en la ficha del cliente */
.k-mini { display: grid; gap: 4px; }
.k-mini-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background 200ms; }
.k-mini-row:hover { background: var(--hub-soft); }
.k-mini-row.late .k-when { color: var(--rec); }
.k-mini-t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  .k-thead { display: none; }
  .k-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name st' 'pub pl'; row-gap: 4px; padding: 10px 12px; }
  .k-row-name { grid-area: name; } .k-row-st { grid-area: st; justify-self: end; } .k-row-d.pub { grid-area: pub; } .k-row-pl { grid-area: pl; justify-self: end; }
  .k-row-own, .k-row-d:not(.pub), .k-row-ty { display: none; }
}
@media (max-width: 700px) {
  .k-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .k-stat { padding: 12px 14px; border-radius: 20px; }
  .k-stat strong { font-size: 28px; }
  .k-stat small { display: none; }
  .k-hero { padding: 22px 20px; }
  .k-cal-wrap .t-cal-grid { gap: 3px; }
  .k-day { min-height: 76px; padding: 4px; }
  .k-pill { padding: 3px 5px; border-left-width: 2px; }
  .k-pill-m { display: none; }
  .k-mini-row { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .k-mini-row .k-plats { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .k-pill, .k-row, .k-bar, .k-switch a, .k-month i { transition: none !important; }
}
.k-drawer .t-dr-grid > .t-dr-l { align-self: start; padding-top: 11px; }
.nl-hub .mobile-nav a { min-width: 0; }
.nl-hub .mobile-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* agenda del mes (solo celular) */
.k-agenda { display: none; }
.k-ag-day { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--hub-line); }
.k-ag-day h3 { margin: 0 0 2px; font-size: 13px; font-weight: 800; color: var(--hub-muted); }
.k-ag-day.is-today h3 { color: var(--rec); }
.k-ag-day.past { opacity: 0.7; }
.k-ag-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; width: 100%; padding: 8px 10px 8px 12px; border: 0; border-left: 3px solid var(--st); border-radius: 12px; background: color-mix(in srgb, var(--st) 10%, var(--hub-panel)); text-align: left; font: inherit; color: var(--hub-ink); cursor: pointer; }
.k-ag-row.st-on_hold { border-left-style: dashed; border-left-color: #8C918D; }
.k-ag-row.late { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rec) 55%, transparent); }
.k-ag-row:active { transform: scale(0.98); }
.k-ag-t { display: grid; gap: 2px; min-width: 0; }
.k-ag-t strong { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.k-ag-t small { font-size: 12px; color: var(--hub-muted); }
@media (max-width: 700px) {
  .k-agenda { display: block; margin-top: 14px; }
  .k-cal .t-day-add { display: none; }
  .k-day { min-height: 52px; gap: 3px; }
  .k-day .k-pill { height: 6px; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: var(--st); overflow: hidden; pointer-events: none; }
  .k-day .k-pill.st-on_hold { background: #8C918D; opacity: 0.4; }
  .k-day .k-pill > * { display: none; }
  .k-day button.t-more { font-size: 10px; min-height: 0; padding: 0; }
}

/* =====================================================================
   NEW LAND HUB · Prospección
   ===================================================================== */
.pl-contact { background: #8C918D; } .pl-talking { background: color-mix(in srgb, var(--forest) 40%, #8C918D); }
.pl-proposal { background: #C9A227; } .pl-negotiation { background: var(--ember); }
.pl-won { background: var(--hub-acc); } .pl-lost { background: transparent; box-shadow: inset 0 0 0 1.5px #8C918D; }
.c-pipe { grid-template-columns: repeat(4, minmax(200px, 1fr)) repeat(2, minmax(170px, 0.8fr)); }
.c-pipe .t-col header { flex-wrap: wrap; row-gap: 2px; }
.c-col-end { background: transparent; border-style: dashed; }
.c-col-end .t-card { opacity: 0.85; }
.c-prio { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.c-prio.pr-high { background: var(--tint-bad); color: var(--rec); }
.c-prio.pr-medium { background: color-mix(in srgb, #C9A227 18%, transparent); color: color-mix(in srgb, #C9A227 60%, var(--hub-ink)); }
.c-prio.pr-low { background: var(--hub-soft); color: var(--hub-muted); }
.c-lead .t-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.c-lost-why { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-step { display: flex; gap: 6px; align-items: flex-start; margin: -2px 0 0; font-size: 13px; color: var(--hub-muted); line-height: 1.35; }
.c-step svg { flex: none; margin-top: 2px; }
.c-step.late { color: var(--rec); }
/* el monto es discreto: chico y gris, nunca compite con el nombre */
.c-val { font-size: 12px; font-weight: 600; color: var(--hub-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-val.sum { margin-left: auto; font-size: 11.5px; }
.c-val-sub { font-variant-numeric: tabular-nums; }
.c-stage-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--hub-soft); }
.c-stage-pill .t-dot { width: 8px; height: 8px; }
.c-pr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.c-pr-actions .btn svg { width: 14px; height: 14px; }
.c-next-card.late { border-color: color-mix(in srgb, var(--rec) 35%, transparent); }
.c-next-row { display: flex; flex-wrap: wrap; gap: 8px; }
.c-next-row input { min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); font-size: 15px; }
.c-step-in { flex: 1 1 260px; }
.c-val-in { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 6px; }
.c-val-in span { font-weight: 700; color: var(--hub-muted); }
.c-val-in input { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-ink); font-variant-numeric: tabular-nums; min-width: 0; }
.c-val-in small { grid-column: 1 / -1; font-size: 11.5px; color: var(--hub-muted); }
.c-pr-meta { margin: 0 4px; }
.t-proj.is-lead { border-style: dashed; }
@media (max-width: 700px) {
  .c-pr-actions { width: 100%; }
  .c-pr-actions .btn { flex: 1; justify-content: center; }
}

/* =====================================================================
   NEW LAND HUB · Fase 5: Recursos
   ===================================================================== */
.r-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.r-kinds button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--hub-muted); white-space: nowrap; cursor: pointer; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
.r-kinds button:hover { color: var(--hub-ink); }
.r-kinds button:active { transform: scale(0.94); }
.r-kinds button[aria-pressed="true"] { background: var(--hub-acc); color: var(--hub-acc-ink); }
.r-search { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: var(--hub-card); border: 1px solid var(--hub-line); color: var(--hub-muted); flex: 0 1 260px; }
.r-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 0; padding: 0 !important; font-size: 15px; color: var(--hub-ink); width: 100%; outline: none; }
.r-search:focus-within { border-color: var(--hub-acc); }
.r-path { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin: 0 0 14px; font-size: 13px; color: var(--hub-muted); }
.r-path svg, .r-path .r-btn { flex: none; }
.r-path code { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: var(--hub-soft); color: var(--hub-ink); overflow-wrap: anywhere; }
.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.r-card { position: relative; display: flex; align-items: stretch; border-radius: 20px; background: var(--hub-panel); border: 1px solid var(--hub-line); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 20px -18px rgba(31, 51, 37, 0.5); transition: transform 240ms var(--spring), box-shadow 240ms; }
.r-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(31, 51, 37, 0.7); }
.r-card.is-pin { border-color: color-mix(in srgb, var(--hub-acc) 35%, var(--hub-line)); }
.r-main { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; padding: 14px 4px 14px 14px; text-decoration: none; color: inherit; border-radius: 20px; }
.r-main:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }
.r-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--hub-soft); color: var(--hub-ink); }
.r-ic.k-music, .r-ic.k-sfx { background: var(--tint-ember); color: var(--ember); }
.r-ic.k-photos, .r-ic.k-footage, .r-ic.k-lut { background: color-mix(in srgb, var(--forest) 12%, transparent); color: var(--hub-acc-text); }
.r-ic.k-brand { background: var(--tint-bad); color: var(--rec); }
.r-ic.k-delivery { background: color-mix(in srgb, var(--hub-acc) 22%, transparent); color: var(--hub-acc-text); }
.r-txt { display: grid; gap: 2px; min-width: 0; }
.r-txt strong { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.r-txt small { font-size: 12.5px; color: var(--hub-muted); }
.r-notes { font-size: 13px; color: var(--hub-muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 2px; }
.r-acts { display: flex; align-items: flex-start; gap: 2px; padding: 10px 10px 0 0; }
.r-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--hub-muted); cursor: pointer; transition: background 200ms, color 200ms, transform 220ms var(--spring); }
.r-btn:hover { background: var(--hub-soft); color: var(--hub-ink); }
.r-btn:active { transform: scale(0.88); }
.r-btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.r-pin { display: grid; place-items: center; width: 28px; height: 36px; color: var(--hub-acc-text); }
/* formulario */
.r-form { padding: 18px 20px; margin-bottom: 16px; }
.r-form-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.r-form-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.r-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r-f { display: grid; gap: 6px; min-width: 0; }
.r-f-wide { grid-column: 1 / -1; }
.r-f > span { font-size: 12.5px; font-weight: 700; color: var(--hub-muted); }
.r-f input, .r-f select { min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--hub-line); background: var(--hub-panel); color: var(--hub-ink); font-size: 15px; min-width: 0; }
.r-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.r-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.r-check input { width: 18px; height: 18px; accent-color: var(--forest); }
.r-form-btns { margin-left: auto; display: flex; gap: 8px; }
/* en las fichas */
.r-panel { display: grid; gap: 10px; }
.r-panel .r-path { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.r-panel .r-path code { justify-self: start; }
.r-list { display: grid; gap: 6px; }
.r-list .r-card { box-shadow: none; border-radius: 16px; }
.r-list .r-card:hover { transform: none; background: var(--hub-soft); }
.r-list .r-main { padding: 8px 4px 8px 8px; align-items: center; border-radius: 16px; }
.r-list .r-ic { width: 34px; height: 34px; border-radius: 11px; }
.r-list .r-ic svg { width: 16px; height: 16px; }
.r-list .r-txt strong { font-size: 14px; }
.r-list .r-acts { padding: 0 6px 0 0; align-items: center; }
.r-add { justify-self: start; }
.r-add svg { width: 14px; height: 14px; }
@media (max-width: 700px) {
  .r-form-grid { grid-template-columns: minmax(0, 1fr); }
  .r-search { flex: 1 1 100%; }
  .r-form-btns { margin-left: 0; width: 100%; }
  .r-form-btns .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .r-card, .r-btn, .r-kinds button { transition: none !important; } }

/* ---------------------------------------------------------------- Dropbox conectado */
.dbx-banner > span { display: inline-flex; align-items: center; gap: 10px; }
.dbx-banner > span > span { display: inline; }
.dbx-banner svg { flex: none; }
.dbx-conn { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: 13px; color: var(--hub-muted); }
.dbx-box { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--hub-panel); border: 1px solid var(--hub-line); margin-bottom: 14px; }
.r-panel .dbx-box { margin-bottom: 0; }
.dbx-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dbx-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--hub-soft); color: var(--hub-acc-text); }
.dbx-crumbs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: 14px; color: var(--hub-muted); }
.dbx-crumbs::-webkit-scrollbar { display: none; }
.dbx-crumb { flex: none; border: 0; background: transparent; padding: 6px 6px; min-height: 32px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--hub-muted); cursor: pointer; white-space: nowrap; }
.dbx-crumb:last-of-type { color: var(--hub-ink); }
.dbx-crumb:hover { background: var(--hub-soft); }
.dbx-acts { display: flex; gap: 2px; flex: none; }
.dbx-acts label.r-btn { cursor: pointer; }
.dbx-acts svg { width: 16px; height: 16px; }
.dbx-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.dbx-folder { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--hub-ink); text-align: left; cursor: pointer; transition: background 200ms, transform 220ms var(--spring); }
.dbx-folder svg { flex: none; color: var(--hub-acc-text); }
.dbx-folder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-folder:hover { background: var(--hub-soft); }
.dbx-folder:active { transform: scale(0.97); }
.dbx-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.dbx-file { position: relative; }
.dbx-open { display: grid; gap: 4px; width: 100%; padding: 6px 6px 8px; border-radius: 14px; border: 1px solid var(--hub-line); background: transparent; font: inherit; color: var(--hub-ink); text-align: left; cursor: pointer; transition: background 200ms, transform 220ms var(--spring); }
.dbx-open:hover { background: var(--hub-soft); }
.dbx-open:active { transform: scale(0.97); }
.dbx-open img, .dbx-open .r-ic { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 10px; object-fit: cover; background: var(--hub-soft); }
.dbx-open .r-ic { display: grid; place-items: center; }
.dbx-fname { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-open small { font-size: 11px; color: var(--hub-muted); }
.dbx-sh { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; background: var(--hub-panel); box-shadow: 0 4px 12px -6px rgba(16, 21, 18, 0.5); opacity: 0; }
.dbx-file:hover .dbx-sh, .dbx-sh:focus-visible { opacity: 1; }
@media (hover: none) { .dbx-sh { opacity: 1; } }
.dbx-sh svg { width: 14px; height: 14px; }
.dbx-up { display: grid; gap: 6px; font-size: 13px; color: var(--hub-muted); }
.dbx-bar { display: block; height: 6px; border-radius: 999px; background: var(--hub-soft); overflow: hidden; }
.dbx-bar i { display: block; height: 100%; background: var(--hub-acc); border-radius: 999px; transition: width 200ms; }
.dbx-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; border-radius: 12px; background: var(--hub-soft); font-size: 13px; }
.dbx-share input { flex: 1 1 200px; min-width: 0; min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--hub-line); background: var(--hub-panel); font-size: 12.5px; color: var(--hub-ink); }
.dbx-err { margin: 0; color: var(--rec); }
.dbx-foot { margin: 0; font-size: 12.5px; color: var(--hub-muted); }
.dbx-link { border: 0; background: transparent; padding: 4px 0; font: inherit; color: var(--hub-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.dbx-link:hover { color: var(--hub-ink); }
.dbx-note { display: flex; gap: 6px; align-items: center; margin: 0; }
.dbx-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.dbx-choices code, .dbx-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .dbx-folder, .dbx-open, .dbx-bar i { transition: none !important; } }
.dbx-conn { flex-wrap: wrap; gap: 6px 14px; }
.dbx-conn > span { display: inline-flex; align-items: center; gap: 6px; }
.dbx-conn code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 2px 7px; border-radius: 7px; background: var(--hub-soft); color: var(--hub-ink); }
.dbx-root { border-color: color-mix(in srgb, var(--hub-acc) 40%, var(--hub-line)); }
.r-sub { margin: 4px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hub-muted); }

/* ---------------------------------------------------------------- logo remasterizado */
.logo-dot { fill: var(--rec); }
.cg-lockup svg { width: min(240px, 70%); height: auto; margin-bottom: 18px; }
.rail-logo svg { width: 28px; }
.tb-iso svg { width: 20px; }

/* ---------------------------------------------------------------- rendimiento al escribir y desplazarse
   El desenfoque de fondo en cada tarjeta y el grano "mezclado" sobre toda la pantalla obligaban al
   navegador (sobre todo Safari) a recalcular la pantalla entera con cada letra. Mismo look, sin ese costo:
   fondos sólidos equivalentes y grano en su propia capa sin mezcla. */
:root { --hub-card-solid: #F6F6F4; }
:root[data-theme="dark"] { --hub-card-solid: #171E1A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hub-card-solid: #171E1A; } }
.nl-hub .hcard, .nl-hub .t-seg, .nl-hub .t-scope, .nl-hub .t-col, .nl-hub .t-cal, .nl-hub .k-switch a, .nl-hub .k-stat,
.nl-hub .rail-btn, .nl-hub .round-btn, .nl-hub .tb-icon, .nl-hub .r-search, .nl-hub .k-ptag {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nl-hub .hcard, .nl-hub .t-seg, .nl-hub .t-scope, .nl-hub .t-col, .nl-hub .t-cal, .nl-hub .k-stat { background-color: var(--hub-card-solid); }
.nl-hub .k-switch a:not([aria-current="page"]), .nl-hub .rail-btn:not([aria-current="page"]), .nl-hub .round-btn, .nl-hub .tb-icon, .nl-hub .r-search { background-color: var(--hub-card-solid); }
body.nl-hub::after { mix-blend-mode: normal; opacity: 0.03; transform: translateZ(0); will-change: transform; }

/* =====================================================================
   NEW LAND HUB · Fase 6: Calendario
   ===================================================================== */
.calendar-mod .t-bar { align-items: center; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-nav h2 { margin: 0 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.cal-loading { margin-left: 6px; }
.cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; }
.cal-filters .t-scope { margin-left: auto; }
.cal-f { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hub-line); background: var(--hub-card-solid); font: inherit; font-size: 13px; font-weight: 600; color: var(--hub-muted); cursor: pointer; transition: opacity 200ms, transform 220ms var(--spring); }
.cal-f:active { transform: scale(0.94); }
.cal-f[aria-pressed="false"] { opacity: 0.5; text-decoration: line-through; }
.cal-f i { width: 9px; height: 9px; border-radius: 50%; }
.cal-f-meetings i { background: var(--hub-acc); } .cal-f-tasks i { background: #8C918D; } .cal-f-content i { background: var(--ember); } .cal-f-projects i { background: var(--rec); }
/* piezas */
.cal-chip { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 7px; border-radius: 8px; border: 0; font: inherit; font-size: 11.5px; font-weight: 600; text-align: left; cursor: pointer; color: var(--hub-ink); background: var(--hub-soft); transition: transform 200ms var(--spring); }
.cal-chip:active { transform: scale(0.96); }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip svg { width: 11px; height: 11px; flex: none; }
.cal-chip b { font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.cal-meet { background: color-mix(in srgb, var(--hub-acc) 18%, var(--hub-panel)); }
.cal-meet.allday { background: var(--hub-acc); color: var(--hub-acc-ink); }
.cal-content { background: color-mix(in srgb, var(--ember) 14%, var(--hub-panel)); }
.cal-content.done span { text-decoration: line-through; opacity: 0.7; }
.cal-project { background: var(--tint-bad); color: var(--rec); }
.cal-task { box-shadow: inset 0 0 0 1px var(--hub-line); background: var(--hub-panel); }
.cal-task.late { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rec) 55%, transparent); }
/* semana */
.cal-week { border-radius: var(--r-xl); background: var(--hub-card-solid); border: 1px solid var(--hub-line); overflow: hidden; }
.cal-wk-head, .cal-wk-all, .cal-wk-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-wk-head { border-bottom: 1px solid var(--hub-line); }
.cal-wk-day { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; font-size: 12px; font-weight: 700; color: var(--hub-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-wk-day b { font-size: 20px; letter-spacing: -0.02em; color: var(--hub-ink); text-transform: none; }
.cal-wk-day.is-today b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--rec); color: #fff; }
.cal-wk-all { border-bottom: 1px solid var(--hub-line); min-height: 34px; }
.cal-gut { font-size: 10.5px; color: var(--hub-muted); padding: 8px 6px; text-align: right; line-height: 1.2; }
.cal-wk-cell { display: grid; gap: 3px; align-content: start; padding: 5px 4px; border-left: 1px solid var(--hub-line); min-width: 0; }
.cal-wk-scroll { height: min(64vh, 620px); overflow-y: auto; overscroll-behavior: contain; }
.cal-wk-grid { position: relative; height: calc(var(--h) * 24); }
.cal-hours { display: grid; grid-template-rows: repeat(24, var(--h)); }
.cal-hours span { font-size: 11px; color: var(--hub-muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--hub-line); background: repeating-linear-gradient(180deg, transparent 0 calc(var(--h) - 1px), var(--hub-line) calc(var(--h) - 1px) var(--h)); }
.cal-col.is-today { background-color: color-mix(in srgb, var(--hub-acc) 5%, transparent); }
.cal-ev { position: absolute; display: grid; align-content: start; gap: 1px; padding: 4px 6px; border: 0; border-left: 3px solid var(--hub-acc); border-radius: 8px; background: color-mix(in srgb, var(--hub-acc) 18%, var(--hub-panel)); color: var(--hub-ink); font: inherit; text-align: left; overflow: hidden; cursor: pointer; z-index: 1; transition: transform 200ms var(--spring), box-shadow 200ms; }
.cal-ev:hover { z-index: 2; box-shadow: 0 10px 22px -14px rgba(16, 21, 18, 0.7); }
.cal-ev:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; z-index: 3; }
.cal-ev b { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev span { font-size: 11px; color: var(--hub-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--rec); z-index: 4; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rec); }
/* mes */
.cal-month .cal-mday { min-height: 112px; }
.cal-goday { border: 0; background: transparent; padding: 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; color: inherit; }
.t-day.is-today .cal-goday { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rec); color: #fff; }
/* agenda */
.cal-agenda { padding: 8px 16px; }
.cal-ag-day { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--hub-line); }
.cal-ag-day:first-child { border-top: 0; }
.cal-ag-day h3 { margin: 0; font-size: 13px; font-weight: 800; color: var(--hub-muted); }
.cal-ag-day.is-today h3 { color: var(--rec); }
.cal-ag-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; font: inherit; color: inherit; text-align: left; }
button.cal-ag-row { cursor: pointer; }
button.cal-ag-row:hover { background: var(--hub-soft); }
.cal-ag-row.cal-meet { background: color-mix(in srgb, var(--hub-acc) 12%, transparent); border-left: 3px solid var(--hub-acc); }
.cal-ag-row .cal-chip { font-size: 13px; padding: 8px 10px; }
.cal-ag-t { display: grid; flex: none; width: 64px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-ag-t small { font-size: 11.5px; font-weight: 500; color: var(--hub-muted); }
.cal-ag-x { display: grid; gap: 2px; min-width: 0; }
.cal-ag-x strong { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.cal-ag-x small { font-size: 12.5px; color: var(--hub-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* conectar */
.cal-manage { margin-bottom: 16px; }
.cal-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.cal-list li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 12px; background: var(--hub-panel); border: 1px solid var(--hub-line); }
.cal-list li strong { flex: 1; font-size: 14px; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hub-acc); }
.cal-help { display: grid; gap: 8px; padding: 0 2px 12px; }
.cal-help .t-scope { justify-self: start; }
.cal-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.cal-add { display: grid; grid-template-columns: minmax(140px, 0.6fr) minmax(0, 2fr) auto; gap: 10px; align-items: end; }
.cal-add .btn { min-height: 44px; }
/* detalle de una junta */
.cal-pop { position: fixed; z-index: 980; padding: 14px 16px; border-radius: 18px; background: var(--hub-panel); border: 1px solid var(--hub-line); box-shadow: 0 30px 60px -24px rgba(16, 21, 18, 0.55); }
.cal-pop-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cal-pop-h strong { font-size: 16px; line-height: 1.3; }
.cal-pop p { margin: 6px 0 0; font-size: 14px; }
/* "Tu día" en Inicio */
.day-ev { position: absolute; z-index: 2; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border: 0; border-left: 3px solid var(--hub-acc); border-radius: 10px; background: color-mix(in srgb, var(--hub-acc) 20%, var(--hub-panel)); color: var(--hub-ink); font: inherit; text-align: left; overflow: hidden; cursor: pointer; }
.day-ev b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-ev span { font-size: 11px; color: var(--hub-muted); flex: none; font-variant-numeric: tabular-nums; }
.day-lanes.has-events .day-empty { top: auto; bottom: 8px; transform: translateX(-50%); padding: 6px 12px; font-size: 13px; }
@media (max-width: 700px) {
  .cal-add { grid-template-columns: minmax(0, 1fr); }
  .cal-filters .t-scope { margin-left: 0; }
  .cal-wk-head, .cal-wk-all, .cal-wk-grid { grid-template-columns: 40px repeat(7, minmax(0, 1fr)); }
  .cal-ev span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cal-chip, .cal-ev, .cal-f { transition: none !important; } }

/* juntas cortas: nombre y hora en una sola línea, sin encimarse */
.cal-ev.short { display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.cal-ev.short b { flex: 1 1 auto; min-width: 0; font-size: 11.5px; }
.cal-ev.short span { flex: none; font-size: 10.5px; }

/* color de cada calendario (como en Google Calendar) */
.cal-ev, .cal-ag-row.cal-meet, .day-ev { border-left-color: var(--ev, var(--hub-acc)); background: color-mix(in srgb, var(--ev, var(--hub-acc)) 20%, var(--hub-panel)); }
.cal-chip.cal-meet { background: color-mix(in srgb, var(--ev, var(--hub-acc)) 20%, var(--hub-panel)); box-shadow: inset 3px 0 0 var(--ev, var(--hub-acc)); }
.cal-chip.cal-meet.allday { background: var(--ev, var(--hub-acc)); color: #fff; box-shadow: none; }
.cal-dot { background: var(--ev, var(--hub-acc)); }
.cal-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-sw { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--sw); cursor: pointer; transition: transform 200ms var(--spring); }
.cal-sw:hover { transform: scale(1.12); }
.cal-sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--hub-panel), 0 0 0 4px var(--sw); }
.cal-sw:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.cal-list li { flex-wrap: wrap; padding: 8px 6px 8px 12px; }
.cal-li-sw .cal-sw { width: 20px; height: 20px; }
.cal-add { grid-template-columns: minmax(140px, 0.6fr) minmax(0, 2fr); }
.cal-add-color { grid-column: 1 / -1; }
.cal-add .btn { justify-self: start; }

/* =====================================================================
   NEW LAND HUB · Fase 7: Asistente
   ===================================================================== */
.hc-tabs { align-items: center; }
.hc-tabs-t { width: auto !important; height: auto !important; border: 0 !important; font-size: 15px; font-weight: 700; color: var(--hub-ink) !important; }
.hc-tabs button.hc-bot { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; transition: transform 220ms var(--spring); }
.hc-tabs button.hc-bot:hover { transform: scale(1.06) rotate(8deg); }
.hc-tabs button.hc-bot:active { transform: scale(0.92); }
.hpanel.chat[data-assist-home] { padding: 0; }
.as-wrap { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 300px; }
.as-thread { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; max-height: 340px; padding: 12px 12px 4px; }
.as-wrap.as-big .as-thread { max-height: none; }
.bubble p { margin: 0 0 6px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin: 4px 0 6px; padding-left: 18px; } .bubble li { margin: 2px 0; }
.bubble.as-me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--hub-acc); color: var(--hub-acc-ink); white-space: pre-wrap; }
.as-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--hub-muted); animation: asDot 1s ease-in-out infinite; }
.as-typing i:nth-child(2) { animation-delay: 0.15s; } .as-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes asDot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.as-chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hub-line); background: var(--hub-panel); font: inherit; font-size: 13px; font-weight: 600; color: var(--hub-ink); cursor: pointer; text-align: left; transition: background 200ms, transform 220ms var(--spring); }
.as-chip:hover { background: var(--hub-soft); }
.as-chip:active { transform: scale(0.95); }
.as-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px; min-height: 18px; }
.as-note { margin: 0; font-size: 11.5px; color: var(--hub-muted); font-variant-numeric: tabular-nums; }
.as-note.low { color: var(--rec); }
.as-new { border: 0; background: transparent; padding: 4px 0; font: inherit; font-size: 12px; color: var(--hub-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.as-form { display: flex; align-items: flex-end; gap: 6px; margin: 0 10px 10px; padding: 6px 6px 6px 16px; border-radius: 24px; border: 1px solid var(--hub-line); background: var(--hub-panel); }
.as-form:focus-within { border-color: var(--hub-acc); }
.as-form textarea { flex: 1; min-height: 0 !important; height: 40px; max-height: 160px; padding: 10px 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; resize: none; font-size: 15px; line-height: 1.35; color: var(--hub-ink); outline: none; }
.as-send, .as-mic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; transition: transform 220ms var(--spring), background 200ms; }
.as-send { background: var(--hub-acc); color: var(--hub-acc-ink); }
.as-send:disabled { opacity: 0.4; cursor: default; }
.as-mic { background: transparent; color: var(--hub-muted); }
.as-mic.on { background: var(--tint-bad); color: var(--rec); animation: asDot 1.2s ease-in-out infinite; }
.as-send:active, .as-mic:active { transform: scale(0.9); }
.as-send svg, .as-mic svg { width: 18px; height: 18px; }
.as-panel { display: flex; flex-direction: column; }
.as-panel .as-wrap { flex: 1; min-height: 0; margin-top: 10px; }
.as-panel .as-thread { padding: 4px 0; }
.as-panel .as-form { margin: 0; }
.as-panel .as-foot { padding: 0 4px; }
.as-panel-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--forest); color: #F3A487; }
.as-panel-ic svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .as-typing i, .as-mic.on { animation: none; } }

/* conectar la clave propia de Claude */
.as-link { border: 0; background: transparent; padding: 0; font: inherit; color: var(--hub-acc-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.as-key { display: grid; gap: 8px; margin: 0 10px; padding: 12px 14px; border-radius: 16px; background: var(--hub-soft); border: 1px solid var(--hub-line); }
.as-key-h { margin: 0; font-size: 14px; }
.as-key p.xs { margin: 0; line-height: 1.45; }
.as-key-row { display: flex; gap: 6px; }
.as-key-row input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hub-line); background: var(--hub-panel); color: var(--hub-ink); font-size: 14px; }
.as-key-foot { display: flex; justify-content: flex-end; gap: 14px; font-size: 12.5px; }
.as-panel .as-key { margin: 0; }

/* ================================================================ desempeño (fase 8) */
.perf { display: grid; gap: 18px; }
.pf-alerts .hpanel { display: grid; gap: 6px; }
.pf-alert { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; transition: background .2s; }
.pf-alert:hover, .pf-alert:focus-visible { background: rgba(127,127,127,.1); }
.pf-alert i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .35; }
.pf-alert.lv-1 i { background: #D1350A; opacity: 1; }
.pf-alert.lv-2 i { background: #DB1D1A; opacity: 1; box-shadow: 0 0 0 4px rgba(219,29,26,.15); }
.pf-alert span { display: grid; min-width: 0; }
.pf-alert strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-alert small { opacity: .65; font-size: 12px; }
.pf-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pf-card { display: grid; gap: 14px; }
.pf-who { display: flex; gap: 12px; align-items: center; }
.pf-who > div { display: grid; }
.pf-who small { opacity: .6; font-size: 12px; }
.pf-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-nums div { display: grid; gap: 2px; }
.pf-nums span { font-size: 11px; opacity: .6; }
.pf-nums strong { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.pf-nums .bad strong { color: #DB1D1A; }
.pf-bar { height: 4px; border-radius: 4px; background: rgba(127,127,127,.18); overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: currentColor; border-radius: inherit; }
.pf-foot { margin: 0; }

/* ================================================================ caja oculta en Inicio */
.cash-eye { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px 0 -6px 4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .6; cursor: pointer; vertical-align: middle; position: relative; transition: opacity .2s, background .2s; }
.cash-eye::before { content: ''; position: absolute; inset: -8px; } /* área de toque de 44 px */
.cash-eye:hover, .cash-eye:focus-visible { opacity: 1; background: rgba(127,127,127,.12); }
.cash-eye svg { width: 17px; height: 17px; }
.cash-eye.on .cash-slash { display: none; }
.h2-stat strong .cash-veil, .cash-veil { display: inline-flex; align-items: center; gap: .12em; font-size: 1em; color: inherit; user-select: none; }
.cash-mask::after { display: none; }
.cash-veil i { display: inline-block; width: 3.6em; height: .62em; border-radius: 99px; background: currentColor; opacity: .12; filter: blur(1.5px); }
@media (prefers-reduced-motion: no-preference) { .cash-veil i { animation: cash-shimmer 2.4s ease-in-out infinite; } }
@keyframes cash-shimmer { 50% { opacity: .2; } }
