:root {
  --bg-dark: #07090f;
  --bg-card: rgba(17, 22, 36, 0.78);
  --bg-input: rgba(10, 14, 24, 0.9);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #00f2fe;
  --accent-2: #4facfe;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Fondo Animado con Movimiento Continuo */
.animated-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, #0f1526 0%, #05070c 100%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: moveGrid 25s linear infinite;
}

@keyframes moveGrid {
  0% { transform: translateY(0); }
  100% { transform: translateY(42px); }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.45;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #00f2fe;
  top: -80px;
  left: -80px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: #ff0050;
  bottom: -100px;
  right: -60px;
  animation-delay: -5s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: #7928ca;
  top: 40%;
  left: 45%;
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(45px, -35px) scale(1.12); }
  100% { transform: translate(-35px, 40px) scale(0.95); }
}

/* Header y Logo */
header {
  background: rgba(9, 12, 20, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.brand-box:hover .brand-logo {
  transform: rotate(10deg) scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.6px;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-nav-orders {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
  padding: 0.42rem 0.9rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-nav-orders:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.badge-bo {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-auth {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-auth:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--accent);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
}

.user-pill button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-weight: bold;
}

/* Contenedor y Hero Animado */
.container {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 5% 4rem;
  flex: 1;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  text-align: left;
}

.hero-logo-float {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 35px rgba(0, 242, 254, 0.28);
  animation: logoHover 4s ease-in-out infinite;
}

@keyframes logoHover {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.hero-copy {
  max-width: 640px;
}

.pill-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, #00f2fe, #ff0050);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Tarjetas Glassmorphism y Selectores */
.order-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.8rem;
  align-items: start;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.card.theme-tiktok {
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 15px 45px rgba(0, 242, 254, 0.12);
}

.card.theme-instagram {
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 15px 45px rgba(225, 48, 108, 0.14);
}

.card.theme-facebook {
  border-color: rgba(24, 119, 242, 0.55);
  box-shadow: 0 15px 45px rgba(24, 119, 242, 0.15);
}

.step-label {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.network-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.network-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.85rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, color 0.2s;
}

.network-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.network-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
}

.net-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
}

.net-icon.tt { background: linear-gradient(135deg, #00f2fe, #ff0050); }
.net-icon.ig { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.net-icon.fb { background: #1877f2; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.help-text {
  display: block;
  color: var(--text-muted);
  font-size: 0.79rem;
  margin-top: 0.35rem;
}

.warning-box {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}

.price-summary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 242, 254, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.3rem 0;
  gap: 1rem;
}

.summary-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.summary-sub {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.total-amount {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
}

.total-amount small {
  font-size: 1rem;
  font-weight: 700;
}

.btn-pay-qr {
  width: 100%;
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  color: #050811;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-pay-qr:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 242, 254, 0.35);
}

.btn-pay-qr:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Historial Lateral */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.history-sub {
  color: var(--text-muted);
  font-size: 0.83rem;
  margin-bottom: 1rem;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 360px;
  overflow-y: auto;
}

.order-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 0.84rem;
}

.order-item-top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.order-link {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.25rem;
}

.btn-view-all-orders {
  display: block;
  text-align: center;
  margin-top: 1rem;
  padding: 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.2s;
}

.btn-view-all-orders:hover {
  background: rgba(0, 242, 254, 0.12);
}

/* Sección de Órdenes del Cliente (Rastreo) */
.client-orders-section {
  margin-top: 2.5rem;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.tracker-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.tracker-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-refresh-orders {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--accent);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-orders:hover {
  background: rgba(0, 242, 254, 0.22);
}

.search-order-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-order-form input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
}

.search-order-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-search-order {
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  color: #050811;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
}

.search-result-box {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.table-responsive {
  overflow-x: auto;
}

.client-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 680px;
}

.client-orders-table th,
.client-orders-table td {
  text-align: left;
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.client-orders-table th {
  color: var(--text-muted);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
}

.badge-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.st-completed {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.st-processing {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.st-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.st-canceled {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Modales */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.modal-content {
  background: #111624;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  position: relative;
}

.qr-modal {
  text-align: center;
}

.modal-mini-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.6rem;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.qr-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.14);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.qr-desc, .auth-desc {
  color: var(--text-muted);
  font-size: 0.87rem;
  margin: 0.4rem 0 1.1rem;
}

.qr-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.qr-api-tag {
  display: block;
  color: #090d16;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 0.3rem;
}

.qr-amount-box {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.qr-amount-box strong {
  color: var(--accent);
  font-size: 1.4rem;
}

.qr-status-text {
  color: #fbbf24;
  font-size: 0.83rem;
  margin-bottom: 1.1rem;
}

.btn-confirm-demo {
  background: transparent;
  border: 1px dashed var(--accent);
  color: var(--accent);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
}

footer {
  text-align: center;
  padding: 1.5rem 5%;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 820px) {
  .order-layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-visual { text-align: center; }
  .search-order-form { flex-direction: column; }
}