.admin-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: #07101d;
  color: #e9f2ff;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 20px;
  background: linear-gradient(180deg, #0b1729 0%, #08121f 100%);
  border-right: 1px solid rgba(119, 160, 207, .14);
}

.admin-brand { display: flex; align-items: center; gap: 12px; color: #fff; padding: 0 8px 28px; }
.admin-brand img { filter: drop-shadow(0 0 18px rgba(28, 169, 247, .3)); }
.admin-brand span { display: grid; gap: 2px; }
.admin-brand strong { font: 600 1rem/1.1 var(--font-display); letter-spacing: .12em; text-transform: none; }
.admin-brand small { color: #7185a2; font-size: .68rem; letter-spacing: .05em; }

.admin-nav { display: grid; gap: 7px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 11px; color: #8fa2bc; font-size: .86rem; font-weight: 650;
}
.admin-nav a:hover, .admin-nav a.is-active, .admin-nav a.active { color: #fff; background: rgba(31, 160, 236, .09); border-color: rgba(46, 180, 255, .18); }
.admin-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.admin-sidebar__note { margin-top: auto; padding: 14px; border: 1px solid rgba(119, 160, 207, .12); border-radius: 11px; color: #7f92ac; font-size: .7rem; line-height: 1.55; }
.admin-status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 10px #39d98a; }
.admin-logout { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(119, 160, 207, .12); }
.admin-logout button { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid rgba(119, 160, 207, .14); border-radius: 10px; background: rgba(255,255,255,.02); color: #a5b4c8; font: 700 .75rem var(--font-body); cursor: pointer; }
.admin-logout button:hover { color: #fff; border-color: rgba(248,113,113,.28); background: rgba(239,68,68,.08); }
.admin-logout svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }

.admin-main { min-width: 0; background: radial-gradient(circle at 85% 0%, rgba(27, 121, 190, .12), transparent 30%), #08111f; }
.admin-page { width: min(1440px, 100%); margin-inline: auto; padding: clamp(24px, 4vw, 54px); }
.admin-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.admin-kicker { color: #2ebaff; font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.admin-topbar h1 { margin: 7px 0 5px; color: #f5f9ff; font: 500 clamp(1.8rem, 3vw, 2.7rem)/1.1 var(--font-display); letter-spacing: -.035em; }
.admin-topbar p { margin: 0; color: #8295af; font-size: .86rem; }
.admin-save { display: inline-flex; align-items: center; gap: 10px; min-height: 47px; padding: 0 18px; border: 1px solid rgba(91, 205, 255, .45); border-radius: 10px; background: linear-gradient(135deg, #0e89d2, #1161ac); color: #fff; font: 750 .75rem var(--font-heading); letter-spacing: .03em; cursor: pointer; box-shadow: 0 12px 32px rgba(0, 111, 191, .2); }
.admin-save:disabled { opacity: .65; cursor: wait; }
.admin-save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }

.admin-message { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; padding: 13px 16px; border-radius: 10px; font-size: .78rem; }
.admin-message.is-success { color: #a7f3d0; background: rgba(16, 185, 129, .1); border: 1px solid rgba(52, 211, 153, .22); }
.admin-message.is-error { color: #fecaca; background: rgba(239, 68, 68, .1); border: 1px solid rgba(248, 113, 113, .22); }
.admin-message button { border: 0; background: transparent; color: currentColor; font-size: 1.2rem; cursor: pointer; }

.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-summary article { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 19px; border: 1px solid rgba(119, 160, 207, .13); border-radius: 12px; background: rgba(12, 27, 47, .74); }
.admin-summary span { color: #7d91ad; font-size: .72rem; }
.admin-summary strong { color: #eef7ff; font: 500 1.5rem var(--font-display); }

.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid rgba(119, 160, 207, .13); border-radius: 13px; background: rgba(12, 27, 47, .74); }
.admin-search { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 180px; padding: 0 12px; }
.admin-search svg { width: 19px; height: 19px; fill: none; stroke: #637b9b; stroke-width: 1.7; }
.admin-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #eaf4ff; font: 500 .8rem var(--font-body); }
.admin-search input::placeholder { color: #5f7490; }
.admin-language-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 9px; background: #07111e; }
.admin-language-tabs button { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #69809f; font: 800 .68rem var(--font-heading); cursor: pointer; }
.admin-language-tabs button span { margin-left: 5px; font-weight: 550; }
.admin-language-tabs button.is-active { color: #f1f8ff; border-color: rgba(57, 188, 255, .24); background: #12253d; box-shadow: 0 4px 12px rgba(0,0,0,.18); }

.admin-workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.admin-sections { align-self: start; position: sticky; top: 18px; display: grid; gap: 5px; padding: 8px; border: 1px solid rgba(119, 160, 207, .13); border-radius: 13px; background: rgba(12, 27, 47, .74); }
.admin-sections button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #778da9; font: 650 .7rem var(--font-body); text-align: left; cursor: pointer; }
.admin-sections button b { min-width: 22px; padding: 2px 5px; border-radius: 12px; color: #67809e; background: rgba(95, 130, 169, .1); font-size: .63rem; text-align: center; }
.admin-sections button:hover, .admin-sections button.is-active { color: #fff; background: rgba(34, 154, 224, .1); border-color: rgba(49, 177, 250, .16); }

.admin-editor { overflow: hidden; border: 1px solid rgba(119, 160, 207, .13); border-radius: 13px; background: rgba(12, 27, 47, .74); }
.admin-editor__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 70px; padding: 15px 20px; border-bottom: 1px solid rgba(119, 160, 207, .11); }
.admin-editor__head > div { display: grid; gap: 4px; }
.admin-editor__head span { color: #e8f3ff; font-size: .88rem; font-weight: 750; }
.admin-editor__head small { color: #657b98; font-size: .68rem; }
.admin-current-language { padding: 6px 9px; border-radius: 7px; color: #55c7ff !important; background: rgba(45, 178, 244, .08); font-size: .65rem !important; }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(119, 160, 207, .09); }
.admin-field { display: grid; align-content: start; gap: 10px; padding: 18px 20px; background: #0c1b2f; }
.admin-field__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.admin-field__meta strong { color: #bac9dd; font-size: .72rem; font-weight: 650; }
.admin-field__meta small { overflow: hidden; color: #4e6685; font: 500 .57rem/1.2 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.admin-field input, .admin-field textarea { width: 100%; border: 1px solid rgba(113, 154, 201, .18); border-radius: 8px; outline: 0; background: #071320; color: #edf6ff; font: 500 .78rem/1.55 var(--font-body); transition: border-color .2s, box-shadow .2s; }
.admin-field input { height: 42px; padding: 0 12px; }
.admin-field textarea { min-height: 104px; padding: 10px 12px; resize: vertical; }
.admin-field input:focus, .admin-field textarea:focus { border-color: rgba(57, 188, 255, .55); box-shadow: 0 0 0 3px rgba(34, 164, 234, .08); }
.admin-empty, .admin-loading { display: grid; place-items: center; min-height: 260px; color: #6d83a1; font-size: .8rem; }
.admin-spinner { width: 16px; height: 16px; display: inline-block; border: 2px solid rgba(255,255,255,.25); border-top-color: currentColor; border-radius: 50%; animation: admin-spin .7s linear infinite; }
@keyframes admin-spin { to { transform: rotate(360deg); } }

/* Светлая рабочая тема: данные и границы полей должны читаться с первого взгляда. */
.admin-shell {
  background: #eef3f8;
  color: #1d2939;
}

.admin-sidebar {
  background: #ffffff;
  border-right-color: #dce4ee;
  box-shadow: 8px 0 30px rgba(22, 47, 76, .045);
}

.admin-brand { color: #11243a; }
.admin-brand img { filter: drop-shadow(0 7px 13px rgba(25, 121, 181, .18)); }
.admin-brand strong { color: #0d2035; }
.admin-brand small { color: #75869a; }

.admin-nav a {
  color: #5a6c80;
  border-color: transparent;
}
.admin-nav a:hover {
  color: #126caa;
  background: #f3f8fc;
  border-color: #dbeaf4;
}
.admin-nav a.is-active,
.admin-nav a.active {
  color: #075f9b;
  background: #eaf6fd;
  border-color: #bfe2f6;
  box-shadow: inset 3px 0 #159bd7;
}

.admin-sidebar__note {
  color: #60748a;
  background: #f7fafc;
  border-color: #dce5ee;
}
.admin-logout { border-top-color: #e3e9ef; }
.admin-logout button { color: #5c7085; border-color: #d9e2eb; background: #f8fafc; }
.admin-logout button:hover { color: #b42318; border-color: #f2c4bf; background: #fff4f2; }

.admin-main {
  background:
    radial-gradient(circle at 92% 0%, rgba(44, 156, 219, .09), transparent 26rem),
    #f2f6fa;
}

.admin-kicker { color: #0878ba; }
.admin-topbar h1 { color: #102338; }
.admin-topbar p { color: #63758a; }
.admin-save {
  border-color: #087cbc;
  background: linear-gradient(135deg, #159fde, #0871b2);
  box-shadow: 0 10px 22px rgba(8, 113, 178, .18);
}
.admin-save:hover:not(:disabled) { translate: 0 -1px; box-shadow: 0 13px 26px rgba(8, 113, 178, .24); }

.admin-message.is-success { color: #087443; background: #ecfdf3; border-color: #a6e6c4; }
.admin-message.is-error { color: #b42318; background: #fff1f0; border-color: #ffc9c5; }

.admin-summary article {
  background: #ffffff;
  border-color: #dce4ed;
  box-shadow: 0 5px 16px rgba(31, 55, 81, .045);
}
.admin-summary article::before {
  content: '';
  width: 4px;
  align-self: stretch;
  border-radius: 4px;
  background: linear-gradient(#22a9e5, #0872b4);
}
.admin-summary span { color: #65778c; }
.admin-summary strong { margin-left: auto; color: #13283f; }

.admin-toolbar {
  background: #ffffff;
  border-color: #d8e2ec;
  box-shadow: 0 5px 16px rgba(31, 55, 81, .04);
}
.admin-search {
  min-height: 40px;
  border: 1px solid #d9e2ec;
  border-radius: 9px;
  background: #f8fafc;
}
.admin-search svg { stroke: #71859a; }
.admin-search input { color: #1e3044; }
.admin-search input::placeholder { color: #8998a9; }
.admin-search:focus-within { border-color: #58b7e5; box-shadow: 0 0 0 3px rgba(29, 155, 216, .1); background: #fff; }

.admin-language-tabs { background: #edf2f7; border: 1px solid #dce4ed; }
.admin-language-tabs button { color: #66798f; }
.admin-language-tabs button:hover { color: #126fa9; }
.admin-language-tabs button.is-active {
  color: #075f9b;
  border-color: #b8dcef;
  background: #ffffff;
  box-shadow: 0 3px 9px rgba(39, 68, 96, .1);
}

.admin-sections {
  background: #ffffff;
  border-color: #d8e2ec;
  box-shadow: 0 5px 16px rgba(31, 55, 81, .04);
}
.admin-sections button { color: #5d7085; }
.admin-sections button b { color: #647b91; background: #edf2f7; }
.admin-sections button:hover { color: #075f9b; background: #f2f8fc; border-color: #d7eaf5; }
.admin-sections button.is-active {
  color: #075f9b;
  background: #e9f6fd;
  border-color: #b9def2;
  box-shadow: inset 3px 0 #159bd7;
}
.admin-sections button.is-active b { color: #075f9b; background: #d5edf9; }

.admin-editor {
  background: #ffffff;
  border-color: #d4dee9;
  box-shadow: 0 8px 24px rgba(31, 55, 81, .06);
}
.admin-editor__head {
  background: #f9fbfd;
  border-bottom-color: #dbe4ed;
}
.admin-editor__head span { color: #1b3047; }
.admin-editor__head small { color: #718398; }
.admin-current-language { color: #0878ba !important; background: #e4f4fc; border: 1px solid #c1e4f5; }

.admin-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: #eef3f8;
}
.admin-field {
  gap: 11px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #d3dde8;
  border-radius: 11px;
  box-shadow: 0 3px 9px rgba(31, 55, 81, .045);
  transition: border-color .2s, box-shadow .2s, translate .2s;
}
.admin-field:hover {
  border-color: #a9c9dd;
  box-shadow: 0 7px 16px rgba(31, 74, 110, .08);
  translate: 0 -1px;
}
.admin-field__meta { padding-inline: 2px; }
.admin-field__meta strong { color: #253b52; font-size: .74rem; font-weight: 750; }
.admin-field__meta small { color: #8191a3; }
.admin-field input,
.admin-field textarea {
  border-color: #c6d2df;
  background: #f8fafc;
  color: #172b42;
  box-shadow: inset 0 1px 2px rgba(20, 42, 67, .025);
}
.admin-field input:hover,
.admin-field textarea:hover { border-color: #9fb6ca; }
.admin-field input:focus,
.admin-field textarea:focus {
  border-color: #189bd6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 155, 214, .13);
}
.admin-empty, .admin-loading { color: #667b91; }
.admin-loading .admin-spinner { border-color: #c7d6e2; border-top-color: #0878ba; }

/* Управляемый список брендов на главном экране */
.admin-vendors {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #d4dee9;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 55, 81, .06);
}
.admin-vendors__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid #dbe4ed;
  background: #f8fbfd;
}
.admin-vendors__head h2 { margin: 4px 0 5px; color: #142b43; font: 650 1rem var(--font-display); }
.admin-vendors__head p { max-width: 760px; margin: 0; color: #708298; font-size: .68rem; line-height: 1.5; }
.admin-vendors__add {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid #a9d6eb;
  border-radius: 9px;
  color: #0875ad;
  background: #edf8fd;
  font: 750 .64rem var(--font-heading);
  cursor: pointer;
}
.admin-vendors__add:hover { color: #fff; border-color: #1188c1; background: #1188c1; }
.admin-vendors__list { display: grid; gap: 10px; padding: 16px; background: #eef3f8; }
.admin-vendors__empty { padding: 28px 20px; color: #708298; text-align: center; }
.admin-vendor {
  display: grid;
  grid-template-columns: 72px repeat(3, minmax(145px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d3dde8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(31, 55, 81, .045);
}
.admin-vendor label { display: grid; gap: 6px; min-width: 0; }
.admin-vendor label span { color: #61758a; font: 800 .57rem var(--font-heading); letter-spacing: .08em; }
.admin-vendor input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #c6d2df;
  border-radius: 8px;
  outline: 0;
  color: #172b42;
  background: #f8fafc;
  font: 650 .68rem var(--font-body);
}
.admin-vendor input:focus { border-color: #189bd6; background: #fff; box-shadow: 0 0 0 3px rgba(24, 155, 214, .13); }
.admin-vendor__order { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.admin-vendor__order strong { grid-column: 1 / -1; color: #1c415d; font: 750 .75rem var(--font-heading); text-align: center; }
.admin-vendor__order button {
  width: 32px;
  height: 32px;
  border: 1px solid #d2dee8;
  border-radius: 7px;
  color: #267fae;
  background: #f4f9fc;
  cursor: pointer;
}
.admin-vendor__order button:disabled { color: #adb9c5; background: #f7f8fa; cursor: default; }
.admin-vendor__delete {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #f0c5c1;
  border-radius: 8px;
  color: #b42318;
  background: #fff7f6;
  font: 750 .61rem var(--font-heading);
  cursor: pointer;
}
.admin-vendor__delete:hover, .admin-vendor__delete.is-confirm { color: #fff; border-color: #c7362b; background: #c7362b; }

/* Настройки интеграций */
.telegram-setup-guide { margin-bottom: 18px; overflow: hidden; border: 1px solid #c5dfed; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(31, 86, 126, .07); }
.telegram-setup-guide__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid #dce8ef; background: linear-gradient(135deg, #f5fbff, #edf8fd); }
.telegram-setup-guide__head h2 { margin: 6px 0 5px; color: #122c44; font: 650 1.12rem var(--font-display); }
.telegram-setup-guide__head p { max-width: 720px; margin: 0; color: #62798e; font-size: .7rem; line-height: 1.55; }
.telegram-setup-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 35px; padding: 0 12px; border-radius: 20px; font-size: .62rem; font-weight: 750; }
.telegram-setup-status i { width: 8px; height: 8px; border-radius: 50%; }
.telegram-setup-status.is-ready { color: #087443; border: 1px solid #a9dfc1; background: #effaf4; }
.telegram-setup-status.is-ready i { background: #20a868; box-shadow: 0 0 0 4px rgba(32,168,104,.1); }
.telegram-setup-status.is-missing { color: #9b5c07; border: 1px solid #efd18e; background: #fff9e8; }
.telegram-setup-status.is-missing i { background: #e3a019; }
.telegram-setup-guide__body { display: grid; grid-template-columns: 210px minmax(320px, 1.25fr) minmax(240px, .8fr); gap: 20px; padding: 22px; }
.telegram-qr-card { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 15px; border: 1px solid #d8e4ed; border-radius: 13px; background: #f8fbfd; text-align: center; }
.telegram-qr-card img { display: block; width: min(168px, 100%); height: auto; border: 8px solid #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(28, 63, 91, .09); }
.telegram-qr-card strong { color: #0b78b4; font: 750 .76rem var(--font-heading); }
.telegram-qr-card > span { color: #7b8da0; font-size: .58rem; }
.telegram-qr-card a { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 3px; padding: 0 12px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #20a8e1, #0879b7); font: 750 .62rem var(--font-heading); }
.telegram-qr-card a:hover { filter: brightness(1.06); }
.telegram-setup-steps { counter-reset: telegram-step; display: grid; align-content: start; gap: 0; margin: 0; padding: 0; list-style: none; }
.telegram-setup-steps li { counter-increment: telegram-step; position: relative; display: grid; gap: 4px; min-height: 65px; padding: 5px 0 14px 46px; border-bottom: 1px solid #e6edf3; }
.telegram-setup-steps li + li { padding-top: 14px; }
.telegram-setup-steps li::before { content: counter(telegram-step); position: absolute; top: 5px; left: 0; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #0878b6; background: #e7f5fc; font: 800 .64rem var(--font-heading); }
.telegram-setup-steps li + li::before { top: 14px; }
.telegram-setup-steps b { color: #203a52; font-size: .71rem; }
.telegram-setup-steps span { color: #687e92; font-size: .64rem; line-height: 1.5; }
.telegram-setup-steps code { padding: 2px 5px; border-radius: 5px; color: #0878b6; background: #eaf6fb; font: 700 .61rem Consolas, monospace; }
.telegram-role-flow { display: grid; align-content: start; gap: 8px; padding: 17px; border: 1px solid #d8e3ec; border-radius: 13px; background: #fbfcfe; }
.telegram-role-flow > span { margin-bottom: 2px; color: #7890a4; font: 800 .57rem var(--font-heading); letter-spacing: .09em; text-transform: uppercase; }
.telegram-role-flow > div { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid #dfE8ef; border-radius: 9px; background: #fff; }
.telegram-role-flow b { color: #203b54; font-size: .65rem; }
.telegram-role-flow small { color: #72869a; font-size: .58rem; line-height: 1.45; }
.telegram-role-flow > i { color: #41a7d5; font-size: .72rem; font-style: normal; text-align: center; }
.telegram-role-flow > a { min-height: 38px; display: grid; place-items: center; margin-top: 4px; border: 1px solid #a9d6eb; border-radius: 8px; color: #0875ad; background: #edf8fd; font: 750 .61rem var(--font-heading); }
.telegram-role-flow > a:hover { color: #fff; border-color: #1188c1; background: #1188c1; }
.admin-settings-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.35fr); gap: 18px; }
.admin-settings-card {
  overflow: hidden;
  border: 1px solid #d4dee9;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 55, 81, .06);
}
.admin-settings-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 20px; border-bottom: 1px solid #dde6ee; background: #f8fbfd; }
.admin-settings-card__head h2 { margin: 0 0 3px; color: #142b43; font: 650 1rem var(--font-display); }
.admin-settings-card__head p { margin: 0; color: #708298; font-size: .68rem; line-height: 1.45; }
.admin-channel-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #fff; font: 800 .73rem var(--font-heading); }
.admin-channel-icon.is-telegram { background: linear-gradient(145deg, #2ab3ef, #1184c3); }
.admin-channel-icon.is-email { background: linear-gradient(145deg, #5378fa, #3653c7); }
.admin-switch { display: grid; grid-template-columns: 42px; justify-items: center; gap: 4px; cursor: pointer; }
.admin-switch input { position: absolute; opacity: 0; pointer-events: none; }
.admin-switch > span { position: relative; width: 42px; height: 23px; border-radius: 20px; background: #cbd6e1; transition: .2s; }
.admin-switch > span::after { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(34, 55, 78, .25); transition: .2s; }
.admin-switch input:checked + span { background: #149edc; }
.admin-switch input:checked + span::after { translate: 19px 0; }
.admin-switch b { color: #718399; font-size: .56rem; font-weight: 650; }
.admin-settings-fields { display: grid; gap: 15px; padding: 20px; }
.admin-settings-fields.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-settings-fields .wide { grid-column: 1 / -1; }
.admin-settings-fields > label:not(.admin-checkbox-line) { display: grid; gap: 7px; color: #334b63; font-size: .69rem; font-weight: 750; }
.admin-settings-fields input[type='text'],
.admin-settings-fields input[type='number'] { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #c8d4e0; border-radius: 9px; outline: 0; background: #f8fafc; color: #182e45; font: 500 .76rem var(--font-body); }
.admin-settings-fields input:focus { border-color: #189bd6; background: #fff; box-shadow: 0 0 0 3px rgba(24, 155, 214, .12); }
.admin-settings-fields small { color: #8292a4; font-size: .6rem; font-weight: 500; }
.admin-checkbox-line { display: flex; align-items: center; gap: 9px; color: #4d637a; font-size: .69rem; }
.admin-checkbox-line input { width: 16px; height: 16px; accent-color: #1197d4; }
.admin-secret-state { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 9px; font-size: .65rem; }
.admin-secret-state i { width: 8px; height: 8px; border-radius: 50%; }
.admin-secret-state.is-ready { color: #087443; border: 1px solid #b8e2cb; background: #effaf4; }
.admin-secret-state.is-ready i { background: #20a868; box-shadow: 0 0 0 4px rgba(32,168,104,.1); }
.admin-secret-state.is-missing { color: #9b5c07; border: 1px solid #f1d59c; background: #fffaed; }
.admin-secret-state.is-missing i { background: #e6a11d; box-shadow: 0 0 0 4px rgba(230,161,29,.1); }
.admin-info-panel { margin-top: 18px; padding: 18px 20px; border: 1px solid #cde1ed; border-radius: 13px; background: #f5fbfe; }
.admin-info-panel strong { color: #1b405c; font-size: .73rem; }
.admin-info-panel p { margin: 5px 0 0; color: #627a8e; font-size: .68rem; line-height: 1.55; }

/* Аналитика */
.analytics-period { display: flex; gap: 4px; padding: 4px; border: 1px solid #d5e0e9; border-radius: 10px; background: #e9eff5; }
.analytics-period button { height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #62768b; font: 700 .67rem var(--font-body); cursor: pointer; }
.analytics-period button.is-active { color: #0872ad; border-color: #bddbeb; background: #fff; box-shadow: 0 3px 10px rgba(31,55,81,.1); }
.analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.analytics-kpis article { position: relative; overflow: hidden; min-height: 135px; display: grid; align-content: center; gap: 6px; padding: 20px; border: 1px solid #d6e0ea; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(31,55,81,.05); }
.analytics-kpis article::after { content: ''; position: absolute; width: 70px; height: 70px; right: -26px; top: -26px; border-radius: 50%; background: #e8f6fd; }
.analytics-kpis article.is-accent { color: #fff; border-color: #087bbb; background: linear-gradient(145deg, #159edc, #0871b1); }
.analytics-kpis article.is-accent::after { background: rgba(255,255,255,.13); }
.analytics-kpis span { color: #687c91; font-size: .68rem; }
.analytics-kpis strong { color: #142a42; font: 600 2rem var(--font-display); letter-spacing: -.03em; }
.analytics-kpis small { color: #8191a3; font-size: .6rem; }
.analytics-kpis .is-accent span, .analytics-kpis .is-accent small, .analytics-kpis .is-accent strong { color: #fff; }
.analytics-kpis small.trend-positive { color: #138b58; }
.analytics-kpis small.trend-negative { color: #bf3f36; }
.analytics-chart-card, .analytics-list-card { border: 1px solid #d6e0ea; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(31,55,81,.05); }
.analytics-chart-card { padding: 21px 22px 16px; margin-bottom: 16px; }
.analytics-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.analytics-card-head > div:first-child { display: grid; gap: 3px; }
.analytics-card-head span { color: #7b8da0; font-size: .59rem; letter-spacing: .08em; text-transform: uppercase; }
.analytics-card-head h2 { margin: 0; color: #1b3047; font: 650 .9rem var(--font-display); }
.analytics-legend { display: flex; align-items: center; gap: 6px; color: #75889c; font-size: .6rem; }
.analytics-legend i { width: 15px; height: 3px; border-radius: 3px; background: #159ddb; }
.analytics-legend i.is-visitors { margin-left: 8px; background: #5b7cfa; }
.analytics-line-chart svg { display: block; width: 100%; height: 250px; overflow: visible; }
.analytics-grid-line { stroke: #e8eef4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.analytics-line.is-views { stroke: #159ddb; }
.analytics-line.is-visitors { stroke: #5b7cfa; stroke-width: 2; }
.analytics-axis { display: flex; justify-content: space-between; color: #8b9aab; font-size: .57rem; }
.analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.analytics-list-card { min-height: 240px; padding: 20px; }
.analytics-list-card.span-two { grid-column: span 2; }
.analytics-bars { display: grid; gap: 12px; }
.analytics-bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 38px; align-items: center; gap: 12px; }
.analytics-bar-row > span { overflow: hidden; color: #51677e; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-bar-row > div { overflow: hidden; height: 7px; border-radius: 8px; background: #eaf0f5; }
.analytics-bar-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #169dd9, #55c3ea); }
.analytics-bar-row b { color: #2f4962; font-size: .66rem; text-align: right; }
.analytics-donut-block { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 22px; min-height: 150px; }
.analytics-donut { width: 105px; height: 105px; border-radius: 50%; position: relative; }
.analytics-donut::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: #fff; }
.analytics-compact-list, .analytics-ranked-list { display: grid; gap: 10px; }
.analytics-compact-list > div, .analytics-ranked-list > div { display: flex; align-items: center; gap: 8px; min-height: 25px; border-bottom: 1px solid #edf1f5; }
.analytics-compact-list i { width: 8px; height: 8px; border-radius: 50%; background: #129ddd; }
.analytics-compact-list i.is-mobile { background: #5b7cfa; }
.analytics-compact-list i.is-tablet { background: #56c6a9; }
.analytics-compact-list span, .analytics-ranked-list span { overflow: hidden; color: #62768b; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-compact-list b, .analytics-ranked-list b { margin-left: auto; color: #263f58; font-size: .65rem; }
.analytics-ranked-list b.is-ok { color: #128454; }
.analytics-split-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.analytics-split-list > div:first-child { border-right: 1px solid #e6edf3; padding-right: 20px; }
.analytics-split-list p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 0; color: #61758a; font-size: .62rem; }
.analytics-split-list b { color: #29445f; }
.analytics-statuses { display: flex; flex-wrap: wrap; gap: 9px; }
.analytics-statuses > div { display: flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid #dbe5ed; border-radius: 9px; background: #f8fafc; color: #566c82; font-size: .62rem; }
.analytics-statuses i { width: 7px; height: 7px; border-radius: 50%; background: #199ed9; }
.analytics-statuses b { color: #213b54; }
.analytics-empty { color: #8797a8; font-size: .66rem; }
.analytics-privacy-note { margin: 17px 2px 0; color: #778a9e; font-size: .61rem; line-height: 1.5; }

/* Команда */
.team-access-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: stretch; gap: 10px; margin-bottom: 16px; padding: 14px; border: 1px solid #bcddec; border-radius: 14px; background: linear-gradient(135deg, #eef9fe, #f8fcfe); }
.team-access-guide > div { min-height: 68px; display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 9px; background: rgba(255,255,255,.72); }
.team-access-guide > div > span { flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #0878b6; background: #dff2fb; font: 800 .58rem var(--font-heading); }
.team-access-guide p { display: grid; gap: 3px; margin: 0; color: #667d92; font-size: .59rem; line-height: 1.45; }
.team-access-guide p b { color: #203c54; font-size: .64rem; }
.team-access-guide > a { min-width: 160px; display: grid; place-items: center; padding: 0 15px; border: 1px solid #9fd2e8; border-radius: 9px; color: #0875ad; background: #fff; font: 750 .61rem var(--font-heading); text-align: center; }
.team-access-guide > a:hover { color: #fff; border-color: #1289c2; background: #1289c2; }
.team-access-guide .is-manager-note { grid-column: 1 / -1; min-height: 58px; align-items: center; }
.team-role-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.team-role-guide article { display: flex; gap: 13px; min-height: 105px; padding: 18px; border: 1px solid #d8e2eb; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(31,55,81,.04); }
.team-role-guide i { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #087bbb; background: #e7f5fc; font: 750 .62rem var(--font-heading); }
.team-role-guide div { display: grid; align-content: start; gap: 6px; }
.team-role-guide strong { color: #1f374f; font-size: .72rem; }
.team-role-guide span { color: #73869a; font-size: .63rem; line-height: 1.5; }
.team-create-card, .team-table-card { margin-bottom: 16px; padding: 20px; border: 1px solid #d5dfe9; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(31,55,81,.05); }
.team-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.team-create-form > label { display: grid; gap: 7px; color: #344d65; font-size: .68rem; font-weight: 700; }
.team-create-form .wide { grid-column: 1 / -1; }
.team-create-form input, .team-create-form select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #c8d4df; border-radius: 9px; outline: 0; background: #f8fafc; color: #183047; font: 500 .75rem var(--font-body); }
.team-create-form input:focus, .team-create-form select:focus { border-color: #189bd6; background: #fff; box-shadow: 0 0 0 3px rgba(24,155,214,.12); }
.team-create-form small { color: #8393a5; font-size: .59rem; font-weight: 500; }
.team-form-readonly { min-height: 44px; display: grid; align-content: center; gap: 2px; padding: 7px 12px; border: 1px solid #d3dee8; border-radius: 9px; background: #f4f8fb; }
.team-form-readonly b { color: #29465f; font-size: .7rem; }
.team-form-readonly small { color: #768a9e; line-height: 1.35; }
.team-table-card .analytics-card-head > b { color: #087bbb; font: 600 1.2rem var(--font-display); }
.team-list { display: grid; gap: 1px; border: 1px solid #dbe4ec; border-radius: 11px; background: #dbe4ec; overflow: hidden; }
.team-list article { display: grid; grid-template-columns: auto minmax(180px, 1.35fr) repeat(3, minmax(110px, 1fr)) auto auto; align-items: center; gap: 15px; min-height: 74px; padding: 12px 15px; background: #fff; }
.team-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #087bbb; background: #e7f5fc; font: 800 .67rem var(--font-heading); }
.team-person, .team-list article > div:not(.team-avatar):not(.team-state) { display: grid; gap: 3px; }
.team-person strong { color: #213a52; font-size: .7rem; }
.team-person span, .team-list article > div > span { overflow: hidden; color: #6f8296; font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.team-list small { color: #94a1af; font-size: .53rem; text-transform: uppercase; letter-spacing: .07em; }
.team-role { width: fit-content; padding: 4px 7px; border-radius: 6px; background: #edf3f7; }
.team-role.is-owner { color: #7251ae !important; background: #f1ebfb; }
.team-role.is-manager { color: #0876ad !important; background: #e7f5fc; }
.team-linked { color: #138556 !important; }
.team-state { display: flex; align-items: center; gap: 6px; color: #667b8f; font-size: .59rem; }
.team-state i { width: 7px; height: 7px; border-radius: 50%; background: #9aa8b6; }
.team-state.is-active i { background: #1ba568; box-shadow: 0 0 0 4px rgba(27,165,104,.1); }
.team-link-button { min-height: 32px; padding: 0 9px; border: 1px solid #b9ddec; border-radius: 7px; background: #edf8fd; color: #0876ad; font: 700 .56rem var(--font-body); cursor: pointer; }
.team-link-button:hover { color: #fff; border-color: #138cc5; background: #138cc5; }
.telegram-link-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 17px 19px; border: 1px solid #9fd5ee; border-radius: 13px; background: linear-gradient(135deg, #effaff, #f8fcff); box-shadow: 0 7px 18px rgba(19,126,180,.08); }
.telegram-link-panel > div { display: grid; gap: 5px; }
.telegram-link-panel span { color: #577087; font-size: .6rem; }
.telegram-link-panel code { color: #0875ad; font: 800 1.2rem Consolas, monospace; letter-spacing: .1em; }
.telegram-link-panel p { margin: 0; color: #60778d; font-size: .65rem; line-height: 1.5; }
.telegram-link-panel a { color: #087bbb; font-weight: 750; }
.telegram-link-panel button { border: 0; background: transparent; color: #6d8295; font: 650 .61rem var(--font-body); cursor: pointer; }

/* Учётная запись */
.account-manage-grid { display: grid; grid-template-columns: 235px minmax(0, 760px); align-items: start; gap: 18px; }
.account-manage-nav, .account-manage-content { border: 1px solid #d6e0e9; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(31,55,81,.05); }
.account-manage-nav { padding: 16px; }
.account-manage-nav > strong { display: block; margin: 2px 7px 12px; color: #74869a; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; }
.account-manage-nav .nav { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.account-manage-nav .nav-link { display: flex; align-items: center; min-height: 41px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; color: #536a80; font-size: .68rem; font-weight: 700; }
.account-manage-nav .nav-link:hover { color: #0877b5; border-color: #d8eaf3; background: #f2f9fc; }
.account-manage-nav .nav-link.active { color: #086da7; border-color: #bfe1f1; background: #eaf7fd; box-shadow: inset 3px 0 #159bd7; }
.account-manage-content { min-height: 360px; padding: clamp(22px, 4vw, 34px); color: #526a80; }
.account-manage-content h2, .account-manage-content h3 { margin-top: 0; color: #17324b; font: 650 1.25rem var(--font-display); }
.account-section-lead { max-width: 560px; margin: -8px 0 23px; color: #6b7f93; font-size: .68rem; line-height: 1.55; }
.account-manage-content .row { display: block; }
.account-manage-content .col-xl-6 { width: min(520px, 100%); }
.account-manage-content .form-floating { display: grid; gap: 7px; margin-bottom: 15px; }
.account-manage-content .form-floating > label { grid-row: 1; position: static; width: auto; height: auto; padding: 0; transform: none; }
.account-manage-content .form-floating > .form-control,
.account-manage-content .form-floating > .input-group { grid-row: 2; }
.account-manage-content label { color: #435b72; font-size: .69rem; font-weight: 700; }
.account-manage-content .form-control { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #cbd7e2; border-radius: 9px; outline: 0; background: #f8fafc; color: #173047; font: 500 .73rem var(--font-body); }
.account-manage-content .form-control:disabled { color: #64788c; background: #edf2f6; }
.account-manage-content .form-control:focus { border-color: #159bd7; background: #fff; box-shadow: 0 0 0 3px rgba(21,155,215,.11); }
.account-manage-content .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font: 750 .68rem var(--font-heading); cursor: pointer; }
.account-manage-content .w-100 { width: 100%; }
.account-manage-content .btn-primary { color: #fff; border-color: #087cbc; background: linear-gradient(135deg, #159fde, #0871b2); }
.account-manage-content .btn-danger { color: #fff; border-color: #c64138; background: #d94b42; }

/* Заявки */
.lead-board-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.lead-board-summary article { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 16px 18px; border: 1px solid #d8e2eb; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(31,55,81,.04); }
.lead-board-summary span { color: #6d8094; font-size: .66rem; }
.lead-board-summary strong { color: #173049; font: 600 1.35rem var(--font-display); }
.lead-board-empty { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px solid #d7e1ea; border-radius: 15px; background: #fff; text-align: center; }
.lead-board-empty > div { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; color: #128453; background: #e9f8f1; font-size: 1.1rem; }
.lead-board-empty h2 { margin: 0; color: #203950; font: 600 1rem var(--font-display); }
.lead-board-empty p { margin: 0; color: #788b9e; font-size: .68rem; }
.lead-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.lead-card { position: relative; overflow: hidden; padding: 19px; border: 1px solid #d5dfe9; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(31,55,81,.05); }
.lead-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: #1aa0db; }
.lead-card.is-high::before { background: #e49b24; }
.lead-card.is-urgent::before { background: #dd544b; }
.lead-card__top { display: flex; justify-content: space-between; gap: 15px; }
.lead-card__top > div { display: flex; gap: 9px; align-items: center; }
.lead-card__top span { color: #1781b9; font-size: .61rem; font-weight: 800; }
.lead-card__top small { color: #98a5b2; font-size: .55rem; }
.lead-card__top > b { padding: 4px 7px; border-radius: 6px; color: #587188; background: #eef4f7; font-size: .55rem; }
.lead-card__person { display: flex; align-items: center; gap: 11px; margin-top: 17px; }
.lead-card__avatar { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #087bbb; background: #e5f4fb; font: 800 .72rem var(--font-heading); }
.lead-card__person h2 { margin: 0; color: #1c354e; font: 650 .86rem var(--font-display); }
.lead-card__person p { margin: 3px 0 0; color: #7a8c9e; font-size: .61rem; }
.lead-card__contacts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 13px; }
.lead-card__contacts a { color: #167cb2; font-size: .62rem; }
.lead-card__message { min-height: 48px; margin: 14px 0; padding: 12px; border-radius: 9px; color: #536a80; background: #f6f9fb; font-size: .64rem; line-height: 1.55; }
.lead-card__controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 9px; }
.lead-card__controls label { display: grid; gap: 5px; color: #748699; font-size: .56rem; }
.lead-card__controls select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid #ccd7e1; border-radius: 8px; outline: 0; background: #fff; color: #263f56; font: 500 .63rem var(--font-body); }
.lead-card__controls select:focus { border-color: #159bd7; box-shadow: 0 0 0 3px rgba(21,155,215,.1); }
.lead-card__controls button { height: 38px; padding: 0 12px; border: 1px solid #1789c2; border-radius: 8px; background: #e9f6fc; color: #0876ae; font: 750 .6rem var(--font-heading); cursor: pointer; }
.lead-card__controls button:hover { color: #fff; background: #118bc5; }

@media (max-width: 1150px) {
  .telegram-setup-guide__body { grid-template-columns: 210px minmax(0, 1fr); }
  .telegram-role-flow { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .telegram-role-flow > span, .telegram-role-flow > a { grid-column: 1 / -1; }
  .telegram-role-flow > i { display: none; }
  .admin-settings-grid { grid-template-columns: 1fr; }
  .analytics-kpis { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-access-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-access-guide > a { grid-column: 1 / -1; min-height: 42px; }
  .team-list article { grid-template-columns: auto minmax(180px, 1fr) repeat(2, minmax(110px, 1fr)); }
  .team-list article > div:nth-child(5) { display: none; }
  .lead-board { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 12px; }
  .admin-brand { justify-content: center; padding-inline: 0; }
  .admin-brand span, .admin-nav a:not(.is-active) span, .admin-nav a { font-size: 0; }
  .admin-nav a { justify-content: center; padding: 0; }
  .admin-nav svg { width: 22px; height: 22px; }
  .admin-sidebar__note { display: none; }
  .admin-logout { padding-top: 10px; }
  .admin-logout button { justify-content: center; padding: 0; }
  .admin-logout button span { display: none; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: auto; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; }
  .admin-brand { padding: 0; }
  .admin-brand img { width: 36px; height: 36px; }
  .admin-nav { margin-left: auto; grid-auto-flow: column; }
  .admin-nav a { width: 42px; min-height: 42px; }
  .admin-logout { flex: 0 0 auto; margin: 0 0 0 8px; padding: 0; border: 0; }
  .admin-logout button { width: 42px; min-height: 42px; }
  .admin-page { padding: 24px 16px 42px; }
  .admin-topbar { display: grid; }
  .admin-save { width: 100%; justify-content: center; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-language-tabs button { flex: 1; }
  .admin-language-tabs button span { display: none; }
  .admin-workspace { grid-template-columns: 1fr; }
  .admin-sections { position: static; display: flex; overflow-x: auto; }
  .admin-sections button { flex: 0 0 auto; }
  .admin-fields { grid-template-columns: 1fr; }
  .admin-vendors__head { display: grid; }
  .admin-vendors__add { width: 100%; }
  .admin-vendor { grid-template-columns: 64px 1fr; align-items: end; }
  .admin-vendor label { grid-column: 2; }
  .admin-vendor__order { grid-row: 1 / span 3; align-self: start; }
  .admin-vendor__delete { grid-column: 2; }
  .telegram-setup-guide__head { display: grid; padding: 19px; }
  .telegram-setup-status { justify-self: start; }
  .telegram-setup-guide__body { grid-template-columns: 1fr; padding: 16px; }
  .telegram-qr-card { width: min(260px, 100%); justify-self: center; }
  .telegram-role-flow { grid-column: auto; grid-template-columns: 1fr; }
  .telegram-role-flow > span, .telegram-role-flow > a { grid-column: auto; }
  .admin-settings-card__head { grid-template-columns: auto minmax(0, 1fr); }
  .admin-settings-card__head .admin-switch { grid-column: 1 / -1; justify-self: start; grid-template-columns: 42px auto; align-items: center; }
  .admin-settings-fields.two-columns { grid-template-columns: 1fr; }
  .admin-settings-fields .wide { grid-column: auto; }
  .analytics-period { width: 100%; }
  .analytics-period button { flex: 1; }
  .analytics-kpis { grid-template-columns: 1fr 1fr; }
  .analytics-kpis article { min-height: 116px; padding: 15px; }
  .analytics-kpis strong { font-size: 1.55rem; }
  .analytics-chart-card { padding-inline: 14px; }
  .analytics-line-chart svg { height: 190px; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-list-card.span-two { grid-column: auto; }
  .analytics-bar-row { grid-template-columns: minmax(90px, .9fr) 1.4fr 30px; gap: 8px; }
  .team-role-guide { grid-template-columns: 1fr; }
  .team-access-guide { grid-template-columns: 1fr; }
  .team-access-guide > a { grid-column: auto; min-height: 44px; }
  .telegram-link-panel { grid-template-columns: 1fr; }
  .account-manage-grid { grid-template-columns: 1fr; }
  .account-manage-nav .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-manage-nav .nav-link { min-height: 38px; padding-inline: 9px; }
  .team-create-form { grid-template-columns: 1fr; }
  .team-create-form .wide { grid-column: auto; }
  .team-list article { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .team-list article > div:nth-child(3), .team-list article > div:nth-child(5) { display: none; }
  .lead-board-summary { grid-template-columns: repeat(2, 1fr); }
  .lead-card__controls { grid-template-columns: 1fr; }
}

/* Страница входа отделена от публичного сайта и не показывает обычную навигацию. */
.admin-access {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 28px 18px;
  background:
    linear-gradient(115deg, rgba(4, 10, 19, .96), rgba(4, 14, 27, .85)),
    url('/img/inner-industrial-v1.webp') center / cover;
  color: #eaf4ff;
}
.admin-access__brand { display: flex; align-items: center; gap: 13px; color: #fff; }
.admin-access__brand img { filter: drop-shadow(0 0 20px rgba(41, 183, 255, .28)); }
.admin-access__brand span { display: grid; gap: 3px; }
.admin-access__brand strong { font: 600 1.08rem var(--font-display); letter-spacing: .13em; text-transform: none; }
.admin-access__brand small { color: #8195b0; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.admin-access__note { color: #536b89; font-size: .64rem; letter-spacing: .04em; }
.admin-login-card { width: min(440px, 100%); padding: clamp(26px, 5vw, 42px); border: 1px solid rgba(111, 171, 222, .2); border-radius: 18px; background: rgba(7, 18, 32, .88); box-shadow: 0 28px 90px rgba(0,0,0,.42); backdrop-filter: blur(18px); }
.admin-login-card h1 { margin: 7px 0 9px; color: #f5f9ff; font: 500 clamp(1.65rem, 5vw, 2.2rem)/1.1 var(--font-display); letter-spacing: -.04em; }
.admin-login-card > p { color: #8295af; font-size: .76rem; line-height: 1.65; }
.admin-login-form { display: grid; gap: 16px; margin-top: 28px; }
.admin-login-form > label:not(.admin-remember) { display: grid; gap: 7px; color: #a9bad0; font-size: .68rem; font-weight: 650; }
.admin-login-form input[type='text'], .admin-login-form input[type='password'] { width: 100%; height: 48px; padding: 0 13px; border: 1px solid rgba(113, 154, 201, .23); border-radius: 9px; outline: 0; background: #071320; color: #f0f7ff; font: 500 .8rem var(--font-body); }
.admin-login-form input:focus { border-color: rgba(57, 188, 255, .65); box-shadow: 0 0 0 3px rgba(34, 164, 234, .09); }
.admin-remember { display: flex; align-items: center; gap: 9px; color: #7e93af; font-size: .69rem; }
.admin-remember input { accent-color: #159bdc; }
.admin-login-form > button { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 0 17px; border: 1px solid rgba(93, 206, 255, .45); border-radius: 9px; background: linear-gradient(135deg, #0d8ed8, #115da6); color: #fff; font: 750 .75rem var(--font-heading); cursor: pointer; }
.admin-login-back { display: inline-block; margin-top: 22px; color: #6f85a2; font-size: .68rem; }
.admin-login-back:hover { color: #55c7ff; }
.admin-validation { color: #fca5a5; font-size: .66rem; }

.admin-login-links { display: grid; gap: 12px; margin-top: 22px; }
.admin-login-links .admin-login-back { margin-top: 0; }
.admin-register-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid rgba(76, 185, 236, .22); border-radius: 9px; color: #9cdcff; background: rgba(21, 125, 177, .09); font: 700 .67rem var(--font-heading); }
.admin-register-link:hover { color: #fff; border-color: rgba(76, 200, 255, .48); background: rgba(21, 125, 177, .18); }
.admin-register-card { width: min(650px, 100%); }
.admin-register-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-register-form .registration-wide { grid-column: 1 / -1; }
.registration-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 25px 0 18px; }
.registration-progress span { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 9px 11px; border: 1px solid rgba(110, 154, 199, .18); border-radius: 9px; color: #7188a5; font-size: .63rem; line-height: 1.35; }
.registration-progress b { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #73d3ff; background: rgba(31, 158, 218, .14); }
.registration-progress .is-complete, .registration-progress .is-active { color: #cce9fa; border-color: rgba(70, 183, 234, .3); }
.registration-telegram-button { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 17px; border: 1px solid rgba(93, 206, 255, .45); border-radius: 9px; color: #fff; background: linear-gradient(135deg, #159edf, #1268b2); font: 750 .74rem var(--font-heading); }
.registration-telegram-button svg { width: 22px; height: 22px; fill: currentColor; }
.registration-telegram-button span { flex: 1; }
.registration-telegram-button:hover { filter: brightness(1.08); }
.registration-expiry, .registration-security { margin: 15px 0 0; color: #7086a2 !important; font-size: .64rem !important; }
.registration-consent { display: grid !important; grid-template-columns: auto 1fr; align-items: start; gap: 10px !important; color: #8298b4 !important; font-weight: 500 !important; line-height: 1.5; }
.registration-consent input { margin-top: 3px; accent-color: #159bdc; }
.team-link-placeholder { color: #8a9aab; font-size: .55rem; }

@media (max-width: 700px) {
  .admin-register-form { grid-template-columns: 1fr; }
  .admin-register-form .registration-wide { grid-column: auto; }
  .registration-progress { grid-template-columns: 1fr; }
}
