/* Modern Login Layout - Refined v3 (Final) */
body,
html {
    height: 100%;
    margin: 0;
    padding: 0 !important;
    /* Critical fix: Remove default Site.css/Bootstrap padding */
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    height: 100vh;
    /* Force full viewport height */
    width: 100%;
    overflow: hidden;
    /* Prevent scroll unless screen is too small */
}

/* Allow scroll on small screens */
@media (max-height: 800px) {
    .login-container {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
}

/* Left Panel - Branding & Stats */
.login-brand-panel {
    flex: 6;
    background: linear-gradient(135deg, #0061f2 0%, #00c6f9 100%);
    color: white;
    padding: 6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 400px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Sound Bar Animation */
.wave-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    height: 300px;
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    z-index: -1;
    opacity: 0.3;
    padding: 0 2rem;
}

.bar {
    width: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px 5px 0 0;
    animation: sound-bounce 1s infinite ease-in-out alternate;
}

/* Specific bar delays */
.bar:nth-child(1) {
    height: 40%;
    animation-duration: 1.2s;
}

.bar:nth-child(2) {
    height: 70%;
    animation-duration: 0.8s;
}

.bar:nth-child(3) {
    height: 30%;
    animation-duration: 1.5s;
}

.bar:nth-child(4) {
    height: 90%;
    animation-duration: 0.9s;
}

.bar:nth-child(5) {
    height: 50%;
    animation-duration: 1.1s;
}

.bar:nth-child(6) {
    height: 80%;
    animation-duration: 1.3s;
}

.bar:nth-child(7) {
    height: 20%;
    animation-duration: 1.0s;
}

.bar:nth-child(8) {
    height: 60%;
    animation-duration: 1.4s;
}

.bar:nth-child(9) {
    height: 90%;
    animation-duration: 0.9s;
}

.bar:nth-child(10) {
    height: 40%;
    animation-duration: 1.2s;
}

.bar:nth-child(11) {
    height: 70%;
    animation-duration: 1.1s;
}

.bar:nth-child(12) {
    height: 30%;
    animation-duration: 1.4s;
}

.bar:nth-child(13) {
    height: 80%;
    animation-duration: 1.0s;
}

.bar:nth-child(14) {
    height: 20%;
    animation-duration: 1.5s;
}

.bar:nth-child(15) {
    height: 60%;
    animation-duration: 0.8s;
}

.bar:nth-child(16) {
    height: 50%;
    animation-duration: 1.2s;
}

.bar:nth-child(17) {
    height: 90%;
    animation-duration: 1.1s;
}

.bar:nth-child(18) {
    height: 30%;
    animation-duration: 1.3s;
}

.bar:nth-child(19) {
    height: 70%;
    animation-duration: 0.9s;
}

.bar:nth-child(20) {
    height: 40%;
    animation-duration: 1.4s;
}

@keyframes sound-bounce {
    0% {
        transform: scaleY(0.5);
    }

    100% {
        transform: scaleY(1.2);
    }
}


.brand-header {
    z-index: 2;
}

.brand-logo-text {
    font-size: 2.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0.8rem;
}

.brand-tagline-small {
    font-size: 1.25rem;
    opacity: 0.8;
}

.brand-main-content {
    margin-top: auto;
    margin-bottom: auto;
    max-width: 90%;
}

.brand-hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
}

/* Modal Styles for Login */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalPopIn 0.3s ease-out forwards;
    display: flex;
    flex-direction: column;
}

@keyframes modalPopIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.login-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.login-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1b1e;
    font-weight: 600;
}

.login-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

.login-modal-close:hover {
    color: #333;
}

.login-modal-body {
    padding: 1.5rem;
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.login-modal-footer .btn-primary-modern {
    width: auto;
    padding: 0.5rem 1.5rem;
    margin-top: 0;
}

.brand-hero-text {
    font-size: 1.8rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 5rem;
    font-weight: 300;
}

.stats-grid {
    display: flex;
    gap: 5rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item h3 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
}

.stat-item p {
    font-size: 1.25rem;
    opacity: 0.8;
    margin: 0.6rem 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.brand-footer {
    margin-top: auto;
    font-size: 1.1rem;
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.brand-features-list {
    display: flex;
    gap: 30px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

/* Right Panel - Login Form */
.login-form-panel {
    flex: 4;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    min-width: 500px;
    min-height: 100vh;
    position: relative;
}

.login-form-content {
    width: 100%;
    max-width: 550px;
    padding: 2rem;
    margin: auto 0;
}

/* Mobile Logo - hidden on desktop, shown on mobile */
.login-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 4rem;
}

.login-mobile-logo img {
    max-height: 60px;
    filter: none;
}

.login-header {
    margin-bottom: 4rem;
}

.login-header h2 {
    font-size: 3rem;
    color: #1a1f36;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.login-header p {
    font-size: 1.4rem;
    color: #8792a2;
}

/* Form Elements */
.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1.2rem 1.4rem;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1.4rem;
    transition: all 0.2s;
    height: auto !important;
    box-shadow: none !important;
    background-color: #fcfcfd;
}

.form-control:focus {
    background-color: #fff;
    border-color: #0061f2;
    box-shadow: 0 0 0 4px rgba(0, 97, 242, 0.1) !important;
}

.input-label {
    display: block;
    margin-bottom: 1rem;
    color: #4a5568;
    font-weight: 600;
    font-size: 1.25rem;
}

/* Buttons */
.btn-primary-modern {
    background-color: #0061f2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1.2rem 2.5rem;
    font-weight: 600;
    width: 100%;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-primary-modern:hover {
    background-color: #004dc2;
    text-decoration: none;
    color: white;
}

.btn-secondary-modern {
    background-color: #fff;
    color: #0061f2;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 1.2rem 2.5rem;
    font-weight: 600;
    width: 100%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-secondary-modern:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #004dc2;
    border-color: #cce5ff;
}

/* Password Toggle Group */
.password-toggle-group {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8792a2;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    z-index: 10;
}

.toggle-password-btn:hover {
    color: #0061f2;
}

/* Links */
.forgot-link {
    color: #0061f2;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2.5rem 0;
    color: #8792a2;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e1e1e1;
}

.lang-select {
    border: none;
    background: transparent;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
}

.language-selector-wrapper {
    position: absolute;
    top: 40px;
    right: 40px;
}

/* Responsive */
@media (max-width: 900px) {
    .login-container {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        flex: 100%;
        padding: 1.5rem;
        min-width: unset;
        min-height: unset;
        width: 100%;
    }

    .login-form-content {
        max-width: 100%;
        padding: 1rem;
    }

    /* Show logo on mobile */
    .login-mobile-logo {
        display: block;
    }

    .login-header {
        margin-bottom: 2rem;
    }

    .login-header h2 {
        font-size: 2rem;
    }

    .login-header p {
        font-size: 1.1rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .language-selector-wrapper {
        top: 1rem;
        right: 1rem;
    }
}

/* Session Alert Banners */
.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.login-alert i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.login-alert-warning {
    background-color: #fff8e1;
    color: #e65100;
    border: 1px solid #ffe082;
}

.login-alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #90caf9;
}