/* ==========================================================================
   Master Plants - Order Receipt & Invoice Generator Stylesheet
   ========================================================================== */

:root {
  --color-primary: #064e3b;        /* Master Plants Deep Forest Green */
  --color-primary-dark: #022c22;
  --color-primary-light: #065f46;
  --color-emerald-accent: #059669;
  --color-mint-bg: #edf5f1;        /* Receipt container mint background */
  --color-mint-light: #f2faf6;     /* Totals box mint background */
  --color-mint-border: #d1fae5;
  --color-mint-subtext: #a7f3d0;   /* Light mint for dark header/footer text */
  --color-dark: #0f172a;           /* Dark text */
  --color-gray: #64748b;           /* Muted label gray */
  --color-gray-light: #f4f6f8;     /* Table header gray */
  --color-border: #e2e8f0;         /* Card border */
  --color-card-bg: #ffffff;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--color-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Top Application Navigation Bar
   ========================================================================== */
.app-topbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), #0d7055);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 8px rgba(6, 78, 59, 0.25);
}

.topbar-brand h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.topbar-brand h1 span {
  color: var(--color-primary);
  font-weight: 600;
}

.topbar-subtitle {
  font-size: 12px;
  color: #64748b;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}
.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-success {
  background-color: #059669;
  color: #ffffff;
}
.btn-success:hover {
  background-color: #047857;
}

.btn-emerald {
  background-color: var(--color-primary);
  color: #ffffff;
}
.btn-emerald:hover {
  background-color: #043c2d;
}

.btn-warning {
  background-color: #f59e0b;
  color: #ffffff;
  font-weight: 700;
}
.btn-warning:hover {
  background-color: #d97706;
  color: #ffffff;
}

.btn-whatsapp {
  background-color: #25D366;
  color: #ffffff;
  font-weight: 700;
}
.btn-whatsapp:hover {
  background-color: #128C7E;
  color: #ffffff;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #e2e8f0;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

.btn-outline {
  background-color: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-outline:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.btn-ghost {
  background-color: transparent;
  color: #64748b;
}
.btn-ghost:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* ==========================================================================
   Main Application Layout
   ========================================================================== */
.app-container {
  display: grid;
  grid-template-columns: 460px 1fr;
  flex: 1;
  min-height: calc(100vh - 65px);
  overflow: hidden;
}

/* ==========================================================================
   LEFT PANEL: Form Controls
   ========================================================================== */
.form-panel {
  background-color: #ffffff;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  max-height: calc(100vh - 65px);
  padding: 20px 24px 80px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header-title i {
  color: var(--color-primary);
  font-size: 16px;
}

.panel-header-title h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
  background-color: #ecfdf5;
  padding: 4px 10px;
  border-radius: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Form Cards */
.form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease;
}

.form-card:focus-within {
  border-color: #cbd5e1;
}

.form-card-header {
  padding: 12px 16px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-card-header.flex-between {
  justify-content: space-between;
}

.form-card-header .header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-badge {
  width: 22px;
  height: 22px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-card-header h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.form-card-body {
  padding: 16px;
}

/* Form Row & Grid */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 11px;
  font-size: 13px;
  font-family: var(--font-sans);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.12);
}

.input-prefix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 10px;
  font-weight: 700;
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.input-prefix-wrapper input {
  padding-left: 24px !important;
}

/* Logo Uploader in Form */
.logo-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.logo-preview-box {
  width: 70px;
  height: 40px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}

.logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-btn-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-upload-label {
  cursor: pointer;
  background: #ffffff;
}

/* Dynamic Products Builder */
.products-builder-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-row-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  position: relative;
}

.product-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.product-row-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.btn-del-item {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
.btn-del-item:hover {
  background: #fee2e2;
}

.product-row-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-row-metrics {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  align-items: center;
}

.calculated-preview-box {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
}

/* ==========================================================================
   RIGHT PANEL: Live Receipt Preview
   ========================================================================== */
.preview-panel {
  background-color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
  position: relative;
  overflow: hidden;
}

.preview-toolbar {
  background-color: #ffffff;
  border-bottom: 1px solid #cbd5e1;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preview-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-title i {
  color: var(--color-primary);
}

.aspect-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background-color: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

.preview-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

#zoom-level-text {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  min-width: 42px;
  text-align: center;
}

/* Viewport Area */
.preview-viewport {
  flex: 1;
  overflow: auto;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* ==========================================================================
   THE EXACT RECEIPT NODE (Target for export & matching screenshot)
   ========================================================================== */
.receipt-root {
  width: 890px;
  min-width: 890px;
  background-color: var(--color-mint-bg); /* #edf5f1 */
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
  transform-origin: top center;
  transition: transform 0.15s ease;
}

/* Top Emerald Header */
.receipt-header {
  background-color: var(--color-primary); /* #064e3b */
  padding: 26px 36px;
  color: #ffffff;
}

.receipt-header-content {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-logo-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 2px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 145px;
  height: 68px;
  flex-shrink: 0;
}

.header-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.header-text-block {
  display: flex;
  flex-direction: column;
}

.header-brand-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.header-order-summary {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
}

.header-tagline {
  font-size: 12.5px;
  color: var(--color-mint-subtext); /* #a7f3d0 */
  font-weight: 500;
  margin-top: 2px;
}

/* Mint Body Wrapper */
.receipt-body-wrapper {
  padding: 28px 36px 32px;
}

/* Inner White Card */
.receipt-card {
  background-color: #ffffff;
  border-radius: 22px;
  padding: 34px 38px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* Section styling */
.receipt-section {
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.dark-title {
  color: #0f172a;
}

.section-subtitle {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.green-title {
  color: var(--color-primary); /* #064e3b */
}

/* Order Details Grid */
.order-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  row-gap: 16px;
  column-gap: 24px;
}

.details-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 3px;
}

.detail-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

/* Delivery Address text */
.delivery-address-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary); /* #064e3b */
  line-height: 1.45;
}

/* Ordered Products Table */
.products-table-container {
  overflow: hidden;
  margin-top: 6px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table thead tr {
  background-color: var(--color-gray-light); /* #f4f6f8 */
}

.products-table th {
  padding: 9px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.products-table th.col-item {
  text-align: left;
  padding-left: 14px;
  width: 58%;
}

.products-table th.col-qty {
  text-align: center;
  width: 12%;
}

.products-table th.col-price {
  text-align: right;
  width: 15%;
}

.products-table th.col-subtotal {
  text-align: right;
  padding-right: 14px;
  width: 15%;
}

.products-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.products-table td {
  padding: 13px 12px;
  font-size: 13px;
  color: #0f172a;
  vertical-align: middle;
}

.products-table td.col-item {
  padding-left: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.products-table td.col-qty {
  text-align: center;
  font-weight: 600;
}

.products-table td.col-price {
  text-align: right;
  font-weight: 600;
}

.products-table td.col-subtotal {
  text-align: right;
  padding-right: 14px;
  font-weight: 700;
  color: var(--color-primary); /* #064e3b */
}

/* Tracking Summary Grid */
.tracking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
}

.tracking-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.check-circle-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-primary); /* #064e3b */
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.check-circle-icon svg {
  width: 15px;
  height: 15px;
}

.tracking-card-content {
  display: flex;
  flex-direction: column;
}

.tracking-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

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

/* Totals Box (Right Aligned) */
.totals-section-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.totals-box {
  width: 310px;
  background-color: var(--color-mint-light); /* #f2faf6 */
  border: 1px solid var(--color-mint-border); /* #d1fae5 */
  border-radius: 12px;
  padding: 14px 18px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.totals-row:last-child {
  margin-bottom: 0;
}

.totals-label {
  color: #475569;
  font-weight: 600;
}

.totals-value {
  color: #0f172a;
}

.bold-dark {
  font-weight: 700;
  color: #0f172a;
}

.green-text {
  color: var(--color-primary) !important;
}

.totals-divider {
  height: 1px;
  background-color: var(--color-mint-border);
  margin: 10px 0;
}

.total-grand-row {
  margin-top: 4px;
}

.total-grand-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.total-grand-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
}

/* Bottom Emerald Footer */
.receipt-footer {
  background-color: var(--color-primary); /* #064e3b */
  padding: 18px 36px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  flex-direction: column;
}

.footer-url {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.footer-subtext {
  font-size: 11px;
  color: var(--color-mint-subtext); /* #a7f3d0 */
  margin-top: 2px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.footer-contact {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* Mobile Quick Actions Bar */
.mobile-quick-actions {
  display: none;
  background-color: #ffffff;
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  position: sticky;
  bottom: 0;
  z-index: 90;
  gap: 8px;
  justify-content: center;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-container.active {
  opacity: 1;
  transform: translateY(0);
}

.toast-content {
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 13.5px;
  font-weight: 600;
}

.toast-icon {
  color: #10b981;
  font-size: 16px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 400px 1fr;
  }
}

@media (max-width: 992px) {
  .app-container {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  
  .form-panel {
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
  }
  
  .preview-panel {
    height: auto;
    min-height: 800px;
  }
  
  .preview-viewport {
    padding: 16px;
    align-items: center;
  }

  .mobile-quick-actions {
    display: flex;
  }
}

@media (max-width: 640px) {
  .app-topbar {
    padding: 12px 16px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   History Modal & Saved Orders
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.modal-title i {
  color: var(--color-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close-btn:hover {
  color: #0f172a;
  background-color: #f1f5f9;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

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

.history-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.history-item-card:hover {
  border-color: var(--color-primary);
  background-color: #f0fdf4;
}

.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history-item-order-num {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.history-item-meta {
  font-size: 12px;
  color: #64748b;
}

.history-item-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.empty-history-notice {
  text-align: center;
  padding: 30px 10px;
  color: #94a3b8;
  font-size: 13.5px;
}

/* ==========================================================================
   Print Optimization
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print,
  .app-topbar,
  .form-panel,
  .preview-toolbar,
  .mobile-quick-actions,
  .toast-container {
    display: none !important;
  }
  .app-container {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .preview-panel {
    background: transparent !important;
    height: auto !important;
    overflow: visible !important;
  }
  .preview-viewport {
    padding: 0 !important;
    display: block !important;
  }
  .receipt-root {
    width: 100% !important;
    min-width: 100% !important;
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
    page-break-after: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

