/* Owner web app, ported from docs/design/canvas/*.dc.html. Colors come only from tokens.css. */

/* ---------- shell ---------- */
.app-body { min-height: 100vh; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; max-width: 1232px; margin: 0 auto; box-sizing: border-box; }
.app-top-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.app-top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.app-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--k-font-display); letter-spacing: -0.03em; font-size: 26px; font-weight: 800; padding-left: 4px; }
.app-title-sm { font-size: 18px; font-weight: 700; }
.app-logo { display: none; }
.app-top.has-logo .app-logo { display: inline-flex; }
.app-nav, .app-cta, .app-locale { display: none; }
.app-main { max-width: 1232px; margin: 0 auto; padding: 4px 16px 112px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.page-h1 { display: none; }
.avbtn { width: 44px; height: 44px; border-radius: 50%; background: var(--k-ear-light); color: var(--k-ink); font-family: var(--k-font-display); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avbtn:hover { color: var(--k-ink); box-shadow: 0 0 0 2px var(--k-paper), 0 0 0 4px var(--k-ink); }
.iconbtn { width: 44px; height: 44px; border-radius: var(--k-r-md); border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--k-text); }
.iconbtn:hover { background: var(--k-line); }

.tabbar { position: fixed; left: 12px; right: 12px; bottom: 12px; height: 68px; border-radius: var(--k-r-card); background: var(--k-ink-night); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--k-ink-night) 55%, transparent); z-index: 20; max-width: 560px; margin: 0 auto; }
.tab { position: relative; width: 56px; height: 52px; color: var(--k-on-ink-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 600; border-radius: 16px; }
.tab:hover, .tab[aria-current="page"] { color: var(--k-card); }
.tab[aria-current="page"]::after { content: ""; position: absolute; bottom: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--k-lime); }
.fab { width: 58px; height: 58px; margin-top: -30px; border-radius: 20px; border: 4px solid var(--k-paper); background: var(--k-lime); color: var(--k-ink-night); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -6px var(--k-lime-strong); box-sizing: border-box; transition: transform var(--k-dur) var(--k-ease-spring); }
.fab:hover { color: var(--k-ink-night); transform: translateY(-3px) rotate(90deg); }

/* ---------- building blocks ---------- */
.ch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch h2 { margin: 0; font-size: 20px; font-weight: 700; }
.ch .meta-mono { font-size: 12px; color: var(--k-text-muted); }
.linkbtn { border: 0; background: transparent; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--k-tag-health-fg); cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.linkbtn:hover { color: var(--k-ink); }
.add { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--k-line); background: transparent; font-size: 13px; font-weight: 600; color: var(--k-tag-health-fg); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.add:hover { background: var(--k-line-soft); color: var(--k-tag-health-fg); }
.btn { box-sizing: border-box; }
.btn-lg { min-height: 52px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-line { background: transparent; border: 1px solid var(--k-line); color: var(--k-text); }
.btn-line:hover { color: var(--k-text); background: var(--k-line-soft); }
.btn-dash { background: transparent; border: 1.5px dashed var(--k-text-soft); color: var(--k-tag-health-fg); }
.btn-danger { background: var(--k-tag-skin-fg); color: var(--k-card); }
.btn-danger:hover { color: var(--k-card); }
.btn-sm { min-height: 44px; font-size: 13px; border-radius: 12px; padding: 0 12px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.seg { display: flex; padding: 4px; border-radius: var(--k-r-pill); background: var(--k-line); align-self: flex-start; max-width: 100%; overflow-x: auto; }
.seg-btn { min-height: 36px; padding: 0 14px; border: 0; background: transparent; border-radius: var(--k-r-pill); font-size: 13px; font-weight: 600; color: var(--k-text-muted); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: var(--k-text); }
.seg-btn.on, .seg-btn[aria-current="true"], .seg-btn[aria-pressed="true"] { background: var(--k-ink); color: var(--k-card); }
.seg-full { align-self: stretch; }
.seg-full .seg-btn { flex: 1; min-height: 44px; font-size: 14px; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; background: var(--k-ear-light); color: var(--k-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--k-font-display); font-weight: 800; font-size: 12px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.kind { min-height: 44px; padding: 0 14px; border-radius: var(--k-r-pill); border: 1px solid var(--k-line); background: var(--k-card); font-size: 13px; font-weight: 600; color: var(--k-text-muted); cursor: pointer; display: inline-flex; align-items: center; }
.kind:has(input:checked), .kind.on { background: var(--k-text); border-color: var(--k-text); color: var(--k-card); }
.kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind:has(input:focus-visible) { outline: 2px solid var(--k-violet); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field .input, .input, .field input.input { min-height: 48px; box-sizing: border-box; width: 100%; padding: 0 14px; border-radius: var(--k-r-md); border: 1px solid var(--k-line); background: var(--k-card); font: inherit; font-size: 16px; color: var(--k-text); }
.input:focus { outline: none; border-color: var(--k-ink); box-shadow: 0 0 0 3px var(--k-tag-health-bg); }
.hint { font-size: 12px; color: var(--k-text-muted); line-height: 1.45; margin: 0; }
.check, .field .check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 400; line-height: 1.45; min-height: 44px; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--k-ink); }
.check a { text-decoration: underline; }

.row { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 16px; transition: background var(--k-dur-fast) ease; }
.row:hover { background: var(--k-paper); }
.icbox { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.rt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rt b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt span { font-size: 12px; color: var(--k-text-muted); }
.rr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.rr .amt { font-size: 14px; font-weight: 500; }
.rr .date { font-size: 12px; color: var(--k-text-soft); }
.datetile { width: 52px; height: 56px; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.datetile .d { font-family: var(--k-font-display); font-size: 21px; font-weight: 800; line-height: 1; }
.datetile .m { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.c-health { background: var(--k-tag-health-bg); color: var(--k-tag-health-fg); }
.c-food { background: var(--k-tag-food-bg); color: var(--k-tag-food-fg); }
.c-care { background: var(--k-tag-care-bg); color: var(--k-tag-care-fg); }
.c-skin { background: var(--k-tag-skin-bg); color: var(--k-tag-skin-fg); }
.progress { height: 8px; border-radius: var(--k-r-pill); background: var(--k-line-soft); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: var(--k-r-pill); background: var(--k-violet); }
.allergy-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: var(--k-r-pill); background: var(--k-tag-skin-bg); color: var(--k-tag-skin-fg); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { min-height: 36px; padding: 0 13px; border-radius: var(--k-r-pill); border: 1px solid var(--k-line); background: transparent; font-size: 13px; font-weight: 600; color: var(--k-text-muted); display: inline-flex; align-items: center; }
.pill:hover { color: var(--k-text); }
.pill[aria-current="true"] { background: var(--k-text); border-color: var(--k-text); color: var(--k-card); }
.tag-pill { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: var(--k-r-pill); align-self: flex-start; }
.switch { position: relative; width: 52px; height: 32px; border-radius: var(--k-r-pill); border: 0; background: var(--k-text-soft); cursor: pointer; flex: none; transition: background var(--k-dur-fast) ease; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--k-card); transition: transform var(--k-dur) var(--k-ease-spring); }
.switch[aria-checked="true"] { background: var(--k-ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.item { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.item .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.item .t b { font-size: 15px; font-weight: 600; }
.item .t span { font-size: 12px; color: var(--k-text-muted); }
.sep { height: 1px; background: var(--k-line-soft); border: 0; margin: 0; }
.dark-card { position: relative; overflow: hidden; background: var(--k-ink-night); color: var(--k-card); border-radius: var(--k-r-hero); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dark-card > :not(.blob):not(.grain) { position: relative; }
.on-ink-muted { color: var(--k-on-ink-muted); }
.toast { position: fixed; left: 16px; right: 16px; bottom: 92px; z-index: 30; max-width: 520px; margin: 0 auto; padding: 14px 16px; border-radius: 16px; background: var(--k-text); color: var(--k-card); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; animation: fadeup .45s var(--k-ease-out) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* bottom sheet (native <dialog>) */
dialog.sheet { border: 0; padding: 10px 16px 24px; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 88vh; box-sizing: border-box; background: var(--k-card); color: var(--k-text); border-radius: 28px 28px 0 0; box-shadow: 0 -20px 50px -20px var(--k-ink-night); }
dialog.sheet[open] { display: flex; flex-direction: column; gap: 14px; animation: sheetup .5s cubic-bezier(.32, 1.25, .5, 1) both; }
dialog.sheet::backdrop { background: color-mix(in srgb, var(--k-ink-night) 45%, transparent); }
@keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
.grab { width: 40px; height: 5px; border-radius: var(--k-r-pill); background: var(--k-text-soft); opacity: .4; align-self: center; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h3 { margin: 0; font-size: 22px; font-weight: 700; }

/* charts */
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 130px; align-items: end; }
.bcol { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar { width: 100%; border-radius: 10px 10px 4px 4px; background: var(--k-text-soft); opacity: .45; transform-origin: bottom; animation: grow .9s var(--k-ease-out) both; }
.bar.current { background: var(--k-ink); opacity: 1; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bval { font-size: 11px; color: var(--k-text-muted); }
.blabels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; font-size: 11px; color: var(--k-text-soft); text-align: center; margin-top: -6px; }
.blabels .current { color: var(--k-ink); font-weight: 500; }
.split { display: flex; height: 10px; border-radius: var(--k-r-pill); overflow: hidden; gap: 3px; }
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .name { flex: 1; }
.cat-health { background: var(--k-violet); }
.cat-food { background: var(--k-lime-strong); }
.cat-care { background: var(--k-tag-care-fg); }
.big-amount { font-family: var(--k-font-mono); font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 500; line-height: 1; }
.trend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: var(--k-r-pill); background: var(--k-tag-health-bg); color: var(--k-tag-health-fg); align-self: flex-start; }
.result { border-radius: 18px; padding: 16px; background: var(--k-tag-health-bg); display: flex; flex-direction: column; gap: 8px; }

/* dashboard hero (Inicio) */
.dash-hero .hero-top { display: flex; align-items: center; gap: 16px; }
.dog-avatar-lg { width: 72px; height: 72px; border-radius: 22px; background: var(--k-ear-light); color: var(--k-ink); display: flex; align-items: center; justify-content: center; font-family: var(--k-font-display); font-weight: 800; font-size: 32px; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-card) 14%, transparent); }
.dash-hero h1 { margin: 0; font-size: 44px; font-weight: 800; line-height: .95; }
.status-pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 9px; min-height: 28px; padding: 0 11px; border-radius: var(--k-r-pill); background: color-mix(in srgb, var(--k-lime) 14%, transparent); color: var(--k-lime); font-size: 12px; font-weight: 600; }
.live { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-chip { font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: var(--k-r-pill); background: color-mix(in srgb, var(--k-card) 10%, transparent); border: 1px solid color-mix(in srgb, var(--k-card) 16%, transparent); }
.dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.dash-kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--k-card) 7%, transparent); border: 1px solid color-mix(in srgb, var(--k-card) 10%, transparent); }
.dash-kpi dt { font-size: 12px; color: var(--k-on-ink-muted); }
.dash-kpi dd { margin: 0; font-family: var(--k-font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.quick { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.qa { flex: none; min-height: 48px; padding: 0 16px 0 6px; border-radius: 16px; border: 1px solid var(--k-line); background: var(--k-card); display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.qa .qi { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.grid-cards { display: flex; flex-direction: column; gap: 16px; }

/* onboarding */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stepbar { height: 6px; border-radius: var(--k-r-pill); background: var(--k-line); }
.stepbar.on { background: var(--k-ink); }
.dogcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--k-card); border: 1px solid var(--k-line); }
.dogav { width: 48px; height: 48px; border-radius: 15px; background: var(--k-ear-light); color: var(--k-ink); display: flex; align-items: center; justify-content: center; font-family: var(--k-font-display); font-weight: 800; font-size: 20px; flex: none; }
.dogcard form { margin: 0; }
.code-box { font-family: var(--k-font-mono); font-size: 26px; font-weight: 500; letter-spacing: .08em; padding: 14px; border-radius: 16px; background: var(--k-paper); text-align: center; margin: 0; }
.wa-status { display: inline-flex; align-self: flex-start; align-items: center; gap: 9px; min-height: 30px; padding: 0 12px; border-radius: var(--k-r-pill); font-size: 13px; font-weight: 600; }

/* review of an extraction */
.line { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; border: 1px solid var(--k-line); background: var(--k-card); }
.line.warn { border-color: var(--k-coral); box-shadow: 0 0 0 1px var(--k-coral); }
.warnpill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--k-tag-skin-fg); }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 18px; border: 1px solid var(--k-line); background: var(--k-card); cursor: pointer; text-align: left; box-sizing: border-box; transition: transform var(--k-dur-fast) var(--k-ease-out), background var(--k-dur-fast) ease; }
.opt:hover { background: var(--k-paper); transform: translateX(3px); }
.opt .qi { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.opt b { font-size: 15px; }
.opt span span { font-size: 13px; color: var(--k-text-muted); }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--k-line-soft) 0%, var(--k-paper) 50%, var(--k-line-soft) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.urlbox { font-family: var(--k-font-mono); font-size: 12px; padding: 10px 12px; border-radius: 12px; background: var(--k-paper); word-break: break-all; }

/* ---------- auth (Acceso) ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--k-paper); }
.auth-brand { position: relative; overflow: hidden; background: var(--k-ink-night); color: var(--k-card); border-radius: 0 0 32px 32px; padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-brand > :not(.blob):not(.grain) { position: relative; }
.auth-brand h1 { margin: 0; font-size: 36px; font-weight: 800; line-height: 1; }
.auth-brand .lead { margin: 0; font-size: 15px; line-height: 1.45; color: var(--k-on-ink-muted); }
.auth-desk, .auth-note { display: none; }
.auth-form { padding: 20px 20px 32px; display: flex; justify-content: center; }
.auth-form-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.auth-locale { display: flex; justify-content: flex-end; }
.auth-form h2 { margin: 0; font-size: 30px; font-weight: 800; display: none; }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--k-text-soft); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--k-line); }

@media (min-width: 900px) {
  .app-top { padding: 16px 32px; }
  .app-top .app-logo { display: inline-flex; }
  .app-title { display: none; }
  .app-nav { display: flex; gap: 4px; margin-left: 20px; }
  .app-nav a { font-size: 14px; font-weight: 500; padding: 9px 15px; border-radius: var(--k-r-pill); color: var(--k-text-muted); }
  .app-nav a:hover { background: var(--k-line); color: var(--k-text); }
  .app-nav a[aria-current="page"] { background: var(--k-ink); color: var(--k-card); font-weight: 600; }
  .app-cta { display: inline-flex; }
  .app-locale { display: flex; }
  .app-main { padding: 8px 32px 56px; gap: 20px; }
  .page-h1 { display: block; margin: 0; font-size: 34px; font-weight: 800; }
  .tabbar { display: none; }
  .toast { bottom: 32px; }
  .grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
  .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-hero h1 { font-size: 64px; }
  .dog-avatar-lg { width: 120px; height: 120px; border-radius: 36px; font-size: 52px; }
  .quick { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  dialog.sheet { margin: auto 32px 32px auto; width: 440px; border-radius: 28px; }
  .auth { flex-direction: row; }
  .auth-brand { flex: 1 1 480px; border-radius: 0; padding: 64px; justify-content: space-between; }
  .auth-copy { display: none; }
  .auth-desk { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
  .auth-desk-title { margin: 0; font-size: clamp(40px, 5vw, 64px); font-weight: 800; line-height: .98; }
  .auth-note { display: block; margin: 0; font-size: 13px; color: var(--k-on-ink-muted); }
  .auth-benefits { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
  .auth-benefits li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
  .auth-benefits .n { flex: none; width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--k-card) 10%, transparent); border: 1px solid color-mix(in srgb, var(--k-card) 16%, transparent); display: flex; align-items: center; justify-content: center; font-family: var(--k-font-mono); font-size: 13px; color: var(--k-lime); }
  .auth-form { flex: 1 1 420px; align-items: center; padding: 64px; }
  .auth-form h2 { display: block; }
}

/* Kony mark with token colors (light and ink backgrounds) */
.kony-mark .km-body { fill: var(--k-ink); }
.kony-mark .km-ear { fill: var(--k-ear-light); }
.kony-mark .km-face { fill: var(--k-paper); }
.kony-mark.inverse .km-body { fill: var(--k-card); }
.kony-mark.inverse .km-ear { fill: var(--k-ear-dark); }
.kony-mark.inverse .km-face { fill: var(--k-ink-night); }

.auth-logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--k-card); font-weight: 800; font-size: 26px; align-self: flex-start; }
.auth-logo:hover { color: var(--k-card); }
.auth-logo .wordmark { display: none; }
.auth-copy { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) {
  .auth-logo .wordmark { display: inline; }
  .auth-copy { display: none; }
}

/* utilities (inline style attributes are blocked by the CSP) */
.self-center { align-self: center; }
.self-start { align-self: flex-start; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0; }
.m-0 { margin: 0; }
.danger-text { color: var(--k-tag-skin-fg); }

/* onboarding (Bienvenida) */
.onb { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.onb-head { display: flex; flex-direction: column; gap: 14px; }
.onb-head-row { display: flex; align-items: center; justify-content: space-between; }
.iconbtn.is-disabled { opacity: .3; }
.onb-title { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.05; }
.onb-list { list-style: none; margin: 0; padding: 0; }
.onb-footer { position: sticky; bottom: 92px; display: flex; flex-direction: column; gap: 4px; padding: 12px 0 0; background: var(--k-paper); }
.dogpills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.dogpill { flex: none; min-height: 44px; padding: 0 16px 0 6px; border-radius: var(--k-r-pill); border: 1px solid var(--k-line); background: var(--k-card); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.dogpill .mini-av { width: 32px; height: 32px; font-size: 14px; }
.dogpill[aria-current="true"] { background: var(--k-ink); border-color: var(--k-ink); color: var(--k-card); }
.dogpill .count { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: var(--k-r-pill); background: var(--k-tag-skin-bg); color: var(--k-tag-skin-fg); }
.fieldset-reset { border: 0; padding: 0; min-width: 0; }
.lbl { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.onb-done { margin-top: 12px; padding: 24px; }
.onb-done-title { margin: 0; font-size: 40px; font-weight: 800; line-height: 1; }
.hero-chips { list-style: none; margin: 0; padding: 0; }
.onb-done-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--k-on-ink-muted); }
@media (min-width: 900px) { .onb-footer { bottom: 0; padding-bottom: 24px; } }

/* chart sizing in 5% steps (no inline styles under the CSP) */
.h-0 { height: max(0%, 4px); }
.h-5 { height: max(5%, 4px); }
.h-10 { height: max(10%, 4px); }
.h-15 { height: max(15%, 4px); }
.h-20 { height: max(20%, 4px); }
.h-25 { height: max(25%, 4px); }
.h-30 { height: max(30%, 4px); }
.h-35 { height: max(35%, 4px); }
.h-40 { height: max(40%, 4px); }
.h-45 { height: max(45%, 4px); }
.h-50 { height: max(50%, 4px); }
.h-55 { height: max(55%, 4px); }
.h-60 { height: max(60%, 4px); }
.h-65 { height: max(65%, 4px); }
.h-70 { height: max(70%, 4px); }
.h-75 { height: max(75%, 4px); }
.h-80 { height: max(80%, 4px); }
.h-85 { height: max(85%, 4px); }
.h-90 { height: max(90%, 4px); }
.h-95 { height: max(95%, 4px); }
.h-100 { height: max(100%, 4px); }
.w-0 { flex: 0 0 0%; }
.w-5 { flex: 0 0 5%; }
.w-10 { flex: 0 0 10%; }
.w-15 { flex: 0 0 15%; }
.w-20 { flex: 0 0 20%; }
.w-25 { flex: 0 0 25%; }
.w-30 { flex: 0 0 30%; }
.w-35 { flex: 0 0 35%; }
.w-40 { flex: 0 0 40%; }
.w-45 { flex: 0 0 45%; }
.w-50 { flex: 0 0 50%; }
.w-55 { flex: 0 0 55%; }
.w-60 { flex: 0 0 60%; }
.w-65 { flex: 0 0 65%; }
.w-70 { flex: 0 0 70%; }
.w-75 { flex: 0 0 75%; }
.w-80 { flex: 0 0 80%; }
.w-85 { flex: 0 0 85%; }
.w-90 { flex: 0 0 90%; }
.w-95 { flex: 0 0 95%; }
.w-100 { flex: 0 0 100%; }
.delay-0 { animation-delay: 0ms; }
.delay-1 { animation-delay: 70ms; }
.delay-2 { animation-delay: 140ms; }
.delay-3 { animation-delay: 210ms; }
.delay-4 { animation-delay: 280ms; }
.delay-5 { animation-delay: 350ms; }
.delay-6 { animation-delay: 420ms; }
.delay-7 { animation-delay: 490ms; }
.delay-8 { animation-delay: 560ms; }
.delay-9 { animation-delay: 630ms; }
.delay-10 { animation-delay: 700ms; }
.delay-11 { animation-delay: 770ms; }
.list-reset { list-style: none; margin: 0; padding: 0; }
.dash-kpi .note { font-size: 12px; color: var(--k-on-ink-muted); }
.dash-kpi .note.up { color: var(--k-coral); }
.dash-kpi .note.down { color: var(--k-lime); }
.dash-kpi .note a { color: var(--k-lime); text-decoration: underline; }
.status-pill.is-pending { background: color-mix(in srgb, var(--k-coral) 18%, transparent); color: var(--k-coral); }
.hero-top { align-items: flex-start; }
.hero-edit { background: color-mix(in srgb, var(--k-card) 10%, transparent); color: var(--k-card); border: 1px solid color-mix(in srgb, var(--k-card) 18%, transparent); flex: none; }
.hero-edit:hover { color: var(--k-card); background: color-mix(in srgb, var(--k-card) 18%, transparent); }
.hero-edit span { display: none; }
.dash-top { justify-content: space-between; }
.empty { padding: 8px 0; }
.split span { display: block; height: 100%; border-radius: 3px; }
@media (min-width: 900px) { .hero-edit span { display: inline; } }

/* Registrar */
.narrow { width: 100%; max-width: 640px; margin: 0 auto; }
.page-title { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.opt:has(input:focus-visible) { outline: 2px solid var(--k-violet); outline-offset: 2px; }
.opt .grow { line-height: 1.35; }
.reading { align-items: flex-start; }
.reading-icon, .done-icon { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.sk-line { display: block; height: 14px; width: 100%; }
.sk-line.short { width: 60%; }
.total-row { padding: 4px 2px; font-size: 16px; }
.pending-card { display: flex; flex-direction: column; gap: 10px; border-color: var(--k-coral); }
@media (min-width: 900px) { .page-title { font-size: 34px; } }
.no-tabbar .app-main { padding-bottom: 32px; }
.no-tabbar .onb-footer { bottom: 0; padding-bottom: 16px; }
.no-tabbar .toast { bottom: 24px; }
dialog.sheet { overflow-y: auto; }
.share-cta { margin-top: 4px; }
.disclaimer { margin: 0; }

/* Gastos */
.month-card { gap: 14px; }
.month-card .legend div { color: var(--k-card); }
.month-nav h2 { flex: 1; text-align: center; font-size: 18px; }
.iconbtn.on-ink { color: var(--k-card); }
.iconbtn.on-ink:hover { background: color-mix(in srgb, var(--k-card) 12%, transparent); }
.result-amount { font-size: 34px; }
.bcol:hover .bar { opacity: .8; }
.forecast .big-amount { font-size: 32px; }

/* Perro */
.dog-head { display: flex; align-items: center; gap: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.facts dt { font-size: 12px; color: var(--k-text-muted); }
.facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.weight-now { font-size: 36px; }
.weights { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 170px; align-items: end; }
.weight-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.weight-bar .bar { max-height: 110px; }
.weight-bar .blabel { font-size: 11px; color: var(--k-text-soft); white-space: nowrap; }
.weight-del { position: absolute; top: -4px; right: -2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--k-line); color: var(--k-text-muted); display: none; align-items: center; justify-content: center; cursor: pointer; }
.weight-bar:hover .weight-del, .weight-bar:focus-within .weight-del { display: inline-flex; }

/* Cuenta */
.item .avbtn { width: 48px; height: 48px; }
a.item { color: var(--k-text); }
form.item { margin: 0; }
.danger-zone > summary { list-style: none; cursor: pointer; }
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone[open] > summary { display: none; }
/* a card inside a card (shared partials) loses its frame */
.card .card { border: 0; padding: 0; background: transparent; box-shadow: none; border-radius: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-nav { display: flex; align-items: center; gap: 8px; }

/* Narrow phones: the header "+ Añadir" button keeps only its icon; the label stays for screen readers. */
.add { white-space: nowrap; }
@media (max-width: 430px) {
  .app-top .add { width: 44px; padding: 0; justify-content: center; }
  .app-top .add .add-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
