/* OMNIA · sistema visual
   Concepto: vitrina luminosa. Porcelana fría + tinta azul noche, cobalto para acciones,
   un "sol" amarillo solo para lo que debe brillar (ofertas, el punto del logo). */
:root {
  --bg: #F3F5F9; --surface: #FFFFFF; --surface-2: #EAEEF5; --ink: #0D1B33; --muted: #5A6681; --line: #DCE2EC;
  --cobalt: #2340F5; --cobalt-ink: #FFFFFF; --cobalt-soft: #E6EAFF; --sun: #FFC23A; --sun-ink: #2B1D00;
  --ok: #17895A; --ok-soft: #DDF3E8; --warn: #A86A00; --warn-soft: #FFF1D3; --bad: #C8323A; --bad-soft: #FDE3E4; --info: #2E62C9; --info-soft: #E1EBFF;
  --shadow: 0 1px 2px rgba(13,27,51,.06), 0 8px 24px rgba(13,27,51,.08);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 14px; --r-sm: 9px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A1120; --surface: #111A2C; --surface-2: #18233A; --ink: #EDF1F9; --muted: #98A3BC; --line: #24314B;
  --cobalt: #7088FF; --cobalt-ink: #0A1120; --cobalt-soft: #1B2650; --sun: #FFC94D; --sun-ink: #2B1D00;
  --ok: #4CC98E; --ok-soft: #12301F; --warn: #F2B544; --warn-soft: #33270E; --bad: #FF7A80; --bad-soft: #3A1619; --info: #86A8FF; --info-soft: #172647;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0A1120; --surface: #111A2C; --surface-2: #18233A; --ink: #EDF1F9; --muted: #98A3BC; --line: #24314B;
  --cobalt: #7088FF; --cobalt-ink: #0A1120; --cobalt-soft: #1B2650; --sun: #FFC94D; --sun-ink: #2B1D00;
  --ok: #4CC98E; --ok-soft: #12301F; --warn: #F2B544; --warn-soft: #33270E; --bad: #FF7A80; --bad-soft: #3A1619; --info: #86A8FF; --info-soft: #172647;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35); color-scheme: dark }

* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { background: var(--bg); color: var(--ink) }
body { font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; margin: 0 }
h1, h2, h3, h4 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -.01em }
a { color: inherit }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 2px; border-radius: 6px }
.mono { font-family: var(--f-mono); letter-spacing: 0 }
.num { font-variant-numeric: tabular-nums }
.muted { color: var(--muted) }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted) }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: .16em }
.logo-mark { width: 30px; height: 30px; color: var(--cobalt) }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap }
.btn:hover { border-color: var(--ink) }
.btn:active { transform: scale(.98) }
.btn.primary { background: var(--cobalt); color: var(--cobalt-ink); border-color: var(--cobalt) }
.btn.primary:hover { filter: brightness(1.08) }
.btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.btn.sun { background: var(--sun); color: var(--sun-ink); border-color: var(--sun) }
.btn.wa { background: #1DA851; color: #fff; border-color: #1DA851 }
.btn.ghost { background: transparent; border-color: transparent }
.btn.ghost:hover { background: var(--surface-2) }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); background: var(--bad-soft) }
.btn.sm { padding: 6px 12px; font-size: 13.5px }
.btn.block { width: 100% }
.btn[disabled] { opacity: .45; pointer-events: none }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; color: var(--ink) }
.icon-btn svg { width: 20px; height: 20px }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--sun); color: var(--sun-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center }

/* formularios */
.field { display: grid; gap: 5px; min-width: 0 }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted) }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; outline: none; min-width: 0 }
.input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft) }
textarea.input { resize: vertical; min-height: 80px }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr } }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 14px }
.check input { width: 18px; height: 18px; accent-color: var(--cobalt) }

/* chips y pastillas */
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink) }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.chip .c { font-weight: 500; opacity: .6; font-size: 12px }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap }
.pill.ok { background: var(--ok-soft); color: var(--ok) }
.pill.warn { background: var(--warn-soft); color: var(--warn) }
.pill.bad { background: var(--bad-soft); color: var(--bad) }
.pill.info { background: var(--info-soft); color: var(--info) }
.pill.sun { background: var(--sun); color: var(--sun-ink) }
.pill.plain { background: var(--surface-2); color: var(--muted) }

/* paneles laterales y modales */
.scrim { position: fixed; inset: 0; background: rgba(6,12,25,.48); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s }
.scrim.open { opacity: 1; pointer-events: auto }
.sheet { position: fixed; z-index: 70; background: var(--bg); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2,.8,.2,1); visibility: hidden }
.sheet.open { visibility: visible }
.sheet.right { top: 0; right: 0; bottom: 0; width: min(460px, 100%); transform: translateX(105%); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px) }
.sheet.right.open { transform: none }
.sheet.center { left: 50%; top: 50%; width: min(980px, calc(100% - 24px)); max-height: calc(100% - 40px); border-radius: 20px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .25s, opacity .2s }
.sheet.center.open { transform: translate(-50%, -50%); opacity: 1 }
@media (max-width: 720px) { .sheet.center { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 94%; border-radius: 20px 20px 0 0; transform: translateY(100%); opacity: 1; padding-bottom: env(safe-area-inset-bottom, 0px) } .sheet.center.open { transform: none } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface) }
.sheet-h h3 { font-size: 19px }
.sheet-b { overflow: auto; padding: 18px; flex: 1; min-height: 0; overscroll-behavior: contain }
.sheet-f { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface) }

#toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 99px; font-weight: 600; z-index: 200; opacity: 0; pointer-events: none; transition: .22s; max-width: calc(100% - 32px); text-align: center }
#toast.show { opacity: 1; transform: translate(-50%, 0) }
#toast.bad { background: var(--bad); color: #fff }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) }
.empty { text-align: center; padding: 40px 16px; color: var(--muted) }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 18px; margin-bottom: 4px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.spacer { flex: 1 }
.demo-flag { font-size: 12px; background: var(--sun); color: var(--sun-ink); text-align: center; padding: 6px 12px; font-weight: 600 }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important } }
