:root {
  color-scheme: dark;
  --bg: #0e120f;
  --bg-soft: #121812;
  --panel: rgba(24, 30, 24, 0.94);
  --panel-strong: #1b231b;
  --line: rgba(221, 235, 216, 0.11);
  --line-strong: rgba(221, 235, 216, 0.19);
  --text: #edf3eb;
  --muted: #a2aea2;
  --subtle: #748075;
  --accent: #c6f477;
  --accent-hover: #d3fb89;
  --accent-ink: #172111;
  --danger: #f18f85;
  --danger-soft: rgba(241, 143, 133, 0.1);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -18%, rgba(157, 205, 108, 0.1), transparent 30rem),
    radial-gradient(circle at 100% 100%, rgba(74, 111, 72, 0.08), transparent 24rem),
    var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px 24px;
}

.auth-card {
  width: min(100%, 430px);
  padding: 27px 28px 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(30, 38, 29, 0.96), rgba(19, 24, 19, 0.97));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(196, 243, 108, 0.02);
}

.auth-header,
.brand,
.access-badge,
.field-label-row,
.password-wrap,
.submit-button,
.auth-footer {
  display: flex;
  align-items: center;
}

.auth-header {
  justify-content: space-between;
  gap: 18px;
}

.brand {
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(198, 244, 119, 0.38);
  border-radius: 10px;
  color: var(--accent);
  background: rgba(198, 244, 119, 0.1);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.brand-caption {
  color: var(--subtle);
  font-size: 10px;
}

.access-badge {
  gap: 6px;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid rgba(198, 244, 119, 0.14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(198, 244, 119, 0.045);
  font-size: 10px;
  white-space: nowrap;
}

.access-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 244, 119, 0.1);
}

.auth-intro {
  margin-top: 49px;
}

.eyebrow {
  margin: 0;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin: 9px 0 0;
  color: var(--text);
  font-size: clamp(27px, 5vw, 33px);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.intro-copy {
  max-width: 335px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.login-form {
  margin-top: 28px;
}

.form-message {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 143, 133, 0.24);
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.4;
}

.form-message[hidden] {
  display: none;
}

.form-message:empty {
  display: none;
}

.field-group + .field-group {
  margin-top: 18px;
}

.field-label-row {
  justify-content: space-between;
  gap: 12px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.text-input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: rgba(8, 12, 8, 0.33);
  caret-color: var(--accent);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.text-input:hover {
  border-color: rgba(221, 235, 216, 0.29);
}

.text-input:focus {
  border-color: rgba(198, 244, 119, 0.62);
  background: rgba(8, 12, 8, 0.46);
  box-shadow: 0 0 0 3px rgba(198, 244, 119, 0.1);
  outline: 0;
}

.text-input:-webkit-autofill,
.text-input:-webkit-autofill:hover,
.text-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #182018 inset, 0 0 0 3px rgba(198, 244, 119, 0.08);
  transition: background-color 5000s ease-in-out 0s;
}

.password-wrap {
  position: relative;
}

.password-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--subtle);
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.password-toggle:hover {
  color: var(--accent);
  background: rgba(198, 244, 119, 0.08);
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.eye-icon-hidden {
  display: none;
}

.password-toggle.is-visible .eye-icon-visible {
  display: none;
}

.password-toggle.is-visible .eye-icon-hidden {
  display: block;
}

.submit-button {
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin-top: 25px;
  padding: 0 14px 0 16px;
  border: 1px solid rgba(198, 244, 119, 0.25);
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.submit-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 24px rgba(198, 244, 119, 0.11);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button svg {
  width: 17px;
  height: 17px;
}

.logout-form {
  margin-top: 28px;
}

.secondary-action {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.secondary-action:hover {
  color: var(--accent);
}

.auth-footer {
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 11px;
}

.secure-mark {
  display: inline-flex;
  color: var(--accent);
  opacity: 0.8;
}

.secure-mark svg {
  width: 15px;
  height: 15px;
}

.page-note {
  margin: 17px 0 0;
  color: var(--subtle);
  font-size: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .auth-page {
    justify-content: flex-start;
    padding: 19px 14px 20px;
  }

  .auth-card {
    padding: 21px 18px 19px;
    border-radius: 15px;
  }

  .auth-header {
    align-items: flex-start;
  }

  .access-badge {
    margin-top: 3px;
  }

  .auth-intro {
    margin-top: 42px;
  }

  .intro-copy {
    max-width: 300px;
  }
}

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