
/* Премиальные стили как в login.html */
:root {
  --bg: #0b1117;
  --bg-elev: #111923;
  --bg-elev-2: #0e151d;
  --text: #e6edf3;
  --muted: #9fb1c1;
  --brand: #f4b000;
  --accent: #23c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --card: #0f1822;
  --line: #1f2b3a;
  --chip: #1a2430;
}

/* Базовые стили */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Улучшение скролла на мобильных */
@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .sidebar {
    -webkit-overflow-scrolling: touch;
  }

  .main {
    overflow-x: hidden;
  }

  /* Улучшение читаемости текста */
  p {
    font-size: 14px;
    line-height: 1.6;
  }

  a {
    -webkit-tap-highlight-color: rgba(244, 176, 0, 0.2);
    touch-action: manipulation;
  }

  /* Улучшение отображения ссылок в карточках */
  .card a {
    word-break: break-all;
  }
}

/* Улучшенная анимация появления */
.app {
  display: flex;
  min-height: 100vh;
  animation: fadeIn 0.8s ease;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding: 24px;
}

.page {
  display: none;
  flex: 1;
}

.page.active {
  display: block;
}

h4 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 24, 34, 0.9);
  border: 1px solid var(--line);
}

.lang-pill {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
}

.lang-pill.active {
  background: linear-gradient(135deg, var(--brand), #ffd76a);
  color: #111827;
}

.lang-pill:not(.active):hover {
  background: rgba(148, 163, 184, 0.2);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .menu-btn {
    display: flex !important;
  }
}

.menu-btn .icon {
  width: 20px;
  height: 20px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Боковая панель - премиальный стиль */
.sidebar {
  background: linear-gradient(180deg, #0e151d 0%, #0a1016 100%);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
}

.brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(244, 176, 0, 0.2);
  box-shadow: 0 4px 12px rgba(244, 176, 0, 0.1);
  transition: transform 0.3s ease;
}

.brand:hover img {
  transform: rotate(5deg) scale(1.05);
}

.brand .t1 {
  font-weight: 800;
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--brand), #ffd76a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand .t2 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1;
  letter-spacing: 0.5px;
}

/* Улучшенная навигация */
.nav {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px;
}

.nav button,
.nav .nav-products-btn,
.nav .nav-logistics-btn,
.nav .nav-geography-btn {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  font-size: 1em;
  font-weight: 500;
}

.nav button::before,
.nav .nav-products-btn::before,
.nav .nav-logistics-btn::before,
.nav .nav-geography-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav button:hover,
.nav .nav-products-btn:hover,
.nav .nav-logistics-btn:hover,
.nav .nav-geography-btn:hover {
  background: rgba(244, 176, 0, 0.05);
  transform: translateX(5px);
}

.nav button:hover::before,
.nav .nav-products-btn:hover::before,
.nav .nav-logistics-btn:hover::before,
.nav .nav-geography-btn:hover::before {
  transform: translateX(0);
}

.nav button.active {
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.1), rgba(244, 176, 0, 0.05));
  border: 1px solid rgba(244, 176, 0, 0.2);
  color: #ffd76a;
}

.nav button.active::before {
  transform: translateX(0);
}

/* Nav links (for product/subpages — same look as buttons) */
.nav a.nav-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.nav a.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.nav a.nav-item:hover {
  background: rgba(244, 176, 0, 0.05);
  transform: translateX(5px);
  color: var(--text);
}
.nav a.nav-item:hover::before {
  transform: translateX(0);
}
.nav a.nav-item.current {
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.1), rgba(244, 176, 0, 0.05));
  border: 1px solid rgba(244, 176, 0, 0.2);
  color: #ffd76a;
}
.nav a.nav-item.current::before {
  transform: translateX(0);
}

/* Products dropdown in sidebar */
.nav-products-wrap {
  position: relative;
}
.nav-products-btn {
  justify-content: space-between;
}
.nav-products-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.2s ease;
}
.nav-products-wrap.open .nav-products-btn::after {
  transform: rotate(180deg);
}
.nav-dropdown {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 6px 0 6px 12px;
  display: none;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid rgba(244, 176, 0, 0.3);
  margin-left: 12px;
}
.nav-products-wrap.open .nav-dropdown {
  display: flex;
}

/* Logistics dropdown in sidebar */
.nav-logistics-wrap {
  position: relative;
}
.nav-logistics-btn {
  justify-content: space-between;
}
.nav-logistics-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.2s ease;
}
.nav-logistics-wrap.open .nav-logistics-btn::after {
  transform: rotate(180deg);
}
.nav-logistics-wrap.open .nav-dropdown {
  display: flex;
}

/* Geography dropdown in sidebar */
.nav-geography-wrap {
  position: relative;
}
.nav-geography-btn {
  justify-content: space-between;
}
.nav-geography-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.2s ease;
}
.nav-geography-wrap.open .nav-geography-btn::after {
  transform: rotate(180deg);
}
.nav-geography-wrap.open .nav-dropdown {
  display: flex;
}

.nav-dropdown a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-dropdown a:hover {
  color: var(--brand);
  background: rgba(244, 176, 0, 0.06);
}

/* Версия внизу */
.version {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  padding: 16px;
  border-top: 1px dashed var(--line);
  text-align: center;
  background: rgba(26, 36, 48, 0.3);
  border-radius: 12px 12px 0 0;
}

/* Верхняя панель - улучшенная */
.topbar {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(11, 17, 23, 0.9);
}

.topbar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.menu-btn {
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.1), rgba(244, 176, 0, 0.05));
  border: 1px solid rgba(244, 176, 0, 0.2);
  color: var(--brand);
  transition: all 0.3s ease;
}

.menu-btn:hover {
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(244, 176, 0, 0.2);
}

/* Поиск - улучшенный */
.search {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: linear-gradient(135deg, rgba(10, 18, 26, 0.8), rgba(15, 24, 34, 0.8));
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(244, 176, 0, 0.1);
  transform: translateY(-2px);
}

.search .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  transition: color 0.3s ease;
}

.search input:focus + .icon {
  color: var(--brand);
}

/* Кнопки - премиальные */
.btn {
  background: linear-gradient(135deg, #1a2430, #0f172a);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(244, 176, 0, 0.3);
}

.btn.primary {
  background: linear-gradient(135deg, #f4b000, #ffd76a);
  border: none;
  color: #0b1117;
  font-weight: 700;
}

.btn.primary:hover {
  box-shadow: 0 8px 20px rgba(244, 176, 0, 0.4);
  transform: translateY(-2px) scale(1.05);
}

.btn.brand {
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.2), rgba(244, 176, 0, 0.1));
  border: 1px solid rgba(244, 176, 0, 0.3);
  color: #ffd76a;
}

/* Карточки - улучшенные */
.card {
  background: linear-gradient(135deg, var(--card), #0b141d);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 176, 0, 0.3), transparent);
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(244, 176, 0, 0.4);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(244, 176, 0, 0.1) inset;
}

/* KPI карточки - особый стиль */
.kpi-card {
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.8), rgba(11, 20, 29, 0.8));
  border: 1px solid rgba(244, 176, 0, 0.2);
  backdrop-filter: blur(10px);
}

.kpi-card .kpi {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.kpi h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.kpi .val {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

/* Обёртка карточек на главной: на десктопе — сетка 3 колонки на всю ширину, на мобильных — колонка */
.dashboard-product-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
}
.dashboard-product-cards .product-card {
  grid-column: span 1 !important;
  min-width: 0;
  width: 100%;
}

/* Product cards (dashboard) */
.product-card {
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.8), rgba(11, 20, 29, 0.8));
  border: 2px solid var(--brand);
  box-shadow: 0 0 0 1px rgba(244, 176, 0, 0.15);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  border-color: #ffd76a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(244, 176, 0, 0.1);
}
.product-card-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
}
.product-card-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  flex: 1;
}
.product-card-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 2px solid var(--brand);
  overflow: hidden;
  background: var(--card);
}
.product-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.product-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}
.product-card-title:hover {
  color: var(--brand);
}
.product-card-cta {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-decoration: none;
}
.product-card-cta:hover {
  text-decoration: underline;
}

/* Dashboard hero image */
.dashboard-hero {
  margin-top: 8px;
}
.dashboard-hero-img-wrap {
  border-radius: 16px;
  border: 2px solid var(--brand);
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 0 0 1px rgba(244, 176, 0, 0.15);
}
.dashboard-hero-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* SEO H1 */
.seo-h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px 0;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* SEO intro text block */
.seo-intro {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.6), rgba(11, 20, 29, 0.6));
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}
.seo-intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.seo-intro strong {
  color: var(--text);
}
.seo-intro a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.seo-intro a:hover {
  text-decoration: underline;
}

/* Why ZERNOTRADE */
.why-zernotrade {
  margin-bottom: 24px;
}
.why-zernotrade-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  letter-spacing: 0.02em;
}
.why-zernotrade-list {
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  list-style: none;
  padding-left: 0;
}
.why-zernotrade-list li {
  margin-bottom: 0;
  padding-left: 24px;
  position: relative;
}
.why-zernotrade-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}
.why-zernotrade-list a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.why-zernotrade-list a:hover {
  text-decoration: underline;
}

/* Work with us */
.work-with-us {
  margin-top: 24px;
}
.work-with-us-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.work-with-us-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.benefit-card {
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.8), rgba(11, 20, 29, 0.8));
  border: 2px solid var(--brand);
  box-shadow: 0 0 0 1px rgba(244, 176, 0, 0.15);
  backdrop-filter: blur(10px);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.benefit-card:hover {
  border-color: #ffd76a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(244, 176, 0, 0.1);
}
.benefit-card h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 10px 0;
  letter-spacing: 0.03em;
}
.benefit-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Бейджи */
.badge {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: #cde3f9;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.badge.ok {
  /* Красный - подъем цены (положительное изменение) */
  color: #fecaca;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border-color: rgba(239, 68, 68, 0.3);
}

.badge.down {
  /* Зеленый - падение цены (отрицательное изменение) */
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(35, 197, 94, 0.2), rgba(35, 197, 94, 0.1));
  border-color: rgba(35, 197, 94, 0.3);
}

.badge.up {
  /* Красный - подъем цены (положительное изменение) */
  color: #fecaca;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border-color: rgba(239, 68, 68, 0.3);
}

.badge.zero {
  /* Желтый - без изменений (изменение = 0) */
  color: #fde68a;
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.2), rgba(244, 176, 0, 0.1));
  border-color: rgba(244, 176, 0, 0.3);
}

/* ВЕРТИКАЛЬНЫЕ БАРЫ для наличия зерна */
.stocks-card {
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.8), rgba(11, 20, 29, 0.8));
  border: 1px solid rgba(244, 176, 0, 0.2);
  backdrop-filter: blur(10px);
}

/* Карточки для вкладок - премиальный стиль */
.prices-card,
.duties-card,
.news-card {
  background: linear-gradient(135deg, rgba(15, 24, 34, 0.8), rgba(11, 20, 29, 0.8));
  border: 1px solid rgba(244, 176, 0, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
}

.prices-card::before,
.duties-card::before,
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(244, 176, 0, 0.5), transparent);
}

.prices-card h4,
.duties-card h4,
.news-card h4 {
  background: linear-gradient(135deg, var(--text), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(244, 176, 0, 0.1);
}

/* Улучшение для контента внутри карточек */
.news-card #news-list {
  margin-top: 8px;
}

.stocks-container {
  width: 100%;
  height: 320px;
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 40px;
  padding: 0 20px;
  position: relative;
  flex-wrap: wrap;
}

/* Бар с анимацией заполнения */
.stock-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  flex: 1;
  min-width: 80px;
  max-width: 100px;
}

.bar-container {
  width: 50px;
  height: 240px;
  background: linear-gradient(135deg, rgba(26, 36, 48, 0.5), rgba(15, 24, 34, 0.3));
  border: 1px solid rgba(244, 176, 0, 0.2);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, 
    #f4b000 0%,
    #ffc933 30%,
    #ffd76a 60%,
    #ffdf85 100%
  );
  border-radius: 8px 8px 0 0;
  transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 -2px 10px rgba(244, 176, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Показатель над баром */
.bar-value {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.2), rgba(244, 176, 0, 0.1));
  border: 1px solid rgba(244, 176, 0, 0.3);
  color: #ffd76a;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

/* Подпись под баром */
.bar-label {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 8px 0;
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.1), transparent);
  border-radius: 6px;
  width: 100%;
  line-height: 1.2;
}

/* Единица измерения справа от значения */
.bar-unit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-left: 1px;
}

/* Таблицы - улучшенные */
.table-wrap {
  border: 1px solid rgba(244, 176, 0, 0.15);
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: visible;
  background: linear-gradient(135deg, rgba(11, 20, 29, 0.6), rgba(15, 24, 34, 0.6));
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(244, 176, 0, 0.05);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 176, 0, 0.3) transparent;
  margin-top: 20px;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(244, 176, 0, 0.3);
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 176, 0, 0.5);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: linear-gradient(135deg, rgba(10, 18, 26, 0.9), rgba(7, 14, 21, 0.9));
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid rgba(244, 176, 0, 0.15);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 12px;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid rgba(244, 176, 0, 0.08);
  transition: all 0.3s ease;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.08), rgba(244, 176, 0, 0.03));
  transform: translateX(3px);
  box-shadow: -3px 0 0 rgba(244, 176, 0, 0.3);
}

.table tbody tr:hover td {
  color: var(--text);
}

/* Новости - улучшенные */
.news-item {
  background: linear-gradient(135deg, rgba(11, 20, 29, 0.6), rgba(15, 24, 34, 0.6));
  border: 1px solid rgba(244, 176, 0, 0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(244, 176, 0, 0.05);
  backdrop-filter: blur(5px);
}

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.news-item:hover {
  transform: translateX(8px) translateY(-4px);
  border-color: rgba(244, 176, 0, 0.4);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(244, 176, 0, 0.1) inset,
    inset 0 1px 0 rgba(244, 176, 0, 0.1);
}

.news-item:hover::before {
  transform: translateX(0);
}

.news-item .date {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* Форма контактов */
.formgrid label {
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.formgrid input,
.formgrid textarea {
  background: linear-gradient(135deg, rgba(10, 18, 26, 0.8), rgba(15, 24, 34, 0.8));
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.formgrid input[type="search"],
.search input {
  -webkit-appearance: none;
  appearance: none;
}

.formgrid input:focus,
.formgrid textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(244, 176, 0, 0.1);
  transform: translateY(-2px);
}

/* Toasts */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  background: linear-gradient(135deg, #0f172a, #0a121a);
  border: 1px solid var(--line);
  padding: 16px 24px;
  border-radius: 12px;
  display: none;
  z-index: 10001;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}
.toast.show {
  display: block !important;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mobile улучшения для баров */
@media (max-width: 1200px) {
  .stocks-container {
    gap: 30px;
  }
  
  .stock-bar {
    min-width: 70px;
  }
  
  .bar-container {
    width: 45px;
    height: 200px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 1000;
    border-right: 1px solid var(--line);
    border-bottom: none;
    overflow-y: auto;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar::before {
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
  }

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(4px);
  }

  .overlay.show {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-left {
    gap: 12px;
  }

  .search {
    max-width: none;
    flex: 1;
  }

  .search input {
    font-size: 14px;
    padding: 12px 14px 12px 40px;
  }

  .menu-btn {
    display: flex !important;
  }

  .kpi .val {
    font-size: 28px;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
  }

  #loginBtn,
  #logoutBtn {
    padding: 10px 14px;
    font-size: 13px;
  }

  #loginBtn .icon,
  #logoutBtn .icon {
    width: 16px;
    height: 16px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Барам на мобильных */
  .stocks-container {
    height: 280px;
    gap: 20px;
    padding: 0 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }

  .stock-bar {
    flex-shrink: 0;
  }

  /* Обёртка карточек продуктов — принудительно колонка при <900px (fix <760px) */
  .dashboard-product-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .dashboard-product-cards .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto;
  }

  /* Одна колонка на планшетах и телефонах */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .card[style*="grid-column"],
  .product-card,
  .kpi-card {
    grid-column: span 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Карточки продуктов — текст строго горизонтально, без поворота (iPhone) */
  #dashboard .product-card,
  .product-card {
    transform: none !important;
  }
  .product-card-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 72px;
    transform: none !important;
  }
  .product-card-text {
    writing-mode: horizontal-tb !important;
    -webkit-writing-mode: horizontal-tb !important;
    min-width: 120px;
    flex: 1 1 auto;
    transform: none !important;
  }
  .product-card-title,
  .product-card-cta {
    white-space: normal !important;
    text-align: left !important;
    display: block !important;
    transform: none !important;
  }
  .product-card-thumb {
    flex-shrink: 0 !important;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  .stock-bar {
    min-width: 60px;
  }
  
  .bar-container {
    width: 40px;
    height: 180px;
  }

  .bar-value {
    font-size: 12px;
    padding: 5px 10px;
    min-width: 55px;
    top: -30px;
  }

  .bar-label {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr !important;
  }

  .product-card {
    grid-column: span 1 !important;
    width: 100%;
  }
  .product-card-inner {
    flex-direction: row;
    align-items: center;
  }
  .product-card-text {
    writing-mode: horizontal-tb;
    flex: 1;
    min-width: 0;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-left {
    width: 100%;
    order: 1;
  }

  #loginBtn,
  #logoutBtn {
    order: 2;
    width: auto;
    margin-left: auto;
  }

  .brand {
    padding: 16px 12px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand .t1 {
    font-size: 16px;
  }

  .brand .t2 {
    font-size: 12px;
  }

  .nav {
    padding: 0 8px;
    margin-top: 16px;
  }

  .nav button,
  .nav .nav-products-btn,
  .nav .nav-logistics-btn,
  .nav .nav-geography-btn {
    padding: 12px 14px;
    font-size: 14px;
  }

  .version {
    padding: 12px;
    font-size: 11px;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .card[style*="grid-column"] {
    grid-column: span 1 !important;
  }

  .kpi-card,
  .product-card {
    grid-column: span 1 !important;
  }

  .work-with-us-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-card,
  .product-card {
    min-width: 0;
    width: 100%;
  }

  .kpi .val {
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kpi h3 {
    font-size: 12px;
  }

  .stocks-container {
    height: 280px;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  
  .stock-bar {
    flex-direction: column;
    width: auto;
    max-width: none;
    min-width: 50px;
    gap: 12px;
    flex-shrink: 0;
  }
  
  .bar-container {
    width: 45px;
    height: 180px;
    flex-shrink: 0;
  }
  
  .bar-value {
    top: -30px;
    font-size: 12px;
    padding: 4px 8px;
    min-width: 50px;
  }
  
  .bar-label {
    width: 100%;
    text-align: center;
    padding: 6px 0;
    font-size: 11px;
  }

  .table {
    min-width: 700px;
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 12px 10px;
  }

  .news-item {
    padding: 16px;
  }

  .formgrid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  h4 {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 10px 12px;
  }

  .search input {
    font-size: 13px;
    padding: 10px 12px 10px 36px;
  }

  .search .icon {
    left: 12px;
    width: 18px;
    height: 18px;
  }

  #loginBtn,
  #logoutBtn {
    padding: 8px 12px;
    font-size: 12px;
  }

  #loginBtn span,
  #logoutBtn span {
    display: none;
  }

  .sidebar {
    width: 260px;
    left: -260px;
  }

  .brand {
    padding: 14px 10px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand .t1 {
    font-size: 15px;
  }

  .nav button,
  .nav .nav-products-btn,
  .nav .nav-logistics-btn,
  .nav .nav-geography-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .card[style*="grid-column: span"] {
    grid-column: span 1 !important;
  }

  .kpi-card,
  .product-card {
    grid-column: span 1 !important;
  }

  .kpi-card,
  .product-card {
    min-width: 0;
    width: 100%;
  }

  .kpi .val {
    font-size: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kpi h3 {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .table {
    min-width: 600px;
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }

  h4 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .news-item {
    padding: 14px;
  }

  .news-item .date {
    font-size: 11px;
  }

  .formgrid {
    gap: 12px;
  }

  .formgrid label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .formgrid input,
  .formgrid textarea {
    padding: 10px;
    font-size: 13px;
  }

  .stocks-container {
    height: 260px;
    padding: 0 10px;
    gap: 10px;
  }
  
  .stock-bar {
    gap: 10px;
    min-width: 45px;
  }
  
  .bar-container {
    width: 40px;
    height: 160px;
  }

  .bar-value {
    font-size: 11px;
    padding: 4px 6px;
    min-width: 45px;
    top: -25px;
  }

  .bar-label {
    font-size: 11px;
    width: 100%;
    text-align: center;
  }

  .news-item {
    padding: 14px;
  }

  .news-item .date {
    font-size: 11px;
  }

  .formgrid {
    gap: 12px;
  }

  .formgrid label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .formgrid input,
  .formgrid textarea {
    padding: 10px;
    font-size: 13px;
  }

  .stocks-container {
    height: 260px;
    padding: 0 10px;
    gap: 10px;
  }
  
  .stock-bar {
    gap: 10px;
    min-width: 45px;
  }
  
  .bar-container {
    width: 40px;
    height: 160px;
  }

  .bar-value {
    font-size: 11px;
    padding: 4px 6px;
    min-width: 45px;
    top: -25px;
  }

  .bar-label {
    font-size: 11px;
    width: 100%;
    text-align: center;
  }

  .formgrid input,
  .formgrid textarea,
  .search input {
    font-size: 16px; /* Предотвращает зум на iOS */
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px;
  }

  .topbar-left {
    gap: 8px;
  }

  .search {
    min-width: 0;
  }

  .search input {
    font-size: 12px;
    padding: 8px 10px 8px 32px;
  }

  .search .icon {
    left: 10px;
    width: 16px;
    height: 16px;
  }

  .menu-btn {
    padding: 8px;
    width: 36px;
    height: 36px;
  }

  .menu-btn .icon {
    width: 18px;
    height: 18px;
  }

  #loginBtn,
  #logoutBtn {
    padding: 8px 10px;
    min-width: 36px;
  }

  .sidebar {
    width: 240px;
    left: -240px;
  }

  .brand {
    padding: 12px 8px;
    gap: 10px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand .t1 {
    font-size: 14px;
  }

  .brand .t2 {
    font-size: 11px;
  }

  .nav {
    margin-top: 12px;
    gap: 4px;
  }

  .nav button,
  .nav .nav-products-btn,
  .nav .nav-logistics-btn,
  .nav .nav-geography-btn {
    padding: 10px 12px;
    font-size: 12px;
    gap: 10px;
  }

  .version {
    padding: 10px 8px;
    font-size: 10px;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .card[style*="grid-column"] {
    grid-column: span 1 !important;
  }

  .kpi-card,
  .product-card {
    grid-column: span 1 !important;
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  .work-with-us-grid {
    grid-template-columns: 1fr;
  }

  .why-zernotrade-list {
    grid-template-columns: 1fr;
  }

  .kpi-card,
  .product-card {
    min-width: 0;
    width: 100%;
  }

  .kpi .val {
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kpi h3 {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .table {
    min-width: 550px;
    font-size: 11px;
  }

  .table th,
  .table td {
    padding: 8px 6px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  h4 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .news-item {
    padding: 12px;
  }

  .news-item .date {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .formgrid {
    gap: 12px;
  }

  .formgrid label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .formgrid input,
  .formgrid textarea {
    padding: 10px;
    font-size: 13px;
  }

  .stocks-container {
    height: 240px;
    padding: 0 8px;
    gap: 8px;
  }
  
  .stock-bar {
    gap: 8px;
    min-width: 40px;
  }
  
  .bar-container {
    width: 35px;
    height: 140px;
  }

  .bar-value {
    font-size: 10px;
    padding: 3px 6px;
    min-width: 40px;
    top: -22px;
  }
  
  .bar-label {
    font-size: 10px;
    width: 100%;
    text-align: center;
  }

  .bar-unit {
    font-size: 9px;
  }

  .toast {
    left: 10px;
    right: 10px;
    transform: translateX(0);
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Анимации для появления элементов */
.card, .kpi-card, .product-card, .news-item, .table-wrap, .stock-bar {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Задержки для анимации */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.stock-bar:nth-child(1) { animation-delay: 0.5s; }
.stock-bar:nth-child(2) { animation-delay: 0.6s; }
.stock-bar:nth-child(3) { animation-delay: 0.7s; }
.stock-bar:nth-child(4) { animation-delay: 0.8s; }
.stock-bar:nth-child(5) { animation-delay: 0.9s; }
.stock-bar:nth-child(6) { animation-delay: 1.0s; }

/* === Subpage styles (products, geography, logistics, about, certificates) === */
.product-hero {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--card), #0b141d);
}
.product-hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
}
.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.product-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(244, 176, 0, 0.2);
}
.product-page h1 {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.product-page .lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.product-page .benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.product-page .benefits-list li {
  padding: 12px 0 12px 36px;
  position: relative;
  border-bottom: 1px solid rgba(244, 176, 0, 0.08);
  color: var(--text);
}
.product-page .benefits-list li:last-child { border-bottom: none; }
.product-page .benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--brand), #ffd76a);
  border-radius: 6px;
}
.faq-item { margin-bottom: 16px; }
.faq-item summary {
  cursor: pointer;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(11, 20, 29, 0.6), rgba(15, 24, 34, 0.6));
  border: 1px solid rgba(244, 176, 0, 0.15);
  border-radius: 12px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ' +'; color: var(--brand); float: right; }
.faq-item[open] summary::after { content: ' −'; }
.faq-item p {
  margin: 12px 20px 16px 20px;
  color: var(--muted);
  line-height: 1.7;
}
.breadcrumb {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.trust-block {
  margin: 24px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(11, 20, 29, 0.6), rgba(15, 24, 34, 0.6));
  border: 1px solid rgba(244, 176, 0, 0.15);
  border-radius: 16px;
}
.trust-block p { margin: 8px 0 0 0; color: var(--text); }
.trust-block p:first-child { margin-top: 0; }
.trust-block p::before { content: '\2714 '; color: var(--accent); font-weight: 700; }
.mid-cta {
  margin: 24px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(244, 176, 0, 0.08), rgba(244, 176, 0, 0.03));
  border: 1px solid rgba(244, 176, 0, 0.25);
  border-radius: 16px;
  text-align: center;
}
.mid-cta a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.mid-cta a:hover { text-decoration: underline; }
.parcel-block {
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(244, 176, 0, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(244, 176, 0, 0.1);
  font-size: 14px;
  color: var(--text);
}
.parcel-block strong { color: var(--brand); }
.product-links { margin: 12px 0 0 0; color: var(--text); }
.product-links a { color: var(--brand); text-decoration: none; }
.product-links a:hover { text-decoration: underline; }

/* =============================================
   RTL (Right-to-Left) overrides for Arabic
   ============================================= */

/* Sidebar */
[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 1px solid var(--line);
}

/* Navigation buttons */
[dir="rtl"] .nav button,
[dir="rtl"] .nav .nav-products-btn,
[dir="rtl"] .nav .nav-logistics-btn,
[dir="rtl"] .nav .nav-geography-btn {
  text-align: right;
}

[dir="rtl"] .nav button::before,
[dir="rtl"] .nav .nav-products-btn::before,
[dir="rtl"] .nav .nav-logistics-btn::before,
[dir="rtl"] .nav .nav-geography-btn::before {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

[dir="rtl"] .nav button:hover,
[dir="rtl"] .nav .nav-products-btn:hover,
[dir="rtl"] .nav .nav-logistics-btn:hover,
[dir="rtl"] .nav .nav-geography-btn:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .nav button:hover::before,
[dir="rtl"] .nav .nav-products-btn:hover::before,
[dir="rtl"] .nav .nav-logistics-btn:hover::before,
[dir="rtl"] .nav .nav-geography-btn:hover::before {
  transform: translateX(0);
}

[dir="rtl"] .nav button.active::before {
  transform: translateX(0);
}

/* Nav links */
[dir="rtl"] .nav a.nav-item {
  text-align: right;
}

[dir="rtl"] .nav a.nav-item::before {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

[dir="rtl"] .nav a.nav-item:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .nav a.nav-item:hover::before {
  transform: translateX(0);
}

[dir="rtl"] .nav a.nav-item.current::before {
  transform: translateX(0);
}

/* Nav dropdown */
[dir="rtl"] .nav-dropdown {
  border-left: none;
  border-right: 2px solid rgba(244, 176, 0, 0.3);
  margin-left: 0;
  margin-right: 12px;
  padding-left: 0;
  padding-right: 12px;
}

/* Search icon */
[dir="rtl"] .search .icon {
  left: auto;
  right: 16px;
}

[dir="rtl"] .search input {
  padding: 14px 44px 14px 16px;
}

/* Bar unit */
[dir="rtl"] .bar-unit {
  margin-left: 0;
  margin-right: 1px;
}

/* Table */
[dir="rtl"] .table th {
  text-align: right;
}

[dir="rtl"] .table tbody tr:hover {
  transform: translateX(-3px);
  box-shadow: 3px 0 0 rgba(244, 176, 0, 0.3);
}

/* News items */
[dir="rtl"] .news-item::before {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

[dir="rtl"] .news-item:hover {
  transform: translateX(-8px) translateY(-4px);
}

[dir="rtl"] .news-item:hover::before {
  transform: translateX(0);
}

/* Why ZERNOTRADE list */
[dir="rtl"] .why-zernotrade-list {
  padding-right: 0;
}

[dir="rtl"] .why-zernotrade-list li {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .why-zernotrade-list li::before {
  left: auto;
  right: 0;
}

/* Product page benefits */
[dir="rtl"] .product-page .benefits-list li {
  padding-left: 0;
  padding-right: 36px;
}

[dir="rtl"] .product-page .benefits-list li::before {
  left: auto;
  right: 0;
}

/* FAQ */
[dir="rtl"] .faq-item summary::after {
  float: left;
}

[dir="rtl"] .faq-item p {
  margin: 12px 20px 16px 20px;
}

/* Feature items (login page) */
[dir="rtl"] .feature-item::before {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

[dir="rtl"] .feature-item:hover {
  transform: translateX(-5px);
}

[dir="rtl"] .feature-item:hover::before {
  transform: translateX(0);
}

/* Login sidebar */
[dir="rtl"] .login-sidebar {
  border-right: none;
  border-left: 1px solid var(--line);
}

/* Mobile overrides */
@media (max-width: 900px) {
  [dir="rtl"] .sidebar {
    left: auto;
    right: -280px;
    border-right: none;
    border-left: 1px solid var(--line);
    transition: right 0.3s ease;
  }

  [dir="rtl"] .sidebar.open {
    right: 0;
    left: auto;
  }

  [dir="rtl"] .main {
    margin-right: 0;
    margin-left: 0;
  }

  [dir="rtl"] .search input {
    padding: 12px 40px 12px 14px;
  }

  [dir="rtl"] .product-card-title,
  [dir="rtl"] .product-card-cta {
    text-align: right !important;
  }

  [dir="rtl"] #loginBtn,
  [dir="rtl"] #logoutBtn {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  [dir="rtl"] #loginBtn,
  [dir="rtl"] #logoutBtn {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  [dir="rtl"] .search .icon {
    left: auto;
    right: 12px;
  }

  [dir="rtl"] .search input {
    padding: 10px 36px 10px 12px;
  }

  [dir="rtl"] .sidebar {
    right: -260px;
    left: auto;
  }
}

@media (max-width: 480px) {
  [dir="rtl"] .search .icon {
    left: auto;
    right: 10px;
  }

  [dir="rtl"] .search input {
    padding: 8px 32px 8px 10px;
  }

  [dir="rtl"] .sidebar {
    right: -240px;
    left: auto;
  }

  [dir="rtl"] .toast {
    left: 10px;
    right: 10px;
    transform: translateX(0);
  }
}

/* Font family for Arabic */
[dir="rtl"] body {
  font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Noto Kufi Arabic', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
