/* 
 * RECAP.PRO - Módulo de Cadastros Genérico
 * Estrutura para Clientes, Produtos, Fornecedores, etc.
 */

.cadastro-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.cadastro-header {
    height: 60px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
}

.cadastro-search {
    flex: 1;
    display: flex;
    gap: 10px;
}

.cadastro-search input {
    flex: 1;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.cadastro-content {
    flex: 1;
    overflow: auto;
}

/* Área de formulário (quando aberto para edição/novo) */
.cadastro-form-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none; /* Só aparece ao clicar em Novo/Editar */
    align-items: center;
    justify-content: center;
}

.cadastro-form-overlay.show {
    display: flex;
}

.cadastro-form-panel {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    width: 860px;
    max-width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.cadastro-form-panel .cadastro-form-header {
    background: #f3f3f3;
    color: #333;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.cadastro-form-overlay.show {
    display: flex;
}

.cadastro-form-header {
    height: 50px;
    background: #0078d4;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

.cadastro-form-body {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
}

.cadastro-form-panel .cadastro-form-footer {
    height: 60px;
    background: #f3f3f3;
    border-top: 1px solid #ddd;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    gap: 10px;
}

/* Grid de formulário */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.config-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-form-group.full-width {
    grid-column: 1 / -1;
}

.config-form-group label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
}

.config-form-group input,
.config-form-group select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.config-form-group input:focus,
.config-form-group select:focus {
    border-color: #0078d4;
    outline: none;
}

/* Inputs que devem ser maiúsculos */
input[type="text"][data-uppercase] {
    text-transform: uppercase;
}

.config-form-group textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
    font-size: inherit;
}

/* Ajustes na tabela */
.pdv-table tr:nth-child(even) {
    background: #f9f9f9;
}

.pdv-table td {
    border-color: #eee;
}

/* Modal de Confirmação */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.confirm-overlay.show {
    display: flex;
}

.confirm-modal {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    width: 400px;
    max-width: 90%;
    padding: 20px;
    border-radius: 4px;
}

.confirm-modal h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 16px;
}

.confirm-modal p {
    margin: 0 0 20px;
    color: #666;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-buttons button {
    height: 36px;
    padding: 0 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.confirm-buttons .btn-cancel {
    background: #fff;
    color: #333;
}

.confirm-buttons .btn-confirm {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

