/* Variáveis baseadas nas cores solicitadas e temas */
:root {
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-color: #333333;
    --primary-color: #005008;
    --secondary-color: #8CCC96;
    --accent-color: #818487;
    --border-color: #ddd;
    
    /* Cores para o medidor de senha */
    --weak-color: #d93025; /* Vermelho */
    --medium-color: #fbbc05; /* Amarelo (opcional, para estado intermediário) */
    --strong-color: #34a853; /* Verde */
    --req-default: #d1d5db; /* Cinza claro para bolinhas não ativas */
}

[data-theme="dark"] {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #f4f4f4;
    --primary-color: #8CCC96;
    --secondary-color: #005008;
    --accent-color: #aaa;
    --border-color: #444;
    --req-default: #555;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s;
}

.container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
}

/* Theme Switcher no topo */
.theme-switch-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.theme-switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--accent-color); transition: .4s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }

/* Form Container */
.form-wrapper {
    background: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}
.tab-btn.active {
    color: var(--primary-color);
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Forms */
.form {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}
.form.active {
    display: block;
}

h2 {
    margin-bottom: 25px;
    font-size: 24px;
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 25px;
}
.input-group input {
    width: 100%;
    padding: 15px 15px 15px 10px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}
.input-group label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--accent-color);
    pointer-events: none;
    transition: 0.3s;
    background: var(--container-bg);
    padding: 0 5px;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-color: var(--primary-color);
}
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group input:valid ~ label {
    top: 0;
    font-size: 12px;
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--accent-color);
    cursor: pointer;
}

/* Estilos Específicos para a Senha com Validação (Inspirado nas Imagens) */
.password-strength-group .password-input-container {
    position: relative;
}
.password-strength-group input {
    border-radius: 10px;
}

/* container das verificações */
.strength-meter-container {
    margin-top: 15px;
    padding: 0 5px;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}
.strength-label {
    color: var(--accent-color);
}
.strength-text {
    color: var(--weak-color);
}

.strength-bar-bg {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}
.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--weak-color);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    font-size: 12px;
    color: var(--accent-color);
}
.strength-requirements li {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}
.strength-requirements li i {
    font-size: 8px; /* bolinha pequena */
    color: var(--req-default);
    transition: color 0.3s, transform 0.3s;
}

/* Classes ativadas pelo JS */
.req-met { color: var(--strong-color) !important; }
.req-met i { 
    color: var(--strong-color) !important; 
    /* Transforma a bolinha num ícone de check */
    content: "\f00c"; /* check icon unicode no fontawesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px !important;
}

/* Estilização dinâmica da borda do input e label baseada na força */
.input-weak input { border-color: var(--weak-color) !important; }
.input-weak label { color: var(--weak-color) !important; }

.input-strong input { border-color: var(--strong-color) !important; }
.input-strong label { color: var(--strong-color) !important; }


.forgot-password {
    display: block;
    text-align: right;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}
.forgot-password:hover { text-decoration: underline; }

.btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.btn:hover {
    background-color: var(--secondary-color);
}

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