/* Subuh: sign in and registration, set on a station's forecourt. Blues come from the HiRO icon. */
.sb {
    --sb-cyan: #0995D4; --sb-mid: #1575B1; --sb-navy: #1F528E; --sb-deep: #0E2E57; --sb-ink: #071B35;
    --sb-muted: #3F5A75; --sb-line: #D9E6F0; --sb-border: #9DB6CB; --sb-sun: #FFD27A;
    --sb-bad: #B02525; --sb-bad-soft: #FCEBEB; --sb-good: #1B6B2B;
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: var(--sb-ink);
}
.sb *, .sb *::before, .sb *::after { box-sizing: border-box; }
/* The registration wizard renders inside the app shell, so Tabler's heading colour and link rules are in play. */
.sb h1, .sb h2 { font-family: "Bricolage Grotesque", system-ui, sans-serif; margin: 0; letter-spacing: -.02em; color: inherit; }
.sb p { margin: 0; }
.sb a { color: var(--sb-mid); text-decoration: underline; text-underline-offset: 2px; }
.sb a:hover { color: var(--sb-navy); }

/* Scene */
.sb-scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.sb-scene[data-sky="day"] { --s1: #0B5FA5; --s2: #0995D4; --s3: #A9E0F7; }
.sb-scene[data-sky="dawn"] { --s1: #0E2E57; --s2: #1575B1; --s3: #FFD27A; }
.sb-scene[data-sky="dusk"] { --s1: #0E2E57; --s2: #1F528E; --s3: #FFB46B; }
.sb-scene[data-sky="night"] { --s1: #040F20; --s2: #0E2E57; --s3: #1F528E; }
.sb-stop-top { stop-color: var(--s1); }
.sb-stop-mid { stop-color: var(--s2); }
.sb-stop-low { stop-color: var(--s3); }
.sb-build { transition: opacity .7s, transform .7s cubic-bezier(.2, 1.2, .4, 1); }
.sb-build.is-off { opacity: 0; transform: translateY(40px); }

/* Shell */
.sb-auth { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: flex-end; padding: 32px max(32px, 8vw); background: var(--sb-mid); }
.sb-panel { position: relative; z-index: 2; width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 18px; padding: 36px; border-radius: 28px; background: #fff; box-shadow: 0 24px 64px rgba(7, 27, 53, .35); }
.sb-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #fff; font: 700 22px/24px "Bricolage Grotesque", sans-serif; }
.sb a.sb-brand, .sb a.sb-btn { text-decoration: none; }
.sb-brand img { width: 36px; height: 36px; }
.sb a.sb-brand, .sb a.sb-brand:hover { color: #fff; }
.sb-brand-float { position: absolute; z-index: 2; left: max(32px, 4vw); top: 24px; }
.sb-time { position: absolute; z-index: 2; left: max(32px, 4vw); top: 96px; max-width: 560px; color: #fff; }
.sb-time h2 { font-size: clamp(40px, 5vw, 76px); line-height: 1; font-weight: 700; }
.sb-title { font-size: 38px; line-height: 42px; font-weight: 700; }
.sb-muted { color: var(--sb-muted); }
.sb-small { font-size: 14px; line-height: 20px; }
.sb-stack { display: flex; flex-direction: column; gap: 16px; }
.sb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sb-or { display: flex; align-items: center; gap: 12px; color: var(--sb-muted); font-size: 13px; }
.sb-or::before, .sb-or::after { content: ""; flex: 1; border-top: 1px solid var(--sb-line); }
.sb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Controls */
.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1.5px solid var(--sb-mid); border-radius: 999px; background: var(--sb-mid); color: #fff; font: 600 16px/20px "Instrument Sans", sans-serif; text-decoration: none; cursor: pointer; transition: background .2s, translate .2s; }
.sb a.sb-btn, .sb a.sb-btn:hover { color: #fff; }
.sb-btn:hover { background: var(--sb-navy); border-color: var(--sb-navy); translate: 0 -2px; }
.sb-btn:disabled { opacity: .6; cursor: not-allowed; translate: none; }
.sb-btn svg { width: 18px; height: 18px; flex: none; }
.sb-btn.is-line, .sb a.sb-btn.is-line { background: #fff; color: var(--sb-deep); border-color: #BFD4E6; }
.sb-btn.is-line:hover, .sb a.sb-btn.is-line:hover { background: #F2F8FC; color: var(--sb-deep); }
.sb-btn:focus-visible, .sb-input:focus-visible, .sb-eye:focus-visible, .sb a:focus-visible { outline: 3px solid var(--sb-mid); outline-offset: 2px; }
.sb-field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; line-height: 18px; }
.sb-field-note { font-weight: 400; font-size: 12px; line-height: 16px; color: var(--sb-muted); }
.sb-input { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--sb-border); border-radius: 12px; background: #fff; color: var(--sb-ink); font: 400 16px/20px "Instrument Sans", sans-serif; }
.sb-input[readonly] { background: #F2F8FC; color: var(--sb-muted); }
.sb-input-wrap { position: relative; display: flex; }
.sb-input-wrap .sb-input { padding-right: 48px; }
.sb-eye { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--sb-muted); cursor: pointer; }
.sb-eye svg { width: 20px; height: 20px; }
.sb-prefix { display: flex; align-items: center; height: 48px; padding: 0 12px; border: 1.5px solid var(--sb-border); border-right: 0; border-radius: 12px 0 0 12px; background: #F2F8FC; color: var(--sb-muted); font-weight: 400; font-size: 16px; }
.sb-prefix + .sb-input { border-radius: 0 12px 12px 0; }
.sb-check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 16px; line-height: 24px; cursor: pointer; }
.sb-check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--sb-mid); }
.sb-alert { padding: 12px; border-radius: 12px; background: var(--sb-bad-soft); color: var(--sb-bad); font-size: 14px; line-height: 20px; }
.sb-lang { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.sb-lang a, .sb-lang span { display: inline-flex; align-items: center; min-height: 44px; }
.sb-lang span[aria-current] { font-weight: 600; }

/* Registration */
.sb-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.sb-steps li { flex: 1; height: 6px; border-radius: 3px; background: var(--sb-line); }
.sb-steps li.is-on { background: var(--sb-mid); }
.sb-terms { max-height: 180px; overflow: auto; padding: 12px; border: 1.5px solid var(--sb-line); border-radius: 12px; font-size: 13px; line-height: 19px; }
.sb-progress { height: 8px; border-radius: 4px; background: var(--sb-line); overflow: hidden; }
.sb-progress i { display: block; height: 100%; background: var(--sb-mid); transition: width .4s; }

/* Waiting for a saved device to sign in */
.sb-wait { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0; text-align: center; }
.sb-gauges { display: flex; gap: 10px; align-items: flex-end; }
.sb-gauges span { position: relative; width: 22px; height: 56px; overflow: hidden; border: 1.5px solid var(--sb-border); border-radius: 6px; }
.sb-gauges i { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: var(--sb-mid); }

/* Motion. Every base state above is the finished state. */
@media (prefers-reduced-motion: no-preference) {
    .sb-tanker { animation: sb-drive 2.2s cubic-bezier(.2, .7, .2, 1) both; }
    .sb-panel { animation: sb-rise .6s cubic-bezier(.2, 1.1, .4, 1) both; }
    .sb-lamps { animation: sb-glow .9s ease-out both; }
    .sb-gauges i { animation: sb-fill 2.4s ease-in-out infinite; }
    .sb-gauges span:nth-child(2) i { animation-delay: .2s; }
    .sb-gauges span:nth-child(3) i { animation-delay: .4s; }
    .sb-gauges span:nth-child(4) i { animation-delay: .6s; }
}
@keyframes sb-drive { from { transform: translateX(-1250px); } }
@keyframes sb-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes sb-glow { from { opacity: 0; } }
@keyframes sb-fill { 0%, 100% { height: 12%; } 50% { height: 82%; } }

@media (max-width: 900px) {
    .sb-auth { justify-content: center; align-items: flex-start; padding: 84px 16px 16px; }
    .sb-brand-float { left: 16px; top: 16px; }
    .sb-time { display: none; }
    .sb-panel { padding: 24px; border-radius: 24px; }
    .sb-title { font-size: 32px; line-height: 36px; }
}
