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

body,
html {
    height: 100%;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 20px; */
    background: #f0f2f5;
    transition: all 0.4s ease;
}

body.dark .login-wrapper {
    background: #0a0e1a;
}

.login-container {
    width: 100%;
    /* max-width: 1200px; */
    max-width: auto;
    min-height: 600px;
    /* border-radius: 28px; */
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr .75fr;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    background: #ffffff;
}

body.dark .login-container {
    background: rgba(15, 20, 35, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* LEFT PANEL - CAROUSEL */
.left-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 500px;
}

body.dark .left-panel {
    background: linear-gradient(135deg, #1a1f35 0%, #2a1f3d 100%);
}

.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    padding: 40px;
    text-align: center;
    z-index: 10;
}

.carousel-overlay h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.carousel-overlay p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 400px;
}

/* RIGHT PANEL - FORM */
.right-panel {
    padding: 50px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.brand-icon {
    font-size: 2.2rem;
    color: #667eea;
}

body.dark .brand-icon {
    color: #8b9cf7;
}

.version-badge {
    background: rgba(102, 126, 234, 0.12);
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #667eea;
    letter-spacing: 0.5px;
}

body.dark .version-badge {
    background: rgba(139, 156, 247, 0.15);
    color: #8b9cf7;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 5px;
    color: #1a1f36;
}

body.dark .login-title {
    color: #e8edf5;
}

body.dark .form-label {
    color: #7a8aa0;
}

.login-subtitle {
    color: #6b7a8f;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

body.dark .login-subtitle {
    color: #9aa9be;
}

.form-control {
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
    background: #f8fafc;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #ffffff;
}

body.dark .form-control {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8edf5;
}

body.dark .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #8b9cf7;
    box-shadow: 0 0 0 4px rgba(139, 156, 247, 0.2);
}

body.dark .form-control::placeholder {
    color: #7a8aa0;
}

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

.password-wrapper .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
}

.password-toggle:hover {
    color: #667eea;
}

body.dark .password-toggle {
    color: #7a8aa0;
}

body.dark .password-toggle:hover {
    color: #8b9cf7;
}

/* CAPTCHA Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 6px 12px 6px 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
    margin-bottom: 8px;
}

body.dark .captcha-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.captcha-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

body.dark .captcha-container:focus-within {
    border-color: #8b9cf7;
    box-shadow: 0 0 0 4px rgba(139, 156, 247, 0.15);
}

.captcha-image {
    height: 40px;
    border-radius: 8px;
}

.captcha-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 1rem;
    outline: none;
    color: #1a1f36;
    text-transform: uppercase;
}

body.dark .captcha-input {
    color: #e8edf5;
}

.captcha-input::placeholder {
    color: #94a3b8;
}

.captcha-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.captcha-refresh {
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: rotate(30deg);
}

body.dark .captcha-refresh {
    color: #8b9cf7;
}

body.dark .captcha-refresh:hover {
    background: rgba(139, 156, 247, 0.1);
}

/* CAPTCHA v.2 Styles */
.captcha-wrapper {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

body.dark .captcha-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.captcha-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

body.dark .captcha-wrapper:focus-within {
    border-color: #8b9cf7;
    box-shadow: 0 0 0 4px rgba(139, 156, 247, 0.15);
}

.captcha-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.captcha-image-box {
    background: white;
    border-radius: 8px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

body.dark .captcha-image-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.captcha-image-box img {
    height: 45px;
    width: 195px;
    display: block;
    border-radius: 4px;
}

.captcha-code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: #b4b4b4;
    background: rgba(102, 126, 234, 0.08);
    padding: 4px 16px;
    border-radius: 8px;
    min-width: 140px;
    text-align: center;
    user-select: none;
}

body.dark .captcha-code-display {
    color: #607D8B;
    background: rgba(139, 156, 247, 0.1);
}

.captcha-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.captcha-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

body.dark .captcha-btn {
    color: #8b9cf7;
}

body.dark .captcha-btn:hover {
    background: rgba(139, 156, 247, 0.1);
}

.captcha-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-input-group .form-control {
    flex: 1;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    letter-spacing: 3px;
}

.captcha-status {
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 24px;
    padding: 2px 0;
}

.captcha-status.success {
    color: #10b981;
}

.captcha-status.error {
    color: #ef4444;
}

.captcha-status.info {
    color: #3b82f6;
}

.btn-login {
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s;
    width: 100%;
    margin-top: 5px;
    color: white;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.dark .btn-login {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #e2e8f0;
}

body.dark .divider::before,
body.dark .divider::after {
    background: rgba(255, 255, 255, 0.08);
}

.social-btn {
    border-radius: 12px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    background: transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.social-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.dark .social-btn {
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

body.dark .social-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.copyright {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 20px;
}

body.dark .copyright {
    color: #6b7a8f;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    padding: 12px 20px;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

body.dark .theme-toggle {
    background: rgba(20, 30, 50, 0.85);
    color: #e8edf5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.alert-custom {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .left-panel {
        min-height: 250px;
    }

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

    .carousel-overlay h2 {
        font-size: 1.8rem;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .captcha-container {
        flex-wrap: wrap;
    }

    .captcha-image {
        height: 35px;
    }

    .captcha-top {
        flex-wrap: wrap;
    }

    .captcha-code-display {
        font-size: 1.2rem;
        min-width: 100px;
    }
}