:root, [data-theme="light"] {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #f9fafb;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #ffffff;
    --sidebar-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    --body-bg: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --secondary-color: #1f2937;
    --text-color: #f9fafb;
    --light-text: #9ca3af;
    --border-color: #374151;
    --success-color: #34d399;
    --error-color: #f87171;
    --bg-color: #111827;
    --sidebar-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --body-bg: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

/* Garante que o tema seja aplicado ao html */
html[data-theme="dark"] {
    background: var(--body-bg);
    color: var(--text-color);
}

/* Corrige cores do Bootstrap no tema escuro */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .form-control {
    background-color: var(--bg-color);
    color: var(--text-color);
}



body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--body-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

.login-container {
    display: flex;
    max-width: 900px;
    background-color: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.login-sidebar {
    background: var(--sidebar-bg);
    color: white;
    padding: 40px;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.3s ease;
}

.login-sidebar h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.login-sidebar p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
}

.feature-list li i {
    margin-right: 10px;
    font-size: 18px;
}

.login-form {
    padding: 40px;
    width: 60%;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    height: 60px;
    width: auto;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--light-text);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group i.fa-eye,
.input-group i.fa-eye-slash {
    position: absolute;
    right: 15px;
    color: var(--light-text);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.input-group i.fa-eye:hover,
.input-group i.fa-eye-slash:hover {
    color: var(--primary-color);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-login {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

.btn-login:disabled {
    background-color: #a5b4fc;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--light-text);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.cf-turnstile {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.modal-header {
    border-bottom: none;
    padding: 25px 25px 0 25px;
}

.modal-body {
    padding: 20px 25px 25px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-description {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* Spinner para feedback de loading */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Botão de alternância de tema com ícones */
/* Botão de alternância de tema com ícones */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--bg-color);
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

/* Estilos dos ícones */
.slider .sun-icon,
.slider .moon-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgb(0, 0, 0);
    z-index: 1;
    transition: opacity 0.3s;
}

.slider .sun-icon {
    left: 8px;
    opacity: 1;
    color: #322802;
}

.slider .moon-icon {
    right: 8px;
    opacity: 0;
    color: #000000;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:checked + .slider .sun-icon {
    opacity: 0;
}

input:checked + .slider .moon-icon {
    opacity: 1;
}



/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-sidebar, .login-form {
        width: 100%;
    }
    
    .login-sidebar {
        padding: 20px;
    }
    
    .login-sidebar p {
        font-size: 16px;
        opacity: 0.9;
        margin-bottom: 10px;
        line-height: 1.6;
    }
    
    .feature-list {
        display: none;
    }
}


.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%; /* Adicione esta linha */
}

.input-group input {
    flex: 1;
    padding: 12px 40px 12px 15px; /* Aumente o padding direito */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%; /* Adicione esta linha */
}

.input-group i:not(.fa-eye):not(.fa-eye-slash) {
    position: absolute;
    right: 15px;
    color: var(--light-text);
    font-size: 18px;
    pointer-events: none; /* Impede que o ícone interfira com o input */
}


.btn-close {
   position:absolute;
    top:10px;
    right:11px;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    background-color: rgba(248, 224, 222, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    font-size: 12px;
}

.btn-close:hover {
    background-color: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}
