/* Payment Schedule PDF Styles */
/* ============================= */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #e8e8e8;
  color: #333;
  line-height: 1.5;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ============================= */
/* Statement Container */
/* ============================= */
.statement {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* ============================= */
/* No Print Section (Buttons) */
/* ============================= */
.no-print {
  background: #1a2e1a;
  padding: 15px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin: 0 5px;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-print {
  background: #2e7d32;
  color: #fff;
}

.btn-print:hover {
  background: #388e3c;
}

.btn-close {
  background: transparent;
  color: #a5d6a7;
  border: 1px solid #4caf50;
}

.btn-close:hover {
  background: rgba(76, 175, 80, 0.1);
}

/* ============================= */
/* Header Section */
/* ============================= */
.header {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 35px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-icon {
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.logo-icon svg {
  width: 35px;
  height: 35px;
  fill: #fff;
}

.company-name h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.company-name span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
}

.header-right {
  text-align: right;
}

.doc-type {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.doc-number {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.header-bar {
  background: rgba(0, 0, 0, 0.15);
  padding: 12px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-bar-item {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.header-bar-item strong {
  color: #fff;
  font-weight: 600;
}

/* ============================= */
/* Info Section */
/* ============================= */
.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e0e0e0;
}

.info-block {
  padding: 25px 35px;
}

.info-block:first-child {
  border-right: 1px solid #e0e0e0;
}

.info-label {
  font-size: 10px;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2e7d32;
  display: inline-block;
}

.info-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.info-details {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.info-details strong {
  color: #333;
  font-weight: 600;
}

/* ============================= */
/* Summary Section */
/* ============================= */
.summary-section {
  padding: 30px 35px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
}

.summary-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.summary-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid #e0e0e0;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.summary-card.total::before {
  background: #1b5e20;
}

.summary-card.scheduled::before {
  background: #2e7d32;
}

.summary-card.pending::before {
  background: #f57c00;
}

.summary-card.hold::before {
  background: #d32f2f;
}

.summary-card-label {
  font-size: 10px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 600;
}

.summary-card-amount {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
}

.summary-card.scheduled .summary-card-amount {
  color: #2e7d32;
}

.summary-card.pending .summary-card-amount {
  color: #f57c00;
}

.summary-card.hold .summary-card-amount {
  color: #d32f2f;
}

.summary-card-currency {
  font-size: 12px;
  font-weight: 600;
  color: #999;
}

/* ============================= */
/* Amount Due Banner */
/* ============================= */
.amount-due-banner {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  margin: 25px 35px 0;
  border-radius: 12px;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.due-left h4 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 600;
}

.due-left .amount {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.due-left .amount .curr {
  font-size: 18px;
  font-weight: 600;
  margin-right: 5px;
  opacity: 0.9;
}

.due-right {
  text-align: right;
}

.due-right label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.due-right .date {
  color: #a5d6a7;
  font-size: 18px;
  font-weight: 700;
}

/* ============================= */
/* Progress Bar */
/* ============================= */
.progress-wrap {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-header span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 500;
}

.progress-header .pct {
  color: #a5d6a7;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #81c784 0%, #a5d6a7 100%);
  border-radius: 4px;
}

/* ============================= */
/* Table Section */
/* ============================= */
.table-section {
  padding: 25px 35px 35px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1b5e20;
}

.table-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table-count {
  font-size: 11px;
  color: #666;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* ============================= */
/* Data Table */
/* ============================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #1b5e20;
}

.data-table th {
  padding: 14px 15px;
  text-align: left;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.data-table td {
  padding: 16px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.data-table td:nth-child(3),
.data-table td:nth-child(4),
.data-table td:nth-child(5) {
  text-align: right;
}

.data-table tbody tr:hover {
  background: #f8f8f8;
}

/* Table Cell Styles */
.td-service {
  font-weight: 600;
  color: #1a1a1a;
}

.td-service .note {
  display: block;
  font-size: 11px;
  color: #888;
  font-weight: 400;
  margin-top: 3px;
}

.td-service .hold-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 10px;
  color: #f57c00;
  font-weight: 600;
}

.td-date {
  color: #666;
  font-size: 12px;
}

.td-amount {
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
}

.td-amount.green {
  color: #2e7d32;
}

.td-amount.orange {
  color: #f57c00;
}

.td-amount.gray {
  color: #999;
}

/* Status Pills */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-pending {
  background: #fff3e0;
  color: #e65100;
}

.status-paid {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-overdue {
  background: #ffebee;
  color: #c62828;
}

.status-hold {
  background: #fff3e0;
  color: #e65100;
}

/* Totals Row */
.totals-row td {
  background: #f5f5f5;
  font-weight: 700;
  border-top: 2px solid #1b5e20;
  border-bottom: none;
  padding: 18px 15px;
}

.totals-row .label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* ============================= */
/* Footer Section */
/* ============================= */
.footer {
  background: #fafafa;
  padding: 30px 35px;
  border-top: 1px solid #e0e0e0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.footer-block h5 {
  font-size: 10px;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-block p {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
}

.footer-block .name {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 13px;
}

.footer-notes {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #2e7d32;
  border-radius: 0 6px 6px 0;
  padding: 15px 20px;
  margin-bottom: 25px;
}

.footer-notes h5 {
  font-size: 11px;
  color: #1a1a1a;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-notes p {
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.footer-text {
  font-size: 10px;
  color: #999;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #2e7d32;
}

.footer-brand-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand-icon svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

/* ============================= */
/* Print Styles */
/* ============================= */
@media print {
  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .statement {
    box-shadow: none;
    max-width: 100%;
  }
}