/* Вход / регистрация — макеты victoria-mobile-variant-b + victoria-desktop-minimal (единый адаптив) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --vic-line: #293340;
  --vic-text: #eef4ff;
  --vic-muted: #98a6bb;
  --vic-accent: #1ea36f;
  --vic-accent2: #6ed7a3;
  --vic-card: rgba(16, 22, 28, 0.82);
  --vic-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

button,
input {
  font: inherit;
}

body.vic-auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #091014;
  color: var(--vic-text);
  -webkit-font-smoothing: antialiased;
}

/* ——— Мобильный макет (по умолчанию) ——— */
.vic-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #091014;
}

.vic-hero-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 220px;
}

.vic-hero {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0c1318;
  overflow: hidden;
}

/* Один <img>: splash-hero.png или fallback vic-auth-portrait.svg (без <picture>, надёжнее в браузерах) */
.vic-hero .vic-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.vic-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(
    180deg,
    rgba(9, 16, 20, 0),
    rgba(9, 16, 20, 0.6) 42%,
    rgba(9, 16, 20, 0.94) 100%
  );
  pointer-events: none;
}

.vic-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 2;
}

.vic-auth {
  width: 100%;
  background: rgba(16, 22, 28, 0.76);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  padding: 14px 14px 12px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
}

.vic-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
}

.vic-tab {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--vic-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a.vic-tab {
  color: var(--vic-muted);
}

a.vic-tab:hover {
  color: var(--vic-text);
}

.vic-tab.active {
  background: var(--vic-accent);
  color: #fff;
}

.vic-tab:disabled,
.vic-tab.vic-tab-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vic-msg {
  display: none;
  margin-bottom: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.35;
}

.vic-msg.show {
  display: block;
}

.vic-msg.err {
  background: #341919;
  color: #ffc3c3;
  border: 1px solid rgba(255, 126, 126, 0.18);
}

.vic-pane {
  display: none;
}

.vic-pane.active {
  display: block;
}

.vic-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 4px;
}

.vic-sub {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--vic-muted);
}

.vic-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vic-fieldWrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vic-fieldWrap label {
  font-size: 10.5px;
  color: var(--vic-muted);
}

.vic-input {
  height: 42px;
  border-radius: 13px;
  border: 1px solid #2e3947;
  background: #1d2630;
  color: var(--vic-text);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.vic-input:focus {
  border-color: var(--vic-accent2);
}

.vic-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.vic-passWrap {
  position: relative;
}

.vic-passBtn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--vic-muted);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
}

.vic-passBtn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.vic-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.vic-btn {
  height: 42px;
  border: none;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vic-btn.vic-primary {
  background: var(--vic-accent);
  color: #fff;
}

.vic-btn.vic-secondary {
  background: #1d2630;
  color: #eef4ff;
  border: 1px solid #314051;
}

.vic-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a.vic-btn.vic-primary {
  color: #fff;
}

a.vic-btn.vic-secondary {
  color: #eef4ff;
}

.vic-reg-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* ——— Десктопный макет ——— */
@media (min-width: 900px) {
  .vic-page {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    padding: 24px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    background: radial-gradient(circle at top, #101820 0%, #091014 58%);
    align-items: stretch;
  }

  .vic-hero-wrap {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    min-height: min(860px, 88vh);
    align-self: stretch;
  }

  .vic-hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #0d151a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--vic-shadow);
    min-height: min(860px, 88vh);
    height: auto;
  }

  .vic-hero::after {
    display: none;
  }

  .vic-hero .vic-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .vic-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .vic-auth {
    width: 100%;
    max-width: 520px;
    background: var(--vic-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 28px;
    box-shadow: var(--vic-shadow);
    align-self: center;
  }

  .vic-tabs {
    gap: 8px;
    padding: 6px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .vic-tab {
    height: 46px;
    border-radius: 13px;
    font-size: 14px;
  }

  .vic-msg {
    margin-bottom: 12px;
    padding: 11px 12px;
    border-radius: 13px;
    font-size: 12.5px;
    line-height: 1.4;
  }

  .vic-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 8px;
  }

  .vic-sub {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
  }

  .vic-row {
    gap: 11px;
  }

  .vic-fieldWrap {
    gap: 5px;
  }

  .vic-fieldWrap label {
    font-size: 11.5px;
  }

  .vic-input {
    height: 48px;
    border-radius: 15px;
    border: 1px solid #304050;
    padding: 0 14px;
    font-size: 14px;
  }

  .vic-passBtn {
    right: 10px;
    font-size: 11.5px;
  }

  .vic-actions {
    gap: 10px;
    margin-top: 14px;
  }

  .vic-btn {
    height: 48px;
    border-radius: 15px;
    font-size: 14px;
  }
}

@media (min-width: 900px) and (max-width: 1279px) {
  .vic-page {
    grid-template-columns: 1fr minmax(300px, 440px);
  }

  .vic-hero {
    min-height: 760px;
  }
}

@media (max-width: 899px) and (max-height: 740px) {
  .vic-auth {
    padding: 12px 12px 10px;
  }

  .vic-title {
    font-size: 16px;
  }

  .vic-sub {
    font-size: 11px;
  }

  .vic-input,
  .vic-btn {
    height: 40px;
  }

  .vic-tabs {
    margin-bottom: 8px;
  }

  .vic-actions {
    gap: 7px;
    margin-top: 8px;
  }

  .vic-row {
    gap: 7px;
  }
}

@media (max-width: 899px) and (max-height: 680px) {
  .vic-auth {
    padding: 10px;
  }

  .vic-panel {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .vic-tabs {
    padding: 4px;
  }

  .vic-tab {
    height: 36px;
    font-size: 12px;
  }

  .vic-title {
    font-size: 15px;
    margin-bottom: 2px;
  }

  .vic-sub {
    display: none;
  }

  .vic-row {
    gap: 6px;
  }

  .vic-fieldWrap {
    gap: 3px;
  }

  .vic-fieldWrap label {
    font-size: 10px;
  }

  .vic-input,
  .vic-btn {
    height: 38px;
    font-size: 12.5px;
  }

  .vic-actions {
    gap: 6px;
    margin-top: 8px;
  }

  .vic-hero-wrap {
    bottom: 200px;
  }
}
