/* ==========================================================================
   AUTH PAGES — Login, Register, Forgot Password
   Apple design system: #f5f5f7 bg, white card, Apple blue accents
   ========================================================================== */

/* Hero */
.auth-hero {
    background: #f5f5f7;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

/* Card */
.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 44px 40px 36px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #1d1d1f;
    text-align: center;
    margin: 0 0 28px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

/* Social buttons (vertical stack — used by register) */
.auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background: #fff;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.auth-social-btn:hover {
    background: #f5f5f7;
    border-color: #b8b8bd;
    color: #1d1d1f;
    text-decoration: none;
}

.auth-social-btn:active {
    background: #ededf0;
}

.auth-social-btn--apple {
    background: #000;
    border-color: #000;
    color: #fff;
}

.auth-social-btn--apple:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.auth-social-btn svg {
    flex-shrink: 0;
}

/* Separator */
.auth-separator {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 16px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d2d2d7;
}

.auth-separator span {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: #86868b;
    font-weight: 500;
    white-space: nowrap;
}

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

.auth-field {
    margin-bottom: 16px;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 48px;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1.5px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.auth-input:hover {
    background: #ededf0;
}

.auth-input:focus {
    background: #fff;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.auth-input::placeholder {
    color: #86868b;
}

/* Password wrap */
.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-input {
    padding-right: 48px;
}

.auth-eye {
    position: absolute;
    right: 0;
    top: 0;
    width: 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #86868b;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.auth-eye:hover {
    color: #1d1d1f;
}

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

/* Forgot password link */
.auth-forgot {
    text-align: right;
    margin-bottom: 20px;
}

.auth-forgot a {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-forgot a:hover {
    color: #004499;
    text-decoration: underline;
}

/* Submit button */
.auth-submit {
    width: 100%;
    height: 50px;
    padding: 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0071e3;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    letter-spacing: 0.01em;
}

.auth-submit:hover {
    background: #0077ed;
}

.auth-submit:active {
    background: #006edb;
    transform: scale(0.98);
}

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

/* Info box */
.auth-info {
    background: #f0f5ff;
    border: 1px solid #c7d9f5;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.auth-info p {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #1e40af;
    line-height: 1.5;
}

/* Success box */
.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.auth-success p {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #166534;
    line-height: 1.5;
}

/* Error box */
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.auth-error p {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #991b1b;
    line-height: 1.5;
}

.auth-error p + p {
    margin-top: 4px;
}

/* Footer */
.auth-footer {
    margin-top: 28px;
    text-align: center;
}

.auth-switch {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #86868b;
    margin: 0 0 10px;
}

.auth-switch a {
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-switch a:hover {
    color: #004499;
    text-decoration: underline;
}

.auth-legal {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: #86868b;
    margin: 0;
    line-height: 1.7;
}

.auth-legal a {
    color: #86868b;
    text-decoration: underline;
    text-decoration-color: #d2d2d7;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.auth-legal a:hover {
    color: #1d1d1f;
}

/* iOS safe area support */
@supports (-webkit-touch-callout: none) {
    .auth-hero {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .auth-hero {
        padding: 32px 16px;
    }

    .auth-card {
        padding: 36px 28px 32px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .auth-hero {
        padding: 16px 12px;
        align-items: flex-start;
        padding-top: 24px;
    }

    .auth-hero .container {
        padding: 0;
        min-height: auto !important;
        align-items: flex-start !important;
    }

    .auth-card {
        padding: 28px 20px 24px;
        border-radius: 16px;
        max-width: 100%;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
    }

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

    .auth-social-btn {
        min-height: 46px;
        font-size: 14px;
    }

    .auth-separator {
        margin: 20px 0;
    }

    .auth-input {
        height: 46px;
        line-height: 46px;
        font-size: 16px;
        border-radius: 10px;
    }

    .auth-submit {
        height: 48px;
        font-size: 15px;
    }
}

/* Small phone */
@media (max-width: 375px) {
    .auth-hero {
        padding: 12px 8px;
        padding-top: 16px;
    }

    .auth-card {
        padding: 24px 16px 20px;
    }
}

/* Spinner (Bootstrap compat) */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}
