:root {
  --bg: #050504;
  --bg-elevated: #0f0c0a;
  --bg-card: rgba(18, 14, 10, 0.88);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(249, 115, 22, 0.35);
  --text: #faf6f1;
  --muted: #9a948a;
  --accent: #f97316;
  --accent-bright: #fb923c;
  --accent-2: #fdba74;
  --accent-dim: rgba(249, 115, 22, 0.14);
  --accent-glow: rgba(234, 88, 12, 0.14);
  --danger: #fb7185;
  --success: #4ade80;
  --warning: #fbbf24;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background-color: var(--bg);
  background-image: radial-gradient(
      ellipse 900px 480px at 0% -20%,
      rgba(234, 88, 12, 0.22),
      transparent 55%
    ),
    radial-gradient(
      ellipse 700px 400px at 100% 10%,
      rgba(249, 115, 22, 0.1),
      transparent 50%
    ),
    radial-gradient(circle at 50% 100%, rgba(8, 6, 4, 1), var(--bg));
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-bright);
  text-decoration: underline;
}

.shell {
  width: 100%;
  max-width: min(1140px, 100%);
  margin: 0 auto;
  padding: 1rem 1.25rem 3.5rem;
}

#main {
  min-width: 0;
  max-width: 100%;
}

/* ——— Top bar ——— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0.75rem;
  z-index: 50;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ea580c, #f97316);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.4);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.88rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.topbar-nav {
  justify-content: flex-end;
}
.topbar-staff-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

#cabinet-logout {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3 !important;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#cabinet-logout:hover {
  background: rgba(251, 113, 133, 0.14);
  text-decoration: none;
  color: #fff !important;
}

/* ——— Page chrome ——— */
.page-hero {
  padding: 2.25rem 0 1.5rem;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 0.65rem;
  line-height: 1.12;
  background: linear-gradient(120deg, #fff 0%, #c4b5fd 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero .lead {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1.5rem;
  font-size: 1.02rem;
}

.hero {
  text-align: center;
  padding: 2.75rem 0.5rem 2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  letter-spacing: -0.035em;
  margin: 0 0 0.85rem;
  line-height: 1.1;
  background: linear-gradient(115deg, #fafafa, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p.lead {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 1.85rem;
  font-size: 1.06rem;
}

.landing-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: var(--accent-glow);
  border: 1px solid rgba(253, 186, 116, 0.25);
  margin-bottom: 1.25rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 2.75rem;
}

.landing-card {
  position: relative;
  padding: 1.4rem 1.35rem 1.35rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s;
}
.landing-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #fdba74);
  opacity: 0.85;
}
.landing-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.landing-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 650;
}
.landing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.landing-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
  background: var(--accent-dim);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.2s;
  font-family: inherit;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 4px 22px rgba(249, 115, 22, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px rgba(249, 115, 22, 0.42);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.08);
}
.btn-danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ——— Auth layout ——— */
.auth-wrap {
  max-width: 440px;
  margin: 0 auto;
}
.auth-panel {
  padding: 2rem 1.75rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.auth-panel h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}
.auth-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-soft);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.panel-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 640px;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.38rem;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.68rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Выпадающие списки: единый тёмно-оранжевый вид (не системный синий). */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  color-scheme: dark;
  background-color: rgba(14, 11, 8, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23fb923c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25L7 8.75l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
  padding-right: 2.75rem;
  line-height: 1.35;
}
select::-ms-expand {
  display: none;
}
select:hover {
  border-color: rgba(249, 115, 22, 0.28);
  background-color: rgba(20, 16, 12, 0.95);
}
select:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 4px 20px rgba(234, 88, 12, 0.08);
}
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
select option,
select optgroup {
  background-color: #100d0a;
  color: #faf6f1;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
}
select option:checked {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.35), rgba(249, 115, 22, 0.2));
  color: #fff;
}
select option:hover,
select option:focus {
  background-color: rgba(249, 115, 22, 0.22);
  color: #fff;
}

/* Кастомный дропдаун (плавающая карточка + анимация) — логика в custom-select.js */
.custom-select {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  padding-right: 2.75rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(
    180deg,
    rgba(22, 18, 14, 0.98),
    rgba(12, 10, 8, 0.94)
  );
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}
.custom-select-trigger:hover:not(:disabled) {
  border-color: rgba(249, 115, 22, 0.38);
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.12) inset,
    0 6px 22px rgba(0, 0, 0, 0.35);
}
.custom-select[data-open="true"] .custom-select-trigger {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 8px 28px rgba(234, 88, 12, 0.12);
}
.custom-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Закрытое поле — одна строка; полный текст в списке и в title (см. custom-select.js) */
.custom-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.custom-select-chevron {
  flex-shrink: 0;
  align-self: center;
  width: 1.15rem;
  height: 1.15rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23fb923c' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25L7 8.75l3.5-3.5'/%3E%3C/svg%3E")
    center/contain no-repeat;
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.custom-select[data-open="true"] .custom-select-chevron {
  transform: rotate(180deg);
}
.custom-select-panel {
  position: fixed;
  z-index: 4500;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(
    185deg,
    rgba(20, 16, 13, 0.97),
    rgba(10, 8, 6, 0.98)
  );
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(249, 115, 22, 0.08) inset;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top center;
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.26s;
}
.custom-select-panel--open {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.34, 1.25, 0.64, 1),
    visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .custom-select-panel {
    transition-duration: 0.01ms !important;
  }
  .custom-select-chevron {
    transition-duration: 0.01ms !important;
  }
}
.custom-select-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.68rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: none;
  background: rgba(249, 115, 22, 0.12);
}
.custom-select-option[aria-selected="true"] {
  background: rgba(249, 115, 22, 0.16);
}
.custom-select-option-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
}
.custom-select-check {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--accent-bright);
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.custom-select-option[aria-selected="true"] .custom-select-check {
  opacity: 1;
  transform: scale(1);
}

.form-grid {
  display: grid;
  gap: 1rem;
}
.form-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

/* iOS / Telegram WebView: нормальный размер чекбокса */
input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: #f97316;
  vertical-align: middle;
}

.checkbox-row-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}

.checkbox-row-label span {
  flex: 1;
  min-width: 0;
  padding-top: 0.06rem;
}

.staff-debit-checkbox-row {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.pool-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
}

/* Форма списания кэшбека: одна колонка, чтобы чекбокс и подпись не ломали сетку в WebView */
#staff-cashback-debit .form-grid.two {
  grid-template-columns: minmax(0, 1fr);
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 11px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}
.flash-error {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}
.flash-ok {
  background: rgba(74, 222, 128, 0.09);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #bbf7d0;
}

/* Привязка почты в кабинете: ровные отступы между строками и плашкой */
.cab-bind-email-flow {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.cab-bind-flash-wrap:not(:empty) {
  margin-top: 0.35rem;
}

.cab-bind-flash-wrap:empty {
  display: none;
}

.cab-bind-flash-wrap .flash {
  margin-bottom: 0;
}

.cab-email-intro {
  margin: 0 0 1rem 0;
  color: var(--muted, #94a3b8);
  font-size: 0.92rem;
  line-height: 1.45;
}

.cab-email-bound {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cab-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.cab-email-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #94a3b8);
  width: 100%;
  flex-basis: 100%;
  margin: 0;
}

@media (min-width: 520px) {
  .cab-email-label {
    width: auto;
    flex-basis: auto;
    margin-right: 0.25rem;
  }
}

.cab-email-mono {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 0.95rem;
}

.cab-email-edit-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(253, 186, 116, 0.35);
  color: #fdba74;
}

.cab-email-edit-btn:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(253, 186, 116, 0.55);
}

.cab-icon-pencil {
  display: block;
}

.cab-email-change-panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(253, 186, 116, 0.22);
  background: linear-gradient(
    145deg,
    rgba(253, 186, 116, 0.06),
    rgba(15, 23, 42, 0.35)
  );
}

.cab-email-change-panel[hidden] {
  display: none !important;
}

.cab-email-step[hidden] {
  display: none !important;
}

.cab-email-step-lead {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted, #94a3b8);
}

.cab-email-step-spacer {
  min-height: 1px;
}

.cab-email-change-actions {
  justify-content: flex-end;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.banner {
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.5;
}
.banner strong {
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.98rem;
}
.banner-accent {
  border-color: rgba(253, 186, 116, 0.35);
  background: linear-gradient(
    135deg,
    rgba(253, 186, 116, 0.1),
    rgba(249, 115, 22, 0.06)
  );
}
.banner-info {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.08);
}
.banner-success {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.07);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.stat {
  padding: 1rem 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.stat:hover {
  border-color: rgba(249, 115, 22, 0.2);
}
.stat .v {
  font-size: 1.28rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat .k {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.perk-footnote {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 1rem;
  line-height: 1.5;
}
.perk-footnote.cashback-note {
  padding: 0.75rem 1rem;
  border-radius: 11px;
  background: rgba(249, 115, 22, 0.06);
  border: 1px dashed rgba(249, 115, 22, 0.25);
}
.perk-footnote.cashback-note b,
.perk-footnote.cashback-note strong {
  color: var(--accent-bright);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  border-radius: 12px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.65rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.data tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
table.data td.cell-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Действия (Чат, Взять и т.д.) — у правого края таблицы */
table.data th:last-child,
table.data td:last-child {
  text-align: right;
  vertical-align: middle;
}
table.data tbody td:last-child {
  white-space: nowrap;
  width: 1%;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-new {
  background: rgba(253, 186, 116, 0.15);
  color: var(--accent-2);
  border: 1px solid rgba(253, 186, 116, 0.3);
}
.badge-progress {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-bright);
  border: 1px solid rgba(249, 115, 22, 0.3);
}
.badge-wait {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.badge-done {
  background: rgba(74, 222, 128, 0.12);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.28);
}
.badge-canceled {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}
.badge-dispute {
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.mono {
  font-family: ui-monospace, "IBM Plex Mono", monospace;
  font-size: 0.9em;
}

.btn-sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.82rem;
}

.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 0.45rem;
  letter-spacing: -0.03em;
}
.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 720px;
  line-height: 1.5;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.ref-box {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  word-break: break-all;
  line-height: 1.45;
}

.cabinet-loading {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
}

.tabs-inline {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.28rem;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.5), rgba(234, 88, 12, 0.35));
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.2);
}

.chat-inline-panel {
  border: 1px solid var(--border-strong) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
/* Чат: один каркас — не дублируем фон/рамку .panel + .chat-dash */
.panel.chat-inline-panel.chat-panel-staff,
.panel.chat-inline-panel.chat-panel-client {
  padding: 0;
  background: transparent;
  border: none !important;
  box-shadow: none;
}
.chat-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.chat-log {
  max-height: 320px;
  overflow-y: auto;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, 0.35) transparent;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  font-size: 0.91rem;
  line-height: 1.48;
}
.chat-bubble.from-client {
  align-self: flex-start;
  background: rgba(253, 186, 116, 0.1);
  border: 1px solid rgba(253, 186, 116, 0.22);
}
.chat-bubble.from-staff {
  align-self: flex-end;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.28);
}

.chat-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.exchange-payment-hint {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07);
  color: var(--text);
  font-size: 0.88rem;
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.chat-att-link {
  display: inline-block;
  padding: 0.38rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.chat-att-thumb-wrap {
  display: block;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 200px;
}

.chat-att-thumb {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.staff-status-row {
  justify-content: flex-start;
}

/* ——— Large chat / overlay blocks (preserve structure from older theme) ——— */
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.chat-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.chat-overlay.open .chat-overlay-backdrop {
  opacity: 1;
}

.chat-overlay-sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: min(92vh, 900px);
  height: auto;
  min-height: 0;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow: hidden;
}

.chat-overlay.open .chat-overlay-sheet {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.chat-overlay-sheet.staff-chat-wide {
  width: min(100%, 680px);
}

.chat-overlay-sheet--deck {
  width: min(100%, 520px);
  max-height: min(96vh, 940px);
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.chat-overlay.open .chat-overlay-sheet--deck {
  box-shadow: none;
}

.chat-overlay-sheet--deck.staff-chat-wide {
  width: min(100%, 580px);
}

.chat-edge-tap {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(100px, 16vw);
  z-index: 10015;
  cursor: pointer;
  background: transparent;
}

.chat-edge-tap--left {
  left: 0;
}

.chat-edge-tap--right {
  right: 0;
}

.chat-edge-tap:hover {
  background: linear-gradient(
    90deg,
    rgba(249, 115, 22, 0.08),
    transparent
  );
}

.chat-edge-tap--right:hover {
  background: linear-gradient(
    270deg,
    rgba(249, 115, 22, 0.08),
    transparent
  );
}

.request-picker-pop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10040;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, 6vh) 12px 12px;
  box-sizing: border-box;
  pointer-events: none;
}

.request-picker-pop.open {
  display: flex;
  pointer-events: auto;
}

.request-picker-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.request-picker-panel {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(175deg, #1e2433 0%, #12151c 100%);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
}

.request-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.request-picker-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.request-picker-sub {
  margin: 0;
  padding: 0.5rem 1rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.request-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.request-picker-empty {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.request-picker-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "id name"
    "id sum"
    "status status";
  gap: 0.15rem 0.65rem;
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.request-picker-item:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.06);
}

.request-picker-item.is-active {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.request-picker-item-id {
  grid-area: id;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.request-picker-item-name {
  grid-area: name;
  font-weight: 600;
  font-size: 0.92rem;
}

.request-picker-item-sum {
  grid-area: sum;
  font-size: 0.85rem;
  color: var(--accent-2);
}

.request-picker-item-status {
  grid-area: status;
  font-size: 0.78rem;
  color: var(--muted);
}

.chat-deck-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-card-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.45);
}

.chat-deck-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.chat-overlay-body--deck {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.chat-deck-surface {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: min(76vh, 800px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.75rem 0.35rem 0.65rem;
  overflow: visible;
}

.chat-deck-glow {
  position: absolute;
  width: min(96%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(249, 115, 22, 0.12) 0%,
    transparent 70%
  );
  z-index: 0;
  pointer-events: none;
}

.chat-deck-back.chat-stack-modal {
  position: absolute;
  left: 50%;
  top: 0.35rem;
  z-index: 2;
  width: min(calc(100% - 6px), 520px);
  min-height: min(70vh, 760px);
  max-height: min(72vh, 780px);
  padding: 0;
  border-radius: 22px;
  background: #0a0c10;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.42), 0 26px 52px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0.62;
  filter: saturate(0.62) brightness(0.5);
  transform-origin: center center;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

.chat-deck-back.chat-stack-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    200deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.62) 65%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.chat-deck-back--left.chat-stack-modal {
  transform: translateX(calc(-50% - 40px)) rotate(-8.5deg) scale(0.9);
  z-index: 2;
}

.chat-deck-back--right.chat-stack-modal {
  transform: translateX(calc(-50% + 40px)) rotate(8.5deg) scale(0.9);
  z-index: 2;
}

.chat-stack-modal-inner {
  position: relative;
  z-index: 4;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-stack-fake-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.48rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.chat-stack-fake-chip {
  width: 3.1rem;
  height: 1.52rem;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.2);
}

.chat-stack-fake-mid {
  flex: 1;
  max-width: 3.2rem;
  height: 0.62rem;
  margin: 0 auto;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.11);
}

.chat-stack-fake-x {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-stack-fake-hero {
  padding: 0.65rem 0.85rem 0.55rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.chat-stack-fake-avatar {
  width: 2.85rem;
  height: 2.85rem;
  margin: 0 auto 0.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  border: 2px solid rgba(255, 255, 255, 0.14);
}

.chat-stack-fake-strip {
  height: 1.35rem;
  margin: 0.45rem 0.65rem 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.chat-stack-fake-chat {
  flex: 1;
  min-height: 4.5rem;
  margin: 0.45rem 0.6rem 0.35rem;
  padding: 0.45rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.chat-stack-skel-line {
  height: 0.42rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: 72%;
}

.chat-stack-skel-line.med {
  width: 52%;
}

.chat-stack-skel-line.long {
  width: 100%;
}

.chat-stack-skel-line.thin {
  height: 0.34rem;
  opacity: 0.85;
}

.chat-stack-skel-bubble {
  align-self: flex-end;
  width: 58%;
  height: 2rem;
  margin-top: 0.15rem;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.chat-stack-fake-form {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.chat-stack-skel-send {
  height: 2.35rem;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.18);
  margin-top: 0.15rem;
}

.chat-deck-back-cap {
  font-size: 0.7rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
  display: block;
  max-width: 12rem;
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}

.chat-deck-surface--solo .chat-deck-back-cap {
  opacity: 0;
}

.chat-deck-surface--solo .chat-deck-back.chat-stack-modal {
  opacity: 0.38;
  filter: saturate(0.45) brightness(0.42);
}

@media (max-width: 480px) {
  .chat-deck-back--left.chat-stack-modal {
    transform: translateX(calc(-50% - 22px)) rotate(-7deg) scale(0.87);
  }

  .chat-deck-back--right.chat-stack-modal {
    transform: translateX(calc(-50% + 22px)) rotate(7deg) scale(0.87);
  }

  .chat-deck-back.chat-stack-modal {
    width: min(calc(100% - 4px), 100%);
    min-height: min(66vh, 680px);
  }
}

.chat-deck-front-stage {
  position: relative;
  z-index: 10;
  width: min(100%, 540px);
  align-self: center;
  flex: 1;
  min-height: min(74vh, 820px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.chat-deck-front-stage > .chat-swipe-card {
  margin: 0 !important;
  width: 100%;
  flex: 1;
  min-height: min(72vh, 780px);
}

.chat-tinder-card {
  background: #0a0c10 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 32px 64px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset !important;
  margin: 0 !important;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-card-hero {
  flex-shrink: 0;
  padding: 1rem 1rem 0.65rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-card-avatar {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.chat-card-hero-line {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.chat-card-hero-sub {
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-top: 0.2rem;
}

.chat-card-hint {
  margin: 0.5rem 0.75rem 0 !important;
}

.chat-card-status {
  margin: 0.5rem 0.75rem !important;
}

.chat-status-label {
  color: var(--muted);
  font-size: 0.78rem;
  width: 100%;
  flex-basis: 100%;
}

.chat-tinder-log {
  margin: 0 !important;
  padding: 0.55rem 0.75rem 0.75rem !important;
  background: rgba(0, 0, 0, 0.35);
  flex: 1;
  min-height: 180px;
}

.chat-composer-tight label {
  font-size: 0.82rem;
}

.staff-footer-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.staff-footer-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.staff-footer-grid {
  align-items: end;
}

.staff-close-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(249, 115, 22, 0.05)
  );
}

.chat-overlay-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  user-select: none;
}

.chat-overlay-nav-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  place-items: center;
}

.chat-overlay-nav-btn:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.35);
}

.chat-overlay-header-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chat-overlay-picker {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}

.chat-overlay-title {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.chat-overlay-close.chat-overlay-close {
  flex-shrink: 0;
  margin-left: 0.15rem;
}

.chat-overlay-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-log-full {
  flex: 1;
  max-height: none !important;
  min-height: 140px;
  overflow-y: auto;
  margin: 0.65rem 0;
  padding: 0 0.75rem;
}

.chat-overlay-composer {
  flex-shrink: 0;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.chat-overlay-staff-footer {
  flex-shrink: 0;
  padding: 0.75rem 0.9rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

body.chat-overlay-open {
  overflow: hidden;
}

.chat-swipe-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-swipe-stage.chat-swipe-tracking-h {
  touch-action: none;
}

.chat-swipe-stage.is-dragging .chat-swipe-card {
  user-select: none;
}

.chat-swipe-card {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  margin: 8px 10px 4px;
  padding-top: 2px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(249, 115, 22, 0.15);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.28s ease;
  transform-origin: 50% 90%;
}

.chat-swipe-card.chat-swipe-no-transition {
  transition: none !important;
}

.chat-swipe-stamp {
  position: absolute;
  top: 40%;
  font-size: clamp(0.95rem, 3.4vw, 1.3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border: 3px solid;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.chat-swipe-stamp--left {
  left: 12px;
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.85);
  transform: translateY(-50%) rotate(-14deg);
}

.chat-swipe-stamp--right {
  right: 12px;
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.9);
  transform: translateY(-50%) rotate(14deg);
}

.chat-swipe-single-hint {
  flex-shrink: 0;
  margin: 0.35rem 1rem 0.45rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  border: 1px dashed rgba(249, 115, 22, 0.28);
}

.chat-swipe-single-hint--in-card {
  margin: 0.5rem 0.75rem 0.85rem;
  border-top: 1px dashed rgba(249, 115, 22, 0.22);
  border-radius: 0 0 18px 18px;
  padding: 0.55rem 0.65rem;
}

.chat-swipe-peek {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 38%;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--accent-2);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
  z-index: 3;
}

.chat-swipe-peek--left {
  left: 10px;
  text-align: left;
}

.chat-swipe-peek--right {
  right: 10px;
  text-align: right;
}

.chat-swipe-peek.visible {
  opacity: 1;
}

.chat-swipe-card .chat-log-full {
  flex: 1;
  min-height: 0;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 540px) {
  .chat-overlay {
    padding: 8px;
  }

  .chat-overlay-sheet,
  .chat-overlay-sheet.staff-chat-wide {
    width: 100%;
    max-height: min(94vh, 920px);
    border-radius: 18px;
  }

  .chat-overlay-sheet--deck,
  .chat-overlay-sheet--deck.staff-chat-wide {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.25rem 0;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* ========== Мобильная версия: телефоны ========== */

.shell {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
}

.btn,
.nav-links a,
.tab-btn {
  touch-action: manipulation;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.75rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    padding-top: max(0.6rem, env(safe-area-inset-top, 0px));
    border-radius: 14px;
    z-index: 50;
  }

  .brand {
    flex-shrink: 0;
    font-size: 1rem;
    gap: 0.45rem;
    max-width: 100%;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }
  .brand > span:last-child {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
  }

  .nav-links {
    width: 100%;
    flex: none;
    min-width: 0;
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0;
    mask-image: none;
    -webkit-overflow-scrolling: auto;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    text-align: center;
  }

  .shell {
    padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(4.5rem, calc(env(safe-area-inset-bottom, 0px) + 3rem));
  }

  .page-header {
    margin-bottom: 1.1rem;
  }
  .page-header h1 {
    font-size: 1.35rem;
    line-height: 1.2;
  }
  .page-header p {
    font-size: 0.88rem;
  }

  .hero {
    padding: 1.5rem 0.15rem 1.35rem;
  }
  .hero p.lead {
    font-size: 0.95rem;
  }

  .page-hero {
    padding: 1.25rem 0 1rem;
  }
  .page-hero .lead {
    font-size: 0.95rem;
  }

  .landing-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 1.75rem;
  }
  .landing-card {
    padding: 1.15rem 1.1rem;
  }

  .auth-wrap {
    max-width: none;
  }
  .auth-panel {
    padding: 1.35rem 1.1rem;
  }

  .panel {
    padding: 1.1rem 1rem;
    margin-bottom: 0.9rem;
    border-radius: 14px;
  }
  .panel-head {
    margin-bottom: 0.85rem;
  }
  .panel h2 {
    font-size: 1.05rem;
  }
  .panel-sub {
    font-size: 0.82rem;
  }

  .btn {
    min-height: 48px;
    padding: 0.75rem 1.2rem;
    width: 100%;
  }
  .btn-row .btn {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .btn-sm {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
  }

  .toolbar-row .btn {
    width: auto;
    flex: none;
    min-height: 48px;
  }

  input,
  textarea,
  select {
    min-height: 48px;
    font-size: 16px;
  }
  textarea {
    min-height: 120px;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
  .stat {
    padding: 0.75rem 0.85rem;
  }
  .stat .v {
    font-size: 1.1rem;
  }

  .tabs-inline {
    display: flex;
    width: 100%;
    padding: 0.22rem;
    margin-bottom: 0.9rem;
  }
  .tab-btn {
    flex: 1;
    min-height: 48px;
    text-align: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.55rem 0.5rem;
  }

  .table-wrap {
    margin: 0 -0.15rem;
    border-radius: 12px;
  }

  /* Таблицы → карточки строк */
  table.data-mobile-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  table.data-mobile-cards tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  table.data-mobile-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
  }
  table.data-mobile-cards tbody td:last-child {
    border-bottom: none;
    padding-top: 0.55rem;
    justify-content: flex-end;
  }
  table.data-mobile-cards tbody td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0;
    max-width: 42%;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.35;
  }
  table.data-mobile-cards tbody td .btn {
    width: auto;
    min-height: 44px;
  }
  table.data-mobile-cards tbody td.mobile-row-full {
    display: block;
    text-align: center;
    justify-content: center !important;
    border: none;
    padding: 1rem 0.5rem;
  }
  table.data-mobile-cards tbody td.mobile-row-full::before {
    display: none;
  }

  .panel,
  .chat-inline-panel {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .staff-close-box,
  .chat-overlay-staff-footer {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .chat-inline-panel {
    padding: 1rem max(0.65rem, env(safe-area-inset-left, 0px))
      max(0.65rem, env(safe-area-inset-right, 0px));
    border-radius: 16px;
  }
  .panel.chat-inline-panel.chat-panel-staff,
  .panel.chat-inline-panel.chat-panel-client {
    padding: 0 max(0.5rem, env(safe-area-inset-left, 0px))
      max(0.65rem, env(safe-area-inset-right, 0px))
      max(0.5rem, env(safe-area-inset-bottom, 0px));
  }

  .chat-log,
  .chat-log-full {
    max-height: min(52vh, 420px) !important;
    min-height: min(200px, 28vh);
    -webkit-overflow-scrolling: touch;
  }
  .chat-dash .chat-log,
  .chat-dash .chat-log-full {
    --chat-bubble-est: 3.35rem;
    --chat-bubble-gap: 0.55rem;
  }
  .chat-dash .chat-dash__messages-wrap .chat-log-full {
    --chat-log-slot: calc(
      var(--chat-visible-messages) * var(--chat-bubble-est) +
        (var(--chat-visible-messages) - 1) * var(--chat-bubble-gap)
    );
    flex: 0 0 var(--chat-log-slot);
    height: var(--chat-log-slot);
    min-height: var(--chat-log-slot);
    max-height: var(--chat-log-slot) !important;
    overflow-y: auto !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .staff-status-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }
  .staff-status-row .chat-status-label {
    grid-column: 1 / -1;
    margin-bottom: 0.15rem;
  }
  .staff-status-row .btn-sm {
    width: 100%;
    justify-content: center;
  }

  .chat-inline-toolbar.form-grid.two {
    grid-template-columns: 1fr;
  }

  .staff-close-box .staff-footer-grid.form-grid.two {
    grid-template-columns: 1fr;
  }
  .staff-close-box .btn-primary {
    width: 100%;
  }

  .ref-box {
    font-size: 0.82rem;
    padding: 0.75rem 0.85rem;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}

/* ========== CNYexpress: лендинг ========== */
.landing-hero {
  position: relative;
  text-align: center;
  padding: 2.5rem max(0.5rem, env(safe-area-inset-right, 0px)) 2rem
    max(0.5rem, env(safe-area-inset-left, 0px));
  width: 100%;
  max-width: min(38rem, 100%);
  margin: 0 auto;
  box-sizing: border-box;
}
.landing-hero-glow {
  position: absolute;
  inset: -20% -30% auto;
  height: 280px;
  background: radial-gradient(
    ellipse,
    rgba(249, 115, 22, 0.22),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
.landing-kicker {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin: 0 0 1rem;
}
.landing-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 5.5vw, 2.65rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  background: linear-gradient(115deg, #fff 0%, #e9d5ff 40%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-lead {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
}
.landing-signed-hi {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  color: var(--text);
  font-weight: 600;
}
.landing-tg-hint {
  width: 100%;
  text-align: center;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.landing-config-miss {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.topbar .nav-logout {
  margin-left: 0.35rem;
  font: inherit;
  cursor: pointer;
}
.landing-cta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.btn-landing-main {
  min-width: 200px;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}
.btn-landing-sub {
  min-width: 160px;
}

/* Лендинг: CTA пока без входа и регистрации */
.landing-cta--inactive .landing-cta-fake {
  pointer-events: none;
  cursor: default;
  opacity: 0.55;
  user-select: none;
}

.landing-steps {
  margin-top: 2.75rem;
  padding: 2rem 0;
  padding-bottom: max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem));
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.landing-steps-title {
  font-family: var(--font-display);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1.35rem;
  color: var(--text);
}
.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.landing-step {
  padding: 1.35rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
}
.landing-step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.landing-step h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0 0 0.45rem;
}
.landing-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.landing-trust {
  margin-top: 1.5rem;
  padding: 1.25rem 1rem;
  border-radius: 14px;
  background: rgba(253, 186, 116, 0.06);
  border: 1px solid rgba(253, 186, 116, 0.18);
  text-align: center;
}
.landing-trust-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer--landing {
  margin-top: 2.5rem;
  opacity: 0.85;
}

.stat-row--discount {
  max-width: 960px;
}

/* Пустые списки заявок / обменов */
.list-empty-hint {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(249, 115, 22, 0.22);
}

.ex-archive-panel .ex-archive-toggle,
.staff-archive-panel .staff-archive-toggle {
  text-align: left;
}

.promo-pill {
  margin: 1rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(249, 115, 22, 0.28);
}
.promo-pill .mono {
  color: var(--accent-bright);
}

.partner-balance-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.65;
  font-size: 0.92rem;
}
.partner-balance-list li {
  margin-bottom: 0.35rem;
}

/* Чат: «дашборд» как в админке (метрики + прогресс + подсказки) */
.chat-dash {
  --chat-visible-messages: 7;
  --chat-bubble-est: 3.85rem;
  --chat-bubble-gap: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: min(56vh, 520px);
  max-height: none;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(
    165deg,
    rgba(18, 14, 10, 0.97) 0%,
    rgba(8, 6, 5, 0.98) 100%
  );
  box-shadow: var(--shadow-card);
  overflow: visible;
}
/* Прогресс + подсказки: без внутреннего скролла — высота по контенту */
.chat-dash__rollup {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
  border-bottom: 1px solid var(--border);
}
.chat-dash__metrics.adm-section {
  flex-shrink: 0;
  padding: 0.75rem 1.15rem;
}
.chat-dash__thread-label {
  margin: 0.35rem 0 0.25rem;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex-shrink: 0;
}
.chat-dash .chat-dash__messages-wrap {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}
/* Слот ровно на ~7 сообщений (фиксированная высота — без сжатия/прыжков при отправке) */
.chat-dash .chat-dash__messages-wrap .chat-log-full {
  --chat-log-slot: calc(
    var(--chat-visible-messages) * var(--chat-bubble-est) +
      (var(--chat-visible-messages) - 1) * var(--chat-bubble-gap)
  );
  flex: 0 0 var(--chat-log-slot);
  height: var(--chat-log-slot);
  min-height: var(--chat-log-slot);
  max-height: var(--chat-log-slot) !important;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-dash .chat-dash__messages-wrap .chat-log-full::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}
.chat-dash .admin-dash__header {
  padding: 1rem 1.15rem 0.95rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    100deg,
    rgba(249, 115, 22, 0.07) 0%,
    transparent 42%
  );
}
.chat-dash__head .chat-head-row {
  margin-bottom: 0.75rem;
}
.chat-dash__title-row {
  align-items: flex-start !important;
}
.chat-dash .admin-dash__name {
  font-size: 1.25rem;
}
.chat-dash .adm-section {
  padding: 0.75rem 1.15rem;
}
.chat-dash .adm-section__title {
  margin-bottom: 0.55rem;
}
.chat-dash__progress-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-dash__progress-stack .adm-progress-card {
  margin: 0;
}
.chat-dash__hints {
  padding: 0 1.15rem 0.65rem;
  gap: 0.45rem;
}
.chat-dash__hints .adm-hint-card {
  margin: 0;
}
.chat-dash__insight-head {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.25rem;
  padding: 0 0.1rem;
}
.chat-dash__banner.exchange-payment-hint {
  margin: 0.4rem 1rem 0.35rem;
}
.chat-dash__status-row {
  padding: 0.65rem 1.15rem !important;
  margin-top: 0 !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.chat-dash .chat-messages-wrap {
  border-top: none;
  background: rgba(0, 0, 0, 0.14);
  overflow: visible;
}
.chat-panel-staff .chat-dash .chat-overlay-staff-footer {
  border-radius: 0;
  margin-top: 0;
}
.chat-dash .chat-composer-bar {
  border-radius: 0;
  margin-top: 0;
  border-top: 1px solid var(--border);
  padding-left: max(1.15rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.15rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  padding-top: 0.85rem;
}
.chat-dash .chat-overlay-staff-footer {
  padding-left: max(1.15rem, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(1.15rem, env(safe-area-inset-right, 0px)) !important;
  padding-bottom: max(1.1rem, env(safe-area-inset-bottom, 0px)) !important;
}

/* Чат: колонка + липкий композер */
.chat-shell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: min(72vh, 640px);
  max-height: min(85vh, 900px);
}
.chat-shell-head {
  flex-shrink: 0;
}
.chat-messages-wrap {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel-client .chat-messages-wrap,
.chat-panel-staff .chat-messages-wrap {
  min-height: 220px;
}
.chat-messages-wrap .chat-log-full {
  flex: 1;
  max-height: none !important;
  min-height: 160px;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.35rem;
}
.chat-composer-bar {
  flex-shrink: 0;
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.15));
  border-radius: 0 0 12px 12px;
}
.chat-hero-sub {
  color: var(--accent-2);
  font-size: 0.9rem;
}
.staff-client-insight {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(253, 186, 116, 0.07);
  border: 1px solid rgba(253, 186, 116, 0.2);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.staff-insight-headline {
  font-weight: 600;
  margin: 0;
}
.staff-insight-hints {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.staff-insight-hints li {
  margin: 0.2rem 0;
}
.chat-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.chat-composer-minimal .chat-composer-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
}
.chat-composer-minimal textarea.chat-input-grow {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  resize: vertical;
}
.chat-composer-minimal .chat-file-wrap {
  flex-shrink: 0;
}
.chat-composer-minimal .chat-composer-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.chat-composer-minimal .chat-composer-actions .btn-primary {
  white-space: nowrap;
}
.chat-pending-files-wrap {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.35rem 0 0.15rem;
  margin-bottom: 0.25rem;
  min-height: 0;
}
.chat-pending-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 1.6rem 0.25rem 0.35rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  max-width: 100%;
}
.chat-pending-thumb {
  display: block;
  max-height: 64px;
  max-width: 96px;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
}
.chat-pending-doc {
  font-size: 0.78rem;
  word-break: break-all;
  max-width: 12rem;
}
.chat-pending-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.chat-pending-remove:hover {
  background: rgba(180, 40, 40, 0.95);
}

.chat-upload-spinner {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.25rem 0 0.15rem;
  margin-bottom: 0.15rem;
}
.chat-upload-spinner__ring {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--color-accent, #1e6b4a);
  border-radius: 50%;
  animation: chat-upload-spin 0.7s linear infinite;
}
@keyframes chat-upload-spin {
  to {
    transform: rotate(360deg);
  }
}
.chat-upload-spinner__label {
  font-size: 0.72rem;
  opacity: 0.88;
  line-height: 1.25;
}

.chat-bubble {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.chat-meta {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.72;
}
.staff-snap-deal .btn {
  width: auto;
}

@media (max-width: 720px) {
  .landing-hero {
    padding: 1.75rem 0.25rem 1.5rem;
  }
  .landing-cta .btn {
    width: 100%;
    max-width: 320px;
  }
  .chat-shell,
  .chat-dash {
    min-height: min(48vh, 480px);
    max-height: none;
  }
  .chat-inline-panel .chat-dash .chat-log-full,
  .chat-dash .chat-log-full {
    overflow-y: auto !important;
    scrollbar-width: none;
  }
  .chat-messages-wrap .chat-log-full {
    min-height: min(28vh, 220px);
  }
  .chat-composer-minimal .chat-composer-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .chat-composer-minimal textarea.chat-input-grow {
    width: 100%;
    min-height: 88px;
    flex: none;
    order: 0;
  }
  .chat-composer-minimal .chat-composer-actions {
    width: 100%;
    justify-content: stretch;
    order: 1;
  }
  .chat-composer-minimal .chat-composer-actions .btn-ghost,
  .chat-composer-minimal .chat-composer-actions label.btn {
    flex: 0 0 auto;
  }
  .chat-composer-minimal .chat-composer-actions .btn-primary {
    flex: 1;
    min-width: 0;
  }
}

/* Admin lookup, landing CTAs, collapsed nav */
.nav-links--empty {
  min-width: 0;
}
.landing-cta--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}
.panel-head--collapsible {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel-collapse-hint {
  font-size: 0.8rem;
  color: var(--muted);
}
/* ——— Админ: карточка клиента (дашборд) ——— */
.admin-dash {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0;
  background: linear-gradient(165deg, rgba(18, 14, 10, 0.97) 0%, rgba(8, 6, 5, 0.98) 100%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.admin-dash__header {
  padding: 1.35rem 1.35rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    100deg,
    rgba(249, 115, 22, 0.07) 0%,
    transparent 42%
  );
}
.admin-dash__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.admin-dash__avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(145deg, #ea580c, #f97316);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.35);
  flex-shrink: 0;
}
.admin-dash__title-text {
  flex: 1;
  min-width: 0;
}
.admin-dash__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-dash__headline {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}
.admin-dash__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
  justify-content: flex-end;
}
.admin-dash__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}
.adm-meta-chip {
  font-size: 0.78rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}
.adm-promo-line {
  margin: 0.75rem 0 0;
  font-size: 0.86rem;
  color: var(--text);
}
.adm-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.adm-pill--role-admin {
  border-color: rgba(249, 115, 22, 0.45);
  color: var(--accent-bright);
  background: var(--accent-dim);
}
.adm-pill--role-op {
  border-color: rgba(253, 186, 116, 0.35);
  color: #fdba74;
}
.adm-pill--role-client {
  color: var(--muted);
}
.adm-pill--ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
  background: rgba(74, 222, 128, 0.08);
}
.adm-pill--danger {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
}
.adm-pill--soft {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}
.adm-section {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.adm-section:last-of-type {
  border-bottom: none;
}
.adm-section--note {
  background: rgba(249, 115, 22, 0.04);
}
.adm-section__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-bright);
}
.adm-section__hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}
.adm-section--two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.adm-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.adm-metric-tile {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.85rem 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  min-width: 0;
}
.adm-metric-tile__k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.adm-metric-tile__v {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.adm-metric-tile__s {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.adm-progress-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
}
.adm-progress-card__meta {
  font-size: 0.78rem;
  color: var(--text);
  opacity: 0.9;
}
.adm-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}
.adm-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ea580c, #fb923c, #fdba74);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.35);
  transition: width 0.35s ease;
}
.adm-compare-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
.adm-compare-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.82rem;
}
@media (max-width: 520px) {
  .adm-compare-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .adm-compare-val {
    justify-self: start;
  }
}
.adm-compare-label {
  color: var(--muted);
}
.adm-compare-track {
  height: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid var(--border);
}
.adm-compare-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}
.adm-compare-fill--month {
  background: linear-gradient(90deg, rgba(253, 186, 116, 0.35), #fdba74);
}
.adm-compare-fill--total {
  background: linear-gradient(90deg, #c2410c, #f97316);
}
.adm-compare-val {
  font-size: 0.78rem;
  color: var(--text);
  min-width: 4rem;
  text-align: right;
}
.adm-code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.adm-code-chip {
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}
.adm-hints-grid {
  display: grid;
  gap: 0.55rem;
}
.adm-hint-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(249, 115, 22, 0.04);
}
.adm-hint-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}
.adm-hint-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}
.adm-banner-grid {
  display: grid;
  gap: 0.65rem;
}
.adm-banner-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.86rem;
  line-height: 1.5;
}
.adm-banner-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent-bright);
}
.adm-trust-html {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}
.adm-trust-html b,
.adm-trust-html strong {
  color: var(--accent-bright);
  font-weight: 600;
}
.admin-dash .admin-actions-grid {
  margin-top: 0;
  margin-bottom: 0.25rem;
}
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: stretch;
}
.admin-action-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(0, 0, 0, 0.22);
}
/* Кнопки действий — одна линия по низу ряда карточек */
.admin-action-card > .btn:last-child,
.admin-action-card > .admin-action-row:last-child {
  margin-top: auto;
  padding-top: 0.5rem;
}
.admin-action-card h4 {
  margin: 0 0 0.65rem;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.admin-action-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.admin-action-input {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin: 0.35rem 0 0.65rem;
  color: var(--muted);
}

/* Plain layout (вход и др. страницы без шапки) */
.plain-body {
  margin: 0;
  min-height: 100vh;
}

/* /auth/telegram — вход по email */
.signin {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.5rem, env(safe-area-inset-top, 0px)) 1.25rem
    max(1.5rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.signin__ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
      ellipse 85% 55% at 50% -15%,
      rgba(249, 115, 22, 0.17),
      transparent 55%
    ),
    radial-gradient(
      ellipse 50% 35% at 100% 100%,
      rgba(234, 88, 12, 0.07),
      transparent 50%
    ),
    var(--bg);
}
.signin__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem 1.75rem;
  border-radius: 20px;
  background: linear-gradient(
    165deg,
    rgba(24, 20, 16, 0.98) 0%,
    rgba(10, 8, 6, 0.99) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.25);
  text-align: center;
}
.signin__head {
  margin-bottom: 1.35rem;
}
.signin__panel--main {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.signin__tg-main {
  text-align: center;
}
.signin__tg-lead {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  text-align: left;
}
.signin__tg-lead strong {
  color: var(--accent-2);
  font-weight: 600;
}
.signin__tg-note {
  margin: 0 0 1.1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}
.signin__tg-foot {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.signin__tg-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 1.25rem !important;
  font-size: 1rem !important;
  font-weight: 600;
  border-radius: var(--radius-sm) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.25);
}
.signin__tg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}
.signin__tg-handle {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-family: ui-monospace, "IBM Plex Mono", monospace;
  color: var(--accent-bright);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  word-break: break-all;
  text-align: left;
}
.signin__tg-copy {
  flex-shrink: 0;
}
.signin__btn--email-alt {
  margin-top: 1.25rem;
  width: 100%;
  min-height: 2.5rem;
  font-size: 0.875rem !important;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.signin__btn--email-alt:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  filter: none;
  box-shadow: none;
}
.signin__btn--email-alt:active {
  transform: scale(0.99);
}

.signin-dialog {
  width: calc(100vw - 2rem);
  max-width: 400px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: linear-gradient(
    165deg,
    rgba(24, 20, 16, 0.99) 0%,
    rgba(10, 8, 6, 0.995) 100%
  );
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.signin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}
.signin-dialog__inner {
  padding: 1.35rem 1.35rem 1.25rem;
  text-align: left;
}
.signin-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.signin-dialog__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.signin-dialog__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.35rem -0.35rem 0 0;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.signin-dialog__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.signin-dialog__lead {
  margin: 0 0 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}
.signin-dialog .signin__step2:not([hidden]) {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.signin__brand {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.signin__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.signin__lead {
  margin: 0 auto;
  max-width: 36ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}
.signin__banner-warn {
  margin: 0 0 1.15rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  text-align: left;
}
.signin__panel {
  text-align: left;
}
.signin__form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.signin__form[hidden] {
  display: none !important;
}
.signin__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.signin__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(250, 246, 241, 0.92);
}
.signin__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.signin__input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}
.signin__input:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
.signin__input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.signin__input--otp {
  font-family: ui-monospace, "IBM Plex Mono", monospace;
  font-size: 1.0625rem;
  letter-spacing: 0.22em;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}
.signin__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.signin__btn--primary {
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.signin__btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 26px rgba(234, 88, 12, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.signin__btn--primary:active {
  transform: scale(0.98);
}
.signin__btn--ghost {
  margin-top: 0.125rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: auto;
  padding: 0.5rem 0.25rem;
}
.signin__btn--ghost:hover {
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}
.signin__step2[hidden] {
  display: none !important;
}
.signin__step2:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin-top: 0.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.signin__hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  min-height: 1.3125rem;
}
.signin__alert {
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
}
.signin__alert[hidden] {
  display: none !important;
}
.signin__foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.signin__link-home {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.signin__link-home:hover {
  color: var(--accent-2);
}
