* { box-sizing: border-box; }
  html, body { min-height: 100%; margin: 0; }
  body {
    font-family: -apple-system, "SF Pro Text", "Segoe UI", Arial, sans-serif;
    color: #0f172a;
    background: #0b1220;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    min-height: 100vh;
  }
  body::before {
    content: ""; position: fixed; inset: 0; z-index: 0;
    background: url("bridge.jpg") center / cover no-repeat;
  }
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 0;
    background: linear-gradient(180deg, rgba(8, 15, 30, 0.35), rgba(8, 15, 30, 0.72));
  }
  .wrap { position: relative; z-index: 1; width: 100%; max-width: 760px; }
  .card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 22px;
    padding: 28px 26px;
    box-shadow: 0 26px 70px rgba(4, 10, 24, 0.45);
  }
  .logo { display: block; width: 250px; max-width: 100%; height: auto; margin: 0 auto 24px; }
  h1 { margin: 0 0 4px; font-size: 22px; text-align: center; letter-spacing: -0.02em; }
  .sub { margin: 0 0 20px; text-align: center; color: #000000; font-size: 13px; }
  label { display: block; margin-bottom: 12px; }
  label span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
               letter-spacing: 0.06em; color: #000000; margin-bottom: 5px; }
  input { width: 100%; padding: 13px 14px; font-size: 16px; border-radius: 12px;
          border: 1px solid #d7dee8; background: #fff; color: #0f172a; }
  input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
  button { cursor: pointer; font-family: inherit; }
  .submit { width: 100%; margin-top: 6px; padding: 14px; border: 0; border-radius: 13px;
            background: #2563eb; color: #fff; font-size: 16px; font-weight: 650; }
  .submit:disabled { opacity: 0.6; }
  .error { display: none; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
           background: #fef2f2; color: #b91c1c; font-size: 12.5px; }
  .consent { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 12px; cursor: pointer; }
  .consent input { width: 17px; height: 17px; flex: 0 0 17px; margin: 2px 0 0; padding: 0;
                   accent-color: #2563eb; box-shadow: none; }
  .consent span { display: block; margin: 0; font-size: 11.5px; font-weight: 400;
                  line-height: 1.45; letter-spacing: 0; text-transform: none; color: #000000; }
  .consent a { color: #1d4ed8; }
  .hint { margin-top: 16px; font-size: 11.5px; color: #000000; text-align: center; line-height: 1.5; }
  .hint b { color: #000000; }

  /* выбор раздела */
  .chooser { display: none; }
  .chooser.is-visible { display: block; }
  .login { display: none; }
  .login.is-visible { display: block; }
  .hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
  .hello strong { font-size: 15px; }
  .hello__links { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
  .venue-chip {
    display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
    background: #eef2ff; color: #3730a3; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  }

  /* выбор площадки */
  .venues { display: none; }
  .venues.is-visible { display: block; }
  .venues__title {
    margin: 0 0 14px; font-size: 15px; font-weight: 600; color: #0f172a; text-align: center;
  }

  .link { border: 0; background: none; color: #000000; font-size: 12.5px; text-decoration: underline; }
  .choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 620px) { .choice { grid-template-columns: 1fr; } }
  .choice button {
    text-align: left; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px;
    background: #fff; display: flex; flex-direction: column; gap: 6px; min-height: 132px;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  }
  .choice button:hover { border-color: #2563eb; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.16); }
  .choice .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
                  background: #dbeafe; color: #1d4ed8; font-size: 20px; font-weight: 800; }
  .choice strong { font-size: 16px; }
  .choice small { color: #000000; font-size: 12.5px; line-height: 1.4; }

.download-app {
  display: block;
  margin-top: 14px;
  color: #2563eb;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.download-app:hover {
  text-decoration: underline;
}

[hidden] { display: none !important; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.badge--amber {
  background: #f59e0b;
}


.choice--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .choice--three { grid-template-columns: 1fr; } }

.stats-line {
  margin: 0 0 12px;
  font-size: 13px;
  color: #000000;
}

.stats-line b { color: #0f172a; }

.notice {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.notice button {
  border: 0;
  background: #2563eb;
  color: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}

.sheet[hidden] { display: none; }

.sheet__card {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.sheet__head h2 { margin: 0; font-size: 17px; }

.sheet__close {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #000000;
}

.sheet__body { padding: 14px 18px 18px; overflow-y: auto; }

.task-row {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.task-row__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #000000; }
.task-row__status { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.task-row__status--new { background: #fee2e2; color: #b91c1c; }
.task-row__status--progress { background: #fef3c7; color: #92400e; }
.task-row__status--done { background: #dcfce7; color: #15803d; }
.task-row p { margin: 6px 0 0; font-size: 13.5px; }
.task-row__actions { display: flex; gap: 8px; margin-top: 10px; }
.task-row__actions button {
  border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 9px;
  padding: 6px 11px; font-size: 12.5px; font-weight: 600; color: #000000;
}
.task-row__actions button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }

/* скрытые поля не показываем, даже если у label задан display */
.login label[hidden],
.login input[hidden],
.login div[hidden] { display: none !important; }

.submit--ghost {
  margin-top: 8px;
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

.submit--ghost:hover {
  background: #f1f5f9;
}

[hidden] { display: none !important; }

.legal {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.legal a {
  color: #cbd5e1;
  font-size: 11.5px;
  text-decoration: none;
  opacity: 0.85;
}

.legal a + a { margin-left: 14px; }

.legal a:hover {
  text-decoration: underline;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(720px, calc(100% - 24px));
  padding: 13px 16px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.cookie-banner p {
  flex: 1;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.cookie-banner a { color: #93c5fd; }

.cookie-banner button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
}

@media (max-width: 560px) {
  .cookie-banner { align-items: flex-start; flex-direction: column; gap: 9px; }
  .cookie-banner button { align-self: flex-end; }
}

/* Шесть разделов — по три в ряд. */
.choice--four {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
  .choice--four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .choice--four { grid-template-columns: 1fr; }
}

/* Удобные для пальца кнопки на телефоне */
@media (max-width: 720px) {
  .hello .link,
  .link {
    min-height: 38px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
  }

  .legal a {
    display: inline-block;
    padding: 8px 10px;
    line-height: 1.3;
  }
}

/* Переключатель языка на экране выбора */
.portal-lang {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.portal-lang button {
  min-width: 44px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border, #dbe4ee);
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.portal-lang button.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Кнопка «Показать» у поля пароля */
label .password-field {
  display: block;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 92px;
}

.password-field__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
}

.password-field__toggle:hover,
.password-field__toggle:focus-visible {
  background: rgba(37, 99, 235, 0.1);
}

/* первый вход администратора: настройка 2FA */
.setup {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  background: #fffbeb;
  font-size: 12.5px;
  line-height: 1.5;
  color: #78350f;
}
.setup p { margin: 0 0 6px; }
.setup p:last-child { margin-bottom: 0; }
.setup code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #fde68a;
  font-size: 12.5px;
  letter-spacing: .04em;
  word-break: break-all;
}
.setup a { color: #92400e; font-weight: 600; }

.password-dialog {
  width: min(420px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.4);
}

.password-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.password-dialog__card {
  display: grid;
  gap: 11px;
  padding: 22px;
}

.password-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.password-dialog__head h2 {
  margin: 0;
  font-size: 19px;
}

.password-dialog__close {
  border: 0;
  background: none;
  color: #000000;
  font-size: 24px;
  line-height: 1;
}

.password-dialog .field {
  display: grid;
  gap: 5px;
}

.password-dialog .field span {
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-dialog__error {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
}

.password-dialog .muted {
  margin: 0;
  color: #000000;
  font-size: 12.5px;
}

/* Телефоны: шапка портала переносится, а не уезжает за край экрана. */
@media (max-width: 560px) {
  .hello { flex-wrap: wrap; row-gap: 6px; }
  .hello__links { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 8px; }
  .hello__links .link { flex: 0 0 auto; }
  .wrap { padding-left: 14px; padding-right: 14px; }
}

/* Телефоны: подвал не липнет к низу и не наезжает на баннер cookie. */
@media (max-width: 560px) {
  .legal {
    position: static;
    padding: 18px 0 24px;
  }

  .cookie-banner {
    bottom: 10px;
  }
}

/* Телефоны: галочка согласия и кнопка «Показать» — крупнее. */
@media (max-width: 1024px) {
  input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .password-field__toggle {
    min-height: 38px;
    padding: 0 12px;
  }
}
