/* Stitch Design System - Pragmatic POS (Warung Madura) */
:root {
  --primary: #006948;
  --primary-action: #059669;
  --primary-hover: #047857;
  --primary-container: #00855d;
  --brand-red: #D92D20;
  --brand-red-dark: #B9100B;
  --brand-red-light: #FEE2E2;
  --surface-dark: #0F172A;
  --surface-card: #FFFFFF;
  --canvas-bg: #F8FAFC;
  --surface-neutral: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-card: #CBD5E1;
  --border-strong: #94A3B8;
  --text-primary: #0F172A;
  --text-muted: #475569;
  --warning-surface: #FEF3C7;
  --warning-text: #78350F;
  --warning-alert: #D97706;
  --danger-surface: #FEE2E2;
  --danger-text: #991B1B;
  --danger-critical: #B91C1C;
  --success-surface: #DCFCE7;
  --success-text: #166534;
  --success-action: #059669;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/MaterialSymbolsOutlined.ttf') format('truetype');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--canvas-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
  overflow-y: auto;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* POS Terminal Locked Layout: Locks viewport strictly to 100vh so only inner catalog and cart scroll */
body.pos-app,
body:has(.pos-container) {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body.pos-app main,
body:has(.pos-container) main,
main:has(.pos-container) {
  flex: 1 1 0;
  min-height: 0;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

/* Tabular numbers for non-shifting layouts */
.tnum, .num, .tabular-nums, .price-display, .numpad-btn, .amount-val {
  font-feature-settings: 'tnum' 1, 'cv05' 1;
  font-variant-numeric: tabular-nums;
}

/* System Top Persistence Bar */
.top-system-bar {
  flex-shrink: 0;
  height: 56px;
  background-color: var(--surface-dark);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 1040;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.brand-badge .brand-logo-icon {
  background-color: var(--brand-red);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* Persistent Connection Status Bar */
.offline-banner-bar {
  background-color: var(--warning-surface);
  color: var(--warning-text);
  border-bottom: 2px solid var(--warning-alert);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.offline-banner-bar.critical {
  background-color: var(--danger-surface);
  color: var(--danger-text);
  border-bottom-color: var(--danger-critical);
}

.status-badge-online {
  background-color: var(--success-surface);
  color: var(--success-text);
  border: 1px solid rgba(22, 101, 52, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge-offline {
  background-color: var(--warning-surface);
  color: var(--warning-text);
  border: 1px solid rgba(217, 119, 6, 0.4);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

/* POS Layout (60% Catalog / 40% Cart) */
.pos-container {
  display: flex;
  flex: 1 1 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.pos-catalog {
  flex: 0 0 60%;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  background-color: var(--canvas-bg);
  border-right: 2px solid var(--border-card);
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.pos-cart {
  flex: 0 0 40%;
  max-width: 40%;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  box-shadow: -4px 0 10px rgba(15, 23, 42, 0.05);
}

/* Product Cards */
.product-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px;
  min-height: 125px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  position: relative;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
}

.product-card:active {
  transform: scale(0.98);
  border-color: var(--primary-action);
  background-color: #F8FAFC;
}

.product-card.low-stock {
  border-left: 5px solid var(--warning-alert);
}

.product-card.out-of-stock {
  opacity: 0.6;
  filter: grayscale(0.5);
  cursor: not-allowed;
  border-left: 5px solid var(--danger-critical);
}

.product-card.price-inactive {
  opacity: 0.6;
  filter: grayscale(0.7);
  cursor: not-allowed;
  border-left: 5px solid #6c757d;
  background-color: #f8f9fa;
}
.product-card.price-inactive:hover {
  transform: none;
  box-shadow: none;
}

.product-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.product-card-stock {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Quick Access Pills */
.category-pills-bar-wrapper {
  position: relative;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
}

/* Gradient fade indicator – shows more items exist to the right */
.category-pills-bar-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
  pointer-events: none;
  z-index: 2;
}

.category-pills-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 100%;
}

.category-pills-bar::-webkit-scrollbar {
  height: 3px;
}

.category-pill {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background-color: var(--surface-neutral);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.category-pill.active {
  background-color: var(--surface-dark);
  color: #FFFFFF;
  border-color: var(--surface-dark);
}

.category-pill.quick-ten {
  background-color: var(--warning-surface);
  color: var(--warning-text);
  border-color: var(--warning-alert);
  font-weight: 700;
}

/* Cart Items List */
.cart-items-container {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  min-height: 50px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}

.cart-item-row:last-child {
  border-bottom: none;
}

.cart-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-neutral);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stepper-btn:active {
  background-color: var(--border-strong);
}

.stepper-val {
  min-width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

/* Cart Footer & Pay Button */
.cart-footer {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 2px solid var(--border-subtle);
  background-color: #FFFFFF;
  box-shadow: 0 -4px 10px rgba(15, 23, 42, 0.05);
  z-index: 5;
}

.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cart-total-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-total-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-primary-pay {
  height: 54px;
  background-color: var(--primary-action);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 800;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-primary-pay:hover {
  background-color: var(--primary-hover);
}

.btn-primary-pay:active {
  transform: scale(0.98);
  background-color: #036948;
}

.btn-primary-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Brand Buttons */
.btn-brand-red {
  height: 56px;
  background-color: var(--brand-red);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 20px;
}

.btn-brand-red:hover {
  background-color: var(--brand-red-dark);
  color: #FFFFFF;
}

.btn-secondary-outline {
  height: 56px;
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 20px;
}

.btn-secondary-outline:hover {
  background-color: var(--surface-neutral);
}

/* Touch Numpad */
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.numpad-btn {
  height: 48px;
  background-color: #FFFFFF;
  border: 2px solid var(--border-card);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s ease;
}

.numpad-btn:active {
  background-color: var(--surface-neutral);
  border-color: var(--primary-action);
  transform: scale(0.96);
}

.quick-cash-chip {
  height: 40px;
  background-color: var(--surface-neutral);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 8px;
  white-space: nowrap;
}

.quick-cash-chip:active {
  background-color: #E2E8F0;
  border-color: var(--border-strong);
}

/* Payment Method Selection Tabs */
.pay-method-btn {
  border: 2px solid var(--border-card);
  background-color: var(--surface-neutral);
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pay-method-btn:hover {
  background-color: #E2E8F0;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.pay-method-btn.active {
  background-color: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(0, 105, 72, 0.25);
}

/* Big Display Modals */
.modal-payment-dialog {
  max-width: 620px;
  margin: 0.5rem auto;
}

.modal-payment-dialog .modal-content {
  border-radius: 14px;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.4);
}

.modal-payment-dialog .modal-footer {
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.modal-payment-dialog .modal-footer .btn-primary-pay {
  width: auto !important;
  flex: 1 1 auto;
  margin: 0;
}

.change-display-box {
  background-color: var(--success-surface);
  border: 2px solid var(--success-text);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.change-display-box.insufficient {
  background-color: var(--danger-surface);
  border-color: var(--danger-critical);
}

/* Thermal Receipt Styling */
.thermal-receipt {
  width: 320px;
  background-color: #FFFFFF;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.35;
  color: #000000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin: 0 auto;
  border: 1px solid #ddd;
}

.receipt-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.receipt-title {
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 4px;
}

.receipt-center {
  text-align: center;
}

/* Data Tables */
.table-stitch {
  background-color: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
}

.table-stitch th {
  background-color: var(--surface-neutral);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-card);
}

.table-stitch td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.table-stitch tr:last-child td {
  border-bottom: none;
}

/* Form Controls */
.form-control-stitch {
  height: 52px;
  border: 2px solid var(--border-card);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 0 16px;
  color: var(--text-primary);
  background-color: #FFFFFF;
}

.form-control-stitch:focus {
  border-color: var(--primary-action);
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* Input Group Focus State (when containing form-control-stitch) */
.input-group:has(.form-control-stitch):focus-within {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
  border-radius: 8px;
}

.input-group:has(.form-control-stitch):focus-within .input-group-text,
.input-group:has(.form-control-stitch):focus-within .form-control-stitch {
  border-color: var(--primary-action) !important;
}

.input-group .form-control-stitch:focus {
  box-shadow: none;
}

/* Responsive & Mobile Support */
@media (max-width: 991px) {
  .pos-container {
    flex-direction: column;
    height: auto;
  }
  .pos-catalog, .pos-cart {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Manajemen Kas / Pengeluaran (SCR-11) Specific Styles */
.cash-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  background-color: var(--canvas-bg);
}

.cash-left-panel {
  flex: 0 0 490px;
  max-width: 490px;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border-right: 2px solid var(--border-strong);
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.cash-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--canvas-bg);
  height: 100%;
  overflow: hidden;
}

.metric-card-cash {
  flex: 1;
  background-color: var(--surface-neutral);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.metric-card-cash.highlight {
  border-width: 2px;
}

.metric-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.metric-card-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.timeline-item {
  background-color: #FFFFFF;
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
}

.timeline-item:hover {
  background-color: var(--surface-neutral);
}

.timeline-item.active {
  background-color: rgba(5, 150, 105, 0.1);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.timeline-item.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 12px;
  bottom: 12px;
  width: 6px;
  background-color: var(--primary);
  border-radius: 0 4px 4px 0;
}

.timeline-category-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-panel-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.cash-category-chip {
  background-color: var(--surface-neutral);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
}

.cash-category-chip:hover {
  background-color: #FFFFFF;
}

.cash-category-chip.active {
  background-color: rgba(5, 150, 105, 0.1);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Cash Right Panel Form Elements */
.cash-form-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-base);
  background-color: #FFFFFF;
  flex-shrink: 0;
}

.cash-segmented-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background-color: var(--surface-neutral);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.cash-toggle-btn {
  height: 40px;
  border-radius: 4px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.cash-toggle-btn:hover {
  background-color: var(--surface-card);
}

.cash-toggle-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cash-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cash-category-chip-lg {
  height: 48px;
  background-color: var(--surface-neutral);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cash-category-chip-lg:hover {
  background-color: #FFFFFF;
}

.cash-category-chip-lg.active {
  background-color: rgba(5, 150, 105, 0.1);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cash-category-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.cash-numpad-container {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 12px;
  background-color: var(--surface-neutral);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

.cash-amount-input {
  width: 100%;
  height: 56px;
  background-color: #FFFFFF;
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 0 12px;
  text-align: right;
  font-size: 36px;
  font-weight: 800;
  color: var(--surface-dark);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.cash-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cash-preset-btn {
  height: 40px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--surface-dark);
}

.cash-preset-btn:hover {
  background-color: var(--surface-neutral);
}

.cash-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background-color: #FFFFFF;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cash-numpad-btn {
  height: 44px;
  background-color: var(--surface-neutral);
  border: none;
  border-radius: 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--surface-dark);
}

.cash-numpad-btn:hover {
  background-color: var(--border-base);
}

.cash-numpad-btn:active {
  background-color: var(--border-subtle);
}

.cash-numpad-btn.clear-btn {
  background-color: var(--danger-surface);
  color: var(--danger-critical);
}

.cash-numpad-btn.clear-btn:hover {
  background-color: #fecaca;
}

.cash-photo-upload {
  flex: 1;
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  background-color: var(--surface-neutral);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.cash-photo-upload:hover {
  background-color: #f8fafc;
}

.cash-bottom-bar {
  padding: 12px;
  background-color: #FFFFFF;
  border-top: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.1);
}

.btn-cash-secondary {
  height: 56px;
  padding: 0 16px;
  background-color: transparent;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  color: var(--surface-dark);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cash-secondary:hover {
  background-color: var(--surface-neutral);
}

.btn-cash-secondary.filled {
  background-color: var(--surface-neutral);
}

.btn-cash-secondary.filled:hover {
  background-color: var(--border-base);
}

.btn-cash-primary {
  height: 64px;
  padding: 0 32px;
  background-color: #059669;
  color: #FFFFFF;
  border: 2px solid #022c22;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  text-align: left;
}

.btn-cash-primary:hover {
  background-color: #065f46;
}

body:has(.cash-container) {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body:has(.cash-container) > main,
main:has(.cash-container) {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

/* ==========================================================================
   PRINT / SCREEN VISIBILITY ENGINE & PROFESSIONAL DOCUMENT FORMATTING
   ========================================================================== */

/* 1. Screen Default: Hide all print-only elements */
.print-only,
.d-print-block,
.d-print-inline,
.d-print-inline-block,
.d-print-flex,
.d-print-table,
.d-print-table-row,
.d-print-table-cell {
  display: none !important;
}

/* 2. Print Media: Hide UI/screen controls & render professional document */
@media print {
  /* Hide System Bar, Offline Banner, Toasts, Modals, Menus, Navbars */
  .top-system-bar,
  .offline-banner-bar,
  .toast-container,
  .toast,
  .modal,
  .modal-backdrop,
  .dropdown-menu,
  .pagination,
  .nav-tabs,
  .nav-pills,
  .breadcrumb,
  .no-print,
  .screen-only,
  .d-print-none,
  button:not(.allow-print),
  .btn:not(.allow-print),
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    display: none !important;
  }

  /* Show Print-Only Elements */
  .print-only,
  .d-print-block {
    display: block !important;
  }
  .d-print-inline {
    display: inline !important;
  }
  .d-print-inline-block {
    display: inline-block !important;
  }
  .d-print-flex {
    display: flex !important;
  }
  .d-print-table {
    display: table !important;
  }
  .d-print-table-row {
    display: table-row !important;
  }
  .d-print-table-cell {
    display: table-cell !important;
  }

  /* Page Geometry & Color Scheme */
  @page {
    size: A4 portrait;
    margin: 12mm 14mm 14mm 14mm;
  }

  html, body {
    background: #ffffff !important;
    color: #111111 !important;
    font-family: 'Plus Jakarta Sans', Arial, sans-serif !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  main {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .container,
  .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Professional Document Card & Table Resets */
  .card {
    border: 1px solid #c5c5c5 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    margin-bottom: 12px !important;
    page-break-inside: avoid;
  }

  .card-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #c5c5c5 !important;
    padding: 8px 12px !important;
  }

  .card-body {
    padding: 10px 12px !important;
  }

  .table-responsive {
    overflow: visible !important;
  }

  .table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 8px !important;
  }

  .table th,
  .table td {
    border: 1px solid #c5c5c5 !important;
    padding: 5px 8px !important;
    font-size: 9pt !important;
    color: #111111 !important;
    background: #ffffff !important;
  }

  .table thead th {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #333333 !important;
  }

  /* Avoid Unwanted Page Breaks */
  tr,
  .table,
  .card,
  .doc-kop,
  .signature-container,
  .print-avoid-break {
    page-break-inside: avoid;
  }

  /* Headings & Badges */
  h1, h2, h3, h4, h5, h6 {
    color: #000000 !important;
  }

  .badge {
    border: 1px solid #555555 !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
  }

  /* Formal Document Layout Utilities */
  .doc-kop {
    border-bottom: 2.5px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  .doc-kop .brand-name {
    font-size: 15pt;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #000000;
  }

  .doc-kop .doc-title {
    font-size: 13pt;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;
  }

  .doc-meta-box {
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background-color: #fafafa;
  }

  .signature-container {
    margin-top: 25px;
    padding-top: 10px;
    page-break-inside: avoid;
  }

  .signature-box {
    text-align: center;
    padding: 6px 12px;
  }

  .signature-role {
    font-size: 8.5pt;
    color: #555555;
    margin-bottom: 50px;
  }

  .signature-line {
    border-bottom: 1px solid #222222;
    display: inline-block;
    width: 85%;
    min-height: 1px;
  }

  .signature-name {
    font-size: 9pt;
    font-weight: 700;
    color: #000000;
    margin-top: 4px;
  }
}


