:root {
  --bg: #eef3f7;
  --panel: #ffffff;
  --ink: #16222e;
  --muted: #667482;
  --line: #d8e1ea;
  --accent: #20b99f;
  --accent-dark: #0b7d6b;
  --gold: #d7aa4c;
  --danger: #b42318;
  --navy: #152536;
  --soft: #eefaf7;
  --shadow: 0 24px 70px rgba(21, 37, 54, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #ffffff 0, #eef3f7 38%, #e7eef5 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px min(5vw, 64px);
  border-bottom: 1px solid rgba(216,225,234,.74);
  background: rgba(238,243,247,.86);
  backdrop-filter: blur(16px);
}
.landing-topbar { position: fixed; width: 100%; }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 850; letter-spacing: 0; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1db59b, #79d7c7);
  display: grid;
  place-items: center;
  color: white;
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 14px 28px rgba(32,185,159,.24);
}
.brand-mark-large { width: 68px; height: 68px; border-radius: 17px; font-size: 30px; }
.brand-large { font-size: 22px; }
.nav, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lang-select {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 850;
  color: var(--ink);
}
.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21,37,54,.1); }
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.gold { background: var(--gold); color: #241a07; border-color: var(--gold); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.new-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: 130px min(5vw, 64px) 58px;
}
.hero-copy { max-width: 840px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-dark);
  border: 1px solid #ccece5;
  font-weight: 850;
}
.new-hero h1 {
  margin: 22px 0 20px;
  max-width: 900px;
  font-size: clamp(46px, 6.2vw, 88px);
  line-height: .94;
  letter-spacing: 0;
}
.new-hero p { color: var(--muted); font-size: 20px; line-height: 1.55; max-width: 720px; }
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  max-width: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.hero-metrics div { background: rgba(255,255,255,.78); padding: 18px; }
.hero-metrics strong { display: block; font-size: 28px; }
.hero-metrics span { color: var(--muted); font-weight: 700; font-size: 13px; }
.flow-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(216,225,234,.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.flow-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 20px; }
.flow-head span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  background: var(--soft);
  color: var(--accent-dark);
  border-radius: 999px;
  font-weight: 850;
  font-size: 12px;
}
.flow-head h2 { margin: 10px 0 6px; font-size: 26px; line-height: 1.12; }
.hint { color: var(--muted); line-height: 1.45; }
.field { display: grid; gap: 8px; margin: 16px 0; }
.field label, .amount-control label { font-weight: 800; }
.field input, .field select, .field textarea, .amount-control input[type="number"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 13px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .amount-control input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(32,185,159,.13);
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.amount-control {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.term-control { margin-top: 8px; }
.amount-control div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.amount-control strong { font-size: 22px; color: var(--accent-dark); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.segmented button {
  min-height: 46px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}
.segmented button.active { background: var(--navy); color: white; border-color: var(--navy); }
.scan-ring {
  width: 118px;
  height: 118px;
  margin: 6px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent), #caeee7, var(--accent));
  color: white;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 20px 40px rgba(32,185,159,.24);
}
.scan-ring span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
}
.bank-scan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}
.bank-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}
.bank-logo {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bank), white 88%);
  border: 1px solid color-mix(in srgb, var(--bank), white 70%);
  overflow: hidden;
}
.bank-logo img { max-width: 38px; max-height: 28px; object-fit: contain; }
.bank-logo span { color: var(--bank); font-weight: 900; }
.bank-card strong { font-size: 13px; line-height: 1.2; }
.bank-card small { color: var(--muted); }
.bank-card.checking { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(32,185,159,.12); }
.bank-card.checked small { color: var(--accent-dark); font-weight: 800; }
.success-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 850;
  margin-bottom: 12px;
}
.approved-box {
  display: grid;
  gap: 8px;
  padding: 18px;
  margin: 16px 0;
  border-radius: 8px;
  border: 1px solid #ccece5;
  background: linear-gradient(180deg, #f5fffc, #ffffff);
}
.approved-box strong { font-size: 28px; }
.consent { font-size: 14px; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; background: #f5f7fa; }
.side {
  background: var(--navy);
  color: white;
  padding: 24px;
}
.side .brand { color: white; }
.side .lang-select {
  width: 100%;
  margin-top: 16px;
  background: rgba(255,255,255,.08);
  color: white;
  border-color: rgba(255,255,255,.16);
}
.side .lang-select option { color: var(--ink); }
.side nav { display: grid; gap: 8px; margin-top: 28px; }
.side a, .side button {
  color: white;
  text-align: left;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
}
.main { padding: 26px; }
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 8px; font-size: 26px; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 850;
  font-size: 13px;
}
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.info strong { display: block; font-size: 18px; margin-bottom: 8px; }
.contract {
  position: relative;
  background: #fffdf7;
  border: 1px solid #eadfbe;
  border-radius: 8px;
  padding: 22px;
  line-height: 1.55;
}
.contract-dialog,
.payment-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: 92vh;
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contract-dialog[open] {
  display: flex;
  flex-direction: column;
}
.payment-dialog { width: min(560px, calc(100vw - 28px)); }
.contract-dialog::backdrop,
.payment-dialog::backdrop { background: rgba(12, 22, 32, .58); }
.contract-paper {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 36px;
  padding-bottom: 52px;
  background:
    linear-gradient(#fffefa, #fffefa) padding-box,
    repeating-linear-gradient(0deg, rgba(215,170,76,.16), rgba(215,170,76,.16) 1px, transparent 1px, transparent 28px);
  color: #182433;
}
.payment-sheet {
  width: 100%;
  margin-inline: auto;
  padding: 30px;
  background: #fff;
  color: var(--ink);
}
.payment-sheet h1 {
  margin: 14px 0 10px;
  font-size: 32px;
}
.fee-total span,
.payment-card span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}
.fee-total strong { font-size: 34px; }
.fee-breakdown {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}
.fee-breakdown div,
.payment-card,
.payment-waiting {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.fee-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fee-breakdown dt { color: var(--muted); font-weight: 800; }
.fee-breakdown dd { margin: 0; font-weight: 900; }
.payment-card {
  margin-bottom: 18px;
  background: #fffdf7;
  border-color: #eadfbe;
}
.payment-card span { color: var(--muted); }
.payment-card strong {
  display: block;
  font-size: 22px;
  word-break: break-word;
}
.payment-waiting {
  margin-top: 20px;
  background: #ecfdf7;
  border-color: #bfeade;
}
.payment-waiting strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}
.dialog-x, .chat-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}
.dialog-x {
  position: sticky;
  top: 0;
  float: right;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f5f7;
}
.contract-paper h1 { margin: 0 0 18px; font-size: 34px; }
.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}
.contract-grid div { border: 1px solid #e4d8b4; border-radius: 8px; padding: 12px; background: rgba(255,255,255,.78); }
.contract-grid dt { color: var(--muted); font-weight: 800; font-size: 12px; }
.contract-grid dd { margin: 4px 0 0; font-weight: 900; }
.real-stamp {
  position: absolute;
  right: 44px;
  top: 52px;
  width: 152px;
  height: 152px;
  border: 6px double rgba(11,125,107,.75);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(11,125,107,.9);
  font-weight: 950;
  transform: rotate(-10deg);
  opacity: .9;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 2px rgba(11,125,107,.18);
}
.real-stamp span { font-size: 20px; }
.real-stamp strong { font-size: 26px; }
.real-stamp small { margin-top: 4px; font-size: 13px; }
.signature-box {
  margin-top: 24px;
  padding: 18px;
  border: 1px dashed #c8b57b;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}
#signatureCanvas {
  width: 100%;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  touch-action: none;
}
.schedule-wrap { max-height: 360px; overflow: auto; }
.withdraw-card {
  background: linear-gradient(135deg, var(--navy), #254158);
  color: white;
  border: 0;
}
.withdraw-card .hint { color: rgba(255,255,255,.72); }
.withdraw-card.locked .btn { opacity: .72; }
.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(430px, calc(100vw - 36px));
  z-index: 40;
}
.chat-button {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--navy);
  color: white;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 850;
}
.chat-panel {
  margin-bottom: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  height: min(610px, calc(100vh - 108px));
  display: flex;
  flex-direction: column;
}
.chat-panel.hidden { display: none; }
.chat-head { padding: 14px; background: var(--navy); color: white; font-weight: 850; display: flex; justify-content: space-between; align-items: center; }
.chat-x { color: white; font-size: 18px; }
.chat-body { flex: 1; min-height: 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; background: #f8fbff; }
.chat-msg { padding: 10px 12px; border-radius: 8px; background: #f0f4f8; line-height: 1.4; }
.chat-msg.client { background: #e8faf6; margin-left: 34px; }
.chat-msg.manager { background: #f3f5f8; margin-right: 34px; }
.chat-msg.system { background: #eef4ff; color: #4f5f76; font-size: 13px; text-align: center; }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: white; }
.chat-input input { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.chat-attach {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9ff;
  color: #2458db;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.chat-attach input { display: none; }
.chat-attachments { display: grid; gap: 6px; margin-top: 8px; }
.chat-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: #183b86;
  text-decoration: none;
  font-weight: 850;
}
.chat-file small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.chat-list { display: grid; gap: 8px; }
.chat-row {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
  cursor: pointer;
}
.chat-row strong, .chat-row span { display: block; }
.chat-row span { color: var(--muted); margin-top: 4px; }
.chat-row em {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}
.admin-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.admin-chat-messages small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); background: #f9fbfd; }
.toast { position: fixed; right: 18px; bottom: 18px; background: var(--navy); color: white; padding: 12px 14px; border-radius: 8px; display: none; max-width: 360px; z-index: 50; }
.toast.show { display: block; }
.error { color: var(--danger); font-weight: 800; }

body {
  background:
    radial-gradient(circle at 1px 1px, rgba(38, 91, 220, .18) 1px, transparent 0) 0 0 / 34px 34px,
    linear-gradient(180deg, #f7f9ff 0%, #eef3fb 100%);
}
.landing-topbar {
  background: rgba(247,249,255,.82);
  border-bottom-color: rgba(33, 76, 166, .12);
}
.brand-mark {
  border-radius: 9px;
  background: #2458db;
  box-shadow: 0 12px 24px rgba(36,88,219,.18);
}
.brand-mark-large {
  border-radius: 11px;
  background: #2458db;
}
.btn {
  border-color: #9bb4e7;
  border-radius: 7px;
  background: #fff;
  color: #17243a;
  box-shadow: 0 1px 0 rgba(17, 38, 76, .03);
}
.btn.primary,
.btn.fund-btn {
  background: #2458db;
  border-color: #2458db;
  color: white;
}
.btn.gold,
.btn.fund-btn {
  background: #d8aa3f;
  border-color: #d8aa3f;
  color: #1c2638;
}
.btn.fund-btn {
  min-width: 230px;
  font-size: 17px;
  box-shadow: 0 0 0 4px rgba(36,88,219,.2);
}
.new-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
}
.new-hero::after {
  content: "";
  position: absolute;
  left: 40%;
  top: 22%;
  width: 430px;
  height: 520px;
  border-left: 2px solid rgba(36,88,219,.18);
  border-right: 2px solid rgba(36,88,219,.18);
  transform: skewX(24deg);
  pointer-events: none;
}
.eyebrow {
  color: #2458db;
  border-color: #bed0fb;
  background: rgba(255,255,255,.78);
}
.new-hero h1 {
  max-width: 820px;
  color: #142034;
}
.new-hero h1 strong,
.hero-copy em {
  color: #2458db;
  font-style: normal;
}
.hero-metrics {
  border-color: #9bb4e7;
  background: transparent;
  gap: 10px;
}
.hero-metrics div {
  border: 1px solid #9bb4e7;
  border-radius: 7px;
  background: rgba(255,255,255,.64);
}
.hero-metrics div:first-child {
  background: #2458db;
  color: white;
  border-color: #2458db;
}
.hero-metrics div:first-child span { color: rgba(255,255,255,.78); }
.flow-card {
  border-color: #d7e3fb;
  border-radius: 10px;
  box-shadow: 0 28px 70px rgba(29, 49, 90, .14);
}
.flow-head span,
.success-pill,
.status {
  background: #eef4ff;
  color: #1640a8;
}
.field label,
.amount-control label,
.section-kicker {
  color: #4c5a72;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea,
.amount-control input[type="number"],
.chat-input input {
  min-height: 54px;
  border: 1px solid #b6c8ee;
  border-radius: 7px;
  background: #fbfdff;
  color: #162238;
  font-weight: 650;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.amount-control input[type="number"]:focus,
.chat-input input:focus {
  border-color: #2458db;
  box-shadow: 0 0 0 4px rgba(36,88,219,.14);
}
.phone-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  border: 1px solid #b6c8ee;
  border-radius: 7px;
  background: #fbfdff;
  overflow: hidden;
}
.phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 13px;
  border-right: 1px solid #d5e1f6;
  background: #eef4ff;
  color: #173b8f;
  font-weight: 900;
  white-space: nowrap;
}
.phone-prefix b {
  font-size: 18px;
}
.field .phone-control input {
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 13px;
}
.phone-control:focus-within {
  border-color: #2458db;
  box-shadow: 0 0 0 4px rgba(36,88,219,.14);
}
input[type="range"] {
  height: 4px;
  accent-color: #2458db;
}
.app-shell {
  grid-template-columns: 230px 1fr;
  background: #f3f6fc;
}
.side {
  padding: 0;
  background: rgba(255,255,255,.94);
  color: #17243a;
  border-right: 1px solid #d5e1f6;
}
.side .brand { color: #17243a; }
.side .lang-select {
  width: calc(100% - 28px);
  margin: 14px;
  background: #f8fbff;
  color: #17243a;
  border-color: #d5e1f6;
}
.side a,
.side button {
  position: relative;
  color: #4f5f76;
  background: transparent;
  border: 0;
  border-top: 1px solid #e1e7f2;
  border-radius: 0;
  min-height: 58px;
  padding: 14px 22px;
  font-weight: 800;
  justify-content: flex-start;
}
.side a:hover,
.side button:hover,
.side a.active,
.side button.active {
  background: #f4f8ff;
  color: #17243a;
  border-color: #e1e7f2;
  box-shadow: none;
  transform: none;
}
.side a.active::before,
.side button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #24c6e8;
}
.side .brand-button::before,
.side .theme-toggle::before {
  display: none;
}
.side .brand-button,
.side .brand-button:hover,
.side .brand-button.active {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid #d5e1f6;
  border-radius: 0;
  background: #fff;
  color: #17243a;
  box-shadow: none;
}
.side .brand-button .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #2458db;
  box-shadow: none;
}
.side nav {
  display: grid;
  gap: 0;
  margin-top: 8px;
}
.side .theme-toggle {
  width: calc(100% - 28px);
  margin: 14px 14px 8px;
  border-radius: 10px;
  border: 1px solid #d5e1f6;
  background: #f8fbff;
}
.main {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 90px;
}
.main:has(#chatsTab:not(.hidden)) {
  padding-bottom: 22px;
}
.client-shell {
  display: block;
  min-height: 100vh;
  background: #f3f6fc;
}
.client-shell .main {
  max-width: 1160px;
  padding: 22px 24px 90px;
}
.panel,
.steps-panel,
.action-card,
.balance-card,
.withdraw-card {
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
.app-topline {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.topline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.topline-actions .lang-select {
  width: 86px;
  min-height: 44px;
  background: #fff;
  border-color: #d5e1f6;
  color: #17243a;
}
.topline-actions .btn {
  min-height: 44px;
  padding: 9px 14px;
}
.compact-brand .brand-mark { width: 38px; height: 38px; font-size: 20px; }
.client-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid #d5e1f6;
  border-radius: 999px;
  background: #fff;
}
.client-chip span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #173b8f;
  color: white;
  font-weight: 900;
}
.progress-top {
  padding: 20px 22px 18px;
  margin-bottom: 18px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: rgba(255,255,255,.86);
}
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: #17243a;
}
.progress-meta strong {
  font-size: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.progress-meta span { color: #56657d; font-weight: 850; }
.step-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.step-dot {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #7a8aa3;
  font-weight: 850;
}
.step-dot span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #b8c9ed;
  border-radius: 50%;
  background: #fff;
}
.step-dot.done span,
.step-dot.active span {
  border-color: #2458db;
  background: #2458db;
  color: white;
}
.step-dot.done,
.step-dot.active { color: #173b8f; }
.step-dot small { text-align: center; font-size: 12px; }
.progress-line {
  height: 10px;
  margin-top: 18px;
  border: 1px solid #7ea0e7;
  border-radius: 999px;
  overflow: hidden;
  background: #edf3ff;
}
.progress-line i {
  display: block;
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, #173b8f, #2458db);
}
.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 30px;
  background: linear-gradient(135deg, #effcf7 0%, #eaf3ff 100%);
}
.balance-card h1 {
  margin: 8px 0 14px;
  color: #0b8c62;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .95;
}
.mini-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mini-pills span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #99d7c7;
  border-radius: 999px;
  background: #f7fffc;
  color: #087953;
  font-weight: 850;
}
.mini-pills span.danger {
  border-color: #efb7b7;
  background: #fff7f7;
  color: #b92822;
}
.transfer-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.transfer-account,
.transfer-panel {
  border: 1px solid #b9cbf2;
  border-radius: 10px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
.transfer-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}
.transfer-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.transfer-person > span,
.node-logo,
.node-user {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #173b8f;
  color: white;
  font-weight: 950;
}
.transfer-account small,
.transfer-node small,
.transfer-timer span,
.transfer-title small {
  display: block;
  color: #60708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.transfer-account strong {
  color: #17243a;
  font-size: 18px;
}
.transfer-card-mask {
  padding: 10px 14px;
  border-left: 1px solid #d5e1f6;
}
.transfer-card-mask strong {
  letter-spacing: .08em;
}
.transfer-panel {
  padding: 22px;
  border-top: 3px solid #2458db;
}
.transfer-panel.failed {
  border-color: #c7332d;
  border-top-color: #c7332d;
}
.transfer-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.transfer-title h2 {
  margin: 3px 0 0;
  font-size: 26px;
  line-height: 1.05;
}
.bank-symbol,
.node-bank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #b9cbf2;
  border-radius: 10px;
  background: #f4f7ff;
  color: #173b8f;
  font-size: 22px;
}
.transfer-panel.failed .bank-symbol {
  border-color: #efb7b7;
  background: #fff2f2;
  color: #c7332d;
}
.transfer-panel > p {
  margin: 0 0 14px;
  color: #4f5f76;
}
.transfer-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background:
    radial-gradient(circle at 1px 1px, rgba(36,88,219,.1) 1px, transparent 0) 0 0 / 22px 22px,
    #f7faff;
}
.transfer-visual::before,
.transfer-visual::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24%;
  height: 2px;
  background: linear-gradient(90deg, #b9cbf2, #2458db);
}
.transfer-visual::before { left: 23%; }
.transfer-visual::after { right: 23%; }
.transfer-panel.failed .transfer-visual {
  background:
    linear-gradient(rgba(255,255,255,.62), rgba(255,255,255,.62)),
    radial-gradient(circle at 50% 50%, rgba(199,51,45,.18), transparent 32%),
    #f7faff;
}
.transfer-panel.failed .transfer-visual::after {
  background: #c7332d;
}
.transfer-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 150px;
  padding: 18px 12px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  text-align: center;
}
.transfer-node strong {
  color: #17243a;
  font-size: 16px;
}
.transfer-node.center {
  box-shadow: 0 16px 40px rgba(36,88,219,.14);
}
.transfer-timer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  color: #4f5f76;
  font-weight: 850;
}
.transfer-timer strong {
  display: inline-block;
  margin-top: 3px;
  color: #173b8f;
}
.transfer-panel.failed .transfer-timer strong,
.transfer-panel.failed #transferPercent {
  color: #b92822;
}
.transfer-progress {
  height: 9px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #dce7fb;
}
.transfer-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #173b8f, #2458db);
}
.transfer-panel.failed .transfer-progress i {
  background: #c7332d;
}
.transfer-panel .btn.danger {
  width: 100%;
  margin-top: 14px;
  background: #c7332d;
  color: white;
}
.certificate-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
.certificate-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.certificate-title h2 {
  margin: 3px 0 0;
  font-size: 26px;
  line-height: 1.08;
}
.certificate-title small {
  display: block;
  color: #60708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cert-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #173b8f;
  border-radius: 12px;
  color: #173b8f;
  font-size: 24px;
  font-weight: 900;
}
.certificate-section p {
  margin: 0;
  color: #4f5f76;
}
.certificate-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7fb;
}
.certificate-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2458db, #20b99f);
}
.certificate-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4f5f76;
  font-weight: 850;
}
.certificate-visual {
  display: grid;
  grid-template-columns: .7fr 1.1fr .7fr;
  gap: 16px;
  align-items: center;
  justify-items: center;
  padding: 18px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background:
    radial-gradient(circle at 1px 1px, rgba(36,88,219,.08) 1px, transparent 0) 0 0 / 24px 24px,
    #f7faff;
}
.certificate-paper-mini {
  display: grid;
  gap: 8px;
  width: min(230px, 100%);
  min-height: 170px;
  padding: 18px;
  border: 1px solid #b9cbf2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(36,88,219,.12);
}
.certificate-paper-mini strong {
  color: #173b8f;
  font-size: 18px;
}
.certificate-paper-mini span {
  color: #60708a;
  font-weight: 800;
}
.certificate-paper-mini em {
  align-self: end;
  width: max-content;
  padding: 6px 10px;
  border: 2px solid #20b99f;
  border-radius: 999px;
  color: #0b8c62;
  font-style: normal;
  font-weight: 950;
  transform: rotate(-8deg);
}
#insuranceCertificateDialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}
.certificate-sheet {
  width: 100%;
  height: min(820px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 10px;
  padding: 16px 18px;
  overflow: hidden;
}
.certificate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.certificate-sheet h1 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.08;
}
.certificate-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #4d5a70;
  cursor: pointer;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.certificate-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  border: 1px solid #c6d6f2;
  border-radius: 10px;
  background: #fff;
}
.certificate-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  object-fit: contain;
}
.certificate-actions {
  display: flex;
  justify-content: center;
}
.certificate-actions .btn {
  width: min(320px, 100%);
}
.confirm-sheet {
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}
.confirm-sheet h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
}
.confirm-check {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background: #f4f7ff;
  font-weight: 850;
}
.confirm-check input {
  width: 26px;
  height: 26px;
  accent-color: #2458db;
}
.funds-ready-section {
  border-color: #9edbc6;
  background: linear-gradient(135deg, #f2fff9, #fff);
}
.unlock-section {
  border-color: #c6d6f2;
  background: linear-gradient(135deg, #f8fbff, #fff);
}
.unlock-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background:
    radial-gradient(circle at 1px 1px, rgba(36,88,219,.1) 1px, transparent 0) 0 0 / 22px 22px,
    #f7faff;
}
.unlock-node {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 142px;
  padding: 18px 12px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  text-align: center;
}
.unlock-node strong {
  color: #17243a;
  font-size: 16px;
}
.unlock-node small {
  color: #60708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.unlock-timer {
  margin-top: 16px;
}
.unlock-progress {
  margin-bottom: 14px;
}
.unlock-progress i {
  background: linear-gradient(90deg, #2458db, #20b99f);
}
.receipt-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef4ff;
  color: #173b8f;
  font-size: 24px;
  font-weight: 950;
}
.telegram-limit-sheet,
.telegram-help-sheet {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin-inline: auto;
  display: grid;
  gap: 16px;
  text-align: center;
  border-top: 4px solid #e1264b;
}
.telegram-limit-sheet h1,
.telegram-help-sheet h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}
.limit-lock,
.telegram-help-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 20px;
  background: #fff0f2;
  color: #b61f3c;
  border: 1px solid #f1b8c4;
  font-size: 30px;
  font-weight: 950;
  box-shadow: 0 0 0 18px rgba(225, 38, 75, .05);
}
.telegram-help-icon {
  background: #eef9ff;
  color: #23a8e9;
  border-color: #cfedfa;
  box-shadow: none;
}
.limit-kicker {
  justify-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff0f2;
  color: #b61f3c;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
}
.limit-note {
  padding: 18px;
  border-radius: 10px;
  background: #fff0f2;
  border: 1px solid #efbcc6;
  color: #a21634;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}
.telegram-limit-sheet .btn.danger,
.telegram-help-sheet .btn.danger,
#unlockTelegramBtn.btn.danger {
  background: linear-gradient(135deg, #ff315f, #d91443);
  border-color: #d91443;
  color: #fff;
  box-shadow: 0 12px 24px rgba(225, 38, 75, .18);
}
.link-btn {
  border: 0;
  background: transparent;
  color: #7a2636;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}
.telegram-help-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f4f7ff;
  border: 1px solid #d5e1f6;
  text-align: left;
  list-style: none;
}
.telegram-help-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
}
.telegram-help-steps span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #29b6ed;
  color: #fff;
  font-weight: 950;
}
.telegram-help-steps strong {
  color: #17243a;
  line-height: 1.25;
}
.steps-panel {
  padding: 22px;
  margin-bottom: 18px;
  background: #fff;
}
.steps-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}
.steps-head h2 {
  margin: 0;
  color: #4b5870;
  font-size: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.steps-head strong { color: #4f5f76; }
.step-list { display: grid; gap: 10px; }
.step-item {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f4f7ff;
  color: #17243a;
  text-align: left;
  cursor: pointer;
}
.step-item:disabled,
.action-card:disabled {
  cursor: default;
  opacity: .72;
}
.step-item strong,
.step-item small { display: block; }
.step-item strong {
  grid-column: 2;
  grid-row: 1;
}
.step-item small {
  grid-column: 2;
  grid-row: 2;
  margin-top: 4px;
  color: #66748a;
  font-weight: 650;
}
.step-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2458db;
  color: white;
  font-weight: 900;
}
.step-item em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  color: #2458db;
  font-style: normal;
  font-size: 26px;
  font-weight: 900;
}
.step-item.complete {
  background: #fff;
  border-color: transparent;
}
.step-item.complete:disabled,
.action-card.disabled:disabled {
  opacity: 1;
}
.step-item.complete em { color: #2458db; }
.step-item.disabled em { color: #2458db; }
.step-item:not(.complete):hover,
.action-card:hover {
  border-color: #2458db;
  box-shadow: 0 14px 34px rgba(36, 88, 219, .12);
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.action-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.action-card strong,
.action-card small { display: block; }
.action-card strong {
  align-self: center;
  min-width: 0;
}
.action-card small {
  grid-column: 1 / -1;
  margin-top: 5px;
  color: #66748a;
  line-height: 1.4;
  max-width: 720px;
}
.action-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf3ff;
  color: #173b8f;
  font-weight: 900;
}
.withdraw-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: 24px;
  background: #15314a;
}
.document-options {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.document-options label {
  display: grid;
  grid-template-columns: 22px 46px 1fr;
  column-gap: 12px;
  row-gap: 3px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px solid #9bb4e7;
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}
.document-options label > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: #173b8f;
  font-weight: 900;
}
.document-options input {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.document-options label > span {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.document-options strong,
.document-options small { display: block; }
.document-options strong {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
}
.document-options small {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  color: #66748a;
}
input[type="file"] {
  padding: 13px;
  background: #fff;
}
.payment-dialog,
.contract-dialog {
  border-radius: 10px;
}
.payment-sheet {
  border-top: 4px solid #2458db;
}
.fee-sheet {
  padding: 18px;
  border-top: 0;
  background: #fff;
}
.fee-modal-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: start;
  text-align: center;
  margin-bottom: 14px;
}
.fee-modal-head span {
  display: block;
  color: #4b5870;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.fee-modal-head h1 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.08;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b5870;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  appearance: none;
  box-shadow: none;
}
.icon-btn:hover { background: #edf3ff; color: #173b8f; }
.icon-btn:focus,
.icon-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #d5e1f6;
  background: #f7f9ff;
}
.fee-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #b9cbf2;
  border-radius: 9px;
  background: #f7f9ff;
}
.fee-tabs span,
.fee-tabs strong {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 8px;
  color: #4f5f76;
  font-weight: 900;
  font-size: 15px;
  text-align: center;
}
.fee-tabs .active {
  background: #2458db;
  color: white;
}
.fee-sheet .fee-total {
  margin: 0 0 10px;
  padding: 16px 18px;
  border: 1px solid #9bb4e7;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  color: #173b8f;
}
.fee-sheet .fee-total span {
  color: #2458db;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.fee-sheet .fee-total strong {
  display: inline-block;
  font-size: clamp(38px, 7vw, 54px);
  line-height: 1;
}
.fee-sheet .fee-total small {
  margin-left: 6px;
  color: #173b8f;
  font-size: 16px;
  font-weight: 900;
}
.fee-sheet .fee-breakdown {
  gap: 0;
  margin-top: -10px;
  padding: 8px 18px 12px;
  border: 1px solid #9bb4e7;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
}
.fee-sheet .fee-breakdown div {
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.fee-sheet .fee-breakdown dd {
  color: #173b8f;
  font-size: 15px;
}
.fee-sheet .fee-breakdown dt {
  font-size: 15px;
}
.fee-info {
  position: relative;
  margin: 12px 0;
  padding: 12px 42px 12px 16px;
  border: 1px solid #65b5a0;
  border-radius: 8px;
  background: #f0fbf7;
  color: #145b4c;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}
.fee-info::after {
  content: "?";
  position: absolute;
  right: -10px;
  top: -12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid #dff7ec;
  border-radius: 50%;
  background: #fff;
  color: #0b8c62;
  font-weight: 950;
}
.fee-sheet .payment-card {
  background: #f8fbff;
  border-color: #b9cbf2;
}
.fee-sheet .payment-card {
  padding: 12px 14px;
  margin-bottom: 12px;
}
.fee-sheet .payment-card strong {
  font-size: 16px;
}
.fee-sheet .field {
  margin: 10px 0;
}
.fee-sheet .field input {
  min-height: 46px;
}
.fee-sheet .payment-waiting {
  margin-top: 12px;
  padding: 16px;
}
.fee-sheet .payment-waiting strong {
  font-size: 18px;
}
.bank-sent-dialog {
  width: min(430px, calc(100vw - 28px));
}
.card-dialog {
  width: min(440px, calc(100vw - 28px));
}
.card-sheet {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-top: 0;
}
.card-sheet h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.08;
}
.card-sheet .hint {
  margin: 0;
  color: #4f5f76;
  line-height: 1.45;
}
.card-sheet .field {
  margin: 4px 0 10px;
}
.card-sheet input {
  min-height: 52px;
  font-size: 18px;
  letter-spacing: .06em;
}
.bank-sent-sheet {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-top: 0;
}
.bank-sent-sheet .bank-symbol {
  margin-bottom: 2px;
}
.bank-sent-sheet h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}
.bank-sent-sheet .hint {
  margin: 0;
  color: #4f5f76;
  line-height: 1.45;
}
.sent-timebox {
  display: grid;
  gap: 4px;
  margin: 4px 0;
  padding: 12px 14px;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  background: #f7faff;
}
.sent-timebox span {
  color: #60708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sent-timebox strong {
  color: #173b8f;
}
.table-wrap {
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
th {
  color: #4b5870;
  letter-spacing: .06em;
  text-transform: uppercase;
}
td { color: #17243a; }
.row-open > td {
  background: #f7faff;
  border-bottom-color: transparent;
}
.details-row > td {
  padding: 0 16px 18px;
  background: #f7faff;
}
.inline-details {
  border: 1px solid #b9cbf2;
  border-radius: 10px;
  background: #fff;
  padding: 22px;
  box-shadow: inset 4px 0 0 #2458db, 0 16px 34px rgba(24, 43, 79, .08);
}
.inline-details h2 {
  margin: 0 0 16px;
  font-size: 28px;
}
.payment-stages {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #f7faff;
}
.payment-stages h3 {
  margin: 0 0 12px;
  color: #4b5870;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.payment-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.payment-stage {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  background: #fff;
}
.payment-stage strong,
.payment-stage span,
.payment-stage em {
  display: block;
}
.payment-stage strong {
  font-size: 15px;
  color: #17243a;
}
.payment-stage span {
  margin-top: 4px;
  color: #173b8f;
  font-weight: 900;
}
.payment-stage em {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf3ff;
  color: #173b8f;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.payment-stage.paid {
  border-color: #9edbc6;
  background: #f2fff9;
}
.payment-stage.paid em {
  background: #ddf8ee;
  color: #087552;
}
.payment-stage.review {
  border-color: #f1c96b;
  background: #fff9e9;
}
.payment-stage.review em {
  background: #fff0c1;
  color: #8b5a00;
}
.payment-stage.locked {
  opacity: .68;
}
.inline-details #editApp.panel {
  margin: 16px 0;
  box-shadow: none;
}
.admin-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(520px, 1.6fr);
  gap: 28px;
  align-items: end;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,250,255,.96)),
    radial-gradient(circle at 90% 10%, rgba(36,88,219,.08), transparent 36%);
}
.admin-panel h2 {
  margin: 8px 0 0;
  font-size: 40px;
  line-height: 1;
}
.admin-panel-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.admin-panel-actions .btn {
  min-width: 150px;
  min-height: 48px;
}
.dashboard-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.crm-analytics-dashboard {
  position: relative;
  display: grid;
  gap: 16px;
}
.crm-analytics-dashboard::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 12%, rgba(36, 88, 219, .1), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(32, 185, 159, .09), transparent 28%);
}
.dashboard-hero .hint {
  margin: 8px 0 0;
}
.dashboard-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 16px;
}
.dashboard-visual-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .05);
}
.area-chart {
  position: relative;
  min-height: 250px;
  padding: 6px 0 22px;
}
.area-chart svg {
  width: 100%;
  height: 250px;
  display: block;
}
.chart-grid-line {
  fill: none;
  stroke: rgba(112, 130, 166, .18);
  stroke-width: 1;
}
.chart-area {
  stroke: none;
}
.chart-area.blue { fill: url(#areaBlue); }
.chart-area.cyan { fill: url(#areaCyan); }
.chart-stroke {
  fill: none;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 10px 18px rgba(36, 88, 219, .22));
}
.chart-stroke.blue { stroke: #2458db; }
.chart-stroke.cyan { stroke: #20b99f; }
.chart-hover-line {
  opacity: 0;
  stroke: rgba(122, 135, 157, .46);
  stroke-width: 1;
  stroke-dasharray: 5 7;
  transition: opacity .12s ease;
}
.chart-hover-point {
  opacity: 0;
  fill: #fff;
  stroke-width: 4;
  transition: opacity .12s ease;
}
.chart-hover-point.blue {
  stroke: #2458db;
}
.chart-hover-point.cyan {
  stroke: #20b99f;
}
.area-chart.is-hovering .chart-hover-line,
.area-chart.is-hovering .chart-hover-point {
  opacity: 1;
}
.chart-tooltip {
  position: absolute;
  z-index: 4;
  width: 198px;
  display: none;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid #b9cbf2;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  color: #17243a;
  box-shadow: 0 18px 38px rgba(24, 43, 79, .16);
  pointer-events: none;
}
.area-chart.is-hovering .chart-tooltip {
  display: grid;
}
.chart-tooltip strong {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chart-tooltip span {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #5d6b82;
  font-size: 12px;
  font-weight: 850;
}
.chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.chart-tooltip i.blue { background: #2458db; }
.chart-tooltip i.cyan { background: #20b99f; }
.chart-tooltip b {
  color: #17243a;
}
.area-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  color: #7a879d;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dashboard-donut-card {
  display: grid;
  align-content: start;
}
.donut-wrap {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 12px 0 4px;
}
.analytics-donut {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    conic-gradient(#20b99f 0 var(--paid), #2458db var(--paid) var(--review), #8d6bf7 var(--review) 100%);
  box-shadow: inset 0 0 0 18px rgba(255,255,255,.14), 0 18px 44px rgba(24, 43, 79, .08);
}
.analytics-donut::after {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e7f5;
}
.analytics-donut span,
.analytics-donut small {
  position: relative;
  z-index: 1;
}
.analytics-donut span {
  color: #17243a;
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}
.analytics-donut small {
  color: #7a879d;
  font-weight: 900;
  text-transform: uppercase;
}
.donut-legend {
  width: 100%;
  display: grid;
  gap: 10px;
}
.donut-legend span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #667482;
  font-weight: 850;
}
.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.donut-legend i.cyan { background: #20b99f; }
.donut-legend i.blue { background: #2458db; }
.donut-legend i.violet { background: #8d6bf7; }
.donut-legend b {
  color: #17243a;
}
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.metric-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .05);
}
.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 13px 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 88, 219, .38), transparent);
}
.metric-card span {
  color: #64718a;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.metric-card strong {
  color: #17243a;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}
.metric-card small {
  color: #6f7b8f;
  font-weight: 800;
}
.metric-card.blue { background: linear-gradient(135deg, #eef4ff, #fff); border-color: #b9cbf2; }
.metric-card.green { background: linear-gradient(135deg, #effcf7, #fff); border-color: #9edbc6; }
.metric-card.gold { background: linear-gradient(135deg, #fff8e5, #fff); border-color: #f1c96b; }
.metric-card.red { background: linear-gradient(135deg, #fff0f0, #fff); border-color: #f1aaaa; }
.metric-card.green strong { color: #098661; }
.metric-card.gold strong { color: #9a6500; }
.metric-card.red strong { color: #bd2b2b; }
.metric-spark {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 30px;
  margin-top: auto;
  opacity: .9;
}
.metric-spark i {
  flex: 1;
  min-width: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #20b99f, #2458db);
}
.metric-spark i:nth-child(1) { height: 35%; }
.metric-spark i:nth-child(2) { height: 68%; }
.metric-spark i:nth-child(3) { height: 48%; }
.metric-spark i:nth-child(4) { height: 82%; }
.metric-spark i:nth-child(5) { height: 56%; }
.metric-spark i:nth-child(6) { height: 72%; }
.metric-spark i:nth-child(7) { height: 44%; }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.dashboard-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .05);
}
.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-card-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}
.dashboard-card-head span {
  color: #64718a;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dashboard-stages,
.dashboard-statuses,
.dashboard-list {
  display: grid;
  gap: 10px;
}
.stage-line,
.status-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}
.status-line {
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) 34px;
}
.stage-line > span,
.status-line > span {
  color: #4f5f76;
  font-size: 13px;
  font-weight: 900;
}
.stage-line > div,
.status-line > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2fc;
}
.stage-line i,
.status-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2458db, #20b99f);
}
.stage-line strong,
.status-line strong {
  text-align: right;
  color: #17243a;
}
.dashboard-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  text-align: left;
  cursor: pointer;
}
.dashboard-row:hover {
  border-color: #9bb4e7;
  background: #f4f8ff;
}
.dashboard-row.passive {
  cursor: default;
}
.dashboard-row.passive:hover {
  border-color: #d5e1f6;
  background: #fbfdff;
}
.dashboard-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.dashboard-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-row small {
  color: #6f7b8f;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-row b {
  flex: 0 0 auto;
  color: #173b8f;
}
.admin-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.admin-filters .search-wrap {
  grid-column: span 2;
}
.control-wrap {
  display: grid;
  gap: 7px;
  margin: 0;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-weight: 850;
  color: var(--ink);
}
.checkline.compact {
  min-height: 34px;
  font-size: 13px;
}
.checkline input {
  width: 18px;
  height: 18px;
  accent-color: #2458db;
}
.control-wrap span {
  color: #64718a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.admin-filters select,
.admin-filters input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background-color: #fbfdff;
  color: #17243a;
  font-size: 15px;
  font-weight: 760;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.admin-filters select {
  appearance: none;
  padding: 0 42px 0 14px;
  background-image:
    linear-gradient(45deg, transparent 50%, #51617a 50%),
    linear-gradient(135deg, #51617a 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 22px,
    calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.admin-filters input {
  padding: 0 15px;
}
.admin-filters input::placeholder {
  color: #8a96aa;
  font-weight: 700;
}
.admin-filters select:focus,
.admin-filters input:focus {
  border-color: #2458db;
  box-shadow: 0 0 0 4px rgba(36,88,219,.13);
}
.admin-filters .btn {
  min-height: 50px;
  border-radius: 8px;
  font-size: 15px;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #4f5f76;
  font-weight: 850;
}
.pagination .btn {
  min-height: 40px;
  padding: 8px 14px;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.row-actions .btn {
  min-height: 38px;
  padding: 8px 12px;
}
.table-status-select,
.table-action-select {
  width: 100%;
  max-width: 230px;
  min-height: 40px;
  border: 1px solid #b9cbf2;
  border-radius: 999px;
  background-color: #f4f7ff;
  color: #173b8f;
  font-size: 14px;
  font-weight: 900;
  padding: 0 34px 0 14px;
  outline: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #51617a 50%),
    linear-gradient(135deg, #51617a 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 17px,
    calc(100% - 13px) 17px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.table-action-select {
  max-width: 190px;
  background-color: #fff;
  color: #17243a;
}
.table-status-select:focus,
.table-action-select:focus {
  border-color: #2458db;
  box-shadow: 0 0 0 4px rgba(36,88,219,.12);
}
.btn.small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}
.table-wrap td input,
.table-wrap td select,
.user-inline-form input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  padding: 7px 10px;
  font-weight: 700;
}
.user-inline-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.crm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 23, 38, .52);
}
.crm-modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid #d5e1f6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 45, 84, .24);
}
.crm-modal-card h2 {
  margin: 6px 0 18px;
  font-size: 30px;
  line-height: 1;
}
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #46546b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.modal-form {
  display: grid;
  gap: 13px;
}
.modal-form select,
.modal-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background-color: #fbfdff;
  color: #17243a;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 760;
  outline: none;
}
.modal-form select:focus,
.modal-form input:focus {
  border-color: #2458db;
  box-shadow: 0 0 0 4px rgba(36,88,219,.13);
}
.modal-form .btn {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}
.telegram-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  height: min(760px, calc(100dvh - 78px));
  min-height: 560px;
  max-height: calc(100dvh - 78px);
  border: 1px solid #d5e1f6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
.main:has(#chatsTab:not(.hidden)) .telegram-shell {
  height: calc(100dvh - 44px);
  max-height: calc(100dvh - 44px);
}
.telegram-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #d5e1f6;
  background: #fff;
  min-width: 0;
  min-height: 0;
}
.telegram-list-head {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #d5e1f6;
}
.telegram-list-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}
.telegram-list-head .btn {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}
.chat-head-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chat-head-actions select {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  font-weight: 800;
  padding: 0 30px 0 10px;
  font-size: 14px;
}
.telegram-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(36,88,219,.08) 1px, transparent 0) 0 0 / 26px 26px,
    #eef3fb;
}
.telegram-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 18px;
  border-bottom: 1px solid #d5e1f6;
  background: rgba(255,255,255,.94);
}
.telegram-chat-head > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.telegram-chat-head h2 {
  margin: 0;
  font-size: 20px;
}
.telegram-chat-head span {
  display: block;
  color: #66748a;
  font-weight: 700;
  margin-top: 3px;
}
.chat-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2458db, #173b8f);
  color: white;
  font-weight: 950;
}
.telegram-list .chat-list {
  display: block;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}
.telegram-list .chat-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
}
.telegram-list .chat-row:hover,
.telegram-list .chat-row.active {
  background: #edf3ff;
}
.telegram-list .chat-row .chat-avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}
.chat-row-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.chat-row-tags {
  display: flex !important;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 3px;
}
.telegram-list .chat-row strong,
.telegram-list .chat-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.telegram-list .chat-row strong {
  color: #17243a;
  font-size: 15px;
  line-height: 1.12;
}
.telegram-list .chat-row small {
  color: #66748a;
  margin-top: 2px;
  font-weight: 700;
  font-size: 13px;
}
.telegram-list .chat-row time {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  color: #8a96aa;
  font-size: 12px;
  font-weight: 800;
}
.user-id-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: #173b8f;
  border: 1px solid #b9cbf2;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}
.stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf8f4;
  color: #0b806c;
  border: 1px solid #9edbc6;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.telegram-list .user-id-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 6px;
  margin: 0;
  vertical-align: 1px;
  font-size: 10px;
}
.telegram-list .stage-badge {
  display: inline-flex !important;
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  min-height: 20px;
  padding: 2px 6px;
  margin: 0;
  font-size: 10px;
  vertical-align: 1px;
}
.telegram-chat-head .user-id-badge {
  gap: 6px;
  width: auto;
  max-width: max-content;
}
.telegram-chat-head .stage-badge {
  display: inline-flex !important;
  width: auto;
  max-width: max-content;
  margin-left: 0;
}
.chat-status-select {
  flex: 0 1 230px;
  max-width: 230px;
  min-height: 38px;
  padding: 7px 32px 7px 10px;
  border: 1px solid #b9cbf2;
  border-radius: 8px;
  background: white;
  color: #17243a;
  font-weight: 850;
}
.telegram-list .chat-row em {
  position: absolute;
  right: 8px;
  bottom: 6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #20b99f;
  color: white;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}
.telegram-chat .admin-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.telegram-chat .admin-chat-messages .chat-msg {
  max-width: min(68%, 620px);
  padding: 9px 12px 6px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(24, 43, 79, .06);
}
.telegram-chat .admin-chat-messages .chat-msg.client {
  align-self: flex-start;
  margin: 0;
  background: #fff;
  border-bottom-left-radius: 4px;
}
.telegram-chat .admin-chat-messages .chat-msg.manager {
  align-self: flex-end;
  margin: 0;
  background: #dff7ec;
  border-bottom-right-radius: 4px;
}
.telegram-chat .admin-chat-messages .chat-msg.system {
  align-self: center;
  max-width: min(78%, 720px);
  background: rgba(238, 244, 255, .92);
  border: 1px solid #d5e1f6;
  border-radius: 999px;
  box-shadow: none;
  text-align: center;
}
.telegram-chat .admin-chat-messages .chat-msg div {
  color: #17243a;
  line-height: 1.35;
}
.telegram-chat .admin-chat-messages small {
  display: block;
  margin-top: 4px;
  color: #7b8799;
  text-align: right;
  font-size: 11px;
}
.telegram-chat .admin-chat-messages .chat-file small,
.admin-chat-messages .chat-file small {
  display: inline;
  margin: 0;
  text-align: right;
  font-size: 11px;
}
.telegram-chat .admin-chat-messages .chat-msg.system:has(.chat-attachments) {
  border-radius: 14px;
  text-align: left;
}
.telegram-chat .chat-input {
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #d5e1f6;
  background: rgba(255,255,255,.94);
}
.telegram-chat .chat-input input {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
}
.telegram-chat .chat-input .btn {
  min-height: 48px;
  border-radius: 999px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.theme-toggle-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: #2458db;
}
.theme-toggle.active {
  background: #101b2d;
  color: #eaf1ff;
  border-color: #2d3e5e;
}
.theme-toggle.active .theme-toggle-icon {
  background: #f0c65b;
  color: #1b2434;
}
.side .theme-toggle + nav {
  margin-top: 0;
}

html[data-crm-theme="dark"] {
  --bg: #0b1220;
  --panel: #111b2e;
  --ink: #e7eefc;
  --muted: #9aa8bf;
  --line: #263650;
  --accent: #24c6ad;
  --accent-dark: #16a18d;
  --gold: #d8aa3f;
  --danger: #ff5d5d;
  --navy: #0d1728;
  --soft: #0f2a27;
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
}
html[data-crm-theme="dark"] body:has(.app-shell) {
  background:
    radial-gradient(circle at 18% 0%, rgba(36,88,219,.2), transparent 32%),
    radial-gradient(circle at 95% 10%, rgba(32,185,159,.16), transparent 30%),
    linear-gradient(180deg, #080e19 0%, #0d1627 100%);
  color: var(--ink);
}
html[data-crm-theme="dark"] .app-shell,
html[data-crm-theme="dark"] .main {
  background: transparent;
}
html[data-crm-theme="dark"] .side {
  background: rgba(9, 15, 27, .94);
  border-right-color: #22314a;
  box-shadow: 18px 0 42px rgba(0,0,0,.18);
}
html[data-crm-theme="dark"] .brand-button {
  background: rgba(9, 15, 27, .94);
  color: #f4f8ff;
  border-color: #22314a;
}
html[data-crm-theme="dark"] .brand-button:hover,
html[data-crm-theme="dark"] .brand-button.active {
  background: rgba(13, 23, 40, .94);
  color: #f4f8ff;
}
html[data-crm-theme="dark"] .side .brand-button .brand-mark {
  background: #2458db;
}
html[data-crm-theme="dark"] .lang-select,
html[data-crm-theme="dark"] select,
html[data-crm-theme="dark"] input,
html[data-crm-theme="dark"] textarea {
  background: #0e182a;
  color: var(--ink);
  border-color: #2b3c59;
}
html[data-crm-theme="dark"] .side nav button {
  color: #aebbd1;
  background: transparent;
  border-color: #22314a;
}
html[data-crm-theme="dark"] .side nav button:hover,
html[data-crm-theme="dark"] .side nav button.active {
  background: rgba(19, 32, 54, .84);
  color: #f4f8ff;
  border-color: #22314a;
}
html[data-crm-theme="dark"] .side .theme-toggle {
  background: #0e182a;
  border-color: #2b3c59;
  color: #e7eefc;
}
html[data-crm-theme="dark"] .side .theme-toggle.active {
  background: #132036;
  border-color: #314562;
}
html[data-crm-theme="dark"] .panel,
html[data-crm-theme="dark"] .admin-panel,
html[data-crm-theme="dark"] .dashboard-visual-card,
html[data-crm-theme="dark"] .dashboard-card,
html[data-crm-theme="dark"] .metric-card,
html[data-crm-theme="dark"] .details-card,
html[data-crm-theme="dark"] .crm-modal-card,
html[data-crm-theme="dark"] .payment-sheet,
html[data-crm-theme="dark"] .contract-paper {
  background: rgba(17, 27, 46, .94);
  border-color: #2b3c59;
  color: var(--ink);
  box-shadow: var(--shadow);
}
html[data-crm-theme="dark"] .dashboard-hero,
html[data-crm-theme="dark"] .dashboard-card-head,
html[data-crm-theme="dark"] .table-wrap,
html[data-crm-theme="dark"] .payment-stage-grid,
html[data-crm-theme="dark"] .telegram-shell {
  background: rgba(13, 23, 40, .72);
  border-color: #2b3c59;
}
html[data-crm-theme="dark"] .crm-analytics-dashboard::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 217, 255, .12), transparent 28%),
    radial-gradient(circle at 85% 16%, rgba(141, 107, 247, .12), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(36, 88, 219, .09), transparent 36%);
}
html[data-crm-theme="dark"] .dashboard-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(12, 20, 35, .96), rgba(19, 30, 50, .9)),
    radial-gradient(circle at 84% 18%, rgba(32, 185, 159, .16), transparent 34%);
}
html[data-crm-theme="dark"] .dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto 22px 16px auto;
  width: 230px;
  height: 60px;
  opacity: .5;
  background: repeating-linear-gradient(90deg, #1dd7f2 0 5px, transparent 5px 11px);
  clip-path: polygon(0 70%, 8% 35%, 16% 60%, 24% 20%, 34% 55%, 44% 32%, 54% 64%, 64% 24%, 74% 48%, 84% 18%, 100% 44%, 100% 100%, 0 100%);
}
html[data-crm-theme="dark"] .dashboard-visual-card,
html[data-crm-theme="dark"] .metric-card,
html[data-crm-theme="dark"] .dashboard-card {
  background:
    linear-gradient(145deg, rgba(18, 29, 49, .96), rgba(11, 18, 31, .96));
  border-color: #263956;
}
html[data-crm-theme="dark"] .dashboard-visual-card {
  box-shadow: 0 24px 70px rgba(0,0,0,.2);
}
html[data-crm-theme="dark"] .chart-grid-line {
  stroke: rgba(162, 180, 214, .13);
}
html[data-crm-theme="dark"] .chart-hover-line {
  stroke: rgba(207, 224, 255, .45);
}
html[data-crm-theme="dark"] .chart-tooltip {
  background: rgba(8, 14, 25, .94);
  border-color: #34528d;
  color: #f2f7ff;
  box-shadow: 0 18px 44px rgba(0,0,0,.3);
}
html[data-crm-theme="dark"] .chart-tooltip span {
  color: #aebbd1;
}
html[data-crm-theme="dark"] .chart-tooltip b {
  color: #f2f7ff;
}
html[data-crm-theme="dark"] .area-axis,
html[data-crm-theme="dark"] .dashboard-card-head span,
html[data-crm-theme="dark"] .donut-legend span {
  color: #8fa0ba;
}
html[data-crm-theme="dark"] .analytics-donut {
  box-shadow: inset 0 0 0 18px rgba(11, 18, 31, .52), 0 24px 54px rgba(0,0,0,.22);
}
html[data-crm-theme="dark"] .analytics-donut::after {
  background: #111b2e;
  border-color: #263956;
}
html[data-crm-theme="dark"] .analytics-donut span,
html[data-crm-theme="dark"] .donut-legend b {
  color: #f2f7ff;
}
html[data-crm-theme="dark"] .analytics-donut small {
  color: #8fa0ba;
}
html[data-crm-theme="dark"] .metric-card::after {
  background: linear-gradient(90deg, transparent, rgba(29, 215, 242, .34), transparent);
}
html[data-crm-theme="dark"] .hint,
html[data-crm-theme="dark"] .section-kicker,
html[data-crm-theme="dark"] .control-wrap span,
html[data-crm-theme="dark"] .telegram-chat-head span {
  color: var(--muted);
}
html[data-crm-theme="dark"] table,
html[data-crm-theme="dark"] th,
html[data-crm-theme="dark"] td {
  background: #111b2e;
  border-color: #263650;
  color: var(--ink);
}
html[data-crm-theme="dark"] th {
  background: #0e182a;
  color: #aebbd1;
}
html[data-crm-theme="dark"] tr:hover td,
html[data-crm-theme="dark"] .dashboard-row:hover {
  background: #14233b;
}
html[data-crm-theme="dark"] .dashboard-row {
  background: #101b2d;
  color: var(--ink);
  border-color: #2b3c59;
}
html[data-crm-theme="dark"] .dashboard-row:hover {
  background: #162640;
  border-color: #416398;
}
html[data-crm-theme="dark"] .dashboard-row.passive,
html[data-crm-theme="dark"] .dashboard-row.passive:hover {
  background: #101b2d;
  border-color: #2b3c59;
}
html[data-crm-theme="dark"] .dashboard-row small {
  color: #aebbd1;
}
html[data-crm-theme="dark"] .dashboard-row b {
  color: #8fb3ff;
}
html[data-crm-theme="dark"] .btn {
  background: #101b2d;
  color: var(--ink);
  border-color: #2b3c59;
}
html[data-crm-theme="dark"] .btn.primary {
  background: #2458db;
  color: white;
  border-color: #3d6df0;
}
html[data-crm-theme="dark"] .btn.gold {
  background: #d8aa3f;
  color: #162033;
  border-color: #e6bf5b;
}
html[data-crm-theme="dark"] .user-id-badge {
  background: #112347;
  color: #b9cbff;
  border-color: #34528d;
}
html[data-crm-theme="dark"] .stage-badge {
  background: #0d302d;
  color: #7ef2df;
  border-color: #23786e;
}
html[data-crm-theme="dark"] .status-pill,
html[data-crm-theme="dark"] .tag {
  background: #102947;
  color: #c9dcff;
  border-color: #30588f;
}
html[data-crm-theme="dark"] .metric-card.blue,
html[data-crm-theme="dark"] .metric-card.green,
html[data-crm-theme="dark"] .metric-card.gold,
html[data-crm-theme="dark"] .metric-card.red {
  background: rgba(17, 34, 58, .96);
}
html[data-crm-theme="dark"] .metric-card span {
  color: #b8c6dd;
}
html[data-crm-theme="dark"] .metric-card strong {
  color: #f2f7ff;
  text-shadow: 0 8px 22px rgba(0,0,0,.2);
}
html[data-crm-theme="dark"] .metric-card small {
  color: #c3cee0;
}
html[data-crm-theme="dark"] .metric-card.blue strong {
  color: #7ea7ff;
}
html[data-crm-theme="dark"] .metric-card.green strong {
  color: #20c995;
}
html[data-crm-theme="dark"] .metric-card.gold strong {
  color: #e4ad24;
}
html[data-crm-theme="dark"] .metric-card.red strong {
  color: #ff5d5d;
}
html[data-crm-theme="dark"] .stage-line div,
html[data-crm-theme="dark"] .status-line div,
html[data-crm-theme="dark"] .progress-track {
  background: #1a2942;
}
html[data-crm-theme="dark"] .stage-line i,
html[data-crm-theme="dark"] .status-line i {
  background: linear-gradient(90deg, #1dd7f2, #2458db 52%, #8d6bf7);
  box-shadow: 0 0 18px rgba(29, 215, 242, .3);
}
html[data-crm-theme="dark"] .telegram-list {
  background: rgba(9, 15, 27, .72);
  border-right-color: #263650;
}
html[data-crm-theme="dark"] .telegram-chat {
  background:
    radial-gradient(circle at 1px 1px, rgba(91, 132, 255, .16) 1px, transparent 0) 0 0 / 26px 26px,
    #0c1424;
}
html[data-crm-theme="dark"] .telegram-list .chat-row:hover,
html[data-crm-theme="dark"] .telegram-list .chat-row.active {
  background: #14233b;
}
html[data-crm-theme="dark"] .telegram-list .chat-row strong,
html[data-crm-theme="dark"] .telegram-chat-head h2,
html[data-crm-theme="dark"] .dashboard-row strong,
html[data-crm-theme="dark"] .status-line span {
  color: var(--ink);
}
html[data-crm-theme="dark"] .telegram-list .chat-row small,
html[data-crm-theme="dark"] .telegram-list .chat-row time {
  color: #8fa0ba;
}
html[data-crm-theme="dark"] .telegram-chat-head,
html[data-crm-theme="dark"] .telegram-chat .chat-input {
  background: rgba(13, 23, 40, .94);
  border-color: #263650;
}
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg.client,
html[data-crm-theme="dark"] .admin-chat-messages .chat-msg.client {
  background: #101b2d;
  color: var(--ink);
}
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg.manager,
html[data-crm-theme="dark"] .admin-chat-messages .chat-msg.manager {
  background: #11372f;
  color: #eafff9;
}
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg.system,
html[data-crm-theme="dark"] .admin-chat-messages .chat-msg.system {
  background: rgba(20, 35, 59, .94);
  border-color: #2b3c59;
  color: #b7c4dc;
}
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg div {
  color: inherit;
}
html[data-crm-theme="dark"] .chat-file {
  background: #0e182a;
  border-color: #34528d;
  color: #cfe0ff;
}
html[data-crm-theme="dark"] .chat-status-select {
  background: #0e182a;
  color: var(--ink);
  border-color: #34528d;
}
html[data-crm-theme="dark"] .modal-backdrop {
  background: rgba(2, 6, 14, .72);
}
html[data-crm-theme="dark"] .toast {
  background: #0d1728;
  border: 1px solid #2b3c59;
}
.admin-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(38, 91, 219, .24), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(35, 195, 159, .16), transparent 30%),
    #0f1728;
  color: #f3f7ff;
  overflow: hidden;
}
.admin-login-lang {
  position: fixed;
  left: 28px;
  top: 28px;
  z-index: 4;
  background: rgba(255,255,255,.92);
  border-color: rgba(202,213,232,.42);
}
.admin-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(410px, .8fr);
  padding: clamp(18px, 3vw, 42px);
  gap: clamp(18px, 3vw, 34px);
}
.login-art-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 72px clamp(28px, 6vw, 96px);
  background:
    linear-gradient(135deg, rgba(24, 40, 70, .96), rgba(14, 23, 40, .86)),
    radial-gradient(circle at 58% 42%, rgba(35, 195, 159, .2), transparent 40%);
  border: 1px solid rgba(98, 131, 190, .24);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,.26);
  overflow: hidden;
}
.login-art-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(91, 132, 255, .22) 1px, transparent 0) 0 0 / 28px 28px,
    linear-gradient(120deg, transparent, rgba(35, 195, 159, .08), transparent);
  mask-image: radial-gradient(circle at 50% 52%, #000, transparent 70%);
}
.login-brand {
  position: absolute;
  left: 42px;
  top: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 18px;
  font-weight: 900;
  color: #f4f7ff;
}
.login-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #2b5de1;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(23, 49, 122, .26);
}
.login-command-scene {
  position: relative;
  z-index: 1;
  width: min(620px, 62vw);
  aspect-ratio: 1.38;
}
.login-command-scene::before,
.login-command-scene::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(.2px);
}
.login-command-scene::before {
  inset: 18% 9%;
  border: 1px solid rgba(61, 109, 240, .32);
  transform: rotate(-12deg);
}
.login-command-scene::after {
  inset: 28% 19%;
  border: 1px dashed rgba(47, 198, 168, .34);
  transform: rotate(16deg);
}
.command-card {
  position: absolute;
  z-index: 2;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(124, 157, 220, .34);
  background: rgba(12, 22, 40, .78);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 70px rgba(0,0,0,.28);
}
.command-card span {
  color: #9fb0cc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
}
.command-card strong {
  color: #f4f8ff;
  line-height: 1;
}
.command-card-main {
  left: 12%;
  top: 18%;
  width: 290px;
  height: 210px;
  padding: 26px;
  border-radius: 26px;
}
.command-card-main strong {
  font-size: 96px;
}
.command-card-main em {
  width: 100%;
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2b5de1 0 62%, #2fc6a8 62% 100%);
}
.command-card-side {
  right: 10%;
  top: 34%;
  width: 210px;
  height: 148px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(17, 53, 47, .76);
}
.command-card-side strong {
  color: #30d0af;
  font-size: 52px;
}
.command-flow {
  position: absolute;
  z-index: 1;
  left: 18%;
  right: 12%;
  bottom: 18%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.command-flow i {
  height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(124, 157, 220, .2);
}
.command-ring {
  position: absolute;
  right: 4%;
  top: 8%;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 18px solid rgba(47, 198, 168, .18);
  border-top-color: #2fc6a8;
  border-right-color: #2b5de1;
  z-index: 2;
}
.command-chip {
  position: absolute;
  z-index: 3;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #203865;
  border: 1px solid rgba(142, 174, 235, .38);
  color: #cfe0ff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}
.chip-one { left: 8%; bottom: 14%; }
.chip-two { right: 28%; bottom: 7%; background: #0e443b; color: #88f6e3; }
.chip-three { left: 48%; top: 8%; background: #2b5de1; color: #fff; }
.login-art-copy {
  position: absolute;
  left: 42px;
  bottom: 42px;
  display: grid;
  gap: 5px;
  color: rgba(255,255,255,.72);
}
.login-art-copy strong {
  color: #fff;
  font-size: 28px;
}
.login-form-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px clamp(26px, 5vw, 74px);
  background:
    linear-gradient(180deg, rgba(18, 28, 47, .96), rgba(10, 15, 26, .96));
  border: 1px solid rgba(98, 131, 190, .24);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}
.login-theme-toggle {
  position: absolute;
  top: 34px;
  right: 42px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  color: #ffd64a;
  font-size: 25px;
}
.admin-login-card {
  width: min(100%, 390px);
  padding: 30px;
  border-radius: 24px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(124, 157, 220, .16);
}
.admin-login-card .section-kicker {
  color: #2fc6a8;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-login-card h1 {
  margin: 10px 0 8px;
  color: #32c6a6;
  font-size: 34px;
  line-height: 1.05;
}
.admin-login-card p {
  margin: 0 0 34px;
  color: #8b8f98;
  font-weight: 700;
}
.login-field {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  margin: 16px 0;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(13, 24, 43, .92);
  border: 1px solid rgba(124, 157, 220, .22);
  color: #f2f6ff;
}
.login-field-icon {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.68);
  font-size: 22px;
}
.login-field span:last-child {
  display: grid;
  gap: 3px;
}
.login-field small {
  color: #aab2c1;
  font-size: 12px;
  font-weight: 850;
}
.login-field input {
  width: 100%;
  min-height: 28px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-weight: 850;
}
.login-field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  transition: background-color 9999s ease-in-out 0s;
}
.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 34px;
  color: #8b8f98;
  font-weight: 850;
}
.login-remember input {
  width: 42px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  border: 1px solid #4c5360;
  background: #2a2b30;
  cursor: pointer;
  position: relative;
}
.login-remember input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #848b98;
  transition: transform .18s ease, background .18s ease;
}
.login-remember input:checked {
  background: #2fc6a8;
  border-color: #2fc6a8;
}
.login-remember input:checked::after {
  transform: translateX(18px);
  background: #fff;
}
.login-submit {
  width: 100%;
  min-height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2b5de1, #2fc6a8);
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(43, 93, 225, .26);
}
.login-submit:hover {
  box-shadow: 0 20px 46px rgba(47, 198, 168, .24);
}
.admin-login-page:not([data-crm-theme="dark"]),
html:not([data-crm-theme="dark"]) .admin-login-page {
  background: #eef3f7;
}
html:not([data-crm-theme="dark"]) .login-art-panel {
  background:
    radial-gradient(circle at 52% 50%, rgba(36, 88, 219, .13), transparent 34%),
    linear-gradient(135deg, #eef3fb, #dce7f7);
}
html:not([data-crm-theme="dark"]) .login-brand,
html:not([data-crm-theme="dark"]) .login-art-copy strong {
  color: #16222e;
}
html:not([data-crm-theme="dark"]) .login-art-copy {
  color: #667482;
}
html:not([data-crm-theme="dark"]) .login-form-panel {
  background: rgba(255,255,255,.92);
}
html:not([data-crm-theme="dark"]) .login-theme-toggle {
  color: #1f5fe3;
}
html:not([data-crm-theme="dark"]) .login-field {
  background: #eef3f9;
  border-color: #d6e1ef;
}
html:not([data-crm-theme="dark"]) .admin-login-card {
  background: rgba(255,255,255,.74);
  border-color: #d6e1ef;
}
html:not([data-crm-theme="dark"]) .command-card {
  background: rgba(255,255,255,.78);
}
html:not([data-crm-theme="dark"]) .command-card strong {
  color: #18315d;
}
html:not([data-crm-theme="dark"]) .login-field input {
  color: #16222e;
}
html:not([data-crm-theme="dark"]) .login-field input:-webkit-autofill {
  -webkit-text-fill-color: #16222e;
}
@media (max-width: 920px) {
  .new-hero, .app-shell, .split, .grid3, .grid2 { grid-template-columns: 1fr; }
  .admin-login-page { overflow: auto; }
  .admin-login-shell { grid-template-columns: 1fr; }
  .login-art-panel {
    min-height: 360px;
    padding: 82px 24px 54px;
  }
  .login-form-panel {
    min-height: auto;
    padding: 54px 22px 64px;
  }
  .login-command-scene {
    width: min(440px, 78vw);
  }
  .login-art-copy {
    display: none;
  }
  .landing-topbar { position: sticky; }
  .new-hero { padding-top: 38px; }
  .hero-metrics, .bank-scan { grid-template-columns: 1fr; }
  .contract-grid { grid-template-columns: 1fr; }
  .real-stamp { position: static; margin: 0 0 18px auto; }
  .brand-large { font-size: 18px; }
  .brand-mark-large { width: 50px; height: 50px; }
  .withdraw-card { align-items: stretch; flex-direction: column; }
  .transfer-account,
  .transfer-visual,
  .certificate-visual,
  .unlock-visual { grid-template-columns: 1fr; }
  .transfer-card-mask {
    border-left: 0;
    border-top: 1px solid #d5e1f6;
  }
  .transfer-visual::before,
  .transfer-visual::after { display: none; }
  .client-shell .main { padding: 16px 14px 86px; }
  .app-topline {
    align-items: stretch;
    flex-direction: column;
  }
  .topline-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .telegram-shell { grid-template-columns: 1fr; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-visual-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .payment-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telegram-list { border-right: 0; border-bottom: 1px solid #d5e1f6; }
  .telegram-list .chat-list { max-height: 320px; }
  .telegram-chat { min-height: 560px; }
}
@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  *,
  *::before,
  *::after {
    max-width: 100%;
  }

  body {
    background:
      radial-gradient(circle at 18% 0%, rgba(36, 88, 219, .1), transparent 30%),
      #eef3f7;
  }

  .topbar {
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .landing-topbar {
    position: sticky;
  }

  .brand-large {
    gap: 10px;
    font-size: 16px;
  }

  .brand-mark-large,
  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
  }

  .nav,
  .actions {
    width: 100%;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
  }

  .nav .btn,
  .actions .btn,
  .lang-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 14px;
  }

  .nav .btn.primary {
    grid-column: 1 / -1;
  }

  .new-hero {
    min-height: auto;
    display: block;
    padding: 18px 12px 28px;
  }

  .hero-copy {
    max-width: none;
    margin-bottom: 16px;
  }

  .eyebrow {
    min-height: 26px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .new-hero h1 {
    margin: 14px 0 10px;
    font-size: 34px;
    line-height: 1;
  }

  .new-hero p {
    font-size: 15px;
    line-height: 1.45;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .hero-metrics div {
    padding: 12px 14px;
  }

  .hero-metrics strong {
    font-size: 23px;
  }

  .flow-card,
  .panel,
  .admin-panel,
  .steps-panel,
  .balance-card,
  .action-card,
  .details-card,
  .withdraw-card,
  .payment-sheet,
  .contract-paper {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 8px;
  }

  .flow-head {
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .flow-head h2 {
    font-size: 22px;
  }

  .split,
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .field {
    margin: 12px 0;
  }

  .field input,
  .field select,
  .field textarea,
  .amount-control input[type="number"] {
    min-height: 50px;
    font-size: 16px;
  }

  .phone-control {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 50px;
  }

  .phone-prefix {
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    font-size: 17px;
  }

  .field .phone-control input {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 18px;
  }

  .amount-control div {
    display: grid;
    gap: 4px;
    align-items: start;
  }

  .amount-control strong {
    font-size: 20px;
  }

  .approved-box {
    padding: 14px;
  }

  .bank-scan {
    max-height: 310px;
    padding-right: 0;
  }

  .client-shell .main {
    padding: 12px 10px calc(118px + env(safe-area-inset-bottom));
  }

  .app-topline,
  .steps-head,
  .balance-actions,
  .withdraw-card {
    display: grid;
    gap: 10px;
  }

  .app-topline {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    margin-bottom: 14px;
  }

  .compact-brand {
    min-width: 0;
  }

  .compact-brand span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topline-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .topline-actions .lang-select,
  .topline-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .client-chip {
    min-width: 0;
    padding: 7px 9px;
    gap: 8px;
  }

  .client-chip strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-top {
    padding: 16px 14px;
    overflow: hidden;
  }

  .progress-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    margin-bottom: 16px;
  }

  .progress-meta strong {
    font-size: 18px;
    line-height: 1.18;
  }

  .progress-meta span {
    max-width: 112px;
    text-align: right;
    line-height: 1.15;
  }

  .step-track {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .step-dot {
    gap: 6px;
    min-width: 0;
  }

  .step-dot span {
    width: 48px;
    height: 48px;
  }

  .step-dot small {
    width: 100%;
    font-size: 11px;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .progress-line {
    height: 9px;
    margin-top: 14px;
  }

  .balance-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: initial;
    gap: 16px;
    padding: 18px 16px;
    overflow: hidden;
  }

  .balance-amount,
  .approved-amount,
  .money-xl,
  .balance-card h1 {
    font-size: clamp(38px, 13vw, 58px);
    line-height: 1;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .mini-pills {
    max-width: 100%;
  }

  .mini-pills span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .btn.fund-btn,
  .balance-card .btn,
  .withdraw-card .btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
  }

  .steps-panel {
    overflow: hidden;
  }

  .steps-head {
    grid-template-columns: 1fr;
  }

  .steps-head h2 {
    font-size: 22px;
    line-height: 1.15;
  }

  .step-item {
    grid-template-columns: 40px 1fr;
    min-height: 64px;
    padding: 10px;
  }

  .step-item::after,
  .step-arrow {
    display: none;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: center;
  }

  .fee-modal,
  .crm-modal-card,
  .contract-modal,
  .certificate-sheet,
  .telegram-limit-sheet,
  .telegram-help-sheet {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 16px;
    border-radius: 8px;
  }

  .fee-modal-head h1,
  .certificate-sheet h1,
  .telegram-limit-sheet h1,
  .telegram-help-sheet h1 {
    font-size: 24px;
    line-height: 1.12;
  }

  .fee-tabs {
    grid-template-columns: 1fr;
  }

  .fee-amount {
    font-size: 48px;
  }

  .certificate-image {
    width: 100%;
    max-height: calc(100dvh - 210px);
    object-fit: contain;
  }

  .certificate-actions {
    position: sticky;
    bottom: 0;
    background: inherit;
    padding-top: 10px;
  }

  .contract-paper h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .signature-box {
    padding: 12px;
    margin-top: 16px;
  }

  #signatureCanvas {
    height: 150px;
    max-width: 100%;
  }

  .signature-actions,
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-widget {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
  }

  .chat-button {
    width: 100%;
    min-height: 58px;
    justify-content: center;
    border-radius: 12px;
  }

  .chat-panel {
    right: 0;
    left: 0;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 100%;
    height: min(640px, calc(100dvh - 96px));
    border-radius: 10px;
  }

  .chat-body {
    padding: 12px;
  }

  .chat-msg.client,
  .chat-msg.manager {
    margin-left: 0;
    margin-right: 0;
  }

  .chat-input {
    grid-template-columns: 44px 1fr;
    display: grid;
    gap: 8px;
  }

  .chat-input .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chat-input input {
    min-width: 0;
    width: 100%;
  }

  .admin-login-shell {
    min-height: 100dvh;
  }

  .login-art-panel {
    min-height: 260px;
    padding: 82px 18px 34px;
  }

  .login-form-panel {
    padding: 34px 18px 46px;
  }

  .admin-login-card,
  .login-field {
    width: 100%;
  }

  .app-shell {
    min-height: 100dvh;
  }

  .side {
    position: static;
    width: 100%;
  }

  .side nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 12px 12px;
  }

  .side a,
  .side button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #d5e1f6;
    border-radius: 8px;
  }

  .main {
    padding: 14px 10px;
  }

  .telegram-shell {
    min-height: auto;
  }

  .telegram-chat {
    min-height: calc(100dvh - 220px);
  }

  .telegram-chat-head,
  .chat-head-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .telegram-chat .chat-input {
    grid-template-columns: 1fr;
  }

  .dashboard-summary { grid-template-columns: 1fr; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .area-chart,
  .area-chart svg { min-height: 210px; height: 210px; }
  .analytics-donut { width: 180px; }
  .payment-stage-grid { grid-template-columns: 1fr; }
  .admin-login-lang {
    left: 16px;
    top: 16px;
  }
  .login-brand {
    left: 20px;
    top: 74px;
  }
  .login-theme-toggle {
    top: 16px;
    right: 18px;
  }
  .admin-login-card h1 {
    font-size: 30px;
  }
}
@media (max-height: 760px) {
  .certificate-sheet {
    gap: 8px;
    padding: 12px 14px;
  }
  .certificate-sheet h1 {
    font-size: 19px;
  }
  .certificate-image {
    max-height: calc(100vh - 150px);
  }
  .certificate-actions .btn {
    min-height: 42px;
  }
}
