/* KOMER · base visual compartida (sitio, panel, tienda, caja). Paleta del manual de identidad. */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --blue: #0754C8;        /* azul principal: acciones y estados confirmados */
  --blue-deep: #063F9E;   /* azul profundo: títulos */
  --blue-mid: #3B82F6;
  --blue-soft: #EAF2FF;   /* fondos */
  --blue-line: #D6E4FB;
  --ink: #0F1F3D;
  --muted: #5B6B88;
  --line: #E3EAF5;
  --bg: #F5F8FD;
  --card: #FFFFFF;
  --ok: #0A8F5A;
  --ok-soft: #E3F6EE;
  --warn: #B45309;
  --warn-soft: #FFF4E0;
  --bad: #C8312B;
  --bad-soft: #FDECEB;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 31, 61, .05), 0 8px 24px rgba(7, 84, 200, .07);
  --shadow-lg: 0 20px 50px rgba(7, 84, 200, .18);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; color: var(--blue-deep); letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--blue-mid); outline-offset: 2px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 1rem/1 var(--font); padding: .85em 1.25em; border-radius: 12px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; min-height: 46px; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy=true] { opacity: .6; cursor: default; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(7, 84, 200, .25); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue-line); }
.btn-outline:hover { border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--blue-deep); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-white { background: #fff; color: var(--blue-deep); }
.btn-wa { background: #1FAF54; color: #fff; }
.btn-sm { min-height: 38px; padding: .55em .9em; font-size: .92rem; border-radius: 10px; }
.btn-lg { min-height: 56px; font-size: 1.08rem; padding: 1em 1.6em; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn .ic { flex: none; }

/* Formularios */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .35em; color: var(--ink); }
.field { margin-bottom: 14px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3em; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=url], input[type=date], input[type=color], select, textarea {
  width: 100%; font: 500 1rem var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .75em .9em; min-height: 48px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(7, 84, 200, .12); }
textarea { min-height: 96px; resize: vertical; }
input[type=color] { padding: 4px; height: 48px; }
.check { display: flex; gap: .6em; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.money-input { font-size: 2.2rem !important; font-weight: 800 !important; text-align: center; letter-spacing: -.02em; color: var(--blue-deep) !important; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.badge { display: inline-flex; align-items: center; gap: .3em; font-size: .75rem; font-weight: 700; padding: .25em .6em; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deep); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gray { background: #EEF1F6; color: var(--muted); }

.logo img { display: block; height: 34px; width: auto; }
.logo-sm img { height: 28px; }

/* Página de estado */
.status-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--blue-soft), #fff 60%); }
.status-card { background: #fff; max-width: 460px; width: 100%; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 32px 28px; text-align: center; }
.status-card .logo { display: inline-block; margin-bottom: 18px; }
.status-card .status-ic { display: block; margin: 0 auto 10px; }

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