/* ============================================================
   Triples CRM — монохромная тема
   ============================================================ */

:root {
  --bg: #141518;
  --bg-soft: #191b1f;
  --surface: #1e2024;
  --surface-2: #26292e;
  --surface-3: #30343a;
  --border: #363a41;
  --border-soft: #2a2e34;
  --text: #f0f2f5;
  --muted: #adb3bc;
  --muted-2: #858b95;
  --accent: #ffffff;
  --accent-2: #d4d8de;
  --grad: linear-gradient(135deg, #ffffff 0%, #9aa0a8 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  --success: #ffffff;
  --success-bg: rgba(255, 255, 255, 0.1);
  --warning: #d4d8de;
  --warning-bg: rgba(255, 255, 255, 0.08);
  --danger: #e2e5ea;
  --danger-bg: rgba(255, 255, 255, 0.08);
  --info: #d4d8de;
  --info-bg: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --sidebar-w: 252px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(800px 420px at 100% 0%, rgba(255, 255, 255, 0.035), transparent 55%);
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}

::selection {
  background: rgba(255, 255, 255, 0.28);
}

/* Скроллбары */
* {
  scrollbar-width: thin;
  scrollbar-color: #3b3f46 transparent;
}
*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
*::-webkit-scrollbar-thumb {
  background: #3b3f46;
  border-radius: 99px;
}

/* ============================================================
   Загрузка / бутстрап
   ============================================================ */

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  justify-content: center;
}

.boot-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 18px 50px rgba(255, 255, 255, 0.4);
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Каркас приложения
   ============================================================ */

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #191b1f 0%, #111214 100%);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-2);
  padding: 16px 12px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.16s, color 0.16s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  opacity: 0.9;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: var(--grad-soft);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.nav-item.active svg {
  color: var(--accent);
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #0b0c0e;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-foot {
  border-top: 1px solid var(--border-soft);
  padding: 14px 8px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-foot .avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.sidebar-foot-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot-role {
  font-size: 11.5px;
  color: var(--muted-2);
}

.sidebar-foot .icon-btn {
  margin-left: auto;
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(20, 21, 24, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.topbar-crumb {
  color: var(--muted-2);
  font-size: 13px;
  margin-left: 2px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  display: none;
}

.view {
  padding: 28px 30px 60px;
  max-width: 1340px;
  width: 100%;
  margin: 0 auto;
  animation: view-in 0.24s ease;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ============================================================
   Общие элементы
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 26px;
  letter-spacing: -0.025em;
}

.page-head p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 5px;
}

.page-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.grow {
  flex: 1;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h3 {
  font-size: 15px;
  font-weight: 650;
}

.card-head .card-sub {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.card-head .page-actions,
.card-head .row {
  margin-left: auto;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card.flush .card-head {
  padding: 18px 20px 0;
  margin-bottom: 12px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.06s, opacity 0.16s;
  white-space: nowrap;
  user-select: none;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn:hover {
  background: var(--surface-3);
  border-color: #3a3e44;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  background: var(--grad);
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(255, 255, 255, 0.3);
  color: #e5e5e5;
}

.btn-danger:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-sm {
  height: 32px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 9px;
  gap: 6px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex: 0 0 auto;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* Поля */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}

.field > label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.field .hint {
  font-size: 11.5px;
  color: var(--muted-2);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

input[type="checkbox"] {
  accent-color: #ffffff;
}

/* Компактные таблицы внутри модалок (форма отчёта) */
.modal-body .split-table td,
.modal-body .split-table th {
  padding: 8px 13px;
}

.modal-body .form-section-title {
  margin: 16px 0 9px;
}

.modal-body .field {
  margin-bottom: 13px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.input::placeholder,
.textarea::placeholder {
  color: #6c727c;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23868c96' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.select option {
  background: #121212;
  color: var(--text);
}

.input-prefix {
  position: relative;
}

.input-prefix .prefix {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-weight: 600;
  pointer-events: none;
}

.input-prefix .input {
  padding-left: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-error {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e5e5e5;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  white-space: pre-line;
}

.form-note {
  background: var(--info-bg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e5e5e5;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

/* Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.badge.plain::before {
  display: none;
}

.badge.owner {
  background: rgba(255, 255, 255, 0.14);
  color: #e5e5e5;
}
.badge.tl_ops {
  background: var(--info-bg);
  color: #e5e5e5;
}
.badge.tl_rec {
  background: rgba(255, 255, 255, 0.13);
  color: #d4d4d4;
}
.badge.operator {
  background: var(--success-bg);
  color: #ffffff;
}
.badge.recruiter {
  background: var(--warning-bg);
  color: #d4d4d4;
}
.badge.active,
.badge.approved {
  background: var(--success-bg);
  color: #ffffff;
}
.badge.paused,
.badge.pending {
  background: var(--warning-bg);
  color: #d4d4d4;
}
.badge.archived,
.badge.rejected {
  background: rgba(154, 161, 184, 0.12);
  color: var(--muted);
}
.badge.rejected {
  background: var(--danger-bg);
  color: #e5e5e5;
}

/* Аватар */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4a4a4a, #111111);
  flex: 0 0 auto;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.avatar.sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar.lg {
  width: 58px;
  height: 58px;
  font-size: 19px;
  border-radius: 18px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.person-name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-sub {
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 17px 18px 15px;
  position: relative;
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.075), transparent 70%);
  pointer-events: none;
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  display: block;
}

.kpi-value.accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kpi-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.kpi-hint .up {
  color: var(--success);
}
.kpi-hint .down {
  color: var(--danger);
}

/* Таблицы */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 650;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.012);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 0.13s;
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tbody tr.clickable:hover {
  background: rgba(255, 255, 255, 0.028);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table .right {
  text-align: right;
}

.table .nowrap {
  white-space: nowrap;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.table .actions .btn + .btn {
  margin-left: 6px;
}

.table tfoot td {
  font-weight: 650;
  background: rgba(255, 255, 255, 0.02);
}

.table .sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.table a {
  font-weight: 600;
}

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.amount.pos {
  color: var(--success);
}
.amount.neg {
  color: var(--danger);
}
.amount.muted {
  color: var(--muted);
  font-weight: 500;
}

/* Тулбар / фильтры */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar .search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.toolbar .search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}

.toolbar .search .input {
  padding-left: 38px;
}

.toolbar .select {
  width: auto;
  min-width: 150px;
}

.toolbar .spacer {
  flex: 1;
}

/* Пустое состояние */
.empty {
  padding: 46px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
}

.empty h4 {
  font-size: 15px;
  margin-bottom: 5px;
  color: var(--text);
}

.empty p {
  font-size: 13px;
  color: var(--muted-2);
  max-width: 360px;
  margin: 0 auto;
}

.empty .btn {
  margin-top: 16px;
}

/* ============================================================
   Модальные окна
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlay-in 0.16s ease;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.modal.wide {
  width: min(860px, 100%);
}

.modal.narrow {
  width: min(440px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 0;
}

.modal-head h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.modal-head p {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-top: 3px;
}

.modal-head .icon-btn {
  margin-left: auto;
  margin-top: -4px;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  padding: 15px 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.modal-foot .left {
  margin-right: auto;
}

/* ============================================================
   Тосты
   ============================================================ */

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 380px;
}

.toast {
  background: #1f2126;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--text);
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13.5px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.22s ease;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.success {
  border-left-color: var(--success);
}
.toast.error {
  border-left-color: var(--danger);
}
.toast.info {
  border-left-color: var(--info);
}

.toast.out {
  opacity: 0;
  transform: translateX(20px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* ============================================================
   Логин
   ============================================================ */

.auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(160deg, #1c1e22 0%, #121316 100%);
  border-right: 1px solid var(--border-soft);
}

.auth-hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.03), 0 0 0 160px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.auth-copy {
  position: relative;
  max-width: 580px;
}

.auth-hero.minimal {
  justify-content: center;
  gap: 26px;
}

.auth-copy.minimal {
  max-width: 660px;
}

.auth-copy.minimal h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.08;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.auth-mobile-brand .brand-name {
  font-size: 19px;
}

.auth-copy h1 {
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.auth-copy h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 430px;
}

.auth-features {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 34px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-feature svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
  flex: 0 0 auto;
  margin-top: 1px;
}

.auth-foot {
  position: relative;
  font-size: 12px;
  color: var(--muted-2);
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}

.auth-form {
  width: min(400px, 100%);
}

.auth-form h2 {
  font-size: 26px;
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

.auth-form > p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 28px;
}

.auth-links {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.link-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

.auth-form .btn {
  height: 46px;
  font-size: 14.5px;
}

.demo-box {
  margin-top: 26px;
  padding: 15px;
  border: 1px dashed var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.015);
}

.demo-box-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-bottom: 10px;
  font-weight: 650;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-chip {
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-chip:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--text);
}

.auth-error {
  margin-bottom: 16px;
}

/* ============================================================
   Профиль / выпадающее меню
   ============================================================ */

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 5px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-soft);
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
  font-size: 11.5px;
}

.user-chip-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.user-chip-role {
  display: block;
  font-size: 11px;
  color: var(--muted-2);
  text-align: left;
}

/* ============================================================
   Страница модели
   ============================================================ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  cursor: pointer;
}

.back-link:hover {
  color: var(--text);
  text-decoration: none;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.model-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.model-head .avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 21px;
}

.model-head h1 {
  font-size: 27px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.model-head .tg {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 3px;
}

.model-head .page-actions {
  margin-left: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 650;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-value.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rate-list {
  display: flex;
  flex-direction: column;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.rate-row:last-child {
  border-bottom: none;
}

.rate-row .rate-name {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rate-row .rate-pct {
  margin-left: auto;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.rate-row.total {
  border-top: 1px solid var(--border);
  font-weight: 650;
}

.rate-row.agency .rate-pct {
  color: var(--accent);
}

.chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Скриншоты */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.screenshot {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  cursor: zoom-in;
}

.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.screenshot:hover img {
  transform: scale(1.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 11, 13, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.shot-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.shot-thumb {
  width: 74px;
  height: 56px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.file-drop {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.file-drop:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.file-drop svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto 6px;
  color: var(--accent);
}

/* Разбивка отчёта */
.split-table td:last-child,
.split-table th:last-child {
  text-align: right;
}

.split-table .total-row td {
  border-top: 1px solid var(--border);
  font-weight: 700;
}

/* ============================================================
   Адаптив
   ============================================================ */

.mobile-backdrop {
  display: none;
}

@media (max-width: 1240px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    width: 268px;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  body.menu-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-btn {
    display: inline-grid;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 18px;
  }

  .view {
    padding: 20px 18px 50px;
  }

  .auth {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    display: none;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .view {
    padding: 18px 12px 44px;
  }
  .table th,
  .table td {
    padding: 10px;
    font-size: 12.5px;
  }
  .table th {
    font-size: 10px;
  }
  .card {
    padding: 16px;
  }
  .card.flush .card-head {
    padding: 15px 15px 0;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .user-chip-name,
  .user-chip-role {
    display: none;
  }
  .topbar-title {
    font-size: 15px;
  }
  .modal-overlay {
    padding: 12px;
  }
  .modal-body {
    padding: 16px 18px;
  }
  .modal-head {
    padding: 16px 18px 0;
  }
  .modal-foot {
    padding: 12px 18px;
  }
}

/* Мелочи */
.hr {
  height: 1px;
  background: var(--border-soft);
  border: none;
  margin: 18px 0;
}

/* Компактный список тимлидов на дашборде */
.lead-list {
  display: flex;
  flex-direction: column;
}

.lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.lead-row:last-child {
  border-bottom: none;
}

.lead-main {
  min-width: 0;
  flex: 1;
}

.lead-money {
  text-align: right;
  flex: 0 0 auto;
}

.lead-money b {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lead-money span {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* Кнопки-иконки в таблицах чуть заметнее */
.table .actions .btn-ghost {
  border-color: var(--border-soft);
  color: var(--muted);
}

.table .actions .btn-ghost:hover {
  border-color: var(--border);
  color: var(--text);
}

.toolbar .date-sep {
  color: var(--muted-2);
}

@media (min-width: 901px) {
  .menu-btn {
    display: none;
  }
}

.nowrap {
  white-space: nowrap;
}

.text-right {
  text-align: right;
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.error-state {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
}

.error-state .empty-icon {
  color: var(--danger);
  background: var(--danger-bg);
}

.pill-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 16px;
}

.pill-tab {
  padding: 7px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.pill-tab.active {
  background: var(--surface-3);
  color: var(--text);
}

/* Прокрутка модалки с формой */
.form-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  font-weight: 700;
  margin: 20px 0 12px;
}

.form-section-title:first-child {
  margin-top: 0;
}

/* Иконка inside empty */
.inline-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.role-strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.role-strip-item:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--surface-2);
  text-decoration: none;
}

.role-strip-value {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role-strip-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 680px) {
  .role-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   Расписание смен
   ============================================================ */

.week-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--surface);
}

.week-nav [data-week="1"] svg {
  transform: rotate(180deg);
}

.week-label {
  font-weight: 650;
  font-size: 13.5px;
  white-space: nowrap;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(148px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-col {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  min-height: 240px;
  overflow: hidden;
}

.day-col.today {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-head b {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0;
}

.day-shifts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
}

.shift-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 9px 10px;
}

.shift-card.status-completed {
  border-color: rgba(255, 255, 255, 0.28);
}

.shift-card.status-cancelled {
  opacity: 0.55;
}

.shift-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 7px;
}

.shift-top .badge {
  height: 18px;
  font-size: 9.5px;
  padding: 0 6px;
}

.shift-time {
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.shift-time small {
  color: var(--muted-2);
  font-weight: 500;
}

.shift-model {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  min-width: 0;
}

.shift-model span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-model .avatar {
  width: 24px;
  height: 24px;
  font-size: 9px;
}

.shift-duration {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 4px;
}

.shift-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shift-actions {
  display: flex;
  gap: 2px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border-soft);
}

.shift-actions .btn {
  height: 26px;
  padding: 0 6px;
}

.shift-actions .btn svg {
  width: 14px;
  height: 14px;
}

.day-empty {
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  padding: 18px 0;
}

.chip-close {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
}

/* ============================================================
   Форма отчёта: площадки
   ============================================================ */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 14px;
}

.total-row-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  margin-top: 4px;
}

.platform-sum {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.platform-sum b {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.report-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.report-total {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.report-meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.report-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-meta b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .total-row-box {
    flex-direction: column;
    align-items: stretch;
  }
  .report-meta {
    gap: 16px;
  }
}

/* ============================================================
   Triples: монохром, логотип, финальные переопределения
   ============================================================ */

body::before {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(255, 255, 255, 0.045), transparent 60%),
    radial-gradient(800px 420px at 100% 0%, rgba(255, 255, 255, 0.028), transparent 55%);
}

.auth-hero {
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(255, 255, 255, 0.055), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(255, 255, 255, 0.035), transparent 60%),
    linear-gradient(160deg, #1c1e22 0%, #121316 100%);
}

.auth-hero::before {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.015);
}

.logo-mark {
  background: #ffffff;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
  display: block;
}

.logo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  filter: none;
  pointer-events: none;
}

.brand .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.auth-brand .logo-mark {
  width: 66px;
  height: 66px;
  border-radius: 19px;
  flex: 0 0 auto;
}

.auth-mobile-brand .logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.boot-logo-img {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8);
}

.btn-primary {
  background: #ffffff;
  background-image: none;
  color: #080808;
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.09);
}

.btn-primary:hover {
  background: #e8e8e8;
  background-image: none;
  color: #000000;
  filter: none;
}

.btn-danger {
  color: #f0f0f0;
}

.nav-badge {
  color: #000000;
}

.kpi-value.accent,
.stat-value.grad,
.role-strip-value,
.auth-copy h1 span {
  background: linear-gradient(135deg, #ffffff 0%, #8f8f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.amount.pos {
  color: #ffffff;
}

.amount.neg {
  color: #8c8c8c;
}

.form-error {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f0f0f0;
}

.form-note {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: #d6d6d6;
}

.toast {
  background: #1f2126;
  border-color: #303338;
  border-left-color: #ffffff;
}

.auth-copy.minimal h1 span {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
}

/* Демо-доступ */
.demo-access {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-chip b {
  font-size: 12px;
}

.demo-chip span {
  color: var(--muted);
  font-size: 10px;
}

.demo-chip:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: var(--surface-2);
}

@media (max-width: 520px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

/* Калькулятор токенов */
.platform-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-row.single {
  grid-template-columns: 1fr;
}

@media (max-width: 680px) {
  .form-row.three {
    grid-template-columns: 1fr;
  }
}

.platform-pair .input-prefix {
  min-width: 0;
}

.shift-operator {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.shift-operator svg {
  width: 12px;
  height: 12px;
}

.platform-dollar {
  margin-top: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.platform-field .hint {
  display: block;
  margin-top: 5px;
}

.calc-card {
  padding: 24px;
}

.calc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
}

.calc-head h3 {
  margin: 0;
}

.calc-total {
  text-align: right;
  flex: 0 0 auto;
}

.calc-total b {
  display: block;
  margin-top: 2px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.calc-list {
  border-top: 1px solid var(--border-soft);
}

.calc-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1.3fr) 130px 120px;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}

.calc-row:last-child {
  border-bottom: 0;
}

.calc-platform {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calc-platform b {
  font-size: 14px;
}

.calc-inputs {
  display: flex;
  gap: 8px;
}

.calc-inputs .input {
  min-width: 0;
}

.calc-dollar {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .calc-card {
    padding: 18px;
  }
  .calc-head {
    flex-direction: column;
  }
  .calc-total {
    text-align: left;
  }
  .calc-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }
  .calc-platform,
  .calc-inputs {
    grid-column: 1 / -1;
  }
  .calc-rate {
    align-self: center;
  }
  .calc-dollar {
    text-align: right;
  }
}
