/* Büch.IT. The palette comes from bit_logo_white.svg itself - white mark, signal
   red #e30613 - rather than from the app's cyan, which is the View.Xpress product
   colour and not the company's.

   Mobile first: this page is opened on a phone, at an event, in daylight. No web
   fonts, no frameworks, no external requests - it has to work on a weak connection
   and still be running unchanged in a few years. */

:root {
    --bg: #0a0a0a;
    --card: #141414;
    --input: #1c1c1c;
    --border: #2a2a2a;
    --text: #f3f4f6;
    --text-dim: #a1a1aa;
    --text-muted: #71717a;
    --accent: #e30613;
    --accent-dim: #7f1d1d;
    --error: #f87171;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

header {
    margin-bottom: 26px;
}

header img {
    display: block;
    width: 168px;
    max-width: 52%;
    height: auto;
}

header .rule {
    height: 3px;
    width: 56px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 16px;
}

h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 20px;
    margin-bottom: 16px;
}

.label {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 7px;
}

.field { margin-bottom: 16px; }

.id-badge {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent);
    letter-spacing: 0.02em;
    margin-bottom: 22px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 22px;
    letter-spacing: 0.22em;
    text-align: center;
    color: var(--text);
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    /* iOS zooms the page when a field's font is under 16px - 22px keeps it still */
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.18);
}

button {
    width: 100%;
    margin-top: 4px;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

button:active { background: #c1050f; }
button:disabled { opacity: 0.5; cursor: default; }

.msg {
    margin-top: 14px;
    font-size: 14px;
    color: var(--error);
    min-height: 1.2em;
}

.hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

video {
    width: 100%;
    border-radius: 10px;
    background: #000;
    display: block;
}

.run {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.run:first-of-type { border-top: 0; padding-top: 4px; }

.run .meta { flex: 1; min-width: 0; }
.run .when { font-size: 15px; }
.run .sub { font-size: 12px; color: var(--text-muted); }

.run a {
    flex: none;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border-radius: 8px;
    text-decoration: none;
}

.pending { text-align: center; padding: 18px 0; }

.pending .spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 18px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .pending .spinner { animation: none; border-top-color: var(--accent-dim); }
}

footer {
    margin-top: 30px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.hidden { display: none !important; }
