/* ==========================================================
   PASARELA DE PAGO POR RUT - SISTEMA DE DISEÑO MODERN FINTECH
   ========================================================== */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette - HSL Tailored Dark Theme */
  --bg-dark: #090d16;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(26, 38, 62, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.35);

  --emerald: #10b981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --amber: #f59e0b;
  --rose: #ef4444;
  --sky: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-main: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Background Glow FX */
.app-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.25;
}

.bg-glow-1 {
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary), var(--sky));
}

.bg-glow-2 {
  bottom: 10%;
  right: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--emerald), var(--primary));
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border-glass);
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-container {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--emerald));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  display: block;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* Search Hero */
.search-hero {
  padding: 3rem 0 2rem;
}

.hero-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.75rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Card Glass */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-main);
}

.card-glass-subtle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

/* RUT Input Form */
.search-card {
  max-width: 680px;
  margin: 0 auto;
}

.form-group-rut {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

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

.input-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.input-wrapper input {
  width: 100%;
  height: 58px;
  padding: 0 3rem 0 3.25rem;
  background: rgba(9, 13, 22, 0.8);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: rgba(9, 13, 22, 0.95);
}

.input-wrapper input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: normal;
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.input-feedback {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.error-text {
  color: var(--rose);
}

.quick-ruts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.quick-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* n8n Integration Config Box */
.n8n-config-box {
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.n8n-toggle-btn {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.n8n-toggle-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.n8n-toggle-btn #n8nChevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.n8n-toggle-btn.active #n8nChevron {
  transform: rotate(180deg);
}

.n8n-config-content {
  padding: 0.85rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
}

.form-label-sm {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.input-wrapper-sm {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.input-wrapper-sm input {
  flex: 1;
  height: 38px;
  padding: 0 0.75rem;
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.82rem;
}

.input-wrapper-sm input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-sm {
  height: 38px;
  padding: 0 0.85rem;
  font-size: 0.8rem;
}

.helper-text {
  font-size: 0.73rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.spinner-ring-sm {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tag-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-lg {
  height: 52px;
  padding: 0 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(79, 70, 229, 0.7);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.6);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(16, 185, 129, 0.75);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.shadow-pulse {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.6); }
  50% { box-shadow: 0 10px 30px 4px rgba(16, 185, 129, 0.85); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.empty-state h3 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* Results User Bar */
.user-summary-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.user-avatar {
  width: 54px;
  height: 54px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
}

.user-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name-wrapper h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.status-chip {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.user-rut-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-stats {
  display: flex;
  gap: 1.5rem;
  border-left: 1px solid var(--border-glass);
  padding-left: 1.5rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.text-warning { color: var(--amber); }
.text-danger { color: var(--rose); }
.text-emerald { color: var(--emerald); }

/* Controls & Filter Bar */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Custom Checkbox */
.checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-glass);
  border-radius: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--emerald);
  border-color: var(--emerald);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

/* Document Cards Grid */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 5rem;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.25 ease;
  position: relative;
  overflow: hidden;
}

.doc-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.doc-card.selected {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.doc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.doc-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-factura { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.badge-boleta { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }

.doc-status {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.status-expired { color: var(--rose); }
.status-pending { color: var(--amber); }
.status-paid { color: var(--emerald); }

.doc-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.doc-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.doc-dates {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.85rem;
}

.doc-amount {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Sticky Checkout Bar */
.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  padding: 1rem 0;
  z-index: 90;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.checkout-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkout-icon {
  width: 46px;
  height: 46px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkout-total {
  font-size: 1.1rem;
  color: white;
}

.checkout-total strong {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--emerald);
  margin-left: 0.3rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
}

.close-modal-btn:hover { color: white; background: rgba(255, 255, 255, 0.1); }

.modal-body {
  padding: 1.5rem;
}

.payment-breakdown h4, .payment-methods h4 {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 140px;
  overflow-y: auto;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breakdown-summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breakdown-row.sub-detail {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 0.25rem;
}

.breakdown-row.fee-row {
  color: #fbbf24;
}

.breakdown-row strong {
  color: var(--text-main);
}

.divider {
  border: 0;
  border-top: 1px dashed var(--border-glass);
  margin: 0.75rem 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  color: white;
  font-weight: 600;
}

.total-row strong {
  color: var(--emerald);
  font-size: 1.3rem;
  font-family: var(--font-heading);
}

/* Payment Methods Grid */
.payment-methods {
  margin: 1.5rem 0;
}

.methods-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.method-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.method-card input {
  position: absolute;
  opacity: 0;
}

.method-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.method-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.webpay-bg { background: linear-gradient(135deg, #e11d48, #be123c); }
.khipu-bg { background: linear-gradient(135deg, #0284c7, #0369a1); }
.mp-bg { background: linear-gradient(135deg, #009ee3, #007bbd); }

.method-info {
  display: flex;
  flex-direction: column;
}

.method-info strong {
  font-size: 0.95rem;
  color: white;
}

.method-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.method-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.68rem;
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.method-card.active, .method-card input:checked + .method-content {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.payment-details-form {
  margin-top: 1rem;
}

.payment-details-form .form-group {
  margin-bottom: 1.25rem;
}

.payment-details-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.payment-details-form input {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.95rem;
}

/* Spinner Overlay */
.processing-card {
  background: #111827;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner-ring {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(16, 185, 129, 0.15);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
  color: white;
}

.processing-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Success Voucher Modal */
.success-card {
  max-width: 560px;
}

.header-success {
  flex-direction: column;
  text-align: center;
  padding-top: 2rem;
  border-bottom: none;
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid var(--emerald);
  color: var(--emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.header-success h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: white;
}

.header-success p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Printable Voucher Box */
.voucher-box {
  background: white;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.voucher-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
}

.voucher-date {
  font-size: 0.75rem;
  color: #64748b;
}

.voucher-code-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-bottom: 1rem;
}

.voucher-label {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
}

.voucher-code {
  font-family: monospace;
  font-size: 1.2rem;
  color: #0f172a;
  letter-spacing: 0.05em;
}

.voucher-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.v-row {
  display: flex;
  justify-content: space-between;
  color: #475569;
}

.v-row strong {
  color: #0f172a;
}

.v-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 0.5rem 0;
}

.v-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.v-total strong {
  color: #059669;
  font-size: 1.3rem;
}

.voucher-qr {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.qr-text {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.voucher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding: 2rem 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

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

/* Responsive Media Queries */
@media (max-width: 768px) {
  .hero-header h1 { font-size: 1.8rem; }
  .user-summary-card { grid-template-columns: 1fr; gap: 1rem; }
  .user-stats { border-left: none; padding-left: 0; border-top: 1px solid var(--border-glass); padding-top: 1rem; justify-content: space-around; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .filter-tabs { overflow-x: auto; white-space: nowrap; }
  .checkout-container { flex-direction: column; gap: 1rem; text-align: center; }
  .checkout-summary { flex-direction: column; text-align: center; }
  .voucher-actions { grid-template-columns: 1fr; }
}

/* Print Styles for Voucher */
@media print {
  body * { visibility: hidden; }
  #successModal, #successModal * { visibility: visible; }
  #successModal { position: absolute; left: 0; top: 0; background: white; padding: 0; width: 100%; }
  .modal-card { box-shadow: none; border: none; max-width: 100%; }
  .header-success, .voucher-actions, .close-modal-btn { display: none !important; }
  .voucher-box { box-shadow: none; border: 1px solid #ccc; width: 100%; }
}
