: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);
}

/* Credito Italia visual refresh */
:root {
  --ui-bg: #f4f6fb;
  --ui-surface: rgba(255, 255, 255, .92);
  --ui-surface-strong: #ffffff;
  --ui-ink: #172033;
  --ui-muted: #768196;
  --ui-line: #dde5f2;
  --ui-blue: #13845f;
  --ui-blue-dark: #0f3b2d;
  --ui-green: #24b47e;
  --ui-cyan: #22b8cf;
  --ui-red: #ef5b65;
  --ui-yellow: #f2c94c;
  --ui-shadow: 0 18px 50px rgba(31, 45, 74, .10);
  --ui-shadow-soft: 0 10px 28px rgba(31, 45, 74, .07);
}

body,
.site-body,
body:has(.app-shell) {
  color: var(--ui-ink);
  background:
    linear-gradient(180deg, #f7f9fd 0%, #eef3fa 46%, #f6f8fc 100%);
}

.topbar,
.app-topline,
.telegram-chat-head,
.telegram-chat .chat-input {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(221, 229, 242, .92);
  backdrop-filter: blur(18px);
}

.brand-mark,
.login-brand-mark,
.node-logo,
.chat-avatar {
  background: linear-gradient(135deg, var(--ui-blue), #78cfa2);
  box-shadow: 0 14px 34px rgba(36, 88, 219, .22);
}

.btn,
.lang-select,
.field input,
.field select,
.field textarea,
.amount-control input[type="number"],
.admin-filters select,
.admin-filters input,
.dashboard-filter-bar select,
.dashboard-filter-bar input,
.chat-head-actions select,
.chat-head-actions input,
.utm-tools input,
.utm-tools select,
.modal-form input,
.modal-form select,
.chat-status-select {
  border-color: var(--ui-line);
  background-color: rgba(255, 255, 255, .92);
  color: var(--ui-ink);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.btn {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 850;
  box-shadow: var(--ui-shadow-soft);
}

.btn.primary {
  background: linear-gradient(135deg, var(--ui-blue), #0f6f50);
  border-color: transparent;
  color: #fff;
}

.btn.gold {
  background: linear-gradient(135deg, #f3c14c, #e3a82f);
  border-color: transparent;
  color: #1f2937;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(36, 88, 219, .16);
}

.panel,
.flow-card,
.profile-card,
.steps-panel,
.withdraw-card,
.transfer-section,
.certificate-section,
.dashboard-visual-card,
.dashboard-card,
.metric-card,
.table-wrap,
.crm-modal-card,
.payment-sheet,
.chat-panel {
  border: 1px solid rgba(221, 229, 242, .95);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.section-kicker,
.control-wrap span,
.chat-filter > span,
.metric-card span,
th {
  color: #8792a7;
  letter-spacing: .08em;
}

.hint,
.field-note {
  color: var(--ui-muted);
}

.new-hero,
.preland-hero {
  min-height: auto;
  padding-top: 128px;
  padding-bottom: 70px;
}

.preland-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.preland-copy h1,
.new-hero h1 {
  max-width: 760px;
  color: #121b2d;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}

.preland-copy p,
.new-hero p {
  color: #586377;
  font-size: clamp(17px, 1.6vw, 20px);
}

.preland-visual,
.flow-card {
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(238,246,255,.88));
  border: 1px solid rgba(210, 221, 239, .9);
  box-shadow: 0 28px 70px rgba(40, 58, 92, .13);
}

.preland-phone {
  border-radius: 34px;
  background: linear-gradient(160deg, #172033, #273750);
  box-shadow: 0 30px 70px rgba(23, 32, 51, .24);
}

.preland-metrics,
.program-strip,
.how-list,
.dashboard-summary {
  gap: 16px;
}

.preland-metrics div,
.program-card,
.how-list article,
.mission-card,
.faq-list details {
  border-radius: 18px;
  border: 1px solid var(--ui-line);
  background: rgba(255,255,255,.88);
  box-shadow: var(--ui-shadow-soft);
}

.flow-card {
  padding: clamp(20px, 3vw, 32px);
}

.flow-head {
  border-color: var(--ui-line);
}

.flow-head span,
.success-pill,
.mini-pills span,
.status,
.tag,
.status-pill {
  border-radius: 999px;
  border: 1px solid rgba(36, 180, 126, .24);
  background: #eaf8f2;
  color: #16875f;
}

.amount-control strong,
.balance-card h1,
#approvedView,
#requestedView {
  color: #0f9a6b;
}

.scan-ring {
  background: conic-gradient(var(--ui-green), var(--ui-cyan), var(--ui-blue), var(--ui-green));
}

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

.client-shell .main,
.main {
  background: transparent;
}

.side {
  width: 248px;
  padding: 18px 14px;
  border-right: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(20px);
  box-shadow: 16px 0 42px rgba(31, 45, 74, .06);
}

.side .brand-button {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--ui-line);
  box-shadow: var(--ui-shadow-soft);
}

.side nav {
  gap: 6px;
}

.side nav button {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #5d687c;
  font-weight: 850;
}

.side nav button:hover,
.side nav button.active {
  background: #edf4ff;
  color: var(--ui-blue-dark);
  border-color: #cfddfb;
}

.theme-toggle {
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ui-shadow-soft);
}

.main {
  padding: clamp(18px, 2.4vw, 34px);
}

.admin-panel,
.dashboard-hero {
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,247,255,.94));
  overflow: hidden;
}

.admin-panel h2 {
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0;
}

.dashboard-visual-grid,
.dashboard-grid {
  gap: 18px;
}

.metric-card,
.dashboard-card,
.dashboard-visual-card {
  border-radius: 20px;
}

.metric-card {
  min-height: 150px;
  background:
    linear-gradient(145deg, #fff, #f5f8fd);
}

.metric-card strong {
  color: #142038;
  font-size: clamp(34px, 4vw, 52px);
}

.metric-card.blue strong { color: #78cfa2; }
.metric-card.green strong { color: var(--ui-green); }
.metric-card.gold strong { color: #d99b11; }
.metric-card.red strong { color: var(--ui-red); }

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f4f7fc;
  font-size: 12px;
}

td {
  background: rgba(255,255,255,.84);
}

tr:hover td {
  background: #f4f8ff;
}

.admin-filters,
.dashboard-filter-bar,
.utm-tools,
.chat-head-actions {
  align-items: end;
}

.telegram-shell {
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--ui-shadow);
}

.telegram-list {
  background: #f8fafd;
}

.telegram-list-head {
  background: rgba(255,255,255,.88);
}

.telegram-list .chat-row {
  min-height: 74px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: transparent;
}

.telegram-list .chat-row:hover,
.telegram-list .chat-row.active,
.telegram-list .chat-row.unread {
  background: #eef5ff;
}

.telegram-list .chat-row.unread {
  box-shadow: inset 4px 0 0 var(--ui-cyan);
}

.telegram-chat {
  background:
    linear-gradient(180deg, rgba(249,251,255,.96), rgba(240,246,252,.92));
}

.telegram-chat .admin-chat-messages .chat-msg {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(31, 45, 74, .08);
}

.telegram-chat .admin-chat-messages .chat-msg.client {
  background: #fff;
}

.telegram-chat .admin-chat-messages .chat-msg.manager {
  background: #dcf7e8;
}

.client-account-layout {
  align-items: start;
}

.client-side-nav {
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--ui-shadow-soft);
}

.client-side-nav button {
  border-radius: 14px;
}

.client-side-nav button.active {
  background: #edf4ff;
  color: var(--ui-blue-dark);
}

.balance-card {
  border-radius: 26px;
  background:
    linear-gradient(135deg, #eefbf6, #eef6ff 68%, #fff);
  border: 1px solid #cfe8df;
  box-shadow: 0 24px 60px rgba(19, 126, 91, .12);
}

.progress-top {
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--ui-line);
  box-shadow: var(--ui-shadow-soft);
}

.step-dot span,
.step-icon,
.profile-icon {
  background: #edf4ff;
  color: var(--ui-blue-dark);
}

.step-dot.done span,
.step-item.complete .step-icon {
  background: linear-gradient(135deg, var(--ui-blue), #78cfa2);
  color: #fff;
}

.profile-view {
  max-width: 860px;
}

.profile-card {
  background: #fff;
}

.profile-row,
.security-row,
.security-note {
  border-color: var(--ui-line);
}

.chat-widget {
  filter: drop-shadow(0 22px 46px rgba(31,45,74,.16));
}

.chat-panel {
  border-radius: 22px;
}

.chat-head {
  background: linear-gradient(135deg, #172033, #273750);
}

.chat-msg.client {
  background: #e7faf2;
}

.chat-msg.manager {
  background: #f2f5fa;
}

html[data-crm-theme="dark"] body:has(.app-shell) {
  background: linear-gradient(180deg, #eef3fa 0%, #f8fafd 100%);
  color: var(--ui-ink);
}

html[data-crm-theme="dark"] .app-shell,
html[data-crm-theme="dark"] .main,
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"] .telegram-shell,
html[data-crm-theme="dark"] .table-wrap {
  background: var(--ui-surface);
  border-color: var(--ui-line);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow);
}

html[data-crm-theme="dark"] .side,
html[data-crm-theme="dark"] .telegram-list,
html[data-crm-theme="dark"] .telegram-chat-head,
html[data-crm-theme="dark"] .telegram-chat .chat-input {
  background: rgba(255,255,255,.86);
  border-color: var(--ui-line);
}

html[data-crm-theme="dark"] .side nav button,
html[data-crm-theme="dark"] .theme-toggle,
html[data-crm-theme="dark"] .btn,
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,
html[data-crm-theme="dark"] .dashboard-row,
html[data-crm-theme="dark"] .chat-status-select {
  background: rgba(255,255,255,.92);
  color: var(--ui-ink);
  border-color: var(--ui-line);
}

html[data-crm-theme="dark"] table,
html[data-crm-theme="dark"] th,
html[data-crm-theme="dark"] td {
  background: rgba(255,255,255,.9);
  border-color: var(--ui-line);
  color: var(--ui-ink);
}

html[data-crm-theme="dark"] th {
  background: #f4f7fc;
  color: #68758b;
}

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"] .chat-filter > span,
html[data-crm-theme="dark"] .telegram-list .chat-row small,
html[data-crm-theme="dark"] .telegram-list .chat-row time {
  color: var(--ui-muted);
}

html[data-crm-theme="dark"] .telegram-chat {
  background: linear-gradient(180deg, rgba(249,251,255,.96), rgba(240,246,252,.92));
}

@media (max-width: 900px) {
  .preland-hero,
  .new-hero {
    grid-template-columns: 1fr;
    padding-top: 108px;
  }
  .side {
    width: auto;
  }
  .telegram-shell {
    grid-template-columns: 1fr;
  }
}
* { 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-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.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; }
.docs-upload-split { align-items: start; }
.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 {
  display: block;
  margin-top: 14px;
  font-size: 14px;
}
.consent span {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.consent input[type="checkbox"] {
  appearance: auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 3px;
}
.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[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%;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  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-requisite {
  display: grid;
  gap: 7px;
}
.payment-requisite + .payment-requisite {
  margin-top: 12px;
}
.payment-requisite small {
  color: #64718a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.copy-field strong,
.payment-requisite > strong {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  background: #fff;
  color: #17243a;
}
.copy-btn {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dff6ea;
  border-radius: 8px;
  background: #f7faff;
  color: #0f3b2d;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.copy-btn:hover {
  border-color: #13845f;
  background: #eef4ff;
}
.copy-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.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: 42px;
  width: 152px;
  height: 152px;
  object-fit: contain;
  transform: rotate(-8deg);
  opacity: .9;
}
.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; gap: 10px; }
.chat-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-head-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-agent-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.35);
  background: #fff;
}
.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; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: white; }
.chat-input input:not([type="file"]) { 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: #13845f;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.chat-file-input { display: none; }
.chat-pending-files {
  flex: 0 0 100%;
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-pending-files.hidden { display: none; }
.chat-pending-files span {
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f9ff;
  color: #163b8f;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-pending-files small {
  color: #6d7788;
  font-weight: 800;
}
.chat-attachments { display: grid; gap: 6px; margin-top: 8px; }
.chat-welcome {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(340px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}
.chat-welcome.hidden { display: none; }
.chat-welcome img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.chat-welcome span {
  min-width: 0;
  font-weight: 850;
  line-height: 1.3;
}
.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; }

.sms-gateway-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.sms-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.sms-state-pill.ok {
  color: #08745f;
  background: #dffaf1;
  border-color: #8ee6cf;
}

.sms-state-pill.warn {
  color: #9f5800;
  background: #fff4d7;
  border-color: #ffd88a;
}

.sms-filters {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 12px;
}

.sms-message-wrap {
  margin-top: 14px;
}

.sms-preview-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
}
.install-shortcut {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 39;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  max-width: min(280px, calc(100vw - 36px));
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(185, 203, 242, .9);
  border-radius: 999px;
  background: #fff;
  color: #17243a;
  box-shadow: 0 18px 44px rgba(24, 43, 79, .18);
  cursor: pointer;
}
.install-shortcut span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #13845f;
  color: #fff;
  font-weight: 950;
}
.install-shortcut strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.install-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 27, 46, .58);
}
.install-modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(480px, 100%);
  padding: 28px;
  border: 1px solid #d5e1f6;
  border-radius: 14px;
  background: #fff;
  color: #17243a;
  box-shadow: 0 30px 80px rgba(12, 23, 42, .26);
}
.install-modal-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}
.install-modal-card p {
  margin: 0;
  color: #5d6b82;
  font-size: 17px;
  line-height: 1.45;
}
.install-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #eef8f1;
  color: #0f3b2d;
  font-size: 20px;
  font-weight: 950;
  cursor: pointer;
}
.install-steps {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #f8fbff;
  color: #4f5f76;
  font-size: 14px;
  font-weight: 800;
}
.install-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.install-actions .btn {
  flex: 1 1 160px;
  min-height: 46px;
}
.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: #13845f;
  box-shadow: 0 12px 24px rgba(36,88,219,.18);
}
.brand-mark-large {
  border-radius: 11px;
  background: #13845f;
}
.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: #13845f;
  border-color: #13845f;
  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;
  z-index: 0;
}
.new-hero > * {
  position: relative;
  z-index: 1;
}
.eyebrow {
  color: #13845f;
  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: #13845f;
  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: #13845f;
  color: white;
  border-color: #13845f;
}
.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:not([type="file"]) {
  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:not([type="file"]):focus {
  border-color: #13845f;
  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: #0f3b2d;
  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: #13845f;
  box-shadow: 0 0 0 4px rgba(36,88,219,.14);
}
input[type="range"] {
  height: 4px;
  accent-color: #13845f;
}
.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: #13845f;
  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: #0f3b2d;
  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: #13845f;
  background: #13845f;
  color: white;
}
.step-dot.done,
.step-dot.active { color: #0f3b2d; }
.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: #eef8f1;
}
.progress-line i {
  display: block;
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, #0f3b2d, #13845f);
}
.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 #dff6ea;
  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: #0f3b2d;
  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 #13845f;
}
.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 #dff6ea;
  border-radius: 10px;
  background: #f4f7ff;
  color: #0f3b2d;
  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, #dff6ea, #13845f);
}
.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: #0f3b2d;
}
.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, #0f3b2d, #13845f);
}
.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 #0f3b2d;
  border-radius: 12px;
  color: #0f3b2d;
  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, #13845f, #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 #dff6ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(36,88,219,.12);
}
.certificate-paper-mini strong {
  color: #0f3b2d;
  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 #dff6ea;
  border-radius: 8px;
  background: #f4f7ff;
  font-weight: 850;
}
.confirm-check input {
  width: 26px;
  height: 26px;
  accent-color: #13845f;
}
.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, #13845f, #20b99f);
}
.receipt-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef4ff;
  color: #0f3b2d;
  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: #13845f;
  color: white;
  font-weight: 900;
}
.step-item em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  color: #13845f;
  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: #13845f; }
.step-item.disabled em { color: #13845f; }
.step-item:not(.complete):hover,
.action-card:hover {
  border-color: #13845f;
  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: #eef8f1;
  color: #0f3b2d;
  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: #eef8f1;
  color: #0f3b2d;
  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 #13845f;
}
.fee-sheet {
  padding: 18px;
  padding-bottom: 22px;
  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: #eef8f1; color: #0f3b2d; }
.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 #dff6ea;
  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: #13845f;
  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: #0f3b2d;
}
.fee-sheet .fee-total span {
  color: #13845f;
  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: #0f3b2d;
  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: #0f3b2d;
  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: #dff6ea;
}
.fee-sheet .payment-card {
  padding: 12px;
  margin-bottom: 12px;
}
.fee-sheet .payment-card strong {
  font-size: 16px;
}
.fee-sheet .payment-requisite {
  gap: 5px;
}
.fee-sheet .payment-requisite + .payment-requisite {
  margin-top: 8px;
}
.fee-sheet .copy-field strong,
.fee-sheet .payment-requisite > strong,
.fee-sheet .copy-btn {
  min-height: 42px;
}
.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: #0f3b2d;
}
.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 #dff6ea;
  border-radius: 10px;
  background: #fff;
  padding: 22px;
  box-shadow: inset 4px 0 0 #13845f, 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: #0f3b2d;
  font-weight: 900;
}
.payment-stage em {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef8f1;
  color: #0f3b2d;
  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;
}
.dashboard-filter-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 230px) repeat(2, minmax(138px, 160px)) auto;
  gap: 10px;
  align-items: end;
  justify-content: end;
}
.dashboard-filter-bar .control-wrap {
  min-width: 0;
}
.dashboard-filter-bar select,
.dashboard-filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dff6ea;
  border-radius: 8px;
  background-color: rgba(255,255,255,.82);
  color: #17243a;
  font-size: 14px;
  font-weight: 820;
  outline: none;
}
.dashboard-filter-bar 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) 21px,
    calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.dashboard-filter-bar input {
  padding: 0 12px;
}
.dashboard-filter-bar select:focus,
.dashboard-filter-bar input:focus {
  border-color: #13845f;
  box-shadow: 0 0 0 4px rgba(36,88,219,.13);
}
.dashboard-filter-bar .btn {
  min-height: 48px;
  border-radius: 8px;
}
.utm-tools {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) 54px;
  gap: 10px;
  align-items: end;
  margin: 14px 0 16px;
}
.utm-tools .control-wrap {
  min-width: 0;
}
.utm-tools input,
.utm-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dff6ea;
  border-radius: 8px;
  background-color: #fbfdff;
  color: #17243a;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 760;
  outline: none;
}
.utm-tools input::placeholder {
  color: #8a96aa;
}
.utm-tools 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) 21px,
    calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.utm-tools input:focus,
.utm-tools select:focus {
  border-color: #13845f;
  box-shadow: 0 0 0 4px rgba(36,88,219,.13);
}
.utm-columns-button {
  width: 54px;
  min-width: 54px;
  min-height: 48px;
  padding: 0;
  border-radius: 8px;
  font-size: 22px;
}
.utm-column-card {
  width: min(520px, 100%);
}
.utm-column-card .control-wrap input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dff6ea;
  border-radius: 8px;
  background-color: #fbfdff;
  color: #17243a;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 760;
  outline: none;
}
.utm-column-card .control-wrap input:focus {
  border-color: #13845f;
  box-shadow: 0 0 0 4px rgba(36,88,219,.13);
}
.utm-column-list {
  display: grid;
  gap: 8px;
  max-height: min(430px, 52dvh);
  margin: 14px 0;
  overflow: auto;
}
.utm-column-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d5e1f6;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  font-weight: 850;
}
.utm-column-row input {
  width: 18px;
  height: 18px;
  accent-color: #13845f;
}
.utm-column-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dashboard-date-custom.hidden {
  display: none;
}
.buyer-mode .dashboard-visual-grid,
.buyer-mode #dashboardSummary,
.buyer-mode .dashboard-grid {
  display: none;
}
.buyer-dashboard-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}
.buyer-mode .buyer-dashboard-summary {
  display: grid;
}
.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: #13845f; }
.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: #13845f;
}
.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 #dff6ea;
  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: #13845f; }
.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), #13845f 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: #13845f; }
.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: #dff6ea; }
.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, #13845f);
}
.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, #13845f, #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: #0f3b2d;
}
.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: #13845f;
}
.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 #dff6ea;
  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: #13845f;
  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 #dff6ea;
  border-radius: 999px;
  background-color: #f4f7ff;
  color: #0f3b2d;
  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: #13845f;
  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 #dff6ea;
  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 #dff6ea;
  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: #13845f;
  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: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 10px;
  min-width: 0;
}
.chat-filter {
  display: grid;
  gap: 5px;
  min-width: 150px;
}
.chat-filter > span {
  color: #7c8aa1;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-head-actions select,
.chat-head-actions input {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  border: 1px solid #dff6ea;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  font-weight: 800;
  padding: 0 30px 0 10px;
  font-size: 14px;
}
.chat-head-actions input {
  padding-right: 10px;
}
.chat-search {
  grid-column: 1 / -1;
}
.chat-head-actions .btn {
  grid-column: 1 / -1;
}
.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, #13845f, #0f3b2d);
  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: 40px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 9px;
  align-items: center;
  min-height: 62px;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 38px 8px 10px;
  cursor: pointer;
}
.telegram-list .chat-row:hover,
.telegram-list .chat-row.active {
  background: #eef8f1;
}
.telegram-list .chat-row.unread {
  background: #f6fbff;
  box-shadow: inset 3px 0 0 #22c7e8;
}
.telegram-list .chat-row.read {
  opacity: .88;
}
.telegram-list .chat-row .chat-avatar {
  width: 40px;
  height: 40px;
  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;
}
.rd-state {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 8px;
  border: 1px solid rgba(18, 146, 113, .28);
  border-radius: 999px;
  background: #e8fff6;
  color: #08785f;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-mini {
  display: inline-flex !important;
  align-items: center;
  min-width: 0;
  margin: 0 !important;
  color: #52657f !important;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.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: #eef8f1;
  color: #0f3b2d;
  border: 1px solid #dff6ea;
  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 #dff6ea;
  border-radius: 8px;
  background: white;
  color: #17243a;
  font-weight: 850;
}
.telegram-list .chat-row em {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  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-list .chat-row .read-mark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 950;
}
.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:not([type="file"]) {
  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: #eef8f1;
  color: #13845f;
}
.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: #13845f;
}
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-filter-bar select,
html[data-crm-theme="dark"] .dashboard-filter-bar input,
html[data-crm-theme="dark"] .utm-tools input,
html[data-crm-theme="dark"] .utm-tools select,
html[data-crm-theme="dark"] .utm-column-card .control-wrap input,
html[data-crm-theme="dark"] .utm-column-row {
  border-color: rgba(92, 126, 184, .72);
  background-color: rgba(10, 20, 36, .84);
  color: #eaf1ff;
}
html[data-crm-theme="dark"] .dashboard-filter-bar select {
  background-image:
    linear-gradient(45deg, transparent 50%, #c7d3e8 50%),
    linear-gradient(135deg, #c7d3e8 50%, transparent 50%);
}
html[data-crm-theme="dark"] .utm-tools select {
  background-image:
    linear-gradient(45deg, transparent 50%, #c7d3e8 50%),
    linear-gradient(135deg, #c7d3e8 50%, transparent 50%);
}
html[data-crm-theme="dark"] .dashboard-filter-bar input {
  background-image: none;
}
html[data-crm-theme="dark"] .utm-tools input::placeholder {
  color: #8fa0ba;
}
html[data-crm-theme="dark"] .utm-tools input:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 4px rgba(79,124,255,.18);
}
html[data-crm-theme="dark"] .dashboard-filter-bar input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
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, #d7a84f 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: #13845f;
  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, #d7a84f, #13845f 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.unread {
  background: #10243a;
  box-shadow: inset 4px 0 0 #22d3ee;
  opacity: 1;
}
html[data-crm-theme="dark"] .telegram-list .chat-row.read {
  opacity: .72;
}
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"] .chat-filter > span {
  color: #91a3bf;
}
html[data-crm-theme="dark"] .rd-state {
  border-color: rgba(45, 212, 163, .42);
  background: rgba(15, 118, 98, .22);
  color: #7df0cf;
}
html[data-crm-theme="dark"] .rd-mini {
  color: #a7b8d4 !important;
}
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;
}
.preland-body {
  background: #f2f5fb;
}
.preland-topbar {
  position: sticky;
  width: auto;
  background: rgba(248,250,255,.9);
}
.preland {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 80px;
}
.preland-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .85fr);
  gap: 42px;
  align-items: center;
  min-height: 640px;
  padding: 36px 0 54px;
}
.preland-copy h1 {
  max-width: 760px;
  margin: 18px 0;
  font-size: clamp(46px, 6vw, 78px);
  line-height: .96;
}
.preland-copy p {
  max-width: 660px;
  color: #526174;
  font-size: 20px;
  line-height: 1.55;
}
.preland-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.preland-actions .btn,
.preland-final .btn {
  min-width: 210px;
  justify-content: center;
  text-align: center;
}
.preland-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}
.preland-visual::before {
  content: "";
  position: absolute;
  inset: 72px 28px 44px;
  border: 1px solid #d6e3f6;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(36,88,219,.12), rgba(32,185,159,.12)),
    radial-gradient(circle at 80% 24%, rgba(215,170,76,.2), transparent 26%);
}
.preland-phone {
  position: relative;
  z-index: 1;
  width: 260px;
  min-height: 500px;
  padding: 18px 18px 22px;
  border: 10px solid #1d2c3d;
  border-radius: 38px;
  background: linear-gradient(180deg, #f8fbff, #e8eef8);
  box-shadow: 0 28px 70px rgba(21,37,54,.24);
  transform: rotate(-7deg);
}
.phone-speaker {
  width: 72px;
  height: 6px;
  margin: 0 auto 28px;
  border-radius: 999px;
  background: #bec9d8;
}
.phone-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #cbdaf3;
  border-radius: 18px;
  background: #fff;
}
.phone-card span {
  color: #0f3b2d;
  font-weight: 900;
}
.phone-card strong {
  color: #0b8c62;
  font-size: 28px;
  line-height: 1;
}
.phone-card small {
  color: #667482;
  font-weight: 800;
}
.phone-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.phone-list i {
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff 0 68%, #e7efff 68%);
  border: 1px solid #d8e1ea;
}
.preland-phone button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #13845f;
  color: #fff;
  font-weight: 900;
}
.preland-float {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 126px;
  padding: 14px 16px;
  border: 1px solid #d6e3f6;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 38px rgba(21,37,54,.12);
}
.preland-float strong {
  color: #0f3b2d;
  font-size: 27px;
}
.preland-float span {
  color: #667482;
  font-weight: 750;
  font-size: 13px;
}
.preland-float.one { top: 116px; right: 20px; }
.preland-float.two { bottom: 96px; left: 14px; }
.preland-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d8e1ea;
  border-radius: 12px;
  background: #d8e1ea;
}
.preland-metrics div {
  min-height: 118px;
  padding: 22px;
  background: #fff;
}
.preland-metrics strong {
  display: block;
  font-size: 34px;
  color: #152536;
}
.preland-metrics span {
  color: #667482;
  font-weight: 760;
}
.preland-section {
  padding: 76px 0;
  border-bottom: 1px solid #d8e1ea;
}
.preland-section-head {
  max-width: 760px;
  margin-bottom: 30px;
}
.preland-section h2,
.preland-final h2 {
  margin: 14px 0 0;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
}
.program-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.program-card {
  overflow: hidden;
  border: 1px solid #d5e1f6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24,43,79,.06);
}
.program-art {
  height: 210px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.78), transparent 24%),
    linear-gradient(135deg, #e9f2ff, #f6fffb);
}
.program-art span {
  min-width: 88px;
  min-height: 88px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #13845f;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 22px 42px rgba(36,88,219,.22);
}
.program-art.personal { background: linear-gradient(135deg, #fff8e8, #edf7ff); }
.program-art.personal span { background: #d8aa3f; color: #1c2638; font-size: 22px; }
.program-art.debt { background: linear-gradient(135deg, #effcf7, #eef4ff); }
.program-art.debt span { background: #20b99f; }
.program-card small,
.program-card h3,
.program-card p {
  margin-left: 22px;
  margin-right: 22px;
}
.program-card small {
  display: block;
  margin-top: 22px;
  color: #13845f;
  font-weight: 900;
}
.program-card h3 {
  margin-top: 12px;
  margin-bottom: 12px;
  font-size: 24px;
}
.program-card p {
  margin-bottom: 26px;
  color: #667482;
  line-height: 1.5;
}
.how-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #d8e1ea;
}
.how-list article {
  display: grid;
  grid-template-columns: 72px minmax(180px, .65fr) minmax(0, 1fr);
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid #d8e1ea;
}
.how-list span {
  color: #13845f;
  font-weight: 850;
}
.how-list h3 {
  margin: 0;
  font-size: 25px;
}
.how-list p {
  margin: 0;
  color: #526174;
  line-height: 1.55;
}
.preland-partners {
  padding: 46px 0;
  border-bottom: 1px solid #d8e1ea;
}
.partner-marquee {
  display: flex;
  gap: clamp(24px, 5vw, 58px);
  margin-top: 24px;
  overflow: hidden;
  color: #617086;
  font-size: 24px;
  font-weight: 850;
  white-space: nowrap;
}
.mission-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 34px;
  align-items: center;
}
.mission-section p {
  max-width: 740px;
  color: #526174;
  font-size: 20px;
  line-height: 1.55;
}
.mission-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid #8ba9df;
  border-radius: 12px;
  background: #fff;
}
.mission-card strong {
  font-size: 22px;
}
.faq-list {
  border-top: 1px solid #d8e1ea;
}
.faq-list details {
  border-bottom: 1px solid #d8e1ea;
  padding: 22px 0;
}
.faq-list summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  color: #526174;
  font-size: 24px;
  font-weight: 700;
}
.faq-list details[open] summary::after { content: "-"; }
.faq-list summary span {
  color: #7a8aa3;
  font-weight: 850;
}
.faq-list summary strong {
  font-size: 21px;
}
.faq-list p {
  max-width: 760px;
  margin: 14px 0 0 66px;
  color: #526174;
  line-height: 1.55;
}
.preland-final {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 72px 0 10px;
}
@media (max-width: 920px) {
  .new-hero, .app-shell, .split, .grid3, .grid2 { grid-template-columns: 1fr; }
  .preland {
    padding: 24px 18px 70px;
  }
  .preland-hero,
  .mission-section {
    grid-template-columns: 1fr;
  }
  .preland-hero {
    min-height: auto;
    gap: 26px;
    padding-top: 26px;
  }
  .preland-visual {
    min-height: 460px;
  }
  .preland-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .program-strip {
    grid-template-columns: 1fr;
  }
  .how-list article {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .how-list p {
    grid-column: 2;
  }
  .preland-final {
    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; }
  .dashboard-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
  .utm-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .utm-search-wrap,
  .utm-columns-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .dashboard-filter-bar .btn {
    width: 100%;
  }
  .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;
  }

  .preland-topbar {
    position: sticky;
    align-items: stretch;
  }

  .preland-topbar .brand-large {
    width: 100%;
  }

  .preland-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 72px 1fr;
  }

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

  .preland {
    padding: 18px 14px 58px;
  }

  .preland-hero {
    padding: 18px 0 34px;
  }

  .preland-copy h1 {
    font-size: 38px;
    line-height: 1;
  }

  .preland-copy p {
    font-size: 16px;
  }

  .preland-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preland-actions .btn,
  .preland-final .btn {
    width: 100%;
    min-width: 0;
  }

  .preland-visual {
    min-height: 390px;
    overflow: hidden;
  }

  .preland-visual::before {
    inset: 44px 4px 24px;
    border-radius: 22px;
  }

  .preland-phone {
    width: 216px;
    min-height: 390px;
    border-width: 8px;
    border-radius: 30px;
    transform: rotate(-4deg);
  }

  .phone-card strong {
    font-size: 22px;
  }

  .phone-list i {
    height: 42px;
  }

  .preland-float {
    min-width: 112px;
    padding: 10px 12px;
  }

  .preland-float strong {
    font-size: 22px;
  }

  .preland-float.one {
    top: 58px;
    right: 2px;
  }

  .preland-float.two {
    bottom: 52px;
    left: 0;
  }

  .preland-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .preland-metrics div {
    min-height: 104px;
    padding: 16px;
  }

  .preland-metrics strong {
    font-size: 27px;
  }

  .preland-section {
    padding: 52px 0;
  }

  .preland-section h2,
  .preland-final h2 {
    font-size: 34px;
  }

  .program-art {
    height: 170px;
  }

  .program-card h3 {
    font-size: 22px;
  }

  .how-list article {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 24px 0;
  }

  .how-list h3 {
    font-size: 22px;
  }

  .partner-marquee {
    overflow-x: auto;
    padding-bottom: 8px;
    font-size: 20px;
  }

  .mission-section p {
    font-size: 16px;
  }

  .faq-list summary {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
  }

  .faq-list summary strong {
    font-size: 18px;
  }

  .faq-list p {
    margin-left: 52px;
  }

  .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-welcome {
    right: 0;
    left: 0;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 100%;
  }

  .install-shortcut {
    left: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    min-height: 48px;
  }

  .install-shortcut strong {
    font-size: 13px;
  }

  .install-modal {
    align-items: end;
    padding: 10px;
  }

  .install-modal-card {
    padding: 22px 18px 18px;
    border-radius: 14px;
  }

  .install-modal-card h2 {
    font-size: 25px;
  }

  .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-pending-files {
    grid-column: 1 / -1;
    order: 0;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .copy-btn {
    width: 100%;
  }

  .chat-input input:not([type="file"]) {
    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;
  }

  body:has(.side) {
    background: #eef3f7;
    overflow-x: hidden;
  }

  body:has(.side) .app-shell {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body:has(.side) .side {
    position: sticky;
    top: 0;
    z-index: 35;
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #d5e1f6;
    box-shadow: 0 12px 32px rgba(14, 29, 48, .08);
  }

  body:has(.side) .side .brand-button,
  body:has(.side) .side .brand-button:hover,
  body:has(.side) .side .brand-button.active {
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid #d5e1f6;
    border-radius: 12px;
  }

  body:has(.side) .side .brand-button .brand-mark {
    width: 42px;
    height: 42px;
  }

  body:has(.side) .side .brand-button span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body:has(.side) .side .lang-select,
  body:has(.side) .side .theme-toggle {
    width: 100%;
    margin: 0;
    min-height: 48px;
  }

  body:has(.side) .side nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    margin: 0;
    padding: 0 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:has(.side) .side a,
  body:has(.side) .side button {
    flex: 0 0 auto;
    min-height: 44px;
    max-width: none;
    padding: 10px 14px;
    border: 1px solid #d5e1f6;
    border-radius: 8px;
    white-space: nowrap;
  }

  body:has(.side) .side a.active::before,
  body:has(.side) .side button.active::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 3px;
  }

  body:has(.side) .main {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }

  body:has(.side) .admin-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
  }

  body:has(.side) .admin-panel h2 {
    font-size: 34px;
    line-height: 1.04;
  }

  body:has(.side) .admin-panel-actions,
  body:has(.side) .admin-panel-actions .btn {
    width: 100%;
  }

  body:has(.side) .admin-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body:has(.side) .control-wrap input,
  body:has(.side) .control-wrap select,
  body:has(.side) .control-wrap textarea {
    min-width: 0;
  }

  body:has(.side) .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:has(.side) #appsTab table,
  body:has(.side) #usersTab table {
    display: block;
    background: transparent;
  }

  body:has(.side) #appsTab thead,
  body:has(.side) #usersTab thead {
    display: none;
  }

  body:has(.side) #appsTab tbody,
  body:has(.side) #usersTab tbody {
    display: grid;
    gap: 12px;
  }

  body:has(.side) #appsTab tr,
  body:has(.side) #usersTab tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d5e1f6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(24, 43, 79, .07);
  }

  body:has(.side) #appsTab td,
  body:has(.side) #usersTab td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    color: #17243a;
    word-break: break-word;
  }

  body:has(.side) #appsTab td::before,
  body:has(.side) #usersTab td::before {
    color: #7a879d;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  body:has(.side) #appsTab td:nth-child(1)::before { content: "ID"; }
  body:has(.side) #appsTab td:nth-child(2)::before { content: "Клиент"; }
  body:has(.side) #appsTab td:nth-child(3)::before { content: "Сумма"; }
  body:has(.side) #appsTab td:nth-child(4)::before { content: "Статус"; }
  body:has(.side) #appsTab td:nth-child(5)::before { content: "Действия"; }
  body:has(.side) #usersTab td:nth-child(1)::before { content: "ID"; }
  body:has(.side) #usersTab td:nth-child(2)::before { content: "Имя"; }
  body:has(.side) #usersTab td:nth-child(3)::before { content: "Email"; }
  body:has(.side) #usersTab td:nth-child(4)::before { content: "Роль"; }
  body:has(.side) #usersTab td:nth-child(5)::before { content: "Доступ"; }
  body:has(.side) #usersTab td:nth-child(6)::before { content: "Действия"; }

  body:has(.side) #appsTab .details-row,
  body:has(.side) #appsTab .details-row > td {
    display: block;
  }

  body:has(.side) #appsTab .details-row > td::before {
    content: "";
    display: none;
  }

  body:has(.side) .inline-details {
    padding: 14px;
  }

  body:has(.side) .table-status-select,
  body:has(.side) .table-action-select {
    width: 100%;
    max-width: none;
  }

  body:has(.side) .user-inline-form {
    grid-template-columns: 1fr;
  }

  body:has(.side) .user-inline-form .btn {
    width: 100%;
  }

  body:has(.side) .pagination {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  html[data-crm-theme="dark"] body:has(.side) {
    background: #071120;
  }

  html[data-crm-theme="dark"] body:has(.side) .side,
  html[data-crm-theme="dark"] body:has(.side) #appsTab tr,
  html[data-crm-theme="dark"] body:has(.side) #usersTab tr {
    background: #0f1b2c;
    border-color: #2b4164;
  }

  html[data-crm-theme="dark"] body:has(.side) #appsTab td,
  html[data-crm-theme="dark"] body:has(.side) #usersTab td {
    color: #eaf1ff;
  }

  html[data-crm-theme="dark"] body:has(.side) #appsTab td::before,
  html[data-crm-theme="dark"] body:has(.side) #usersTab td::before {
    color: #9fb0ca;
  }

  html[data-crm-theme="dark"] body:has(.side) .table-wrap td input,
  html[data-crm-theme="dark"] body:has(.side) .table-wrap td select,
  html[data-crm-theme="dark"] body:has(.side) .user-inline-form input {
    background: #0a1424;
    color: #eef4ff;
    border-color: #2b4164;
  }

  body:has(.side) .telegram-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    max-height: none;
    min-height: calc(100dvh - 210px);
    overflow: visible;
    border-radius: 12px;
  }

  body:has(.side) .telegram-list {
    border-right: 0;
    border-bottom: 1px solid #d5e1f6;
  }

  body:has(.side) .telegram-list-head {
    padding: 12px;
  }

  body:has(.side) .telegram-list-head h2 {
    font-size: clamp(30px, 8vw, 42px);
    margin-bottom: 6px;
  }

  body:has(.side) .telegram-list-head .chat-head-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
  }

  body:has(.side) .telegram-list-head .chat-filter {
    min-width: 160px;
  }

  body:has(.side) .telegram-list-head .chat-search {
    grid-column: 1 / -1;
  }

  body:has(.side) .telegram-list-head .chat-head-actions select,
  body:has(.side) .telegram-list-head .chat-head-actions input,
  body:has(.side) .telegram-list-head .chat-head-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 12px;
    font-size: 15px;
  }

  body:has(.side) .telegram-list-head .chat-head-actions .btn {
    align-self: end;
    grid-column: 1 / -1;
  }

  body:has(.side) .telegram-list .chat-list {
    max-height: 420px;
    padding: 8px;
  }

  body:has(.side) .telegram-list .chat-row {
    grid-template-columns: 44px minmax(0, 1fr) 34px;
    gap: 10px;
    min-height: 74px;
    padding: 10px 10px;
    border-radius: 8px;
  }

  body:has(.side) .telegram-list .chat-row.unread {
    box-shadow: inset 3px 0 0 #22c7e8;
  }

  body:has(.side) .telegram-list .chat-row .chat-avatar {
    width: 44px;
    height: 44px;
  }

  body:has(.side) .telegram-list .chat-row time {
    grid-column: 3;
    justify-self: end;
    align-self: end;
    font-size: 13px;
  }

  body:has(.side) .telegram-list .chat-row em,
  body:has(.side) .telegram-list .chat-row .read-mark {
    position: static;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    transform: none;
  }

  body:has(.side) .telegram-list .chat-row strong {
    font-size: 17px;
  }

  body:has(.side) .telegram-list .chat-row small {
    font-size: 15px;
  }

  body:has(.side) .chat-row-tags {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  body:has(.side) .rd-mini {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:has(.side) .telegram-chat {
    min-height: 560px;
    height: calc(100dvh - 238px);
    border-radius: 0 0 12px 12px;
  }

  body:has(.side) .telegram-chat.hidden {
    display: none;
  }

  body:has(.side) .telegram-chat-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  body:has(.side) .telegram-chat-head .user-id-badge,
  body:has(.side) .telegram-chat-head .chat-status-select,
  body:has(.side) .telegram-chat-head .btn {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  body:has(.side) .admin-chat-messages {
    padding: 12px;
  }

  body:has(.side) .admin-chat-messages .chat-msg {
    max-width: 100%;
  }

  body:has(.side) .telegram-chat .chat-input {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  body:has(.side) .telegram-chat .chat-input .btn {
    width: 100%;
  }

  .dashboard-summary { grid-template-columns: 1fr; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-filter-bar {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .utm-tools {
    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;
  }
}

.client-account-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.client-side-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(24, 43, 79, .05);
}
.client-side-nav button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #536176;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.client-side-nav button span {
  width: 24px;
  color: #1d3f91;
  text-align: center;
}
.client-side-nav button.active {
  background: #13845f;
  color: #fff;
  border-color: #13845f;
}
.client-side-nav button.active span { color: #fff; }
.client-account-main { min-width: 0; }
.profile-view {
  max-width: 760px;
  margin: 0 auto;
}
.profile-view > h1 {
  margin: 4px 0 12px;
  color: #17243a;
  font-size: 24px;
}
.profile-card {
  padding: 22px;
  border: 1px solid #d5e1f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 43, 79, .06);
}
.profile-card + .profile-card { margin-top: 14px; }
.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.profile-card h2 {
  margin: 0;
  color: #173775;
  font-size: 18px;
}
.profile-edit-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}
.profile-rows { display: grid; }
.profile-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #e3eaf7;
}
.profile-row:first-child { border-top: 0; }
.profile-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f6ff;
  color: #173775;
  font-size: 14px;
  font-weight: 900;
}
.profile-row small {
  color: #5f6b80;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.profile-row strong {
  min-width: 0;
  color: #17243a;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.security-card { display: grid; gap: 8px; }
.security-card h2 { margin-bottom: 4px; }
.security-row,
.security-note {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e3eaf7;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  text-align: left;
}
.security-row { cursor: pointer; }
.security-row strong,
.security-note strong { font-size: 14px; }
.security-row em {
  color: #5f6b80;
  font-size: 24px;
  font-style: normal;
}
.security-note {
  border-color: #f0d7af;
  background: #fffaf2;
}
.security-note .profile-icon {
  background: #fff1e3;
  color: #c9571b;
}
.security-note p {
  margin: 5px 0 0;
  color: #697588;
  font-size: 13px;
}
.security-note > small {
  padding: 4px 7px;
  border: 1px solid #f0d7af;
  border-radius: 7px;
  color: #9a5d1d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .client-account-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .client-side-nav {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px;
    overflow-x: auto;
  }
  .client-side-nav button {
    min-width: 82px;
    justify-content: center;
    padding: 8px;
    font-size: 12px;
  }
  .client-side-nav button span { display: none; }
  .profile-view { max-width: none; }
  .profile-card { padding: 16px; }
  .profile-card-head {
    display: grid;
    align-items: stretch;
  }
  .profile-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }
  .profile-row strong { grid-column: 2; }
  .security-row,
  .security-note {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .security-note > small {
    grid-column: 2;
    justify-self: start;
  }
}

/* Final Credito Italia polish overrides */
body,
.site-body,
body:has(.app-shell),
html[data-crm-theme="dark"] body:has(.app-shell) {
  color: var(--ui-ink, #172033);
  background: linear-gradient(180deg, #f7f9fd 0%, #eef3fa 48%, #f8fafd 100%) !important;
}

.topbar,
.app-topline,
.side,
.telegram-chat-head,
.telegram-chat .chat-input,
html[data-crm-theme="dark"] .side,
html[data-crm-theme="dark"] .telegram-chat-head,
html[data-crm-theme="dark"] .telegram-chat .chat-input {
  background: rgba(255,255,255,.86) !important;
  border-color: var(--ui-line, #dde5f2) !important;
  backdrop-filter: blur(18px);
}

.panel,
.flow-card,
.profile-card,
.steps-panel,
.withdraw-card,
.transfer-section,
.certificate-section,
.dashboard-visual-card,
.dashboard-card,
.metric-card,
.table-wrap,
.crm-modal-card,
.payment-sheet,
.chat-panel,
.telegram-shell,
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"] .table-wrap,
html[data-crm-theme="dark"] .telegram-shell {
  color: var(--ui-ink, #172033) !important;
  border-color: var(--ui-line, #dde5f2) !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 18px 50px rgba(31,45,74,.10) !important;
}

.admin-panel,
.dashboard-hero,
html[data-crm-theme="dark"] .dashboard-hero {
  border-radius: 26px !important;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,247,255,.94)) !important;
}

.brand-mark,
.login-brand-mark,
.node-logo,
.chat-avatar,
.step-dot.done span,
.step-item.complete .step-icon {
  background: linear-gradient(135deg, #13845f, #78cfa2) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(36,88,219,.22) !important;
}

.btn,
.lang-select,
.field input,
.field select,
.field textarea,
.amount-control input[type="number"],
.admin-filters select,
.admin-filters input,
.dashboard-filter-bar select,
.dashboard-filter-bar input,
.chat-head-actions select,
.chat-head-actions input,
.utm-tools input,
.utm-tools select,
.modal-form input,
.modal-form select,
.chat-status-select,
html[data-crm-theme="dark"] .btn,
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 {
  color: var(--ui-ink, #172033) !important;
  border-color: var(--ui-line, #dde5f2) !important;
  border-radius: 12px !important;
  background-color: rgba(255,255,255,.94) !important;
}

.btn.primary,
html[data-crm-theme="dark"] .btn.primary {
  background: linear-gradient(135deg, #13845f, #0f6f50) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.btn.gold,
html[data-crm-theme="dark"] .btn.gold {
  background: linear-gradient(135deg, #f3c14c, #e3a82f) !important;
  border-color: transparent !important;
  color: #1f2937 !important;
}

.side {
  width: 248px;
  box-shadow: 16px 0 42px rgba(31,45,74,.06) !important;
}

.side .brand-button,
.theme-toggle {
  border-radius: 16px !important;
  background: #fff !important;
}

.side nav button,
html[data-crm-theme="dark"] .side nav button {
  min-height: 46px;
  border-radius: 14px !important;
  color: #5d687c !important;
  background: transparent !important;
  border-color: transparent !important;
}

.side nav button:hover,
.side nav button.active,
html[data-crm-theme="dark"] .side nav button:hover,
html[data-crm-theme="dark"] .side nav button.active {
  color: #0f3b2d !important;
  background: #edf4ff !important;
  border-color: #cfddfb !important;
}

.admin-panel h2,
.preland-copy h1,
.new-hero h1,
.profile-view h1 {
  color: #121b2d !important;
  letter-spacing: 0 !important;
}

.preland-copy h1,
.new-hero h1 {
  font-size: clamp(42px, 5.6vw, 76px) !important;
  line-height: .98 !important;
}

.preland-visual,
.flow-card {
  border-radius: 26px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(238,246,255,.88)) !important;
}

.preland-metrics div,
.program-card,
.how-list article,
.mission-card,
.faq-list details {
  border-radius: 18px !important;
  border-color: var(--ui-line, #dde5f2) !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: 0 10px 28px rgba(31,45,74,.07) !important;
}

.metric-card {
  min-height: 150px;
  background: linear-gradient(145deg, #fff, #f5f8fd) !important;
}

.metric-card strong {
  color: #142038 !important;
  font-size: clamp(34px, 4vw, 52px) !important;
}

.metric-card.blue strong { color: #78cfa2 !important; }
.metric-card.green strong { color: #24b47e !important; }
.metric-card.gold strong { color: #d99b11 !important; }
.metric-card.red strong { color: #ef5b65 !important; }

.hint,
.field-note,
.section-kicker,
.control-wrap span,
.chat-filter > span,
.metric-card span,
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"] .chat-filter > span {
  color: #768196 !important;
}

table,
th,
td,
html[data-crm-theme="dark"] table,
html[data-crm-theme="dark"] th,
html[data-crm-theme="dark"] td {
  color: var(--ui-ink, #172033) !important;
  border-color: var(--ui-line, #dde5f2) !important;
  background: rgba(255,255,255,.88) !important;
}

th,
html[data-crm-theme="dark"] th {
  background: #f4f7fc !important;
  color: #68758b !important;
}

tr:hover td,
html[data-crm-theme="dark"] tr:hover td {
  background: #f4f8ff !important;
}

.balance-card {
  border-radius: 28px !important;
  background: linear-gradient(135deg, #eefbf6, #eef6ff 68%, #fff) !important;
  border-color: #cfe8df !important;
  box-shadow: 0 24px 60px rgba(19,126,91,.12) !important;
}

.balance-card h1,
.amount-control strong,
#approvedView,
#requestedView {
  color: #0f9a6b !important;
}

.client-side-nav {
  border-radius: 22px !important;
  background: rgba(255,255,255,.86) !important;
  border-color: var(--ui-line, #dde5f2) !important;
  box-shadow: 0 10px 28px rgba(31,45,74,.07) !important;
}

.client-side-nav button {
  border-radius: 14px !important;
}

.client-side-nav button.active {
  background: #edf4ff !important;
  color: #0f3b2d !important;
}

.telegram-shell {
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  border-radius: 24px !important;
}

.telegram-list,
html[data-crm-theme="dark"] .telegram-list {
  background: #f8fafd !important;
}

.telegram-chat,
html[data-crm-theme="dark"] .telegram-chat {
  background: linear-gradient(180deg, rgba(249,251,255,.96), rgba(240,246,252,.92)) !important;
}

.telegram-list .chat-row {
  min-height: 74px;
  margin-bottom: 6px;
  border-radius: 16px !important;
}

.telegram-list .chat-row:hover,
.telegram-list .chat-row.active,
.telegram-list .chat-row.unread,
html[data-crm-theme="dark"] .telegram-list .chat-row:hover,
html[data-crm-theme="dark"] .telegram-list .chat-row.active,
html[data-crm-theme="dark"] .telegram-list .chat-row.unread {
  background: #eef5ff !important;
}

.telegram-chat .admin-chat-messages .chat-msg {
  border-radius: 18px !important;
}

.telegram-chat .admin-chat-messages .chat-msg.client,
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg.client {
  background: #fff !important;
  color: var(--ui-ink, #172033) !important;
}

.telegram-chat .admin-chat-messages .chat-msg.manager,
html[data-crm-theme="dark"] .telegram-chat .admin-chat-messages .chat-msg.manager {
  background: #dcf7e8 !important;
  color: var(--ui-ink, #172033) !important;
}

.chat-head {
  background: linear-gradient(135deg, #172033, #273750) !important;
}

@media (max-width: 900px) {
  .preland-hero,
  .new-hero {
    grid-template-columns: 1fr !important;
    padding-top: 108px !important;
  }
  .side {
    width: auto;
  }
  .telegram-shell {
    grid-template-columns: 1fr !important;
  }
}

/* Contrast repair after light redesign */
.brand,
.brand span,
.brand-button,
.brand-button span,
.theme-toggle,
.theme-toggle span,
.side nav button,
.side nav button span,
.side nav button strong,
.telegram-list .chat-row,
.telegram-list .chat-row *,
.telegram-chat-head,
.telegram-chat-head *,
.dashboard-card-head,
.dashboard-card-head *,
.dashboard-row,
.dashboard-row *,
.profile-row,
.profile-row *,
.security-row,
.security-row *,
.step-item,
.step-item *,
.field label,
.amount-control label,
html[data-crm-theme="dark"] .brand,
html[data-crm-theme="dark"] .brand span,
html[data-crm-theme="dark"] .brand-button,
html[data-crm-theme="dark"] .brand-button span,
html[data-crm-theme="dark"] .theme-toggle,
html[data-crm-theme="dark"] .theme-toggle span,
html[data-crm-theme="dark"] .side nav button,
html[data-crm-theme="dark"] .side nav button span,
html[data-crm-theme="dark"] .side nav button strong,
html[data-crm-theme="dark"] .telegram-list .chat-row,
html[data-crm-theme="dark"] .telegram-list .chat-row *,
html[data-crm-theme="dark"] .telegram-chat-head,
html[data-crm-theme="dark"] .telegram-chat-head *,
html[data-crm-theme="dark"] .dashboard-card-head,
html[data-crm-theme="dark"] .dashboard-card-head *,
html[data-crm-theme="dark"] .dashboard-row,
html[data-crm-theme="dark"] .dashboard-row * {
  opacity: 1 !important;
  color: #172033 !important;
  text-shadow: none !important;
}

.brand-mark,
.brand-mark *,
.chat-avatar,
.chat-avatar *,
.btn.primary,
.btn.primary *,
.step-dot.done span,
.step-item.complete .step-icon,
html[data-crm-theme="dark"] .brand-mark,
html[data-crm-theme="dark"] .brand-mark *,
html[data-crm-theme="dark"] .chat-avatar,
html[data-crm-theme="dark"] .chat-avatar *,
html[data-crm-theme="dark"] .btn.primary,
html[data-crm-theme="dark"] .btn.primary * {
  color: #fff !important;
}

.dashboard-card-head,
html[data-crm-theme="dark"] .dashboard-card-head {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.dashboard-card-head h3,
.telegram-list-head h2,
.admin-panel h2,
.profile-card h2,
.steps-head h2 {
  color: #111827 !important;
}

.dashboard-card-head span,
.telegram-chat-head span,
.telegram-list .chat-row small,
.telegram-list .chat-row time,
.rd-mini,
html[data-crm-theme="dark"] .dashboard-card-head span,
html[data-crm-theme="dark"] .telegram-chat-head span,
html[data-crm-theme="dark"] .telegram-list .chat-row small,
html[data-crm-theme="dark"] .telegram-list .chat-row time,
html[data-crm-theme="dark"] .rd-mini {
  color: #667085 !important;
}

.telegram-list .chat-row,
.telegram-list .chat-row.read,
.telegram-list .chat-row.unread,
html[data-crm-theme="dark"] .telegram-list .chat-row,
html[data-crm-theme="dark"] .telegram-list .chat-row.read,
html[data-crm-theme="dark"] .telegram-list .chat-row.unread {
  opacity: 1 !important;
}

.telegram-list .chat-row strong,
.telegram-list .chat-row-main strong,
.telegram-list .chat-row .user-id-badge,
.telegram-list .chat-row .stage-badge,
html[data-crm-theme="dark"] .telegram-list .chat-row strong,
html[data-crm-theme="dark"] .telegram-list .chat-row-main strong,
html[data-crm-theme="dark"] .telegram-list .chat-row .user-id-badge,
html[data-crm-theme="dark"] .telegram-list .chat-row .stage-badge {
  color: #172033 !important;
}

.telegram-list .chat-row .user-id-badge,
html[data-crm-theme="dark"] .telegram-list .chat-row .user-id-badge {
  background: #dfeaff !important;
  border-color: #b8cbf6 !important;
  color: #0f3b2d !important;
}

.telegram-list .chat-row .stage-badge,
html[data-crm-theme="dark"] .telegram-list .chat-row .stage-badge {
  background: #e4f7ef !important;
  border-color: #a9dfca !important;
  color: #13795b !important;
}

.telegram-list .chat-row em,
html[data-crm-theme="dark"] .telegram-list .chat-row em {
  background: #20b99f !important;
  color: #fff !important;
}

.read-mark,
html[data-crm-theme="dark"] .read-mark {
  color: #94a3b8 !important;
}

.metric-card small,
.metric-card span,
.donut-legend span,
.area-axis,
html[data-crm-theme="dark"] .metric-card small,
html[data-crm-theme="dark"] .metric-card span,
html[data-crm-theme="dark"] .donut-legend span,
html[data-crm-theme="dark"] .area-axis {
  opacity: 1 !important;
  color: #667085 !important;
}

.chart-tooltip,
html[data-crm-theme="dark"] .chart-tooltip {
  background: #fff !important;
  color: #172033 !important;
}

.chart-tooltip *,
html[data-crm-theme="dark"] .chart-tooltip * {
  color: #172033 !important;
}

/* Funnel traffic rows must stay readable on the light CRM refresh */
.dashboard-list .dashboard-row,
.dashboard-list .dashboard-row.passive,
.dashboard-list .dashboard-row.passive:hover,
html[data-crm-theme="dark"] .dashboard-list .dashboard-row,
html[data-crm-theme="dark"] .dashboard-list .dashboard-row.passive,
html[data-crm-theme="dark"] .dashboard-list .dashboard-row.passive:hover {
  background: #f8fbff !important;
  border-color: #d8e3f5 !important;
  color: #172033 !important;
  opacity: 1 !important;
  box-shadow: 0 10px 24px rgba(24, 43, 79, .05) !important;
}

.dashboard-list .dashboard-row *,
html[data-crm-theme="dark"] .dashboard-list .dashboard-row * {
  color: #172033 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.dashboard-list .dashboard-row small,
html[data-crm-theme="dark"] .dashboard-list .dashboard-row small {
  color: #667085 !important;
}

.admin-page .dashboard-card .dashboard-list > .dashboard-row,
.admin-page .dashboard-card .dashboard-list > .dashboard-row.passive,
.admin-page .dashboard-card .dashboard-list > button.dashboard-row,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row.passive,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > button.dashboard-row {
  background: #ffffff !important;
  border: 1px solid #d8e3f5 !important;
  color: #172033 !important;
  opacity: 1 !important;
}

.admin-page .dashboard-card .dashboard-list > .dashboard-row strong,
.admin-page .dashboard-card .dashboard-list > .dashboard-row span,
.admin-page .dashboard-card .dashboard-list > .dashboard-row b,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row strong,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row span,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row b {
  color: #172033 !important;
  opacity: 1 !important;
}

.admin-page .dashboard-card .dashboard-list > .dashboard-row small,
html[data-crm-theme="dark"] .admin-page .dashboard-card .dashboard-list > .dashboard-row small {
  color: #5f6f86 !important;
  opacity: 1 !important;
}

.apply-body .install-shortcut,
.apply-body .chat-widget {
  display: none !important;
}

.masked-password-input {
  -webkit-text-security: disc;
  text-security: disc;
}

.register-form {
  display: grid;
  gap: 18px;
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
}

.register-grid .field {
  min-width: 0;
  margin: 0;
  align-content: start;
}

.register-grid .field-full {
  grid-column: 1 / -1;
}

.register-grid .field input,
.register-grid .field select {
  width: 100%;
  height: 58px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 14px;
  background: #fff;
  font-size: 17px;
  line-height: 1.2;
}

.register-grid .phone-control {
  grid-template-columns: 92px minmax(0, 1fr);
  height: 58px;
  min-height: 58px;
  border-radius: 14px;
  background: #fff;
}

.register-grid .phone-prefix {
  min-width: 0;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 16px;
}

.register-grid .field .phone-control input {
  height: 56px;
  min-height: 56px;
  padding: 0 12px;
  font-size: 18px;
}

.register-grid .field-note {
  display: block;
  max-width: 420px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.35;
}

.register-form .consent {
  display: block;
  padding: 2px 0 0;
}

.register-form .consent > span {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d8e3f3;
  border-radius: 14px;
  background: rgba(255, 255, 255, .74);
  color: #172033;
  font-weight: 650;
  line-height: 1.35;
}

.register-form .consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: #13845f;
}

.register-form .consent > span > span {
  display: block;
}

@media (max-width: 760px) {
  .register-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .register-grid .field input,
  .register-grid .field select,
  .register-grid .phone-control {
    height: 54px;
    min-height: 54px;
    border-radius: 12px;
  }

  .register-grid .field .phone-control input {
    height: 52px;
    min-height: 52px;
    padding: 0 10px;
  }

  .register-grid .phone-prefix {
    min-width: 0;
    padding: 0 6px;
    font-size: 15px;
  }

  .register-grid .phone-control {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .register-grid .field-note {
    max-width: none;
    font-size: 14px;
  }

  .register-form .consent > span {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
  }
}

.apps-compact-table {
  table-layout: fixed;
  min-width: 980px;
}

.apps-compact-table th,
.apps-compact-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.apps-compact-table th:nth-child(1) { width: 180px; }
.apps-compact-table th:nth-child(2) { width: 210px; }
.apps-compact-table th:nth-child(3) { width: 230px; }
.apps-compact-table th:nth-child(4) { width: 230px; }
.apps-compact-table th:nth-child(5) { width: 150px; }
.apps-compact-table th:nth-child(6) { width: 150px; }

.app-compact-row td {
  height: 58px;
}

.app-compact-row .hint {
  display: block;
  margin-top: 3px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-link {
  display: inline;
  border: 0;
  background: transparent;
  color: #13845f;
  padding: 0;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.table-link:hover {
  color: #143a9a;
  text-decoration: underline;
}

.table-link.strong {
  color: #132033;
}

.app-details-modal-card {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.app-details-modal-card .inline-details {
  border: 0;
  box-shadow: none;
  padding: 4px 2px 2px;
}

body:has(.side) #appsTab .table-wrap {
  overflow-x: auto;
}

body:has(.side) #appsTab .apps-compact-table,
body:has(.side) #appsTab .apps-compact-table thead,
body:has(.side) #appsTab .apps-compact-table tbody,
body:has(.side) #appsTab .apps-compact-table tr {
  display: revert;
}

body:has(.side) #appsTab .apps-compact-table td {
  display: table-cell;
  grid-template-columns: none;
  padding: 10px 12px !important;
  word-break: normal;
}

body:has(.side) #appsTab .apps-compact-table td::before {
  content: none !important;
}

#appsTab .apps-compact-table .rd-state {
  display: none;
}

#appsTab .apps-compact-table .table-status-select {
  border-color: rgba(10, 132, 105, .32);
  background-color: #ecfff8;
  color: #075f4e;
}

#appsTab .apps-compact-table .table-status-select:focus {
  border-color: #0b8f71;
  box-shadow: 0 0 0 4px rgba(11, 143, 113, .14);
}

html[data-crm-theme="dark"] #appsTab .apps-compact-table .table-status-select {
  border-color: rgba(45, 212, 163, .38);
  background-color: rgba(15, 118, 98, .22);
  color: #7df0cf;
}

html[data-crm-theme="dark"] body:has(.app-shell) {
  color: #eef5ff !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(36, 88, 219, .14), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(32, 185, 159, .12), transparent 26%),
    linear-gradient(180deg, #07101d 0%, #0b1524 48%, #08111f 100%) !important;
}

html[data-crm-theme="dark"] .app-shell,
html[data-crm-theme="dark"] .main {
  background: transparent !important;
}

html[data-crm-theme="dark"] .side,
html[data-crm-theme="dark"] .topbar,
html[data-crm-theme="dark"] .app-topline,
html[data-crm-theme="dark"] .telegram-chat-head,
html[data-crm-theme="dark"] .telegram-chat .chat-input {
  background: rgba(8, 16, 30, .94) !important;
  border-color: #223452 !important;
}

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"] .table-wrap,
html[data-crm-theme="dark"] .crm-modal-card,
html[data-crm-theme="dark"] .telegram-shell,
html[data-crm-theme="dark"] .chat-panel,
html[data-crm-theme="dark"] .payment-sheet {
  color: #eef5ff !important;
  border-color: #263b5c !important;
  background: rgba(13, 24, 42, .94) !important;
  box-shadow: 0 22px 62px rgba(0, 0, 0, .34) !important;
}

html[data-crm-theme="dark"] .admin-panel,
html[data-crm-theme="dark"] .dashboard-hero {
  background:
    linear-gradient(135deg, rgba(13, 24, 42, .96), rgba(9, 18, 32, .94)) !important;
}

html[data-crm-theme="dark"] table,
html[data-crm-theme="dark"] th,
html[data-crm-theme="dark"] td {
  color: #eef5ff !important;
  border-color: #263b5c !important;
  background: #0f1b2f !important;
}

html[data-crm-theme="dark"] tr:hover td {
  background: #14233b !important;
}

html[data-crm-theme="dark"] .btn,
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,
html[data-crm-theme="dark"] .table-action-select {
  color: #eef5ff !important;
  border-color: #334d75 !important;
  background-color: #0b1628 !important;
  box-shadow: none !important;
}

html[data-crm-theme="dark"] .btn.primary {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #13845f, #0f6f50) !important;
}

html[data-crm-theme="dark"] .side nav button,
html[data-crm-theme="dark"] .theme-toggle,
html[data-crm-theme="dark"] .brand-button,
html[data-crm-theme="dark"] .table-link.strong {
  color: #eef5ff !important;
}

html[data-crm-theme="dark"] .side nav button:hover,
html[data-crm-theme="dark"] .side nav button.active {
  background: rgba(36, 88, 219, .18) !important;
  border-color: #31558d !important;
}

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"] th,
html[data-crm-theme="dark"] .chat-filter > span {
  color: #9fb0ca !important;
}

/* Italy local edition */
.italy-public {
  --ink: #15233a;
  --muted: #657188;
  --line: #dbe5f3;
  --navy: #1c2d46;
  --blue: #2f66e8;
  --blue-2: #5a96f5;
  --green: #1ec58f;
  color: var(--ink);
  background-color: #f4f8ff;
  background-image:
    linear-gradient(30deg, rgba(47, 102, 232, .075) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .075) 87.5%, rgba(47, 102, 232, .075)),
    linear-gradient(150deg, rgba(47, 102, 232, .075) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .075) 87.5%, rgba(47, 102, 232, .075)),
    linear-gradient(30deg, rgba(47, 102, 232, .075) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .075) 87.5%, rgba(47, 102, 232, .075)),
    linear-gradient(150deg, rgba(47, 102, 232, .075) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .075) 87.5%, rgba(47, 102, 232, .075)),
    linear-gradient(60deg, rgba(21, 35, 58, .045) 25%, transparent 25.5%, transparent 75%, rgba(21, 35, 58, .045) 75%, rgba(21, 35, 58, .045)),
    linear-gradient(60deg, rgba(21, 35, 58, .045) 25%, transparent 25.5%, transparent 75%, rgba(21, 35, 58, .045) 75%, rgba(21, 35, 58, .045));
  background-position: 0 0, 0 0, 39px 68px, 39px 68px, 0 0, 39px 68px;
  background-size: 78px 136px;
}

.italy-public .landing-topbar,
.italy-public .app-topline {
  background: var(--navy) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 32px rgba(16, 34, 60, .18);
}

.italy-public .brand,
.italy-public .brand span,
.italy-public .nav a,
.italy-public .topline-actions,
.italy-public .topline-actions .btn {
  color: #fff !important;
}

.italy-public .brand-mark {
  background: linear-gradient(135deg, #2f66e8, #74a8ff);
}

.italy-public .landing-topbar .btn:not(.primary),
.italy-public .app-topline .btn:not(.primary) {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .2) !important;
}

.italy-public .btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f66e8, #4f86f2);
  box-shadow: 0 14px 30px rgba(47, 102, 232, .24);
}

.italy-public .new-hero {
  max-width: 1628px;
  margin: 38px auto 70px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

.italy-public .hero-copy {
  min-height: 320px;
  padding: 56px 56px 50px;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, .18), transparent 90px),
    linear-gradient(135deg, #294897 0%, #2f66e8 58%, #5b97f5 100%);
  box-shadow: 0 28px 70px rgba(33, 78, 170, .28);
}

.italy-public .hero-copy .eyebrow,
.italy-public .hero-copy p,
.italy-public .hero-metrics span {
  color: rgba(255, 255, 255, .86);
}

.italy-public .hero-copy h1 {
  color: #fff !important;
  max-width: 820px;
  margin: 18px auto 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
}

.italy-public .hero-copy p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 20px;
}

.italy-public .hero-metrics {
  max-width: 760px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.italy-public .hero-metrics div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
}

.italy-public .flow-card,
.italy-public .panel,
.italy-public .balance-card,
.italy-public .steps-panel,
.italy-public .withdraw-card,
.italy-public .action-card,
.italy-public .certificate-section,
.italy-public .transfer-section,
.italy-public .payment-sheet,
.italy-public .contract-paper {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 54px rgba(38, 66, 112, .12);
}

.italy-public .flow-card {
  max-width: 1180px;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 34px;
}

.italy-public .flow-progress-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 28px;
}

.italy-public .flow-progress-line i {
  height: 5px;
  border-radius: 999px;
  background: #dce6f4;
}

.italy-public .flow-progress-line i.active {
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.italy-public .field label,
.italy-public .amount-control label {
  color: #142036;
  letter-spacing: .12em;
}

.italy-public input,
.italy-public select,
.italy-public textarea {
  border-color: #dbe5f3;
  background: #fff;
  color: #142036;
}

.italy-public .phone-control {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
}

.italy-public .phone-prefix {
  min-width: 0;
  justify-content: center;
  padding: 0 14px;
  gap: 8px;
}

.italy-public .phone-control input {
  min-width: 0;
}

.italy-public .consent {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.italy-public .consent span {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.italy-public .consent input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.italy-cabinet .client-account-layout {
  max-width: 1628px;
  margin: 26px auto 70px;
  display: block;
  padding: 0 20px;
}

.italy-cabinet .client-side-nav {
  display: none;
}

.italy-cabinet .client-account-main {
  width: 100%;
}

.italy-cabinet .progress-top {
  margin: 0 0 24px;
  padding: 22px 26px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(38, 66, 112, .12);
}

.italy-cabinet .step-track,
.italy-cabinet .step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 14px;
}

.italy-cabinet .step-track {
  position: relative;
  margin-top: 14px;
}

.italy-cabinet .step-track::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 20px;
  height: 3px;
  background: #dfe7f2;
}

.italy-cabinet .step-dot {
  position: relative;
  z-index: 1;
  text-align: center;
}

.italy-cabinet .step-dot span {
  margin: 0 auto 8px;
}

.italy-cabinet .balance-card {
  margin-bottom: 24px;
  padding: 34px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .16), transparent 90px),
    linear-gradient(135deg, #294897, #3270ed 60%, #5b97f5);
  color: #fff;
}

.italy-cabinet .balance-card .section-kicker,
.italy-cabinet .balance-card .mini-pills span {
  color: rgba(255, 255, 255, .86);
}

.italy-cabinet .step-list {
  align-items: stretch;
}

.italy-cabinet .step-item {
  min-height: 120px;
  border-radius: 16px;
  border-color: var(--line);
}

.italy-cabinet .step-item.complete {
  border-color: rgba(30, 197, 143, .45);
  background: #effdf8;
}

.italy-cabinet .chat-button {
  right: 24px;
  bottom: 24px;
  background: #10233d;
}

.italy-admin .lang-select {
  display: none;
}

@media (max-width: 760px) {
  .italy-public .landing-topbar,
  .italy-public .app-topline {
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 0;
    background: var(--navy) !important;
  }

  .italy-public .new-hero {
    margin: 20px auto 42px;
    padding: 0 14px;
  }

  .italy-public .hero-copy {
    min-height: 250px;
    padding: 34px 22px;
    border-radius: 18px;
  }

  .italy-public .hero-metrics,
  .italy-cabinet .step-track,
  .italy-cabinet .step-list {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    overflow-x: auto;
  }

  .italy-public .flow-card {
    padding: 22px;
  }

  .italy-public .register-grid {
    grid-template-columns: 1fr;
  }

  .italy-public .phone-control {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .italy-cabinet .step-track::before {
    display: block;
  }
}

.italy-public.apply-body {
  padding-top: 0 !important;
}

.italy-public.apply-body main {
  padding-top: 128px !important;
}

.italy-public .new-hero {
  width: min(100% - 56px, 1628px) !important;
  max-width: 1628px !important;
  margin: 28px auto 64px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.italy-public .new-hero::after {
  content: none !important;
  display: none !important;
}

.italy-public .hero-copy {
  width: 100% !important;
  max-width: none !important;
  min-height: 330px !important;
  margin: 0 !important;
  padding: 48px 68px 46px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

.italy-public .hero-copy h1,
.italy-public .new-hero h1 {
  width: 100% !important;
  max-width: 980px !important;
  margin: 12px auto 16px !important;
  color: #fff !important;
  font-size: clamp(38px, 3.25vw, 60px) !important;
  line-height: 1.04 !important;
  letter-spacing: 0 !important;
}

.italy-public .hero-copy p,
.italy-public .new-hero p {
  max-width: 880px !important;
  color: rgba(255, 255, 255, .9) !important;
  font-size: 19px !important;
  line-height: 1.55 !important;
}

.italy-public .hero-metrics {
  width: min(100%, 900px) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 28px !important;
}

.italy-public .flow-card {
  margin-top: 30px !important;
}

.italy-public .custom-select {
  position: relative !important;
  z-index: 12 !important;
}

.italy-public .custom-select-trigger {
  width: 100% !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 0 20px !important;
  border: 1px solid #dbe5f3 !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #15233a !important;
  font-weight: 850 !important;
  text-align: left !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.italy-public .custom-select-trigger span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.italy-public .custom-select-trigger i {
  width: 10px !important;
  height: 10px !important;
  flex: 0 0 auto !important;
  border-right: 2px solid #42526a !important;
  border-bottom: 2px solid #42526a !important;
  transform: rotate(45deg) translateY(-2px) !important;
  transition: transform .18s ease !important;
}

.italy-public .custom-select.open .custom-select-trigger {
  border-color: #9bb8ff !important;
  box-shadow: 0 0 0 4px rgba(47, 102, 232, .12) !important;
}

.italy-public .custom-select.open .custom-select-trigger i {
  transform: rotate(225deg) translate(-2px, -1px) !important;
}

.italy-public .custom-select.invalid .custom-select-trigger {
  border-color: #ef5b65 !important;
  box-shadow: 0 0 0 4px rgba(239, 91, 101, .12) !important;
}

.italy-public .custom-select-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  display: grid !important;
  gap: 4px !important;
  padding: 8px !important;
  border: 1px solid #dbe5f3 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 22px 48px rgba(21, 35, 58, .18) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-6px) !important;
  pointer-events: none !important;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}

.italy-public .custom-select.open .custom-select-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.italy-public .custom-select-menu button {
  min-height: 46px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #15233a !important;
  text-align: left !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.italy-public .custom-select-menu button:hover,
.italy-public .custom-select-menu button[aria-selected="true"] {
  background: #edf4ff !important;
  color: #1747b4 !important;
}

@media (max-width: 900px) {
  .italy-public.apply-body main {
    padding-top: 108px !important;
  }

  .italy-public .new-hero {
    width: min(100% - 28px, 1628px) !important;
    margin-top: 18px !important;
  }

  .italy-public .hero-copy {
    min-height: 300px !important;
    padding: 36px 22px !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    font-size: clamp(34px, 10vw, 54px) !important;
  }

  .italy-public .hero-copy p,
  .italy-public .new-hero p {
    font-size: 18px !important;
  }

  .italy-public .hero-metrics {
    grid-template-columns: 1fr !important;
  }
}

/* Italy cabinet final visual pass */
.italy-cabinet {
  min-height: 100vh;
  background-color: #f3f7fd !important;
}

.italy-cabinet .app-shell,
.italy-cabinet .client-shell {
  display: block !important;
  min-height: 100vh !important;
  background: transparent !important;
}

.italy-cabinet .main {
  width: 100% !important;
  max-width: none !important;
  padding: 0 0 80px !important;
  overflow: hidden !important;
  background: transparent !important;
}

.italy-cabinet .app-topline {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 18px clamp(22px, 5vw, 72px) !important;
  border-radius: 0 !important;
  background: #1c2d46 !important;
  box-shadow: 0 14px 36px rgba(16, 34, 60, .2) !important;
}

.italy-cabinet .app-topline,
.italy-cabinet .app-topline *,
.italy-cabinet .compact-brand,
.italy-cabinet .compact-brand *,
.italy-cabinet .topline-actions,
.italy-cabinet .topline-actions * {
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.italy-cabinet .app-topline .btn:not(.primary) {
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .22) !important;
}

.italy-cabinet .client-chip {
  min-width: 150px !important;
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .08) !important;
  border-radius: 18px !important;
}

.italy-cabinet .client-chip span {
  color: #fff !important;
  background: linear-gradient(135deg, #2f66e8, #74a8ff) !important;
}

.italy-cabinet .client-account-layout {
  position: relative;
  max-width: 1628px !important;
  width: min(100% - 56px, 1628px) !important;
  margin: 34px auto 80px !important;
  padding: 0 !important;
}

.italy-cabinet .client-account-layout::before {
  content: "";
  position: absolute;
  inset: -34px -80px -80px;
  z-index: -1;
  background-image:
    linear-gradient(30deg, rgba(47, 102, 232, .07) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .07) 87.5%, rgba(47, 102, 232, .07)),
    linear-gradient(150deg, rgba(47, 102, 232, .07) 12%, transparent 12.5%, transparent 87%, rgba(47, 102, 232, .07) 87.5%, rgba(47, 102, 232, .07)),
    linear-gradient(60deg, rgba(21, 35, 58, .04) 25%, transparent 25.5%, transparent 75%, rgba(21, 35, 58, .04) 75%, rgba(21, 35, 58, .04));
  background-size: 78px 136px;
  background-position: 0 0, 0 0, 39px 68px;
}

.italy-cabinet .client-account-main > .client-view > section,
.italy-cabinet .progress-top {
  position: relative;
}

.italy-cabinet .client-account-main > .client-view > section + section::before,
.italy-cabinet .steps-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f66e8, #1ec58f);
  opacity: .9;
}

.italy-cabinet .progress-top {
  padding: 26px 34px 30px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .96) !important;
}

.italy-cabinet .step-track {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  align-items: start !important;
  margin-top: 28px !important;
}

.italy-cabinet .step-track::before {
  left: 9% !important;
  right: 9% !important;
  top: 20px !important;
  height: 4px !important;
  background: linear-gradient(90deg, #1ec58f 0 60%, #dfe7f2 60% 100%) !important;
  border-radius: 999px !important;
}

.italy-cabinet .step-dot {
  display: grid !important;
  justify-items: center !important;
  gap: 10px !important;
}

.italy-cabinet .step-dot span {
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 3px solid #cfe0fb !important;
  color: #13845f !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 18px rgba(36, 88, 219, .12) !important;
}

.italy-cabinet .step-dot.done span {
  background: #1ec58f !important;
  border-color: #1ec58f !important;
  color: #fff !important;
}

.italy-cabinet .step-dot small {
  color: #263750 !important;
  font-weight: 850 !important;
}

.italy-cabinet .progress-line {
  display: none !important;
}

.italy-cabinet .balance-card {
  min-height: 260px !important;
  margin: 46px 0 48px !important;
  padding: 42px 52px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 28px !important;
  border-color: rgba(255, 255, 255, .24) !important;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .18), transparent 115px),
    linear-gradient(135deg, #294897 0%, #2f66e8 60%, #5b97f5 100%) !important;
  color: #fff !important;
}

.italy-cabinet .balance-card h1,
.italy-cabinet #amount {
  max-width: 100% !important;
  margin: 12px 0 20px !important;
  color: #fff !important;
  font-size: clamp(54px, 6.1vw, 104px) !important;
  line-height: .9 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.italy-cabinet .balance-card .section-kicker {
  color: rgba(255, 255, 255, .72) !important;
}

.italy-cabinet .balance-card .mini-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.italy-cabinet .balance-card .mini-pills span {
  color: #fff !important;
  background: rgba(255, 255, 255, .12) !important;
  border: 1px solid rgba(255, 255, 255, .34) !important;
  box-shadow: none !important;
}

.italy-cabinet .balance-card .fund-btn {
  min-width: 260px !important;
  color: #15233a !important;
  border-color: rgba(255, 255, 255, .45) !important;
  background: #fff !important;
  box-shadow: 0 18px 38px rgba(17, 32, 55, .22) !important;
}

.italy-cabinet .steps-panel {
  margin-top: 48px !important;
  padding: 30px 34px !important;
}

.italy-cabinet .step-list {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  padding-top: 18px !important;
}

.italy-cabinet .step-list::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 64px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1ec58f 0 60%, #dfe7f2 60% 100%);
}

.italy-cabinet .step-item {
  position: relative !important;
  z-index: 1 !important;
  min-height: 0 !important;
  display: grid !important;
  justify-items: center !important;
  align-content: start !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

.italy-cabinet .step-item .step-icon {
  width: 48px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 3px solid #cfe0fb !important;
  color: #13845f !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 20px rgba(36, 88, 219, .12) !important;
}

.italy-cabinet .step-item.complete .step-icon {
  background: #1ec58f !important;
  border-color: #1ec58f !important;
  color: #fff !important;
}

.italy-cabinet .step-item strong {
  max-width: 170px !important;
  color: #15233a !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
}

.italy-cabinet .step-item small {
  color: #657188 !important;
  font-size: 14px !important;
}

.italy-cabinet .step-item em {
  display: none !important;
}

.italy-cabinet .install-shortcut {
  right: auto !important;
  left: 24px !important;
  bottom: 24px !important;
  max-width: 190px !important;
  min-height: 48px !important;
  padding: 8px 14px 8px 9px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid #dbe5f3 !important;
  box-shadow: 0 12px 28px rgba(21, 35, 58, .14) !important;
}

.italy-cabinet .install-shortcut span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #2f66e8, #74a8ff) !important;
}

.italy-cabinet .install-shortcut strong {
  color: #15233a !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

.italy-cabinet .install-modal {
  background: rgba(13, 27, 48, .58) !important;
  backdrop-filter: blur(6px) !important;
}

.italy-cabinet .install-modal-card {
  max-width: 560px !important;
  border-radius: 24px !important;
  padding: 34px !important;
  border: 1px solid #dbe5f3 !important;
  box-shadow: 0 30px 90px rgba(16, 34, 60, .3) !important;
}

.italy-cabinet .install-modal-card h2 {
  font-size: clamp(30px, 4vw, 44px) !important;
  line-height: 1.05 !important;
}

.italy-cabinet .install-modal-close {
  color: #0f3b2d !important;
  background: #edf4ff !important;
  border-radius: 16px !important;
}

.italy-cabinet .chat-button {
  border-radius: 20px 20px 0 20px !important;
}

@media (max-width: 900px) {
  .italy-cabinet .client-account-layout {
    width: min(100% - 28px, 1628px) !important;
    margin-top: 22px !important;
  }

  .italy-cabinet .topline-actions {
    gap: 8px !important;
  }

  .italy-cabinet .client-chip {
    display: none !important;
  }

  .italy-cabinet .balance-card {
    grid-template-columns: 1fr !important;
    padding: 30px 24px !important;
  }

  .italy-cabinet .balance-card h1,
  .italy-cabinet #amount {
    font-size: clamp(48px, 15vw, 76px) !important;
  }

  .italy-cabinet .step-track,
  .italy-cabinet .step-list {
    overflow-x: visible !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    padding-bottom: 8px !important;
  }

  .italy-cabinet .progress-top {
    padding: 22px 18px 24px !important;
  }

  .italy-cabinet .progress-meta {
    gap: 12px !important;
  }

  .italy-cabinet .progress-meta strong {
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  .italy-cabinet .progress-meta span {
    font-size: 15px !important;
    white-space: nowrap !important;
  }

  .italy-cabinet .step-track::before {
    left: 10% !important;
    right: 10% !important;
    top: 17px !important;
    height: 3px !important;
  }

  .italy-cabinet .step-dot span {
    width: 34px !important;
    height: 34px !important;
    border-width: 2px !important;
    font-size: 15px !important;
  }

  .italy-cabinet .step-dot small {
    max-width: 68px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }

  .italy-cabinet .steps-head {
    gap: 10px !important;
  }

  .italy-cabinet .steps-head h2 {
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  .italy-cabinet .steps-head strong {
    font-size: 15px !important;
  }

  .italy-cabinet .step-list::before {
    left: 10% !important;
    right: 10% !important;
    top: 43px !important;
    height: 3px !important;
  }

  .italy-cabinet .step-item {
    padding: 0 4px !important;
  }

  .italy-cabinet .step-item .step-icon {
    width: 38px !important;
    height: 38px !important;
    border-width: 2px !important;
    font-size: 15px !important;
  }

  .italy-cabinet .step-item strong {
    max-width: 80px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  .italy-cabinet .step-item small {
    max-width: 82px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .italy-cabinet .install-shortcut {
    left: 14px !important;
    bottom: 18px !important;
  }
}

/* Italy compact production pass */
.italy-public {
  --italy-frame: min(100% - 112px, 1280px);
  position: relative !important;
  background-color: #f3f7fd !important;
  background-image: url("data:image/svg+xml,%3Csvg width='104' height='120' viewBox='0 0 104 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d3dde9' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' opacity='.68'%3E%3Cpath d='M52 0 104 30v60l-52 30L0 90V30L52 0Z'/%3E%3Cpath d='M52 0v60M0 30l52 30 52-30M0 90l52-30 52 30'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-size: 104px 120px !important;
  background-position: center 76px !important;
}

.italy-wordmark {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  color: #fff !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(27px, 2.1vw, 36px) !important;
  font-style: italic !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  text-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
}

.italy-wordmark b,
.italy-wordmark em {
  color: inherit !important;
  font: inherit !important;
}

.italy-wordmark em {
  color: #8fd7ff !important;
}

.italy-public .landing-topbar,
.italy-cabinet .app-topline {
  min-height: 74px !important;
  padding: 14px clamp(34px, 5vw, 72px) !important;
}

.italy-public .brand-large,
.italy-cabinet .compact-brand {
  gap: 0 !important;
}

.italy-public .brand-mark,
.italy-cabinet .compact-brand .brand-mark {
  display: none !important;
}

.italy-public.apply-body main {
  padding-top: 100px !important;
}

.italy-public .new-hero {
  width: var(--italy-frame) !important;
  max-width: 1180px !important;
  margin: 22px auto 44px !important;
  gap: 24px !important;
}

.italy-public .hero-copy {
  min-height: 250px !important;
  padding: 30px 46px 32px !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 46px rgba(36, 88, 219, .2) !important;
}

.italy-public .hero-copy .eyebrow {
  background: rgba(11, 27, 52, .34) !important;
  border-color: rgba(255, 255, 255, .38) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.italy-public .hero-copy h1,
.italy-public .new-hero h1 {
  max-width: 760px !important;
  margin: 9px auto 12px !important;
  font-size: clamp(30px, 2.55vw, 42px) !important;
  line-height: 1.05 !important;
}

.italy-public .hero-copy p,
.italy-public .new-hero p {
  max-width: 700px !important;
  font-size: 15px !important;
  line-height: 1.48 !important;
  color: rgba(255, 255, 255, .94) !important;
}

.italy-public .hero-metrics {
  width: min(100%, 640px) !important;
  margin-top: 18px !important;
}

.italy-public .hero-metrics div {
  min-height: 56px !important;
  padding: 8px 12px !important;
}

.italy-public .hero-metrics strong {
  font-size: 24px !important;
  line-height: 1 !important;
}

.italy-public .hero-metrics span {
  color: rgba(255, 255, 255, .92) !important;
  font-size: 13px !important;
}

.italy-public .flow-card {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 30px 28px !important;
  border-radius: 18px !important;
}

.italy-public .flow-head {
  padding-bottom: 14px !important;
  margin-bottom: 16px !important;
}

.italy-public .flow-card::before {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  top: -16px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #2f66e8 0%, #2f66e8 34%, #1ec58f 72%, rgba(30, 197, 143, .55) 100%) !important;
  box-shadow: 0 1px 4px rgba(47, 102, 232, .16) !important;
}

.italy-public .flow-head h2 {
  font-size: clamp(24px, 2vw, 32px) !important;
  line-height: 1.15 !important;
  margin: 8px 0 4px !important;
}

.italy-public .flow-head .hint {
  margin: 0 !important;
  font-size: 14px !important;
}

.italy-public .flow-progress-line {
  margin: 16px 0 22px !important;
}

.italy-public .field label,
.italy-public .amount-control label {
  font-size: 14px !important;
}

.italy-public input,
.italy-public select,
.italy-public .custom-select-trigger {
  min-height: 54px !important;
  border-radius: 12px !important;
  font-size: 18px !important;
}

.italy-public .custom-select-menu {
  border-radius: 12px !important;
  background: #fff !important;
}

.italy-public .custom-select-menu button {
  min-height: 42px !important;
  font-size: 17px !important;
}

.italy-cabinet .client-account-layout {
  width: var(--italy-frame) !important;
  max-width: 1280px !important;
  margin: 28px auto 64px !important;
}

.italy-cabinet .client-account-layout::before {
  inset: -28px -70px -70px !important;
  background-image: url("data:image/svg+xml,%3Csvg width='104' height='120' viewBox='0 0 104 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d3dde9' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' opacity='.68'%3E%3Cpath d='M52 0 104 30v60l-52 30L0 90V30L52 0Z'/%3E%3Cpath d='M52 0v60M0 30l52 30 52-30M0 90l52-30 52 30'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-size: 104px 120px !important;
  background-position: center top !important;
}

.italy-cabinet .progress-top,
.italy-cabinet .balance-card,
.italy-cabinet .steps-panel,
.italy-cabinet .install-panel,
.italy-cabinet .client-view > section {
  border-radius: 18px !important;
}

.italy-cabinet .progress-top {
  padding: 20px 28px 24px !important;
}

.italy-cabinet .step-track {
  margin-top: 22px !important;
}

.italy-cabinet .step-track::before {
  top: 17px !important;
  height: 3px !important;
}

.italy-cabinet .step-dot span {
  width: 36px !important;
  height: 36px !important;
  border-width: 2px !important;
  font-size: 15px !important;
}

.italy-cabinet .step-dot small {
  font-size: 12px !important;
}

.italy-cabinet .balance-card {
  min-height: 210px !important;
  margin: 36px 0 42px !important;
  padding: 32px 42px !important;
}

.italy-cabinet .balance-card h1,
.italy-cabinet #amount {
  margin: 10px 0 16px !important;
  font-size: clamp(48px, 4.8vw, 78px) !important;
}

.italy-cabinet .balance-card .mini-pills span {
  color: #12365c !important;
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(255, 255, 255, .75) !important;
}

.italy-cabinet .steps-panel {
  margin-top: 42px !important;
  padding: 24px 28px !important;
}

.italy-cabinet .step-list {
  padding-top: 12px !important;
}

.italy-cabinet .step-list::before {
  top: 42px !important;
  height: 3px !important;
}

.italy-cabinet .step-item .step-icon {
  width: 38px !important;
  height: 38px !important;
}

.italy-cabinet .install-modal {
  background: rgba(14, 27, 46, .62) !important;
  backdrop-filter: blur(10px) !important;
}

.italy-cabinet .install-modal-card,
.italy-public .install-modal-card {
  max-width: 620px !important;
  padding: 30px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(190, 207, 236, .9) !important;
  box-shadow: 0 26px 70px rgba(16, 34, 60, .28) !important;
}

.italy-cabinet .install-modal-close,
.italy-public .install-modal-close {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  color: #1747b4 !important;
  background: #edf4ff !important;
}

.italy-cabinet .install-shortcut span,
.italy-public .install-shortcut span {
  font-family: Georgia, "Times New Roman", serif !important;
  font-style: italic !important;
  font-size: 18px !important;
}

@media (max-width: 900px) {
  .italy-public {
    --italy-frame: min(100% - 28px, 1280px);
    background-size: 86px 99px !important;
  }

  .italy-public .landing-topbar,
  .italy-cabinet .app-topline {
    min-height: 68px !important;
    padding: 12px 16px !important;
  }

  .italy-wordmark {
    font-size: 25px !important;
  }

  .italy-public.apply-body main {
    padding-top: 86px !important;
  }

  .italy-public .new-hero {
    margin: 16px auto 36px !important;
    gap: 22px !important;
  }

  .italy-public .hero-copy {
    min-height: 220px !important;
    padding: 24px 18px !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    font-size: clamp(27px, 8vw, 38px) !important;
  }

  .italy-public .hero-copy p,
  .italy-public .new-hero p {
    font-size: 15px !important;
  }

  .italy-public .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .italy-public .hero-metrics strong {
    font-size: 20px !important;
  }

  .italy-public .hero-metrics span {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .italy-public .flow-card {
    padding: 22px 18px 24px !important;
  }

  .italy-cabinet .client-account-layout {
    margin-top: 18px !important;
  }

  .italy-cabinet .balance-card {
    min-height: 0 !important;
    padding: 28px 20px !important;
    grid-template-columns: 1fr !important;
  }

  .italy-cabinet .balance-card h1,
  .italy-cabinet #amount {
    font-size: clamp(44px, 17vw, 74px) !important;
  }

  .italy-cabinet .install-shortcut {
    display: none !important;
  }

  .italy-cabinet .chat-button {
    right: 14px !important;
    bottom: 14px !important;
    min-width: 0 !important;
    padding: 12px 16px !important;
  }
}

@media (max-width: 820px) {
  .italy-public {
    --italy-frame: min(100% - 20px, 1280px);
    background-position: center 64px !important;
  }

  .italy-public .landing-topbar {
    position: sticky !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 0 !important;
    padding: 14px 16px 16px !important;
  }

  .italy-public .landing-topbar .brand {
    width: 100% !important;
    justify-content: center !important;
  }

  .italy-public .landing-topbar .italy-wordmark {
    font-size: clamp(25px, 8vw, 32px) !important;
    text-align: center !important;
  }

  .italy-public .landing-topbar .nav {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) !important;
    gap: 8px !important;
  }

  .italy-public .landing-topbar .nav .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    font-size: clamp(13px, 4vw, 15px) !important;
    line-height: 1.12 !important;
  }

  .italy-public.apply-body main {
    padding-top: 14px !important;
  }

  .italy-public .new-hero {
    margin-top: 12px !important;
  }

  .italy-public .hero-copy {
    min-height: 0 !important;
    padding: 22px 16px 20px !important;
    border-radius: 16px !important;
  }

  .italy-public .hero-copy .eyebrow {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    font-size: clamp(25px, 8vw, 34px) !important;
  }

  .italy-public .hero-copy p,
  .italy-public .new-hero p {
    font-size: 13px !important;
  }

  .italy-public .hero-metrics {
    gap: 6px !important;
  }

  .italy-public .hero-metrics div {
    min-height: 50px !important;
    padding: 7px 6px !important;
    border-radius: 10px !important;
  }

  .italy-public .flow-card {
    padding: 18px 16px 20px !important;
    border-radius: 16px !important;
  }

  .italy-public .flow-head {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  .italy-public .flow-head h2 {
    font-size: clamp(24px, 7vw, 30px) !important;
    margin: 7px 0 0 !important;
  }

  .italy-public .flow-head .hint {
    display: none !important;
  }

  .italy-public .flow-progress-line {
    gap: 8px !important;
    margin: 14px 0 18px !important;
  }

  .italy-public .flow-progress-line i {
    height: 4px !important;
  }

  .italy-public .field,
  .italy-public .amount-control {
    margin: 12px 0 !important;
  }

  .italy-public .amount-control {
    gap: 9px !important;
  }

  .italy-public .amount-control > div {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .italy-public .field label,
  .italy-public .amount-control label {
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  .italy-public .amount-control strong {
    font-size: 22px !important;
    white-space: nowrap !important;
  }

  .italy-public .term-control strong {
    font-size: 22px !important;
  }

  .italy-public .term-control .hint {
    font-size: 14px !important;
  }

  .italy-public input,
  .italy-public select,
  .italy-public .custom-select-trigger,
  .italy-public .amount-control input[type="number"] {
    min-height: 48px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 17px !important;
  }

  .italy-public input[type="range"] {
    height: 24px !important;
  }

  .italy-public .range-labels {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: -2px !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .italy-public .btn.wide {
    min-height: 52px !important;
    margin-top: 8px !important;
    border-radius: 14px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 520px) {
  .italy-public {
    --italy-frame: min(100% - 16px, 1280px);
    background-size: 78px 90px !important;
  }

  .italy-public .landing-topbar {
    gap: 8px !important;
    padding: 10px 12px 12px !important;
  }

  .italy-public .landing-topbar .italy-wordmark {
    font-size: clamp(23px, 7vw, 28px) !important;
  }

  .italy-public .landing-topbar .nav .btn {
    min-height: 40px !important;
    padding: 7px 8px !important;
    font-size: 13px !important;
  }

  .italy-public .new-hero {
    gap: 18px !important;
    margin-top: 10px !important;
    margin-bottom: 28px !important;
  }

  .italy-public .hero-copy {
    padding: 18px 14px 16px !important;
  }

  .italy-public .hero-copy .eyebrow {
    display: none !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    max-width: 330px !important;
    margin: 0 auto 8px !important;
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.08 !important;
  }

  .italy-public .hero-copy p,
  .italy-public .new-hero p {
    max-width: 330px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .italy-public .hero-metrics {
    margin-top: 12px !important;
  }

  .italy-public .hero-metrics div {
    min-height: 42px !important;
    padding: 6px 4px !important;
  }

  .italy-public .hero-metrics strong {
    font-size: 18px !important;
  }

  .italy-public .hero-metrics span {
    font-size: 10px !important;
  }

  .italy-public .flow-card {
    padding: 14px 14px 16px !important;
  }

  .italy-public .flow-card::before {
    left: 10px !important;
    right: 10px !important;
    top: -12px !important;
  }

  .italy-public .flow-head {
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
  }

  .italy-public .flow-head span {
    min-height: 24px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
  }

  .italy-public .flow-head h2 {
    font-size: clamp(22px, 6.8vw, 27px) !important;
    line-height: 1.08 !important;
  }

  .italy-public .flow-progress-line {
    gap: 7px !important;
    margin: 10px 0 14px !important;
  }

  .italy-public .field,
  .italy-public .amount-control {
    margin: 9px 0 !important;
  }

  .italy-public .amount-control {
    gap: 7px !important;
  }

  .italy-public input,
  .italy-public select,
  .italy-public .custom-select-trigger,
  .italy-public .amount-control input[type="number"] {
    min-height: 44px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
  }

  .italy-public .amount-control strong,
  .italy-public .term-control strong {
    font-size: 19px !important;
  }

  .italy-public input[type="range"] {
    height: 18px !important;
  }

  .italy-public .range-labels {
    font-size: 11px !important;
  }

  .italy-public .btn.wide {
    min-height: 46px !important;
    margin-top: 6px !important;
    font-size: 16px !important;
  }
}

/* Italy green identity pass */
.italy-public {
  --italy-ink: #102820;
  --italy-deep: #123328;
  --italy-green: #109b69;
  --italy-green-2: #24c58c;
  --italy-mint: #a7f3cf;
}

.italy-public .landing-topbar,
.italy-cabinet .app-topline {
  background:
    radial-gradient(circle at 16% 0%, rgba(36, 197, 140, .18), transparent 34%),
    linear-gradient(135deg, #0f241f 0%, #193a31 100%) !important;
  box-shadow: 0 14px 34px rgba(16, 40, 32, .22) !important;
}

.italy-public .italy-wordmark em {
  color: var(--italy-mint) !important;
}

.italy-public .landing-topbar .nav .btn,
.italy-cabinet .topline-actions .btn {
  min-height: 48px !important;
  border-radius: 14px !important;
  padding: 0 24px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease !important;
}

.italy-public .landing-topbar .nav .btn:not(.primary),
.italy-cabinet .app-topline .btn:not(.primary) {
  color: #f5fffb !important;
  border: 1px solid rgba(198, 244, 222, .26) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16) !important;
}

.italy-public .landing-topbar .nav .btn.primary,
.italy-public .btn.primary,
.italy-cabinet .btn.primary {
  color: #fff !important;
  border: 1px solid rgba(167, 243, 207, .42) !important;
  background:
    linear-gradient(135deg, #12a66e 0%, #18c887 54%, #6ee7b7 100%) !important;
  box-shadow:
    0 14px 30px rgba(18, 166, 110, .28),
    inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

.italy-public .landing-topbar .nav .btn:hover,
.italy-cabinet .topline-actions .btn:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 16px 34px rgba(18, 166, 110, .22),
    inset 0 1px 0 rgba(255, 255, 255, .24) !important;
}

.italy-public .hero-copy,
.italy-cabinet .balance-card {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .2), transparent 120px),
    linear-gradient(135deg, #12603f 0%, #16a36d 56%, #57d8a0 100%) !important;
  box-shadow: 0 24px 50px rgba(18, 96, 63, .22) !important;
}

.italy-public .hero-copy .eyebrow {
  background: rgba(9, 43, 31, .36) !important;
  border-color: rgba(210, 255, 235, .36) !important;
}

.italy-public .hero-metrics div {
  border-color: rgba(216, 255, 237, .35) !important;
  background: rgba(255, 255, 255, .08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14) !important;
}

.italy-public .flow-card::before,
.italy-cabinet .client-account-main > .client-view > section + section::before,
.italy-cabinet .steps-panel::before {
  background: linear-gradient(90deg, rgba(16, 155, 105, .22), #24c58c 38%, #109b69 76%, rgba(16, 155, 105, .22)) !important;
  box-shadow: 0 1px 5px rgba(16, 155, 105, .16) !important;
}

.italy-public .flow-progress-line i.active,
.italy-cabinet .step-track::before,
.italy-cabinet .step-list::before {
  background: linear-gradient(90deg, #24c58c 0%, #109b69 62%, #dfe7f2 62%, #dfe7f2 100%) !important;
}

.italy-public input[type="range"] {
  accent-color: var(--italy-green) !important;
}

.italy-public .flow-head span,
.italy-public .status-pill,
.italy-public .mini-pills span {
  border-color: rgba(36, 197, 140, .3) !important;
  background: #e8fbf2 !important;
  color: #0f7a52 !important;
}

.italy-public .custom-select.open .custom-select-trigger,
.italy-public .custom-select-menu button:hover,
.italy-public .custom-select-menu button[aria-selected="true"] {
  border-color: rgba(36, 197, 140, .55) !important;
  background: #ecfff6 !important;
  color: #0f7a52 !important;
}

.italy-cabinet .step-dot.done span,
.italy-cabinet .step-item.done .step-icon {
  background: #16a36d !important;
  border-color: #16a36d !important;
}

.italy-cabinet .step-dot span,
.italy-cabinet .step-item .step-icon {
  color: #109b69 !important;
}

@media (max-width: 820px) {
  .italy-public .landing-topbar .nav .btn {
    min-height: 44px !important;
    border-radius: 13px !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 520px) {
  .italy-public .landing-topbar .nav .btn {
    min-height: 40px !important;
    border-radius: 12px !important;
  }
}

/* Italy header button final shape */
.italy-public .landing-topbar .nav .btn {
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 22px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.italy-public .landing-topbar .nav .btn.primary {
  background: linear-gradient(135deg, #12a66e 0%, #45d99c 100%) !important;
}

@media (max-width: 820px) {
  .italy-public .landing-topbar .nav .btn {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 11px !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }
}

/* Italy cabinet header controls final polish */
.italy-cabinet .topline-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.italy-cabinet .client-chip {
  min-width: 0 !important;
  width: auto !important;
  height: 46px !important;
  min-height: 46px !important;
  padding: 5px 14px 5px 6px !important;
  gap: 10px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(198, 244, 222, .24) !important;
  background: rgba(255, 255, 255, .075) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}

.italy-cabinet .client-chip span {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  color: #073326 !important;
  background: linear-gradient(135deg, #a7f3cf, #54d99d) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  box-shadow: 0 8px 18px rgba(16, 155, 105, .2) !important;
}

.italy-cabinet .client-chip strong {
  max-width: 130px !important;
  color: #f7fffb !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.italy-cabinet .topline-actions .btn {
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  min-width: 88px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

@media (max-width: 820px) {
  .italy-cabinet .topline-actions {
    width: 100% !important;
    justify-content: stretch !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 8px !important;
  }

  .italy-cabinet .client-chip {
    height: 42px !important;
    min-height: 42px !important;
    padding-right: 10px !important;
  }

  .italy-cabinet .client-chip span {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    font-size: 12px !important;
  }

  .italy-cabinet .client-chip strong {
    max-width: 100% !important;
    font-size: 13px !important;
  }

  .italy-cabinet .topline-actions .btn {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    min-width: 64px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }
}

/* Italy cabinet login polish */
.italy-cabinet:has(#loginPanel:not(.hidden)) .main,
.italy-cabinet:has(#emptyPanel:not(.hidden)) .main {
  min-height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: 42px 20px !important;
}

.italy-cabinet #loginPanel,
.italy-cabinet #emptyPanel {
  position: relative !important;
  width: min(100%, 980px) !important;
  min-height: 420px !important;
  display: grid !important;
  grid-template-columns: .86fr 1fr !important;
  gap: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1px solid rgba(205, 220, 236, .9) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 30px 90px rgba(15, 36, 31, .18) !important;
}

.italy-cabinet #loginPanel.hidden,
.italy-cabinet #emptyPanel.hidden,
.italy-cabinet #cabinet.hidden {
  display: none !important;
}

.italy-cabinet #loginPanel::before,
.italy-cabinet #emptyPanel::before {
  content: "Credito Italia\A Area personale";
  white-space: pre-line;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-style: italic;
  font-weight: 900;
  line-height: 1.05;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .25), transparent 110px),
    linear-gradient(135deg, #102820 0%, #12724c 58%, #54d99d 100%);
}

.italy-cabinet #loginPanel::after,
.italy-cabinet #emptyPanel::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 34px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05)),
    url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 38l9 9 20-24'/%3E%3Ccircle cx='36' cy='36' r='27' opacity='.55'/%3E%3C/g%3E%3C/svg%3E") center / 42px 42px no-repeat;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .18);
}

.italy-cabinet #loginPanel > h2,
.italy-cabinet #loginPanel > p,
.italy-cabinet #loginPanel > form,
.italy-cabinet #emptyPanel > h2,
.italy-cabinet #emptyPanel > p,
.italy-cabinet #emptyPanel > a {
  grid-column: 2 !important;
  margin-left: 40px !important;
  margin-right: 40px !important;
}

.italy-cabinet #loginPanel > h2,
.italy-cabinet #emptyPanel > h2 {
  align-self: end !important;
  margin-top: 52px !important;
  margin-bottom: 10px !important;
  font-size: clamp(34px, 3vw, 48px) !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.italy-cabinet #loginPanel > p,
.italy-cabinet #emptyPanel > p {
  margin-top: 0 !important;
  margin-bottom: 24px !important;
  color: #65748a !important;
  font-size: 16px !important;
}

.italy-cabinet #loginForm {
  align-self: start !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  margin-bottom: 52px !important;
}

.italy-cabinet #loginForm .field {
  margin: 0 !important;
}

.italy-cabinet #loginForm label {
  color: #1b2a3f !important;
  font-size: 12px !important;
  letter-spacing: .18em !important;
}

.italy-cabinet #loginForm input {
  min-height: 54px !important;
  border-radius: 14px !important;
  border-color: #dce7f2 !important;
  background: #fff !important;
  font-size: 18px !important;
}

.italy-cabinet #loginForm input:focus {
  border-color: rgba(36, 197, 140, .7) !important;
  box-shadow: 0 0 0 4px rgba(36, 197, 140, .13) !important;
}

.italy-cabinet #loginForm .actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-top: 6px !important;
}

.italy-cabinet #loginForm .btn,
.italy-cabinet #emptyPanel .btn {
  min-height: 52px !important;
  border-radius: 14px !important;
  justify-content: center !important;
  font-weight: 900 !important;
}

.italy-cabinet #loginForm .btn:not(.primary) {
  color: #123328 !important;
  border-color: rgba(18, 51, 40, .14) !important;
  background: #f4fbf7 !important;
}

@media (max-width: 820px) {
  .italy-cabinet:has(#loginPanel:not(.hidden)) .main,
  .italy-cabinet:has(#emptyPanel:not(.hidden)) .main {
    padding: 18px 12px !important;
    place-items: start center !important;
  }

  .italy-cabinet #loginPanel,
  .italy-cabinet #emptyPanel {
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
  }

  .italy-cabinet #loginPanel::before,
  .italy-cabinet #emptyPanel::before {
    min-height: 132px !important;
    align-items: flex-end !important;
    padding: 24px 22px !important;
    font-size: 28px !important;
  }

  .italy-cabinet #loginPanel::after,
  .italy-cabinet #emptyPanel::after {
    left: 22px !important;
    top: 20px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px !important;
    background-size: 32px 32px !important;
  }

  .italy-cabinet #loginPanel > h2,
  .italy-cabinet #loginPanel > p,
  .italy-cabinet #loginPanel > form,
  .italy-cabinet #emptyPanel > h2,
  .italy-cabinet #emptyPanel > p,
  .italy-cabinet #emptyPanel > a {
    grid-column: 1 !important;
    margin-left: 22px !important;
    margin-right: 22px !important;
  }

  .italy-cabinet #loginPanel > h2,
  .italy-cabinet #emptyPanel > h2 {
    margin-top: 26px !important;
    font-size: 30px !important;
  }

  .italy-cabinet #loginPanel > p,
  .italy-cabinet #emptyPanel > p {
    margin-bottom: 18px !important;
  }

  .italy-cabinet #loginForm {
    margin-bottom: 24px !important;
  }

  .italy-cabinet #loginForm .actions {
    grid-template-columns: 1fr !important;
  }
}

/* Italy cabinet premium content pass */
.italy-cabinet .progress-top,
.italy-cabinet .steps-panel,
.italy-cabinet .withdraw-card,
.italy-cabinet .action-card {
  border: 1px solid rgba(205, 220, 236, .82) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 252, 250, .94)) !important;
  box-shadow: 0 18px 48px rgba(15, 36, 31, .08) !important;
}

.italy-cabinet .progress-meta,
.italy-cabinet .steps-head {
  align-items: center !important;
}

.italy-cabinet .progress-meta strong,
.italy-cabinet .steps-head h2 {
  letter-spacing: .12em !important;
}

.italy-cabinet .step-track {
  padding: 0 10px !important;
}

.italy-cabinet .step-track::before {
  left: 11% !important;
  right: 11% !important;
  top: 18px !important;
  height: 2px !important;
}

.italy-cabinet .step-track::after {
  content: "" !important;
  position: absolute !important;
  left: 11% !important;
  top: 18px !important;
  width: var(--top-step-progress, 39%) !important;
  max-width: 78% !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #18b87b, #109b69) !important;
  z-index: 0 !important;
}

.italy-cabinet .step-dot {
  z-index: 1 !important;
}

.italy-cabinet .steps-panel {
  overflow: hidden !important;
}

.italy-cabinet .step-list {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 10px 0 0 !important;
}

.italy-cabinet .step-list::before {
  left: 8% !important;
  right: 8% !important;
  top: 32px !important;
  height: 2px !important;
  z-index: 0 !important;
}

.italy-cabinet .step-item {
  min-height: 112px !important;
  padding: 10px 8px 8px !important;
  gap: 7px !important;
  border: 1px solid rgba(215, 226, 240, .86) !important;
  border-radius: 16px !important;
  background: rgba(248, 252, 250, .78) !important;
}

.italy-cabinet .step-item.complete {
  border-color: rgba(36, 197, 140, .35) !important;
  background: linear-gradient(180deg, #f0fff7, #f8fffb) !important;
}

.italy-cabinet .step-item .step-icon {
  width: 40px !important;
  height: 40px !important;
  border-width: 2px !important;
  box-shadow: 0 8px 20px rgba(16, 155, 105, .16) !important;
}

.italy-cabinet .step-item strong {
  max-width: 130px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
}

.italy-cabinet .step-item small {
  max-width: 126px !important;
  color: #66758a !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.italy-cabinet .balance-card {
  border: 1px solid rgba(216, 255, 237, .26) !important;
}

.italy-cabinet .balance-card .fund-btn {
  min-height: 54px !important;
  border-radius: 14px !important;
}

.italy-cabinet .install-shortcut {
  display: none !important;
}

.italy-cabinet .chat-button {
  right: 26px !important;
  bottom: 26px !important;
  width: 58px !important;
  min-width: 58px !important;
  height: 58px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  box-shadow: 0 18px 38px rgba(15, 36, 31, .24) !important;
}

.italy-cabinet .chat-button::before {
  content: "?" !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 950 !important;
}

/* Final side-drawer support handle */
.italy-cabinet .chat-widget {
  position: fixed !important;
  right: 0 !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(430px, calc(100vw - 28px)) !important;
  transform: translateY(-50%) !important;
  z-index: 80 !important;
  pointer-events: none !important;
}

.italy-cabinet .chat-panel {
  pointer-events: auto !important;
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(430px, calc(100vw - 34px)) !important;
  height: min(620px, calc(100dvh - 42px)) !important;
  max-height: calc(100dvh - 42px) !important;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  border: 1px solid rgba(35, 170, 119, .26) !important;
  border-radius: 18px !important;
  box-shadow: 0 26px 70px rgba(8, 32, 26, .28), 0 0 0 1px rgba(255,255,255,.72) inset !important;
  overflow: hidden !important;
}

.italy-cabinet .chat-button {
  pointer-events: auto !important;
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  bottom: auto !important;
  width: 58px !important;
  min-width: 58px !important;
  height: 154px !important;
  min-height: 154px !important;
  padding: 14px 8px !important;
  transform: translate(8px, -50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  border: 1px solid rgba(200, 255, 231, .62) !important;
  border-right: 0 !important;
  border-radius: 18px 0 0 18px !important;
  background:
    linear-gradient(145deg, rgba(80, 225, 166, .98), rgba(12, 157, 105, .98)) !important;
  color: #fff !important;
  box-shadow: -14px 18px 44px rgba(4, 76, 54, .24), inset 1px 1px 0 rgba(255,255,255,.42) !important;
  cursor: grab !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

.italy-cabinet .chat-button:hover {
  transform: translate(2px, -50%) !important;
  box-shadow: -18px 22px 52px rgba(4, 76, 54, .30), inset 1px 1px 0 rgba(255,255,255,.48) !important;
}

.italy-cabinet .chat-button:active {
  cursor: grabbing !important;
  transform: translate(0, -50%) scale(.99) !important;
}

.italy-cabinet .chat-button::before {
  content: "" !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.20) !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28) !important;
  color: transparent !important;
}

.italy-cabinet .chat-button::after {
  content: "Aiuto" !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}

.italy-cabinet .chat-button span {
  display: none !important;
}

.italy-cabinet .chat-welcome {
  pointer-events: auto !important;
  right: 72px !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(310px, calc(100vw - 120px)) !important;
  transform: translateY(-50%) !important;
  border-color: rgba(35, 170, 119, .24) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 44px rgba(8, 32, 26, .18) !important;
}

@media (max-width: 900px) {
  .italy-cabinet .install-shortcut {
    display: none !important;
  }

  .italy-cabinet .steps-panel {
    padding: 20px 18px !important;
  }

  .italy-cabinet .step-list {
    gap: 6px !important;
  }

  .italy-cabinet .step-list::before {
    top: 29px !important;
  }

  .italy-cabinet .step-item {
    min-height: 96px !important;
    padding: 8px 4px 6px !important;
    border-radius: 12px !important;
  }

  .italy-cabinet .step-item .step-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .italy-cabinet .step-item strong {
    max-width: 78px !important;
    min-height: 30px !important;
    font-size: 11px !important;
  }

  .italy-cabinet .step-item small {
    max-width: 76px !important;
    font-size: 10px !important;
  }
}

/* Italy cabinet damage control: one state, sane buttons */
.italy-cabinet:has(#cabinet:not(.hidden)) #loginPanel,
.italy-cabinet:has(#cabinet:not(.hidden)) #emptyPanel,
.italy-cabinet:has(#loginPanel:not(.hidden)) #emptyPanel {
  display: none !important;
}

.italy-cabinet #loginPanel::after,
.italy-cabinet #emptyPanel::after {
  content: none !important;
  display: none !important;
}

.italy-cabinet #loginPanel::before,
.italy-cabinet #emptyPanel::before {
  padding: 40px 34px !important;
  align-items: center !important;
  font-size: clamp(34px, 3vw, 48px) !important;
}

.italy-cabinet #loginForm .actions {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.italy-cabinet #loginForm .actions .btn,
.italy-cabinet #emptyPanel > a.btn {
  width: auto !important;
  min-width: 172px !important;
  max-width: 280px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 13px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.italy-cabinet #loginForm .actions .btn.primary,
.italy-cabinet #emptyPanel > a.btn.primary {
  background: linear-gradient(135deg, #109b69, #59dfa6) !important;
  box-shadow: 0 12px 26px rgba(16, 155, 105, .22) !important;
}

.italy-cabinet #loginForm .actions .btn:not(.primary) {
  color: #123328 !important;
  background: #f7fbf9 !important;
  border: 1px solid #dce7e2 !important;
  box-shadow: none !important;
}

.italy-cabinet #emptyPanel > a.btn {
  grid-column: 2 !important;
  margin: 0 40px 52px !important;
  align-self: start !important;
}

.italy-cabinet .install-shortcut,
.italy-cabinet .install-shortcut:not(.hidden) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 820px) {
  .italy-cabinet #loginForm .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .italy-cabinet #loginForm .actions .btn,
  .italy-cabinet #emptyPanel > a.btn {
    width: 100% !important;
    max-width: none !important;
  }

  .italy-cabinet #emptyPanel > a.btn {
    grid-column: 1 !important;
    margin: 0 22px 24px !important;
  }
}

/* Italy document upload controls */
.italy-cabinet .file-picker {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 14px 8px 8px !important;
  border: 1px solid #dce7e2 !important;
  border-radius: 14px !important;
  background: #fff !important;
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.italy-cabinet .file-picker:hover {
  border-color: rgba(36, 197, 140, .55) !important;
  box-shadow: 0 10px 24px rgba(16, 155, 105, .1) !important;
}

.italy-cabinet .file-picker input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.italy-cabinet .file-picker span {
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  border-radius: 11px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #109b69, #59dfa6) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 10px 22px rgba(16, 155, 105, .18) !important;
}

.italy-cabinet .file-picker em {
  min-width: 0 !important;
  color: #66758a !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 750 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 620px) {
  .italy-cabinet .file-picker {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .italy-cabinet .file-picker span {
    width: 100% !important;
  }
}

/* Italy payment modal final polish */
.italy-cabinet .payment-dialog {
  width: min(760px, calc(100vw - 24px)) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: transparent !important;
  overflow: visible !important;
  box-shadow: none !important;
}

.italy-cabinet .payment-dialog::backdrop {
  background: rgba(10, 24, 21, .64) !important;
  backdrop-filter: blur(8px) saturate(110%) !important;
}

.italy-cabinet .payment-sheet.fee-sheet {
  padding: 22px 24px 24px !important;
  border: 1px solid rgba(166, 196, 184, .78) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,255,251,.98)),
    var(--italy-rhombus-bg) !important;
  background-size: auto, 104px 90px !important;
  box-shadow: 0 26px 70px rgba(8, 28, 22, .28), inset 0 1px 0 rgba(255,255,255,.88) !important;
}

.italy-cabinet .fee-modal-head {
  grid-template-columns: 46px minmax(0, 1fr) 46px !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 18px !important;
}

.italy-cabinet .fee-modal-head span {
  color: #139867 !important;
  font-size: 11px !important;
  letter-spacing: .22em !important;
}

.italy-cabinet .fee-modal-head h1 {
  margin-top: 6px !important;
  color: #152032 !important;
  font-size: clamp(28px, 4vw, 44px) !important;
  letter-spacing: 0 !important;
}

.italy-cabinet .fee-modal-head .icon-btn {
  width: 46px !important;
  height: 46px !important;
  border: 1px solid rgba(191, 211, 202, .85) !important;
  border-radius: 16px !important;
  background: rgba(242, 250, 247, .92) !important;
  color: #40516a !important;
  font-size: 30px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.italy-cabinet .fee-modal-head .icon-btn:hover {
  border-color: rgba(30, 176, 121, .42) !important;
  background: #ecfbf5 !important;
  color: #0f8b60 !important;
}

.italy-cabinet .fee-tabs {
  margin: 0 0 18px !important;
  padding: 4px !important;
  gap: 4px !important;
  border: 1px solid #d9e6df !important;
  border-radius: 16px !important;
  background: #f5faf7 !important;
  overflow: hidden !important;
}

.italy-cabinet .fee-tabs span,
.italy-cabinet .fee-tabs strong {
  min-height: 48px !important;
  border-radius: 12px !important;
  color: #526278 !important;
  font-size: 17px !important;
  line-height: 1.1 !important;
}

.italy-cabinet .fee-tabs .active {
  color: #fff !important;
  background: linear-gradient(135deg, #0f8f62, #54dca3) !important;
  box-shadow: 0 12px 24px rgba(16, 155, 105, .22) !important;
}

.italy-cabinet .fee-sheet .fee-total {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: end !important;
  gap: 8px 14px !important;
  margin: 0 !important;
  padding: 20px 22px !important;
  border: 1px solid rgba(49, 188, 133, .34) !important;
  border-radius: 18px 18px 0 0 !important;
  background: linear-gradient(135deg, #f4fff9, #ffffff) !important;
  color: #123328 !important;
}

.italy-cabinet .fee-sheet .fee-total span {
  grid-column: 1 / -1 !important;
  color: #129464 !important;
  font-size: 11px !important;
  letter-spacing: .2em !important;
}

.italy-cabinet .fee-sheet .fee-total strong {
  color: #0e9a67 !important;
  font-size: clamp(46px, 8vw, 72px) !important;
  font-weight: 950 !important;
}

.italy-cabinet .fee-sheet .fee-total small {
  align-self: center !important;
  margin: 0 8px 10px 0 !important;
  color: #17372d !important;
  font-size: 18px !important;
}

.italy-cabinet .fee-sheet .fee-breakdown {
  margin: 0 0 14px !important;
  padding: 14px 22px 16px !important;
  border: 1px solid rgba(49, 188, 133, .24) !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  background: rgba(255,255,255,.9) !important;
}

.italy-cabinet .fee-sheet .fee-breakdown div {
  min-height: 34px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 5px 0 !important;
}

.italy-cabinet .fee-sheet .fee-breakdown dt {
  color: #617083 !important;
  font-size: 17px !important;
  font-weight: 850 !important;
}

.italy-cabinet .fee-sheet .fee-breakdown dd {
  color: #0d855c !important;
  font-size: 18px !important;
  font-weight: 950 !important;
}

.italy-cabinet .fee-info {
  margin: 12px 0 16px !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(22, 169, 113, .34) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(237, 253, 246, .98), rgba(248, 255, 252, .98)) !important;
  color: #0f6049 !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.italy-cabinet .fee-info::after {
  content: none !important;
}

.italy-cabinet .fee-sheet .payment-card {
  margin: 0 0 16px !important;
  padding: 18px !important;
  border: 1px solid #dce7e2 !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 14px 34px rgba(17, 48, 39, .07) !important;
}

.italy-cabinet .fee-sheet .payment-card > span {
  display: block !important;
  margin: 0 0 12px !important;
  color: #1a2a3e !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.italy-cabinet .fee-sheet .payment-requisite small {
  margin: 0 0 8px !important;
  color: #6b7788 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

.italy-cabinet .fee-sheet .copy-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 10px !important;
}

.italy-cabinet .fee-sheet .copy-field strong,
.italy-cabinet .fee-sheet .payment-requisite > strong {
  min-width: 0 !important;
  min-height: 56px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 18px !important;
  border: 1px solid #d8e5de !important;
  border-radius: 14px !important;
  background: #fbfefd !important;
  color: #172238 !important;
  font-size: clamp(16px, 2.2vw, 21px) !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
}

.italy-cabinet .fee-sheet .copy-btn {
  min-width: 104px !important;
  min-height: 56px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #109b69, #59dfa6) !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  box-shadow: 0 12px 24px rgba(16, 155, 105, .2) !important;
}

.italy-cabinet .fee-sheet .payment-card + .btn.primary,
.italy-cabinet .fee-sheet .btn.primary.wide {
  min-height: 58px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #0f9b67, #62e0aa) !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  box-shadow: 0 16px 32px rgba(16, 155, 105, .24) !important;
}

@media (max-width: 620px) {
  .italy-cabinet .payment-dialog {
    width: min(94vw, 520px) !important;
  }

  .italy-cabinet .payment-sheet.fee-sheet {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .italy-cabinet .fee-modal-head {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 8px !important;
  }

  .italy-cabinet .fee-modal-head .icon-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 13px !important;
  }

  .italy-cabinet .fee-tabs span,
  .italy-cabinet .fee-tabs strong {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  .italy-cabinet .fee-sheet .fee-total,
  .italy-cabinet .fee-sheet .fee-breakdown,
  .italy-cabinet .fee-sheet .payment-card {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .italy-cabinet .fee-sheet .copy-field {
    grid-template-columns: 1fr !important;
  }

  .italy-cabinet .fee-sheet .copy-btn {
    width: 100% !important;
  }
}

/* Italy long-form trust content */
.italy-public .italy-info-shell,
.italy-public .italy-legal-band,
.italy-public .italy-reader-grid,
.italy-public .italy-faq-section {
  width: min(1500px, calc(100vw - 56px)) !important;
  margin: 34px auto 0 !important;
}

.italy-public .italy-section-head {
  max-width: 920px !important;
  margin: 0 auto 24px !important;
  text-align: center !important;
}

.italy-public .italy-section-head.compact {
  margin-bottom: 18px !important;
}

.italy-public .italy-section-head > span,
.italy-public .italy-legal-band > div > span,
.italy-public .italy-text-card > span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(36, 197, 140, .3) !important;
  border-radius: 999px !important;
  background: #e9fbf4 !important;
  color: #0f7a52 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

.italy-public .italy-section-head h2,
.italy-public .italy-legal-band h2,
.italy-public .italy-text-card h2,
.italy-public .italy-faq-section h2 {
  margin: 14px 0 10px !important;
  color: #111c2f !important;
  font-size: clamp(28px, 3vw, 44px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.italy-public .italy-section-head p,
.italy-public .italy-legal-band p,
.italy-public .italy-text-card p,
.italy-public .italy-faq-list p {
  margin: 0 !important;
  color: #5f6e82 !important;
  font-size: 18px !important;
  line-height: 1.62 !important;
  font-weight: 650 !important;
}

.italy-public .italy-trust-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.italy-public .italy-trust-grid article,
.italy-public .italy-text-card,
.italy-public .italy-faq-list details {
  border: 1px solid rgba(195, 212, 205, .82) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,255,251,.96)),
    var(--italy-rhombus-bg) !important;
  background-size: auto, 108px 94px !important;
  box-shadow: 0 18px 44px rgba(13, 41, 34, .08) !important;
}

.italy-public .italy-trust-grid article {
  min-height: 260px !important;
  padding: 22px !important;
}

.italy-public .italy-trust-grid article > strong {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 18px !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(135deg, #109b69, #59dfa6) !important;
  font-size: 17px !important;
  box-shadow: 0 14px 28px rgba(16, 155, 105, .22) !important;
}

.italy-public .italy-trust-grid h3 {
  margin: 0 0 10px !important;
  color: #142035 !important;
  font-size: 21px !important;
  line-height: 1.18 !important;
}

.italy-public .italy-trust-grid p {
  margin: 0 !important;
  color: #627084 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  font-weight: 650 !important;
}

.italy-public .italy-legal-band {
  display: grid !important;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr) !important;
  gap: 28px !important;
  align-items: stretch !important;
  padding: 34px !important;
  border-radius: 24px !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 16% 18%, rgba(167, 243, 207, .24), transparent 180px),
    linear-gradient(135deg, #102820, #106c49 58%, #29c88c) !important;
  box-shadow: 0 24px 60px rgba(16, 40, 32, .2) !important;
}

.italy-public .italy-legal-band h2,
.italy-public .italy-legal-band p {
  color: #fff !important;
}

.italy-public .italy-legal-band > div > span {
  border-color: rgba(255,255,255,.24) !important;
  background: rgba(255,255,255,.12) !important;
  color: #d9fff0 !important;
}

.italy-public .italy-legal-band dl {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
}

.italy-public .italy-legal-band dl div {
  padding: 18px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.1) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13) !important;
}

.italy-public .italy-legal-band dt {
  margin-bottom: 8px !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 950 !important;
}

.italy-public .italy-legal-band dd {
  margin: 0 !important;
  color: rgba(255,255,255,.86) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  font-weight: 650 !important;
}

.italy-public .italy-reader-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.italy-public .italy-text-card {
  padding: 30px !important;
}

.italy-public .italy-text-card ul {
  display: grid !important;
  gap: 12px !important;
  margin: 20px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.italy-public .italy-text-card li {
  position: relative !important;
  padding-left: 28px !important;
  color: #334255 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  font-weight: 750 !important;
}

.italy-public .italy-text-card li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: .42em !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: #24c58c !important;
  box-shadow: 0 0 0 5px rgba(36, 197, 140, .12) !important;
}

.italy-public .italy-faq-section {
  margin-bottom: 54px !important;
}

.italy-public .italy-faq-list {
  display: grid !important;
  gap: 12px !important;
}

.italy-public .italy-faq-list details {
  padding: 0 !important;
  overflow: hidden !important;
}

.italy-public .italy-faq-list summary {
  min-height: 68px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 0 24px !important;
  color: #132034 !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.italy-public .italy-faq-list summary::marker {
  content: "" !important;
}

.italy-public .italy-faq-list summary::after {
  content: "+" !important;
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 auto !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #e9fbf4 !important;
  color: #0f8f62 !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.italy-public .italy-faq-list details[open] summary::after {
  content: "-" !important;
}

.italy-public .italy-faq-list p {
  padding: 0 24px 22px !important;
}

@media (max-width: 980px) {
  .italy-public .italy-trust-grid,
  .italy-public .italy-legal-band,
  .italy-public .italy-reader-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .italy-public .italy-legal-band > div {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 640px) {
  .italy-public .italy-info-shell,
  .italy-public .italy-legal-band,
  .italy-public .italy-reader-grid,
  .italy-public .italy-faq-section {
    width: min(100% - 28px, 560px) !important;
    margin-top: 22px !important;
  }

  .italy-public .italy-trust-grid,
  .italy-public .italy-legal-band,
  .italy-public .italy-legal-band dl,
  .italy-public .italy-reader-grid {
    grid-template-columns: 1fr !important;
  }

  .italy-public .italy-legal-band,
  .italy-public .italy-text-card,
  .italy-public .italy-trust-grid article {
    padding: 20px !important;
    border-radius: 18px !important;
  }

  .italy-public .italy-section-head h2,
  .italy-public .italy-legal-band h2,
  .italy-public .italy-text-card h2 {
    font-size: 26px !important;
  }

  .italy-public .italy-section-head p,
  .italy-public .italy-legal-band p,
  .italy-public .italy-text-card p,
  .italy-public .italy-faq-list p {
    font-size: 16px !important;
  }
}

/* Compact Italy payment modal */
.italy-cabinet .payment-dialog {
  width: min(580px, calc(100vw - 28px)) !important;
}

.italy-cabinet .payment-sheet.fee-sheet {
  padding: 18px !important;
  border-radius: 20px !important;
}

.italy-cabinet .fee-modal-head {
  grid-template-columns: 40px minmax(0, 1fr) 40px !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.italy-cabinet .fee-modal-head .icon-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  font-size: 27px !important;
}

.italy-cabinet .fee-modal-head span {
  font-size: 10px !important;
  letter-spacing: .18em !important;
}

.italy-cabinet .fee-modal-head h1 {
  margin-top: 3px !important;
  font-size: clamp(26px, 3.2vw, 36px) !important;
}

.italy-cabinet .fee-tabs {
  margin-bottom: 12px !important;
  border-radius: 14px !important;
}

.italy-cabinet .fee-tabs span,
.italy-cabinet .fee-tabs strong {
  min-height: 42px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
}

.italy-cabinet .fee-sheet .fee-total {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: baseline !important;
  padding: 15px 16px !important;
  border-radius: 15px 15px 0 0 !important;
}

.italy-cabinet .fee-sheet .fee-total span {
  grid-column: 1 / -1 !important;
  font-size: 10px !important;
}

.italy-cabinet .fee-sheet .fee-total strong {
  font-size: clamp(42px, 6vw, 58px) !important;
}

.italy-cabinet .fee-sheet .fee-total small {
  margin: 0 0 7px 0 !important;
  justify-self: start !important;
  font-size: 18px !important;
}

.italy-cabinet .fee-sheet .fee-breakdown {
  margin-bottom: 10px !important;
  padding: 10px 16px 12px !important;
  border-radius: 0 0 15px 15px !important;
}

.italy-cabinet .fee-sheet .fee-breakdown div {
  min-height: 28px !important;
  padding: 3px 0 !important;
}

.italy-cabinet .fee-sheet .fee-breakdown dt,
.italy-cabinet .fee-sheet .fee-breakdown dd {
  font-size: 15px !important;
}

.italy-cabinet .fee-info {
  margin: 10px 0 !important;
  padding: 10px 12px !important;
  border-radius: 13px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.italy-cabinet .fee-sheet .payment-card {
  margin-bottom: 12px !important;
  padding: 14px !important;
  border-radius: 15px !important;
}

.italy-cabinet .fee-sheet .payment-card > span {
  margin-bottom: 9px !important;
  font-size: 18px !important;
}

.italy-cabinet .fee-sheet .payment-requisite small {
  margin-bottom: 6px !important;
  font-size: 10px !important;
}

.italy-cabinet .fee-sheet .copy-field {
  gap: 8px !important;
}

.italy-cabinet .fee-sheet .copy-field strong,
.italy-cabinet .fee-sheet .payment-requisite > strong {
  min-height: 46px !important;
  padding: 0 13px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}

.italy-cabinet .fee-sheet .copy-btn {
  min-width: 86px !important;
  min-height: 46px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

.italy-cabinet .fee-sheet .payment-card + .btn.primary,
.italy-cabinet .fee-sheet .btn.primary.wide {
  min-height: 48px !important;
  border-radius: 13px !important;
  font-size: 17px !important;
  box-shadow: 0 12px 24px rgba(16, 155, 105, .2) !important;
}

@media (max-width: 620px) {
  .italy-cabinet .payment-dialog {
    width: min(94vw, 430px) !important;
  }

  .italy-cabinet .payment-sheet.fee-sheet {
    padding: 14px !important;
  }

  .italy-cabinet .fee-modal-head h1 {
    font-size: 24px !important;
  }

  .italy-cabinet .fee-sheet .copy-field {
    grid-template-columns: 1fr !important;
  }
}

/* Smaller Italy rhombus pattern */
.italy-public,
.italy-cabinet {
  background-size: 76px 88px !important;
}

.italy-cabinet .client-account-layout::before {
  background-size: 76px 88px !important;
}

.italy-cabinet .payment-sheet.fee-sheet,
.italy-public .italy-trust-grid article,
.italy-public .italy-text-card,
.italy-public .italy-faq-list details {
  background-size: auto, 76px 88px !important;
}

@media (max-width: 900px) {
  .italy-public,
  .italy-cabinet {
    background-size: 68px 78px !important;
  }

  .italy-cabinet .client-account-layout::before {
    background-size: 68px 78px !important;
  }
}

/* Compact public registration/calculator card */
.italy-public .new-hero {
  width: min(1180px, calc(100vw - 56px)) !important;
  gap: 28px !important;
}

.italy-public .flow-card {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: 22px 24px 24px !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 54px rgba(16, 40, 32, .12) !important;
}

.italy-public .flow-head {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px 14px !important;
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
}

.italy-public .flow-head span {
  grid-row: 1 / 3 !important;
  min-height: 34px !important;
  padding: 0 14px !important;
}

.italy-public .flow-head h2 {
  margin: 0 !important;
  font-size: clamp(25px, 2vw, 34px) !important;
}

.italy-public .flow-head .hint {
  min-height: 0 !important;
  color: #6b7788 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.italy-public .flow-progress-line {
  margin: 12px 0 18px !important;
}

.italy-public #loanStep {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px 18px !important;
}

.italy-public #loanStep > .field:first-child,
.italy-public #loanStep > .btn.wide {
  grid-column: 1 / -1 !important;
}

.italy-public #loanStep > .field,
.italy-public #loanStep > .amount-control {
  margin: 0 !important;
}

.italy-public .field label,
.italy-public .amount-control label {
  margin-bottom: 8px !important;
  font-size: 12px !important;
  letter-spacing: .14em !important;
}

.italy-public input,
.italy-public select,
.italy-public .custom-select-trigger,
.italy-public .amount-control input[type="number"] {
  min-height: 48px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
}

.italy-public .custom-select-trigger {
  padding: 0 16px !important;
}

.italy-public .amount-control {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.italy-public .amount-control > div {
  min-height: 34px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.italy-public .amount-control strong,
.italy-public .term-control strong {
  font-size: 21px !important;
}

.italy-public .term-control .hint {
  font-size: 14px !important;
}

.italy-public input[type="range"] {
  height: 18px !important;
  margin: 8px 0 10px !important;
}

.italy-public .range-labels {
  margin-top: 2px !important;
  font-size: 12px !important;
}

.italy-public #loanStep > .btn.wide {
  width: min(100%, 420px) !important;
  justify-self: center !important;
  min-height: 50px !important;
  margin-top: 4px !important;
  border-radius: 14px !important;
  font-size: 17px !important;
}

.italy-public .register-form .register-grid {
  gap: 14px !important;
}

@media (max-width: 820px) {
  .italy-public .new-hero {
    width: min(100% - 24px, 720px) !important;
  }

  .italy-public .flow-card {
    width: 100% !important;
    padding: 18px 16px 20px !important;
  }

  .italy-public #loanStep {
    grid-template-columns: 1fr !important;
  }

  .italy-public .flow-head {
    grid-template-columns: 1fr !important;
  }

  .italy-public .flow-head span {
    grid-row: auto !important;
    justify-self: start !important;
  }

  .italy-public #loanStep > .btn.wide {
    width: 100% !important;
  }
}

/* Fully green active step lines */
.italy-public .flow-progress-line i {
  background: #dfe7f2 !important;
}

.italy-public .flow-progress-line i.active {
  background-color: #16b982 !important;
  background-image: linear-gradient(90deg, #16b982, #25d197) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 2px 8px rgba(22, 185, 130, .18) !important;
}

.italy-public .flow-card .flow-progress-line > i.active {
  background: #16b982 !important;
  background-image: linear-gradient(90deg, #16b982, #25d197) !important;
}

/* Premium bank scan with real logos */
.italy-public .scan-ring {
  width: 110px !important;
  height: 110px !important;
  margin: 2px auto 18px !important;
  border: 10px solid rgba(36, 197, 140, .14) !important;
  border-top-color: #16b982 !important;
  box-shadow: 0 18px 40px rgba(16, 155, 105, .16) !important;
}

.italy-public #scanStep > h3 {
  margin: 0 0 8px !important;
  text-align: center !important;
  color: #132034 !important;
  font-size: clamp(24px, 2.4vw, 34px) !important;
}

.italy-public #scanStep > .hint {
  max-width: 640px !important;
  margin: 0 auto 18px !important;
  text-align: center !important;
  color: #66758a !important;
}

.italy-public .bank-scan {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

.italy-public .bank-spotlight {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 120px !important;
  padding: 18px 22px !important;
  border: 1px solid rgba(36, 197, 140, .38) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 8% 12%, rgba(36, 197, 140, .18), transparent 160px),
    linear-gradient(135deg, #ffffff, #f3fff9) !important;
  box-shadow: 0 18px 42px rgba(16, 155, 105, .13), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

.italy-public .bank-spotlight span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 26px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  background: #e6fbf2 !important;
  color: #0f8f62 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
}

.italy-public .bank-spotlight strong {
  display: block !important;
  margin-top: 8px !important;
  color: #132034 !important;
  font-size: clamp(24px, 2.6vw, 36px) !important;
  line-height: 1.08 !important;
}

.italy-public .bank-spotlight small {
  display: block !important;
  margin-top: 6px !important;
  color: #69798c !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

.italy-public .bank-mini-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.italy-public .bank-card {
  min-height: 108px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  gap: 4px 11px !important;
  padding: 12px !important;
  border: 1px solid #dbe7e1 !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 10px 24px rgba(18, 51, 40, .06) !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.italy-public .bank-card.checking {
  transform: translateY(-2px) !important;
  border-color: rgba(36, 197, 140, .85) !important;
  background: #f1fff8 !important;
  box-shadow: 0 16px 34px rgba(16, 155, 105, .16) !important;
}

.italy-public .bank-card.checked {
  border-color: rgba(36, 197, 140, .28) !important;
  background: rgba(248,255,252,.96) !important;
}

.italy-public .bank-logo {
  grid-row: 1 / 3 !important;
  width: 56px !important;
  height: 56px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(194, 211, 205, .8) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(12, 38, 30, .06) !important;
}

.italy-public .bank-logo.large {
  width: 86px !important;
  height: 86px !important;
  border-radius: 20px !important;
}

.italy-public .bank-logo img {
  max-width: 76% !important;
  max-height: 56% !important;
  object-fit: contain !important;
}

.italy-public .bank-logo.large img {
  max-width: 78% !important;
  max-height: 60% !important;
}

.italy-public .bank-logo span {
  color: var(--bank) !important;
  font-size: 17px !important;
  font-weight: 950 !important;
}

.italy-public .bank-card strong {
  min-width: 0 !important;
  color: #172238 !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.italy-public .bank-card small {
  color: #738197 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.italy-public .bank-card.checked small,
.italy-public .bank-card.checking small {
  color: #0f8f62 !important;
  font-weight: 950 !important;
}

@media (max-width: 980px) {
  .italy-public .bank-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .italy-public .bank-spotlight {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    text-align: center !important;
  }

  .italy-public .bank-mini-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final override: active progress segments are fully green */
.italy-public .flow-card .flow-progress-line > i.active {
  background: linear-gradient(90deg, #16b982 0%, #25d197 100%) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}

/* Mobile cabinet steps: readable vertical timeline */
@media (max-width: 760px) {
  .italy-cabinet .steps-panel {
    padding: 18px 16px !important;
    border-radius: 18px !important;
    overflow: visible !important;
  }

  .italy-cabinet .steps-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .italy-cabinet .steps-head h2 {
    max-width: 100% !important;
    font-size: 19px !important;
    line-height: 1.22 !important;
    letter-spacing: .08em !important;
  }

  .italy-cabinet .steps-head strong {
    justify-self: start !important;
    color: #526278 !important;
    font-size: 15px !important;
  }

  .italy-cabinet .step-list {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 0 0 0 18px !important;
  }

  .italy-cabinet .step-list::before {
    left: 37px !important;
    right: auto !important;
    top: 18px !important;
    bottom: 18px !important;
    width: 2px !important;
    height: auto !important;
    background: linear-gradient(180deg, #16b982 0%, #25d197 62%, #dfe7f2 62%, #dfe7f2 100%) !important;
  }

  .italy-cabinet .step-item {
    min-height: 76px !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 28px !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    justify-items: start !important;
    gap: 3px 12px !important;
    padding: 12px 12px 12px 10px !important;
    border-radius: 15px !important;
    text-align: left !important;
  }

  .italy-cabinet .step-item .step-icon {
    grid-row: 1 / 3 !important;
    width: 38px !important;
    height: 38px !important;
    z-index: 1 !important;
  }

  .italy-cabinet .step-item strong {
    max-width: none !important;
    min-height: 0 !important;
    display: block !important;
    font-size: 15px !important;
    line-height: 1.18 !important;
    text-align: left !important;
  }

  .italy-cabinet .step-item small {
    max-width: none !important;
    display: block !important;
    font-size: 13px !important;
    line-height: 1.18 !important;
    text-align: left !important;
  }

  .italy-cabinet .step-item em {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    justify-self: center !important;
    font-size: 25px !important;
  }
}

/* Italy contract professional redesign */
.italy-cabinet .contract-dialog {
  width: min(960px, calc(100vw - 26px)) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.italy-cabinet .contract-dialog::backdrop {
  background: rgba(10, 24, 21, .64) !important;
  backdrop-filter: blur(8px) saturate(110%) !important;
}

.italy-cabinet .contract-paper {
  position: relative !important;
  max-height: min(88vh, 980px) !important;
  overflow: auto !important;
  padding: 0 !important;
  border: 1px solid rgba(181, 207, 196, .82) !important;
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 30px 80px rgba(8, 28, 22, .32) !important;
}

.italy-cabinet .contract-paper .dialog-x {
  position: absolute !important;
  top: 22px !important;
  right: 22px !important;
  z-index: 3 !important;
  float: none !important;
  min-width: 92px !important;
  height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  border-radius: 13px !important;
  color: #fff !important;
  background: rgba(255,255,255,.14) !important;
  font-weight: 950 !important;
  backdrop-filter: blur(6px) !important;
}

.italy-cabinet .contract-doc-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 150px !important;
  align-items: center !important;
  gap: 28px !important;
  padding: 34px 38px !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 18% 10%, rgba(167, 243, 207, .24), transparent 210px),
    linear-gradient(135deg, #102820, #13845b 62%, #4fd39a) !important;
}

.italy-cabinet .contract-kicker {
  display: inline-flex !important;
  min-height: 28px !important;
  align-items: center !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.12) !important;
  color: #d9fff0 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
}

.italy-cabinet .contract-doc-head h1 {
  max-width: 620px !important;
  margin: 12px 0 10px !important;
  color: #fff !important;
  font-size: clamp(34px, 4vw, 54px) !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.italy-cabinet .contract-doc-head p {
  max-width: 640px !important;
  margin: 0 !important;
  color: rgba(255,255,255,.86) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  font-weight: 650 !important;
}

.italy-cabinet .real-stamp {
  position: static !important;
  width: 148px !important;
  height: 148px !important;
  object-fit: contain !important;
  transform: rotate(-7deg) !important;
  opacity: .96 !important;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.18)) !important;
}

.italy-cabinet .contract-grid,
.italy-cabinet .contract-notice,
.italy-cabinet .contract-clauses,
.italy-cabinet .signature-box,
.italy-cabinet .schedule-section {
  margin-left: 38px !important;
  margin-right: 38px !important;
}

.italy-cabinet .contract-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 28px !important;
  margin-bottom: 20px !important;
}

.italy-cabinet .contract-grid div {
  min-height: 96px !important;
  padding: 16px !important;
  border: 1px solid #dbe7e1 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #fff, #f8fffb) !important;
  box-shadow: 0 12px 28px rgba(17, 48, 39, .06) !important;
}

.italy-cabinet .contract-grid dt {
  color: #68788d !important;
  font-size: 11px !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}

.italy-cabinet .contract-grid dd {
  margin-top: 7px !important;
  color: #152033 !important;
  font-size: 22px !important;
  line-height: 1.12 !important;
}

.italy-cabinet .contract-notice {
  padding: 18px 20px !important;
  border: 1px solid rgba(16, 155, 105, .25) !important;
  border-radius: 17px !important;
  background: #f0fff7 !important;
}

.italy-cabinet .contract-notice strong {
  display: block !important;
  margin-bottom: 6px !important;
  color: #0f7a52 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
}

.italy-cabinet .contract-notice p,
.italy-cabinet .contract-clauses p {
  margin: 0 !important;
  color: #506176 !important;
  font-size: 15px !important;
  line-height: 1.58 !important;
  font-weight: 650 !important;
}

.italy-cabinet .contract-clauses {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 18px !important;
  margin-bottom: 22px !important;
}

.italy-cabinet .contract-clauses article {
  padding: 18px !important;
  border: 1px solid #dbe7e1 !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,.96) !important;
}

.italy-cabinet .contract-clauses h2,
.italy-cabinet .signature-box h2,
.italy-cabinet .schedule-section h2 {
  margin: 0 0 8px !important;
  color: #152033 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.italy-cabinet .signature-box {
  padding: 20px !important;
  border: 1px solid rgba(16, 155, 105, .26) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,255,251,.96)),
    var(--italy-rhombus-bg) !important;
  background-size: auto, 76px 88px !important;
}

.italy-cabinet #signatureCanvas {
  height: 150px !important;
  border-color: #dbe7e1 !important;
  border-radius: 15px !important;
}

.italy-cabinet .signature-box .actions {
  margin-top: 14px !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.italy-cabinet .schedule-section {
  margin-top: 24px !important;
  margin-bottom: 34px !important;
}

.italy-cabinet .schedule-wrap {
  max-height: 300px !important;
  border: 1px solid #dbe7e1 !important;
  border-radius: 16px !important;
}

.italy-cabinet .schedule-wrap table th {
  background: #f0fff7 !important;
  color: #0f7a52 !important;
}

@media (max-width: 820px) {
  .italy-cabinet .contract-doc-head {
    grid-template-columns: 1fr !important;
    padding: 26px 22px !important;
  }

  .italy-cabinet .real-stamp {
    width: 118px !important;
    height: 118px !important;
  }

  .italy-cabinet .contract-grid,
  .italy-cabinet .contract-notice,
  .italy-cabinet .contract-clauses,
  .italy-cabinet .signature-box,
  .italy-cabinet .schedule-section {
    margin-left: 18px !important;
    margin-right: 18px !important;
  }

  .italy-cabinet .contract-grid,
  .italy-cabinet .contract-clauses {
    grid-template-columns: 1fr !important;
  }

  .italy-cabinet .contract-paper .dialog-x {
    min-width: 42px !important;
    width: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .italy-cabinet .contract-paper .dialog-x::before {
    content: "X" !important;
    font-size: 18px !important;
  }
}

/* Recipient card / IBAN choice */
.italy-cabinet .recipient-choice {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 18px 0 14px !important;
  padding: 5px !important;
  border: 1px solid #dbe7e1 !important;
  border-radius: 16px !important;
  background: #f4faf7 !important;
}

.italy-cabinet .recipient-choice button {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #526278 !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.italy-cabinet .recipient-choice button.active {
  color: #fff !important;
  background: linear-gradient(135deg, #109b69, #59dfa6) !important;
  box-shadow: 0 12px 24px rgba(16, 155, 105, .18) !important;
}

.italy-cabinet .card-sheet .field-note {
  display: block !important;
  margin-top: 8px !important;
  color: #66758a !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

/* Absolute final support tab placement */
.italy-cabinet .chat-widget {
  position: fixed !important;
  inset: 50% 0 auto auto !important;
  width: min(430px, calc(100vw - 28px)) !important;
  transform: translateY(-50%) !important;
  z-index: 90 !important;
  pointer-events: none !important;
}

.italy-cabinet .chat-button {
  pointer-events: auto !important;
  position: absolute !important;
  inset: 50% 0 auto auto !important;
  width: 58px !important;
  min-width: 58px !important;
  height: 154px !important;
  min-height: 154px !important;
  padding: 14px 8px !important;
  transform: translate(8px, -50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  border: 1px solid rgba(207, 255, 235, .72) !important;
  border-right: 0 !important;
  border-radius: 18px 0 0 18px !important;
  background: linear-gradient(145deg, #53e0a6 0%, #18b87b 48%, #0b8f5f 100%) !important;
  color: #fff !important;
  box-shadow: -16px 20px 46px rgba(5, 74, 53, .24), inset 1px 1px 0 rgba(255,255,255,.42) !important;
  cursor: grab !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

.italy-cabinet .chat-button:hover {
  transform: translate(2px, -50%) !important;
}

.italy-cabinet .chat-button:active {
  cursor: grabbing !important;
  transform: translate(0, -50%) scale(.99) !important;
}

.italy-cabinet .chat-button::before {
  content: "i" !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.19) !important;
  border: 1px solid rgba(255,255,255,.44) !important;
  color: #fff !important;
  font-size: 21px !important;
  font-family: Georgia, serif !important;
  font-style: italic !important;
  font-weight: 800 !important;
}

.italy-cabinet .chat-button::after {
  content: "Aiuto" !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.italy-cabinet .chat-button span {
  display: none !important;
}

.italy-cabinet .chat-panel {
  pointer-events: auto !important;
  position: absolute !important;
  inset: 50% 18px auto auto !important;
  width: min(430px, calc(100vw - 34px)) !important;
  height: min(620px, calc(100dvh - 42px)) !important;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  border-radius: 18px !important;
}

.italy-cabinet .chat-welcome {
  pointer-events: auto !important;
  right: 72px !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(310px, calc(100vw - 120px)) !important;
  transform: translateY(-50%) !important;
}

@media (max-width: 700px) {
  .italy-cabinet .chat-widget {
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: min(390px, calc(100vw - 22px)) !important;
  }

  .italy-cabinet .chat-button {
    width: 50px !important;
    min-width: 50px !important;
    height: 132px !important;
    min-height: 132px !important;
    border-radius: 16px 0 0 16px !important;
  }

  .italy-cabinet .chat-panel {
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    width: calc(100vw - 28px) !important;
    height: min(560px, calc(100dvh - 30px)) !important;
    border-radius: 16px !important;
  }

  .italy-cabinet .chat-welcome {
    right: 60px !important;
    left: auto !important;
    bottom: auto !important;
    width: min(260px, calc(100vw - 92px)) !important;
  }
}

/* Credito Italia generated monogram logo */
.italy-public .brand-emblem,
.italy-cabinet .brand-emblem,
.preland-topbar .brand-emblem {
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  display: block !important;
  border-radius: 15px !important;
  box-shadow: 0 14px 30px rgba(6, 78, 55, .28), 0 0 0 1px rgba(211, 255, 236, .22) inset !important;
}

.italy-cabinet .compact-brand .brand-emblem {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-radius: 13px !important;
}

.italy-public .brand-large,
.italy-cabinet .compact-brand,
.preland-topbar .brand-large {
  gap: 12px !important;
}

.preland-topbar .brand-large > span:last-child {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 30px !important;
  font-style: italic !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.preland-topbar .brand-large > span:last-child::first-letter {
  color: #b9f7dc !important;
}

@media (max-width: 700px) {
  .italy-public .brand-emblem,
  .italy-cabinet .brand-emblem,
  .preland-topbar .brand-emblem {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 12px !important;
  }

  .preland-topbar .brand-large > span:last-child {
    font-size: 24px !important;
  }
}

/* Final calculator alignment */
.italy-public #loanStep {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-areas:
    "purpose purpose"
    "amount term"
    "action action" !important;
  align-items: stretch !important;
  gap: 16px !important;
}

.italy-public #loanStep > .field:first-child {
  grid-area: purpose !important;
}

.italy-public #loanStep > .amount-control {
  grid-area: amount !important;
}

.italy-public #loanStep > .field:nth-of-type(2) {
  grid-area: term !important;
}

.italy-public #loanStep > .btn.wide {
  grid-area: action !important;
}

.italy-public #loanStep > .amount-control,
.italy-public #loanStep > .field:nth-of-type(2) {
  min-height: 214px !important;
  padding: 18px !important;
  border: 1px solid rgba(211, 224, 238, .86) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 12px 28px rgba(20, 50, 43, .055) !important;
}

.italy-public #loanStep > .amount-control > div,
.italy-public #loanStep .term-control > div {
  min-height: 48px !important;
  margin: 0 0 14px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 12px !important;
}

.italy-public #loanStep > .amount-control label,
.italy-public #loanStep .control-title {
  color: #162238 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.italy-public #loanStep .term-control::before {
  content: none !important;
}

.italy-public #loanStep .term-control > div {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.italy-public #amountView,
.italy-public #termView {
  color: #109b69 !important;
  font-size: 28px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.italy-public #termYears {
  color: #647187 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: right !important;
}

.italy-public #loanStep .term-value {
  display: grid !important;
  gap: 6px !important;
  justify-items: end !important;
}

.italy-public #loanStep input[type="range"] {
  width: 100% !important;
  margin: 8px 0 12px !important;
}

.italy-public #amountInput {
  width: 100% !important;
  margin-top: 10px !important;
}

.italy-public #loanStep .range-labels {
  display: flex !important;
  justify-content: space-between !important;
  margin-top: 6px !important;
  color: #647187 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.italy-public #loanStep > .btn.wide {
  width: min(100%, 520px) !important;
  justify-self: center !important;
  margin-top: 2px !important;
}

@media (max-width: 820px) {
  .italy-public #loanStep {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "purpose"
      "amount"
      "term"
      "action" !important;
  }

  .italy-public #loanStep > .amount-control,
  .italy-public #loanStep > .field:nth-of-type(2) {
    min-height: 0 !important;
    padding: 16px !important;
  }

  .italy-public #loanStep > .btn.wide {
    width: 100% !important;
  }
}

/* Correct final calculator two-column layout */
.italy-public #loanStep > .term-field {
  grid-area: term !important;
}

.italy-public #loanStep > .amount-control,
.italy-public #loanStep > .term-field {
  min-height: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(211, 224, 238, .86) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 12px 28px rgba(20, 50, 43, .055) !important;
}

.italy-public #loanStep > .field:nth-of-type(2) {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.italy-public #loanStep .term-control {
  height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  align-content: start !important;
}

.italy-public #loanStep > .amount-control {
  display: grid !important;
  grid-template-rows: auto auto auto !important;
}

.italy-public #loanStep > .amount-control > div,
.italy-public #loanStep .term-control > div {
  min-height: 42px !important;
  margin-bottom: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
}

.italy-public #amountView,
.italy-public #termView {
  font-size: clamp(24px, 2.5vw, 34px) !important;
}

.italy-public #termYears {
  margin-top: 3px !important;
}

.italy-public #loanStep input[type="range"] {
  align-self: center !important;
}

.italy-public #amountInput {
  align-self: end !important;
}

@media (max-width: 820px) {
  .italy-public #loanStep > .amount-control,
  .italy-public #loanStep > .term-field {
    padding: 15px !important;
  }
}

/* Registration step separation */
.italy-public .register-form {
  scroll-margin-top: 110px !important;
  margin-top: 28px !important;
  padding: 26px !important;
  border: 1px solid rgba(35, 170, 119, .18) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(245, 255, 250, .92), rgba(255, 255, 255, .82)) !important;
  box-shadow: 0 18px 42px rgba(12, 76, 57, .08), inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.italy-public .register-form::before {
  content: "" !important;
  display: block !important;
  height: 3px !important;
  width: min(100%, 360px) !important;
  margin: -28px auto 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(16,155,105,0), #18b87b, rgba(16,155,105,0)) !important;
}

.italy-public .register-form .register-grid {
  gap: 16px !important;
}

.italy-public .register-form > .btn.primary.wide {
  margin-top: 18px !important;
}

@media (max-width: 820px) {
  .italy-public .register-form {
    scroll-margin-top: 92px !important;
    margin-top: 20px !important;
    padding: 18px 15px !important;
  }

  .italy-public .register-form::before {
    margin-top: -20px !important;
    margin-bottom: 18px !important;
  }

}

/* Final landing first-screen split layout */
@media (min-width: 1101px) {
  .italy-public .new-hero {
    width: min(1500px, calc(100vw - 56px)) !important;
    max-width: 1500px !important;
    margin: 34px auto 38px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr) !important;
    align-items: stretch !important;
    gap: 24px !important;
  }

  .italy-public .hero-copy {
    min-height: 0 !important;
    height: 100% !important;
    padding: 42px 38px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
    border-radius: 20px !important;
  }

  .italy-public .hero-copy .eyebrow {
    margin: 0 0 18px !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    max-width: 620px !important;
    margin: 0 !important;
    font-size: clamp(38px, 3.15vw, 58px) !important;
    line-height: 1.02 !important;
    text-align: left !important;
  }

  .italy-public .hero-copy p,
  .italy-public .new-hero p {
    max-width: 620px !important;
    margin: 22px 0 0 !important;
    font-size: 17px !important;
    line-height: 1.5 !important;
    text-align: left !important;
  }

  .italy-public .hero-metrics {
    width: 100% !important;
    max-width: 620px !important;
    margin: 28px 0 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .italy-public .flow-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 24px !important;
    border-radius: 20px !important;
  }

  .italy-public .flow-head h2 {
    font-size: clamp(25px, 1.7vw, 34px) !important;
  }

  .italy-public #loanStep {
    gap: 14px !important;
  }

  .italy-public #loanStep > .amount-control,
  .italy-public #loanStep > .term-field {
    padding: 16px !important;
  }

  .italy-public #amountView,
  .italy-public #termView {
    font-size: clamp(24px, 2vw, 31px) !important;
  }

  .italy-public #loanStep > .btn.wide {
    width: 100% !important;
  }
}

@media (min-width: 1101px) and (max-width: 1320px) {
  .italy-public .new-hero {
    grid-template-columns: minmax(0, .84fr) minmax(500px, 1.16fr) !important;
    gap: 18px !important;
  }

  .italy-public .hero-copy {
    padding: 34px 30px !important;
  }

  .italy-public .hero-copy h1,
  .italy-public .new-hero h1 {
    font-size: clamp(34px, 3.1vw, 44px) !important;
  }
}

@media (max-width: 1100px) {
  .italy-public .new-hero {
    width: min(100% - 32px, 860px) !important;
    max-width: 860px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .italy-public .flow-card {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Step replacement must beat layout display rules */
.italy-public .flow-step.hidden,
.italy-public #loanStep.hidden,
.italy-public #registerStep.hidden,
.italy-public #scanStep.hidden,
.italy-public #approvedStep.hidden {
  display: none !important;
}

.italy-public .new-hero {
  align-items: start !important;
}

@media (min-width: 1101px) {
  .italy-public .new-hero {
    align-items: start !important;
  }

  .italy-public .hero-copy {
    height: auto !important;
    min-height: 560px !important;
    align-self: start !important;
  }

  .italy-public .flow-card {
    align-self: start !important;
  }
}

/* Final section divider system */
.italy-public main > section {
  position: relative !important;
}

.italy-public main > section + section::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: -22px !important;
  width: min(1060px, 76vw) !important;
  height: 3px !important;
  transform: translateX(-50%) !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, rgba(16,155,105,0), rgba(36,197,140,.78) 18%, #18b87b 50%, rgba(36,197,140,.78) 82%, rgba(16,155,105,0)) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.7), 0 8px 22px rgba(16,155,105,.12) !important;
  pointer-events: none !important;
}

@media (min-width: 1101px) {
  .italy-public .new-hero::before {
    content: none !important;
    display: none !important;
  }

  .italy-public .hero-copy,
  .italy-public .flow-card {
    position: relative !important;
    z-index: 2 !important;
  }
}

@media (min-width: 1101px) and (max-width: 1320px) {
  .italy-public .new-hero::before {
    content: none !important;
    display: none !important;
  }
}

.italy-public .new-hero .flow-card::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 1100px) {
  .italy-public .new-hero::before {
    content: none !important;
    display: none !important;
  }

  .italy-public main > section + section::before {
    width: min(640px, 82vw) !important;
    top: -18px !important;
  }
}

/* Compact registration form */
.italy-public #registerStep.register-form {
  gap: 12px !important;
  margin-top: 16px !important;
  padding: 18px !important;
  border-radius: 14px !important;
}

.italy-public #registerStep.register-form::before {
  margin: -20px auto 14px !important;
}

.italy-public #registerStep .register-grid {
  gap: 10px 14px !important;
}

.italy-public #registerStep .field label,
.italy-public #registerStep .consent {
  margin-bottom: 5px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.italy-public #registerStep input,
.italy-public #registerStep select,
.italy-public #registerStep .custom-select-trigger {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
}

.italy-public #registerStep .phone-control {
  grid-template-columns: 86px minmax(0, 1fr) !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
}

.italy-public #registerStep .phone-prefix {
  padding: 0 8px !important;
  font-size: 14px !important;
}

.italy-public #registerStep .field .phone-control input {
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  font-size: 15px !important;
}

.italy-public #registerStep .field-note {
  margin-top: 5px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.italy-public #registerStep .consent.field-full {
  margin-top: 2px !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

.italy-public #registerStep .consent input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
}

.italy-public #registerStep > .btn.primary.wide {
  min-height: 44px !important;
  margin-top: 2px !important;
  border-radius: 11px !important;
  font-size: 15px !important;
}

@media (max-width: 820px) {
  .italy-public #registerStep.register-form {
    margin-top: 14px !important;
    padding: 14px 12px !important;
  }

  .italy-public #registerStep.register-form::before {
    margin-top: -16px !important;
    margin-bottom: 12px !important;
  }
}

/* 2026 warm Credito Italia redesign: replaces the old blue transfer UI */
:root {
  --ui-blue: #13845f;
  --ui-blue-dark: #0f3b2d;
  --ci-forest: #0f3b2d;
  --ci-green: #13845f;
  --ci-mint: #dff6ea;
  --ci-gold: #d7a84f;
  --ci-amber: #f5df9d;
  --ci-cream: #fffaf0;
  --ci-ink: #17231e;
  --ci-muted: #69766f;
  --ci-line: rgba(15, 59, 45, .16);
  --ci-shadow: 0 24px 70px rgba(15, 59, 45, .13);
  --ci-shadow-soft: 0 14px 34px rgba(15, 59, 45, .09);
}

body.italy-cabinet,
body:has(.client-shell) {
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 223, 157, .46), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(151, 220, 184, .38), transparent 32%),
    linear-gradient(135deg, #f9f7ef 0%, #eef7f1 52%, #fffaf0 100%) !important;
  color: var(--ci-ink) !important;
}

body.italy-cabinet::before,
body:has(.client-shell)::before {
  opacity: .24 !important;
  background-image:
    linear-gradient(rgba(15, 59, 45, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 59, 45, .08) 1px, transparent 1px) !important;
  background-size: 42px 42px !important;
}

.app-topline,
.topbar,
.transfer-account,
.panel,
.steps-panel,
.withdraw-card,
.certificate-section,
.transfer-section,
.transfer-panel,
.payment-sheet,
.chat-panel {
  border-color: var(--ci-line) !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: var(--ci-shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
}

.app-topline,
.transfer-account {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(248, 252, 246, .82)) !important;
}

.brand-emblem,
.ci-mini-logo,
.login-ci-logo,
.brand-mark,
.login-brand-mark,
.node-logo,
.chat-avatar,
.node-user,
.bank-symbol,
.cert-icon,
.receipt-icon {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .52), transparent 34%),
    linear-gradient(135deg, #1aa874, #0f3b2d 72%) !important;
  color: #fff !important;
  border: 1px solid rgba(247, 223, 151, .44) !important;
  box-shadow: 0 16px 36px rgba(15, 59, 45, .22), inset 0 1px 0 rgba(255, 255, 255, .32) !important;
}

.ci-mini-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 58px;
  font-family: Georgia, "Times New Roman", serif;
  overflow: hidden;
}

.ci-mini-logo b {
  margin-right: 7px;
  font-size: 35px;
  font-style: italic;
  line-height: 1;
}

.ci-mini-logo em {
  margin-top: -12px;
  color: #dfffee;
  font-size: 22px;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
}

.ci-mini-logo::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #f5df9d;
  box-shadow: 0 0 18px rgba(245, 223, 157, .85);
}

.certificate-logo,
.login-ci-logo {
  width: 70px !important;
  height: 70px !important;
  border-radius: 22px !important;
}

.btn.primary,
.btn.fund-btn,
.btn.gold,
.telegram-chat .chat-input button {
  border-color: transparent !important;
  background: linear-gradient(135deg, #13845f, #0f3b2d) !important;
  color: #fff !important;
  box-shadow: 0 16px 38px rgba(19, 132, 95, .22) !important;
}

.btn:hover,
.step-item:hover,
.transfer-node:hover,
.unlock-node:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 22px 44px rgba(15, 59, 45, .15) !important;
}

.section-kicker,
.transfer-title small,
.transfer-person small,
.transfer-card-mask small,
.certificate-title small,
.step-dot small {
  color: #758174 !important;
  letter-spacing: .12em !important;
}

.progress-line,
.transfer-progress,
.certificate-progress {
  background: rgba(19, 132, 95, .14) !important;
  overflow: hidden !important;
}

.progress-line i,
.transfer-progress i,
.certificate-progress i,
.unlock-progress i {
  background: linear-gradient(90deg, #0f3b2d, #13845f 54%, #d7a84f) !important;
  box-shadow: 0 0 24px rgba(19, 132, 95, .34) !important;
}

.transfer-section,
.certificate-section {
  border-radius: 26px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(245, 252, 247, .78)),
    radial-gradient(circle at 85% 20%, rgba(245, 223, 157, .28), transparent 32%) !important;
}

.transfer-panel {
  position: relative !important;
  overflow: hidden !important;
  border-top: 0 !important;
  border-radius: 26px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(248, 251, 245, .88)) !important;
}

.transfer-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #0f3b2d, #13845f, #d7a84f, #13845f);
  background-size: 220% 100%;
  animation: ciRibbon 4.8s ease-in-out infinite;
}

.transfer-panel::after,
.certificate-section::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -110px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 223, 157, .32), transparent 68%);
  pointer-events: none;
}

.transfer-title h2,
.certificate-title h2,
.steps-head h2,
.withdraw-card h2 {
  color: var(--ci-ink) !important;
  letter-spacing: 0 !important;
}

.transfer-visual,
.unlock-visual,
.certificate-visual {
  position: relative !important;
  border-color: rgba(19, 132, 95, .15) !important;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .72), rgba(240, 250, 244, .72)) !important;
}

.transfer-visual::before,
.transfer-visual::after {
  height: 3px !important;
  background: linear-gradient(90deg, rgba(19, 132, 95, .08), #13845f, #d7a84f, rgba(19, 132, 95, .08)) !important;
  background-size: 260% 100% !important;
  animation: ciFlow 2.6s linear infinite !important;
}

.transfer-visual::after {
  animation-delay: .7s !important;
}

.transfer-node,
.unlock-node {
  border-color: rgba(15, 59, 45, .14) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(250, 246, 234, .86)) !important;
  box-shadow: 0 18px 42px rgba(15, 59, 45, .09) !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
}

.transfer-node.center {
  border-color: rgba(215, 168, 79, .42) !important;
  background:
    linear-gradient(150deg, rgba(255, 252, 241, .98), rgba(236, 249, 241, .9)) !important;
}

.transfer-node small,
.unlock-node small,
.certificate-paper-mini span {
  color: #748277 !important;
}

.transfer-timer strong,
#transferPercent,
#unlockPercent,
.certificate-meta strong {
  color: #0f6f50 !important;
}

.step-dot.done span,
.step-icon,
.step-item.complete em,
.mini-pills span,
.status,
.status-pill,
.tag {
  border-color: rgba(19, 132, 95, .2) !important;
  background: #eaf8f1 !important;
  color: #0f6f50 !important;
}

.transfer-panel.failed {
  border-color: rgba(180, 35, 24, .22) !important;
}

.transfer-panel.failed::before,
.transfer-panel.failed .transfer-progress i {
  background: linear-gradient(90deg, #b42318, #ef8f52) !important;
}

.chat-button,
.help-top-btn {
  background: linear-gradient(135deg, #0f3b2d, #13845f) !important;
  color: #fff !important;
}

.chat-welcome {
  border-color: rgba(19, 132, 95, .18) !important;
  box-shadow: 0 18px 50px rgba(15, 59, 45, .16) !important;
}

.program-art.business {
  background:
    linear-gradient(135deg, rgba(19, 132, 95, .12), rgba(215, 168, 79, .22)) !important;
}

.program-art.business span {
  color: #0f3b2d !important;
  font-size: clamp(18px, 2vw, 28px) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-style: italic !important;
  letter-spacing: 0 !important;
}

@keyframes ciFlow {
  from { background-position: 140% 0; }
  to { background-position: -140% 0; }
}

@keyframes ciRibbon {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (max-width: 700px) {
  .ci-mini-logo {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 16px;
  }

  .ci-mini-logo b {
    font-size: 30px;
  }

  .ci-mini-logo em {
    font-size: 19px;
  }
}

/* Restore transparent glass document upload modal */
.italy-cabinet #docsDialog.payment-dialog {
  width: min(840px, calc(100vw - 32px)) !important;
  border-radius: 28px !important;
}

.italy-cabinet #docsDialog::backdrop {
  background:
    radial-gradient(circle at 24% 22%, rgba(31, 155, 111, .34), transparent 36%),
    radial-gradient(circle at 76% 18%, rgba(215, 168, 79, .2), transparent 34%),
    rgba(9, 25, 21, .48) !important;
  backdrop-filter: blur(18px) saturate(126%) !important;
}

.italy-cabinet #docsDialog .payment-sheet {
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(24px, 4vw, 46px) !important;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .34), rgba(240, 250, 245, .2)),
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, .42), transparent 38%),
    radial-gradient(circle at 84% 12%, rgba(213, 244, 225, .3), transparent 36%) !important;
  box-shadow:
    0 30px 90px rgba(5, 22, 18, .32),
    inset 0 1px 0 rgba(255, 255, 255, .62),
    inset 0 0 0 1px rgba(255, 255, 255, .18) !important;
  backdrop-filter: blur(28px) saturate(138%) !important;
}

.italy-cabinet #docsDialog .payment-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(60deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 72px),
    linear-gradient(120deg, rgba(19, 132, 95, .09) 0 1px, transparent 1px 72px);
  opacity: .68;
}

.italy-cabinet #docsDialog .payment-sheet > * {
  position: relative;
  z-index: 1;
}

.italy-cabinet #docsDialog h1 {
  color: #101b2d !important;
}

.italy-cabinet #docsDialog .hint {
  color: rgba(31, 43, 60, .66) !important;
}

.italy-cabinet #docsDialog .dialog-x {
  border-color: rgba(255, 255, 255, .52) !important;
  background: rgba(255, 255, 255, .42) !important;
  color: #101b2d !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 14px 34px rgba(7, 26, 21, .14) !important;
}

.italy-cabinet #docsDialog .document-options label,
.italy-cabinet #docsDialog .file-picker {
  border-color: rgba(255, 255, 255, .52) !important;
  background: rgba(255, 255, 255, .32) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58), 0 14px 32px rgba(7, 26, 21, .08) !important;
  backdrop-filter: blur(18px) saturate(128%) !important;
}

.italy-cabinet #docsDialog .document-options label:has(input:checked) {
  border-color: rgba(19, 132, 95, .48) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .44), rgba(224, 248, 235, .34)) !important;
}

.italy-cabinet #docsDialog .document-options label > span {
  background: rgba(226, 248, 235, .58) !important;
  color: #0f3b2d !important;
}

.italy-cabinet #docsDialog input[type="radio"] {
  accent-color: #13845f !important;
}

.italy-cabinet #docsDialog .file-picker span,
.italy-cabinet #docsDialog .btn.primary {
  background: linear-gradient(135deg, rgba(19, 132, 95, .94), rgba(74, 217, 151, .88)) !important;
  box-shadow: 0 18px 44px rgba(19, 132, 95, .24) !important;
}

@media (max-width: 700px) {
  .italy-cabinet #docsDialog.payment-dialog {
    width: calc(100vw - 20px) !important;
  }

  .italy-cabinet #docsDialog .payment-sheet {
    padding: 22px 16px !important;
    border-radius: 22px !important;
  }
}
