@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0b;
  --bg2: #111113;
  --bg3: #18181b;
  --glass: rgba(10,10,11,0.85);
  --card: rgba(24,24,27,0.7);
  --accent: #8b5cf6;
  --accent-l: #a78bfa;
  --accent-d: #7c3aed;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c084fc 100%);
  --accent-grad-r: linear-gradient(135deg, #c084fc 0%, #a78bfa 50%, #8b5cf6 100%);
  --glow: rgba(139,92,246,0.4);
  --glow-strong: rgba(139,92,246,0.6);
  --text: #fafafa;
  --muted: #a1a1aa;
  --muted2: #71717a;
  --border: rgba(255,255,255,0.06);
  --border-h: rgba(139,92,246,0.5);
  --radius: 14px;
  --radius-lg: 20px;
  --topbar: 70px;
  --shadow: 0 25px 80px rgba(0,0,0,0.95);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-card-hover: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.15);
}

/* ============ RESET ============ */
*, ::after, ::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 15% -50px, rgba(139,92,246,0.12), transparent 70%),
    radial-gradient(ellipse 900px 500px at 85% 80%, rgba(124,58,237,0.1), transparent 70%),
    radial-gradient(ellipse 600px 400px at 50% 50%, rgba(167,139,250,0.05), transparent 60%),
    var(--bg) !important;
  background-size: 100% 100%;
  animation: bgShift 15s ease-in-out infinite alternate;
  padding-bottom: 100px;
}

@keyframes bgShift {
  0% {
    background-position: 0% 0%, 100% 100%, 50% 50%;
  }
  50% {
    background-position: 50% 50%, 50% 50%, 50% 50%;
  }
  100% {
    background-position: 100% 100%, 0% 0%, 50% 50%;
  }
}

a { color: inherit; text-decoration: none; }

/* ============ TOPBAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,11,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  width: 100%;
}
.topbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand a {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand a b {
  -webkit-text-fill-color: transparent;
}
.topbar-spacer {
  flex: 1;
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.87rem;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-grad);
  transition: width 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-l);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.user-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-l);
  font-weight: 500;
}
.user-counter i {
  font-size: 0.9rem;
}
.user-counter span {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

.user-counter-hero {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
.user-counter-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 30px;
  backdrop-filter: blur(10px);
}
.user-counter-content i {
  font-size: 1.8rem;
  color: var(--accent-l);
}
.user-counter-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.user-count {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-l);
  line-height: 1;
}
.user-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============ HERO ============ */
.hero {
  max-width: 1100px;
  margin: 40px auto 30px;
  padding: 0 28px;
  text-align: center;
}
.hero h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero h1 span {
  color: var(--accent-l);
}
.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 14px auto 0;
  line-height: 1.6;
}

/* ============ SEARCH & FILTERS ============ */
.search-filters {
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-bar {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15), 0 4px 20px rgba(0,0,0,0.3);
}
.search-bar i {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.search-bar:focus-within i {
  color: var(--accent-l);
}
.search-bar input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.search-bar input::placeholder {
  color: var(--muted2);
}
.search-bar .clear-search {
  background: none;
  border: none;
  color: var(--muted2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
}
.search-bar .clear-search:hover {
  color: var(--text);
}
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============ TAB RAIL ============ */
.tab-rail {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 28px 24px;
  max-width: 1100px;
  margin: 12px auto 0;
}
.tab-btn {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  backdrop-filter: blur(8px);
}
.tab-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(139,92,246,0.1);
  transform: translateY(-1px);
}
.tab-btn.active {
  background: var(--accent-grad);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139,92,246,0.3);
}

/* ============ PRODUCT GRID ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 0 28px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ============ PRODUCT CARD ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  backdrop-filter: blur(16px) saturate(120%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(139,92,246,0.1), transparent 50%, rgba(167,139,250,0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-h);
  box-shadow: var(--shadow-card-hover);
}
.card:hover::before {
  opacity: 1;
}
.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  min-height: 180px;
  max-height: 240px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,11,0.3), transparent 50%);
  pointer-events: none;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  background: #ffffff;
}
.card:hover .card-img img {
  transform: scale(1.05);
}
.card-body {
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 4px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
}
.card-brand {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.spec-plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(167,139,250,0.04));
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.76rem;
}
.spec-plate span:first-child {
  color: var(--muted);
  font-weight: 500;
}
.spec-plate .price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--accent-l);
  font-size: 0.8rem;
  text-shadow: 0 0 20px rgba(139,92,246,0.3);
}

/* ============ CARD ACTIONS ============ */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.action-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.batch-dropdown-wrap {
  flex: 1;
  min-width: 80px;
  max-width: 120px;
}
.batch-select {
  width: 100%;
  padding: 5px 8px;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s ease;
}
.batch-select option {
  background: var(--bg3);
  color: var(--text);
  padding: 8px;
}
.batch-select:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
}
.batch-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.batch-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-l);
  padding: 5px 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.icon-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-l);
  padding: 4px 8px;
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(167,139,250,0.05));
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 6px;
  white-space: nowrap;
}
.icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.icon-btn:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--accent);
  color: var(--accent-l);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.2);
}
.icon-btn.direct:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(167,139,250,0.1));
}
.icon-btn.copy:hover {
  background: rgba(139,92,246,0.15);
}
.icon-btn.qc:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--accent);
  color: var(--accent-l);
  box-shadow: 0 4px 12px rgba(139,92,246,0.2);
}
.btn-lg {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-lg.litbuy {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  box-shadow: 0 4px 16px rgba(251,191,36,0.35);
}
.btn-lg.litbuy:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 24px rgba(251,191,36,0.5);
  transform: translateY(-2px);
}

/* ============ CUSTOM TOOLTIPS ============ */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border-h);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 6px solid transparent;
  border-top-color: var(--border-h);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip]:hover::after {
  transform: translateX(-50%) translateY(0);
}
.action-buttons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.action-buttons .btn-sm {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(8px);
}
.action-buttons .btn-sm:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--accent);
  color: var(--accent-l);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.2);
}
.action-buttons .btn-sm.litbuy {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  border: none;
  box-shadow: 0 2px 8px rgba(251,191,36,0.3);
  font-weight: 700;
  padding: 8px 16px;
  font-size: 0.75rem;
}
.action-buttons .btn-sm.litbuy:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 16px rgba(251,191,36,0.4);
  transform: translateY(-1px);
}
.action-buttons .btn-sm.direct {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(167,139,250,0.05));
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--accent-l);
  padding: 6px 10px;
  font-size: 0.7rem;
}
.action-buttons .btn-sm.direct:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(167,139,250,0.1));
  border-color: var(--accent);
  color: var(--accent-l);
  box-shadow: 0 4px 12px rgba(139,92,246,0.25);
}
.action-buttons .btn-sm.direct i {
  font-size: 0.7rem;
}
.action-buttons .btn-sm.copy {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.7rem;
}
.action-buttons .btn-sm.copy:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--accent);
  color: var(--accent-l);
}
.action-buttons .btn-sm.copy i {
  font-size: 0.7rem;
}

/* ============ MODAL ============ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open {
  display: flex;
}
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.9);
  animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-box.wide { max-width: 900px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.modal-close:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
  transform: rotate(90deg);
}
.modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.modal-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 20px rgba(0,0,0,0.1);
  padding: 20px;
}
.modal-image img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.modal-image img:hover {
  transform: scale(1.02);
}
.modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.modal-brand {
  font-size: 0.85rem;
  color: var(--muted);
}
.modal-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-l);
}
.modal-batch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.modal-batch-row label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-batch-row select {
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
  flex: 1;
  transition: all 0.2s ease;
}
.modal-batch-row select:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
}
.modal-batch-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.modal-actions .btn-sm {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.modal-actions .btn-sm:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.modal-actions .btn-sm.litbuy {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  border: none;
  box-shadow: 0 4px 12px rgba(251,191,36,0.3);
  font-weight: 700;
  padding: 10px 18px;
  font-size: 0.9rem;
}
.modal-actions .btn-sm.litbuy:hover {
  box-shadow: 0 6px 20px rgba(251,191,36,0.5);
  transform: translateY(-1px);
  background: #f59e0b;
}
.modal-actions .btn-sm.direct {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(167,139,250,0.05));
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--accent-l);
}
.modal-actions .btn-sm.direct:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(167,139,250,0.1));
  border-color: var(--accent);
  color: var(--accent-l);
  box-shadow: 0 4px 12px rgba(139,92,246,0.25);
}
.modal-actions .btn-sm.copy {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}
.modal-actions .btn-sm.copy:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--accent);
  color: var(--accent-l);
  box-shadow: 0 4px 12px rgba(139,92,246,0.2);
}
.modal-description {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.9);
  animation: lightboxIn 0.25s ease;
}
@keyframes lightboxIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============ EMPTY STATE ============ */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ TOAST ============ */
#rmToast {
  font-family: 'DM Sans', sans-serif;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  text-align: center;
  color: var(--muted2);
  font-size: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ============ TOOLS PAGE ============ */
.tools-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.tools-wrap h1 {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  color: var(--accent-l);
  margin-bottom: 8px;
}
.tools-wrap .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, transform 0.2s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tool-card.full-width {
  grid-column: span 2;
}
.tool-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--accent-l);
  display: flex;
  align-items: center;
  gap: 10px;
}
.field {
  margin-bottom: 12px;
}
.field label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.field input, .field select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-l);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
}
.btn-sm:hover {
  background: var(--accent);
  color: #fff;
}
.btn-sm.primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-sm.primary:hover {
  opacity: 0.85;
}
.result {
  margin-top: 10px;
  font-weight: 600;
  color: var(--accent-l);
  font-size: 1rem;
}
.haul-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.haul-items-list {
  max-height: 160px;
  overflow-y: auto;
}
.haul-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: var(--bg2);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 0.8rem;
}
.haul-item-row .remove {
  color: #f87171;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.8rem;
}
.haul-invoice {
  background: var(--bg2);
  border-radius: 8px;
  padding: 14px;
}
.haul-invoice .row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.8rem;
}
.haul-invoice .total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-l);
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 4px;
}
.packaging-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.packaging-options label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
}
.packaging-options input[type="checkbox"] {
  accent-color: var(--accent);
}
.haul-add-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.haul-add-row input {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-width: 0;
  font-size: 0.8rem;
}
.haul-add-row input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Converter */
.converter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.converter-row select {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
}
.converter-row .arrow {
  color: var(--muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.converter-result {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg2);
  border-radius: 8px;
  word-break: break-all;
  font-size: 0.8rem;
  display: none;
}
.converter-result.show {
  display: block;
}
.converter-result .copy-btn {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.65rem;
}

/* Rates */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.rate-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.rate-card .country {
  font-weight: 700;
  font-size: 0.85rem;
}
.rate-card .price {
  color: var(--accent-l);
  font-weight: 600;
  font-size: 0.8rem;
}
.rate-card .detail {
  font-size: 0.6rem;
  color: var(--muted);
}

/* Tracker */
.tracker-carriers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.tracker-carriers span {
  font-size: 0.55rem;
  color: var(--muted);
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ============ SELLERS PAGE ============ */
.section-head h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}
.section-head i {
  color: var(--accent-l);
  background: rgba(168,85,247,0.12);
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.brand:hover {
  border-color: var(--accent);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 800px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card.full-width {
    grid-column: span 1;
  }
  .haul-layout {
    grid-template-columns: 1fr;
  }
  .modal-layout {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 16px;
    margin: 10px;
  }
  .modal-image img {
    max-height: 200px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 0 12px 40px;
  }
  .converter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .converter-row .arrow {
    text-align: center;
  }
  .card-img {
    min-height: 120px;
    max-height: 160px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 8px 30px;
  }
  .card-title {
    font-size: 0.75rem;
  }
  .card-brand {
    font-size: 0.65rem;
  }
  .spec-plate .price {
    font-size: 0.8rem;
  }
  .card-body {
    padding: 10px 10px 12px;
  }
  .action-buttons .btn-sm {
    font-size: 0.55rem;
    padding: 3px 6px;
  }
  .batch-select {
    font-size: 0.55rem;
    padding: 3px 4px;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 0.85rem;
  }
  .topbar {
    padding: 0 12px;
    height: 56px;
  }
  .brand a {
    font-size: 0.95rem;
  }
  .nav-links a {
    font-size: 0.7rem;
  }
}