/* ============================================
   SISTEMA CENTRAL DE CONTRATOS - MUNDO PLANALTO
   Estilos Customizados
   ============================================ */

/* ============================================
   VARIÁVEIS CSS (Cores da Marca)
   ============================================ */
:root {
    /* Cores Primárias - Mundo Planalto */
    --mp-primary: #0078d4;
    --mp-primary-dark: #005a9e;
    --mp-primary-light: #4da3ff;
    --mp-primary-rgb: 0, 120, 212;
    
    /* Cores Secundárias */
    --mp-secondary: #2d3748;
    --mp-secondary-light: #4a5568;
    --mp-secondary-dark: #1a202c;
    
    /* Cores de Ação */
    --mp-success: #10b981;
    --mp-warning: #f59e0b;
    --mp-danger: #ef4444;
    --mp-info: #3b82f6;
    
    /* Cores Neutras */
    --mp-white: #ffffff;
    --mp-gray-50: #f9fafb;
    --mp-gray-100: #f3f4f6;
    --mp-gray-200: #e5e7eb;
    --mp-gray-300: #d1d5db;
    --mp-gray-400: #9ca3af;
    --mp-gray-500: #6b7280;
    --mp-gray-600: #4b5563;
    --mp-gray-700: #374151;
    --mp-gray-800: #1f2937;
    --mp-gray-900: #111827;
    
    /* Sombras */
    --mp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --mp-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --mp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --mp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --mp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Bordas */
    --mp-radius-sm: 0.25rem;
    --mp-radius: 0.5rem;
    --mp-radius-lg: 0.75rem;
    --mp-radius-xl: 1rem;
    
    /* Transições */
    --mp-transition: all 0.3s ease;
    --mp-transition-fast: all 0.15s ease;
}

/* ============================================
   RESET E BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--mp-gray-800);
    background-color: var(--mp-gray-50);
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--mp-secondary);
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-primary { color: var(--mp-primary) !important; }
.text-muted { color: var(--mp-gray-500) !important; }

/* ============================================
   BOTÕES CUSTOMIZADOS
   ============================================ */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: var(--mp-radius);
    transition: var(--mp-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--mp-primary);
    border-color: var(--mp-primary);
    color: var(--mp-white);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--mp-primary-dark);
    border-color: var(--mp-primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(var(--mp-primary-rgb), 0.25);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--mp-primary);
    border-color: var(--mp-primary);
}

.btn-outline-primary:hover {
    background-color: var(--mp-primary);
    border-color: var(--mp-primary);
    color: var(--mp-white);
}

.btn-success {
    background-color: var(--mp-success);
    border-color: var(--mp-success);
}

.btn-danger {
    background-color: var(--mp-danger);
    border-color: var(--mp-danger);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--mp-radius);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: var(--mp-radius-lg);
    box-shadow: var(--mp-shadow);
    transition: var(--mp-transition);
    background: var(--mp-white);
}

.card:hover {
    box-shadow: var(--mp-shadow-lg);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--mp-gray-200);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mp-secondary);
    margin-bottom: 0.75rem;
}

/* Card de Unidade */
.card-unidade {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-unidade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--mp-primary);
    transform: scaleY(0);
    transition: var(--mp-transition);
}

.card-unidade:hover::before {
    transform: scaleY(1);
}

.card-unidade:hover {
    transform: translateY(-4px);
}

.card-unidade .card-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-light));
    border-radius: var(--mp-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-unidade .card-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mp-gray-200);
}

.card-unidade .stat-item {
    text-align: center;
}

.card-unidade .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mp-primary);
}

.card-unidade .stat-label {
    font-size: 0.75rem;
    color: var(--mp-gray-500);
    text-transform: uppercase;
}

/* Card de Estatística */
.card-stat {
    padding: 1.5rem;
}

.card-stat .stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--mp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.card-stat .stat-icon.primary { background: rgba(var(--mp-primary-rgb), 0.1); color: var(--mp-primary); }
.card-stat .stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--mp-success); }
.card-stat .stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--mp-warning); }
.card-stat .stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--mp-danger); }

.card-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mp-secondary);
    line-height: 1;
}

.card-stat .stat-label {
    color: var(--mp-gray-500);
    font-size: 0.875rem;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-label {
    font-weight: 500;
    color: var(--mp-gray-700);
    margin-bottom: 0.375rem;
}

.form-control, .form-select {
    border: 1px solid var(--mp-gray-300);
    border-radius: var(--mp-radius);
    padding: 0.625rem 0.875rem;
    transition: var(--mp-transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--mp-primary-rgb), 0.15);
}

.form-control::placeholder {
    color: var(--mp-gray-400);
}

.input-group-text {
    background-color: var(--mp-gray-100);
    border-color: var(--mp-gray-300);
}

/* ============================================
   UPLOAD DE ARQUIVOS
   ============================================ */
.file-upload-zone {
    border: 2px dashed var(--mp-gray-300);
    border-radius: var(--mp-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--mp-gray-50);
    transition: var(--mp-transition);
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--mp-primary);
    background-color: rgba(var(--mp-primary-rgb), 0.05);
}

.file-upload-zone .upload-icon {
    font-size: 3rem;
    color: var(--mp-gray-400);
    margin-bottom: 1rem;
    transition: var(--mp-transition);
}

.file-upload-zone:hover .upload-icon {
    color: var(--mp-primary);
    transform: scale(1.1);
}

.file-upload-zone .upload-text {
    color: var(--mp-gray-600);
    margin-bottom: 0.5rem;
}

.file-upload-zone .upload-hint {
    font-size: 0.875rem;
    color: var(--mp-gray-400);
}

/* Lista de Arquivos */
.file-list {
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--mp-white);
    border: 1px solid var(--mp-gray-200);
    border-radius: var(--mp-radius);
    margin-bottom: 0.5rem;
    transition: var(--mp-transition-fast);
}

.file-item:hover {
    border-color: var(--mp-primary);
    box-shadow: var(--mp-shadow-sm);
}

.file-item .file-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(var(--mp-primary-rgb), 0.1);
    border-radius: var(--mp-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-primary);
    margin-right: 1rem;
}

.file-item .file-info {
    flex: 1;
}

.file-item .file-name {
    font-weight: 500;
    color: var(--mp-gray-800);
}

.file-item .file-size {
    font-size: 0.75rem;
    color: var(--mp-gray-500);
}

.file-item .file-actions {
    display: flex;
    gap: 0.5rem;
}

/* Progress Bar Upload */
.upload-progress {
    height: 0.375rem;
    border-radius: var(--mp-radius);
    background: var(--mp-gray-200);
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-progress .progress-bar {
    background: linear-gradient(90deg, var(--mp-primary), var(--mp-primary-light));
    transition: width 0.3s ease;
}

/* ============================================
   TABELAS
   ============================================ */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--mp-gray-50);
    color: var(--mp-gray-600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--mp-gray-200);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--mp-gray-100);
}

.table tbody tr {
    transition: var(--mp-transition-fast);
}

.table tbody tr:hover {
    background-color: var(--mp-gray-50);
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--mp-primary-rgb), 0.05);
}

/* ============================================
   BADGES E STATUS
   ============================================ */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--mp-radius);
    font-size: 0.75rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-status::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.badge-pendente { background: rgba(245, 158, 11, 0.1); color: var(--mp-warning); }
.badge-processando { background: rgba(59, 130, 246, 0.1); color: var(--mp-info); }
.badge-concluido { background: rgba(16, 185, 129, 0.1); color: var(--mp-success); }
.badge-erro { background: rgba(239, 68, 68, 0.1); color: var(--mp-danger); }

/* ============================================
   SIDEBAR / NAVEGAÇÃO
   ============================================ */
.sidebar {
    background: linear-gradient(180deg, var(--mp-secondary-dark) 0%, var(--mp-secondary) 100%);
    min-height: 100vh;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--mp-transition-fast);
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: var(--mp-white);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: var(--mp-white);
    background: rgba(var(--mp-primary-rgb), 0.2);
    border-left-color: var(--mp-primary);
}

.sidebar .nav-link i {
    width: 1.5rem;
    text-align: center;
}

.sidebar-brand {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
    max-width: 150px;
    height: auto;
}

.sidebar-brand h5 {
    color: var(--mp-white);
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ============================================
   PÁGINA DE LOGIN / AUTH
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mp-primary-dark) 0%, var(--mp-primary) 50%, var(--mp-primary-light) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--mp-white);
    border-radius: var(--mp-radius-xl);
    box-shadow: var(--mp-shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
}

/* ============================================
   LOADING / SPINNER
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-custom {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--mp-gray-200);
    border-top-color: var(--mp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--mp-gray-200) 25%, var(--mp-gray-100) 50%, var(--mp-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--mp-radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   TOASTS / NOTIFICAÇÕES
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast-custom {
    min-width: 300px;
    padding: 1rem 1.25rem;
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
}

.toast-custom.success { background: var(--mp-success); color: white; }
.toast-custom.error { background: var(--mp-danger); color: white; }
.toast-custom.warning { background: var(--mp-warning); color: white; }
.toast-custom.info { background: var(--mp-info); color: white; }

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        transition: var(--mp-transition);
        z-index: 1000;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .file-upload-zone {
        padding: 2rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.cursor-pointer { cursor: pointer; }
.transition { transition: var(--mp-transition); }
.shadow-hover:hover { box-shadow: var(--mp-shadow-lg); }
.rounded-xl { border-radius: var(--mp-radius-xl); }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--mp-primary) 0%, var(--mp-primary-light) 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, var(--mp-secondary-dark) 0%, var(--mp-secondary) 100%);
}

.border-left-primary {
    border-left: 4px solid var(--mp-primary) !important;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CONTRATOS ESPECÍFICOS
   ============================================ */
.contrato-card {
    border-left: 4px solid var(--mp-primary);
}

.contrato-card .contrato-numero {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--mp-primary);
}

.contrato-card .contrato-valor {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mp-success);
}

.ocr-preview {
    background: var(--mp-gray-100);
    border-radius: var(--mp-radius);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
}

.ocr-highlight {
    background: rgba(245, 158, 11, 0.3);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
}




/* ============================================
   UPLOAD ZONE - NOVO CONTRATO
   ============================================ */

/* Upload Zone */
.upload-zone {
    border: 3px dashed var(--mp-gray-300);
    border-radius: var(--mp-radius-xl);
    padding: 2rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--mp-gray-50) 0%, white 100%);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-zone:hover::before,
.upload-zone.dragging::before {
    opacity: 1;
}

.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--mp-primary);
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.05) 0%, white 100%);
    transform: scale(1.01);
}

/* Tabs de Navegacao */
.nav-pills .nav-link {
    color: var(--mp-gray-600);
    font-weight: 500;
    padding: 0.875rem 1.25rem;
    border-radius: var(--mp-radius);
    background: var(--mp-gray-100);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover:not(:disabled) {
    background: var(--mp-gray-200);
    color: var(--mp-gray-800);
}

.nav-pills .nav-link.active {
    background: var(--mp-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.nav-pills .nav-link.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--mp-success);
    border-color: var(--mp-success);
}

.nav-pills .nav-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-pills .nav-link.active .tab-number {
    background: rgba(255,255,255,0.3);
}

.nav-pills .nav-link.completed .tab-number {
    background: var(--mp-success);
    color: white;
}

/* Upload Icon Animation */
.upload-icon-container {
    position: relative;
    display: inline-block;
}

.upload-icon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid var(--mp-primary);
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
}

/* Document Type Cards */
.doc-type-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.doc-type-card:hover {
    transform: translateY(-4px);
    border-color: var(--mp-primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* File Icon in Table */
.file-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-gray-100);
    border-radius: var(--mp-radius);
}


/* ============================================
   UNIT CARDS - SELECAO DE UNIDADE
   ============================================ */

.unit-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--mp-primary);
}

.unit-card.selected {
    border-color: var(--mp-success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.unit-card.selected:hover {
    border-color: var(--mp-success);
}

.unit-card .unit-details {
    background: var(--mp-gray-50);
    padding: 0.75rem;
    border-radius: var(--mp-radius);
}

.unit-card .card-footer {
    padding: 0.75rem;
}


/* ============================================
   PAYMENT OPTIONS - CONDICOES DE PAGAMENTO
   ============================================ */

.payment-option {
    border: 2px solid var(--mp-gray-200);
    border-radius: var(--mp-radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-option:hover {
    border-color: var(--mp-primary);
    background: rgba(0, 120, 212, 0.05);
}

.payment-option.selected {
    border-color: var(--mp-primary);
    background: rgba(0, 120, 212, 0.1);
}

.payment-option .form-check-input {
    margin-top: 0;
}

.payment-option .form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* ============================================
   DOCUMENTO DE VENDA - VISUALIZAÇÃO E IMPRESSÃO
   ============================================ */

.documento-venda {
    background: white;
    box-shadow: var(--mp-shadow-lg);
}

.documento-venda h3 {
    color: var(--mp-primary-dark);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.documento-venda h5 {
    color: var(--mp-secondary);
    font-weight: 600;
}

.documento-venda h6 {
    color: var(--mp-gray-600);
    font-weight: 600;
}

.documento-venda p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.documento-venda section {
    padding: 1rem 0;
}

.documento-venda .card {
    transition: all 0.3s ease;
}

.documento-venda .card:hover {
    transform: translateY(-2px);
}

/* ============================================
   ESTILOS PARA IMPRESSÃO
   ============================================ */

@media print {
    /* Esconde tudo exceto o documento */
    body * {
        visibility: hidden;
    }
    
    #documento-venda,
    #documento-venda * {
        visibility: visible;
    }
    
    #documento-venda {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
    }
    
    /* Remove elementos de navegação */
    .btn,
    .alert,
    nav,
    .navbar,
    .sidebar,
    .modal,
    .page-item,
    .pagination {
        display: none !important;
    }
    
    /* Remove sombras e bordas para impressão */
    .documento-venda {
        box-shadow: none !important;
        border: none !important;
    }
    
    .documento-venda .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    /* Ajusta cores para impressão */
    .documento-venda h3,
    .documento-venda h5 {
        color: #000 !important;
    }
    
    .text-primary {
        color: #000 !important;
    }
    
    .text-success {
        color: #000 !important;
    }
    
    .text-warning {
        color: #666 !important;
    }
    
    .bg-light {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Evita quebras de página indesejadas */
    section {
        page-break-inside: avoid;
    }
    
    .card {
        page-break-inside: avoid;
    }
    
    /* Remove backgrounds decorativos */
    .bg-warning,
    .bg-success,
    .bg-danger,
    .bg-primary {
        background: transparent !important;
    }
    
    /* Ajusta o tamanho da fonte */
    body {
        font-size: 12pt;
    }
    
    h3 {
        font-size: 18pt;
    }
    
    h5 {
        font-size: 14pt;
    }
    
    h6 {
        font-size: 12pt;
    }
}

