/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* ===== Left Panel - Wallpaper ===== */
.left-panel {
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.wallpaper-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3rem;
    color: white;
    text-align: center;
}

.logo-container {
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
    margin-bottom: 1.5rem;
    display: inline-block;
}

.company-logo {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.company-logo-mobile {
    max-width: 50px;
    height: auto;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.brand-name {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    letter-spacing: -1px;
}

.gradient-text {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.brand-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 1;
    margin: 0;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* ===== Right Panel - Login Form ===== */
.right-panel {
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 480px;
    animation: fadeInRight 0.8s ease-out;
}

.mobile-logo-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
}

.company-logo-mobile-top {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.logo-icon-mobile {
    animation: fadeIn 0.6s ease-out;
}

.brand-name-mobile {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.brand-subtitle-mobile {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.mobile-logo-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid rgba(16, 185, 129, 0.15);
}

.mobile-branding {
    flex: 1;
}

.mobile-logo-bottom .brand-name-mobile {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-subtitle-mobile {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.mobile-logo-bottom .company-logo-mobile {
    max-width: 45px;
    height: auto;
}

/* Hide sticky footer on desktop */
@media (min-width: 992px) {
    .mobile-logo-bottom {
        display: none !important;
    }
}

.login-form-wrapper {
    margin-bottom: 2rem;
}

.login-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.welcome-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Form Styles ===== */
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    outline: none;
}

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

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.form-check-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: 0.5rem;
}

.forgot-password {
    font-size: 0.95rem;
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #059669;
    text-decoration: underline;
}

/* ===== Button Styles ===== */
.login-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading .btn-text {
    visibility: hidden;
}

.login-btn.loading .spinner-border {
    display: inline-block !important;
}



/* ===== Footer Links ===== */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #10b981;
}

.footer-links span {
    color: var(--border-color);
}

/* ===== Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */

/* Mobile Stunning Redesign */
@media (max-width: 991.98px) {
    .right-panel {
        min-height: 100vh;
        padding-bottom: 80px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        overflow: hidden;
    }

    /* Dark overlay for readability */
    .right-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
        z-index: 1;
    }

    .login-container {
        padding: 1.5rem;
        position: relative;
        z-index: 2;
    }

    /* Enhanced logo styling */
    .mobile-logo-top {
        margin-bottom: 3rem;
        animation: fadeInDown 0.8s ease-out;
    }

    .company-logo-mobile-top {
        max-width: 160px;
        filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
        animation: logoGlow 3s ease-in-out infinite;
    }

    /* Glassmorphism login card */
    .login-form-wrapper {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 24px;
        padding: 2.5rem 2rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.5) inset;
        animation: slideUp 0.8s ease-out;
        margin-bottom: 2rem;
    }

    .login-header {
        margin-bottom: 2rem;
        text-align: center;
    }

    .welcome-text {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        color: var(--text-secondary);
        font-size: 0.95rem;
    }

    /* Enhanced form inputs */
    .form-control {
        border-radius: 12px;
        border: 2px solid rgba(16, 185, 129, 0.2);
        padding: 1rem 1.25rem;
        font-size: 1rem;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.8);
    }

    .form-control:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1),
            0 8px 16px rgba(16, 185, 129, 0.1);
        background: #ffffff;
        transform: translateY(-2px);
    }

    /* Enhanced button */
    .login-btn {
        padding: 1.125rem 2rem;
        font-size: 1.1rem;
        font-weight: 700;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
        position: relative;
        overflow: hidden;
    }

    .login-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
    }

    .login-btn:active {
        transform: translateY(-1px);
    }

    /* Enhanced footer */
    .footer-links {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    /* Sticky footer enhancement */
    .mobile-logo-bottom {
        background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(16, 185, 129, 0.2);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        animation: slideUpFooter 0.8s ease-out 0.4s both;
    }
}

/* Mobile animations */
@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 8px 24px rgba(16, 185, 129, 0.2));
    }

    50% {
        filter: drop-shadow(0 8px 32px rgba(16, 185, 129, 0.4));
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFooter {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .welcome-text {
        font-size: 1.5rem;
    }

    .login-header {
        margin-bottom: 2rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}