:root {
  --ink: #071c24;
  --lime: #cafa4b;
  --canvas: #f7f8f5;
  --line: #dce3de;
  --muted: #65727a;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
}
body {
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}
.auth-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  max-width: 1600px;
  margin: auto;
}
.auth-hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: var(--ink);
}
.auth-hero > img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% center;
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 28, 36, 0.35),
    rgba(7, 28, 36, 0.06) 30%,
    rgba(7, 28, 36, 0.92)
  );
}
.auth-brand {
  position: absolute;
  z-index: 1;
  top: 48px;
  left: 48px;
  color: var(--lime);
  text-decoration: none;
  font-size: 28px;
  line-height: 0.87;
  letter-spacing: -0.06em;
  font-weight: 800;
}
.auth-brand span {
  display: block;
}
.auth-story {
  position: absolute;
  z-index: 1;
  left: 48px;
  right: 48px;
  bottom: 56px;
  color: white;
}
.hero-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--lime);
}
.auth-story h2 {
  margin: 18px 0;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}
.auth-story > p:last-child {
  max-width: 390px;
  color: #e0e9e3;
  font-size: 14px;
  line-height: 1.7;
}
.auth-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 48px;
  background: white;
}
.auth-card-content {
  width: 100%;
  max-width: 400px;
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
h1 {
  margin: 0 0 12px;
  font-size: 34px;
  letter-spacing: -0.05em;
  line-height: 1.12;
}
.intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 32px;
}
form {
  display: grid;
  gap: 19px;
}
label {
  display: block;
  color: #34464d;
  font-size: 12px;
  font-weight: 600;
}
input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}
input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(202, 250, 75, 0.3);
}
input::placeholder {
  color: #8a9498;
}
.password-field {
  display: block;
  position: relative;
}
.password-field input {
  padding-right: 94px;
}
.password-field button {
  position: absolute;
  top: 0;
  right: 5px;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #53664d;
  font-size: 11px;
  font-weight: 700;
}
.primary {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s;
}
.primary:hover {
  background: #183b42;
}
.primary:disabled {
  cursor: wait;
  opacity: 0.6;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
}
.auth-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #36552a;
  font-size: 11px;
  font-weight: 700;
}
.account-storage {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.separate-access {
  color: var(--muted);
  font-size: 11px;
  margin: 16px 0 0;
}
.separate-access a {
  color: #36552a;
  font-weight: 600;
  text-decoration: none;
}
.separate-access i {
  padding: 0 6px;
  font-style: normal;
}
.auth-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff2f1;
  color: #9b2c2c;
  font-size: 12px;
  line-height: 1.5;
}
.auth-message.success {
  background: #f0f8df;
  color: #344a13;
}
.auth-message.notice {
  background: #f1f5ed;
  color: #41523b;
}
.auth-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(7, 28, 36, 0.26);
}
.auth-dialog::backdrop {
  background: rgba(7, 28, 36, 0.45);
  backdrop-filter: blur(4px);
}
.dialog-body {
  padding: 28px;
}
.dialog-body h2 {
  font-size: 26px;
  letter-spacing: -0.045em;
  margin: 8px 0;
}
.dialog-body p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.dialog-body form {
  margin-top: 20px;
  gap: 14px;
}
.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}
.roles button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.roles button.active {
  background: #f0f8df;
  border-color: #8daf43;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.dialog-actions button {
  flex: 1;
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.dialog-actions button:last-child {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}
@media (max-width: 760px) {
  .auth-page {
    display: block;
  }
  .auth-hero {
    min-height: 290px;
  }
  .auth-brand {
    left: 24px;
    top: 28px;
    font-size: 23px;
  }
  .auth-story {
    left: 24px;
    right: 24px;
    bottom: 28px;
  }
  .hero-eyebrow {
    font-size: 8px;
  }
  .auth-story h2 {
    font-size: 31px;
    margin: 10px 0 0;
  }
  .auth-story > p:last-child {
    display: none;
  }
  .auth-card {
    position: relative;
    z-index: 2;
    margin-top: -18px;
    border-radius: 22px 22px 0 0;
    padding: 34px 24px;
  }
  h1 {
    font-size: 29px;
  }
  .intro {
    font-size: 13px;
    margin-bottom: 26px;
  }
  input {
    font-size: 16px;
  }
  .dialog-body {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
