:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  --panel: rgba(15, 23, 22, 0.96);
  --panel-line: rgba(255, 255, 255, 0.12);
  --text: #f2f7f5;
  --muted: #a8b8b3;
  --accent: #19b895;
  --accent-hover: #0fa681;
  --focus: #67d8bd;
  --danger: #ff8791;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #0b1110;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

.auth-backdrop,
.auth-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-backdrop {
  object-fit: cover;
}

.auth-shade {
  background: rgba(5, 10, 9, 0.72);
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #178fba;
  color: #ffffff;
  font-weight: 800;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 17px;
}

.auth-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.auth-heading {
  margin: 44px 0 30px;
}

.auth-heading p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.auth-heading h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-heading span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: #d6e1dd;
  font-size: 13px;
  font-weight: 600;
}

.field-control {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 38px;
  align-items: center;
  min-height: 50px;
  padding: 0 8px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.field-control:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(103, 216, 189, 0.13);
}

.field-control > svg {
  width: 18px;
  height: 18px;
  color: #8ca29b;
}

.field-control input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
}

.field-control input:-webkit-autofill,
.field-control input:-webkit-autofill:hover,
.field-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #182220 inset;
}

.reveal-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9fb1ab;
}

.reveal-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.reveal-button svg {
  width: 18px;
  height: 18px;
}

.form-options {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.remember-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c8d4d0;
  font-size: 13px;
}

.remember-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.session-note {
  color: #7f928c;
  font-size: 12px;
}

.form-message {
  min-height: 22px;
  margin: 2px 0 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #06100d;
  font-weight: 800;
}

.login-button:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-button svg {
  width: 18px;
  height: 18px;
}

.auth-panel footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 28px;
  color: #789089;
  font-size: 11px;
}

.auth-panel footer svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 560px) {
  .auth-shell {
    align-items: stretch;
    padding: 0;
  }

  .auth-panel {
    width: 100%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 0;
    padding: 30px 24px;
    background: rgba(13, 20, 19, 0.95);
  }

  .auth-heading {
    margin-top: 52px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-panel {
    animation: auth-enter 260ms ease-out both;
  }

  @keyframes auth-enter {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
