:root {
    color-scheme: light;
    --green: #137b66;
    --dark: #0d2a23;
    --text: #172027;
    --muted: #74808a;
    --border: #dce4e1;
    --background: #f2f6f4;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, #e0f1eb, transparent 45%),
        var(--background);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding:
        max(24px, env(safe-area-inset-top))
        18px
        max(24px, env(safe-area-inset-bottom));
}

.card {
    width: 100%;
    max-width: 440px;
    padding: 34px 28px;
    border: 1px solid rgba(220, 228, 225, .9);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(13, 42, 35, .12);
}

.logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 16px;
    background: var(--green);
    color: white;
    font-size: 28px;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.08;
    letter-spacing: -.03em;
}

.description {
    margin: 14px 0 26px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.45;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 58px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    background: white;
    color: var(--text);
    font: 700 21px/1 monospace;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(19, 123, 102, .12);
}

button {
    width: 100%;
    min-height: 54px;
    margin-top: 14px;
    padding: 12px 18px;
    border: 0;
    border-radius: 13px;
    background: var(--green);
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

button:disabled {
    opacity: .65;
    cursor: wait;
}

button.secondary {
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.security-note {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.error {
    margin: 12px 0 0;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff0f0;
    color: #a52e2e;
    font-size: 14px;
}

.success-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 50%;
    background: #e7f5ef;
    color: var(--green);
    font-size: 34px;
    font-weight: 800;
}

.status-box {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 13px;
    background: #eef7f4;
    color: #286154;
    line-height: 1.45;
}

[hidden] {
    display: none !important;
}

/* QR attendance states */
.status-box {
    display: grid;
    gap: 7px;
}

.status-box strong {
    display: block;
    font-size: 18px;
}

.status-box span {
    display: block;
    line-height: 1.5;
}

.status-box.processing {
    background: #fff7df;
    color: #775700;
}

.status-box.success {
    background: #e8f7f1;
    color: #08745f;
}

.status-box.error-state {
    background: #fff0ef;
    color: #a33b32;
}
