/* Print Invoice Styles for Manju Jewellers */
@media print {
  @page {
    size: A4 portrait;
    margin: 0; /* Removes browser headers/footers */
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 0.8in 0.5in; /* Emulate page margins */
    box-sizing: border-box;
  }
  
  html, body {
    height: 100%;
    margin: 0 !important;
  }

  body * {
    visibility: hidden;
  }

  #invoice-print-area, #invoice-print-area * {
    visibility: visible;
  }

  #invoice-print-area {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  }

  .no-print, .sidebar, .top-rate-bar, .modal-header, .modal-footer, .app-container {
    display: none !important;
  }

  /* Reset fixed position of parent modals so it prints cleanly without gray overlay */
  .modal-backdrop {
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
  }

  .modal-content {
    position: static !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
  }
}

/* Printable Bill Container */
.bill-container {
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  color: #000000;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11.5px;
  line-height: 1.35;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
}

.bill-box {
  border: 2px solid var(--theme-color);
  margin-bottom: 0;
  border-radius: 4px;
}

/* Header */
.bill-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px 2px 8px;
  letter-spacing: 1px;
  color: #475569;
  border-bottom: none;
}

.bill-brand-row {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  padding: 8px 10px;
  text-align: center;
}

.bill-brand-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--theme-color); /* Gold color matching logo */
  margin: 0;
}

.bill-brand-address {
  font-size: 11px;
  font-weight: 600;
  margin: 2px 0 0 0;
  line-height: 1.3;
  color: #334155;
}

.bill-brand-tel {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 2px;
  color: #0f172a;
}

.bill-gstin-bar {
  border-top: 2px solid var(--theme-color);
  border-bottom: 2px solid var(--theme-color);
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  padding: 4px 0;
  letter-spacing: 1px;
  background-color: #ffffff;
  color: #0f172a;
}

/* Receiver and Invoice Info */
.bill-info-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  border-bottom: 2px solid var(--theme-color);
}

.bill-receiver-pane {
  border-right: 2px solid var(--theme-color);
  padding: 8px 10px;
  min-height: 100px;
}

.bill-invoice-pane {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bill-pane-title {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 4px;
}

/* Items Table */
.bill-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.bill-table th {
  border-bottom: 2px solid var(--theme-color);
  border-right: 2px solid var(--theme-color);
  padding: 6px 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  background-color: #ffffff;
  color: #334155;
}

.bill-table th:last-child {
  border-right: none;
}

.bill-table td {
  border-right: 2px solid var(--theme-color);
  border-bottom: none;
  padding: 5px 4px;
  font-size: 11px;
  vertical-align: middle;
}

.bill-table td:last-child {
  border-right: none;
}

.bill-table .item-row {
  height: 26px;
}

.bill-table .text-left {
  text-align: left;
  padding-left: 8px;
}

.bill-table .text-right {
  text-align: right;
  padding-right: 8px;
}

.bill-table-total-row {
  border-top: 2px solid var(--theme-color);
  border-bottom: 2px solid var(--theme-color);
  font-weight: bold;
  background-color: #ffffff;
}

/* GST Section */
.bill-gst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.2fr 1.2fr 1fr;
  border-bottom: 2px solid var(--theme-color);
  text-align: center;
  font-size: 11px;
}

.bill-gst-header {
  font-weight: bold;
  border-bottom: 2px solid var(--theme-color);
  padding: 3px;
  background-color: #ffffff;
}

.bill-gst-cell {
  padding: 4px;
  border-right: 2px solid var(--theme-color);
}

.bill-gst-cell:last-child {
  border-right: none;
}

.bill-grand-total-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  border-bottom: 2px solid var(--theme-color);
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  background-color: #ffffff;
  color: #0f172a;
}

/* Words and Payment Type */
.bill-words-bar {
  border-bottom: 2px solid var(--theme-color);
  padding: 8px;
  font-weight: 600;
  font-size: 11px;
  color: #334155;
  background-color: #fdfdfd;
}

.bill-pay-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  border-bottom: 2px solid var(--theme-color);
  min-height: 50px;
}

.bill-pay-col-left {
  padding: 8px;
  font-size: 10.5px;
  border-right: 2px solid var(--theme-color);
}

.bill-pay-col-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
}

.bill-pay-title {
  font-weight: bold;
  border-bottom: 2px solid var(--theme-color);
  padding: 4px;
  background-color: #ffffff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
}

.bill-pay-val {
  padding: 6px;
  font-weight: 700;
  font-size: 11.5px;
  color: #0f172a;
}

/* Signatures */
.bill-sign-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 30px 16px 8px 16px;
  border-bottom: 2px solid var(--theme-color);
}

.bill-sign-box {
  text-align: center;
  font-weight: 700;
  font-size: 10.5px;
  color: #334155;
}

.bill-footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  padding: 5px 8px;
  font-weight: 600;
  color: #64748b;
}





