/* ============================================================
   КАБИНЕТ: тёмная панель слева, светлая рабочая область.

   Цвета — те же, что на сайте (theme.css). Здесь только мягкость:
   крупнее скругления, тени вместо жёстких рамок, плавные переходы.
   Всё под .in-cabinet — лендинг и страницы входа не задеваются.
   ============================================================ */

.in-cabinet {
  --side-w: 264px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 16px;
  --card-border: rgba(27, 22, 19, 0.07);
  --card-shadow: 0 1px 2px rgba(27, 22, 19, 0.04), 0 6px 24px -8px rgba(27, 22, 19, 0.08);
  --card-shadow-hover: 0 2px 4px rgba(27, 22, 19, 0.05), 0 14px 34px -10px rgba(27, 22, 19, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --btn-shadow: 0 6px 16px -6px rgba(196, 22, 42, 0.55);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(201, 146, 44, 0.07), transparent 60%),
    radial-gradient(900px 420px at 30% -20%, rgba(196, 22, 42, 0.05), transparent 60%),
    var(--ground);
  background-attachment: fixed;
}

/* ---------- каркас ---------- */

.shell { display: flex; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.35rem 1rem 1rem;
  background: linear-gradient(180deg, #211a16 0%, #1b1613 55%, #171210 100%);
  color: var(--on-dark);
  overflow-y: auto;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04), 8px 0 30px -18px rgba(0, 0, 0, 0.5);
  --mark-ink: var(--on-dark);
}

.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 0.4rem; }
.side-brand, .cab-top-brand { display: flex; align-items: center; gap: 0.6rem; }
.side-brand .word, .cab-top-brand .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--on-dark);
}
.side-brand .word em, .cab-top-brand .word em { font-style: normal; color: var(--accent); }
.side-close { display: none; color: var(--on-dark-soft); cursor: pointer; padding: 0.3rem; border-radius: 8px; }

/* Карточка баланса */
.side-balance {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--r-md);
  background:
    radial-gradient(160px 90px at 100% 0%, rgba(201, 146, 44, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.side-balance .k {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.side-balance .v {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.side-balance .disc {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  font-size: 0.72rem;
  color: var(--gold);
  background: rgba(201, 146, 44, 0.12);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
}
.side-balance .btn { margin-top: 0.55rem; }

/* Меню */
.side-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.66rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-dark-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.side-nav a .ico { flex-shrink: 0; opacity: 0.85; transition: color 0.25s var(--ease), opacity 0.25s; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--on-dark); transform: translateX(2px); }
.side-nav a.on {
  background: linear-gradient(90deg, rgba(196, 22, 42, 0.24), rgba(196, 22, 42, 0.08));
  color: #fff;
}
.side-nav a.on .ico { color: #ff6b7a; opacity: 1; }
.side-nav a.on::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.side-sep {
  margin: 0.9rem 0.8rem 0.25rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 241, 236, 0.38);
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.9rem 0.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.side-foot .langsw { align-self: flex-start; border-color: rgba(246, 241, 236, 0.16); border-radius: 8px; }
.side-foot .langsw a { color: var(--on-dark-soft); }
.side-foot .langsw a + a { border-left-color: rgba(246, 241, 236, 0.16); }
.side-foot .langsw a.on { background: var(--accent); color: #fff; }
.side-foot .langsw a:not(.on):hover { background: rgba(255, 255, 255, 0.06); color: var(--on-dark); }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.side-user .mail {
  font-size: 0.8rem;
  color: var(--on-dark-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.side-user form { margin: 0; flex-shrink: 0; }
.side-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--on-dark-soft);
  transition: background 0.2s, color 0.2s;
}
.side-logout:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

/* Рабочая область */
.cab { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; min-height: 100vh; }

.cab-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 68px;
  padding: 0 2.25rem;
  background: rgba(251, 248, 245, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(27, 22, 19, 0.06);
}
.cab-burger, .cab-top-brand { display: none; }
.cab-burger { cursor: pointer; color: var(--ink); padding: 0.35rem; border-radius: 10px; }
.cab-crumb { font-size: 0.86rem; font-weight: 500; color: var(--ink-faint); }
.cab-actions { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.cab-bal { display: none; font-size: 0.86rem; color: var(--accent); }

.cab-main {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  padding: 0.5rem 2.25rem 3rem;
}
.cab-main > * { animation: cab-in 0.5s var(--ease) both; }
.cab-main > *:nth-child(2) { animation-delay: 0.04s; }
.cab-main > *:nth-child(3) { animation-delay: 0.08s; }
.cab-main > *:nth-child(4) { animation-delay: 0.12s; }
.cab-main > *:nth-child(n+5) { animation-delay: 0.16s; }
@keyframes cab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cab-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2.25rem 1.5rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ---------- общие компоненты кабинета, помягче ---------- */

.in-cabinet h1, .in-cabinet h2, .in-cabinet h3 {
  text-transform: none;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.in-cabinet .cab-main .wrap { max-width: none; padding: 0; margin: 0; }
.in-cabinet .page-head { padding: 1.75rem 0 1.5rem; gap: 0.6rem; }
.in-cabinet .page-head h1 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
.in-cabinet .pill { letter-spacing: 0.14em; font-weight: 600; }

.in-cabinet .btn {
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease),
              transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.in-cabinet .btn-primary { text-transform: none; }
.in-cabinet .btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(196, 22, 42, 0.6); }
.in-cabinet .btn-primary:active { transform: translateY(0); box-shadow: 0 3px 8px -4px rgba(196, 22, 42, 0.6); }
.in-cabinet .btn-ghost { background: #fff; border-color: var(--card-border); box-shadow: 0 1px 2px rgba(27, 22, 19, 0.05); }
.in-cabinet .btn-ghost:hover { background: #fff; border-color: rgba(27, 22, 19, 0.16); transform: translateY(-1px); }
.in-cabinet .btn-sm { min-height: 40px; padding: 0 1rem; }

.in-cabinet .card,
.in-cabinet .calc,
.in-cabinet .plate,
.in-cabinet .table-scroll {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
}
.in-cabinet .calc { background: linear-gradient(180deg, #fff 0%, #fff 60%, rgba(196, 22, 42, 0.035) 100%); }
.in-cabinet .card-head, .in-cabinet .calc-head, .in-cabinet .plate-head { border-bottom-color: rgba(27, 22, 19, 0.06); }
.in-cabinet .legend-t, .in-cabinet .plate-head .t { text-transform: none; font-size: 0.98rem; letter-spacing: -0.01em; }
.in-cabinet .cline, .in-cabinet .calc-foot { border-color: rgba(27, 22, 19, 0.06); }
.in-cabinet .total .k { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.in-cabinet .rail { top: 88px; }
.in-cabinet .card .plate { box-shadow: none; background: rgba(27, 22, 19, 0.018); border-color: rgba(27, 22, 19, 0.06); }

.in-cabinet .table-scroll { margin: 0.5rem 0 3rem; }
.in-cabinet .orders-table thead th {
  background: rgba(27, 22, 19, 0.02);
  letter-spacing: 0.08em;
  font-weight: 600;
  border-bottom-color: rgba(27, 22, 19, 0.06);
}
.in-cabinet .orders-table tbody tr { border-bottom-color: rgba(27, 22, 19, 0.05); transition: background 0.2s; }
.in-cabinet .orders-table tbody tr:hover { background: rgba(196, 22, 42, 0.025); }

.in-cabinet .status { padding: 0.22rem 0.65rem; font-weight: 600; font-size: 0.72rem; border: 0; }
.in-cabinet .status-done { background: rgba(31, 122, 61, 0.1); }
.in-cabinet .status-failed { background: rgba(180, 83, 9, 0.1); }
.in-cabinet .status-pending,
.in-cabinet .status-processing { background: rgba(196, 22, 42, 0.08); position: relative; padding-left: 1.35rem; }
.in-cabinet .status-pending::before,
.in-cabinet .status-processing::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: currentColor;
  animation: cab-pulse 1.6s ease-in-out infinite;
}
@keyframes cab-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.in-cabinet input[type="text"], .in-cabinet input[type="number"], .in-cabinet input[type="url"],
.in-cabinet input[type="email"], .in-cabinet input[type="password"], .in-cabinet textarea, .in-cabinet select {
  background: #fff;
  border-color: rgba(27, 22, 19, 0.12);
  border-radius: 10px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.in-cabinet input:hover, .in-cabinet textarea:hover, .in-cabinet select:hover { border-color: rgba(27, 22, 19, 0.22); }
.in-cabinet input:focus, .in-cabinet textarea:focus, .in-cabinet select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 22, 42, 0.09);
}

.in-cabinet .alert { border-radius: 12px; }
.in-cabinet .empty-state { background: rgba(255, 255, 255, 0.6); border-color: rgba(27, 22, 19, 0.12); border-radius: var(--r-lg); }
.in-cabinet .support-btn { box-shadow: 0 10px 26px -8px rgba(196, 22, 42, 0.55); }

/* ---------- «Обзор» ---------- */

.dash-head { padding: 1.75rem 0 1.4rem; }
.dash-head h1 { font-size: clamp(1.7rem, 2.8vw, 2.25rem); }
.dash-sub { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.95rem; }
.dim { color: var(--ink-faint); }

.dash-alert {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid rgba(196, 22, 42, 0.16);
  box-shadow: var(--card-shadow);
  color: var(--ink);
  font-size: 0.9rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.dash-alert > .ico { color: var(--accent); flex-shrink: 0; }
.dash-alert.warn { border-color: rgba(201, 146, 44, 0.35); background: linear-gradient(90deg, rgba(201, 146, 44, 0.1), #fff 60%); }
.dash-alert.warn > .ico { color: var(--gold-deep); }
a.dash-alert:hover { transform: translateY(-1px); box-shadow: var(--card-shadow-hover); color: var(--ink); }
.dash-alert .go { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent); font-weight: 600; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem 1.2rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.stat-k { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 500; color: var(--ink-faint); }
.stat-k .ico { color: var(--accent); opacity: 0.85; }
.stat-v {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-d { font-size: 0.78rem; color: var(--ink-faint); }
.stat.lead {
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(201, 146, 44, 0.22), transparent 70%),
    linear-gradient(145deg, #2a201b 0%, #1b1613 100%);
  border-color: transparent;
  color: var(--on-dark);
}
.stat.lead .stat-k { color: var(--on-dark-soft); }
.stat.lead .stat-k .ico { color: var(--gold); }
.stat.lead .stat-v { color: #fff; }
.stat.lead .stat-d { color: var(--on-dark-soft); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.panel {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
  padding: 1.15rem 0.6rem 0.6rem;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0.65rem 0.75rem; }
.panel-head h2 { font-size: 1.02rem; letter-spacing: -0.015em; }
.panel-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; font-weight: 600; }
.panel-link .ico { transition: transform 0.25s var(--ease); }
.panel-link:hover .ico { transform: translateX(3px); }
.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2.2rem 1rem 2.4rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.panel-empty > .ico { color: rgba(27, 22, 19, 0.25); }

.olist, .mlist { list-style: none; margin: 0; padding: 0; }
.olist li, .mlist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.65rem;
  border-radius: 12px;
  transition: background 0.2s var(--ease);
}
.olist li:hover, .mlist li:hover { background: rgba(27, 22, 19, 0.03); }
.olist-main { display: flex; align-items: center; gap: 0.85rem; flex: 1; min-width: 0; color: var(--ink); }
.olist-main:hover { color: var(--ink); }
.olist-id {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(196, 22, 42, 0.07);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}
.olist-txt, .mtxt { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.olist-txt .t, .mtxt .t { font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist-txt .d, .mtxt .d { font-size: 0.74rem; color: var(--ink-faint); }
.icon-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--ink-soft);
  border: 1px solid var(--card-border);
  background: #fff;
  transition: all 0.25s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: rgba(196, 22, 42, 0.3); transform: translateY(-1px); }

.mico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.mico.plus { background: rgba(31, 122, 61, 0.1); color: var(--success); }
.mico.plus .ico { transform: rotate(135deg); }
.mico.minus { background: rgba(27, 22, 19, 0.05); color: var(--ink-soft); }
.mico.minus .ico { transform: rotate(-45deg); }
.mtxt { flex: 1; }
.mamt { font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.mamt.plus { color: var(--success); }
.mamt.minus { color: var(--ink-soft); }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.qcard {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
  color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.qcard:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); border-color: rgba(196, 22, 42, 0.18); }
.qcard b { display: block; font-size: 0.9rem; font-weight: 600; }
.qcard .d { display: block; font-size: 0.76rem; color: var(--ink-faint); line-height: 1.4; margin-top: 0.1rem; }
.qico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(196, 22, 42, 0.08);
  color: var(--accent);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.qcard:hover .qico { background: var(--accent); color: #fff; }

/* ---------- узкие экраны ---------- */

@media (max-width: 1180px) {
  .stats, .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .side {
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    box-shadow: none;
  }
  .side-close { display: grid; }
  .side-toggle:checked ~ .shell .side { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.35); }
  .side-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(27, 22, 19, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .side-toggle:checked ~ .shell .side-scrim { opacity: 1; pointer-events: auto; }
  .cab { margin-left: 0; }
  .cab-top { padding: 0 1.1rem; height: 62px; }
  .cab-burger, .cab-top-brand { display: flex; }
  .cab-top-brand { --mark-ink: var(--ink); }
  .cab-top-brand .word { color: var(--ink); font-size: 0.95rem; }
  .cab-crumb { display: none; }
  .cab-main { padding: 0.25rem 1.1rem 2.5rem; }
  .cab-foot { padding: 1rem 1.1rem 5.5rem; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .in-cabinet .billing-grid, .in-cabinet .order-grid { grid-template-columns: minmax(0, 1fr); }
  .in-cabinet .rail { position: static; }
}

@media (max-width: 620px) {
  .cab-actions .btn span { display: none; }
  .cab-actions .btn { padding: 0 0.7rem; }
  .cab-actions .btn-ghost { display: none; }
  .cab-bal { display: inline; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.7rem; }
  .stat { padding: 0.95rem 1rem; }
  .stat-v { font-size: 1.45rem; }
  .stat.lead, .stats > .stat:last-child { grid-column: 1 / -1; }
  .dash-alert { flex-wrap: wrap; }
  .dash-alert > div { flex: 1 1 0; min-width: 0; }
  .dash-alert .go { flex-basis: 100%; margin-left: calc(20px + 0.85rem); }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .olist-id { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .cab-main > *, .in-cabinet .status::before { animation: none !important; }
  .side, .side-scrim, .stat, .qcard, .side-nav a { transition: none !important; }
}

/* ---------- панель владельца в кабинете ---------- */

.in-cabinet section.band { padding: 1.75rem 0 0.75rem; }
.in-cabinet .band-head { margin-bottom: 0.9rem; }
.in-cabinet .band-head h2 { font-size: 1.25rem; }
.in-cabinet .band-head h2 .hl { color: var(--ink); }
.in-cabinet .kpi {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.in-cabinet .kpi:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.in-cabinet .kpi .k { font-family: var(--sans); letter-spacing: 0.02em; text-transform: none; font-size: 0.78rem; }
.in-cabinet .kpi .v { font-weight: 700; }

/* ---------- баланс и счёт ---------- */

.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chip-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(27, 22, 19, 0.05);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.panel-pad { padding: 0 0.65rem 0.65rem; }
.form-alert {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(196, 22, 42, 0.07);
  color: var(--accent-deep);
  font-size: 0.88rem;
}
.form-alert .ico { flex-shrink: 0; }

.bill-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.25rem; align-items: start; }
.bill-grid .panel, .pay-grid .panel { padding-bottom: 1rem; }

/* форма пополнения: шаги */
.in-cabinet .topup-form { display: block; }
.tf-step { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.tf-step legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.tf-n {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(196, 22, 42, 0.09);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}
.tf-hint { margin: 0.75rem 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--ink-faint); }
.tf-hint .ico { vertical-align: -3px; margin-right: 0.3rem; color: var(--success); }

/* плитки способов: радиокнопка спрятана, рамку рисует соседний блок */
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.65rem; }
.method { position: relative; display: block; cursor: pointer; }
.method input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.method-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--card-border);
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.method:hover .method-card { border-color: rgba(27, 22, 19, 0.16); transform: translateY(-1px); }
.method input:checked + .method-card {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(196, 22, 42, 0.045), #fff 70%);
  box-shadow: 0 0 0 3px rgba(196, 22, 42, 0.1);
}
.method input:focus-visible + .method-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.method-card .net-ico { flex-shrink: 0; }
.method-txt { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.method-txt b { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.method-net { font-weight: 500; color: var(--ink-faint); font-size: 0.82rem; margin-left: 0.15rem; }
.method-txt .d { font-size: 0.74rem; line-height: 1.35; color: var(--ink-faint); }
.method-fee {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(31, 122, 61, 0.1);
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}
.method-fee.alt { background: rgba(15, 118, 110, 0.1); color: #0f766e; }

/* сумма: поле со знаком доллара и быстрые суммы */
.amount-row { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: stretch; }
.amount-field {
  position: relative;
  flex: 1 1 200px;
  display: flex;
  align-items: center;
}
.amount-field .cur {
  position: absolute;
  left: 1rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink-faint);
  pointer-events: none;
}
.in-cabinet .amount-field input {
  width: 100%;
  height: 54px;
  padding-left: 2.2rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.amount-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.amount-chip {
  min-width: 64px;
  height: 54px;
  padding: 0 0.9rem;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.amount-chip:hover { border-color: rgba(27, 22, 19, 0.18); color: var(--ink); transform: translateY(-1px); }
.amount-chip.on { border-color: var(--accent); color: var(--accent); background: rgba(196, 22, 42, 0.05); }
.in-cabinet .topup-go { min-height: 52px; font-size: 0.98rem; gap: 0.5rem; }
.topup-go .ico { transition: transform 0.25s var(--ease); }
.topup-go:hover .ico { transform: translateX(3px); }

/* «как это работает» */
.howto { list-style: none; margin: 0 0 1rem; padding: 0 0.65rem; display: flex; flex-direction: column; gap: 0.2rem; }
.howto li { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.55rem 0; position: relative; }
.howto li + li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: -0.55rem;
  height: 0.9rem;
  border-left: 1.5px dashed rgba(196, 22, 42, 0.25);
}
.howto-n {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(196, 22, 42, 0.08);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.howto b { display: block; font-size: 0.9rem; font-weight: 600; }
.howto span:not(.howto-n) { display: block; font-size: 0.78rem; color: var(--ink-faint); line-height: 1.45; margin-top: 0.1rem; }

.facts { margin: 0 0.65rem 1rem; padding: 0.35rem 0.9rem; border-radius: var(--r-md); background: rgba(27, 22, 19, 0.025); }
.fact { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0; font-size: 0.85rem; }
.fact + .fact { border-top: 1px solid rgba(27, 22, 19, 0.06); }
.fact span { color: var(--ink-faint); }
.fact b { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.ok-tick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(31, 122, 61, 0.12); color: var(--success); }
.how-panel .btn, .pay-side .btn { width: calc(100% - 1.3rem); margin: 0 0.65rem; }

.history-panel { margin-bottom: 2rem; }
.mlist-full .t a { color: var(--ink-faint); font-size: 0.82rem; }
.mlist-full .t a:hover { color: var(--accent); }
.mlist-full .t { white-space: normal; }

/* ---------- страница счёта ---------- */

.pay-head { padding-top: 1.25rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.7rem; font-size: 0.84rem; font-weight: 600; color: var(--ink-faint); }
.back-link .ico { transform: rotate(180deg); transition: transform 0.25s var(--ease); }
.back-link:hover { color: var(--accent); }
.back-link:hover .ico { transform: rotate(180deg) translateX(3px); }
.pay-title { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.pay-title .status { font-size: 0.78rem; }

.pay-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 2rem; align-items: start; }
.pay-main { padding: 1.35rem 1.25rem 1.35rem; }
.pay-side { position: sticky; top: 88px; }

/* итог: зачислено / просрочено */
.pay-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.7rem; padding: 1.75rem 1rem 1.5rem; }
.state-ico { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; }
.pay-state.ok .state-ico { background: rgba(31, 122, 61, 0.12); color: var(--success); box-shadow: 0 0 0 8px rgba(31, 122, 61, 0.05); }
.pay-state.off .state-ico { background: rgba(201, 146, 44, 0.14); color: var(--gold-deep); }
.pay-state.bad .state-ico { background: rgba(196, 22, 42, 0.1); color: var(--accent); }
.pay-state h2 { font-size: 1.6rem; }
.pay-state.ok h2 { color: var(--success); }
.pay-state p { max-width: 420px; color: var(--ink-soft); font-size: 0.92rem; }
.state-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-top: 0.4rem; }

/* оплата на странице PayCrypto */
.hosted-top { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.hosted-top .net-ico { flex-shrink: 0; }
.hosted-top h2 { font-size: 1.15rem; margin-bottom: 0.2rem; }
.hosted-top p { font-size: 0.86rem; color: var(--ink-soft); }
.in-cabinet .hosted-go { min-height: 54px; font-size: 1rem; gap: 0.5rem; margin-bottom: 1.25rem; }
.hosted-go .ico { transition: transform 0.25s var(--ease); }
.hosted-go:hover .ico { transform: translateX(3px); }
.howto-row { flex-direction: row; gap: 0.75rem; padding: 0; margin-bottom: 1rem; }
.howto-row li { flex: 1; flex-direction: column; gap: 0.55rem; padding: 0.9rem; border-radius: var(--r-md); background: rgba(27, 22, 19, 0.025); }
.howto-row li + li::before { display: none; }
.live-note { display: flex; align-items: center; gap: 0.55rem; font-size: 0.8rem; color: var(--ink-faint); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0;
  animation: live-ping 1.8s var(--ease) infinite;
}
@keyframes live-ping { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }

/* перевод на кошелёк */
.pstep + .pstep { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(27, 22, 19, 0.06); }
.pstep-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.pstep-head h2 { font-size: 1.02rem; }
.box-k { display: block; font-size: 0.75rem; font-weight: 500; color: var(--ink-faint); margin-bottom: 0.3rem; }
.copy-box { display: flex; align-items: center; gap: 0.8rem; }
.copy-box .copy { flex-shrink: 0; }
.copy-box .copy:disabled { opacity: 0.65; cursor: default; }
.exact-box {
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  background:
    radial-gradient(260px 110px at 100% 0%, rgba(201, 146, 44, 0.2), transparent 70%),
    linear-gradient(145deg, #2a201b 0%, #1b1613 100%);
  color: var(--on-dark);
}
.exact-box .box-k { color: var(--on-dark-soft); }
.exact-v { display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.exact-box .exact {
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  background: none;
  padding: 0;
}
.exact-cur { font-weight: 600; color: var(--gold); font-size: 0.95rem; }
.in-cabinet .exact-box .btn-ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.in-cabinet .exact-box .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

.callout { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.85rem 0 1.1rem; padding: 0.8rem 0.95rem; border-radius: 12px; font-size: 0.82rem; line-height: 1.5; }
.callout .ico { flex-shrink: 0; margin-top: 0.05rem; }
.callout.warn { background: rgba(201, 146, 44, 0.1); color: #6f5016; }
.callout.warn .ico { color: var(--gold-deep); }

.addr-block { display: flex; gap: 1.1rem; align-items: flex-start; }
.in-cabinet .addr-block .qr {
  flex-shrink: 0;
  width: 156px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  box-shadow: var(--card-shadow);
}
.addr-side { flex: 1; min-width: 0; }
.net-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
  border-radius: 999px;
  background: rgba(27, 22, 19, 0.05);
  font-size: 0.78rem;
  font-weight: 600;
}
.addr-side .addr-row {
  padding: 0.65rem 0.65rem 0.65rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(27, 22, 19, 0.02);
  flex-wrap: nowrap;
}
.addr-side .addr { font-size: 0.84rem; }
.in-cabinet .hash-form input { height: 48px; }
.in-cabinet .hash-form .btn { min-height: 48px; }

.ttl-box {
  margin: 0 0.65rem 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: rgba(196, 22, 42, 0.05);
}
.ttl-v { font-size: 1.6rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ttl-v.is-soon { color: var(--accent); }
.ttl-v.is-over { color: var(--ink-faint); }
.pay-side .tf-hint { margin: 0 0.65rem 0.9rem; }

@media (max-width: 980px) {
  .bill-grid, .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-side { position: static; }
}
@media (max-width: 620px) {
  .stats.stats-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stats.stats-3 .stat.lead { grid-column: 1 / -1; }
  .stats.stats-3 > .stat:last-child:not(.lead) { grid-column: auto; }
  .methods { grid-template-columns: minmax(0, 1fr); }
  .amount-chips { width: 100%; }
  .amount-chip { flex: 1; min-width: 0; height: 46px; }
  .howto-row { flex-direction: column; }
  .addr-block { flex-direction: column; align-items: center; }
  .addr-side { width: 100%; }
  .exact-box { flex-direction: column; align-items: flex-start; }
  .pay-main { padding: 1.1rem 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; }
}
