/* ══════════════════════════════════════════════════
   Auth Pages (login.html / register.html)
   Purple community theme
   ══════════════════════════════════════════════════ */

:root {
    --auth-primary: #6b46c1;
    --auth-primary-light: #8b5cf6;
    --auth-text: #221433;
    --auth-muted: #65557f;
    --auth-border: rgba(107, 70, 193, 0.18);
    --auth-bg: #f6f3ff;
}

/* ── Page shell ───────────────────────────────────────────────────────── */

html, body {
    height: 100%;
}

.auth-body {
    background: var(--auth-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.auth-backdrop {
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

.auth-page {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px 48px;
    position: relative;
    z-index: 1;
}

/* ── Logo ─────────────────────────────────────────────────────────────── */

.auth-logo {
    align-items: center;
    color: var(--auth-text);
    display: flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.15rem;
    gap: 10px;
    text-decoration: none;
}

.auth-logo img {
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(107, 70, 193, 0.2);
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.auth-card {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(107, 70, 193, 0.12);
    border-radius: 28px;
    box-shadow: 0 16px 56px rgba(91, 57, 159, 0.14);
    padding: 40px 40px 36px;
    width: 100%;
    max-width: 440px;
}

.auth-card__header {
    margin-bottom: 28px;
    text-align: center;
}

.auth-card__title {
    color: var(--auth-text);
    font-family: "Satoshi-Black", sans-serif;
    font-size: 1.65rem;
    margin: 0 0 8px;
}

.auth-card__sub {
    color: var(--auth-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ── Form ─────────────────────────────────────────────────────────────── */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.auth-label {
    align-items: center;
    color: var(--auth-text);
    display: flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.9rem;
    gap: 8px;
    justify-content: space-between;
}

.auth-label-hint {
    color: var(--auth-muted);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.78rem;
}

.auth-input-wrap {
    align-items: center;
    background: rgba(246, 243, 255, 0.7);
    border: 1.5px solid var(--auth-border);
    border-radius: 14px;
    display: flex;
    gap: 10px;
    padding: 0 14px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.auth-input-wrap:focus-within {
    background: #fff;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.auth-field.has-error .auth-input-wrap {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.auth-input-icon {
    color: var(--auth-muted);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.auth-input {
    background: transparent;
    border: none;
    color: var(--auth-text);
    flex: 1;
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.97rem;
    height: 48px;
    outline: none;
    padding: 0;
    width: 0;
}

.auth-input::placeholder {
    color: rgba(101, 85, 127, 0.5);
}

.auth-input-toggle {
    background: transparent;
    border: none;
    color: var(--auth-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.1rem;
    padding: 0;
    transition: color 0.15s;
}

.auth-input-toggle:hover {
    color: var(--auth-primary);
}

/* Error messages */
.auth-field-error,
.auth-form-error {
    color: #b91c1c;
    font-family: "Satoshi-Medium", sans-serif;
    font-size: 0.82rem;
    padding-left: 2px;
}

.auth-form-error {
    background: rgba(185, 28, 28, 0.06);
    border-left: 3px solid #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
}

/* Password strength */
.auth-password-strength {
    align-items: center;
    display: flex;
    gap: 10px;
    padding-top: 2px;
}

.auth-password-strength__bar {
    background: rgba(107, 70, 193, 0.1);
    border-radius: 999px;
    flex: 1;
    height: 5px;
    overflow: hidden;
}

.auth-password-strength__fill {
    border-radius: 999px;
    display: block;
    height: 100%;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}

.auth-password-strength__label {
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.78rem;
    min-width: 50px;
    text-align: right;
    transition: color 0.3s;
}

/* Submit button */
.auth-submit-btn {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(107, 70, 193, 0.32);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
    height: 52px;
    justify-content: center;
    margin-top: 4px;
    transition: opacity 0.15s, transform 0.15s;
    width: 100%;
    gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-submit-btn__icon {
    font-size: 1.05rem;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-spinner-icon {
    animation: auth-spin 0.7s linear infinite;
    display: inline-block;
    font-size: 1.2rem;
}

/* Terms */
.auth-terms {
    color: var(--auth-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

.auth-terms a {
    color: var(--auth-primary);
    text-decoration: underline;
}

/* Footer link */
.auth-card__footer-link {
    border-top: 1px solid rgba(107, 70, 193, 0.08);
    color: var(--auth-muted);
    font-size: 0.9rem;
    margin: 28px 0 0;
    padding-top: 20px;
    text-align: center;
}

.auth-card__footer-link a {
    color: var(--auth-primary);
    font-family: "Satoshi-Bold", sans-serif;
    text-decoration: none;
}

.auth-card__footer-link a:hover {
    text-decoration: underline;
}

/* Back link */
.auth-page__back {
    margin: 0;
}

.auth-page__back a {
    align-items: center;
    color: var(--auth-muted);
    display: inline-flex;
    font-size: 0.88rem;
    gap: 5px;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-page__back a:hover {
    color: var(--auth-primary);
}

/* ── Social OAuth buttons ─────────────────────────────────────────────── */

.auth-divider {
    align-items: center;
    color: var(--auth-muted);
    display: flex;
    font-size: 0.8rem;
    gap: 12px;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    background: rgba(107, 70, 193, 0.12);
    content: '';
    flex: 1;
    height: 1px;
}

.auth-social-btn {
    align-items: center;
    background: #fff;
    border: 1.5px solid rgba(107, 70, 193, 0.18);
    border-radius: 14px;
    color: #221433;
    cursor: pointer;
    display: flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.95rem;
    gap: 12px;
    height: 52px;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.auth-social-btn:hover {
    background: #f8f5ff;
    border-color: rgba(107, 70, 193, 0.35);
    box-shadow: 0 2px 12px rgba(107, 70, 193, 0.1);
}

.auth-social-btn__logo {
    flex-shrink: 0;
    height: 22px;
    width: 22px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 500px) {
    .auth-card {
        border-radius: 22px;
        padding: 28px 20px 24px;
    }

    .auth-card__title {
        font-size: 1.4rem;
    }
}
