/* Terminal de autoservicio y validador del bus */
body { min-height: 100vh; background: #050913; color: #eef2fa; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(900px 600px at 60% 10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%), radial-gradient(700px 500px at 0% 100%, color-mix(in srgb, var(--brand2) 10%, transparent), transparent 60%); }
.stage { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 360px) auto; justify-content: center; align-items: center; gap: 56px; padding: 66px 32px 90px; }
.side h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.side > p { margin: 10px 0 18px; color: #93a0b8; font-size: 14.5px; }
.ctl { display: flex; flex-direction: column; gap: 10px; }
.ctl h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #6b778d; margin-top: 8px; }
.ctl select, .ctl .box { width: 100%; height: 44px; padding: 0 12px; border-radius: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #eef2fa; font-size: 14px; font-weight: 600; outline: 0; }
.ctl select option { color: #0b1222; }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); font-size: 14px; font-weight: 600; }
.ctl-row small { display: block; font-weight: 500; color: #93a0b8; font-size: 12px; }
.ctl-btn { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 14px; border-radius: 13px; font-size: 13.5px; font-weight: 700; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); text-align: left; transition: background .2s; width: 100%; }
.ctl-btn:hover { background: rgba(255,255,255,.12); }
.ctl-btn small { display: block; font-weight: 500; color: #93a0b8; font-size: 12px; }
.ctl-btn .ic-i, .ctl-btn i[data-i] { flex: none; }
.ctl-btn.primary { background: var(--brand); border-color: transparent; }
.ctl-btn.warn { border-color: rgba(251,191,36,.35); }
.sw { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.18); flex: none; transition: background .25s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); }
.sw.on { background: #f59e0b; } .sw.on::after { transform: translateX(18px); }
.scan-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.scan-list > * { flex: none; }
.scan-list .ctl-btn { min-height: 0; padding: 8px 12px; }
.scan-list .ctl-btn .ic-i { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: rgba(255,255,255,.08); }
.scan-list .grp { font-size: 11.5px; color: #6b778d; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; margin: 8px 2px 2px; }

/* ===== Terminal (kiosco) ===== */
.kiosk { position: relative; width: 600px; padding: 26px 26px 0; border-radius: 40px 40px 18px 18px; background: linear-gradient(180deg, #e9edf4, #c9d1de); box-shadow: 0 50px 100px rgba(0,0,0,.55), inset 0 2px 0 #fff; }
.kiosk::after { content: ''; position: absolute; left: 50%; bottom: -60px; width: 220px; height: 60px; margin-left: -110px; background: linear-gradient(180deg, #b7c0cf, #8f9aac); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); z-index: -1; }
.k-top { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 14px; color: #475467; font-size: 12px; font-weight: 700; }
.k-top .cam { width: 12px; height: 12px; border-radius: 50%; background: #1e293b; box-shadow: 0 0 0 4px #cbd5e1; }
.k-screen { position: relative; height: clamp(500px, calc(100vh - 330px), 680px); border-radius: 22px; overflow: hidden; background: #f6f8fc; color: #101828; box-shadow: inset 0 0 0 8px #111827; padding: 8px; }
.k-in { position: relative; height: 100%; border-radius: 15px; overflow: hidden; background: #f6f8fc; display: flex; flex-direction: column; }
.k-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; background: #fff; border-bottom: 1px solid #eaecf0; }
.k-head img, .k-head .logo-fallback { width: 44px; height: 44px; object-fit: contain; }
.k-head b { display: block; font-size: 16px; font-weight: 800; } .k-head span { font-size: 12.5px; color: #667085; }
.k-head .k-clock { margin-left: auto; text-align: right; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.k-head .k-clock small { display: block; font-size: 11.5px; color: #667085; font-weight: 600; }
.k-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; scrollbar-width: none; }
.k-body h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.k-body h2 + p { color: #667085; font-size: 16px; margin-top: 6px; }
.k-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.k-steps i { flex: 1; height: 6px; border-radius: 6px; background: #e4e7ec; } .k-steps i.on { background: var(--brand); }
.k-big { display: flex; align-items: center; gap: 18px; width: 100%; padding: 22px; border-radius: 24px; background: var(--brand); color: #fff; text-align: left; box-shadow: 0 16px 36px color-mix(in srgb, var(--brand) 35%, transparent); transition: transform .12s; }
.k-big:active, .k-opt:active, .k-btn:active { transform: scale(.98); }
.k-big .ic-i { width: 56px; height: 56px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.18); }
.k-big b { display: block; font-size: 24px; font-weight: 800; } .k-big span { font-size: 14.5px; opacity: .85; }
.k-big.alt { background: #fff; color: #101828; box-shadow: 0 1px 2px rgba(16,24,40,.06); border: 1px solid #eaecf0; }
.k-big.alt .ic-i { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.k-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.k-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border-radius: 20px; background: #fff; border: 2px solid #eaecf0; text-align: left; transition: transform .12s, border-color .2s; }
.k-opt:hover { border-color: color-mix(in srgb, var(--brand) 40%, #fff); }
.k-opt .ic-i { width: 50px; height: 50px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); flex: none; }
.k-opt b { display: block; font-size: 19px; font-weight: 800; } .k-opt span { font-size: 13.5px; color: #667085; }
.k-opt .r { margin-left: auto; text-align: right; } .k-opt .r strong { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.k-opt:disabled { opacity: .5; cursor: not-allowed; }
.k-opt.col { flex-direction: column; align-items: flex-start; }
.k-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.k-qty { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 26px 0 10px; }
.k-qty button { width: 84px; height: 84px; border-radius: 50%; background: #fff; border: 2px solid #e4e7ec; display: grid; place-items: center; }
.k-qty button .ic-i { width: 34px; height: 34px; }
.k-qty button:disabled { opacity: .35; }
.k-qty b { font-size: 92px; font-weight: 800; width: 130px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.k-sum { margin-top: 14px; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid #eaecf0; }
.k-sum div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 16px; }
.k-sum div span { color: #667085; }
.k-sum .tot { border-top: 1px dashed #d0d5dd; margin-top: 6px; padding-top: 12px; font-size: 22px; font-weight: 800; }
.k-foot { display: flex; gap: 12px; margin-top: auto; padding-top: 18px; }
.k-btn { flex: 1; height: 66px; border-radius: 20px; font-size: 19px; font-weight: 800; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; }
.k-btn.ghost { background: #fff; color: #344054; border: 2px solid #e4e7ec; flex: .55; }
.k-btn.ok { background: #16a34a; }
.k-btn:disabled { opacity: .4; }
.k-note { display: flex; gap: 10px; padding: 13px 15px; border-radius: 16px; background: #eff8ff; color: #175cd3; font-size: 14px; margin-top: 14px; }
.k-note.warn { background: #fffaeb; color: #b54708; } .k-note.bad { background: #fef3f2; color: #b42318; }
.k-note .ic-i { margin-top: 1px; }
.k-board { margin-top: 18px; background: #0b1222; color: #e2e8f0; border-radius: 20px; padding: 14px 16px; }
.k-board h4 { font-size: 12px; color: #fbbf24; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.k-board div { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; font-family: var(--mono); }
.k-board div b { color: #fbbf24; } .k-board div em { font-style: normal; color: #86efac; } .k-board div em.full { color: #fda4af; }
.k-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sensor { position: relative; width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 26px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 16%, #fff), #fff 70%); }
.sensor::before, .sensor::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); animation: ring 1.8s ease-out infinite; }
.sensor::after { animation-delay: .9s; }
@keyframes ring { from { transform: scale(.75); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.sensor .ic-i { width: 92px; height: 92px; color: var(--brand); }
.sensor.ok { background: radial-gradient(circle, #dcfce7, #fff 70%); } .sensor.ok .ic-i { color: #16a34a; } .sensor.ok::before, .sensor.ok::after { border-color: rgba(22,163,74,.4); }
.sensor.bad { background: radial-gradient(circle, #fee4e2, #fff 70%); } .sensor.bad .ic-i { color: #d92d20; } .sensor.bad::before, .sensor.bad::after { animation: none; opacity: 0; }
.k-center h2 { font-size: 30px; } .k-center p { color: #667085; font-size: 16px; margin-top: 8px; max-width: 420px; }
.hello { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: #ecfdf3; color: #067647; margin-bottom: 14px; }
.hello .av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: linear-gradient(135deg, #ff8a5b, #e84393); }
.hello b { display: block; font-size: 22px; color: #101828; } .hello span { font-size: 14px; }
.spin { width: 84px; height: 84px; border-radius: 50%; border: 8px solid #e4e7ec; border-top-color: var(--brand); animation: spin .8s linear infinite; margin-bottom: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.bills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.bills button { height: 70px; border-radius: 16px; background: linear-gradient(135deg, #dcfce7, #bbf7d0); border: 2px solid #86efac; font-size: 22px; font-weight: 800; color: #14532d; }
.slot { position: relative; height: 22px; margin: 0 60px; border-radius: 0 0 10px 10px; background: #111827; box-shadow: inset 0 4px 6px rgba(0,0,0,.6); }
.k-printer { display: flex; justify-content: center; padding: 10px 0 0; gap: 16px; align-items: flex-start; }
.k-printer .lbl { color: #475467; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.k-readers { display: flex; justify-content: center; gap: 22px; padding: 14px 0 18px; }
.k-readers span { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #475467; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.k-readers i[data-i], .k-readers .ic-i { width: 54px; height: 54px; padding: 13px; border-radius: 16px; background: #1f2937; color: #94a3b8; transition: all .3s; }
.k-readers span.on i, .k-readers span.on .ic-i { background: var(--brand); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 25%, transparent); }
.paper-out { position: absolute; left: 50%; top: calc(100% - 4px); width: 230px; margin-left: -115px; background: #fdfdfb; color: #111; font-family: var(--mono); font-size: 11px; padding: 14px 14px 18px; box-shadow: 0 14px 30px rgba(0,0,0,.35); transform-origin: top; clip-path: inset(0 0 100% 0); transition: clip-path 2.2s steps(22); z-index: 5; }
.paper-out.show { clip-path: inset(0 0 0 0); }
.paper-out .pl { display: flex; justify-content: space-between; line-height: 1.6; }
.paper-out .pq { width: 110px; height: 110px; margin: 8px auto 4px; } .paper-out .pq svg { width: 100%; height: 100%; }
.paper-out hr { border: 0; border-top: 1.5px dashed #999; margin: 8px 0; }
.paper-out .c { text-align: center; }
.offline-k { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; text-align: center; background: rgba(246,248,252,.96); padding: 30px; }
.offline-k .ic-i { width: 80px; height: 80px; padding: 18px; border-radius: 26px; background: #fef3f2; color: #d92d20; margin: 0 auto 18px; }
.offline-k h2 { font-size: 28px; font-weight: 800; } .offline-k p { color: #667085; font-size: 16px; margin-top: 8px; }

/* ===== Validador ===== */
.val { position: relative; width: 440px; padding: 22px; border-radius: 36px; background: linear-gradient(160deg, #2b313c, #0e1117 55%, #1f242d); box-shadow: 0 50px 100px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.val-top { display: flex; justify-content: space-between; align-items: center; color: #94a3b8; font-size: 12px; font-weight: 700; padding: 0 6px 12px; }
.val-top .led { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.val-top .led.off { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
.v-screen { position: relative; height: 520px; border-radius: 22px; overflow: hidden; background: #030712; color: #fff; display: flex; flex-direction: column; box-shadow: inset 0 0 0 6px #000; }
.v-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; font-size: 13px; color: #94a3b8; font-weight: 700; }
.v-head b { color: #fff; }
.v-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 26px; }
.v-idle .ring { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; border: 3px dashed rgba(255,255,255,.18); margin-bottom: 22px; animation: rot 14s linear infinite; }
.v-idle .ring .ic-i { width: 76px; height: 76px; color: color-mix(in srgb, var(--brand) 60%, #fff); animation: rot 14s linear infinite reverse; }
@keyframes rot { to { transform: rotate(360deg); } }
.v-body h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.v-body p { color: #94a3b8; font-size: 16px; margin-top: 8px; }
.v-res { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px; animation: vin .35s var(--spring); }
@keyframes vin { from { opacity: 0; transform: scale(.94); } }
.v-res.ok { background: radial-gradient(circle at 50% 35%, #16a34a, #052e16 75%); }
.v-res.bad { background: radial-gradient(circle at 50% 35%, #dc2626, #450a0a 75%); }
.v-res.warn { background: radial-gradient(circle at 50% 35%, #d97706, #451a03 75%); }
.v-res .big { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); margin-bottom: 20px; }
.v-res .big .ic-i { width: 70px; height: 70px; }
.v-res h2 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.v-res p { font-size: 17px; margin-top: 10px; opacity: .92; max-width: 340px; }
.v-res .tag { margin-top: 16px; padding: 7px 14px; border-radius: 99px; background: rgba(0,0,0,.28); font-size: 13px; font-weight: 700; font-family: var(--mono); }
.v-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.08); }
.v-foot div { padding: 12px 6px; text-align: center; font-size: 11px; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.v-foot b { display: block; font-size: 22px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.v-pad { display: flex; justify-content: center; gap: 18px; padding: 18px 0 4px; color: #64748b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.v-pad span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.v-pad .ic-i, .v-pad i[data-i] { width: 50px; height: 50px; padding: 12px; border-radius: 15px; background: #1e293b; color: #94a3b8; }
.v-off { position: absolute; left: 14px; right: 14px; top: 46px; padding: 8px 12px; border-radius: 12px; background: rgba(245,158,11,.16); border: 1px solid rgba(245,158,11,.4); color: #fde68a; font-size: 12.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; z-index: 3; }
.op { margin-top: 18px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.op h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #6b778d; margin-bottom: 8px; }
.op .bar { height: 10px; border-radius: 10px; background: rgba(255,255,255,.1); overflow: hidden; margin: 8px 0; }
.op .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); border-radius: inherit; transition: width .6s var(--ease); }
.op .nums { display: flex; justify-content: space-between; font-size: 13px; color: #93a0b8; }
.op .nums b { color: #fff; font-size: 16px; }
.log { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; font-size: 12.5px; }
.log div { display: flex; gap: 8px; color: #b5c0d4; } .log time { color: #6b778d; font-family: var(--mono); }
.log .ok { color: #86efac; } .log .bad { color: #fda4af; } .log .warn { color: #fcd34d; }

@media (max-width: 1100px) { .stage { grid-template-columns: 1fr; justify-items: center; gap: 28px; } .side { max-width: 600px; width: 100%; order: 2; } }
@media (max-width: 680px) {
  .stage { padding: 16px 12px 90px; }
  .kiosk { width: 100%; padding: 14px 12px 0; border-radius: 26px 26px 12px 12px; }
  .k-screen { min-height: 560px; height: 76vh; }
  .k-body { padding: 16px; } .k-body h2 { font-size: 23px; }
  .k-grid { grid-template-columns: 1fr; }
  .k-big b { font-size: 20px; }
  .val { width: 100%; padding: 14px; }
  .v-screen { height: 460px; }
}
