/* REACH Platform - TailAdmin Auth Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --reach-primary: #F5C518;
    --reach-secondary: #1A6FAF;
    --reach-supporting: #3A9E6F;
    --reach-accent: #B84040;
    --reach-warning: #E8A020;
    --reach-background: #F8F9FA;
    --reach-surface: #FFFFFF;
    --reach-text-primary: #1C2B3A;
    --reach-text-secondary: #6B7A8D;
    --reach-border: #E2E8F0;
    --reach-radius: 0.5rem;
    --reach-radius-lg: 0.75rem;
    --reach-radius-xl: 1rem;
}

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

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.auth-reach {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--reach-background);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-reach-inner {
    display: flex;
    width: 100%;
    max-width: 1060px;
    min-height: 560px;
    background: var(--reach-surface);
    border-radius: var(--reach-radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: authFadeIn 0.5s ease-out;
}

.auth-brand-side {
    flex: 1 1 50%;
    background: linear-gradient(135deg, var(--reach-secondary) 0%, #155a8f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 32px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
}

.auth-brand-side::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}

.auth-brand-side .brand-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.auth-brand-side .brand-logo img {
    max-height: 56px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.auth-brand-side h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.auth-brand-side p {
    font-size: 0.9375rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.auth-brand-side .social-links {
    display: flex;
    gap: 10px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.auth-brand-side .social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.9rem;
}

.auth-brand-side .social-links a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.auth-form-side {
    flex: 1 1 50%;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: authSlideIn 0.5s ease-out 0.1s both;
}

.auth-form-side .brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-form-side .brand img {
    max-height: 44px;
    margin-bottom: 12px;
}

.auth-form-side .brand h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--reach-text-primary);
    margin: 0 0 6px 0;
}

.auth-form-side .brand p {
    color: var(--reach-text-secondary);
    font-size: 0.8125rem;
    margin: 0;
}

.auth-form-side .form-group {
    margin-bottom: 1.25rem;
}

.auth-form-side .form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--reach-text-primary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.auth-form-side .form-control {
    width: 100%;
    height: 44px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1.5px solid var(--reach-border);
    border-radius: var(--reach-radius);
    background: var(--reach-surface);
    color: var(--reach-text-primary);
    transition: all 0.2s ease;
}

.auth-form-side .form-control:focus {
    outline: none;
    border-color: var(--reach-secondary);
    box-shadow: 0 0 0 3px rgba(26, 111, 175, 0.1);
}

.auth-form-side .form-control::placeholder {
    color: var(--reach-muted, #94A3B8);
}

.auth-form-side .input-icon-wrapper {
    position: relative;
}

.auth-form-side .input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--reach-text-secondary);
    font-size: 0.9rem;
    z-index: 1;
}

.auth-form-side .input-icon-wrapper .form-control {
    padding-left: 44px;
}

.auth-form-side .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--reach-text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 1;
    background: none;
    border: none;
    padding: 4px;
    transition: color 0.2s ease;
}

.auth-form-side .password-toggle:hover {
    color: var(--reach-secondary);
}

.auth-form-side .input-icon-wrapper .form-control.has-password {
    padding-right: 44px;
}

.auth-form-side .checkbox-replace {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.auth-form-side .checkbox-replace input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--reach-secondary);
    cursor: pointer;
}

.auth-form-side .checkbox-replace label {
    font-size: 0.8125rem;
    color: var(--reach-text-secondary);
    cursor: pointer;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.auth-form-side .btn-block {
    width: 100%;
    height: 44px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--reach-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form-side .btn-primary {
    background: var(--reach-secondary);
    color: white;
}

.auth-form-side .btn-primary:hover {
    background: var(--reach-secondary-dark, #155a8f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 111, 175, 0.25);
}

.auth-form-side .btn-primary:active {
    transform: translateY(0);
}

.auth-form-side .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-form-side .btn-primary .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.auth-form-side .btn-primary.loading .spinner {
    display: inline-block;
}

.auth-form-side .btn-primary.loading .btn-text {
    opacity: 0;
}

.auth-form-side .forgot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.auth-form-side .forgot-row a {
    color: var(--reach-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-form-side .forgot-row a:hover {
    text-decoration: underline;
}

.auth-form-side .auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--reach-border);
}

.auth-form-side .auth-footer p {
    color: var(--reach-text-secondary);
    font-size: 0.75rem;
    margin: 0;
}

.auth-form-side .auth-alert {
    padding: 12px 16px;
    border-radius: var(--reach-radius-lg);
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    text-align: center;
}

.auth-form-side .auth-alert.success {
    background: var(--reach-supporting-light, #E6F7EF);
    color: var(--reach-supporting, #3A9E6F);
    border: 1px solid var(--reach-supporting, #3A9E6F);
}

.auth-form-side .auth-alert.danger {
    background: var(--reach-accent-light, #FDEAEA);
    color: var(--reach-accent, #B84040);
    border: 1px solid var(--reach-accent, #B84040);
}

.auth-form-side .error {
    color: var(--reach-accent);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    display: block;
}

.auth-form-side .has-error .form-control {
    border-color: var(--reach-accent);
}

.auth-form-side .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--reach-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.2s ease;
}

.auth-form-side .back-link:hover {
    color: var(--reach-secondary-dark, #155a8f);
    text-decoration: underline;
}

@media (max-width: 991px) {
    .auth-reach-inner {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
    }
    .auth-brand-side {
        padding: 32px 24px;
        min-height: auto;
    }
    .auth-brand-side h2 {
        font-size: 1.375rem;
    }
    .auth-form-side {
        padding: 32px 24px;
    }
}

@media (max-width: 575px) {
    .auth-reach {
        padding: 12px;
    }
    .auth-form-side {
        padding: 24px 16px;
    }
    .auth-form-side .forgot-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .auth-brand-side h2 {
        font-size: 1.25rem;
    }
}