/* Two Waves panel — brand system from "Visual Identity Two Waves".
   Type: Funnel Display (headlines, numbers) + Kumbh Sans (body).
   Palette: Navy #2B4D6E / logo navy #004B6F · Sky #CCE3F8 · Calm #7C9DD2 · Wave foam #F8F5E5 ·
   Sand #F4D68C · Fire #E84D14 (CTA) · Terracotta #CA4F1F · Earth #70281F · Olive #B2AB2D · Blackboard #2B2B22 */
:root {
  --bg: #F8F5E5;
  --surface: #FFFDF5;
  --surface-2: #F1ECD8;
  --ink: #2B2B22;
  --muted: #6F6A5A;
  --line: #E4DCC3;
  --brand: #004B6F;
  --navy: #2B4D6E;
  --sky: #CCE3F8;
  --calm: #7C9DD2;
  --sand: #F4D68C;
  --cta: #E84D14;
  --cta-ink: #FFFFFF;
  --terracotta: #CA4F1F;
  --earth: #70281F;
  --olive: #B2AB2D;
  --pos: #5A6B12;
  --neg: #B8431A;
  --warn-bg: #FBEFC9;
  --warn-ink: #6E4B00;
  --asset: #70281F;
  --task: #D9A21B;
  --buy: #3E8E7E;
  --note: #8C8676;
  --deadline: #E84D14;
  --pay: #7C9DD2;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(43, 43, 34, .04), 0 6px 18px -8px rgba(43, 43, 34, .12);
  --tabs-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --display: "Funnel Display", "Kumbh Sans", system-ui, sans-serif;
  --body: "Kumbh Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --loop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 240' fill='none' stroke='%232B2B22' stroke-width='1.4' stroke-opacity='.55'%3E%3Cpath d='M-20 170 C 60 60, 150 40, 190 110 S 250 230, 330 150 S 430 10, 520 80 S 640 200, 660 120'/%3E%3Ccircle cx='470' cy='92' r='58'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #22221B;
    --surface: #2C2C24;
    --surface-2: #37372D;
    --ink: #F8F5E5;
    --muted: #B8B19C;
    --line: #45443A;
    --brand: #CCE3F8;
    --navy: #9DBBE6;
    --calm: #9DBBE6;
    --cta: #F0643A;
    --pos: #CFC85C;
    --neg: #FF9A70;
    --warn-bg: #4A3D14;
    --warn-ink: #F4D68C;
    --asset: #F4A58A;
    --task: #F4D68C;
    --buy: #7FD3C2;
    --shadow: none;
    --loop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 240' fill='none' stroke='%23F8F5E5' stroke-width='1.4' stroke-opacity='.35'%3E%3Cpath d='M-20 170 C 60 60, 150 40, 190 110 S 250 230, 330 150 S 430 10, 520 80 S 640 200, 660 120'/%3E%3Ccircle cx='470' cy='92' r='58'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
small { color: var(--muted); }
b, strong { font-weight: 700; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.r { text-align: right; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--earth); }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--sand); } }

/* ---------- shell ---------- */
.side { display: none; }
.main { max-width: 1120px; margin: 0 auto; padding: 0 16px calc(var(--tabs-h) + var(--safe-b) + 28px); }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 0 -16px 14px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 22px; color: var(--brand); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__logo img { width: 32px; height: 32px; display: block; }
.top__more { color: var(--ink); padding: 6px; border-radius: 10px; }
.top__more:hover { background: var(--surface-2); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a.is-active { color: var(--brand); }
.tabs a.is-active svg { stroke-width: 2.2; }
.tabs__add { justify-self: center; width: 54px; height: 54px; border-radius: 18px; border: 0; background: var(--cta); color: var(--cta-ink); display: grid; place-items: center; box-shadow: 0 8px 18px -6px rgba(232, 77, 20, .55); cursor: pointer; transform: translateY(-8px); }
.tabs__add svg { width: 26px; height: 26px; stroke-width: 2.6; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
  .side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: 26px 16px 18px; background: var(--surface); border-right: 1px solid var(--line); overflow: hidden; }
  .side__logo img { width: 150px; display: block; margin: 0 auto; }
  .side__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; position: relative; z-index: 1; }
  .side__nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; text-decoration: none; }
  .side__nav a:hover { background: var(--surface-2); }
  .side__nav a.is-active { background: var(--navy); color: #F8F5E5; }
  .side__nav a.side__sub { padding: 7px 12px 7px 46px; font-weight: 500; font-size: 14px; color: var(--muted); }
  .side__nav a.side__sub.is-cur { color: var(--brand); font-weight: 700; }
  .side__wave { position: absolute; left: -10px; bottom: 54px; width: 260px; height: 150px; stroke: var(--calm); stroke-width: 1.4; opacity: .45; pointer-events: none; }
  .side__user { display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; position: relative; z-index: 1; }
  .main { padding: 0 36px 56px; width: 100%; }
  .top { margin: 0 -36px 22px; padding: 20px 36px; }
  .top__logo, .top__more { display: none; }
  .top h1 { font-size: 30px; }
  .tabs { display: none; }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) {
  .side__logo img { background: #F8F5E5; border-radius: 14px; padding: 10px; }
  .side__nav a.is-active { background: var(--sky); color: #2B2B22; }
}

/* ---------- "+" sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(43, 43, 34, .45); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px 16px calc(16px + var(--safe-b)); display: grid; gap: 12px; animation: up .2s ease-out; max-width: 560px; margin: 0 auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--brand); }
.sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet__opt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.sheet__opt:hover { text-decoration: none; border-color: var(--calm); }
.sheet__opt small { font-weight: 400; font-size: 11px; }
.sheet__ic { font-size: 24px; line-height: 1.2; }

/* ---------- blocks ---------- */
.hello { margin: 0 0 14px; color: var(--muted); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px; margin-bottom: 16px; min-width: 0; }
.card--flush { padding: 4px 16px; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card__head h2 { font-size: 19px; color: var(--brand); }
.card__head a { font-size: 14px; font-weight: 700; white-space: nowrap; }
details.card summary { cursor: pointer; font-weight: 700; }
.grid2 { display: grid; gap: 0 16px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; }

.alerts { display: grid; gap: 8px; margin-bottom: 16px; }
.alert { display: block; padding: 11px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); text-decoration: none; border: 1px solid color-mix(in srgb, var(--sand) 70%, transparent); }
.alert--soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.alert:hover { text-decoration: none; filter: brightness(.98); }

.empty { color: var(--muted); margin: 4px 0; }
.note { color: var(--muted); font-size: 14px; margin: 8px 0; }
.warn { color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 2px 8px; font-size: 12px; display: inline-block; margin: 6px 0 0; font-weight: 600; }
.warn--bad { background: color-mix(in srgb, var(--neg) 16%, var(--surface)); color: var(--neg); }
.okline { color: var(--pos); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.flash { padding: 11px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; }
.flash--ok { background: color-mix(in srgb, var(--olive) 22%, var(--surface)); color: var(--pos); }
.flash--error { background: color-mix(in srgb, var(--neg) 14%, var(--surface)); color: var(--neg); }
.flash--warn { background: var(--warn-bg); color: var(--warn-ink); }
.flash--soft { background: var(--surface); border: 1px solid var(--line); font-weight: 500; }

.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .note { margin: 0; flex: 1 1 260px; }
.toolbar .actions { margin: 0; }

.subtabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { padding: 8px 15px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
.subtabs a.is-active { background: var(--navy); border-color: var(--navy); color: #F8F5E5; }
@media (prefers-color-scheme: dark) { .subtabs a.is-active { background: var(--sky); border-color: var(--sky); color: #2B2B22; } }

.monthnav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.monthnav a, .monthnav span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 22px; text-decoration: none; color: var(--ink); }
.monthnav span { visibility: hidden; }
.monthnav b { min-width: 150px; text-align: center; font-family: var(--display); font-size: 19px; color: var(--brand); }
.monthnav--left { justify-content: flex-start; margin: 0; }
.monthnav--left b { min-width: 0; text-align: left; font-size: 22px; }
.monthnav a.monthnav__today { width: auto; padding: 0 12px; font-size: 14px; font-weight: 700; }
.monthhead { margin: 14px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--earth); }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a, .list__row { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--ink); text-decoration: none; }
.list a:hover { text-decoration: none; }
.list a:hover .list__main b { color: var(--brand); }
.list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); }
.list__main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__amt { display: flex; flex-direction: column; align-items: flex-end; }
.list a > span:last-child, .list__amt > span, .list__row > span:not(.list__main) { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list li.is-done { opacity: .5; }
.list__sep { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--earth); padding: 14px 0 4px; }
.list--compact a, .list--compact .list__row { padding: 7px 0; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--sky); color: #2B4D6E; display: grid; place-items: center; font-family: var(--display); font-weight: 800; flex: none; }
.iconbtn { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.iconbtn:hover { background: var(--surface-2); color: var(--neg); }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li + li { border-top: 1px solid var(--line); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 14px 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.menu__ic { width: 30px; text-align: center; font-size: 20px; }
.menu__go { margin-left: auto; color: var(--muted); font-size: 22px; }

/* events */
.event { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--ink); text-decoration: none; }
.event + .event, .monthhead + .event { border-top: 1px solid var(--line); }
.event:hover { text-decoration: none; }
.event__date { width: 50px; height: 54px; border-radius: 14px; background: var(--sky); color: #2B4D6E; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.event__date b { font-family: var(--display); font-size: 21px; line-height: 1; }
.event__date span { font-size: 11px; text-transform: uppercase; font-weight: 700; }
.event__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.event__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.evhead p { margin: 6px 0; }
.evhead__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.evhead__when { font-weight: 700; font-size: 17px; }
.notes { background: var(--surface-2); padding: 10px 12px; border-radius: 12px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill--aplicado, .pill--ad-planeado { background: #E4EEFA; color: #2B4D6E; }
.pill--confirmado, .pill--ad-activo, .pill--m-activa { background: #EDEBC4; color: #5A6B12; }
.pill--hecho { background: #F3E3DC; color: #70281F; }
.pill--descartado { text-decoration: line-through; }
.pill--ad-pausado, .pill--m-baja { background: var(--surface-2); color: var(--muted); }
.pill--m-reparacion { background: var(--warn-bg); color: var(--warn-ink); }
@media (prefers-color-scheme: dark) {
  .pill--aplicado, .pill--ad-planeado { background: #2B4D6E; color: #CCE3F8; }
  .pill--confirmado, .pill--ad-activo, .pill--m-activa { background: #4A4818; color: #EAE58E; }
  .pill--hecho { background: #4A2621; color: #F4B8A6; }
}
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; white-space: nowrap; }
.tag--asset { background: color-mix(in srgb, var(--sand) 60%, transparent); color: var(--asset); }
.clip { font-size: 12px; font-weight: 600; color: var(--muted); }
.stars { color: #D9A21B; letter-spacing: 2px; }
.stars--sm { font-size: 11px; letter-spacing: 0; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--in { background: var(--olive); }
.dot--out { background: var(--cta); }
.dot--ev { background: var(--calm); }
.dot--task { background: var(--task); }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 6px; }
.bars__col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; min-width: 0; }
.bars__col:hover { text-decoration: none; }
.bars__pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bars__bar { width: 42%; max-width: 16px; border-radius: 5px 5px 0 0; min-height: 2px; }
.bars__bar--in { background: var(--olive); }
.bars__bar--out { background: var(--cta); }
.bars__lbl { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend--wrap { flex-wrap: wrap; row-gap: 4px; margin-bottom: 14px; }
.legend .d { width: 10px; height: 10px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 1fr 36px; gap: 3px 10px; align-items: center; }
.hbars__row { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.hbars__row b { font-variant-numeric: tabular-nums; }
.hbars__track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbars__track span { display: block; height: 100%; background: var(--calm); border-radius: 99px; }
.hbars__track span.is-asset { background: var(--earth); }
.hbars small { font-size: 12px; text-align: right; }

/* tables */
.tablewrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.r { text-align: right; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tfoot td { font-weight: 800; border-bottom: 0; }
.table tr.is-done { opacity: .5; }
.table tr.subtotal td { font-weight: 700; background: var(--surface-2); }
.table--cmp td { vertical-align: middle; }

/* hero (dashboard) */
.hero { position: relative; overflow: hidden; background: var(--sky) var(--loop) no-repeat right -80px top -20px / 720px auto; color: #2B2B22; border-radius: 22px; padding: 20px; margin-bottom: 16px; display: grid; gap: 16px; }
.hero span, .hero small { color: #4A4A3E; font-size: 13px; }
.hero b { font-variant-numeric: tabular-nums; }
.hero .pos { color: #4E5E0E; }
.hero .neg { color: #A93A12; }
.hero__main { display: flex; flex-direction: column; gap: 4px; }
.hero__main > span { font-weight: 600; }
.hero__main > b { font-family: var(--display); font-size: 42px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.progress { height: 10px; border-radius: 99px; background: rgba(43, 77, 110, .15); overflow: hidden; margin: 6px 0 4px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #E84D14, #F4D68C); border-radius: 99px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero__grid div { display: flex; flex-direction: column; background: rgba(255, 253, 245, .72); border-radius: 14px; padding: 11px 13px; min-width: 0; }
.hero__grid b { font-family: var(--display); font-size: 22px; font-weight: 800; }
@media (min-width: 1000px) { .hero { grid-template-columns: 1fr 2fr; align-items: center; padding: 26px; } .hero__grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-color-scheme: dark) {
  .hero { background-color: #2B4D6E; color: #F8F5E5; }
  .hero span, .hero small { color: #D6E4F2; }
  .hero .pos { color: #E4DF7A; }
  .hero .neg { color: #FFB59B; }
  .hero__grid div { background: rgba(0, 0, 0, .18); }
  .progress { background: rgba(255, 255, 255, .18); }
}
.signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .signals { grid-template-columns: 1fr 1fr; } }
.signal { display: flex; gap: 12px; align-items: flex-start; }
.signal i { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.signal--good i { background: var(--olive); box-shadow: 0 0 0 4px color-mix(in srgb, var(--olive) 25%, transparent); }
.signal--ok i { background: #D9A21B; box-shadow: 0 0 0 4px rgba(217, 162, 27, .22); }
.signal--bad i { background: var(--cta); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cta) 22%, transparent); }
.signal div { display: flex; flex-direction: column; }
.signal small { font-size: 13px; }
.syncing { font-size: 13px; }

/* verdict (publicidad) */
.verdict { border-radius: 20px; padding: 18px 20px; margin-bottom: 16px; background: var(--surface) var(--loop) no-repeat right -160px center / 620px auto; border: 1px solid var(--line); }
.verdict h2 { font-size: 24px; color: var(--brand); margin: 4px 0 6px; }
.verdict p { margin: 0; max-width: 70ch; }
.verdict--good { background-color: color-mix(in srgb, var(--olive) 20%, var(--surface)); }
.verdict--ok { background-color: color-mix(in srgb, var(--sand) 38%, var(--surface)); }
.verdict--bad { background-color: color-mix(in srgb, var(--cta) 14%, var(--surface)); }
.channels { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.channel { border: 1px solid var(--line); border-radius: 14px; padding: 14px; border-top: 5px solid var(--ch, var(--navy)); background: var(--bg); }
.channel__head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.channel__budget { font-family: var(--display); font-size: 22px; font-weight: 800; margin: 6px 0; }
.channel__budget small { font-family: var(--body); font-size: 13px; font-weight: 500; }

/* calendar */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal__head, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--earth); padding: 9px 0; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal__day { min-height: 60px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day:hover { background: var(--surface-2); text-decoration: none; }
.cal__day.is-out { color: var(--muted); background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.cal__day.is-weekend:not(.is-out) { background: color-mix(in srgb, var(--sky) 22%, var(--surface)); }
.cal__day.is-sel { box-shadow: inset 0 0 0 2px var(--navy); }
.cal__num { font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; font-family: var(--display); }
.cal__day.is-today .cal__num { background: var(--cta); color: #fff; }
.cal__items { display: none; flex-direction: column; gap: 2px; min-width: 0; }
.cal__dots { display: flex; gap: 3px; flex-wrap: wrap; padding-left: 4px; }
.d { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.d--feria { background: var(--navy); }
.d--tarea { background: var(--task); }
.d--compra { background: var(--buy); }
.d--nota { background: var(--note); }
.d--deadline { background: var(--deadline); }
.d--pago { background: var(--pay); }
.chip { display: block; font-size: 11px; line-height: 1.3; padding: 2px 5px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; background: var(--surface-2); color: var(--ink); border-left: 3px solid var(--muted); }
.chip--feria { background: var(--sky); color: #2B4D6E; border-color: #2B4D6E; }
.chip--st-idea { border-left-style: dashed; opacity: .8; }
.chip--tarea { border-color: var(--task); }
.chip--compra { border-color: var(--buy); }
.chip--nota { border-color: var(--note); }
.chip--deadline { border-color: var(--deadline); color: var(--deadline); }
.chip--pago { border-color: var(--pay); }
.chip.is-done { text-decoration: line-through; opacity: .5; }
.chip--more { border: 0; background: none; color: var(--muted); }
@media (min-width: 760px) { .cal__day { min-height: 108px; padding: 6px; } .cal__items { display: flex; } .cal__dots { display: none; } }
.day { margin-top: 4px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.agenda__item:first-child { border-top: 0; }
.agenda__item.is-done .agenda__body b { text-decoration: line-through; opacity: .55; }
.agenda__body { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.agenda__ic { width: 28px; text-align: center; font-size: 18px; flex: none; }
.tick { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--task); background: transparent; color: var(--pos); font-weight: 800; cursor: pointer; flex: none; padding: 0; }
.agenda__item--compra .tick { border-color: var(--buy); }
.agenda__item.is-done .tick { border-color: var(--olive); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg--2 { grid-template-columns: 1fr 1fr; }
.seg label { cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 11px 6px; border-radius: 12px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; background: var(--surface); }
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #F8F5E5; }
@media (prefers-color-scheme: dark) { .seg input:checked + span { background: var(--sky); color: #2B2B22; } }

/* feria cost lines */
.costlines { display: grid; }
.costline { display: grid; grid-template-columns: 1fr 110px; gap: 6px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.costline__lbl { font-weight: 600; font-size: 15px; }
.costline input[name^=det] { grid-column: 1 / -1; min-height: 38px; padding: 7px 10px; font-size: 15px; }
@media (min-width: 760px) { .costline { grid-template-columns: 1.2fr 130px 1.5fr; } .costline input[name^=det] { grid-column: auto; } }
.costsum { font-family: var(--display); font-size: 20px; text-align: right; margin: 0; }

/* products / costs */
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.pcard:hover { text-decoration: none; border-color: var(--calm); }
.pcard.is-done { opacity: .55; }
.pcard__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 8px; background: var(--surface-2); display: block; }
.pcard__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 19px; }
.pcard__price { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--brand); }
.pcard__dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 14px; }
.pcard__dl dt { color: var(--muted); }
.pcard__dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: inline-block; width: 46px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.meter__bar { display: block; height: 100%; }
.meter__bar.is-good { background: var(--olive); }
.meter__bar.is-ok { background: #D9A21B; }
.meter__bar.is-bad { background: var(--cta); }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin: 8px 0; }
.stack--big { height: 18px; margin: 4px 0 14px; }
.stack__s { display: block; height: 100%; }
.stack__s--1 { background: var(--calm); }
.stack__s--2 { background: var(--sand); }
.stack__s--3 { background: var(--terracotta); }
.stack__s--m { background: var(--olive); }
.stack__s--c1 { background: #2B4D6E; }
.stack__s--c2 { background: #7C9DD2; }
.stack__s--c3 { background: #E84D14; }
.stack__s--c4 { background: #B2AB2D; }
.stack__s--c5 { background: #70281F; }
@media (prefers-color-scheme: dark) { .stack__s--c1 { background: #CCE3F8; } }
.phead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.phead__img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; }
.phead > div { flex: 1; min-width: 160px; }
.phead__price { font-family: var(--display); font-size: 32px; font-weight: 800; margin: 0; color: var(--brand); }
.bom { display: grid; gap: 2px; }
.bom__area { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--earth); }
@media (prefers-color-scheme: dark) { .bom__area, .list__sep, .monthhead, .cal__head span { color: var(--sand); } }
.bom__row { display: grid; grid-template-columns: 1fr 90px 40px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.bom__row.is-on { background: color-mix(in srgb, var(--sky) 55%, transparent); }
.bom__name { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; min-width: 0; }
.bom__row input { min-height: 40px; padding: 7px 10px; text-align: right; }
.bom__unit { font-size: 13px; color: var(--muted); }
.livecost { display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--sky); color: #2B2B22; padding: 13px 15px; border-radius: 14px; font-size: 14px; }
.livecost span { color: #4A4A3E; }
.livecost b { color: #2B2B22; }
.livecost__tot { margin-left: auto; font-size: 16px; }
.livecost span.livecost__tot b { color: #2B4D6E; font-family: var(--display); }

/* taller */
.fil { background: var(--surface) var(--loop) no-repeat right -120px top -40px / 640px auto; border: 1px solid var(--line); border-radius: 22px; padding: 18px; margin-bottom: 16px; display: grid; gap: 14px; }
.fil--urgent { background-color: color-mix(in srgb, var(--cta) 12%, var(--surface)); }
.fil__main b { display: block; font-family: var(--display); font-size: 42px; font-weight: 800; color: var(--brand); line-height: 1.05; }
.fil__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fil__grid div { display: flex; flex-direction: column; background: var(--bg); border-radius: 14px; padding: 11px 13px; min-width: 0; }
.fil__grid span { font-size: 13px; color: var(--muted); font-weight: 600; }
.fil__grid b { font-family: var(--display); font-size: 21px; font-weight: 800; }
@media (min-width: 1000px) { .fil { grid-template-columns: 1fr 2fr; align-items: center; } .fil__grid { grid-template-columns: repeat(4, 1fr); } }
.mgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.mcard--baja { opacity: .55; }
.mcard__head { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.mcard__head:hover { text-decoration: none; }
.mcard__head > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mcard__head b { font-family: var(--display); font-size: 17px; }
.mcard__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--sky); display: grid; place-items: center; font-size: 20px; }
.mcard__hours { margin: 10px 0 0; }
.mcard__hours b { font-family: var(--display); font-size: 24px; }
.maint { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.maint li { display: grid; gap: 4px; }
.maint__row { display: flex; justify-content: space-between; gap: 8px; }
.maint li.is-soon .hbars__track span { background: #D9A21B; }
.maint li.is-due .hbars__track span { background: var(--cta); }
.maint li.is-due small { color: var(--neg); font-weight: 600; }
.inline--tight { margin-top: 10px; gap: 6px; flex-wrap: nowrap; }
.inline--tight input { min-height: 36px; padding: 6px 10px; font-size: 15px; }

/* attachments */
.media { display: grid; gap: 12px; }
.drop { position: relative; display: block; border: 2px dashed color-mix(in srgb, var(--calm) 70%, var(--line)); border-radius: 16px; padding: 18px; text-align: center; cursor: pointer; background: color-mix(in srgb, var(--sky) 30%, var(--surface)); }
.drop:hover { border-color: var(--navy); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop__txt { display: flex; flex-direction: column; gap: 2px; font-weight: 700; color: var(--navy); }
.drop__txt small { font-weight: 400; }
.thumbs, .gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.gallery { margin-top: 12px; }
.thumb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.thumb img, .thumb__doc { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 13px; }
.gallery .thumb img, .gallery .thumb__doc { width: 112px; height: 112px; }
.thumb__rm { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.links a { background: var(--surface-2); padding: 5px 11px; border-radius: 99px; font-size: 14px; font-weight: 600; }

/* detail pages */
.detail__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail__amt { font-family: var(--display); font-size: 34px; font-weight: 800; margin: 0; }
.detail__amt small { font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--muted); }
.detail__title { font-family: var(--display); font-size: 21px; font-weight: 700; margin: 6px 0 12px; color: var(--brand); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0 0 12px; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; }
.dl--sm { font-size: 14px; gap: 4px 12px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }

/* forms */
.form { display: grid; gap: 14px; }
.row2, .row3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field small { font-size: 12px; }
.field__err { color: var(--neg); font-size: 13px; font-style: normal; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--calm); outline-offset: 0; border-color: transparent; background: var(--surface); }
input[type=file] { font: inherit; font-size: 14px; }
input[type=color] { width: 60px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 2px; }
input.mini-input { width: 64px; min-height: 32px; padding: 4px 8px; display: inline-block; }
textarea { resize: vertical; min-height: 70px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0; }
legend { font-family: var(--display); font-weight: 700; padding: 0 6px; font-size: 15px; color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: #2B4D6E; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--sand) 35%, var(--surface)); cursor: pointer; }
.switch input { width: 22px; height: 22px; margin-top: 2px; accent-color: #70281F; flex: none; }
.switch span { display: flex; flex-direction: column; gap: 2px; }
.switch small { font-size: 13px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.filters input[type=search] { grid-column: 1 / -1; }
@media (min-width: 760px) { .filters { grid-template-columns: repeat(3, 1fr) 2fr; } .filters input[type=search] { grid-column: auto; } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.actions--sticky { position: sticky; bottom: calc(var(--tabs-h) + var(--safe-b) + 8px); background: var(--surface); padding: 10px 0 2px; z-index: 3; }
@media (min-width: 900px) { .actions--sticky { bottom: 0; } }
.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { flex: 1 1 140px; }
.setup ol { padding-left: 20px; display: grid; gap: 8px; }
.setup code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700; font-size: 15px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1.5px solid var(--navy); background: transparent; color: var(--navy);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--sky) 45%, transparent); }
.btn--primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn--primary:hover { background: #D2430F; border-color: #D2430F; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--danger-link { background: none; border: 0; color: var(--neg); font: inherit; font-weight: 600; cursor: pointer; padding: 12px 0; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--sky) var(--loop) no-repeat center / 1100px auto; }
.login__card { width: 100%; max-width: 390px; background: var(--bg); border-radius: 24px; padding: 30px 24px; box-shadow: 0 20px 50px -20px rgba(43, 43, 34, .35); display: grid; gap: 14px; }
.login__logo { width: 180px; margin: 0 auto; display: block; }
.login__sub { text-align: center; color: var(--earth); margin: -4px 0 6px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
@media (prefers-color-scheme: dark) {
  .login { background-color: #2B4D6E; }
  .login__logo { background: #F8F5E5; border-radius: 14px; padding: 10px; }
  .login__sub { color: var(--sand); }
}
@media (prefers-color-scheme: dark) {
  .verdict--good { background-color: #3A3A1C; }
  .verdict--ok { background-color: #3D3522; }
  .verdict--bad { background-color: #42261C; }
  .fil--urgent { background-color: #42261C; }
  .flash--ok { background: #3A3A1C; }
}
@media (prefers-color-scheme: dark) { .top__logo img { background: #F8F5E5; border-radius: 9px; padding: 3px; } }
