:root {
    color-scheme: light;
    --bg: #eef7f6;
    --ink: #0f172a;
    --muted: #64748b;
    --primary: #0f766e;
    --primary-strong: #115e59;
    --danger: #b91c1c;
    --success: #166534;
    --panel: #ffffff;
    --line: #cbd5e1;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}
.terminal-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.terminal-panel {
    width: min(760px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .14);
}
.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 22px;
}
.brand-row img { height: 42px; width: auto; }
.clock {
    margin-top: 18px;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
}
.status {
    margin: 12px 0 18px;
    color: var(--muted);
    font-size: 18px;
}
.camera-frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #020617;
    aspect-ratio: 4 / 3;
}
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scan-box {
    position: absolute;
    inset: 18%;
    border: 4px solid rgba(255,255,255,.88);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(2, 6, 23, .34);
}
.actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}
button {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
}
button[data-start] {
    background: var(--primary);
    color: #fff;
    flex: 1;
}
button[data-start]:hover { background: var(--primary-strong); }
button[data-stop] { background: #e2e8f0; color: var(--ink); }
button:disabled { opacity: .55; cursor: not-allowed; }
.result {
    margin-top: 18px;
    border-radius: 8px;
    padding: 18px;
    font-size: 20px;
    font-weight: 700;
}
.result.success { background: #dcfce7; color: var(--success); }
.result.error { background: #fee2e2; color: var(--danger); }
@media (max-width: 640px) {
    .terminal-shell { padding: 12px; }
    .terminal-panel { padding: 16px; }
    .clock { font-size: 38px; }
    .actions { flex-direction: column; }
}

.activation-form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}
.activation-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}
.activation-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    font: inherit;
    color: var(--ink);
}
.activation-form button {
    background: var(--primary);
    color: #fff;
}
.actions form {
    margin: 0;
}
.secondary-button {
    background: #e2e8f0;
    color: var(--ink);
    width: 100%;
}