/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */

:root {
  /* Color Hues */
  --primary-h: 210;
  --primary-s: 100%;
  --primary-l: 56%;
  
  /* Light Theme Variables (Default) */
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
  --glass-blur: blur(12px);
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --success-color: #10b981;
  --warning-color: #f59e0b;
}

/* Dark Theme Variables (Disabled - Forced Light Theme) */
body.dark-theme {
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   APP LAYOUT CONTAINER
   ========================================================================== */

.app-container {
  display: grid;
  grid-template-columns: 460px 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR (LEFT PANEL)
   ========================================================================== */

.sidebar-panel {
  background-color: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

/* Sidebar Brand */
.brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent-color), #60a5fa);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-text h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Receipt Select Dropdown */
.receipt-select-container {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: #f8fafc;
}

.select-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: block;
}

.receipt-dropdown {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23475569' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.receipt-dropdown:hover {
  border-color: #94a3b8;
  background-color: #fafafa;
}

.receipt-dropdown:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Form Area */
.form-container {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}

.form-container::-webkit-scrollbar {
  width: 6px;
}

.form-container::-webkit-scrollbar-track {
  background: transparent;
}

.form-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.receipt-form {
  display: none;
}

.receipt-form.active {
  display: block;
}

.receipt-form h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 700;
}

/* Form Fields */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.1s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group-row {
  display: flex;
  gap: 16px;
}

.form-group-row .form-group {
  flex: 1;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-group label {
  text-transform: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 20px 0;
}

.helper-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* Dynamic Table Lists (Line Items) */
.items-section {
  margin-top: 16px;
}

.items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.items-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.item-row input {
  padding: 10px 12px;
  font-size: 13px;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
}

.item-desc { flex: 2; }
.item-qty { flex: 0.6; }
.item-price { flex: 1; }
.item-code { flex: 1; } /* For Disbursement */

.btn-remove-item {
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-remove-item:hover {
  color: var(--danger-hover);
}

.input-with-action {
  display: flex;
  gap: 6px;
}

.input-with-action input {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(96, 165, 250, 0.1);
  color: var(--accent-color);
}

.btn-small {
  padding: 6px 12px;
  font-size: 11.5px;
  border-radius: 6px;
}

/* Action Control Panel */
.action-panel {
  padding: 20px 24px;
  background-color: rgba(0,0,0,0.03);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#btn-print {
  width: 100%;
  font-size: 15px;
  padding: 14px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.btn-file-input {
  position: relative;
  overflow: hidden;
}

.btn-file-input input[type="file"] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  opacity: 0;
  outline: none;
  background: white;
  cursor: pointer;
  display: block;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.theme-switch-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.theme-toggle {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.history-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.history-list {
  list-style: none;
  max-height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-list li {
  padding: 8px 10px;
  border-radius: 6px;
  background-color: rgba(96, 165, 250, 0.04);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid transparent;
}

.history-list li:hover {
  background-color: rgba(96, 165, 250, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.history-item-meta {
  color: var(--text-muted);
  font-size: 10px;
}

.empty-history {
  padding: 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  font-style: italic;
}

/* ==========================================================================
   PREVIEW PANEL (RIGHT PANEL)
   ========================================================================== */

.preview-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.preview-header {
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-sidebar);
}

.badge {
  font-size: 10px;
  font-weight: 800;
  background-color: var(--accent-color);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.preview-zoom-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
}

.zoom-btn:hover {
  background-color: var(--border-color);
}

/* Viewport Area */
.preview-viewport {
  flex: 1;
  overflow: auto;
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: var(--bg-app);
}

.receipt-canvas {
  transform-origin: top center;
  transition: transform 0.1s ease;
}

/* Base style for physical receipts paper emulation */
.receipt-preview-box {
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  padding: 30px;
  display: none;
}

.receipt-preview-box.active {
  display: block;
}

/* ==========================================================================
   RECEIPT THEME 1: THERMAL RECEIPT STYLE
   ========================================================================== */

.thermal-receipt {
  width: 380px;
  font-family: 'Courier Prime', Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 24px;
  color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), inset 0 0 40px rgba(0,0,0,0.03);
  position: relative;
  border-top: 4px dashed #94a3b8;
  border-bottom: 4px dashed #94a3b8;
}

.thermal-header {
  text-align: center;
  margin-bottom: 12px;
}

.thermal-vendor {
  font-family: 'Courier Prime', Courier, monospace;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.thermal-address {
  font-size: 11px;
  margin-bottom: 4px;
}

.thermal-title {
  font-size: 15px;
  font-weight: 700;
  margin: 6px 0;
  letter-spacing: 1px;
}

.thermal-line {
  letter-spacing: -1px;
  font-weight: bold;
  user-select: none;
  margin: 4px 0;
}

.thermal-meta, .thermal-buyer {
  font-size: 12px;
}

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

.thermal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12.5px;
}

.thermal-table th {
  font-family: 'Courier Prime', Courier, monospace;
  border-bottom: 1px dashed #000;
  padding-bottom: 4px;
  font-weight: 700;
}

.thermal-table td {
  padding: 4px 0;
  vertical-align: top;
}

.thermal-totals {
  margin: 8px 0;
}

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

.total-grand {
  font-size: 16px;
  font-weight: bold;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  padding: 4px 0;
  margin-top: 4px;
}

.thermal-vat-details {
  font-size: 11px;
  color: #4a5568;
}

.thermal-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
}

.small-disclaimer {
  font-size: 9px;
  color: #718096;
  margin-top: 8px;
}

.sys-timestamp {
  font-size: 8px;
  color: #a0aec0;
  margin-top: 6px;
}

/* ==========================================================================
   RECEIPT THEME 2: ACKNOWLEDGEMENT SLIP
   ========================================================================== */

.slip-receipt {
  width: 650px;
  background-color: #faf9f6; /* Alabaster soft paper */
  padding: 40px;
  border: 1px solid #dcdad1;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.slip-header-border {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #1e293b,
    #1e293b 10px,
    #cbd5e1 10px,
    #cbd5e1 20px
  );
  margin-bottom: 24px;
}

.slip-title-container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 8px;
  margin-bottom: 30px;
}

.slip-title-container h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1e293b;
}

.slip-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #dc2626;
  font-weight: bold;
}

.slip-date-row {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.slip-underlined {
  border-bottom: 1px dashed #475569;
  padding: 0 10px;
  font-weight: 600;
  display: inline-block;
}

.slip-amount-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
}

.italic-words {
  font-style: italic;
  font-weight: 500;
}

.strong-currency {
  font-weight: 700;
  font-size: 16px;
}

.slip-body {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  line-height: 2.2;
  color: #334155;
  text-align: justify;
}

.slip-signatures {
  margin-top: 50px;
  display: flex;
  justify-content: flex-end;
}

.signature-box {
  width: 250px;
  text-align: center;
}

.signature-line-graphic {
  border-bottom: 1px solid #1a1a1a;
  height: 50px;
  position: relative;
  margin-bottom: 8px;
}

.fake-signature {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  white-space: nowrap;
  pointer-events: none;
}

.signature-classic {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: bold;
  color: #1e3a8a; /* Blue ink representation */
}

.signature-modern {
  font-family: 'Courier Prime', monospace;
  font-style: italic;
  font-weight: 500;
  color: #0f172a;
}

.signature-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.signature-title {
  font-size: 12px;
  color: #64748b;
}

.signature-caption {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ==========================================================================
   RECEIPT THEME 3: COLLECTION RECEIPT (E-WALLET)
   ========================================================================== */

.digital-receipt-container {
  padding: 0;
  background: none;
  box-shadow: none;
}

.digital-wallet-theme {
  width: 380px;
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', sans-serif;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.wallet-header {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  padding: 30px 24px;
  text-align: center;
  color: #ffffff;
}

.status-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.success-icon {
  background-color: #10b981;
  color: white;
}

.wallet-header h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wallet-timestamp {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
}

.wallet-amount-card {
  padding: 24px;
  text-align: center;
  background-color: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
}

.wallet-currency {
  font-size: 20px;
  font-weight: 700;
  color: #0369a1;
}

.wallet-amount-val {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
}

.wallet-details {
  padding: 24px;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12.5px;
}

.w-label {
  color: #64748b;
  font-weight: 500;
}

.w-val {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

.w-divider {
  border: 0;
  height: 1px;
  background-color: #f1f5f9;
  margin: 16px 0;
}

.wallet-footer-tag {
  text-align: center;
  padding: 16px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
}

.wallet-footer-tag p {
  font-weight: 700;
  color: #64748b;
}

.wallet-footer-tag small {
  color: #94a3b8;
}

/* Classic Paper Collection Slip Mode Styles */
.classic-collection-theme {
  width: 580px;
  background-color: #ffffff;
  padding: 30px;
  border: 2px solid #334155;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.classic-collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.classic-collection-header h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  color: #1e293b;
}

.classic-col-ref {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.classic-col-body {
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

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

.classic-col-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.cc-sign {
  text-align: center;
  width: 220px;
}

.cc-sig-line {
  border-bottom: 1px solid #334155;
  margin-bottom: 6px;
  height: 35px;
}

/* ==========================================================================
   RECEIPT THEME 4: DISBURSEMENT VOUCHER
   ========================================================================== */

.voucher-receipt {
  width: 760px;
  padding: 40px;
  border: 1px solid #94a3b8;
  color: #0f172a;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px double #0f172a;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.voucher-logo-area h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.voucher-org-sub {
  font-size: 11px;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 1px;
  font-weight: 600;
}

.voucher-meta-grid {
  display: flex;
  border: 1px solid #0f172a;
}

.v-meta-cell {
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}

.v-meta-cell:first-child {
  border-right: 1px solid #0f172a;
}

.cell-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
}

.cell-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
}

.voucher-payee-info {
  border: 1px solid #0f172a;
  margin-bottom: 16px;
  background-color: #f8fafc;
}

.payee-row {
  display: flex;
}

.p-field {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.p-field:first-child {
  border-right: 1px solid #0f172a;
}

.p-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.p-val {
  font-size: 13px;
  font-weight: 600;
}

.voucher-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #0f172a;
  margin-bottom: 24px;
}

.voucher-table th, .voucher-table td {
  border: 1px solid #0f172a;
  padding: 8px 12px;
  font-size: 12px;
}

.voucher-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  text-align: left;
}

.voucher-table tfoot td {
  background-color: #f8fafc;
}

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

.font-bold {
  font-weight: 700;
}

.voucher-signoffs {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  border: 1px solid #0f172a;
}

.sign-block {
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 120px;
}

.sign-block:not(:last-child) {
  border-right: 1px solid #0f172a;
}

.sign-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #475569;
}

.sign-space {
  flex: 1;
}

.sign-space-line {
  flex: 1;
  border-bottom: 1px dashed #94a3b8;
  margin: 10px 0;
}

.sign-val {
  font-size: 12px;
  font-weight: bold;
  border-top: 1px solid #e2e8f0;
  padding-top: 4px;
  text-align: center;
}

.sign-desc {
  font-size: 10px;
  color: #64748b;
  text-align: center;
}

/* ==========================================================================
   RECEIPT THEME 5: REIMBURSEMENT FORM
   ========================================================================== */

.reimbursement-receipt {
  width: 760px;
  padding: 40px;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.reimb-letterhead {
  text-align: center;
  border-bottom: 2px solid #334155;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.reimb-letterhead h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.5px;
}

.reimb-letterhead p {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.reimb-meta-grid {
  border: 1px solid #cbd5e1;
  margin-bottom: 20px;
}

.rm-row {
  display: flex;
}

.rm-row:first-child {
  border-bottom: 1px solid #cbd5e1;
}

.rm-cell {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

.rm-cell:first-child {
  border-right: 1px solid #cbd5e1;
}

.reimb-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #cbd5e1;
  margin-bottom: 20px;
}

.reimb-table th, .reimb-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  font-size: 12px;
  text-align: left;
}

.reimb-table th {
  background-color: #f8fafc;
  font-weight: 700;
}

.font-large {
  font-size: 15px;
}

.reimb-attachments-section {
  border: 1px solid #cbd5e1;
  padding: 16px;
  margin-bottom: 24px;
  background-color: #f8fafc;
  border-radius: 4px;
}

.reimb-attachments-section h4 {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.attachments-desc {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 10px;
}

.attachments-list-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
}

.reimb-signoffs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.reimb-sign-block {
  display: flex;
  flex-direction: column;
  height: 110px;
  border: 1px solid #e2e8f0;
  padding: 10px;
  border-radius: 4px;
}

.rs-lbl {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
}

.rs-space {
  flex: 1;
}

.rs-val {
  font-size: 11.5px;
  font-weight: 700;
  border-top: 1px solid #cbd5e1;
  padding-top: 4px;
  text-align: center;
}

.rs-desc {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE DESIGN CONTROLS
   ========================================================================== */

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }
  
  .sidebar-panel {
    height: 600px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .preview-panel {
    height: 800px;
  }
  
  body {
    overflow: auto;
  }
}

/* ==========================================================================
   PRINT STYLING (THE MOST IMPORTANT SECTION FOR RECEIPTS)
   ========================================================================== */

@media print {
  /* Hide all interactive elements */
  body, .app-container, .sidebar-panel, .preview-panel, .preview-header, .toast-notification {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    display: block !important;
  }
  
  .sidebar-panel, .preview-header {
    display: none !important;
  }
  
  .preview-viewport {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
  }
  
  .receipt-canvas {
    transform: none !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Make only the active receipt printable, hide all others */
  .receipt-preview-box {
    display: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 auto !important;
    page-break-inside: avoid;
  }
  
  .receipt-preview-box.active {
    display: block !important;
  }
  
  /* Style specific fixes for printing */
  .thermal-receipt {
    width: 3.1in !important; /* Standard 80mm thermal width */
    max-width: 3.1in !important;
    padding: 0.1in !important;
    border-top: 1px dashed #000 !important;
    border-bottom: 1px dashed #000 !important;
    font-size: 11pt !important;
  }
  
  .slip-receipt {
    width: 6.5in !important;
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    padding: 0.4in !important;
  }
  
  .digital-wallet-theme {
    width: 3.8in !important;
    border: 1px solid #cccccc !important;
    border-radius: 0 !important;
  }
  
  .wallet-header {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border-bottom: 1px solid #cccccc !important;
  }
  
  .success-icon {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  
  .wallet-amount-card {
    background: #ffffff !important;
  }
  
  .voucher-receipt {
    width: 7.5in !important;
    border: 1px solid #000000 !important;
    padding: 0.3in !important;
  }
  
  .reimbursement-receipt {
    width: 7.5in !important;
    border: 1px solid #000000 !important;
    padding: 0.3in !important;
  }

  /* Force background colors/printing graphics */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
