:root {
  color-scheme: light;
  --ink: #151629;
  --muted: #62647a;
  --line: #dfe1ec;
  --surface: #ffffff;
  --surface-soft: #f6f5ff;
  --cyan: #0aa9c4;
  --violet: #7137de;
  --success: #16845b;
  --danger: #bd3650;
  --shadow: 0 24px 70px rgba(37, 29, 72, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(10, 169, 196, 0.12), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(113, 55, 222, 0.13), transparent 34rem),
    #f9f9fd;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(113, 55, 222, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(10, 169, 196, 0.06), rgba(113, 55, 222, 0.08));
}

.brand img {
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 16px rgba(91, 54, 190, 0.2));
}

.brand p {
  margin: 0;
}

.brand__name {
  font-size: 1.14rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand__context {
  margin-top: 3px !important;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.auth-content {
  padding: 42px 36px 38px;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

p {
  color: var(--muted);
  line-height: 1.62;
}

.status__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: 3px solid rgba(113, 55, 222, 0.18);
  border-top-color: var(--violet);
  border-radius: 50%;
}

.status--loading .status__icon {
  animation: spin 0.9s linear infinite;
}

.status--success .status__icon,
.status--error .status__icon {
  position: relative;
  border: 0;
  background: color-mix(in srgb, var(--success) 13%, white);
}

.status--success .status__icon::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 11px;
  left: 14px;
  top: 16px;
  border-left: 4px solid var(--success);
  border-bottom: 4px solid var(--success);
  transform: rotate(-45deg);
}

.status--error .status__icon {
  background: color-mix(in srgb, var(--danger) 12%, white);
}

.status--error .status__icon::before,
.status--error .status__icon::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 4px;
  left: 14px;
  top: 24px;
  border-radius: 2px;
  background: var(--danger);
}

.status--error .status__icon::before {
  transform: rotate(45deg);
}

.status--error .status__icon::after {
  transform: rotate(-45deg);
}

label {
  display: block;
  margin-top: 22px;
  margin-bottom: 8px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid #c9cada;
  border-radius: 12px;
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(113, 55, 222, 0.12);
}

.hint,
.security-note {
  margin: 8px 0 0;
  font-size: 0.84rem;
}

.validation {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 12px 18px;
  color: #fff;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(115deg, var(--cyan), var(--violet));
  box-shadow: 0 12px 24px rgba(88, 51, 189, 0.2);
  cursor: pointer;
  font-weight: 800;
}

.button:hover {
  filter: brightness(1.04);
}

.button:focus-visible {
  outline: 3px solid rgba(10, 169, 196, 0.3);
  outline-offset: 3px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

footer {
  padding: 16px 28px 20px;
  color: #77798c;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  text-align: center;
}

.lock {
  color: var(--success);
  font-size: 0.7rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .page-shell {
    display: block;
    padding: 0;
    background: var(--surface);
  }

  .auth-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand {
    padding: 18px 20px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .auth-content {
    padding: 34px 20px 28px;
  }

  footer {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
