:root {
  --bg-main: #000000;
  --accent-neon: #d7ff00;
  --accent-blue: #4255ff;
  --card-dark: #1c1c1e;
  --card-white: #ffffff;
  --text-dark: #000000;
  --text-light: #ffffff;
  --text-muted: #8e8e93;
  --radius-lg: 40px;
  --radius-md: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-light);
}

.phone-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;
}

.status-bar-spacer {
  flex: 1;
}

.user-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.card-main {
  background-color: var(--accent-neon);
  height: 210px;
  border-radius: var(--radius-md);
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.card-main .label {
  font-weight: 600;
  font-size: 14px;
}

.card-main .value {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
}

.card-main-footer {
  font-size: 13px;
  line-height: 1.4;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.grid-item {
  height: 130px;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  color: white;
  border: none;
  text-align: left;
  cursor: pointer;
}

.grid-item.dark {
  background-color: var(--card-dark);
}

.grid-item.blue {
  background-color: var(--accent-blue);
}

.grid-item .icon-top {
  position: absolute;
  top: 16px;
  left: 18px;
  opacity: 0.6;
  font-size: 18px;
}

.grid-item h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.grid-item span {
  font-size: 11px;
  opacity: 0.7;
}

.card-bottom {
  background-color: var(--card-white);
  border-radius: var(--radius-md);
  padding: 18px 18px 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-dark);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tab-button {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 8px 0;
  font-size: 13px;
  background: #f2f2f7;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-button.active {
  background: #000;
  color: #fff;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #e5e5ea;
  background: #f7f7fb;
  cursor: pointer;
}

.pill.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.sample-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Сетка карточек товаров — 2 в ряд */
.sample-list.sample-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sample-list.sample-grid .empty-state-full {
  grid-column: 1 / -1;
}

/* Карточка товара (как в макете: изображение сверху, контент снизу) */
.product-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-dark);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:active {
  transform: scale(0.98);
}

.product-card-image {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
}

.product-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.product-card-btn {
  margin-top: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.product-card-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.product-card-btn:active {
  background: rgba(255, 255, 255, 0.22);
}

.sample-card {
  border-radius: 14px;
  background: #f5f5f7;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.sample-article {
  font-size: 13px;
  font-weight: 600;
}

.sample-qty {
  font-size: 11px;
  color: var(--text-muted);
}

.sample-name {
  font-size: 12px;
}

.sample-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.sample-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-small {
  border-radius: 999px;
  border: none;
  background: #000;
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.cart-summary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e5ea;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #000;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.form-group label {
  font-size: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
  border-radius: 12px;
  border: 1px solid #e5e5ea;
  padding: 6px 10px;
  font-size: 13px;
}

.radio-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.radio-pill {
  border-radius: 999px;
  border: 1px solid #e5e5ea;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.radio-pill.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.info-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.empty-state {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.bottom-bar {
  display: none; /* username теперь подтягивается автоматически */
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.visible {
  opacity: 1;
}

/* Индикатор количества в корзине */
.cart-badge {
  position: absolute;
  top: 10px;
  right: 14px;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #000;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* Карточка в корзине с кнопкой удаления */
.sample-card-cart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sample-card-cart .btn-remove {
  align-self: flex-start;
  margin-top: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #8e8e93;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.sample-card-cart .btn-remove:hover {
  background: rgba(198, 40, 40, 0.12);
  color: #c62828;
}

.sample-card-cart .btn-remove svg {
  width: 18px;
  height: 18px;
}

/* Неброский, но видимый скролл */
.content {
  transition: opacity 0.2s ease;
}

.content,
.sample-list {
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.content::-webkit-scrollbar,
.sample-list::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.content::-webkit-scrollbar-track,
.sample-list::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb,
.sample-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}


