/*AAAAAAAAAAAAAAAAAAAAAAA!!! GLOBAL RESET STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body {
  background: linear-gradient(135deg, #eaf2fc 0%, #d6e6f8 100%);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! GLOBAL RESET STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! INVOICE CONTAINER STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.invoice {
  background: #fff;
  width: 100%;
  max-width: 850px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 60, 130, 0.18);
  overflow: hidden;
  position: relative;
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! INVOICE CONTAINER STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! WATERMARK STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
  width: 55%;
  max-width: 450px;
  height: auto;
}

.invoice > *:not(.watermark) {
  position: relative;
  z-index: 1;
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! WATERMARK STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! HEADER STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.header {
  background: linear-gradient(135deg, var(--color-primary, #0a4da3) 0%, var(--color-secondary, #1e88e5) 55%, var(--color-accent, #4fc3f7) 100%);
  color: #fff;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}
.header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent, #4fc3f7), #ffd54f, var(--color-accent, #4fc3f7));
}
.brand { display: flex; align-items: center; gap: 15px; }
.brand img {
  height: 65px; width: auto;
  background: #fff; padding: 6px 10px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.brand-text h1 { font-size: 26px; font-weight: 700; }
.brand-text p { font-size: 11px; letter-spacing: 3px; margin-top: 4px; text-transform: uppercase; }
.header-right { text-align: right; }
.header-right h2 { font-size: 32px; letter-spacing: 4px; font-weight: 300; }
.header-right p { font-size: 12px; margin-top: 6px; opacity: 0.9; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! HEADER STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! CONTACT BAR STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.contact-bar {
  background: #f5f9ff;
  padding: 14px 40px;
  font-size: 13px;
  color: var(--color-primary, #0a4da3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e1ecf9;
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! CONTACT BAR STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! BODY WRAPPER STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.body { padding: 35px 40px; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! BODY WRAPPER STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! PREMIUM INFO CARD STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 30px; }
.info-box {
  background: linear-gradient(145deg, #f8fbff 0%, #eef5fd 100%);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
  border: 1px solid #e1ecf9;
  box-shadow: 0 6px 18px rgba(30, 136, 229, 0.08);
  overflow: hidden;
}
.info-box::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--color-primary, #0a4da3), var(--color-accent, #4fc3f7));
}
.info-box h3 {
  font-size: 12px; letter-spacing: 2.5px; color: var(--color-primary, #0a4da3);
  text-transform: uppercase; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px; border-bottom: 1px dashed #b6d4f1;
}
.info-box h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary, #1e88e5), var(--color-accent, #4fc3f7));
  box-shadow: 0 0 0 3px rgba(30,136,229,0.15);
}
.info-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 13.5px; }
.info-row .label { color: var(--color-primary, #0a4da3); font-weight: 700; }
.info-row .value { color: #333; text-align: right; font-weight: 500; }
.info-row .value.static { color: var(--color-secondary, #1e88e5); font-weight: 600; }
.info-row .value.status {
  color: #ff9800; font-weight: 700; background: rgba(255,152,0,0.1);
  padding: 2px 10px; border-radius: 20px; font-size: 12px;
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! PREMIUM INFO CARD STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! SERVICE TABLE STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
table { width: 100%; border-collapse: collapse; margin-bottom: 25px; font-size: 14px; }
thead th {
  background: linear-gradient(135deg, var(--color-primary, #0a4da3), var(--color-secondary, #1e88e5));
  color: #fff; padding: 13px 14px; text-align: left;
  font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase;
}
thead th:last-child { text-align: right; }
tbody td { padding: 12px 14px; border-bottom: 1px solid #eef3f9; color: #333; }
tbody tr:nth-child(even) { background: #fafcff; }
.right { text-align: right; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! SERVICE TABLE STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! PAYMENT SUMMARY STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.summary-wrap { display: flex; justify-content: flex-end; margin-bottom: 30px; }
.summary {
  width: 320px;
  background: #f7fbff;
  border-radius: 12px;
  padding: 18px 22px;
  border: 1px solid #e1ecf9;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #444; }
.summary-row.total {
  border-top: 2px dashed var(--color-secondary, #1e88e5);
  margin-top: 8px; padding-top: 14px;
  font-size: 18px; font-weight: 700; color: var(--color-primary, #0a4da3);
}
.summary-row.total span:last-child { color: var(--color-secondary, #1e88e5); }
.summary-row.advance { color: #e53935; font-weight: 600; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! PAYMENT SUMMARY STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! BOTTOM CARDS STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.card {
  background: #f7fbff;
  border-left: 4px solid var(--color-secondary, #1e88e5);
  border-radius: 10px;
  padding: 16px 20px;
}
.card h4 {
  font-size: 12px; letter-spacing: 2px; color: var(--color-primary, #0a4da3);
  text-transform: uppercase; margin-bottom: 10px;
}
.card p, .card li { font-size: 13px; color: #555; line-height: 1.8; }
.card ul { list-style: none; }
.card ul li::before { content: "▸ "; color: var(--color-secondary, #1e88e5); font-weight: bold; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! BOTTOM CARDS STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! FOOTER STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.footer {
  background: linear-gradient(135deg, var(--color-primary, #0a4da3), var(--color-secondary, #1e88e5));
  color: #fff;
  padding: 25px 40px;
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 20px;
}
.footer .thanks p:first-child { font-size: 15px; font-weight: 600; }
.footer .thanks p:last-child { font-size: 12px; opacity: 0.85; margin-top: 4px; font-style: italic; }
.sign { text-align: center; font-size: 12px; }
.sign img { max-height: 55px; margin-bottom: 6px; }
.sign .line { border-top: 1px solid rgba(255,255,255,0.6); width: 160px; margin-bottom: 6px; }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! FOOTER STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! ACTION BUTTONS STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
.action-bar {
  margin-top: 25px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-action {
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: 0.3s;
  box-shadow: 0 8px 20px rgba(30,136,229,0.3);
}
.btn-pdf   { background: linear-gradient(135deg, #e53935, #c62828); }
.btn-print { background: linear-gradient(135deg, #0a4da3, #1e88e5); }
.btn-action:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30,136,229,0.5); }
/*AAAAAAAAAAAAAAAAAAAAAAA!!! ACTION BUTTONS STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! RESPONSIVE STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
@media (max-width: 700px) {
  .info-grid, .bottom-grid { grid-template-columns: 1fr; }
  .header { flex-direction: column; text-align: center; }
  .header-right { text-align: center; }
  .contact-bar { flex-direction: column; text-align: center; }
  .summary { width: 100%; }
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! RESPONSIVE STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/


/*AAAAAAAAAAAAAAAAAAAAAAA!!! PRINT MEDIA STYLES STARTS !!!AAAAAAAAAAAAAAAAAAA*/
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 210mm;
  }

  .action-bar,
  .print-btn,
  .admin-btn {
    display: none !important;
  }

  .invoice {
    width: 210mm !important;
    max-width: 210mm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
  }

  /* Force colors to print */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Prevent page breaks inside key sections */
  .header, .contact-bar, .info-grid, .info-box,
  .summary-wrap, .summary, .bottom-grid, .card, .footer,
  table, thead, tbody, tr, td, th {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Watermark in print */
  .watermark {
    opacity: 0.08 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
/*AAAAAAAAAAAAAAAAAAAAAAA!!! PRINT MEDIA STYLES ENDS !!!AAAAAAAAAAAAAAAAAAA*/