:root {
  --wf-bg: #f5f7f9;
  --wf-white: #ffffff;
  --wf-border: #000000;
  --wf-text-main: #000000;
  --wf-text-muted: #555555;
  --wf-accent: #000080;
  --wf-success: #28a745;
  --wf-link: #0000ee;
  
  --wf-font-serif: 'Times New Roman', Times, serif;
  --wf-font-sans: 'Arial', sans-serif;
  
  --wf-space-xs: 4px;
  --wf-space-sm: 8px;
  --wf-space-md: 16px;
  --wf-space-lg: 24px;
  --wf-space-xl: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: var(--wf-space-lg);
  background-color: var(--wf-bg);
  font-family: var(--wf-font-sans);
  color: var(--wf-text-main);
  line-height: 1.2;
}

.receipt-container {
  display: flex;
  gap: var(--wf-space-md);
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.receipt-card {
  background: var(--wf-white);
  border: 1px solid var(--wf-border);
  width: 33.33%;
  min-width: 350px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--wf-border);
  padding-bottom: 10px;
  margin-bottom: 5px;
  text-align: center;
}

.header-logo {
  width: 70px;
  height: 70px;
  margin-right: 10px;
}

.header-text h1 {
  font-family: var(--wf-font-serif);
  font-size: 16px;
  margin: 0;
  text-transform: uppercase;
  font-weight: bold;
}

.header-text p {
  font-size: 11px;
  margin: 2px 0;
  font-weight: bold;
}

.receipt-title {
  text-align: center;
  font-weight: bold;
  text-decoration: underline;
  margin: 5px 0;
  font-size: 13px;
}

.copy-type {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 12px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  font-size: 11px;
  border: 1px solid var(--wf-border);
}

.details-left, .details-right {
  padding: 5px;
}

.details-left {
  border-right: 1px solid var(--wf-border);
}

.row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.label {
  font-weight: bold;
  white-space: nowrap;
}

.value {
  text-align: right;
  word-break: break-all;
}

.success-text {
  color: var(--wf-success);
  font-weight: bold;
  font-style: italic;
  font-size: 14px;
}

.blue-text {
  color: var(--wf-accent);
  font-weight: bold;
}

.link-text {
  color: var(--wf-link);
  text-decoration: underline;
}

.table-section {
  margin-top: 10px;
  border: 1px solid var(--wf-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th, td {
  border: 1px solid var(--wf-border);
  padding: 4px 6px;
  text-align: left;
}

th {
  background-color: #f0f0f0;
}

.amount-col {
  text-align: right;
  width: 80px;
}

.sr-width {
  width: 40px;
}

.total-row {
  font-weight: bold;
}

.due-zero {
  color: red;
}

.in-words {
  margin-top: 10px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--wf-border);
  padding: 8px;
  text-transform: uppercase;
}

.footer-stamp {
  margin-top: 20px;
  text-align: center;
}

.stamp-text {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 20px;
}

.remark-section {
  margin-top: auto;
  font-size: 10px;
  border-top: 1px solid var(--wf-border);
  padding-top: 5px;
}

.remark-label {
  font-weight: bold;
}

.placeholder-logo {
  width: 70px;
  height: 70px;
  background: #eee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border: 1px solid #ccc;
  margin-right: 10px;
}

@media print {
  body {
    background: white;
    padding: 0;
  }
  .receipt-container {
    gap: 0;
  }
  .receipt-card {
    border: 1px solid black;
  }
}

@media (max-width: 1000px) {
  .receipt-container {
    flex-direction: column;
    align-items: center;
  }
  .receipt-card {
    width: 90%;
    margin-bottom: 20px;
  }
}
