/* ============================================================
   auth.css — CIVPN auth page styles (zh-Hans)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #FDF8F5;
    color: #1A1A1B;
}

/* ---- Page wrapper ---- */

.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    position: relative;
    overflow: hidden;
}

/* Decorative background blobs */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.auth-page::before {
    width: 560px;
    height: 560px;
    top: -200px;
    right: -120px;
    background: radial-gradient(circle, rgba(255,126,95,.12) 0%, transparent 68%);
}
.auth-page::after {
    width: 440px;
    height: 440px;
    bottom: -160px;
    left: -100px;
    background: radial-gradient(circle, rgba(254,180,123,.10) 0%, transparent 68%);
}

/* ---- Auth card ---- */

.auth-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 2px 4px rgba(0,0,0,.04),
        0 8px 24px rgba(0,0,0,.06),
        0 24px 64px rgba(255,126,95,.08);
}

/* ---- Logo ---- */

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
    color: #1A1A1B;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth-logo-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

/* ---- Panel headings ---- */

.auth-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1A1A1B;
    margin-bottom: 6px;
    letter-spacing: -.03em;
}

.auth-subtitle {
    font-size: 14px;
    color: #6E6E73;
    margin-bottom: 24px;
    line-height: 1.55;
}

/* ---- Form-level error banner ---- */

.auth-form-err {
    display: none;
    background: #FFF2F0;
    border: 1px solid #FFD6D0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #D1382A;
    margin-bottom: 16px;
    line-height: 1.5;
}
.auth-form-err.visible { display: block; }

/* ---- Field wrapper ---- */

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1B;
}

.auth-field input {
    height: 46px;
    border-radius: 12px;
    border: 1.5px solid #EDEDF0;
    padding: 0 14px;
    font-size: 15px;
    color: #1A1A1B;
    background: #FAFAFA;
    outline: none;
    width: 100%;
    transition: border-color .18s, background .18s;
}
.auth-field input:focus    { border-color: #FF7E5F; background: #fff; }
.auth-field input.has-error{ border-color: #FF3B30; }
.auth-field input::placeholder { color: #AEAEB2; }
.auth-field input::-webkit-input-placeholder { color: #AEAEB2; }

.auth-field-err {
    font-size: 12px;
    color: #FF3B30;
    min-height: 16px;
    line-height: 1.4;
}

/* ---- Send code button (sits below the input) ---- */

.send-code-btn {
    align-self: flex-start;
    background: none;
    border: 1.5px solid #FF7E5F;
    border-radius: 8px;
    color: #FF7E5F;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1.4;
}
.send-code-btn:hover { background: #FF7E5F; color: #fff; }
.send-code-btn:disabled {
    border-color: #AEAEB2;
    color: #AEAEB2;
    cursor: default;
    background: none;
}

/* ---- Spam hint (below code field) ---- */

.spam-hint {
    font-size: 12px;
    color: #8E8E93;
    line-height: 1.5;
}

/* ---- Resend row (inside reset panel) ---- */

.resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.resend-countdown {
    font-size: 12px;
    color: #8E8E93;
}

.resend-link-btn {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #FF7E5F;
    cursor: pointer;
    padding: 0;
}
.resend-link-btn:disabled { color: #AEAEB2; cursor: default; }

/* ---- Submit button ---- */

.auth-submit {
    width: 100%;
    height: 50px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #FF7E5F 0%, #FEB47B 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: .01em;
    transition: opacity .18s, transform .12s;
}
.auth-submit:hover  { opacity: .88; transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- Bottom links ---- */

.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #6E6E73;
}
.auth-links button {
    background: none;
    border: none;
    color: #FF7E5F;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}
.auth-links button:hover { text-decoration: underline; }

/* ---- Page footer ---- */

.auth-page-footer {
    text-align: center;
    padding: 20px 16px 28px;
    font-size: 12px;
    color: #AEAEB2;
}
.auth-page-footer a { color: #AEAEB2; text-decoration: none; }
.auth-page-footer a:hover { color: #6E6E73; }

/* ---- Toast notification ---- */

.auth-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1A1A1B;
    color: #fff;
    padding: 11px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 9999;
    white-space: nowrap;
    max-width: calc(100vw - 40px);
}
.auth-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
    .auth-card   { padding: 28px 24px; }
    .auth-card h2{ font-size: 20px; }
}
