.chave-header {
    margin-bottom: 35px;
}

    .chave-header h1 {
        margin: 0 0 10px;
        font-size: 34px;
        font-weight: 700;
        color: #2f4050;
    }

    .chave-header p {
        margin: 0;
        max-width: 900px;
        font-size: 16px;
        line-height: 1.6;
        color: #666666;
    }


.chave-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.chave-field-group {
    display: flex;
    flex-direction: column;
}

.field-label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #444444;
}

.chave-input {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #2f4050;
    border-radius: 5px;
    font-size: 15px;
    color: #555555;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.chave-input:focus {
    border-color: #008bb9;
}

.chave-select {
    appearance: auto;
}

.chave-toggle-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: #2f4050;
    cursor: pointer;
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #2f4050;
}

input:checked + .switch-slider:before {
    transform: translateX(22px);
}

.chave-options-card {
    position: relative;
    margin-bottom: 30px;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-top: 3px solid #2f4050;
    border-radius: 6px;
}

.chave-button-area {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-gerar-chave {
    min-width: 240px;
    padding: 14px 30px;
    background-color: #2f4050;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-gerar-chave:hover {
    background-color: #18a689;
    transition: 0.2s ease;
}

.btn-copiar-chave {
    min-width: 60px;
    padding: 10px 10px;
    background-color: #2f4050;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    height: 45px;
}

    .btn-copiar-chave:hover {
        background-color: #18a689;
    }

.chave-result-area {
    margin-top: 30px;
}

.chave-result-label {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 600;
    color: #555555;
}

.chave-result-group {
    display: flex;
    gap: 10px;
}

.chave-result-input {
    flex: 1;
    height: 48px;
    padding: 10px 15px;
    background-color: #ffffff;
    border: 1px solid #2f4050;
    border-radius: 5px;
    font-size: 18px;
    color: #444444;
    outline: none;
}

    .chave-result-input:focus {
        border-color: #008bb9;
    }

.info-chave {
    background-color: #ffffff;
    border: 1px solid #2f4050;
    border-radius: 8px;
    padding: 28px;
    margin-top: 30px;
}

.chave-info-header h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #2f4050;
}

.chave-info-header p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 24px;
}

.chave-composicao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.composicao-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    position: relative;
}

.badge-digitos {
    font-size: 11px;
    font-weight: 700;
    color: #2f4050;
    background-color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
}

.composicao-item h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #2f4050;
}

.composicao-item p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.chave-dv-destaque {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.dv-texto {
    font-size: 13px;
    color: #166534;
    line-height: 1.4;
}

.chave-nota-alerta {
    font-size: 12px;
    color: #777777;
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
}

.chave-nota-alerta p {
    margin: 0;
}

.danfe-info {
    padding: 28px;
    background-color: #ffffff;
    border: 1px solid #2f4050;
    border-radius: 8px;
    margin-bottom: 30px;
}

    .danfe-info h2 {
        margin: 0 0 25px;
        font-size: 23px;
        color: #2f4050;
    }

.danfe-steps {
    display: flex;
    gap: 20px;
}

.danfe-step {
    display: flex;
    flex: 1;
    gap: 12px;
}

.step-number {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2f4050;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
}

.step-content h3 {
    margin: 0 0 5px;
    font-size: 15px;
    color: #444444;
}

.step-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #777777;
}

@media (max-width: 850px) {
    .chave-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}