/**
 * ORÇAMENTOS V2 - CSS MINIMALISTA
 */

/* Ocultar documento quando não estiver imprimindo */
.documento-hidden {
    display: none !important;
}

/* HEADER REDESENHADO - COMPACTO E MODERNO */
.orcamentos-header {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.orcamentos-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.orcamentos-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.orcamentos-title i {
    color: #3b82f6;
}

.orcamentos-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

/* BOTÃO NOVO REDESENHADO */
.btn-novo-orcamento {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(59,130,246,0.2);
}

.btn-novo-orcamento:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59,130,246,0.3);
}

.btn-novo-orcamento:active {
    transform: translateY(0);
}

/* STATS CARDS REDESENHADOS - COMPACTOS E ELEGANTES */
.orcamentos-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border-color: #3b82f6;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

/* Cores específicas para cada stat */
.stat-card:nth-child(1)::before {
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(to bottom, #10b981, #059669);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.stat-card:nth-child(2) .stat-value {
    color: #10b981;
}

.stat-card:nth-child(3) .stat-value {
    color: #f59e0b;
}

/* LISTA DE ORÇAMENTOS */
#listaOrcamentos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orc-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orc-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
    transform: translateY(-1px);
}

.orc-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.orc-item-info strong {
    font-size: 14px;
    color: #111827;
}

.orc-item-info span {
    font-size: 12px;
    color: #6b7280;
}

.orc-item-valor {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

/* Documento */
.doc-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.doc-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 32px;
    text-align: center;
}

.doc-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.doc-tipo {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
}

.doc-numero {
    font-size: 20px;
    font-weight: 700;
    margin-top: 16px;
    padding: 10px 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    display: inline-block;
}

.doc-body {
    padding: 32px;
}

.doc-section {
    margin-bottom: 24px;
}

.doc-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3b82f6;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #3b82f6;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.doc-field label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 4px;
}

.doc-field input,
.doc-field select,
.doc-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
}

.doc-field input:focus,
.doc-field select:focus,
.doc-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Tabela */
.doc-table-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.doc-table thead {
    background: #f9fafb;
}

.doc-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #d1d5db;
    font-size: 11px;
    text-transform: uppercase;
}

.doc-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.doc-table tbody tr:hover {
    background: #f9fafb;
}

.input-cell {
    width: 100%;
    border: 1px solid transparent;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 3px;
    background: transparent;
}

.input-cell:hover {
    background: white;
    border-color: #e5e7eb;
}

.input-cell:focus {
    outline: none;
    background: white;
    border-color: #3b82f6;
}

.btn-add-item {
    background: transparent;
    border: 2px dashed #d1d5db;
    color: #6b7280;
    padding: 10px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-add-item:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59,130,246,0.05);
}

.btn-del {
    background: transparent;
    border: none;
    color: #dc2626;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-del:hover {
    background: #fee2e2;
}

/* Totais */
.doc-totals {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.doc-totals-config {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.total-line.subtotal {
    border-bottom: 1px solid #d1d5db;
}

.total-line.final {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 3px solid #111827;
    margin-top: 8px;
    color: #10b981;
}

/* Footer */
.doc-footer {
    background: #f3f4f6;
    padding: 16px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.doc-actions {
    display: flex;
    gap: 8px;
}

.doc-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-btn.primary {
    background: #3b82f6;
    color: white;
}

.doc-btn.primary:hover {
    background: #2563eb;
}

.doc-btn.secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.doc-btn.secondary:hover {
    background: #f9fafb;
}

.doc-btn.success {
    background: #10b981;
    color: white;
}

.doc-btn.success:hover {
    background: #059669;
}

.doc-btn.danger {
    background: #ef4444;
    color: white;
}

.doc-btn.danger:hover {
    background: #dc2626;
}

/* Responsivo */
@media (max-width: 768px) {
    .doc-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-footer {
        flex-direction: column;
    }
    
    .doc-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .doc-btn {
        width: 100%;
        justify-content: center;
    }
}

