:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #10231a;
  --ink-2: #3d5348;
  --ink-3: #7b9188;
  --line: #e3ebe6;
  --brand: #1f8a4c;
  --brand-2: #2abb2f;
  --brand-dark: #166b3a;
  --brand-soft: #e8f5ed;
  --accent: #f5a623;
  --danger: #d64545;
  --danger-soft: #fdecec;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 35, 26, 0.06), 0 2px 8px rgba(16, 35, 26, 0.04);
  --shadow: 0 8px 30px rgba(16, 35, 26, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 35, 26, 0.14);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(42, 187, 47, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(31, 138, 76, 0.1), transparent 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select { font-family: inherit; font-size: inherit; }

/* ---------------------------- Layout ---------------------------- */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand__logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 20px rgba(31, 138, 76, 0.35);
  letter-spacing: -0.5px;
}

.brand__title { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.15; }
.brand__sub { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot.on { background: var(--brand-2); box-shadow: 0 0 0 4px rgba(42,187,47,.15); animation: pulse 2s infinite; }
.dot.busy { background: var(--accent); box-shadow: 0 0 0 4px rgba(245,166,35,.18); animation: pulse 1.2s infinite; }
.dot.err { background: var(--danger); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* ---------------------------- Card ---------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.card__title { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.card__body { padding: 22px; }

/* ---------------------------- Форма ---------------------------- */

.layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.label {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 8px; letter-spacing: -0.1px;
}
.label small { font-weight: 500; color: var(--ink-3); font-size: 12px; }

.input, .select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-weight: 500;
}
.input::placeholder { color: #a9b9b1; font-weight: 500; }
.input:focus, .select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.12);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 700; font-size: 14.5px;
  cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary {
  width: 100%;
  background: linear-gradient(160deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 8px 22px rgba(31, 138, 76, .28);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 12px 28px rgba(31, 138, 76, .36); }

.btn--ghost {
  background: var(--surface); border-color: var(--line); color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }

.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: #f7cfcf; }
.btn--danger:hover:not(:disabled) { background: #fbdcdc; }

.btn--sm { padding: 9px 14px; font-size: 13px; border-radius: 10px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ---------------------------- Прогресс ---------------------------- */

.steps { display: flex; flex-direction: column; gap: 2px; }

.step {
  display: flex; gap: 14px;
  padding: 14px 0;
  position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 42px; bottom: -2px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.step.done:not(:last-child)::after { background: var(--brand-2); }

.step__icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 2px solid var(--line);
  font-size: 13px; font-weight: 800; color: var(--ink-3);
  position: relative; z-index: 1;
  transition: all .25s;
}
.step.active .step__icon {
  border-color: var(--accent); color: var(--accent);
  background: #fff8ec;
  box-shadow: 0 0 0 5px rgba(245, 166, 35, .13);
}
.step.done .step__icon { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.step.error .step__icon { background: var(--danger); border-color: var(--danger); color: #fff; }
.step.canceled .step__icon { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.step.done .step__title { color: var(--brand-dark); }
/* Галочка завершения — лёгкий «поп» в момент смены состояния */
.step.done .step__icon svg, .step.done .step__icon { animation: step-pop .32s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes step-pop { from { transform: scale(.75); } to { transform: scale(1); } }

.step__body { flex: 1; min-width: 0; }
.step__title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.step__desc { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.bar {
  height: 8px; border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden; margin-top: 10px;
  border: 1px solid var(--line);
}
.bar__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width .4s ease;
}
.bar__fill.indeterminate {
  width: 35% !important;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { margin-left: -35% } 100% { margin-left: 100% } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.stat__value { font-size: 24px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; }
.stat__label { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }

.log {
  background: #10231a;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  max-height: 190px;
  overflow-y: auto;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
  color: #b8d4c4;
}
.log__line { white-space: pre-wrap; word-break: break-word; }
.log__time { color: #5d7d6c; margin-right: 8px; }

/* ---------------------------- Таблица ---------------------------- */

.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.toolbar .spacer { flex: 1; }

.search-mini {
  padding: 9px 13px 9px 34px;
  border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b9188' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
  outline: none; min-width: 220px; font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.search-mini:focus { border-color: var(--brand); background-color: #fff; box-shadow: 0 0 0 4px rgba(31,138,76,.1); }

.table-wrap { overflow: auto; max-height: 620px; max-width: 100%; }
table { min-width: 100%; }

table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }

thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  text-align: left;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:hover { color: var(--brand-dark); }
thead th .sort { opacity: .45; font-size: 10px; margin-left: 4px; }
thead th.sorted { color: var(--brand); }

tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.new-row { animation: flash 1.6s ease; }
@keyframes flash { from { background: #e6f7ec } to { background: transparent } }

.cell-name { font-weight: 700; color: var(--ink); }
.cell-name a { color: inherit; text-decoration: none; }
.cell-name a:hover { color: var(--brand); }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-dark);
}
.tag--social { background: #eef2ff; color: #3b4fa8; margin: 0 4px 4px 0; }
.tag--warn { background: var(--danger-soft); color: var(--danger); }

.mono { font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; letter-spacing: -0.2px; }

.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--brand); font-weight: 700; font-size: 13px;
  text-decoration: underline; text-underline-offset: 2px;
}

.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); }
.rating .star { color: var(--accent); }

/* ---------------------------- Пустые состояния ---------------------------- */

.empty {
  padding: 70px 30px; text-align: center;
}
.empty__icon { font-size: 46px; margin-bottom: 14px; opacity: .85; }
.empty__title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.empty__text { color: var(--ink-3); font-size: 14px; max-width: 420px; margin: 0 auto; font-weight: 500; }

.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; font-weight: 500; }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--danger-soft); color: #a33;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid #f7cfcf;
}

.alert--info { background: #eef6ff; color: #2b5d92; border-color: #d3e6fa; }

/* ---------------------------- Модалка ---------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 25, 18, .45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: min(720px, 100%);
  max-height: 85vh;
  display: flex; flex-direction: column;
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }

.modal__head {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 14px; align-items: flex-start;
}
.modal__title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.3; }
.modal__sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.modal__body { padding: 18px 24px 24px; overflow-y: auto; overflow-x: hidden; }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; word-break: break-word; }

.close-x {
  margin-left: auto; border: none; background: var(--surface-2);
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  font-size: 17px; color: var(--ink-3); flex-shrink: 0;
}
.close-x:hover { background: var(--danger-soft); color: var(--danger); }

.contact-group { margin-bottom: 14px; }
.contact-group__title { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.contact-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.contact-line a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.fade-enter-active, .fade-leave-active { transition: opacity .18s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Мобильные устройства */
@media (max-width: 720px) {
  .shell { padding: 18px 14px 60px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .card__body { padding: 16px; }
  .card__head { padding: 14px 16px; }
  .stats { gap: 8px; }
  .stat { padding: 11px 12px; }
  .stat__value { font-size: 20px; }
  .toolbar { padding: 12px 14px; }
  .search-mini { min-width: 100%; order: 5; }
  .modal-backdrop { padding: 10px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .row { flex-direction: column; }
}



/* ================================================================
   Шапка с меню, страницы, новые компоненты
   ================================================================ */

/* ---------- Шапка ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand__logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -0.5px;
  box-shadow: 0 6px 16px rgba(31, 138, 76, .3);
}
.brand__text { line-height: 1.2; }
.brand__title { font-size: 15.5px; font-weight: 800; letter-spacing: -0.3px; }
.brand__sub { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px;
  border: none; background: transparent;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.nav__item:hover { background: var(--surface-2); color: var(--ink); }
.nav__item--active { background: var(--brand-soft); color: var(--brand-dark); }
.nav__icon { font-size: 14px; opacity: .8; }

.hdr__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.credits {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1.5px solid #d8ecdf; background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 800; font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.credits:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(31,138,76,.18); }
.credits__icon { font-size: 11px; opacity: .8; }
.credits__lbl { font-weight: 600; color: #4a7a5f; font-size: 12px; }

.user-wrap { position: relative; }
.user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; transition: all .15s; font-weight: 600; font-size: 13px;
}
.user-pill:hover { border-color: var(--brand); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #4dc45a, var(--brand));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.avatar--lg { width: 54px; height: 54px; font-size: 22px; }
.user-pill__email { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.user-pill__chev { font-size: 10px; color: var(--ink-3); transition: transform .15s; }
.user-pill__chev.up { transform: rotate(180deg); }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 268px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px;
  animation: pop .16s cubic-bezier(.2,.9,.3,1.2);
  z-index: 60;
}
.user-menu__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu__email { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.user-menu__item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: none;
  border-radius: 9px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.user-menu__item:hover { background: var(--surface-2); color: var(--ink); }
.user-menu__item--danger { color: var(--danger); }
.user-menu__item--danger:hover { background: var(--danger-soft); }
.user-menu__sep { height: 1px; background: var(--line); margin: 6px 4px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700;
  background: #eef2ff; color: #3b4fa8;
}
.badge--credits { background: var(--brand-soft); color: var(--brand-dark); }
.badge--muted { background: var(--surface-2); color: var(--ink-3); }

.btn-hdr {
  padding: 9px 16px; border-radius: 10px;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s;
}
.btn-hdr--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-hdr--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-hdr--primary { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 4px 14px rgba(31,138,76,.28); }
.btn-hdr--primary:hover { box-shadow: 0 6px 18px rgba(31,138,76,.38); }

.burger { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; padding: 9px; }
.burger span { display: block; height: 2px; background: var(--ink-2); border-radius: 2px; margin: 4px 0; }

/* ---------- Оболочка и страницы ---------- */
.shell { max-width: 1280px; margin: 0 auto; padding: 26px 24px 80px; }
.shell--auth { display: grid; place-items: center; min-height: calc(100vh - 40px); padding: 40px 24px; }

.page-head {
  display: flex; align-items: flex-start; gap: 18px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.page-title { font-size: 25px; font-weight: 800; letter-spacing: -0.7px; margin: 0 0 4px; }
.page-sub { font-size: 14px; color: var(--ink-3); margin: 0; max-width: 640px; font-weight: 500; }
.page-head > .btn, .page-head > button { margin-left: auto; }

.muted { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.cell-link { color: var(--brand-dark); text-decoration: none; font-weight: 600; }
.cell-link:hover { text-decoration: underline; }

.boot { display: grid; place-items: center; gap: 14px; padding: 90px 0; }
.boot__spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot__text { color: var(--ink-3); font-weight: 600; font-size: 14px; }

/* ---------- Тарифная подсказка ---------- */
.tariff {
  padding: 11px 14px; border-radius: 11px;
  background: var(--brand-soft); color: #2c5a40;
  font-size: 12.5px; font-weight: 500; line-height: 1.5;
  border: 1px solid #d5ebdd; margin-bottom: 12px;
}
.tariff a { color: var(--brand-dark); font-weight: 700; }
.tariff--warn { background: #fff6e6; border-color: #f5e0b8; color: #7a5410; }
.tariff--warn a { color: #a06a10; }

.alert--warn { background: #fff6e6; color: #7a5410; border-color: #f5e0b8; }

/* ---------- Нормализатор ---------- */
.phones-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.phones-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phones-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.textarea {
  width: 100%; min-height: 260px; resize: vertical;
  padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface-2);
  font-family: 'SF Mono', Consolas, monospace; font-size: 13px; line-height: 1.7;
  color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(31,138,76,.1); }
.textarea--out { background: #f6fbf8; color: var(--brand-dark); }
.phones-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn--accent { background: #fff3e0; color: #a86a00; border-color: #f3ddb5; font-weight: 700; }
.btn--accent:hover:not(:disabled) { background: #ffe9c9; }

.phones-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.pstat {
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.pstat__value { font-size: 22px; font-weight: 800; letter-spacing: -0.6px; }
.pstat__label { font-size: 12px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.pstat--ok { background: var(--brand-soft); border-color: #d5ebdd; }
.pstat--ok .pstat__value { color: var(--brand-dark); }
.pstat--warn { background: #fff6e6; border-color: #f5e0b8; }
.pstat--warn .pstat__value { color: #a86a00; }
.pstat--err { background: var(--danger-soft); border-color: #f7cfcf; }
.pstat--err .pstat__value { color: var(--danger); }

.issues { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.issues__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; cursor: pointer; }

/* ---------- Авторизация ---------- */
.auth-wrap { width: 100%; display: grid; place-items: center; }
.auth-card { width: min(430px, 100%); padding: 32px; }
.auth-card__head { text-align: center; margin-bottom: 24px; }
.auth-logo {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 16px; background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 10px 24px rgba(31,138,76,.3);
}
.auth-title { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 6px; }
.auth-sub { font-size: 13.5px; color: var(--ink-3); margin: 0; font-weight: 500; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field { margin: 0; }
.pwd-wrap { position: relative; }
.pwd-wrap .input { padding-right: 84px; }
.pwd-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--brand); padding: 4px;
}
.auth-foot { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--ink-3); font-weight: 500; }
.auth-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); line-height: 1.55; font-weight: 500;
}

/* ---------- Личный кабинет ---------- */
.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.acct-user { display: flex; align-items: center; gap: 14px; }
.acct-email { font-weight: 800; font-size: 15px; letter-spacing: -0.2px; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.mini-stat {
  padding: 13px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); text-align: center;
}
.mini-stat b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.5px; }
.mini-stat span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

.balance {
  padding: 20px; border-radius: 14px; text-align: center;
  background: linear-gradient(150deg, #eaf8ef, #f7fdf9);
  border: 1px solid #d5ebdd;
}
.balance__num { font-size: 38px; font-weight: 800; letter-spacing: -1.5px; color: var(--brand-dark); line-height: 1; }
.balance__lbl { font-size: 12.5px; color: #4a7a5f; font-weight: 600; margin-top: 6px; }

.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 16px 14px; border-radius: 13px; text-align: left;
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; transition: all .16s;
}
.pack:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.pack--popular { border-color: var(--brand); background: linear-gradient(160deg, #f4fdf7, #fff); }
.pack__badge {
  position: absolute; top: -9px; right: 10px;
  background: var(--brand-2); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
  letter-spacing: .02em;
}
.pack__title { font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pack__credits { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.pack__price { font-size: 17px; font-weight: 800; color: var(--brand-dark); }
.pack__note { font-size: 11px; color: var(--ink-3); font-weight: 500; line-height: 1.35; }

.pay-summary { padding: 4px 0; }
.pay-summary__row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.pay-summary__row--total { border-bottom: none; font-size: 16px; padding-top: 14px; }

/* ---------- История ---------- */
.hist-list { display: flex; flex-direction: column; }
.hist-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .12s;
}
.hist-item:hover { background: var(--surface-2); }
.hist-item__main { flex: 1; min-width: 0; }
.hist-item__title { font-weight: 700; font-size: 14.5px; margin-bottom: 5px; }
.hist-item__meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; flex-wrap: wrap; }
.hist-item__actions { display: flex; gap: 6px; flex-shrink: 0; }
.hist-del:hover { background: var(--danger-soft); color: var(--danger); border-color: #f7cfcf; }
.modal--wide { width: min(1080px, 100%); }

/* ---------- Статусы ---------- */
.tag--done { background: var(--brand-soft); color: var(--brand-dark); }
.tag--running { background: #fff6e6; color: #a86a00; }
.tag--pending { background: #eef2ff; color: #3b4fa8; }
.tag--error { background: var(--danger-soft); color: var(--danger); }
.tag--canceled { background: var(--surface-2); color: var(--ink-3); }
.tag--muted { background: var(--surface-2); color: var(--ink-3); }
.tag--admin { background: #f3e8ff; color: #6b3fa0; }
.tag--paid { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- Админка ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.astat {
  padding: 16px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.astat__num { font-size: 22px; font-weight: 800; letter-spacing: -0.7px; line-height: 1.1; }
.astat__lbl { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab {
  padding: 10px 18px; border-radius: 11px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 13.5px; color: var(--ink-2);
  cursor: pointer; transition: all .15s;
}
.tab:hover { border-color: var(--brand); }
.tab--active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

tr.clickable { cursor: pointer; }

/* ---------- Уведомления ---------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: 13px;
  background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  box-shadow: var(--shadow-lg); cursor: pointer;
  animation: slideIn .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0 } to { transform: none; opacity: 1 } }
.toast__icon { flex-shrink: 0; font-size: 14px; }
.toast--ok { background: #17492e; }
.toast--error { background: #8f2c2c; }
.toast--warn { background: #7a5410; }
.toast--info { background: #24382f; }
.toast-enter-active, .toast-leave-active { transition: all .2s ease; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(24px); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .nav__item { padding: 9px 10px; font-size: 13px; }
}
@media (max-width: 900px) {
  .hdr__inner { gap: 14px; padding: 10px 16px; }
  .brand__sub { display: none; }
  .nav {
    position: absolute; top: 100%; left: 12px; right: 12px;
    flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav--open { display: flex; }
  .nav__item { padding: 12px 14px; font-size: 14px; }
  .burger { display: block; }
  .user-pill__email { display: none; }
  .phones-grid, .phones-opts { grid-template-columns: minmax(0, 1fr); }
  .phones-stats { grid-template-columns: repeat(2, 1fr); }
  .packs { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  /* На узких экранах кнопки входа прячем в меню — бургер должен быть кликабельным */
  .hdr__right .btn-hdr { display: none; }
  .hdr__right { gap: 8px; }
  .credits__lbl { display: none; }
}
@media (max-width: 560px) {
  .shell { padding: 18px 14px 60px; }
  .brand__title { font-size: 14px; }
  .btn-hdr { padding: 8px 12px; font-size: 12.5px; }
  .hist-item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
  .hist-item__actions { width: 100%; }
  .acct-stats { grid-template-columns: 1fr; }
  .page-title { font-size: 21px; }
}
.nav__sep { display: none; }
.nav__item--cta { display: none; }
@media (max-width: 640px) {
  .nav__sep { display: block; height: 1px; background: var(--line); margin: 6px 4px; }
  .nav__item--cta { display: flex; }
  .nav__item--primary { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: #fff; justify-content: center; }
}
/* ---------------- Результат возврата с оплаты ---------------- */
.pay-result {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pay-result__icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800;
  background: var(--surface-2); color: var(--ink-3);
}
.pay-result__body { flex: 1; min-width: 0; }
.pay-result__title { font-weight: 800; font-size: 15.5px; letter-spacing: -.2px; }
.pay-result__text { font-size: 13.5px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }

.pay-result--ok { background: var(--brand-soft); border-color: #cbe8d7; }
.pay-result--ok .pay-result__icon { background: var(--brand-2); color: #fff; }
.pay-result--ok .pay-result__title { color: var(--brand-dark); }

.pay-result--checking .pay-result__icon { animation: pr-spin 1.2s linear infinite; color: var(--brand); }
@keyframes pr-spin { to { transform: rotate(360deg); } }

.pay-result--canceled, .pay-result--error { background: var(--danger-soft); border-color: #f7cfcf; }
.pay-result--canceled .pay-result__icon, .pay-result--error .pay-result__icon { background: var(--danger); color: #fff; }
.pay-result--canceled .pay-result__title, .pay-result--error .pay-result__title { color: #a33; }

.pay-result--pending { background: #fff6e6; border-color: #f5e0b8; }
.pay-result--pending .pay-result__icon { background: var(--accent); color: #fff; }
.pay-result--pending .pay-result__title { color: #7a5410; }

/* ---------------- Настройки оплаты в админке ---------------- */
.settings-box {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-bottom: 18px;
}
.settings-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.settings-row:last-child { margin-bottom: 0; }
.settings-label { font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 160px; }
.mode-switch { display: inline-flex; background: var(--surface); border: 1.5px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.mode-switch button {
  padding: 8px 16px; border: none; background: none; border-radius: 8px;
  font-weight: 700; font-size: 13px; color: var(--ink-3); cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.mode-switch button.on { background: var(--brand-soft); color: var(--brand-dark); }

.yk-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.yk-status--ok { background: var(--brand-soft); color: var(--brand-dark); }
.yk-status--err { background: var(--danger-soft); color: var(--danger); }

.code-chip {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-3);
}
/* ---------------- Подвал приложения ---------------- */
.app-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 40px;
}
.app-footer__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
}
.app-footer__copy { color: var(--ink-3); }
.app-footer__links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.app-footer__links a { color: var(--ink-3); text-decoration: none; }
.app-footer__links a:hover { color: var(--brand-dark); text-decoration: underline; }

.auth-link { color: var(--brand-dark); font-weight: 700; }

@media (max-width: 640px) {
  .app-footer__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .app-footer__links { margin-left: 0; }
}

/* ================================================================
   Пост-обработка результатов парсинга
   ================================================================ */

.enrich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.enrich-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: all .16s;
  font-family: inherit;
}
.enrich-btn:hover:not(:disabled) {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.enrich-btn:disabled { opacity: .6; cursor: not-allowed; }
.enrich-btn--done { border-color: #cbe8d7; background: linear-gradient(160deg, #f4fdf7, #fff); }
.enrich-btn--running { border-color: var(--accent); background: #fff8ec; }

.enrich-btn__icon {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
}
.enrich-btn--done .enrich-btn__icon { background: var(--brand-2); color: #fff; }
.enrich-btn__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.enrich-btn__title { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: -.1px; }
.enrich-btn__hint { font-size: 11.5px; color: var(--ink-3); font-weight: 500; line-height: 1.35; }
.enrich-btn__state { font-size: 14px; color: var(--ink-3); font-weight: 700; flex-shrink: 0; }

.enrich-summary {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.enrich-summary__title {
  font-size: 11.5px; font-weight: 800; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.enrich-summary__row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13px; flex-wrap: wrap;
}
.enrich-summary__text { color: var(--ink-2); font-weight: 600; flex: 1; min-width: 0; }

.enrich-block {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.enrich-block__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px; font-size: 13.5px;
}

.dup-item {
  padding: 10px 13px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  margin-bottom: 8px;
}
.dup-item__addr { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.dup-item__names { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

/* Индикатор проверки */
.vdot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
.vdot--ok { background: var(--brand-2); box-shadow: 0 0 0 2px rgba(42,187,47,.15); }
.vdot--bad { background: var(--danger); box-shadow: 0 0 0 2px rgba(214,69,69,.15); }

/* ================================================================
   Инструменты: UTM и реквизиты
   ================================================================ */

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }

.tool-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .tool-field-row { grid-template-columns: 1fr; } }

.tool-result {
  background: var(--ink);
  color: #b8d4c4;
  border-radius: 14px;
  padding: 16px 18px;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow-y: auto;
}

.tool-link-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.tool-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.tool-link__url {
  flex: 1; min-width: 0;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 11.5px;
  color: var(--brand-dark);
  word-break: break-all;
}
.tool-link__label { font-size: 11px; color: var(--ink-3); font-weight: 700; flex-shrink: 0; }

.tool-warn {
  padding: 11px 14px; border-radius: 11px;
  background: #fff6e6; border: 1px solid #f5e0b8;
  color: #7a5410; font-size: 12.5px; font-weight: 600;
  margin-top: 12px;
}
.tool-warn ul { margin: 6px 0 0; padding-left: 18px; }

.seg-control {
  display: inline-flex; background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px;
}
.seg-control button {
  padding: 8px 16px; border: none; background: none; border-radius: 8px;
  font-weight: 700; font-size: 13px; color: var(--ink-3);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.seg-control button.on { background: var(--surface); color: var(--brand-dark); box-shadow: var(--shadow-sm); }

.menu-badge {
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px;
  background: var(--brand-2); color: #fff; margin-left: 4px; letter-spacing: .03em;
}

/* ================================================================
   Выпадающие меню в шапке (Инструменты, Ещё)
   ================================================================ */

/* Шапка не должна вылезать за экран: меню сжимается, а ссылки не переносятся */
.hdr__inner { min-width: 0; }
.nav { min-width: 0; flex-wrap: nowrap; overflow: visible; }
.nav__item { white-space: nowrap; }

.nav__item--drop { gap: 6px; }
.nav__item--open { background: var(--surface-2); color: var(--ink); }
.nav__chev { font-size: 9px; color: var(--ink-3); transition: transform .15s; margin-left: 1px; }
.nav__chev.up { transform: rotate(180deg); }

.dropdown { position: relative; flex-shrink: 0; }

/* Панель прижата вплотную к кнопке: между ними нет «мёртвой зоны»,
   иначе меню пропадает при переводе курсора */
.dropdown__panel {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  min-width: 268px;
  z-index: 70;
  animation: dropIn .14s ease;
}
.dropdown__panel--narrow { min-width: 220px; }

.dropdown__panel::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
}

.dropdown__panel > .dropdown__item:first-of-type { border-top-left-radius: 13px; border-top-right-radius: 13px; }
.dropdown__panel > .dropdown__item:last-of-type { border-bottom-left-radius: 13px; border-bottom-right-radius: 13px; }

/* Визуальная «коробка» панели */
.dropdown__panel {
  background: transparent;
}
.dropdown__panel::before { content: none; }

.dropdown__panel {
  filter: drop-shadow(0 18px 34px rgba(16, 35, 26, .16));
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.dropdown__item:first-of-type { border-top: 1px solid var(--line); }
.dropdown__item:hover { background: var(--surface-2); }
.dropdown__item--active { background: var(--brand-soft); }
.dropdown__item--active .dropdown__label { color: var(--brand-dark); }

.dropdown__icon {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid; place-items: center;
  font-size: 14px;
}
.dropdown__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dropdown__label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.dropdown__hint { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* На планшете прячем подписи у кнопок, чтобы всё влезло */
@media (max-width: 1180px) {
  .brand__sub { display: none; }
  .user-pill__email { max-width: 110px; }
  .nav__item { padding: 8px 11px; }
  .credits__lbl { display: none; }
}

@media (max-width: 900px) {
  /* Правый блок не должен перекрывать бургер: даём ему нормальный поток */
  .hdr__right { gap: 8px; position: relative; z-index: 5; }
  .credits { padding: 6px 10px; font-size: 12px; }
  .user-pill { padding: 4px; }
  .burger { position: relative; z-index: 6; flex-shrink: 0; }
}

@media (max-width: 640px) {
  .brand__title { font-size: 13.5px; }
  .brand__logo { width: 36px; height: 36px; font-size: 13px; border-radius: 11px; }
  .credits__icon { font-size: 10px; }
  .hdr__right .btn-hdr { display: none; }
}

@media (max-width: 980px) {
  /* В мобильном меню выпадающие списки становятся обычными блоками */
  .dropdown { width: 100%; }
  .dropdown__panel {
    position: static;
    padding-top: 4px;
    min-width: 0;
    filter: none;
    animation: none;
  }
  .dropdown__panel--narrow { min-width: 0; }
  .dropdown__item {
    border: none;
    border-radius: 9px !important;
    padding: 10px 12px;
    background: transparent;
  }
  .dropdown__item:hover { background: var(--surface-2); }
  .nav__item--drop { width: 100%; justify-content: space-between; }
}

/* ================================================================
   Админка: бесплатный режим и переключатель
   ================================================================ */

.free-mode {
  padding: 20px 22px;
  border-radius: 15px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  transition: all .2s;
}
.free-mode--on {
  border-color: var(--brand);
  background: linear-gradient(160deg, #f1fbf5, #ffffff);
  box-shadow: 0 8px 24px rgba(31, 138, 76, .1);
}

.free-mode__head {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.free-mode__text { flex: 1; min-width: 0; }
.free-mode__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.free-mode__state {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.free-mode__state.on { background: var(--brand-2); color: #fff; }
.free-mode__state.off { background: var(--surface); color: var(--ink-3); border: 1px solid var(--line); }
.free-mode__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1.55;
  max-width: 560px;
}
.free-mode__hint { margin-top: 12px; font-size: 12.5px; color: var(--brand-dark); font-weight: 700; }

/* Переключатель */
.toggle {
  position: relative;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 999px;
  border: none;
  background: #cfd9d4;
  cursor: pointer;
  transition: background .2s;
  padding: 0;
}
.toggle:disabled { opacity: .6; cursor: wait; }
.toggle--on { background: linear-gradient(160deg, var(--brand-2), var(--brand)); }
.toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform .2s cubic-bezier(.3, .9, .3, 1.3);
}
.toggle--on .toggle__knob { transform: translateX(26px); }

/* Сравнение режимов */
.access-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 780px) { .access-compare { grid-template-columns: 1fr; } }

.access-col {
  padding: 16px 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: opacity .2s, border-color .2s;
}
.access-col--dim { opacity: .5; }
.access-col--active { border-color: var(--brand); }
.access-col__title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.access-col ul { margin: 0; padding: 0; list-style: none; }
.access-col li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 7px;
  line-height: 1.45;
}
.access-col li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}
.access-col--active li::before { background: var(--brand-2); }

/* Плашка режима в интерфейсе */
.free-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 11px;
  background: var(--brand-soft);
  border: 1px solid #cbe8d7;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
