/* ============================================
   Payment Panel — Futuristic
   ============================================ */

:root {
  --bg-primary: #08080f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(18, 18, 40, 0.85);
  --border-color: rgba(99, 102, 241, 0.2);
  --border-glow: rgba(99, 102, 241, 0.5);
  --accent: #6366f1;
  --accent-alt: #a855f7;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #555570;
  --success: #22d3a0;
  --success-glow: rgba(34, 211, 160, 0.2);
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Scanline overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  z-index: 999;
}

/* Glowing orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.12);
  top: -100px;
  right: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(168, 85, 247, 0.10);
  bottom: -80px;
  left: -80px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

/* Container & Card */
.container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 40px rgba(99, 102, 241, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* Header */
.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.logo-icon {
  color: var(--accent);
  font-size: 20px;
  text-shadow: 0 0 10px var(--accent-glow);
}

.logo-accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 400;
}

/* Form Elements */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.required {
  color: var(--accent);
}

/* Text Inputs */
input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
  outline: none;
  font-family: var(--font-sans);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 15px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

input::placeholder {
  color: var(--text-muted);
  font-size: 13px;
}

/* Input with prefix */
.input-wrapper {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  pointer-events: none;
}

.input-wrapper input {
  padding-left: 28px;
}

/* Custom Select */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 10px;
  pointer-events: none;
}

/* Checkbox toggle */
.checkbox-group {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: normal;
  user-select: none;
}

.checkbox-track {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  position: relative;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.checkbox-track input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.25s ease;
}

.checkbox-track input:checked + .checkbox-thumb {
  left: 18px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.checkbox-track:has(input:checked) {
  background: rgba(99, 102, 241, 0.25);
}

/* Submit Button */
.btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-sans);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(99, 102, 241, 0.35),
    0 0 15px rgba(99, 102, 241, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-glow {
  background: linear-gradient(135deg, #10b981, #059669);
  margin-top: 16px;
  gap: 8px;
}

.btn-glow:hover {
  box-shadow:
    0 8px 30px rgba(16, 185, 129, 0.35),
    0 0 15px rgba(16, 185, 129, 0.15);
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result */
.result {
  margin-top: 24px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
  margin-bottom: 20px;
}

.result-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-glow);
  font-size: 11px;
}

.result-body {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.result-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.status-pending { color: var(--warning); }
.status-received { color: var(--success); }
.status-canceled { color: var(--danger); }
.status-timeout { color: var(--text-muted); }

/* Error */
.error {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-sep {
  color: var(--text-muted);
  opacity: 0.3;
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .glow-orb-1,
  .glow-orb-2 {
    width: 200px;
    height: 200px;
  }
}

/* Remove default number input spinner */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Select option styling to match dark theme */
select option {
  background: #1a1a2e;
  color: var(--text-primary);
}
