/* ==============================================================================
   Novela NXR — Next-Gen Crypto & Vouch System Stylesheet
   Ultra-Clean Dark Glassmorphic Design with Cybernetic Accents
   ============================================================================== */

:root {
  --bg: #07080c;
  --bg-card: rgba(18, 19, 28, 0.72);
  --bg-card-hover: rgba(26, 28, 42, 0.88);
  --text: #f7f5fa;
  --text-muted: #8e8899;
  --text-dim: #625c6e;
  
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-glow: rgba(178, 76, 208, 0.4);

  --primary: #a855f7;
  --primary-deep: #6b21a8;
  --primary-light: #d8b4fe;
  --accent-glow: rgba(168, 85, 247, 0.25);

  --verified: #2ecc71;
  --verified-glow: rgba(46, 204, 113, 0.35);
  --star: #f59e0b;
  --star-glow: rgba(245, 158, 11, 0.4);

  --crypto-ltc: #345995;
  --crypto-btc: #f7931a;
  --crypto-eth: #627eea;
  --crypto-sol: #14f195;
  --crypto-up: #10b981;
  --crypto-dn: #ef4444;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rail: 240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glows */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    radial-gradient(circle at 10% 20%, rgba(107, 33, 168, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(46, 204, 113, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 17, 26, 1) 0%, #06070a 100%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 80%);
  pointer-events: none;
}

/* Top Crypto Ticker Bar */
.crypto-ticker-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.ticker-left {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-weight: 500;
  white-space: nowrap;
}

.ticker-badge .coin-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.ticker-badge .pill-change {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.pill-change.up {
  background: rgba(16, 185, 129, 0.15);
  color: var(--crypto-up);
}

.pill-change.dn {
  background: rgba(239, 68, 68, 0.15);
  color: var(--crypto-dn);
}

.ticker-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--verified);
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 4px 12px;
  border-radius: 99px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verified);
  box-shadow: 0 0 10px var(--verified);
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Sidebar Rail */
.rail {
  position: fixed;
  left: 0;
  top: 41px;
  bottom: 0;
  width: var(--rail);
  background: rgba(8, 9, 14, 0.65);
  backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  padding: 4px 8px;
  margin-bottom: 28px;
}

.brand-badge {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.32);
}

.rail-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: all 0.25s var(--ease);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.4);
}

.btn-verified {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px var(--verified-glow);
}

.btn-verified:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(46, 204, 113, 0.5);
}

/* Main Content Area */
main.view {
  margin-left: var(--rail);
  padding: 36px 40px 100px;
  max-width: calc(var(--rail) + 1200px);
}

/* Glassmorphism Panel */
.panel {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s;
}

.panel:hover {
  border-color: var(--line-strong);
}

/* Cursor glow inside panels and cards */
.panel::before, .card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(350px circle at var(--mx, 50%) var(--my, -20%), rgba(168, 85, 247, 0.15), transparent 70%);
}

.panel:hover::before, .card:hover::before {
  opacity: 1;
}

/* Hero Section */
.hero-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  background: 
    radial-gradient(100% 120% at 95% 95%, rgba(107, 33, 168, 0.35) 0%, transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.hero-score-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-number {
  font-size: 96px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  background: linear-gradient(180deg, #ffffff 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stars {
  color: var(--star);
  font-size: 22px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px var(--star-glow);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 14px;
}

.hero-content h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 58ch;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.highlight-pill.verified {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
  color: var(--verified);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* Carousel Section */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 44px 0 20px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.carousel-viewport {
  overflow: hidden;
  margin: 0 -40px;
  padding: 10px 40px 24px;
  cursor: grab;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

/* Card Style */
.card {
  position: relative;
  flex: none;
  width: 360px;
  padding: 24px;
  border-radius: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.buyer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
}

.check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--verified);
  color: #032111;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.card-comment {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 6px;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 8px;
}

.product-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-light);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Vouch List / Explorer View */
.filter-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}

.search-input-box {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 46px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.25s;
}

.search-input-box:focus-within {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.search-input-box input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14.5px;
}

.filter-select {
  height: 46px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  outline: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:hover, .filter-select:focus {
  border-color: var(--primary);
}

.filter-select option {
  background: #141520;
  color: #fff;
}

.rating-chips {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rating-chip {
  padding: 6px 14px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.rating-chip.active, .rating-chip:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #fff;
}

/* Vouch Rows */
.vouches-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vouch-row-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s var(--ease);
}

.vouch-row-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.vouch-row-card.expanded {
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.vouch-row-header {
  display: grid;
  grid-template-columns: auto 1fr minmax(180px, 260px) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
}

.vouch-id-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--verified);
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
}

.vouch-main-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.vouch-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.vouch-comment-preview {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vouch-product-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--primary-light);
}

.vouch-expand-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.vouch-row-card.expanded .vouch-expand-btn {
  transform: rotate(180deg);
  color: var(--verified);
}

/* Accordion Order Invoice Drawer (Matching Image 3) */
.vouch-drawer {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid var(--line);
  background: rgba(14, 16, 24, 0.85);
}

.vouch-row-card.expanded .vouch-drawer {
  display: block;
  animation: slideDown 0.3s var(--ease);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.invoice-box {
  margin-top: 18px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-left: 4px solid var(--verified);
}

.invoice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.invoice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.invoice-date {
  font-size: 13px;
  color: var(--text-muted);
}

.invoice-product {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 16px;
  color: #e2e8f0;
}

.invoice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.invoice-stat small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.invoice-stat b {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
}

.invoice-subtext {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* Store Reply in Invoice */
.store-reply-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.08);
  border-left: 3px solid var(--primary);
  font-size: 13.5px;
}

.store-reply-box small {
  font-weight: 600;
  color: var(--primary-light);
  display: block;
  margin-bottom: 4px;
}

/* Real-Time Toast Notification */
.live-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: rgba(18, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(46, 204, 113, 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  transform: translateY(120%);
  transition: transform 0.4s var(--ease);
}

.live-toast.show {
  transform: translateY(0);
}

.toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(46, 204, 113, 0.15);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}

.toast-content h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}

.toast-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(540px, 94vw);
  background: #10121a;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: 0;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
}

/* Crypto Chart (Image 2 Inspired) */
.crypto-chart-container {
  background: #111218;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-range-badge {
  display: inline-flex;
  gap: 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.chart-range-badge span b {
  color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 860px) {
  :root {
    --rail: 0px;
  }
  .rail {
    display: none;
  }
  main.view {
    padding: 20px 16px 90px;
  }
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .vouch-row-header {
    grid-template-columns: auto 1fr auto;
    padding: 14px 16px;
  }
  .vouch-product-col {
    display: none;
  }
  .carousel-viewport {
    margin: 0 -16px;
    padding: 10px 16px 20px;
  }
}

