/* =====================================================
   BFG Application - Red Theme
   ===================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Red Theme */
:root {
    /* Primary Red Colors */
    --primary-50: #fef2f2;
    --primary-100: #fee2e2;
    --primary-200: #fecaca;
    --primary-300: #fca5a5;
    --primary-400: #f87171;
    --primary-500: #ef4444;
    --primary-600: #dc2626;
    --primary-700: #b91c1c;
    --primary-800: #991b1b;
    --primary-900: #7f1d1d;

    /* Semantic Colors */
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    
    --warning-50: #fefce8;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Accent Colors */
    --accent-mint: #fecaca;
    --accent-sage: #fca5a5;
    --accent-emerald: #f87171;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--primary-50);
    min-height: 100vh;
}

/* =====================================================
   Login Page Styles
   ===================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg,
            var(--primary-100) 0%,
            var(--primary-200) 25%,
            var(--accent-mint) 50%,
            var(--primary-100) 75%,
            var(--primary-50) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Floating decorative elements */
.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.login-container::before {
    width: 400px;
    height: 400px;
    background: var(--primary-400);
    top: -100px;
    right: -100px;
}

.login-container::after {
    width: 300px;
    height: 300px;
    background: var(--primary-300);
    bottom: -80px;
    left: -80px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: cardSlideUp 0.6s ease-out;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
}

.logo-wrapper img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.logo-icon {
    font-size: 3rem;
    color: white;
    position: relative;
    z-index: 1;
}

.company-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.company-tagline {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 400;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.125rem;
    transition: color var(--transition-fast);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:hover {
    border-color: var(--primary-300);
}

.form-input:focus {
    border-color: var(--primary-500);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.form-input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-500);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-600);
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-500);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px 0 rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-400);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider-text {
    font-size: 0.8125rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Register Link */
.register-section {
    text-align: center;
    margin-top: 0.5rem;
}

.register-text {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.register-link {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.register-link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
}

.alert-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Footer Text */
.footer-text {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .logo-wrapper {
        width: 80px;
        height: 80px;
    }

    .logo-icon {
        font-size: 2.5rem;
    }

    .company-name {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}