/* Modern Login Page - Clean & Minimal Design */

:root,
[data-theme="dark"] {
    --login-bg:           #000000;
    --login-label:        #8b92a7;
    --login-input-border: rgba(255, 255, 255, 0.15);
    --login-input-color:  #a0a8b8;
    --login-input-focus-color: #c9d1d9;
    --login-autofill-fill: #000000;
    --login-placeholder:  #6e7681;
    --login-toggle-icon:  #6e7681;
    --login-signup-text:  #8b92a7;
    --login-lang-border:  #30363d;
    --login-forgot-title: #ffffff;
    --login-forgot-desc:  #8b92a7;
}

[data-theme="light"] {
    --login-bg:           #ffffff;
    --login-label:        #64748b;
    --login-input-border: rgba(0, 0, 0, 0.15);
    --login-input-color:  #1e293b;
    --login-input-focus-color: #0f172a;
    --login-autofill-fill: #f1f5f9;
    --login-placeholder:  #94a3b8;
    --login-toggle-icon:  #94a3b8;
    --login-signup-text:  #64748b;
    --login-lang-border:  #cbd5e1;
    --login-forgot-title: #1e293b;
    --login-forgot-desc:  #64748b;
}

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

html, body {
    background: var(--login-bg);
}

.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--login-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Logo watermark background */
/* .login-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background-image: url('/images/micro_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    filter: grayscale(1) brightness(1.2);
    z-index: 0;
} */

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--login-input-border);
    background: transparent;
    color: var(--login-label);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: #0089d3;
    border-color: rgba(0, 137, 211, 0.4);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* ===================================
   LEFT SIDE - DECORATIVE (HIDDEN)
   =================================== */

.login-left {
    display: none;
}

.decorative-content {
    display: none;
}

/* Brand Section */
.brand-section {
    display: none;
}

.brand-logo-large {
    display: none;
}

.brand-title {
    display: none;
}

.brand-description {
    display: none;
}

/* ===================================
   RIGHT SIDE - LOGIN FORM
   =================================== */

.login-right {
    flex: none;
    width: 100%;
    max-width: 440px;
    background: transparent;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-form-wrapper {
    max-width: 440px;
    width: 100%;
    animation: fadeInRight 0.8s ease-out;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo-small {
    height: 80px;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 4px 20px rgba(99, 128, 234, 0.15));
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: #8b92a7;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--login-label);
    margin-bottom: 8px;
}

.form-group label i {
    display: none;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    background: transparent !important;
    border: 1px solid var(--login-input-border);
    border-radius: 8px;
    color: var(--login-input-color) !important;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.login-input:focus {
    border-color: rgba(102, 126, 234, 0.6);
    background: transparent !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
    color: var(--login-input-focus-color) !important;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--login-autofill-fill) inset !important;
    -webkit-text-fill-color: var(--login-input-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-input::placeholder {
    color: var(--login-placeholder);
    opacity: 0.6;
}

.form-input.error {
    border-color: #f85149;
    background: rgba(248, 81, 73, 0.05);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f85149;
    font-size: 13px;
    margin-top: 8px;
}

.error-message i {
    font-size: 12px;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--login-toggle-icon);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    outline: none;
}

.toggle-password:hover {
    color: #0089d3;
}

.toggle-password i {
    font-size: 16px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.signup-text {
    color: var(--login-signup-text);
    font-size: 13px;
}

.signup-link,
.forgot-link,
.forgot-password-link {
    color: #0089d3;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.signup-link {
    margin-left: 4px;
}

.signup-link:hover,
.forgot-link:hover,
.forgot-password-link:hover {
    color: #8b9bff;
    text-decoration: underline;
}

/* Remember Me */
.remember-me-group {
    margin-bottom: 16px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--login-signup-text);
    font-size: 13px;
    user-select: none;
}

.remember-me-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #0089d3;
    cursor: pointer;
    flex-shrink: 0;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 13px 24px;
    background: #0089d3;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: #0070b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 137, 211, 0.3);
}

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

.btn-text {
    position: relative;
    z-index: 1;
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    cursor: not-allowed;
}

.login-btn.loading .btn-text,
.login-btn.loading .btn-icon {
    opacity: 0;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--login-lang-border);
}

.language-flags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    opacity: 0.4;
    filter: grayscale(100%) brightness(0.7);
}

.flag-btn:hover {
    opacity: 0.8;
    filter: grayscale(50%) brightness(0.9);
    transform: scale(1.15);
}

.flag-btn.active {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

.flag-icon {
    font-size: 20px;
    display: block;
    line-height: 1;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .login-right {
        padding: 40px 24px;
    }
}

@media (max-width: 768px) {
    .login-right {
        padding: 40px 24px;
    }

    .login-form-wrapper {
        max-width: 100%;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 32px 20px;
    }

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

    .login-title {
        font-size: 24px;
    }

    .brand-logo-small {
        height: 50px;
    }

    .form-input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .login-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Forgot Password & Reset Password Styles */
.forgot-password-info {
    text-align: center;
    margin-bottom: 32px;
}

.forgot-password-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--login-forgot-title);
    margin-bottom: 12px;
}

.forgot-password-desc {
    font-size: 15px;
    color: var(--login-forgot-desc);
    line-height: 1.6;
}

.forgot-password-back {
    margin-top: 24px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0089d3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-login:hover {
    color: #8b9bff;
    gap: 12px;
}

.back-to-login i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.back-to-login:hover i {
    transform: translateX(-4px);
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background: rgba(46, 160, 67, 0.1);
    color: #3fb950;
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.alert i {
    font-size: 16px;
}
