.bill-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.bill-print-outstanding {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.bill-print-shell {
  max-width: 900px;
  margin: 0 auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #1f2937;
  background: #fff;
}

.bill-print-shell * {
  box-sizing: border-box;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  .bill-print-shell { margin: 0; padding: 0; max-width: none; }
  .no-print { display: none !important; }
  .page { page-break-after: always; page-break-inside: avoid; }
  .app-shell__sidebar,
  .app-shell__topbar,
  .app-shell__topnav,
  .app-shell__overlay,
  .bill-print-toolbar {
    display: none !important;
  }
  .app-shell__main,
  .app-shell__workspace,
  .app-shell {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

.page {
  width: 210mm;
  padding: 8mm;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
}


    /* ─ HEADER ─ */
    .invoice-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 6px;
      border-bottom: 2px solid #1e3a8a;
      padding-bottom: 4px;
    }

    .hospital-info h1 {
      font-size: 14px;
      font-weight: 700;
      color: #1e3a8a;
      margin: 0;
    }

    .hospital-info .subtitle {
      font-size: 8px;
      color: #6b7280;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin: 1px 0;
      font-weight: 600;
    }

    .hospital-details {
      font-size: 8px;
      color: #4b5563;
      line-height: 1.2;
    }

    .hospital-details div {
      margin: 0;
    }

    .bill-badge {
      display: inline-block;
      background: #fef3c7;
      color: #92400e;
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 8px;
      font-weight: 700;
      text-transform: uppercase;
      margin-bottom: 2px;
    }

    .bill-details {
      text-align: right;
      font-size: 9px;
    }

    .bill-details-row {
      display: flex;
      justify-content: space-between;
      margin: 1px 0;
    }

    .bill-details-row .label {
      color: #6b7280;
      font-weight: 500;
      min-width: 80px;
    }

    .bill-details-row .value {
      font-weight: 600;
      color: #1f2937;
    }

    /* ─ PATIENT INFO ─ */
    .patient-info {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
      margin-bottom: 4px;
      padding: 4px;
      background: #f9fafb;
      border-radius: 3px;
      font-size: 8px;
    }

    .patient-info-row {
      display: flex;
      justify-content: space-between;
      gap: 4px;
    }

    .patient-info-row .label {
      color: #6b7280;
      font-weight: 600;
      min-width: 60px;
    }

    .patient-info-row .value {
      color: #1f2937;
      font-weight: 500;
      text-align: right;
    }

    /* ─ ITEMS TABLE ─ */
    .items-table {
      width: 100%;
      margin-bottom: 4px;
      flex: 1;
      border-collapse: collapse;
      font-size: 8px;
    }

    .items-table thead {
      background: #1e3a8a;
      color: #fff;
    }

    .items-table th {
      padding: 3px 4px;
      text-align: left;
      font-size: 7px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border: none;
    }

    .items-table th:nth-child(2),
    .items-table th:nth-child(3),
    .items-table th:nth-child(4),
    .items-table th:nth-child(5) {
      text-align: right;
    }

    .items-table td {
      padding: 2px 4px;
      border-bottom: 1px solid #e5e7eb;
      font-size: 8px;
    }

    .items-table tr:nth-child(even) {
      background: #f9fafb;
    }

    .items-table td:nth-child(2),
    .items-table td:nth-child(3),
    .items-table td:nth-child(4),
    .items-table td:nth-child(5) {
      text-align: right;
      font-family: 'Courier New', monospace;
    }

    .items-table td:nth-child(5) {
      font-weight: 600;
      color: #1e3a8a;
    }

    /* ─ TOTALS ─ */
    .totals-wrapper {
      display: flex;
      justify-content: space-between;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 2px solid #e5e7eb;
    }

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

    .totals-row {
      display: flex;
      justify-content: space-between;
      padding: 5px 0;
      font-size: 11px;
      border-bottom: 1px solid #e5e7eb;
    }

    .totals-row.total-line {
      background: #eff6ff;
      padding: 8px 6px;
      margin: 4px 0;
      border-radius: 4px;
      font-size: 13px;
      font-weight: 700;
      border: 1px solid #1e3a8a;
      color: #1e3a8a;
    }

    .totals-row .label {
      color: #6b7280;
      font-weight: 500;
    }

    .totals-row .amount {
      color: #1f2937;
      font-weight: 600;
    }

    /* ─ INTERIM WARNING ─ */
    .interim-note {
      background: #fef3c7;
      border: 1px solid #fde68a;
      border-radius: 5px;
      padding: 8px;
      margin: 10px 0;
      font-size: 10px;
      color: #92400e;
      font-weight: 600;
    }

    /* ─ FOOTER ─ */
    .page-footer {
      margin-top: auto;
      padding-top: 12px;
      border-top: 1px solid #e5e7eb;
      font-size: 9px;
      color: #6b7280;
      text-align: center;
      line-height: 1.4;
    }

    .footer-note {
      background: #f3f4f6;
      padding: 8px;
      border-radius: 4px;
      margin-bottom: 6px;
    }

    /* ─ UTILITIES ─ */
    .no-print {
      padding: 14px;
      background: #f0f9ff;
      border-bottom: 1px solid #bae6fd;
      margin-bottom: 12px;
      text-align: center;
    }

    .print-btn {
      background: #1e3a8a;
      color: #fff;
      border: none;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
    }

    .print-btn:hover {
      background: #1e40af;
    }

@media print {
  .app-shell__sidebar,
  .app-shell__topbar,
  .app-shell__topnav,
  .app-shell__overlay,
  .no-print,
  .bill-print-toolbar {
    display: none !important;
  }
  .app-shell__main,
  .app-shell__workspace,
  .app-shell {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

