

.presupuesto-card {
  max-width: 750px;
  background: var(--bg-body);
  border-radius: 8px;
  padding: 2rem;
}

.print-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.brand span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.doc-meta {
  text-align: right;
}

.doc-meta h2 {
  font-size: 1.25rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.client-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.client-section label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.client-section input {
  margin: 0;
  font-weight: 600;
}


.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.items-table th {
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: 0.5rem 0.25rem;
}

.items-table td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
}

.items-table input {
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.col-cant { width: 10%; }
.col-precio { width: 22%; }
.col-total { width: 22%; text-align: right; font-weight: 600; }
.col-action { width: 5%; text-align: center; }

.btn-del {
  background: none;
  border: none;
  color: #ef4444;
  font-weight: bold;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.btn-add {
  background: none;
  border: 1px dashed var(--border);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-bottom: 1.5rem;
}

.btn-add:hover {
  background: var(--ad-bg);
}


.budget-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1rem;
}

.budget-controls {
  display: flex;
  gap: 1rem;
}

.summary-box {
  width: 260px;
  margin-left: auto;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.summary-row.final-total {
  border-top: 2px solid var(--text-main);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-main);
}

.print-footer {
  display: none;
}

  


@page {
  size: A4 portrait;
  margin: 15mm 18mm 15mm 18mm; 
}



@media print {

  header, 
  footer, 
  .ad-banner, 
  .no-print, 
  .tool-desc, 
  main > h2 {
    display: none !important;
  }

  
  html, body {
    width: 100%;
    height: 100%;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  
  .layout-container, 
  main, 
  .presupuesto-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  
  .presupuesto-card {
    display: flex;
    flex-direction: column;
    min-height: 250mm; 
  }

  
  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2pt solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  .brand h1 {
    font-size: 20pt;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0;
  }

  .brand span {
    font-size: 9pt;
    color: #475569 !important;
  }

  .doc-meta h2 {
    font-size: 14pt;
    font-weight: 800;
    letter-spacing: 1px;
    color: #0f172a !important;
    margin-bottom: 6px;
  }

  .doc-meta .meta-field {
    font-size: 9pt;
    color: #334155;
  }

 
  .client-section {
    display: flex !important;
    align-items: center;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .client-section label {
    font-size: 9pt;
    font-weight: 700;
    color: #475569 !important;
    margin-right: 10px;
  }

  
  input, select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 10pt !important;
    font-weight: 600 !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  
  .items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
  }

  .items-table th {
    border-bottom: 1.5pt solid #0f172a;
    color: #0f172a !important;
    font-size: 8.5pt;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 4px;
    text-align: left;
  }

  .items-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 4px;
    font-size: 10pt;
    vertical-align: middle;
  }

  .col-total {
    text-align: right !important;
  }

  
  .budget-footer {
    display: flex !important;
    justify-content: flex-end;
    margin-top: auto; 
    padding-top: 15px;
  }

  .summary-box {
    width: 220px;
  }

  .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 9.5pt;
    color: #334155;
  }

  .summary-row.final-total {
    border-top: 1.5pt solid #0f172a;
    margin-top: 6px;
    padding-top: 8px;
    font-size: 12pt;
    font-weight: 800;
    color: #0f172a !important;
  }

 
  .print-footer {
    display: block !important;
    margin-top: 30px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 8.5pt;
    color: #64748b;
  }
}
