:root {
    --bg: #0D1520;
    --surface: #131E2E;
    --surface-2: #1A2638;
    --fill: #1F2E42;
    --line: #263548;
    --line-2: #2E4060;
    --ink: #E8EDF6;
    --ink-2: #B8C8DC;
    --soft: #7A92AA;
    --muted: #4A6380;
    --sage: #F5821F;
    --sage-tint: rgba(245, 130, 31, .15);
    --clay: #E04A30;
    --clay-ink: #FF7A60;
    --clay-tint: rgba(224, 74, 48, .18);
    --ff-disp: 'Space Grotesk', system-ui, sans-serif;
    --ff: 'Hanken Grotesk', system-ui, sans-serif;
    --ff-mono: 'Space Mono', 'SF Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--ff);
    color: var(--ink);
    background: radial-gradient(100% 60% at 80% 0%, rgba(245, 130, 31, .08), transparent 55%), radial-gradient(80% 50% at 5% 100%, rgba(245, 130, 31, .05), transparent 60%), #080E18;
    -webkit-font-smoothing: antialiased;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.app {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    margin: 0 auto;
    width: 100%;
    min-height: 100svh;
}

.view--login {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: calc(20px + env(safe-area-inset-top)) 28px calc(30px + env(safe-area-inset-bottom));
    text-align: center;
}

.brandrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.logik-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-name {
    font-family: var(--ff-disp);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: .04em;
    color: var(--ink);
    line-height: 1;
}

.logo-product {
    font-size: 12px;
    color: var(--sage);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-top: 4px;
}

.brandrow .role {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 600;
}

.brandrow .location {
    font-size: 13px;
    color: var(--soft);
    font-weight: 600;
    letter-spacing: .04em;
    margin-top: 4px;
}

.scanner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    width: 100%;
}

.viewfinder {
    position: relative;
    width: min(236px, 70vw);
    height: min(236px, 70vw);
    border-radius: 30px;
    background: linear-gradient(160deg, #1A2638, #111C2C);
    border: 1px solid var(--line-2);
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, .3);
}

.corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border: 3px solid var(--sage);
    border-radius: 6px;
}

.corner.tl {
    top: 18px;
    left: 18px;
    border-right: none;
    border-bottom: none;
}

.corner.tr {
    top: 18px;
    right: 18px;
    border-left: none;
    border-bottom: none;
}

.corner.bl {
    bottom: 18px;
    left: 18px;
    border-right: none;
    border-top: none;
}

.corner.br {
    bottom: 18px;
    right: 18px;
    border-left: none;
    border-top: none;
}

.qrghost {
    position: absolute;
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    width: 96px;
    height: 96px;
    opacity: .45;
}

.scanline {
    position: absolute;
    left: 18px;
    right: 18px;
    height: 2px;
    top: 18px;
    background: linear-gradient(90deg, transparent, var(--sage), transparent);
    box-shadow: 0 0 14px 2px rgba(82, 113, 94, .45);
    animation: scan 2.4s ease-in-out infinite;
}

@keyframes scan {
    0% { top: 22px; }
    50% { top: calc(100% - 28px); }
    100% { top: 22px; }
}

.scanner .hint .h {
    font-family: var(--ff-disp);
    font-weight: 600;
    font-size: 18px;
}

.scanner .hint .p {
    font-size: 13px;
    color: var(--soft);
    margin-top: 6px;
    max-width: 260px;
    line-height: 1.5;
    margin-inline: auto;
}

.login-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-panel .hint .h {
    font-family: var(--ff-disp);
    font-weight: 600;
    font-size: 18px;
}

.login-panel .hint .p {
    font-size: 13px;
    color: var(--soft);
    margin-top: 6px;
    line-height: 1.5;
}

.field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--ink);
    font-family: var(--ff);
    font-size: 16px;
    outline: none;
    transition: border-color .15s;
}

.field:focus {
    border-color: var(--sage);
}

.field::placeholder {
    color: var(--muted);
}

.btn {
    width: 100%;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 15px;
    font-family: var(--ff);
    font-weight: 700;
    font-size: 16px;
    background: var(--sage);
    color: #fff;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: filter .15s, transform .1s;
}

.btn:disabled {
    opacity: .7;
    cursor: default;
}

.btn:hover {
    filter: brightness(1.06);
}

.btn:active {
    transform: scale(.98);
}

.msg {
    font-size: 13px;
    color: var(--clay-ink);
    background: var(--clay-tint);
    border: 1px solid rgba(224, 74, 48, .35);
    border-radius: 12px;
    padding: 12px 14px;
    line-height: 1.45;
}

.helpline {
    font-size: 12.5px;
    color: var(--muted);
}

.homebar {
    flex: 0 0 auto;
    height: 22px;
    display: grid;
    place-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.homebar::after {
    content: "";
    width: 128px;
    height: 5px;
    border-radius: 99px;
    background: var(--ink-2);
    opacity: .35;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}
