/* DataCert.ai — Auth pages (login / register / verify / forgot / reset)
   Ocean & Brass: navy ground, porcelain card, brass = verification, teal = action */

:root {
    --navy-900: #0A1A28;
    --navy-line: #1F415A;
    --paper: #FAF9F5;
    --paper-line: #E8E4DA;
    --paper-shade: #F6F4EE;
    --ink: #16283A;
    --ink-soft: #5C6E80;
    --teal: #1FBBA6;
    --teal-deep: #0F8D7E;
    --gold: #C2A165;
    --gold-bg: rgba(194, 161, 101, 0.12);
}

body {
    font-family: "Avenir Next", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
    background:
        radial-gradient(900px 480px at 78% -10%, rgba(31, 187, 166, 0.08), transparent 60%),
        var(--navy-900);
    color: var(--ink);
    margin: 0;
    padding: 24px;
    line-height: 1.5;
    min-height: 100vh;
    box-sizing: border-box;
}

.wrap {
    max-width: 420px;
    margin: 48px auto;
    background: var(--paper);
    border: 1px solid var(--paper-line);
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.auth-brand {
    margin: 0 0 20px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.auth-brand b {
    color: var(--teal-deep);
}

.auth-brand .seal {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    margin-right: 9px;
    box-shadow: 0 0 0 3px var(--gold-bg);
}

h1 {
    margin: 0 0 8px;
    font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 16px;
    color: var(--ink);
}

label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
}

input[type=email],
input[type=password],
input[type=text] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--paper-line);
    border-radius: 6px;
    font-size: 16px;
    margin: 0 0 16px;
    background: #fff;
    color: var(--ink);
}

input:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
    border-color: var(--teal);
}

button,
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:focus-visible,
button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* brass = verification / account creation */
.btn-primary {
    background: linear-gradient(180deg, #D6BC82, #B8944F);
    color: #2B2210;
    border-color: #B8944F;
    font-weight: 700;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #E0C892, #C29E59);
}

.btn-primary:focus-visible {
    outline-color: var(--gold);
}

/* teal = action */
.btn-secondary {
    background: var(--teal);
    color: #06231F;
    border-color: var(--teal);
}

.btn-secondary:hover {
    background: #3ADCC6;
    border-color: #3ADCC6;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.error {
    background: #FBEAE5;
    color: #8C3B2A;
    border: 1px solid #F0CFC5;
    padding: 12px;
    border-radius: 6px;
    margin: 0 0 16px;
    font-size: 14px;
}

.success {
    background: #E7F3EA;
    color: #1A6B39;
    border: 1px solid #BFDECB;
    padding: 12px;
    border-radius: 6px;
    margin: 0 0 16px;
    font-size: 14px;
}

.muted {
    font-size: 14px;
    color: var(--ink-soft);
}

.link {
    color: var(--teal-deep);
}

.password-field {
    position: relative;
    margin: 0 0 16px;
}

.password-field input[type=password],
.password-field input[type=text] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 44px 10px 12px;
    border: 1px solid var(--paper-line);
    border-radius: 6px;
    font-size: 16px;
    margin: 0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--ink);
    background: var(--paper-shade);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.session-banner {
    background: #E9F1F5;
    color: #33586E;
    border: 1px solid #CDDEE7;
    padding: 12px;
    border-radius: 6px;
    margin: 0 0 16px;
    font-size: 14px;
}

.session-banner a {
    color: var(--teal-deep);
    font-weight: 500;
}

.btn-google {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--paper-line);
    text-align: center;
    margin: 0 0 16px;
}

.btn-google:hover {
    background: var(--paper-shade);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    color: var(--ink-soft);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--paper-line);
}

/* ---------------------------------------------------------------------------
   Language selector — EN | 中文 | ES, top-right of the auth pages.
   Lives HERE, not in main.css: the auth pages load only this stylesheet, so
   styling it in main.css left the selector completely unstyled.
   --------------------------------------------------------------------------- */
.auth-lang {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    z-index: 5;
}

.auth-lang a {
    color: rgba(250, 249, 245, 0.72);
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.auth-lang a:hover {
    color: var(--paper);
    background: rgba(31, 187, 166, 0.16);
}

.auth-lang .is-active {
    color: var(--paper);
    font-weight: 700;
}

.auth-lang span[aria-hidden] {
    color: var(--navy-line);
}

@media (max-width: 480px) {
    .auth-lang { top: 12px; right: 14px; font-size: 12px; }
}
