@page { size: A4 portrait; margin: 10mm; }
* { box-sizing: border-box; }
body { margin: 0; color: #183b35; background: #fff; font: 12px Arial, sans-serif; }
.gdn-professional-dialog { position: fixed; inset: 0; z-index: 5000; overflow: auto; padding: 18px; background: rgba(13,35,31,.48); }
.gdn-doc-shell { width: min(1180px,100%); margin: auto; background: #fff; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.gdn-doc-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #d8e4df; }
.gdn-doc-actions button { border: 0; border-radius: 6px; padding: 10px 14px; color: #087f75; background: #edf2ef; font-weight: 700; cursor: pointer; }
.gdn-doc-actions .primary { color: #fff; background: #087f75; }
.gdn-document { padding: 24px 30px; background: #fff; }
.gdn-document header { display: grid; grid-template-columns: 100px 1fr 240px; align-items: center; gap: 18px; padding-bottom: 14px; border-bottom: 3px solid #087f75; }
.gdn-document header img { width: 88px; height: 70px; object-fit: contain; }
.gdn-document h1 { margin: 0 0 4px; font: 700 25px Georgia,serif; }
.gdn-document header p { margin: 3px 0; color: #536c66; }
.gdn-document header aside { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #b9cec7; }
.gdn-document header aside span,.gdn-meta span,.gdn-remarks span { color: #607872; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.gdn-document h2 { margin: 18px 0 12px; text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.gdn-document h3 { margin: 18px 0 8px; }
.gdn-meta { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid #cfddd8; }
.gdn-meta div { min-height: 58px; padding: 9px 11px; border-right: 1px solid #cfddd8; border-bottom: 1px solid #cfddd8; }
.gdn-meta strong,.gdn-meta input { display: block; width: 100%; margin-top: 5px; }
.gdn-meta input,.gdn-remarks textarea { padding: 7px; border: 1px solid #9db9b0; }
.gdn-doc-table { overflow-x: auto; }
.gdn-doc-table table { width: 100%; border-collapse: collapse; }
.gdn-doc-table th,.gdn-doc-table td { padding: 8px; border: 1px solid #b9cec7; text-align: left; }
.gdn-doc-table td small { display: block; margin-top: 2px; color: #607872; }
.gdn-doc-table thead th { color: #fff; background: #17675d; }
.gdn-doc-table tfoot th { background: #e8f1ed; }
.gdn-remarks { min-height: 72px; margin-top: 16px; padding: 10px; border: 1px solid #b9cec7; }
.gdn-remarks p { margin: 8px 0 0; white-space: pre-wrap; }
.gdn-remarks textarea { width: 100%; min-height: 62px; margin-top: 7px; }
.invoice-totals { width: min(390px,100%); margin: 16px 0 0 auto; border: 1px solid #b9cec7; }
.invoice-totals div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 10px; border-bottom: 1px solid #cfddd8; }
.invoice-totals div:last-child { border-bottom: 0; }
.invoice-totals span { color: #607872; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.invoice-grand-total { color: #fff; background: #17675d; font-size: 13px; }
.invoice-grand-total span { color: #fff; }
.invoice-document input { width: 100%; min-width: 72px; padding: 7px; border: 1px solid #9db9b0; background: #fff; font: inherit; }
.invoice-totals input { max-width: 130px; text-align: right; }
.gdn-signatures { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 42px; text-align: center; }
.gdn-signatures i { display: block; border-top: 1px solid #294d46; }
.gdn-signatures span { display: block; margin-top: 6px; }
.gdn-document footer { margin-top: 26px; padding-top: 7px; border-top: 1px solid #cad9d4; color: #647a74; text-align: center; font-size: 9px; }
.gdn-print-frame { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.report-print-button { margin-left: 12px; padding: 10px 14px; border: 0; border-radius: 6px; color: #fff; background: #087f75; font-weight: 700; cursor: pointer; }
.create-gdn-invoice { margin-left: 10px; padding: 10px 14px; border: 0; border-radius: 6px; color: #fff; background: #0b776d; font-weight: 700; cursor: pointer; }
.gdn-meta select { display: block; width: 100%; margin-top: 5px; padding: 7px; border: 1px solid #9db9b0; background: #fff; }
.gdn-invoice-preview { margin-top: 16px; border: 1px solid #cfddd8; }
.gdn-invoice-preview .gdn-document { padding: 18px; }
.report-document > .content { padding: 0; }
.report-document > .content > section { margin: 12px 0; }
@media print {
  body { font-size: 9px; }
  .gdn-document { padding: 0; }
  .gdn-document header { grid-template-columns: 70px 1fr 170px; gap: 10px; }
  .gdn-document header img { width: 64px; height: 54px; }
  .gdn-document h1 { font-size: 18px; }
  .gdn-meta { grid-template-columns: repeat(2,1fr); }
  .gdn-meta div { min-height: 44px; padding: 6px 8px; }
  .gdn-doc-table { overflow: visible; }
  .gdn-doc-table table { table-layout: fixed; font-size: 8px; }
  .gdn-doc-table th,.gdn-doc-table td { padding: 5px 3px; overflow-wrap: anywhere; }
  .gdn-doc-table th:nth-child(1) { width: 5%; }
  .gdn-doc-table th:nth-child(2) { width: 13%; }
  .gdn-doc-table th:nth-child(3) { width: 13%; }
  .gdn-doc-table th:nth-child(4) { width: 22%; }
  .gdn-doc-table th:nth-child(n+5) { width: 9.4%; }
  .invoice-doc-table th:nth-child(1) { width: 4%; }
  .invoice-doc-table th:nth-child(2) { width: 10%; }
  .invoice-doc-table th:nth-child(3) { width: 11%; }
  .invoice-doc-table th:nth-child(4) { width: 17%; }
  .invoice-doc-table th:nth-child(5) { width: 17%; }
  .invoice-doc-table th:nth-child(6) { width: 7%; }
  .invoice-doc-table th:nth-child(7) { width: 8%; }
  .invoice-doc-table th:nth-child(8) { width: 12%; }
  .invoice-doc-table th:nth-child(9) { width: 14%; }
  .gdn-doc-table thead { display: table-header-group; }
  .gdn-doc-table tr { break-inside: avoid; }
  .gdn-signatures { gap: 12px; margin-top: 30px; }
  .gdn-document footer { margin-top: 18px; }
}
@media (max-width: 760px) { .gdn-meta { grid-template-columns: 1fr 1fr; } .gdn-document header { grid-template-columns: 70px 1fr; } .gdn-document header aside { grid-column: 1/-1; } }
