/* Receipt Generator WordPress Plugin Styles */
#rg-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #1a1a2e;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  max-width: 1200px;
  margin: 0 auto;
}
#rg-app *, #rg-app *::before, #rg-app *::after {
  box-sizing: border-box;
}

/* Header */
.rg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.rg-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #1a1a2e;
}
.rg-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons */
.rg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
.rg-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}
.rg-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}
.rg-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
.rg-btn-outline {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff;
}
.rg-btn-outline:hover {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  box-shadow: 0 4px 12px rgba(13,148,136,0.35);
}
.rg-btn-sm {
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
}
.rg-btn-full {
  width: 100%;
  justify-content: center;
}
/* .rg-btn-icon defined below near rent-row context */

/* Mobile Tabs */
.rg-mobile-tabs {
  display: none;
  background: #fff;
  padding: 10px 12px;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.rg-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  letter-spacing: 0.1px;
  box-shadow: 0 2px 6px rgba(71,85,105,0.30);
  text-align: center;
}
.rg-tab:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  box-shadow: 0 4px 10px rgba(71,85,105,0.40);
}
.rg-tab:active {
  transform: translateY(1px);
}
.rg-tab[data-tab="edit"].active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(79,70,229,0.40);
}
.rg-tab[data-tab="templates"].active {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  box-shadow: 0 4px 12px rgba(124,58,237,0.40);
}
.rg-tab[data-tab="preview"].active {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
  box-shadow: 0 4px 12px rgba(3,105,161,0.40);
}

/* Desktop Tabs */
.rg-desktop-tabs {
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
}
.rg-dtab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.1s;
  letter-spacing: 0.1px;
  box-shadow: 0 2px 6px rgba(71,85,105,0.30);
  line-height: 1.4;
}
.rg-dtab:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  box-shadow: 0 4px 10px rgba(71,85,105,0.40);
}
.rg-dtab:active {
  transform: translateY(1px);
}
.rg-dtab[data-dtab="edit"].active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.40);
}
.rg-dtab[data-dtab="templates"].active {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124,58,237,0.40);
}

/* Layout */
.rg-layout {
  display: flex;
  height: 680px;
}
.rg-panel-left {
  width: 520px;
  min-width: 420px;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rg-panel-right {
  flex: 1;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Form Scroll */
.rg-form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.rg-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sections */
.rg-section {
  margin-bottom: 20px;
}
.rg-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0 0 10px;
}

/* Fields */
.rg-field {
  margin-bottom: 10px;
}
.rg-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}
.rg-field input:not([type="checkbox"]),
.rg-field select,
.rg-field textarea {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #1a1a2e;
  font-family: inherit;
  transition: border-color 0.15s;
}
.rg-field input[type="file"] {
  padding: 5px 8px;
  font-size: 12px;
}
.rg-field input:not([type="checkbox"]):focus,
.rg-field select:focus,
.rg-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.rg-field textarea {
  resize: vertical;
}

.rg-row {
  display: flex;
  gap: 10px;
}
.rg-row .rg-field {
  flex: 1;
}

/* Logo Upload */
.rg-logo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.rg-logo-header label:first-child {
  margin-bottom: 0;
}
.rg-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
}
.rg-toggle-label input[type="checkbox"] {
  display: none;
}
.rg-toggle-slider {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background-color: #d1d5db;
  border-radius: 18px;
  transition: 0.2s;
}
.rg-toggle-slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}
.rg-toggle-label input:checked + .rg-toggle-slider {
  background-color: #2563eb;
}
.rg-toggle-label input:checked + .rg-toggle-slider::before {
  transform: translateX(14px);
}
.rg-logo-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rg-logo-upload-row input[type="file"] {
  flex: 1;
}
.rg-logo-preview-wrap {
  margin-top: 6px;
}
.rg-logo-preview-thumb {
  max-width: 80px;
  max-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  object-fit: contain;
}

/* Toggle Switch */
.rg-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: #374151;
}
.rg-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.rg-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rg-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #d1d5db;
  transition: 0.2s;
  border-radius: 22px;
}
.rg-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
}
.rg-switch input:checked + .rg-slider {
  background-color: #2563eb;
}
.rg-switch input:checked + .rg-slider::before {
  transform: translateX(16px);
}

/* Line Items */
.rg-item-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.rg-item-row .rg-field {
  margin-bottom: 0;
}
.rg-item-name { flex: 3; }
.rg-item-qty { flex: 1; min-width: 60px; }
.rg-item-price { flex: 1.5; min-width: 80px; }

/* Category Badges */
.rg-category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.rg-badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.rg-badge.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Template Grid */
.rg-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  position: relative;
}
.rg-template-card {
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rg-template-card:hover {
  border-color: #93c5fd;
}
.rg-template-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.rg-template-thumb-wrap {
  margin-bottom: 6px;
}
.rg-thumb {
  width: 100%;
  height: 100px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.rg-template-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}
.rg-template-desc {
  font-size: 11px;
  color: #6b7280;
}
.rg-template-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.rg-template-tag {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #e8e8ee;
  color: #555;
  margin-left: 3px;
  font-weight: 500;
  vertical-align: middle;
  text-transform: capitalize;
}

/* ── Template Hover Popout ────────────────────────────────── */
.rg-tmpl-popout {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.94) translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.18)) drop-shadow(0 2px 8px rgba(0,0,0,0.10));
}
.rg-tmpl-popout.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: none;
}
.rg-tmpl-popout-inner {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  width: 240px;
}
.rg-tmpl-popout-thumb {
  width: 240px;
  min-height: 180px;
  overflow: hidden;
  position: relative;
  background: #f8fafc;
}
.rg-tmpl-popout-thumb .rg-thumb {
  width: 100%;
  height: auto !important;   /* override the fixed 100px grid thumbnail height */
  min-height: 100px;
  border-radius: 0;
  display: block;
  overflow: visible !important;  /* let zoomed content expand naturally */
}
.rg-tmpl-popout-info {
  padding: 10px 12px 11px;
  border-top: 1px solid #f0f0f5;
}
.rg-tmpl-popout-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rg-tmpl-popout-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rg-tmpl-popout-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.45;
}
.rg-tmpl-popout-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e8e8ee;
  color: #555;
  margin-left: 4px;
  font-weight: 500;
  text-transform: capitalize;
  vertical-align: middle;
}
.rg-tmpl-popout-hint {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 5px;
  font-style: italic;
}
/* Arrow pointing left (popout is to the right of card) */
.rg-tmpl-popout-arrow {
  position: absolute;
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid #e2e8f0;
}
.rg-tmpl-popout-arrow::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #fff;
}
/* Arrow pointing right (popout is to the left of card) */
.rg-tmpl-popout-arrow.arrow-right {
  left: auto;
  right: -7px;
  border-right: none;
  border-left: 7px solid #e2e8f0;
}
.rg-tmpl-popout-arrow.arrow-right::after {
  left: auto;
  right: 2px;
  border-right: none;
  border-left: 6px solid #fff;
}

/* Preview Bar */
.rg-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.rg-template-label {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
}
.rg-template-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: linear-gradient(180deg, #4f46e5, #7c3aed);
  border-radius: 2px;
  flex-shrink: 0;
}
.rg-preview-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* Per-button color scheme in preview bar */
#rg-export-pdf {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37,99,235,0.25);
}
#rg-export-pdf:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
#rg-export-png {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(13,148,136,0.25);
}
#rg-export-png:hover {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  box-shadow: 0 4px 12px rgba(13,148,136,0.35);
}
#rg-export-jpeg {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(5,150,105,0.25);
}
#rg-export-jpeg:hover {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 4px 12px rgba(5,150,105,0.35);
}

/* Preview Area */
.rg-preview-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.rg-preview-center {
  display: flex;
  justify-content: center;
}

/* Receipt */
.rg-receipt {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.rg-receipt-narrow { max-width: 280px; width: 100%; }
.rg-receipt-standard { max-width: 340px; width: 100%; }
.rg-receipt-wide { max-width: 420px; width: 100%; }
.rg-receipt-pad-narrow { padding: 18px 16px 20px; }
.rg-receipt-pad-normal { padding: 22px 20px 24px; }

.rg-receipt-bg-subtle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
}

/* Texture overlay base */
.rg-texture-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.rg-receipt > *:not(.rg-texture-overlay):not(.rg-receipt-bg-subtle) {
  position: relative;
  z-index: 1;
}

/* Paper Textures */
.rg-paper-thermal {
  /* Real thermal paper: plain white — authenticity comes from layout not CSS effects */
  background-color: #ffffff;
  background-image: none;
}
.rg-paper-thermal .rg-texture-overlay {
  display: none;
}

.rg-paper-kraft {
  background-color: #f0e6d3;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(139,109,68,0.04) 4px,
      rgba(139,109,68,0.04) 5px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 6px,
      rgba(139,109,68,0.02) 6px,
      rgba(139,109,68,0.02) 7px
    );
}
.rg-paper-kraft .rg-texture-overlay {
  background-image:
    radial-gradient(circle at 15% 25%, rgba(120,90,50,0.08) 0%, transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(100,80,40,0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(140,110,60,0.05) 0%, transparent 35%);
}

.rg-paper-linen {
  background-color: #faf8f5;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(0,0,0,0.015) 1px,
      rgba(0,0,0,0.015) 2px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 1px,
      rgba(0,0,0,0.01) 1px,
      rgba(0,0,0,0.01) 2px
    );
}
.rg-paper-linen .rg-texture-overlay {
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(0,0,0,0.008) 3px, rgba(0,0,0,0.008) 4px),
    repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(0,0,0,0.005) 3px, rgba(0,0,0,0.005) 4px);
}

.rg-paper-carbon {
  background-color: #eef1f6;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(60,80,120,0.025) 1px,
      rgba(60,80,120,0.025) 2px
    );
}
.rg-paper-carbon .rg-texture-overlay {
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(100,120,180,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(80,100,160,0.04) 0%, transparent 50%);
}

.rg-paper-parchment {
  background-color: #f8f0e3;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(180,150,100,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(160,130,80,0.06) 0%, transparent 45%),
    radial-gradient(ellipse at 10% 80%, rgba(190,160,100,0.04) 0%, transparent 40%);
}
.rg-paper-parchment .rg-texture-overlay {
  background-image:
    repeating-linear-gradient(
      30deg,
      transparent,
      transparent 8px,
      rgba(120,90,50,0.015) 8px,
      rgba(120,90,50,0.015) 9px
    ),
    repeating-linear-gradient(
      -60deg,
      transparent,
      transparent 12px,
      rgba(100,80,40,0.01) 12px,
      rgba(100,80,40,0.01) 13px
    );
}

.rg-paper-aged {
  background-color: #f5eed6;
  background-image:
    radial-gradient(circle at 25% 15%, rgba(150,120,60,0.1) 0%, transparent 35%),
    radial-gradient(circle at 75% 80%, rgba(130,100,50,0.08) 0%, transparent 40%),
    radial-gradient(circle at 60% 40%, rgba(160,130,70,0.06) 0%, transparent 30%),
    radial-gradient(circle at 10% 60%, rgba(140,110,60,0.07) 0%, transparent 25%);
}
.rg-paper-aged .rg-texture-overlay {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(100,80,30,0.02) 3px,
      rgba(100,80,30,0.02) 4px
    );
}

.rg-paper-dotmatrix {
  background-color: #fafcf5;
  background-image:
    radial-gradient(circle, rgba(0,80,0,0.06) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}
.rg-paper-dotmatrix .rg-texture-overlay {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 11px,
      rgba(0,80,0,0.03) 11px,
      rgba(0,80,0,0.03) 12px
    );
}

.rg-paper-smooth {
  background-color: #fcfcfc;
}
.rg-paper-smooth .rg-texture-overlay {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.008) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.008) 100%);
}

.rg-paper-clean {
  background-color: #ffffff;
}
.rg-paper-clean .rg-texture-overlay {
  display: none;
}

/* Edge Styles */
.rg-edge-torn {
  -webkit-mask-image:
    linear-gradient(to right,
      transparent 0px,
      black 0px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='12' viewBox='0 0 100 12'%3E%3Cpath d='M0,6 Q5,0 10,5 Q15,10 20,4 Q25,1 30,6 Q35,11 40,5 Q45,0 50,6 Q55,10 60,4 Q65,1 70,7 Q75,11 80,5 Q85,0 90,6 Q95,10 100,4 L100,12 L0,12 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-position: center top, center bottom;
  -webkit-mask-size: 100% calc(100% - 8px), 100% 12px;
  -webkit-mask-repeat: no-repeat;
}
.rg-edge-torn::before,
.rg-edge-torn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 2;
  pointer-events: none;
}
.rg-edge-torn::before {
  top: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.04) 0%,
    transparent 100%
  );
}
.rg-edge-torn::after {
  bottom: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,0.04) 0%,
    transparent 100%
  );
}

.rg-edge-perforated::before,
.rg-edge-perforated::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1.5px, transparent 1.5px);
  background-size: 8px 6px;
  background-position: center;
}
.rg-edge-perforated::before {
  top: -1px;
}
.rg-edge-perforated::after {
  bottom: -1px;
}

.rg-edge-fade::before,
.rg-edge-fade::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}
.rg-edge-fade::before {
  top: 0;
  height: 20px;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.5) 0%,
    transparent 100%
  );
}
.rg-edge-fade::after {
  bottom: 0;
  height: 20px;
  background: linear-gradient(to top,
    rgba(255,255,255,0.4) 0%,
    transparent 100%
  );
}

/* ═══════════════════════════════════════════════════
   THERMAL RECEIPT — Authentic look
   Real thermal printers: narrow roll, monospace font,
   all-caps headers, dashed separators, slight ink fade
   ═══════════════════════════════════════════════════ */

.rg-thermal-receipt {
  font-size: 12px;
  line-height: 1.5;
  /* Thermal paper is completely flat — no gloss, no shadow, no texture */
  box-shadow: none !important;
  border: none !important;
  background: #ffffff !important;
  color: #111111 !important;         /* All text: near-black, like fresh thermal ink */
}
/* Force all child elements to inherit black ink — no accent colors on thermal */
.rg-thermal-receipt * {
  color: inherit !important;
  border-color: #111111 !important;
}

/* Business name on thermal: same weight as everything else, just uppercase.
   Real POS printers render every character the same way. */
.rg-thermal-receipt .rg-r-biz-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: inherit !important;
}

/* Biz details: smaller, tight leading */
.rg-thermal-receipt .rg-r-biz-detail,
.rg-thermal-receipt .rg-r-biz-contact {
  font-size: 10px;
  line-height: 1.55;
  margin-top: 1px;
}

/* Receipt # / date row: monospace tabular */
.rg-thermal-receipt .rg-r-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Items: monospace tabular numbers for price alignment */
.rg-thermal-receipt .rg-r-item-compact,
.rg-thermal-receipt .rg-r-item-table {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* Item name: slightly bolder on thermal */
.rg-thermal-receipt .rg-r-item-compact-name {
  font-weight: 600;
}

/* Table items: price cols more precise */
.rg-thermal-receipt .rg-r-items-table-header {
  font-size: 8.5px;
  letter-spacing: 0.5px;
  border-bottom: none;
  opacity: 0.5;
}

/* Totals: tight and tabular */
.rg-thermal-receipt .rg-r-total-line {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1px;
}

/* Grand total: double the emphasis on thermal */
.rg-thermal-receipt .rg-r-grand-total {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-top: 2px solid currentColor !important;
  margin-top: 3px;
  padding-top: 5px;
}

/* Payment: compact inline */
.rg-thermal-receipt .rg-r-payment {
  font-size: 10px;
}

/* Footer: centered, slightly larger than normal */
.rg-thermal-receipt .rg-r-footer {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: none !important;
  margin-top: 6px;
  padding-top: 4px;
  opacity: 0.55;
}

/* Dashed separators: on thermal these are full-width ---- lines */
.rg-thermal-receipt .rg-sep-dashed {
  border-top-width: 1px;
  border-top-style: dashed;
  margin: 6px 0;
}

/* Stars separator: *** style on thermal */
.rg-thermal-receipt .rg-sep-stars {
  font-size: 11px;
  letter-spacing: 6px;
  opacity: 0.4;
}

/* Logo icon on thermal: smaller, no padding waste */
.rg-thermal-receipt .rg-r-logo-wrap {
  margin-bottom: 4px;
}
.rg-thermal-receipt .rg-r-logo {
  max-height: 44px;
  max-width: 90px;
}

/* Section labels: uppercase, tighter */
.rg-thermal-receipt .rg-r-customer {
  font-size: 10px;
}

/* Barcode: always look good on thermal */
.rg-thermal-receipt .rg-r-barcode-wrap {
  margin-top: 6px;
}

/* Thermal section headings: centered, monospace, plain */
.rg-thermal-section-head {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
  margin: 4px 0 2px;
  opacity: 0.8;
  white-space: pre;
}

/* Thermal monospace item / total rows */
.rg-thermal-item-row {
  margin-bottom: 1px;
}
.rg-thermal-item-line {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  white-space: pre;          /* preserve spaces for column alignment */
  overflow: hidden;
  letter-spacing: 0;
}
.rg-thermal-item-qty {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  white-space: pre;
  opacity: 0.65;
  margin-bottom: 3px;
  letter-spacing: 0;
}
.rg-thermal-total-row {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  white-space: pre;
  margin-bottom: 1px;
  letter-spacing: 0;
}
/* Thermal TOTAL line: bigger, bold */
.rg-thermal-total-row[style*="font-weight:700"] {
  font-size: 13px;
  margin-top: 2px;
}


/* SKU item input field: narrow */
.rg-item-sku {
  width: 70px !important;
  min-width: 70px !important;
  flex: 0 0 70px !important;
}
.rg-item-sku input {
  font-size: 11px;
}

/* Thermal padding: tight, like a real 80mm roll */
.rg-thermal-receipt.rg-receipt-pad-narrow,
.rg-thermal-receipt.rg-receipt-pad-normal {
  padding: 12px 14px 16px;
}

/* Thermal receipts: no edge effects — paper just ends cleanly */
.rg-thermal-receipt.rg-edge-torn,
.rg-thermal-receipt.rg-edge-perforated,
.rg-thermal-receipt.rg-edge-fade {
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.rg-thermal-receipt.rg-edge-torn::before,
.rg-thermal-receipt.rg-edge-torn::after,
.rg-thermal-receipt.rg-edge-perforated::before,
.rg-thermal-receipt.rg-edge-perforated::after,
.rg-thermal-receipt.rg-edge-fade::before,
.rg-thermal-receipt.rg-edge-fade::after {
  display: none !important;
}

/* Text Effects */
.rg-fx-thermal-fade {
  color: #1c1812;
  /* Simulate the slight unevenness of thermal ink */
  -webkit-font-smoothing: none;
  font-smooth: never;
}
/* Main content - strong ink, slightly rough edges */
.rg-fx-thermal-fade .rg-r-biz-name {
  color: #0f0e0b;
  /* Thermal head deposits ink unevenly on thick strokes */
  text-shadow:
    0.4px 0px 0px rgba(0,0,0,0.08),
    -0.2px 0px 0px rgba(0,0,0,0.05),
    0px 0.3px 0px rgba(0,0,0,0.06);
}
/* Secondary info - slightly lighter ink (less heat on smaller type) */
.rg-fx-thermal-fade .rg-r-biz-detail,
.rg-fx-thermal-fade .rg-r-biz-contact,
.rg-fx-thermal-fade .rg-r-receipt-meta,
.rg-fx-thermal-fade .rg-r-meta {
  color: #3d3628;
  opacity: 1;
}
/* Items - medium ink density */
.rg-fx-thermal-fade .rg-r-item-compact,
.rg-fx-thermal-fade .rg-r-item-table,
.rg-fx-thermal-fade .rg-r-item-spacious {
  color: #201d16;
  text-shadow: 0.3px 0px 0px rgba(0,0,0,0.07);
}
/* Section labels - lightest (small type = less heat = less ink) */
.rg-fx-thermal-fade .rg-r-customer,
.rg-fx-thermal-fade .rg-r-payment,
.rg-fx-thermal-fade .rg-r-notes,
.rg-fx-thermal-fade .rg-r-total-line .label {
  color: #4a4033;
  opacity: 1;
}
/* Grand total - max ink, very bold */
.rg-fx-thermal-fade .rg-r-grand-total {
  color: #0a0906;
  text-shadow:
    0.5px 0px 0px rgba(0,0,0,0.10),
    -0.3px 0px 0px rgba(0,0,0,0.07),
    0px 0.4px 0.5px rgba(0,0,0,0.08);
}
/* Footer text fades the most - end of roll, less ink */
.rg-fx-thermal-fade .rg-r-footer {
  color: #6b5d46;
  opacity: 0.75;
}
/* Separators - dashes are always a bit faint on thermal */
.rg-fx-thermal-fade .rg-sep-dashed,
.rg-fx-thermal-fade .rg-sep-dotted {
  border-color: #8a7a62 !important;
  opacity: 0.5;
}
.rg-fx-thermal-fade .rg-sep-stars {
  color: #8a7a62;
  opacity: 0.55;
}

.rg-fx-inkbleed {
  color: #0a0a12;
}
.rg-fx-inkbleed .rg-r-biz-name {
  text-shadow: 0.4px 0.2px 0.5px rgba(0,0,0,0.15);
}
.rg-fx-inkbleed .rg-r-grand-total {
  text-shadow: 0.3px 0.1px 0.4px rgba(0,0,0,0.12);
}
.rg-fx-inkbleed .rg-sep-dashed,
.rg-fx-inkbleed .rg-sep-dotted {
  opacity: 0.6;
}

.rg-fx-light {
  color: #2a2a3a;
}
.rg-fx-light .rg-r-biz-detail,
.rg-fx-light .rg-r-biz-contact,
.rg-fx-light .rg-r-receipt-meta,
.rg-fx-light .rg-r-meta {
  opacity: 0.55;
}
.rg-fx-light .rg-r-total-line .label {
  opacity: 0.55;
}

/* Receipt Logo */
.rg-r-logo-wrap {
  margin-bottom: 8px;
}
.rg-r-logo {
  max-width: 110px;
  max-height: 56px;
  object-fit: contain;
}

/* Receipt Header */
.rg-r-header { margin-bottom: 0; }
.rg-r-header-centered { text-align: center; }
.rg-r-header-left { text-align: left; }
.rg-r-header-right { text-align: right; }
.rg-r-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.rg-r-biz-name {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.3px;
}
.rg-autofit-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rg-r-biz-detail {
  font-size: 10.5px;
  margin-top: 3px;
  opacity: 0.65;
  line-height: 1.5;
}
.rg-r-biz-contact {
  font-size: 10.5px;
  opacity: 0.65;
  margin-top: 3px;
  line-height: 1.5;
}
.rg-r-receipt-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rg-r-receipt-meta {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.7;
}

/* Separators */
.rg-sep { margin: 10px 0; }
.rg-sep-dashed { border-top: 1.5px dashed; }
.rg-sep-solid { border-top: 1px solid; }
.rg-sep-dotted { border-top: 1.5px dotted; }
.rg-sep-stars {
  text-align: center;
  font-size: 10px;
  letter-spacing: 4px;
  user-select: none;
}
.rg-sep-equals {
  text-align: center;
  font-size: 10px;
  letter-spacing: 2px;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}
.rg-sep-none { margin: 10px 0; }

/* Receipt Meta */
.rg-r-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.6;
  letter-spacing: 0.2px;
}

/* Customer */
.rg-r-customer {
  font-size: 10.5px;
  line-height: 1.6;
}
.rg-r-customer-label {
  opacity: 0.5;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.rg-r-customer-addr {
  opacity: 0.65;
}

/* Items */
/* Items — merged from two redundant blocks */
.rg-r-items-table-header {
  display: flex;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.45;
  margin-bottom: 5px;
  padding: 0 2px 4px;
  border-bottom: 1px solid currentColor;
}
.rg-r-items-table-header .col-item { flex: 1; }
.rg-r-items-table-header .col-qty { width: 32px; text-align: center; }
.rg-r-items-table-header .col-price { width: 64px; text-align: right; }
.rg-r-items-table-header .col-total { width: 64px; text-align: right; }

.rg-r-item-table {
  display: flex;
  font-size: 11.5px;
  padding: 3px 2px;
  line-height: 1.4;
}
.rg-r-item-table .col-qty { width: 32px; text-align: center; opacity: 0.7; }
.rg-r-item-table .col-price { width: 64px; text-align: right; opacity: 0.7; }
.rg-r-item-table .col-total { width: 64px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.rg-r-item-spacious { margin-bottom: 8px; }
.rg-r-item-spacious-main {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}
.rg-r-item-spacious-main .item-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.rg-r-item-spacious-sub { font-size: 10px; opacity: 0.5; margin-top: 1px; }

.rg-r-item-compact {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  line-height: 1.4;
}
.rg-r-item-compact-sub {
  font-size: 10px;
  opacity: 0.55;
  padding: 0 0 3px 4px;
  line-height: 1.3;
}
.rg-r-item-compact-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-r-item-compact-total { margin-left: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Totals */
.rg-r-totals { margin-top: 2px; }
.rg-r-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}
.rg-r-total-line .label { opacity: 0.6; }
.rg-r-grand-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  padding-top: 6px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

/* Payment */
.rg-r-payment {
  font-size: 10.5px;
  opacity: 0.65;
  margin-top: 1px;
  line-height: 1.5;
}

/* .rg-cash-change-display defined below with full styling */

/* Cash Details */
.rg-r-cash-details {
  margin-top: 4px;
  font-size: 11px;
}

/* Notes */
.rg-r-notes {
  font-size: 10px;
  opacity: 0.55;
  font-style: italic;
  line-height: 1.5;
  margin-top: 2px;
}

/* Barcode */
.rg-r-barcode-wrap {
  text-align: center;
  margin-top: 10px;
  padding-top: 4px;
}
.rg-r-barcode-wrap svg {
  max-width: 100%;
  height: auto;
}

/* QR Code */
.rg-r-qr-wrap {
  text-align: center;
  margin-top: 10px;
  padding-top: 4px;
}
.rg-r-qr-wrap svg {
  display: inline-block;
  max-width: 100%;
  height: auto;
}
.rg-thermal-receipt .rg-r-qr-wrap {
  margin-top: 6px;
}

/* Footer */
.rg-r-footer {
  text-align: center;
  font-size: 10.5px;
  margin-top: 10px;
  padding-top: 10px;
  font-weight: 600;
  opacity: 0.65;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

/* Toast */
.rg-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 20px;
  background: #1e293b;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  z-index: 99999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.rg-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .rg-mobile-tabs {
    display: flex;
  }
  .rg-layout {
    flex-direction: column;
    height: auto;
    min-height: 500px;
  }
  .rg-panel-left {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .rg-panel-right {
    min-height: 400px;
  }
  .rg-desktop-tabs {
    display: none;
  }
  .rg-panel-left .rg-form-scroll {
    max-height: 60vh;
  }
  .rg-template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rg-header .rg-title {
    font-size: 16px;
  }
}


/* Rent period/service rows */
.rg-rent-period-labels {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}
.rg-rent-period-labels span:first-child {
  flex: 1;
}
.rg-rent-period-labels span:last-child {
  width: 100px;
  text-align: right;
}
.rg-rent-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.rg-rent-row input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
}
.rg-rent-row input[type="number"] {
  width: 100px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
}
.rg-rent-row input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.rg-btn-icon {
  background: none !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: #94a3b8 !important;
  transition: all 0.15s;
  flex-shrink: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.rg-btn-icon:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
}
.rg-btn-icon svg {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  fill: none !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
}
.rg-btn-icon svg path {
  stroke: currentColor !important;
}

@media (max-width: 480px) {
  .rg-template-grid {
    grid-template-columns: 1fr;
  }
  .rg-row {
    flex-direction: column;
    gap: 0;
  }
}


/* ── Email / Saves Modal ────────────────────────────────────────── */
.rg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.rg-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  animation: rg-modal-in 0.2s ease;
}
@keyframes rg-modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.rg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #f0f0f5;
  background: #f8fafc;
}
.rg-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}
.rg-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.rg-modal-close:hover {
  color: #374151;
  background: #e5e7eb;
}
.rg-modal-body {
  padding: 18px 20px;
}

/* Modal textarea */
.rg-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

.rg-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid #f0f0f5;
}

/* ── New action buttons: Email, Print, Saves ──────────────────── */
#rg-btn-email {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(124,58,237,0.25);
}
#rg-btn-email:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}
#rg-btn-print {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(3,105,161,0.25);
}
#rg-btn-print:hover {
  background: linear-gradient(135deg, #075985 0%, #0369a1 100%);
  box-shadow: 0 4px 12px rgba(3,105,161,0.35);
}
#rg-btn-saves {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(180,83,9,0.25);
}
#rg-btn-saves:hover {
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
  box-shadow: 0 4px 12px rgba(180,83,9,0.35);
}

/* ── Save items list ────────────────────────────────────────────── */
.rg-save-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fafafa;
  transition: border-color 0.15s;
}
.rg-save-item:hover {
  border-color: #a5b4fc;
  background: #f5f3ff;
}
.rg-save-info {
  flex: 1;
  min-width: 0;
}
.rg-save-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rg-save-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.rg-save-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
}
.rg-save-load-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.rg-save-load-btn:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
}
.rg-save-del-btn {
  padding: 5px 9px;
  font-size: 13px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.rg-save-del-btn:hover {
  background: #fecaca;
}


/* ── Modal inputs and utility classes ─────────────────────────── */
.rg-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.rg-hint-text {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.4;
}

.rg-email-status {
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
}

.rg-btn-cancel {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
  color: #fff;
}

.rg-btn-send {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #fff;
}

.rg-btn-save {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  white-space: nowrap;
}

.rg-saves-list {
  max-height: 300px;
  overflow-y: auto;
}

.rg-save-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.rg-save-name-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}


/* ── PHP template utility classes ─────────────────────────────── */
.rg-flex-row-top    { display: flex; gap: 8px; align-items: flex-start; }
.rg-flex-row-center { display: flex; align-items: center; gap: 6px; }
.rg-flex-row-clickable { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.rg-flex-wrap-row   { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.rg-col-90          { flex: 0 0 90px; }
.rg-icon-sm         { width: 16px; height: 16px; cursor: pointer; }
.rg-field-sublabel  { font-size: 11px; color: #6b7280; display: block; margin-bottom: 3px; }
.rg-field-hint      { font-size: 11px; color: #9ca3af; margin-top: 5px; }
.rg-field-note      { font-size: 11px; color: #888; }
.rg-subtle-note     { font-size: 12px; color: #6b7280; }
.rg-label-muted     { font-weight: 400; opacity: 0.55; font-size: 11px; }
.rg-label-faded     { font-weight: 400; opacity: 0.6; font-size: 11px; }
.rg-text-bold-dark  { font-weight: 700; color: #1e293b; }
.rg-bg-light        { background: #f5f5f5; }
.rg-inline-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.rg-badge-highlight {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rg-field-featured {
  border: 2px solid #f59e0b;
  background: #fffbeb;
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
}
.rg-select-sm {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

/* ── Print stylesheet ───────────────────────────────────────────── */
@media print {
  body * { visibility: hidden; }
  #rg-print-area, #rg-print-area * { visibility: visible; }
  #rg-print-area { position: absolute; left: 0; top: 0; }
}

/* ── Cash payment quick denomination buttons ──────────────────── */
.rg-cash-quick-btn {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  color: #374151;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
  line-height: 1.6;
}
.rg-cash-quick-btn:hover {
  background: #e0e7ff;
  border-color: #818cf8;
  color: #3730a3;
}
.rg-cash-change-display {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  margin-top: 5px;
  padding: 5px 9px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 6px;
}
