/* =========================================================
   Вход, регистрация и личный кабинет
   (подключается после style.css)
   ========================================================= */
.acc {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 55% 55% at 72% 28%, rgba(160, 90, 255, .5) 0%, rgba(160, 90, 255, 0) 70%),
    linear-gradient(180deg, #5d1fd0 0%, #4515a8 40%, #24085a 85%, var(--violet-900) 100%);
}
.acc__rays {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 72% 22%, rgba(255, 255, 255, .055) 0deg 4deg, rgba(255, 255, 255, 0) 4deg 11deg);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 22%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 60% at 72% 22%, #000 10%, transparent 70%);
}

.acc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.acc-nav { display: flex; align-items: center; gap: 18px; }
.acc-back,
.acc-logout {
  font-family: var(--font);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 14px;
  color: var(--lime);
}
.acc-back:hover { text-decoration: underline; }
.acc-logout {
  height: 42px;
  padding: 0 20px;
  border: 2px solid var(--lime);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.acc-logout:hover { background: var(--lime); color: var(--ink); }
.acc-logout:focus-visible,
.acc-back:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- страница входа ---------- */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 60px;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 90px;
}
.auth__badge { width: fit-content; min-height: 44px; font-size: 18px; padding: 4px 22px; }
.auth__badge svg { width: 30px; height: 30px; }
.auth__title {
  margin-top: 22px;
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(42px, 6vw, 86px);
  line-height: .95;
  letter-spacing: -.02em;
}
.auth__lead {
  max-width: 470px;
  margin-top: 22px;
  font-size: 18px; font-weight: 600; line-height: 1.45;
  color: #ece4ff;
}
.auth__perks { margin-top: 24px; }
.auth__perks li {
  position: relative;
  padding-left: 24px;
  font-weight: 700; font-size: 16px; line-height: 1.35;
}
.auth__perks li + li { margin-top: 12px; }
.auth__perks li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--lime); }

.auth__card {
  padding: 28px 30px 30px;
  border: 2px solid rgba(196, 242, 28, .55);
  border-radius: 28px;
  background: rgba(28, 6, 60, .9);
  box-shadow: 0 30px 80px rgba(8, 0, 25, .5);
}
.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.auth__tabs button {
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.auth__tabs button[aria-selected="true"] { background: var(--lime); color: var(--ink); }
.auth__tabs button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.auth__form h2 {
  margin-bottom: 18px;
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 26px;
}

.field { display: block; margin-bottom: 14px; }
.field__label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #d9ccf5;
}
.field__label i { font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: #22074a;
  color: #fff;
  font-family: var(--font);
  font-weight: 600; font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder { color: rgba(255, 255, 255, .38); }
.field input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(196, 242, 28, .22); }
.field input[aria-invalid="true"] { border-color: #ff6b8b; box-shadow: 0 0 0 3px rgba(255, 107, 139, .2); }
.field__control { position: relative; }
.field__control input { padding-right: 104px; }
.pass-toggle {
  position: absolute;
  top: 8px; right: 8px; bottom: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: var(--font);
  font-weight: 700; font-size: 12px;
  cursor: pointer;
}
.pass-toggle:hover { background: rgba(255, 255, 255, .18); }
.pass-toggle:focus-visible { outline: 2px solid var(--lime); }
.field__hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 0;
  border: 0;
}
.choice legend { margin-bottom: 8px; }
.choice label { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  font-weight: 700; font-size: 14px;
  transition: background-color .2s ease, border-color .2s ease;
}
.choice input:checked + span { background: var(--violet); border-color: var(--violet); }
.choice input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  font-size: 13px; line-height: 1.45;
  color: #e7defa;
  cursor: pointer;
}
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--lime); }
.check input[aria-invalid="true"] { outline: 2px solid #ff6b8b; outline-offset: 2px; }
.check a { color: var(--lime); text-decoration: underline; }

.auth__error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 139, .55);
  border-radius: 12px;
  background: rgba(255, 80, 120, .14);
  color: #ffd3dd;
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.auth__submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  font-family: var(--font);
  font-size: 18px;
  cursor: pointer;
}
.auth__submit:disabled { opacity: .7; cursor: wait; transform: none; }
.auth__switch { margin-top: 16px; text-align: center; font-size: 14px; color: #d9ccf5; }
.auth__switch a { color: var(--lime); font-weight: 700; text-decoration: underline; }

/* ---------- вход через Telegram ---------- */
.tg-card__icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: #2aabee;
  box-shadow: 0 10px 30px rgba(42, 171, 238, .35);
}
.tg-card__icon svg { width: 34px; height: 34px; fill: #fff; }
.tg-card h2 {
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 24px; line-height: 1.1;
}
.tg-steps { margin: 20px 0 22px; counter-reset: tgstep; }
.tg-steps li {
  position: relative;
  min-height: 28px;
  padding-left: 40px;
  counter-increment: tgstep;
  font-weight: 700; font-size: 15px; line-height: 1.35;
}
.tg-steps li + li { margin-top: 12px; }
.tg-steps li::before {
  content: counter(tgstep);
  position: absolute; left: 0; top: -3px;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(196, 242, 28, .16);
  color: var(--lime);
  font-weight: 900; font-size: 13px;
}
.tg-btn { gap: 12px; }
.tg-btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.tg-btn.is-loading { opacity: .6; pointer-events: none; }
.tg-wait {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  font-size: 14px; font-weight: 600; line-height: 1.5;
  color: #e7defa;
}
.tg-wait[hidden] { display: none; }
.tg-wait a { color: var(--lime); text-decoration: underline; }
.tg-spinner {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  border: 3px solid rgba(196, 242, 28, .25);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: tgspin .8s linear infinite;
}
@keyframes tgspin { to { transform: rotate(360deg); } }
.tg-card__note { margin-top: 16px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.profile__id { color: var(--lime); font-weight: 900; font-style: italic; letter-spacing: .04em; }
.cab-hint { margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cab-bot { margin-top: 12px; min-height: 48px; padding: 0 22px; font-size: 15px; gap: 10px; }
.cab-bot svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- личный кабинет ---------- */
.cab { padding-top: 10px; padding-bottom: 90px; }
.cab__loading { font-weight: 700; font-size: 18px; color: #e7defa; }
.cab__error { max-width: 560px; }
.cab__hello {
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1;
  overflow-wrap: anywhere;
}
.cab__sub { margin-top: 14px; font-size: 17px; font-weight: 600; color: #ece4ff; }
.cab__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.cab-card {
  padding: 26px 28px 28px;
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: rgba(28, 6, 60, .88);
  box-shadow: 0 24px 60px rgba(8, 0, 25, .35);
}
.cab-card--wide { grid-column: 1 / -1; }
.cab-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 22px;
}
.cab-card h2 svg { width: 24px; height: 24px; flex: none; fill: var(--lime); }

.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 20px; margin: 0; }
.profile dt {
  padding-top: 2px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.profile dd { margin: 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.profile a { color: var(--lime); text-decoration: underline; }

.prog-options { display: grid; gap: 12px; }
.prog-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 16px 18px;
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: #22074a;
  color: #fff;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.prog-opt b { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 18px; }
.prog-opt small { font-size: 13px; font-weight: 600; color: #d9ccf5; }
.prog-opt:hover { border-color: rgba(196, 242, 28, .55); }
.prog-opt:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.prog-opt[aria-pressed="true"] { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(196, 242, 28, .18); }
.prog-opt[aria-pressed="true"] b::after { content: " ✓"; color: var(--lime); }
.cab-status { min-height: 20px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--lime); }

.path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.path li {
  padding: 16px;
  border: 1.5px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: #22074a;
}
.path b {
  display: block;
  font-weight: 900; font-style: italic;
  font-size: 30px; line-height: 1;
  color: rgba(255, 255, 255, .35);
}
.path span {
  display: block;
  margin-top: 8px;
  font-weight: 800; font-size: 13px; text-transform: uppercase; line-height: 1.2;
}
.path small {
  display: block;
  margin-top: 10px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.path .is-done { border-color: rgba(196, 242, 28, .35); }
.path .is-done b,
.path .is-done small { color: var(--lime); }
.path .is-current {
  border-color: var(--lime);
  background: linear-gradient(180deg, #3c1582, #22074a);
  box-shadow: 0 0 0 3px rgba(196, 242, 28, .16);
}
.path .is-current b,
.path .is-current small { color: var(--lime); }

.vk-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.vk-card__head h2 { margin-bottom: 8px; }
.vk-card__head p { font-size: 15px; font-weight: 600; color: #e7defa; }
.vk-card__btn { min-height: 52px; padding: 0 28px; font-size: 16px; }
.vk-card .vk-widget { margin-top: 22px; }

/* ---------- страница команды ---------- */
.adm { padding-top: 10px; padding-bottom: 90px; }
.adm-login { max-width: 480px; margin: 40px auto 0; }
.adm-login h1 {
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: 28px;
}
.adm-login__text { margin: 10px 0 22px; font-size: 15px; font-weight: 600; line-height: 1.45; color: #e7defa; }

.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.adm-title {
  font-weight: 900; font-style: italic; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}
.adm-export { min-height: 52px; padding: 0 26px; font-size: 16px; }

.adm-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.adm-stats li {
  padding: 16px 18px;
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(28, 6, 60, .88);
}
.adm-stats b { display: block; font-weight: 900; font-style: italic; font-size: 34px; line-height: 1; }
.adm-stats span {
  display: block;
  margin-top: 6px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
}
.adm-stats--lime b { color: var(--lime); }
.adm-stats--violet b { color: var(--violet-soft); }

.adm-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px auto;
  align-items: end;
  gap: 12px;
  margin-top: 24px;
}
.adm-tools .field { margin-bottom: 0; }
.field select,
.adm-step {
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: #22074a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23c4f21c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
  color: #fff;
  font-family: var(--font);
  font-weight: 600; font-size: 15px;
  -webkit-appearance: none;
          appearance: none;
  cursor: pointer;
}
.field select:focus,
.adm-step:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(196, 242, 28, .22); }
.adm-step { height: 40px; min-width: 190px; font-size: 13px; }
.adm-step:disabled { opacity: .6; cursor: wait; }
.adm-refresh { height: 50px; }

.adm-empty {
  margin-top: 20px;
  padding: 26px;
  border: 1.5px dashed rgba(255, 255, 255, .2);
  border-radius: 18px;
  text-align: center;
  font-weight: 700;
  color: #e7defa;
}
.adm-status { min-height: 20px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--lime); }

.adm-table-wrap {
  margin-top: 6px;
  overflow-x: auto;
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(28, 6, 60, .9);
}
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1.5px solid rgba(255, 255, 255, .1);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  vertical-align: middle;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.adm-table td:first-child { white-space: nowrap; color: #d9ccf5; }
.adm-table a { color: var(--lime); }
.adm-table a:hover { text-decoration: underline; }
.adm-id { color: var(--lime); font-weight: 900; font-style: italic; white-space: nowrap; }
.adm-prog {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  white-space: nowrap;
  background: rgba(255, 255, 255, .1);
}
.adm-prog--collab { background: var(--lime); color: var(--ink); }
.adm-prog--equipment { background: var(--violet); color: #fff; }
.adm-hint { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.adm-table-wrap:has(tbody:empty) { display: none; }

@media (max-width: 900px) {
  .adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .adm-search { grid-column: 1 / -1; }

  /* таблица → карточки */
  .adm-table-wrap { border: 0; background: none; overflow: visible; }
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; }
  .adm-table tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1.5px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(28, 6, 60, .9);
  }
  .adm-table tbody tr:hover { background: rgba(28, 6, 60, .9); }
  .adm-table td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    border: 0;
  }
  .adm-table td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted);
  }
  .adm-table td:first-child { white-space: normal; }
  .adm-step { min-width: 0; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .auth__card { max-width: 560px; }
  .cab__grid { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .acc-top { padding-top: 18px; padding-bottom: 18px; }
  .acc-nav { gap: 10px; }
  .acc-back { display: none; }
  .acc-logout { flex: none; height: 38px; padding: 0 12px; font-size: 12px; }
  .acc-top .brand { gap: 8px; }
  .acc-top .brand__name b { font-size: 16px; }
  .acc-top .brand__name small { font-size: 5.4px; }
  .acc-top .brand__aba { font-size: 26px; padding-right: 14px; }
  .acc-top .brand__aba svg { width: 18px; height: 18px; right: -6px; top: -9px; }
  .auth { gap: 22px; padding-top: 4px; padding-bottom: 60px; }
  .auth__badge, .auth__perks { display: none; }
  .auth__title { margin-top: 0; font-size: 34px; }
  .auth__title br { display: none; }
  .auth__lead { margin-top: 12px; font-size: 15px; }
  .auth__card { padding: 20px 16px 22px; border-radius: 22px; }
  .cab-card { padding: 22px 18px 24px; border-radius: 20px; }
  .profile { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .profile dd { margin-bottom: 10px; }
  .path { grid-template-columns: minmax(0, 1fr); }
  .vk-card__btn { width: 100%; }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-stats li:first-child { grid-column: 1 / -1; }
  .adm-export { width: 100%; }
  .adm-tools { grid-template-columns: minmax(0, 1fr); }
}
