/* ========================================
   Auth Pages (Register & Login)
   iOS 26-inspired Glass Morphism Design
   ======================================== */

:root {
    --auth-primary: #0F33EF;
    --auth-primary-hover: #0b2ad9;
    --auth-primary-light: rgba(15, 51, 239, 0.08);
    --auth-text-dark: #1a1a1a;
    --auth-text-secondary: #666666;
    --auth-error: #ef4444;
    --auth-bg: #E4E9F1;
    --auth-glass-bg: rgba(255, 255, 255, 0.85);
    --auth-glass-border: rgba(255, 255, 255, 0.6);
    --auth-shadow: 0 15px 35px rgba(31, 38, 135, 0.1);
    --auth-radius-card: 24px;
    --auth-radius-input: 12px;
    --auth-radius-btn: 12px;
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.auth-page {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(15, 51, 239, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(15, 51, 239, 0.02) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ---- Container ---- */
.auth-container {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: authFadeIn 0.5s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Glass Card ---- */
.auth-card {
    width: 100%;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: var(--auth-radius-card);
    box-shadow: var(--auth-shadow);
    padding: 40px 36px;
}

/* ---- Logo ---- */
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo a {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: var(--auth-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

/* ---- Title & Subtitle ---- */
.auth-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    font-size: 22px;
    line-height: 1.3;
    color: var(--auth-text-dark);
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: var(--auth-text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

/* ---- Notification Banner ---- */
.auth-notification {
    background: var(--auth-primary-light);
    border: 1px solid rgba(15, 51, 239, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--auth-primary);
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

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

/* ---- Form Group ---- */
.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form-group label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--auth-text-dark);
}

/* ---- Inputs ---- */
.auth-input {
    width: 100%;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1.5px solid #E0E4EA;
    border-radius: var(--auth-radius-input);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--auth-text-dark);
    transition: var(--auth-transition);
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(15, 51, 239, 0.1);
}

.auth-input::placeholder {
    color: #B0B8C4;
    font-weight: 400;
}

/* ---- Errors ---- */
.auth-form-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 4px;
}

.auth-form-error ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-form-error li,
.auth-form-error p {
    font-size: 13px;
    color: var(--auth-error);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.auth-field-error {
    font-size: 13px;
    color: var(--auth-error);
    font-weight: 600;
    margin-top: 4px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
}

.auth-field-error ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-form-group:has(.auth-field-error) input {
    border-color: var(--auth-error);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* ---- Captcha ---- */
.auth-captcha {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

/* ---- Submit Button ---- */
.auth-btn-submit {
    width: 100%;
    padding: 15px 28px;
    background: var(--auth-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--auth-radius-btn);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.auth-btn-submit:hover:not(:disabled) {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 51, 239, 0.3);
}

.auth-btn-submit:active:not(:disabled) {
    transform: translateY(0);
    transition: all 0.1s;
}

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

/* ---- Alt Link ---- */
.auth-alt-link {
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-secondary);
    margin-top: 20px;
}

.auth-alt-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--auth-transition);
}

.auth-alt-link a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---- Forgot Password Link ---- */
.auth-forgot-link {
    text-align: right;
    margin-top: -8px;
}

.auth-forgot-link a {
    font-size: 13px;
    color: var(--auth-text-secondary);
    text-decoration: none;
    transition: var(--auth-transition);
}

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

/* ---- Feature Pills ---- */
.auth-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.auth-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text-dark);
    transition: var(--auth-transition);
}

.auth-feature-pill:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.auth-feature-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-feature-icon svg {
    width: 16px;
    height: 16px;
}

/* ---- Back Link ---- */
.auth-back-link {
    text-align: center;
}

.auth-back-link a {
    font-size: 13px;
    color: var(--auth-text-secondary);
    text-decoration: none;
    transition: var(--auth-transition);
}

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

/* ---- Fallback: style Django default inputs inside .auth-form ---- */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1.5px solid #E0E4EA;
    border-radius: var(--auth-radius-input);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--auth-text-dark);
    transition: var(--auth-transition);
    outline: none;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="text"]:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(15, 51, 239, 0.1);
}

/* ---- Info Page (done/complete messages) ---- */
.auth-info-icon {
    text-align: center;
    margin-bottom: 16px;
}

.auth-info-icon svg {
    width: 56px;
    height: 56px;
}

.auth-message {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--auth-text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

.auth-btn-link {
    display: block;
    width: 100%;
    padding: 15px 28px;
    background: var(--auth-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--auth-radius-btn);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    text-align: center;
    text-decoration: none;
}

.auth-btn-link:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 51, 239, 0.3);
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
    body.auth-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .auth-features {
        flex-direction: column;
        align-items: center;
    }

    .auth-feature-pill {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 24px 16px;
    }

    .auth-logo a {
        font-size: 22px;
    }

    .auth-title {
        font-size: 18px;
    }
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
    .auth-container {
        animation: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --auth-glass-bg: rgba(255, 255, 255, 0.95);
        --auth-glass-border: rgba(0, 0, 0, 0.3);
    }
}
