/* Global Styles */
html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header & Footer */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer {
    line-height: 60px;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    border-bottom: none;
}

/* Forms */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: .8;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Custom Styles */
.bg-primary {
    background-color: #4a69bd !important;
}

.btn-primary {
    background-color: #4a69bd;
    border-color: #4a69bd;
}

    .btn-primary:hover {
        background-color: #3c55a5;
        border-color: #3c55a5;
    }

.btn-outline-primary {
    color: #4a69bd;
    border-color: #4a69bd;
}

    .btn-outline-primary:hover {
        background-color: #4a69bd;
        border-color: #4a69bd;
    }

.text-primary {
    color: #4a69bd !important;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* ===== AUTHENTICATION PAGES STYLES ===== */
:root {
    --primary-color: #4a69bd;
    --primary-dark: #3c55a5;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --input-focus: rgba(74, 105, 189, 0.25);
}

/* Auth Page Body */
.auth-body {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Left Side - Form Section */
.auth-form-section {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    min-height: 100vh;
}

.auth-form-content {
    width: 100%;
    max-width: 450px;
}

.auth-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 2rem;
    text-align: center;
    position: relative;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    flex-direction: column;
}

.auth-brand-name {
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

.auth-title {
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Right Side - Image Section */
.auth-image-side {
    position: relative;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100vh;
}

.auth-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 105, 189, 0.85), rgba(118, 75, 162, 0.85));
    z-index: 1;
}

.auth-side-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.auth-image-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 3rem;
    max-width: 600px;
}

.auth-image-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-image-content p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Auth Form Styling */
.auth-form-floating {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .auth-form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem var(--input-focus);
        background: white;
    }

.auth-form-floating > label {
    color: #6c757d;
    font-weight: 500;
}

.auth-form-floating > .auth-form-control:focus ~ label,
.auth-form-floating > .auth-form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    font-weight: 600;
    opacity: .8;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.auth-form-floating > .auth-form-control:focus,
.auth-form-floating > .auth-form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.auth-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

.auth-form-check {
    margin-bottom: 1.5rem;
}

.auth-form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form-check-label {
    color: #6c757d;
    font-weight: 500;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

    .auth-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(74, 105, 189, 0.3);
        color: white;
    }

    .auth-btn-primary:active {
        transform: translateY(0);
    }

.auth-btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .auth-btn-secondary:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(74, 105, 189, 0.3);
    }

.auth-recaptcha-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.auth-validation-summary {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #721c24;
}

.auth-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #155724;
}

.auth-text-danger {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

    .auth-link a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

        .auth-link a:hover {
            color: var(--primary-dark);
        }

.auth-link-inline {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .auth-link-inline:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Back to login link */
.auth-back-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

    .auth-back-link a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: color 0.3s ease;
    }

        .auth-back-link a:hover {
            color: var(--primary-dark);
        }

/* Loading spinner for submit button */
.auth-btn-loading {
    position: relative;
    color: transparent !important;
}

    .auth-btn-loading::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        top: 50%;
        left: 50%;
        margin-left: -10px;
        margin-top: -10px;
        border: 2px solid #ffffff;
        border-radius: 50%;
        border-top-color: transparent;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password strength meter styles */
.password-strength-meter {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    position: relative;
}

.password-strength-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.auth-form-control.is-valid {
    border-color: #28a745 !important;
}

.auth-form-control.is-invalid {
    border-color: #dc3545 !important;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Responsive adjustments for auth pages */
@media (max-width: 768px) {
    .auth-container {
        min-height: auto;
    }

    .auth-form-section {
        padding: 2rem 1.5rem;
        min-height: 100vh;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-subtitle {
        font-size: 0.95rem;
    }

    .auth-form-content {
        max-width: 100%;
    }
}
