/* TABLE */
.tcard {
  background: var(--surface);
  border-radius: var(--r-l);
  border: 0.5px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,122,255,.42) rgba(242,242,247,.85);
}
.tcard::-webkit-scrollbar { height: 10px; }
.tcard::-webkit-scrollbar-track { background: rgba(242,242,247,.85); border-radius: 999px; }
.tcard::-webkit-scrollbar-thumb { background: rgba(0,122,255,.42); border-radius: 999px; border: 2px solid rgba(242,242,247,.85); }
.tcard::-webkit-scrollbar-thumb:hover { background: rgba(0,122,255,.62); }

/* Loading bar */
.tcard-loader { height: 2px; width: 100%; min-width: 720px; overflow: hidden; display: none; }
.tcard.is-loading .tcard-loader { display: block; }
.tcard-loader::after {
  content: ''; display: block; height: 100%; width: 45%;
  background: linear-gradient(90deg, transparent, var(--blue) 50%, transparent);
  animation: tblLoad 1.1s ease-in-out infinite;
}
@keyframes tblLoad { from { transform: translateX(-120%); } to { transform: translateX(310%); } }
.tcard.is-loading tbody { opacity: 0.45; pointer-events: none; transition: opacity .15s; }
table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
col.cn  { width: 108px; } col.crg { width: 126px; } col.cst { width: 82px; }
col.cdt { width: 64px;  } col.ctm { width: 72px; } col.cac { width: 288px; }
col.pn  { width: 110px; } col.pph { width: 160px; } col.prg { width: 150px; }
col.pst { width: 108px; } col.pdt { width: 120px; } col.ppr { width: 80px; } col.pcm { width: auto; }

thead th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); padding: 9px 10px; background: #FAFAFA; border-bottom: 0.5px solid var(--border); text-align: left; white-space: nowrap; overflow: hidden; vertical-align: middle; }
.th-inner { display: flex; align-items: center; gap: 3px; min-width: 0; white-space: normal; line-height: 1.25; }
.th-inner .th-lbl { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }

tbody tr { border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #F5F5F8; }
tbody tr.sold-row { opacity: .5; cursor: default; }
tbody tr.my-bid-row { background: #E7FBF0; box-shadow: inset 4px 0 0 var(--green); }
tbody tr.my-bid-row:hover { background: #DAF7E6; }
tbody tr.outbid-row { background: #FFF1F1; }
tbody tr.outbid-row:hover { background: #FFE6E6; }
td { padding: 10px 10px; font-size: 12px; color: var(--text); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard tbody td,
.tcard tbody td span,
.tcard tbody td button {
  font-size: 12px;
}
.td-name { font-weight: 500; }
.td-region { color: var(--text2); }
.td-status { overflow: hidden; }
.td-date, .td-timer { overflow: hidden; text-overflow: clip; font-variant-numeric: tabular-nums; }
.td-action { overflow: hidden; }
.timer-chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes timerPulse { 0%,100%{opacity:1} 50%{opacity:.45} }
.timer-urgent { animation: timerPulse 1.1s ease-in-out infinite; }

.phone-blur { display: inline-block; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; color: var(--text2); filter: blur(2px); user-select: none; cursor: not-allowed; white-space: nowrap; }
.stag { display: inline-flex; align-items: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.s-new  { background: var(--green-light); color: var(--green-dark); }
.s-sold { background: var(--blue-light);  color: #005CC5; }
.s-bad  { background: #F2F2F7;            color: var(--text2); }
.s-conf { background: var(--orange-light); color: var(--orange-dark); }
.status-stack { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.qrate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: #F7F8FA;
  color: var(--text2);
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.qrate svg {
  width: 12px;
  height: 12px;
  color: var(--star-color, #c7c7cc);
  fill: currentColor;
  flex-shrink: 0;
}
.qrate-empty { background: #F2F2F7; color: var(--text3); }

.act-row { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; overflow: hidden; }
.bid-chip { height: 28px; font-weight: 700; color: var(--orange-dark); background: var(--orange-light); border-radius: 999px; padding: 0 10px; white-space: nowrap; flex-shrink: 0; min-width: 54px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.btn-mini { min-width: 44px; height: 28px; border-radius: 999px; border: none; background: rgba(52,199,89,.88); color: #fff; font-weight: 700; font-family: var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; transition: background .14s, transform .12s; white-space: nowrap; flex-shrink: 0; letter-spacing: 0; }
.btn-mini:hover { background: var(--green); }
.btn-mini:active { transform: scale(.94); }
.btn-buy { width: 124px; min-width: 124px; max-width: 124px; height: 28px; margin-left: auto; font-weight: 700; padding: 0 10px; border-radius: 999px; border: none; background: var(--blue); color: #fff; cursor: pointer; font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 124px; transition: opacity .12s; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0; }
.btn-buy:hover { opacity: .85; }
.btn-mini:disabled,
.btn-buy:disabled,
.bid-go:disabled,
.buy-full:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.58);
  border-top-color: #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -6px 0 0 -6px;
  animation: kmSpin .7s linear infinite;
}
.action-loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
}
.action-loading::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0,122,255,.22);
  border-top-color: var(--blue);
  animation: kmSpin .7s linear infinite;
}
@keyframes kmSpin { to { transform: rotate(360deg); } }
.sold-chip { font-weight: 500; color: #005CC5; background: var(--blue-light); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.empty-row { text-align: center; padding: 52px 20px; color: var(--text3); font-size: 14px; }

.account-moderation-row { cursor: default; }
.account-moderation-row:hover { background: transparent; }
.account-moderation-row td { padding: 26px; white-space: normal; overflow: visible; }
.account-moderation-card {
  max-width: 680px;
  margin: 10px auto;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(0,122,255,.14);
  background:
    linear-gradient(135deg, rgba(0,122,255,.10), rgba(52,199,89,.08)),
    #fff;
  box-shadow: 0 18px 45px rgba(20,38,70,.10);
  text-align: center;
}
.account-moderation-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(0,122,255,.12);
}
.account-moderation-icon svg { width: 28px; height: 28px; }
.account-moderation-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.account-moderation-title {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.account-moderation-text {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 20px;
}
.account-moderation-timer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.06);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.account-moderation-timer strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.account-moderation-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  height: 42px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,122,255,.25);
}

/* GRID VIEW */
.leads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; }
.lead-card { min-width: 0; overflow: hidden; background: var(--surface); border-radius: var(--r-l); border: 0.5px solid var(--border); padding: 14px; cursor: pointer; transition: box-shadow .15s, transform .1s; }
.lead-card.my-bid-row { background: #E7FBF0; border-color: #5FD38B; box-shadow: inset 4px 0 0 var(--green); }
.lead-card.outbid-row { background: #FFF1F1; border-color: #FFCACA; }
.lead-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); transform: translateY(-1px); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; margin-bottom: 8px; }
.card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.card-region { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.card-divider { height: 0.5px; background: var(--border); margin-bottom: 10px; }
.card-footer { display: grid; grid-template-columns: auto auto minmax(76px, 1fr); align-items: center; gap: 7px; min-width: 0; }
.card-btns { display: flex; gap: 5px; min-width: 0; margin-left: 0; justify-content: flex-end; }
.lead-card .bid-chip { min-width: 0; }
.lead-card .btn-mini { min-width: 44px; padding: 0 10px; }
.lead-card .btn-buy { width: 100%; min-width: 0; max-width: none; flex: 1 1 auto; padding: 0 9px; }
.lead-card .action-loading,
.lead-card .sold-chip { justify-content: center; width: 100%; min-width: 0; }

/* PAGINATION */
.pager { align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 2px 0; flex-wrap: wrap; }
.pager-info { font-size: 12px; color: var(--text2); font-weight: 600; white-space: nowrap; }
.pager-controls { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pager-controls::-webkit-scrollbar { display: none; }
.pager-btn { min-width: 30px; height: 30px; border-radius: var(--r-s); border: 0.5px solid var(--border); background: var(--surface); color: var(--text2); font-size: 12px; font-weight: 700; font-family: var(--font); cursor: pointer; padding: 0 8px; flex-shrink: 0; }
.pager-btn:hover:not(:disabled):not(.active) { background: var(--bg); color: var(--text); }
.pager-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager-btn:disabled { opacity: .38; cursor: default; }
.pager-arrow { font-size: 17px; line-height: 1; }
.pager-gap { color: var(--text3); font-size: 12px; padding: 0 2px; flex-shrink: 0; }

@media (max-width: 760px) {
  table { min-width: 710px; }
  .tcard-loader { min-width: 710px; }
  thead th { padding: 8px 8px; }
  td { padding: 9px 8px; font-size: 12px; }
  col.cn  { width: 100px; } col.crg { width: 116px; } col.cst { width: 78px; }
  col.cdt { width: 58px;  } col.ctm { width: 68px; } col.cac { width: 278px; }
  .stag { padding: 4px 7px; }
  .bid-chip { min-width: 50px; padding: 0 9px; }
  .btn-mini { min-width: 42px; padding: 0 10px; }
  .btn-buy { width: 116px; min-width: 116px; max-width: 116px; flex-basis: 116px; padding: 0 8px; }
}

/* ── Избранное + конверсионная доводка ─────────────────────────────────────── */
.subtab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 0; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; font-variant-numeric: tabular-nums; flex-shrink: 0; transform: translateY(0); }

.td-name { white-space: nowrap; }
.td-name .name-txt { display: inline-block; vertical-align: middle; max-width: calc(100% - 36px); overflow: hidden; text-overflow: ellipsis; }
.fav-btn { vertical-align: middle; margin-right: 8px; width: 26px; height: 26px; padding: 0; border: none; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .12s; }
.fav-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--text3); stroke-width: 1.7; transition: fill .14s, stroke .14s, transform .12s; }
.fav-btn:hover { background: rgba(255,45,85,.10); }
.fav-btn:hover svg { stroke: #ff2d55; }
.fav-btn:active svg { transform: scale(.84); }
.fav-btn.on svg { fill: #ff2d55; stroke: #ff2d55; }

/* Конверсионная кнопка выкупа */
.btn-buy { background: linear-gradient(135deg,#0a84ff,#0a63e6); box-shadow: 0 2px 8px rgba(10,132,255,.28); transition: transform .12s, box-shadow .2s, opacity .12s; }
.btn-buy:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(10,132,255,.36); }
.btn-buy:active { transform: translateY(0); }

/* Строка с истекающим таймером — красный акцент слева */
tbody tr.urgent-row td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tbody tr.urgent-row:hover { background: #fff4f3; }

/* Карточки сетки: heart в шапке */
.card-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.card-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name .fav-btn { margin-right: 0; width: 24px; height: 24px; }
