* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F8F4FE;
    min-height: 100vh;
    overflow-x: hidden;
}

.modern-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modern-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    display: flex;
    min-height: 600px;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
}

.language-selector .dropdown-toggle {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #475569;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.language-selector .dropdown-toggle:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.language-selector .dropdown-toggle i {
    font-size: 16px;
}

.language-selector .dropdown-toggle::after {
    margin-left: 4px;
    font-size: 12px;
}

.language-selector .dropdown-menu {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 8px;
    min-width: 180px;
    margin-top: 8px;
}

.language-selector .dropdown-menu a {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
}

.language-selector .dropdown-menu a:hover {
    background: #f1f5f9;
    color: #9974DA;
}

.language-selector .dropdown-menu img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

.language-selector .dropdown-menu .lang-name {
    flex: 1;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toast-body-error {
    background: #fee;
    color: #dc3545;
}

.toast-body-success {
    background: #d4edda;
    color: #28a745;
}

.toast-header-error {
    background: #dc3545;
    color: white;
    border: none;
}

.toast-header-success {
    background: #28a745;
    color: white;
    border: none;
}

/* Loading Overlay */
#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    backdrop-filter: blur(4px);
}

#overlay .loader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .modern-card {
        flex-direction: column;
        border-radius: 16px;
    }

    .language-selector {
        top: 16px;
        right: 16px;
    }

    .language-selector .dropdown-toggle span {
        display: none;
    }

    .language-selector .dropdown-toggle {
        padding: 10px;
    }
}

.left-panel {
    flex: 1;
    background-image: url('login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.left-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.brand-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    z-index: 20;
}

.brand-logo-icon {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo-text {
    font-size: 26px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-content {
    z-index: 20;
    color: white;
    text-align: center;
    max-width: 450px;
    width: 100%;
    margin-top: 50px;
}

.illustration-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

.illustration-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.welcome-content h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tagline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tagline-item {
    font-size: 16px;
    line-height: 1.6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

.tagline-item span {
    max-width: 400px;
}

.tagline-item i {
    font-size: 20px;
    color: white;
}

/* Right Panel - Login Form */
.right-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.login-form-container {
    max-width: 440px;
    width: 100%;
}

.login-header {
    margin-bottom: 48px;
}

.login-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.input-group-modern {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.form-control-modern {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    color: #0f172a;
    line-height: 1.5;
}

.form-control-modern::placeholder {
    color: #94a3b8;
}

.form-control-modern:focus {
    outline: none;
    border-color: #9974DA;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.05);
}

.form-control-modern.error {
    border-color: #ef4444;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    z-index: 1;
}

.password-toggle:hover {
    color: #9974DA;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.forgot-password {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 32px;
}

.forgot-password a {
    color: #9974DA;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: #7C58BA;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: #9974DA;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

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

.signup-link {
    text-align: center;
    color: #64748b;
    font-size: 15px;
    margin-top: 24px;
}

.signup-link a {
    color: #9974DA;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.signup-link a:hover {
    color: #7C58BA;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .left-panel {
        display: none;
    }

    .right-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .right-panel {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .form-control-modern {
        padding: 14px 16px 14px 48px;
    }

    .btn-login {
        padding: 14px;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    width: auto;
}

.toast {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
    min-width: 350px;
}

.toast-header-custom {
    background: white;
    border: none;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: none;
}

.toast-header-custom .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.toast-header-custom .toast-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.toast-header-custom-error .toast-icon,
.toast-header-custom-error .toast-title {
    color: #dc3545;
}

.toast-header-custom-success .toast-icon,
.toast-header-custom-success .toast-title {
    color: #28a745;
}

.toast-body-custom {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0 0 12px 12px;
}

.toast-body-custom-error {
    background: #dc3545;
    color: white;
}

.toast-body-custom-success {
    background: #28a745;
    color: white;
}

/* Toast animation */
.toast.showing {
    opacity: 1;
}

.toast:not(.show) {
    display: none;
}

@media (max-width: 576px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}
