/*src/Ovhok.Web/wwwroot/css/identity.css*/
/*
 * Ovhok Identity UI
 * Depends on brand-tokens.css and contains no independent brand palette.
 */
:root {
  --identity-navy: var(--ov-inverse-surface, #17213d);
  --identity-blue: var(--ov-primary, #00179b);
  --identity-electric: var(--ov-secondary, #0169fb);
  --identity-orange: var(--ov-accent, #fe7d03);
  --identity-amber: var(--ov-tertiary, #fcb906);
  --identity-ink: var(--ov-on-surface, #0b1739);
  --identity-muted: var(--ov-on-surface-variant, #5d6982);
  --identity-border: var(--ov-outline-variant, #d7deea);
  --identity-surface: var(--ov-surface, #ffffff);
  --identity-page: var(--ov-background, #f6f8fc);
  --identity-danger: var(--ov-danger, #b42318);
  --identity-success: var(--ov-success, #067647);
  --identity-shadow:
    var(--ov-shadow-float, 0 24px 65px rgb(7 23 68 / 0.16));
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--identity-page);
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--identity-ink);
  background: var(--identity-page);
  font-family: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.identity-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.12fr) minmax(25rem, 0.88fr);
}

.identity-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  align-items: flex-end;
  padding: clamp(2rem, 5vw, 5rem);
  color: #ffffff;
  background:
    radial-gradient(
      circle at 84% 18%,
      rgb(252 185 6 / 0.18),
      transparent 27%
    ),
    linear-gradient(
      145deg,
      var(--identity-navy) 0%,
      var(--identity-blue) 56%,
      var(--identity-electric) 100%
    );
}

.identity-brand::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.15) 1px, transparent 1px),
    linear-gradient(
      90deg,
      rgb(255 255 255 / 0.15) 1px,
      transparent 1px
    );
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000000 0, transparent 85%);
}

.identity-brand::after {
  position: absolute;
  z-index: -2;
  right: -12rem;
  bottom: -11rem;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  content: "";
  background:
    radial-gradient(
      circle at 35% 35%,
      color-mix(in srgb, var(--identity-amber) 92%, white),
      color-mix(in srgb, var(--identity-orange) 54%, transparent) 42%,
      transparent 70%
    );
  filter: blur(2px);
  animation: identity-float 9s ease-in-out infinite;
}

.identity-orb {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.identity-orb-one {
  top: 7%;
  right: 8%;
  width: 19rem;
  height: 19rem;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 55px rgb(255 255 255 / 0.08);
  animation: identity-float 11s ease-in-out infinite reverse;
}

.identity-orb-two {
  top: 17%;
  left: 12%;
  width: 7rem;
  height: 7rem;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--identity-electric) 70%, transparent),
      color-mix(in srgb, var(--identity-amber) 55%, transparent)
    );
  animation: identity-pulse 7s ease-in-out infinite;
}

.identity-brand-content {
  position: relative;
  z-index: 2;
  width: min(100%, 43rem);
}

.identity-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.identity-logo img {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.35rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}

.identity-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 4.5rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  padding: 0.42rem 0.68rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.identity-kicker-dot {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: var(--identity-amber);
  box-shadow:
    0 0 0 0.24rem
    color-mix(in srgb, var(--identity-amber) 18%, transparent);
}

.identity-brand h1 {
  max-width: 42rem;
  margin: 1rem 0 0;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.identity-brand-copy {
  max-width: 37rem;
  margin: 1.3rem 0 0;
  color: rgb(255 255 255 / 0.78);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.7;
}

.identity-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

.identity-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 0.75rem;
  color: rgb(255 255 255 / 0.88);
  background: rgb(4 14 47 / 0.28);
  padding: 0.65rem 0.78rem;
  font-size: 0.72rem;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.identity-trust svg {
  width: 1rem;
  height: 1rem;
}

.identity-panel {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(
      circle at 85% 15%,
      color-mix(in srgb, var(--identity-electric) 12%, transparent),
      transparent 28%
    ),
    radial-gradient(
      circle at 8% 90%,
      color-mix(in srgb, var(--identity-orange) 10%, transparent),
      transparent 24%
    ),
    var(--identity-page);
}

.identity-panel::before {
  position: absolute;
  top: -8rem;
  right: -8rem;
  width: 17rem;
  height: 17rem;
  border:
    1px solid
    color-mix(in srgb, var(--identity-electric) 12%, transparent);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 2.6rem
      color-mix(in srgb, var(--identity-electric) 3.5%, transparent),
    0 0 0 5.3rem
      color-mix(in srgb, var(--identity-electric) 2%, transparent);
}

.identity-home {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--identity-border);
  border-radius: 999px;
  color: var(--identity-muted);
  background: rgb(255 255 255 / 0.84);
  padding: 0.52rem 0.72rem;
  font-size: 0.73rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 7px 22px rgb(7 23 68 / 0.08);
  backdrop-filter: blur(12px);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.identity-home:hover {
  border-color:
    color-mix(in srgb, var(--identity-electric) 45%, transparent);
  color: var(--identity-blue);
  transform: translateY(-1px);
}

.identity-home svg {
  width: 1rem;
  height: 1rem;
}

.identity-card {
  position: relative;
  z-index: 2;
  width: min(100%, 29rem);
  border:
    1px solid
    color-mix(in srgb, var(--identity-border) 92%, transparent);
  border-radius: 1.45rem;
  background: rgb(255 255 255 / 0.92);
  padding: clamp(1.3rem, 3vw, 2rem);
  box-shadow: var(--identity-shadow);
  backdrop-filter: blur(20px);
  animation:
    identity-enter 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.identity-mobile-logo {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
  color: var(--identity-blue);
  font-size: 1.22rem;
  font-weight: 900;
}

.identity-mobile-logo img {
  width: 2.45rem;
  height: 2.45rem;
}

.identity-eyebrow {
  margin: 0;
  color: var(--identity-electric);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.identity-card h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.identity-subtitle {
  margin: 0.65rem 0 0;
  color: var(--identity-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.identity-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.45rem;
}

.identity-field {
  display: grid;
  gap: 0.38rem;
}

.identity-label {
  color: var(--identity-ink);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.identity-input-row {
  display: grid;
  grid-template-columns: minmax(7.2rem, 8.5rem) minmax(0, 1fr);
  gap: 0.5rem;
}

.identity-control-wrap {
  position: relative;
}

.identity-control,
.identity-select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--identity-border);
  border-radius: 0.82rem;
  color: var(--identity-ink);
  background: var(--identity-surface);
  padding: 0.7rem 0.78rem;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.identity-control::placeholder {
  color: color-mix(in srgb, var(--identity-muted) 68%, white);
}

.identity-control:focus,
.identity-select:focus {
  border-color: var(--identity-electric);
  box-shadow:
    var(--ov-focus-ring, 0 0 0 0.23rem rgb(1 105 251 / 0.12));
}

.identity-control.has-leading-icon {
  padding-right: 2.8rem;
  padding-left: 2.55rem;
}

.identity-leading-icon {
  position: absolute;
  top: 50%;
  left: 0.82rem;
  width: 1rem;
  height: 1rem;
  color: var(--identity-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.identity-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.55rem;
  color: var(--identity-muted);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  place-items: center;
}

.identity-password-toggle:hover {
  color: var(--identity-blue);
  background: var(--ov-secondary-soft, #eaf3ff);
}

.identity-password-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.identity-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.identity-check {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  color: var(--identity-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.identity-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--identity-blue);
}

.identity-captcha {
  border:
    1px solid
    color-mix(
      in srgb,
      var(--identity-electric) 18%,
      var(--identity-border)
    );
  border-radius: 0.9rem;
  background:
    linear-gradient(
      135deg,
      var(--ov-secondary-soft, #eaf3ff),
      var(--ov-accent-soft, #fff0e4)
    );
  padding: 0.78rem;
}

.identity-captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.48rem;
}

.identity-captcha strong {
  color: var(--identity-ink);
  font-size: 0.76rem;
}

.identity-captcha span {
  color: var(--identity-blue);
  font-size: 0.68rem;
  font-weight: 900;
}

.identity-submit {
  position: relative;
  display: inline-flex;
  min-height: 3rem;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 0.86rem;
  color: #ffffff;
  background:
    linear-gradient(
      105deg,
      var(--identity-blue),
      var(--identity-electric)
    );
  font-weight: 850;
  box-shadow: 0 12px 24px rgb(0 23 155 / 0.22);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.identity-submit::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(
      105deg,
      transparent,
      rgb(255 255 255 / 0.26),
      transparent
    );
  transform: translateX(-115%);
  transition: transform 0.5s ease;
}

.identity-submit:hover {
  box-shadow: 0 16px 30px rgb(0 23 155 / 0.27);
  transform: translateY(-1px);
}

.identity-submit:hover::after {
  transform: translateX(115%);
}

.identity-submit:active {
  transform: translateY(0) scale(0.995);
}

.identity-submit[disabled] {
  cursor: wait;
  filter: saturate(0.72);
}

.identity-submit svg {
  width: 1.05rem;
  height: 1.05rem;
}

.identity-validation {
  color: var(--identity-danger);
  font-size: 0.69rem;
  font-weight: 650;
}

.identity-validation:empty {
  display: none;
}

.identity-summary {
  border:
    1px solid
    color-mix(in srgb, var(--identity-danger) 28%, transparent);
  border-radius: 0.75rem;
  color: var(--identity-danger);
  background: var(--ov-danger-soft, #fff0ef);
  padding: 0.65rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.identity-summary:empty,
.identity-summary.validation-summary-valid {
  display: none;
}

.identity-support {
  margin: 1.2rem 0 0;
  color: var(--identity-muted);
  font-size: 0.74rem;
  text-align: center;
}

.identity-support a {
  color: var(--identity-blue);
  font-weight: 850;
  text-decoration: none;
}

.identity-support a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.identity-dev {
  margin-top: 1rem;
  border:
    1px solid
    color-mix(
      in srgb,
      var(--identity-amber) 34%,
      var(--identity-border)
    );
  border-radius: 0.85rem;
  background: var(--ov-tertiary-soft, #fff7d6);
  padding: 0.75rem;
}

.identity-dev summary {
  color: #745000;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.identity-dev-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.identity-dev-row {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  color: #69410a;
  font-size: 0.67rem;
}

.identity-dev-row code {
  min-width: 0;
  overflow: hidden;
  border-radius: 0.35rem;
  background: rgb(255 255 255 / 0.75);
  padding: 0.25rem 0.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-copy {
  border:
    1px solid
    color-mix(
      in srgb,
      var(--identity-amber) 46%,
      var(--identity-border)
    );
  border-radius: 0.4rem;
  color: #745000;
  background: #ffffff;
  padding: 0.25rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 850;
  cursor: pointer;
}

.identity-copy:hover {
  border-color: var(--identity-orange);
  color: var(--identity-orange-hover, #d95f00);
}

@keyframes identity-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes identity-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-12px, -18px, 0);
  }
}

@keyframes identity-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@media (max-width: 62rem) {
  .identity-shell {
    grid-template-columns: 1fr;
  }

  .identity-brand {
    display: none;
  }

  .identity-panel {
    padding-top: 4.5rem;
  }

  .identity-mobile-logo {
    display: flex;
  }
}

@media (max-width: 32rem) {
  .identity-panel {
    padding-inline: 0.75rem;
  }

  .identity-card {
    border-radius: 1.1rem;
    padding: 1.05rem;
  }

  .identity-input-row {
    grid-template-columns: 7rem minmax(0, 1fr);
  }

  .identity-dev-row {
    grid-template-columns: 4.4rem minmax(0, 1fr);
  }

  .identity-dev-row .identity-copy {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.identity-captcha-refresh {
  min-height: 2rem;
  border: 1px solid rgb(1 105 251 / 0.22);
  border-radius: 0.6rem;
  padding: 0.35rem 0.62rem;
  color: var(--identity-blue);
  background: #ffffff;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
}

.identity-captcha-refresh:hover,
.identity-captcha-refresh:focus-visible {
  border-color: var(--identity-electric);
  outline: none;
  background: var(--ov-secondary-soft, #eaf3ff);
}

.identity-captcha-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.identity-captcha-image {
  display: block;
  width: 100%;
  height: 5.4rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--identity-border);
  border-radius: 0.72rem;
  background: #ffffff;
  object-fit: contain;
}

.identity-captcha-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--identity-ink);
  font-size: 0.7rem;
  font-weight: 800;
}

.identity-captcha-status {
  display: block;
  min-height: 1rem;
  margin-top: 0.35rem;
  color: var(--identity-muted) !important;
  font-size: 0.66rem !important;
  font-weight: 650 !important;
}
