:root {
  --navy:#083a66;
  --teal:#0ea5a0;
  --muted:#64748b;
  --bg:#f4f7fb;
  --card:#fff;
}

body {
  margin:0;
  padding:20px;
  font-family:'Poppins',sans-serif;
  background:var(--bg);
  color:#072032;
  display:flex;
  justify-content:center;
}

.page-wrap {
  max-width:1000px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(0,0,0,0.1);
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Header */
.voucher-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.site-title {
  margin:0;
  font-size:22px;
  color:var(--navy);
}

.subtitle {
  margin:2px 0 0;
  font-size:12px;
  color:var(--muted);
}

/* PDF Only Header - Hidden on screen, visible in PDF */
.pdf-only-header {
  display: none;
}

/* Auth Modal */
.center-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.auth-modal {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
}

.auth-modal h3 {
  margin-top: 0;
  color: var(--navy);
  text-align: center;
}

.auth-modal input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.auth-error {
  color: #d32f2f;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

/* Buttons */
.actions {
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

.btn {
  padding:8px 14px;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
  border:none;
  font-family:'Poppins',sans-serif;
}

.btn.primary {
  background:var(--navy);
  color:#fff;
}

.btn.outline {
  border:1px solid var(--navy);
  background:transparent;
  color:var(--navy);
}

.btn:hover {
  opacity:0.9;
}

.btn.small {
  padding:6px 12px;
  font-size:12px;
}

/* Summary */
.card.summary {
  background:#f9fbfd;
  padding:12px;
  border-radius:8px;
}

.summary-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.summary-box {
  background:#fff;
  padding:10px;
  border-radius:6px;
  border:1px solid #eaeef2;
}

.label {
  font-size:11px;
  color:var(--muted);
  margin-bottom:4px;
}

.value {
  font-weight:600;
  font-size:14px;
}

/* Panels */
.panel {
  border:1px solid #eaeef2;
  border-radius:8px;
  overflow:hidden;
}

.panel-title {
  padding:10px 14px;
  font-weight:600;
  color:var(--navy);
  background:#f5f9fc;
  cursor:pointer;
  list-style:none;
}

.panel-title::-webkit-details-marker {
  display:none;
}

.panel-body {
  padding:12px;
  font-size:13px;
  line-height:1.5;
}

/* Tables */
.table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.table th, 
.table td {
  padding:8px;
  border:1px solid #eaeef2;
  text-align:left;
}

.table th {
  background:#eef7f7;
  color:var(--navy);
  font-weight:600;
}

.table-striped tr:nth-child(even) {
  background:#fafafa;
}

.table-border {
  border:1px solid #eaeef2;
}

.table-actions {
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* Highlights */
.highlight {
  background:#fff9e6;
}

/* Info Details */
.info-details h4 {
  color:var(--navy);
  margin-top:15px;
  margin-bottom:8px;
  font-size:14px;
}

.info-details p {
  margin:6px 0;
  line-height:1.6;
}

.info-details ul {
  margin:8px 0;
  padding-left:25px;
}

.info-details li {
  margin:5px 0;
  line-height:1.5;
}

/* Footer */
.footer {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
  padding-top:15px;
  border-top:1px solid #eaeef2;
}

.muted {
  color:var(--muted);
  font-size:12px;
}

/* Editable content */
[contenteditable="true"]:focus {
  outline:2px solid var(--teal);
  outline-offset:2px;
  background:#f0fbff;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
}

/* Voucher List */
#voucherListContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voucher-item {
  padding: 12px;
  border: 1px solid #eaeef2;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.voucher-item:hover {
  background: #f5f9fc;
}

.voucher-item h4 {
  margin: 0 0 8px 0;
  color: var(--navy);
}

.voucher-item p {
  margin: 4px 0;
  font-size: 12px;
  color: var(--muted);
}

/* Hide elements with class "no-pdf" when generating PDF/DOC */
.no-pdf {
  /* Will be hidden via JavaScript during PDF generation */
}

/* Responsive */
@media (max-width: 768px) {
  .page-wrap {
    border-radius:0;
    padding:15px;
  }
  
  .voucher-header {
    flex-direction:column;
    gap:15px;
    align-items:flex-start;
  }
  
  .summary-grid {
    grid-template-columns:repeat(2,1fr);
  }
  
  .actions {
    width:100%;
    flex-direction:column;
  }
  
  .btn {
    width:100%;
  }
  
  .table {
    font-size:11px;
  }
  
  .table th,
  .table td {
    padding:6px;
  }
}

/* Print styles for PDF */
@media print {
  .no-pdf {
    display: none !important;
  }
  
  .pdf-only-header {
    display: block !important;
  }
}
