:root {
  --gps-primary: #0f7490;
  --gps-secondary: #13c5d4;
}
* { box-sizing: border-box; }
body.gps-invoice-page {
  background: #e9edf1;
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  padding: 40px 0;
  color: #333;
}
.gps-invoice-toolbar {
  max-width: 900px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}
.gps-invoice-toolbar button {
  background: var(--gps-primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.gps-invoice-toolbar a { color: #555; text-decoration: none; font-size: 14px; }

.gps-invoice-sheet {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.gps-invoice-header { position: relative; padding: 30px 40px 20px; overflow: hidden; }
.gps-invoice-header-wave {
  position: absolute;
  top: -70px; left: -10%;
  width: 120%; height: 150px;
  background: linear-gradient(120deg, var(--gps-primary), var(--gps-secondary));
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  z-index: 0;
}
.gps-invoice-header-content {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-top: 25px;
}
.gps-invoice-logo img { max-height: 70px; display:block; }
.gps-invoice-logo-text { font-size: 20px; font-weight: 700; color: #fff; }
.gps-invoice-company { text-align: right; color: #333; font-size: 13px; }
.gps-invoice-company strong { font-size: 15px; display: block; margin-bottom: 4px; }
.gps-invoice-company-address { color: #666; }

.gps-invoice-title-row { padding: 10px 40px 0; text-align: right; }
.gps-invoice-title-row h1 {
  font-weight: 300; letter-spacing: 2px; color: #333;
  border-bottom: 2px solid #ddd; display: inline-block;
  padding-bottom: 8px; margin: 0; font-size: 26px;
}

.gps-invoice-meta-row {
  display: flex; justify-content: space-between;
  padding: 20px 40px; gap: 20px; flex-wrap: wrap;
}
.gps-invoice-client .label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.gps-invoice-client .value { font-weight: 600; font-size: 16px; margin-top: 4px; }
.gps-invoice-meta-table { border-collapse: collapse; font-size: 13px; }
.gps-invoice-meta-table th { text-align: left; color: #666; font-weight: 600; padding: 2px 12px 2px 0; white-space: nowrap; }
.gps-invoice-meta-table td { text-align: right; padding: 2px 0; }

.gps-invoice-items { width: calc(100% - 80px); margin: 10px 40px; border-collapse: collapse; font-size: 13px; }
.gps-invoice-items thead th { background: #f4f6f8; text-align: left; padding: 10px; border-bottom: 2px solid #e2e6ea; }
.gps-invoice-items thead th:first-child { width: 36px; }
.gps-invoice-items thead th:nth-child(3),
.gps-invoice-items thead th:nth-child(4),
.gps-invoice-items thead th:nth-child(5) { text-align: right; }
.gps-invoice-items tbody td { padding: 10px; border-bottom: 1px solid #eee; }
.gps-invoice-items tbody td:nth-child(3),
.gps-invoice-items tbody td:nth-child(4),
.gps-invoice-items tbody td:nth-child(5) { text-align: right; }

.gps-invoice-totals { display: flex; justify-content: flex-end; padding: 0 40px; margin-bottom: 20px; }
.gps-invoice-totals table { border-collapse: collapse; font-size: 13px; min-width: 260px; }
.gps-invoice-totals th { text-align: left; padding: 6px 20px 6px 0; color: #666; font-weight: 500; }
.gps-invoice-totals td { text-align: right; padding: 6px 0; }
.gps-invoice-totals .grand-total th,
.gps-invoice-totals .grand-total td { border-top: 1px solid #ddd; font-weight: 700; font-size: 15px; padding-top: 10px; }

.gps-invoice-periods { padding: 0 40px 20px; font-size: 13px; color: #444; }
.gps-invoice-periods ul { margin: 8px 0 0; padding-left: 18px; }

.gps-invoice-banks { padding: 10px 40px 20px; font-size: 13px; color: #444; }
.gps-invoice-bank-block { margin: 10px 0; line-height: 1.6; }
.gps-invoice-bank-divider { border: none; border-top: 1px dashed #ccc; margin: 4px 0; width: 200px; margin-left:0; }

.gps-invoice-signature { padding: 20px 40px 10px; }
.gps-invoice-signature-image img { max-height: 90px; margin-bottom: 6px; }
.gps-invoice-signer-name { font-weight: 600; }
.gps-invoice-signer-title { font-size: 13px; color: #666; }

.gps-invoice-footer-note { padding: 20px 40px 0; font-size: 11px; color: #999; border-top: 1px solid #eee; margin-top: 20px; }

.gps-invoice-footer-wave {
  height: 26px;
  margin-top: 30px;
  background: repeating-linear-gradient(45deg, var(--gps-primary) 0 10px, var(--gps-secondary) 10px 20px);
}

@media print {
  body.gps-invoice-page { background: #fff; padding: 0; }
  .no-print { display: none !important; }
  .gps-invoice-sheet { box-shadow: none; max-width: 100%; }
}
