/* Sequoia LMS - Authentication Pages */
/* Corporate Color Palette */
:root {
    /* Sequoia brand tokens — defined in brand.css, mirrored here for auth standalone pages */
    --sequoia-green: var(--sequoia-primary, #4BA657);
    --sequoia-green-dark: var(--sequoia-primary-dark, #183B25);
    --sequoia-green-light: #74c47d;
    --sequoia-gray: var(--sequoia-text-muted, #808285);
    --sequoia-gray-light: var(--sequoia-surface-muted, #A3B1A8);

    /* Primary Colors - Neutral Professional */
    --color-primary: #2c3e50;
    --color-secondary: #34495e;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-text-muted: #a0aec0;

    /* Background Colors */
    --color-bg-page: #f7fafc;
    --color-bg-card: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #edf2f7;

    /* Accent - Sequoia Green */
    --color-accent: var(--sequoia-primary, #4BA657);
    --color-accent-hover: var(--sequoia-primary-dark, #183B25);
    --color-accent-light: rgba(75, 166, 87, 0.1);
}

body.auth-page {
    background: var(--color-bg-page);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: var(--color-bg-card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    animation: slideUp 0.3s ease-out;
}

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

/* Auth Header - Subtle, Professional */
.auth-header {
    background: white;
    padding: 48px 40px 32px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.auth-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 14px;
    margin: 0;
    color: var(--color-text-light);
    font-weight: 400;
}

/* Auth Body */
.auth-body {
    padding: 40px 40px 48px;
}

/* Form Elements - Clean and Professional */
.auth-form .form-label {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.auth-form .form-control {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    color: var(--color-text);
}

.auth-form .form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
    outline: none;
    background: white;
}

.auth-form .form-control::placeholder {
    color: var(--color-text-muted);
}

/* Validation Errors */
.text-danger {
    font-size: 13px;
    margin-top: 5px;
}

.validation-summary-errors {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary-errors li {
    color: #c53030;
    font-size: 14px;
}

/* Checkbox */
.auth-form .form-check {
    padding: 12px 0;
}

.auth-form .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.auth-form .form-check-input:checked {
    background-color: var(--sequoia-green);
    border-color: var(--sequoia-green);
}

.auth-form .form-check-label {
    font-size: 14px;
    color: var(--sequoia-gray);
    cursor: pointer;
    margin-left: 8px;
}

/* Remember Me / Forgot Password Row */
.auth-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Primary Button - Subtle Green Accent */
.btn-auth-primary {
    background: var(--color-accent);
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.btn-auth-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    color: white;
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Secondary Button - Outlined */
.btn-auth-secondary {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-auth-secondary:hover {
    background: var(--color-bg-page);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Links - Subtle Green Accent */
.auth-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--color-accent-hover);
    text-decoration: none;
}

.auth-link-small {
    font-size: 13px;
    color: var(--color-text-light);
}

.auth-link-small:hover {
    color: var(--color-accent);
}

/* Footer Links */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
    margin-top: 24px;
}

.auth-footer-text {
    color: var(--color-text-light);
    font-size: 13px;
    margin-bottom: 8px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e9ecef;
}

.auth-divider span {
    padding: 0 12px;
    color: var(--sequoia-gray-light);
    font-size: 13px;
    font-weight: 500;
}

/* Alert Boxes - Subtle and Professional */
.auth-alert {
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    border-left: 3px solid;
}

.auth-alert-info {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
}

.auth-alert-success {
    background: #f0fdf4;
    border-color: var(--color-accent);
    color: #14532d;
}

.auth-alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #78350f;
}

/* Password Requirements */
.password-requirements {
    font-size: 12px;
    color: var(--sequoia-gray-light);
    margin-top: 8px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-card {
        border-radius: 0;
        box-shadow: none;
    }

    .auth-header {
        padding: 30px 20px;
    }

    .auth-body {
        padding: 30px 20px;
    }

    .auth-remember-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Loading State */
.btn-auth-primary:disabled {
    background: #c4c4c4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-auth-primary.loading {
    position: relative;
    color: transparent;
}

.btn-auth-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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