/* ===================================================================
   Senha Pages CSS — Sistema PCP Konecta
   Shared styles for: primeiro_acesso, trocar_senha, recuperar_senha
   =================================================================== */

/* ===== STANDALONE PAGE (primeiro_acesso, recuperar_senha) ===== */
.standalone-page {
    font-family: 'Poppins', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2B00FF 0%, #1a00b3 60%, #2B00FF 100%);
    padding: 20px;
    margin: 0;
}

.senha-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 460px;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
}

.senha-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #CCFF00 0%, #2B00FF 100%);
}

.card-logo { margin-bottom: 24px; }
.card-logo .logo { width: 130px; height: auto; }

.card-icon {
    width: 52px;
    height: 52px;
    background: rgba(43, 0, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon svg { color: #2B00FF; }

.card-icon.success-icon {
    background: rgba(16, 185, 129, 0.08);
}

.card-icon.success-icon svg { color: #10B981; }

.senha-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.7;
    margin-bottom: 28px;
}

.highlight-name {
    color: #2B00FF;
    font-weight: 600;
}

.card-footer-text {
    text-align: center;
    margin-top: 28px;
    font-size: 11px;
    color: #B8BCC6;
}


/* ===== LAYOUT (trocar_senha dentro do base.html) ===== */
.senha-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    max-width: 860px;
}

.senha-form-card { min-width: 0; }
.senha-rules-card { min-width: 0; }

.form-divider {
    border: none;
    height: 1px;
    background: #E5E7EB;
    margin: 20px 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .senha-layout {
        grid-template-columns: 1fr;
    }
}


/* ===== SHARED FORM STYLES ===== */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1A1A2E;
    margin-bottom: 6px;
}

.input-wrapper { position: relative; }

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6B7280;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: #1A1A2E;
    transition: all 0.2s ease;
    outline: none;
    background: #FFFFFF;
}

.form-input:focus {
    border-color: #2B00FF;
    box-shadow: 0 0 0 3px rgba(43, 0, 255, 0.08);
}

.form-input:focus ~ .input-icon { color: #2B00FF; }

.form-input::placeholder { color: #B8BCC6; }

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover { color: #2B00FF; }


/* ===== STRENGTH BAR ===== */
.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #E5E7EB;
    margin-top: 8px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-text {
    font-size: 11px;
    margin-top: 4px;
    color: #6B7280;
    min-height: 16px;
}


/* ===== PASSWORD RULES ===== */
.password-rules {
    background: #F5F5F7;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 24px;
}

.rules-title {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rule {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #9CA3AF;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.rule:last-child { margin-bottom: 0; }

.rule.valid { color: #10B981; }

.rule-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 10px;
}

.rule.valid .rule-dot {
    background: #10B981;
    border-color: #10B981;
    color: white;
}

.rule.valid .rule-dot::after {
    content: '✓';
}

.rule-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    color: #9CA3AF;
    margin-bottom: 6px;
}

.rule-info svg { flex-shrink: 0; margin-top: 1px; }


/* ===== MATCH INDICATOR ===== */
.match-indicator {
    font-size: 11px;
    margin-top: 6px;
    min-height: 16px;
}

.match-indicator.match { color: #10B981; }
.match-indicator.no-match { color: #EF4444; }


/* ===== BUTTONS ===== */
.btn-submit {
    width: 100%;
    height: 50px;
    background: #2B00FF;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 4px;
}

.btn-submit:hover {
    background: #1F00CC;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43, 0, 255, 0.35);
}


/* ===== ERROR / INFO BOXES ===== */
.error-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #EF4444;
}

.error-box ul { margin: 0; padding-left: 16px; }
.error-box li { margin-bottom: 2px; }
.error-icon { flex-shrink: 0; margin-top: 2px; }

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #2563EB;
    line-height: 1.6;
}

.info-icon { flex-shrink: 0; margin-top: 2px; }


/* ===== BACK LINK ===== */
.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #2B00FF;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link a:hover { color: #1F00CC; }


/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .senha-card {
        padding: 32px 24px;
    }
    .senha-card h1 {
        font-size: 20px;
    }
    .form-actions {
        flex-direction: column-reverse;
    }
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
