/* KingMoto — negro, cromo y verde del logo, con el rojo de la bandera para alertas. */
:root {
  color-scheme: dark;
  --bg: #08090a; --bg2: #0f1113; --card: #15181b; --card2: #1b1f23; --line: #262b30; --line2: #343a40;
  --tx: #eef1f3; --tx2: #a4adb5; --tx3: #6f7880;
  --verde: #1f9d45; --verde-c: #3ccf6a; --verde-f: rgba(60, 207, 106, .12);
  --rojo: #e2393f; --rojo-f: rgba(226, 57, 63, .13); --ambar: #f2a93b; --ambar-f: rgba(242, 169, 59, .13);
  --cromo: linear-gradient(180deg, #fff 0%, #d9dee2 40%, #8f979e 100%);
  --r: 14px; --r2: 20px;
  --f-tit: 'Saira Condensed', 'Arial Narrow', sans-serif; --f: 'Barlow', system-ui, sans-serif;
  --sombra: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--tx); font: 16px/1.5 var(--f); min-height: 100vh; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--verde-c); outline-offset: 2px; border-radius: 6px; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ic { display: inline-block; width: 1.15em; height: 1.15em; flex: none; background: currentColor; -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; vertical-align: -.2em; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 600; background: var(--card2); border: 1px solid var(--line2); text-decoration: none; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: #4a525a; background: #20252a; }
.btn:active { transform: scale(.98); }
.btn.prim { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.prim:hover { background: #22b04e; }
.btn.wa { background: #1c2b22; border-color: #2a4a35; color: #7ee2a0; }
.btn.peligro { color: #ff8c90; border-color: #5a2a2d; background: #241517; }
.btn.chico { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.ancho { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icbtn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--card2); border: 1px solid var(--line2); text-decoration: none; }
.icbtn .ic { width: 20px; height: 20px; }

/* ---------- Campos ---------- */
.campo { display: grid; gap: 6px; }
.campo > span { font-size: 13px; color: var(--tx2); font-weight: 600; letter-spacing: .02em; }
.inp { width: 100%; min-height: 46px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; outline: none; transition: border-color .15s; }
.inp:focus { border-color: var(--verde-c); }
textarea.inp { min-height: 90px; resize: vertical; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--tx2) 50%), linear-gradient(135deg, var(--tx2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* ---------- Pastillas de disponibilidad ---------- */
.disp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; }
.disp::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.disp.si { color: var(--verde-c); background: var(--verde-f); }
.disp.pocas { color: var(--ambar); background: var(--ambar-f); }
.disp.no { color: #ff7b80; background: var(--rojo-f); }
.fit { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 8px; }
.fit .ic { width: 15px; height: 15px; }
.fit.verificado, .fit.catalogo { color: var(--verde-c); background: var(--verde-f); }
.fit.universal { color: #b9c3cc; background: #20262b; }
.fit.no { color: #ff9a9e; background: var(--rojo-f); }

/* ---------- Avisos ---------- */
#avisos { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.aviso { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; background: #1c2a21; border: 1px solid #2c4a36; box-shadow: var(--sombra); animation: entra .25s ease; font-weight: 500; }
.aviso.error { background: #2b1719; border-color: #5c2a2e; }
.aviso.error .ic { color: #ff7b80; } .aviso .ic { color: var(--verde-c); }
.aviso.sale { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Hojas (modales) ---------- */
.velo { position: fixed; inset: 0; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: aparece .2s; }
@keyframes aparece { from { opacity: 0; } }
.hoja { background: var(--bg2); width: 100%; max-width: 980px; max-height: 94vh; overflow: auto; border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0; animation: sube .28s cubic-bezier(.2, .8, .2, 1); position: relative; overscroll-behavior: contain; }
.hoja.angosta { max-width: 520px; }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 760px) { .velo { align-items: center; padding: 24px; } .hoja { border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 90vh; } }
.hoja-cab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hoja-cab h2 { font: 700 22px/1.1 var(--f-tit); letter-spacing: .01em; flex: 1; }
.hoja-cuerpo { padding: 18px 16px 28px; }
@media (min-width: 760px) { .hoja-cuerpo { padding: 24px 28px 32px; } }

.sinfoto { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 6px; background: radial-gradient(120% 90% at 30% 10%, #22282d, #121518 70%); color: #59636b; }
.sinfoto .ic { width: clamp(30px, 22%, 64px); height: auto; aspect-ratio: 1; color: #59646d; }
.prod .sinfoto .ic { width: 64px; height: 64px; }
.sinfoto small { font: 600 11px/1 var(--f); letter-spacing: .14em; text-transform: uppercase; color: #535c63; }

.vacio { text-align: center; color: var(--tx2); padding: 40px 16px; }
.vacio .ic { width: 40px; height: 40px; color: var(--tx3); margin-bottom: 10px; }
.cargando { display: grid; place-items: center; padding: 60px; color: var(--tx3); }
.giro { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--verde-c); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
