/* ============================================================================
   АгроМест — библиотека компонентов (единая для веб и мобильной версии)
   ============================================================================ */

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-sans); font-weight: var(--weight-semibold);
  font-size: var(--text-base); line-height: 1;
  min-height: var(--touch-min); padding: 0 var(--sp-5);
  border-radius: var(--r-md); border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-disabled {
  cursor: not-allowed; opacity: 0.5; pointer-events: none;
}
.btn .icon { width: 18px; height: 18px; }

/* Варианты */
.btn-primary {
  background: var(--brand) var(--grad-brand); color: var(--text-on-brand);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--brand-hover) linear-gradient(135deg, var(--green-500), var(--green-700)); box-shadow: 0 12px 24px -10px rgba(39, 174, 96, 0.70), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn-primary:active { background: var(--brand-active); box-shadow: none; }

.btn-secondary { background: var(--surface); color: var(--text-primary); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--gray-400); }
.btn-secondary:active { background: var(--gray-200); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); }
.btn-ghost:active { background: var(--gray-200); }

.btn-soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn-soft:hover { background: var(--green-100); }
.btn-soft:active { background: var(--green-200); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-danger:active { background: #991B1B; }

.btn-danger-soft { background: var(--danger-bg); color: var(--danger); }
.btn-danger-soft:hover { background: #FEE2E2; }

/* Размеры */
.btn-sm { min-height: 38px; padding: 0 var(--sp-4); font-size: var(--text-sm); border-radius: var(--r-md); }
.btn-lg { min-height: 52px; padding: 0 var(--sp-6); font-size: var(--text-lg); }
.btn-block { width: 100%; }

/* Иконка-кнопка */
.btn-icon {
  width: var(--touch-min); height: var(--touch-min); min-height: var(--touch-min);
  padding: 0; border-radius: var(--r-md); color: var(--text-secondary);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text-primary); transform: none; }
.btn-icon.btn-sm { width: 36px; height: 36px; min-height: 36px; }

/* Спиннер загрузки в кнопке */
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ПОЛЯ ВВОДА
   ============================================================ */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.field-hint { font-size: var(--text-xs); color: var(--text-tertiary); }
.field-error { font-size: var(--text-xs); color: var(--danger); display: flex; align-items: center; gap: 4px; }
.field-error .icon { width: 14px; height: 14px; }

.input {
  width: 100%; min-height: var(--touch-min);
  padding: 0 var(--sp-4);
  font-size: var(--text-base);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input::placeholder { color: var(--text-tertiary); }
.input { box-shadow: var(--shadow-xs); }
.input:hover { border-color: var(--gray-400); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus-ring); }
.input:disabled { background: var(--surface-2); color: var(--text-disabled); cursor: not-allowed; }
.input.is-error { border-color: var(--danger); }
.input.is-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }

textarea.input { padding-block: var(--sp-3); min-height: 110px; resize: vertical; line-height: var(--leading-base); }

/* Поле с префиксом/суффиксом (единица измерения) */
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: var(--sp-9); }
.input-group .input-affix {
  position: absolute; right: var(--sp-4); font-size: var(--text-sm);
  color: var(--text-tertiary); pointer-events: none; font-weight: var(--weight-medium);
}

/* Поле с иконкой слева */
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon-lead {
  position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); pointer-events: none;
}
.input-icon-wrap .input { padding-left: var(--sp-9); }

/* ============================================================
   SELECT / DROPDOWN (нативный, стилизованный)
   ============================================================ */
.select { position: relative; }
.select select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: var(--touch-min);
  padding: 0 var(--sp-10) 0 var(--sp-4);
  font-size: var(--text-base);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23807C73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right var(--sp-3) center;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  color: var(--text-primary); cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.select select:hover { border-color: var(--gray-400); }
.select select { box-shadow: var(--shadow-xs); }
.select select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus-ring); }
.select select:disabled { background-color: var(--surface-2); color: var(--text-disabled); cursor: not-allowed; }
.select select.is-error { border-color: var(--danger); }

/* ============================================================
   CHECKBOX / RADIO / SWITCH
   ============================================================ */
.check { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  width: 20px; height: 20px; flex: none; border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: #fff;
  transition: background var(--transition), border-color var(--transition);
}
.check-box .icon { width: 13px; height: 13px; opacity: 0; transform: scale(0.6); transition: opacity var(--transition), transform var(--transition); stroke-width: 3; }
.check:hover .check-box { border-color: var(--brand); }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box .icon { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px var(--focus-ring); }
.check input:disabled + .check-box { background: var(--surface-2); border-color: var(--border); }
.check-text { font-size: var(--text-base); color: var(--text-primary); }
.check-text-sm { font-size: var(--text-sm); }

.radio-box { border-radius: var(--r-full); }
.radio-box::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  opacity: 0; transform: scale(0.5); transition: opacity var(--transition), transform var(--transition);
}
.check input:checked + .radio-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .radio-box::after { opacity: 1; transform: scale(1); }

/* Switch / Toggle */
.switch { position: relative; display: inline-flex; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: absolute; inset: 0; border-radius: var(--r-full);
  background: var(--gray-300); transition: background var(--transition);
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track + .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--focus-ring); }
.switch input:disabled + .switch-track { opacity: 0.5; }

/* ============================================================
   ЧИПЫ / ТЕГИ
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 36px; padding: 0 var(--sp-4);
  border-radius: var(--r-full); font-size: var(--text-sm); font-weight: var(--weight-medium);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chip:hover { border-color: var(--green-300); color: var(--brand-strong); background: var(--brand-soft); }
.chip.is-active { background: var(--brand) var(--grad-brand); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }
.chip .icon { width: 16px; height: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px var(--sp-3); border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.4;
  background: var(--brand-soft); color: var(--brand-strong);
}
.tag-neutral { background: var(--surface-2); color: var(--text-secondary); }

/* ============================================================
   БЕЙДЖИ / СТАТУСЫ
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px var(--sp-2); border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.3;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-muted { background: var(--surface-2); color: var(--text-tertiary); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ============================================================
   АВАТАР
   ============================================================ */
.avatar {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green-100), var(--green-200)); color: var(--brand-strong);
  font-weight: var(--weight-semibold); font-size: var(--text-sm);
  overflow: hidden; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--green-100);
}
.avatar-lg { width: 72px; height: 72px; font-size: var(--text-xl); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   КАРТОЧКА ТОВАРА (список)
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow 260ms cubic-bezier(.2,.7,.3,1), border-color var(--transition), transform 260ms cubic-bezier(.2,.7,.3,1);
}
.card-link { display: block; border-radius: var(--r-lg); }
.card-link:hover .card, .card.is-hover:hover {
  box-shadow: var(--shadow-lg); border-color: var(--green-200); transform: translateY(-4px);
}

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: var(--grad-thumb);
  font-size: 44px;
}
.product-card .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.3,1);
}
.card-link:hover .product-card .thumb img { transform: scale(1.06); }
.product-card .thumb-tags { position: absolute; left: var(--sp-3); top: var(--sp-3); display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.product-card .thumb-tags .tag { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); box-shadow: var(--shadow-xs); }
.pdp-main img, .pdp-thumb img, .mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-thumb { width: 48px; height: 48px; flex: none; border-radius: var(--r-md); overflow: hidden; background: var(--green-50); display: grid; place-items: center; }
.product-card .body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5) var(--sp-5); flex: 1; }
.product-card .name { font-weight: var(--weight-semibold); font-size: var(--text-base); line-height: 1.3; }
.product-card .name:hover { color: var(--brand-strong); }
.product-card .price { font-weight: var(--weight-bold); font-size: var(--text-xl); color: var(--text-primary); letter-spacing: -0.02em; padding-top: var(--sp-1); }
.product-card .price span { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-tertiary); }
.product-card .wholesale { font-size: var(--text-sm); color: var(--text-secondary); }
.product-card .wholesale { display: inline-flex; width: fit-content; padding: 2px var(--sp-2); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.product-card .meta { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-tertiary); font-size: var(--text-sm); padding-top: var(--sp-3); margin-top: auto; border-top: 1px dashed var(--border); }
.product-card .meta .icon { width: 14px; height: 14px; }

/* ============================================================
   КАРТОЧКА ЗАЯВКИ
   ============================================================ */
.request-card { position: relative; display: flex; flex-direction: column; padding: var(--sp-5) var(--sp-6); gap: var(--sp-3); }
.request-card::before {
  content: ""; position: absolute; left: 0; top: var(--sp-5); bottom: var(--sp-5); width: 4px;
  border-radius: 0 4px 4px 0; background: var(--grad-brand); opacity: 0; transition: opacity var(--transition);
}
.card-link:hover .request-card::before { opacity: 1; }
.card-link:hover .request-card { transform: translateY(-2px); }
.request-card .title { transition: color var(--transition); }
.card-link:hover .request-card .title { color: var(--brand-strong); }
.request-card .title { font-weight: var(--weight-semibold); font-size: var(--text-lg); }
.request-card .spec { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); color: var(--text-secondary); font-size: var(--text-sm); }
.request-card .spec .item { display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--sp-3); border-radius: var(--r-full); background: var(--surface-warm); border: 1px solid var(--border); }
.request-card .spec .icon { width: 16px; height: 16px; color: var(--text-tertiary); }

/* ============================================================
   ТАБЫ
   ============================================================ */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); min-height: var(--touch-min);
  font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text-secondary);
  white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--transition), background var(--transition);
}
.tab:hover { color: var(--text-primary); background: var(--surface-2); }
.tab.is-active { color: var(--brand-strong); font-weight: var(--weight-semibold); }
.tab.is-active::after {
  content: ""; position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px 2px 0 0;
}
.tab .icon { width: 18px; height: 18px; }
.tab-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--surface-2); color: var(--text-secondary);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
}
.tab.is-active .tab-badge { background: var(--brand-soft); color: var(--brand-strong); }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + var(--sp-2)); right: 0; z-index: 40;
  min-width: 240px; padding: var(--sp-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-3); border-radius: var(--r-md);
  font-size: var(--text-base); color: var(--text-primary); text-align: left;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item .icon { color: var(--text-tertiary); }
.dropdown-item.is-danger { color: var(--danger); }
.dropdown-item.is-danger .icon { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--border); margin: var(--sp-2) 0; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(21, 21, 21, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
  opacity: 0; visibility: hidden; transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  transform: translateY(8px); transition: transform var(--transition);
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-5) 0; }
.modal-title { font-size: var(--text-xl); }
.modal-body { padding: var(--sp-4) var(--sp-5); }
.modal-foot { display: flex; gap: var(--sp-3); justify-content: flex-end; padding: 0 var(--sp-5) var(--sp-5); }
@media (max-width: 767px) {
  .modal { max-width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; margin-bottom: 0; align-self: flex-end; max-height: 92vh; }
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(2px);
  padding: 6px var(--sp-3); border-radius: var(--r-sm); background: var(--gray-800); color: #fff;
  font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition); z-index: 50;
}
.tooltip:hover::after, .tooltip:focus-visible::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ============================================================
   NOTIFICATION / TOAST
   ============================================================ */
.toast-stack {
  position: fixed; bottom: var(--sp-5); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--sp-2); z-index: 70; width: min(400px, calc(100% - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(.2,.7,.3,1);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.toast-icon { flex: none; width: 24px; height: 24px; border-radius: var(--r-full); display: grid; place-items: center; }
.toast-icon .icon { width: 15px; height: 15px; }
.toast-success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast-error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast-title { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.toast-text { font-size: var(--text-sm); color: var(--text-secondary); }
.toast-close { margin-left: auto; color: var(--text-tertiary); }

/* ============================================================
   СОСТОЯНИЯ: SKELETON / EMPTY / ERROR
   ============================================================ */
.skeleton { background: var(--gray-200); border-radius: var(--r-md); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.4s infinite; transform: translateX(-100%);
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-thumb { aspect-ratio: 4/3; }
.sk-line { height: 14px; }
.sk-line-sm { height: 12px; width: 60%; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-4);
}
.empty .empty-icon {
  width: 72px; height: 72px; border-radius: var(--r-full);
  background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 10px rgba(39, 174, 96, 0.06);
  display: grid; place-items: center;
}
.empty .empty-icon .icon { width: 30px; height: 30px; }
.empty .empty-icon { margin-bottom: var(--sp-2); }
.empty-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); font-family: var(--font-sans); }
.empty-text { color: var(--text-secondary); max-width: 360px; }

.error-state {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-4);
}

/* ============================================================
   SEARCH
   ============================================================ */
.search {
  position: relative; display: flex; align-items: center;
}
.search .icon-lead {
  position: absolute; left: var(--sp-4); color: var(--text-tertiary); pointer-events: none;
}
.search .input { padding-left: var(--sp-9); padding-right: var(--sp-9); }
.search .clear {
  position: absolute; right: var(--sp-2); width: 32px; height: 32px;
  display: grid; place-items: center; color: var(--text-tertiary); border-radius: var(--r-sm);
}
.search .clear:hover { background: var(--surface-2); color: var(--text-primary); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); font-size: var(--text-sm); color: var(--text-tertiary); }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs .sep { color: var(--text-tertiary); opacity: 0.7; }
.breadcrumbs .current { color: var(--text-secondary); }

/* ============================================================
   ТАБЛИЦА (десктоп)
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th {
  text-align: left; padding: var(--sp-3) var(--sp-4); font-weight: var(--weight-semibold);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-tertiary); background: var(--surface-warm); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--surface-warm); }
.table .cell-primary { font-weight: var(--weight-medium); color: var(--text-primary); }

/* ============================================================
   КОНТАКТ-КНОПКИ (каналы связи)
   ============================================================ */
.contact-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--touch-min); padding: 0 var(--sp-4);
  border-radius: var(--r-md); font-size: var(--text-sm); font-weight: var(--weight-semibold);
  border: 1px solid transparent; transition: filter var(--transition), box-shadow var(--transition), transform var(--transition);
}
.contact-btn:hover { transform: translateY(-1px); }
.contact-btn:active { transform: translateY(0); }
.contact-btn .icon { width: 18px; height: 18px; }
.contact-telegram { background: var(--telegram-bg); color: var(--telegram); }
.contact-telegram:hover { box-shadow: inset 0 0 0 1px var(--telegram); }
.contact-viber { background: var(--viber-bg); color: var(--viber); }
.contact-viber:hover { box-shadow: inset 0 0 0 1px var(--viber); }
.contact-whatsapp { background: var(--whatsapp-bg); color: #128C4A; }
.contact-whatsapp:hover { box-shadow: inset 0 0 0 1px var(--whatsapp); }
.contact-phone { background: var(--phone-bg); color: var(--phone); }
.contact-phone:hover { box-shadow: inset 0 0 0 1px var(--phone); }

/* ============================================================
   СТАТИСТИЧЕСКАЯ КАРТОЧКА
   ============================================================ */
.stat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.stat::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-100), transparent 70%); pointer-events: none;
}
.stat-value { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-family: var(--font-display); line-height: 1; letter-spacing: -0.03em; }
.stat-label { font-size: var(--text-sm); color: var(--text-secondary); }

/* ============================================================
   FORM LAYOUT
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 767px) { .form-grid { grid-template-columns: 1fr; } }

.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.card-panel + .card-panel { margin-top: var(--sp-5); }
.panel-title { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: var(--weight-semibold); }
.panel-sub { font-size: var(--text-sm); color: var(--text-secondary); }
