@import './styles/tokens.css';

.security-card { max-width: 680px; }
.inbox-card { max-width: 760px; }
.inbox-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.inbox-heading h1 { margin: 0; }
.inbox-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.inbox-empty { padding: 24px 0; }
.inbox-message { border-bottom: 1px solid var(--line); padding: 16px 0; }
.inbox-message summary { padding: 8px 0; overflow-wrap: anywhere; }
.inbox-message summary strong { font-size: 1rem; color: var(--ink); }
.inbox-message summary span, .inbox-message summary time { display: block; margin-top: 6px; font-size: .875rem; color: var(--muted); }
.inbox-body { padding: 0 0 12px; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.auth-card .auth-action { display: inline-block; background: #153e35; color: white; padding: 12px 18px; border-radius: 8px; text-decoration: none; min-height: 44px; }
.auth-card .auth-action:hover { background: #205143; color: white; }
.security-section { border-top: 1px solid var(--line); padding: 24px 0; }
.security-section:last-of-type { border-bottom: 1px solid var(--line); }
.security-heading { display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.security-heading h2 { margin: 0; }
.security-badge { border: 1px solid var(--line); border-radius: 24px; padding: 4px 10px; font-size: 14px; white-space: nowrap; color: var(--accent); }
.security-address { overflow-wrap: anywhere; font-weight: 600; }
.totp-setup { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-top: 20px; background: var(--paper); }
.setup-key { font-family: monospace; letter-spacing: .06em; }
.setup-qr { display: block; max-width: 100%; height: auto; margin: 20px auto; border-radius: 8px; }
.auth-card small { color: var(--muted); font-size: 14px; }
.auth-card #auth-code { font-size: 24px; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
@media (max-width:480px) { .security-heading { align-items: start; } .totp-setup { padding: 14px; } }

:root {
    --ink: #253b35;
    --muted: #566b61;
    --line: #dce5df;
    --paper: #f5f7f6;
    --accent: #236a51;
}

body {
    font-family: Inter,"Segoe UI",Arial,sans-serif;
    background: var(--paper);
    color: var(--ink);
}

.auth-card {
    border-color: var(--line);
    box-shadow: none;
    border-radius: 14px;
}

.auth-brand {
    color: #153e35;
    font-weight: 600;
    letter-spacing: -1px;
}

.auth-brand span {
    color: #719363;
}

.auth-card button,button[type=submit] {
    background: #153e35;
    color: white;
    border: 1px solid #153e35;
    border-radius: 8px;
    min-height: 44px;
}

.auth-card input {
    border: 1px solid var(--control-border);
    border-radius: 8px;
    font: inherit;
    min-height: 44px;
}

.auth-card summary {
    min-height: 44px;
    align-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 14px;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

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

.confirmation-card {
    max-width: 720px;
}

.confirmation-lines {
    padding: 0;
    list-style: none;
}

.confirmation-lines li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.confirmation-lines label {
    display: flex;
    align-items: start;
    gap: 14px;
}

.confirmation-lines input[type=checkbox] {
    width: 22px;
    min-height: 22px;
    flex-shrink: 0;
}

.confirmation-lines span {
    display: grid;
    gap: 5px;
}

.confirmation-lines small {
    font-size: 14px;
    color: var(--muted);
}

.confirmation-card .confirmation-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.confirmation-card form {
    display: block;
}

@media (max-width:480px) {
    .auth-card {
        padding: 24px;
        margin: 3vh auto;
    }

    .auth-card h1 {
        font-size: 24px;
    }

    .confirmation-actions>* {
        width: 100%;
    }
}

body {
    font-size: var(--text-body);
    line-height: 1.5;
}

.auth-card {
    padding: var(--space-8);
    border-radius: var(--radius);
}

.auth-card h1 {
    font-size: var(--text-heading);
    letter-spacing: -.5px;
}

.auth-card h2 {
    font-size: 1.125rem;
}

.auth-card p {
    margin-block: var(--space-4);
}

.auth-card input {
    font-size: var(--text-body);
}

.auth-card button, .auth-card a, .auth-card input, .auth-card summary {
    transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.auth-card button:hover {
    background: #205143;
}

.auth-card button:active {
    background: #10372d;
}

.auth-card a:hover {
    color: var(--green);
}

.auth-card button {
    white-space: normal;
}

.auth-card [role=alert] {
    background: #fff0ea;
    color: var(--danger);
    padding: var(--space-4);
    border-radius: var(--radius-control);
}

.confirmation-lines strong, .confirmation-lines span {
    font-variant-numeric: tabular-nums;
}

.confirmation-lines label {
    min-width: 0;
}

.confirmation-lines label>span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.confirmation-actions {
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width:480px) {
    .auth-card {
        padding: var(--space-6);
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }
}

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