:root {
  --paper: #f4f1e9;
  --ink: #1c2522;
  --muted: #66706b;
  --line: #d4d0c6;
  --green: #174f42;
  --green-2: #23705d;
  --mint: #b9decf;
  --red: #a14338;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 6%, rgba(185, 222, 207, .62), transparent 28rem),
    radial-gradient(circle at 5% 82%, rgba(227, 119, 67, .1), transparent 25rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button, input { -webkit-tap-highlight-color: transparent; }

button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(35, 112, 93, .28);
  outline-offset: 3px;
}

.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(100%, 470px);
  padding: 34px;
  border: 1px solid rgba(28, 37, 34, .13);
  border-radius: 26px;
  background: rgba(255, 253, 250, .78);
  box-shadow: 0 28px 80px rgba(37, 45, 41, .14);
  backdrop-filter: blur(20px);
}

.login-brand { display: flex; align-items: center; gap: 13px; padding-bottom: 27px; border-bottom: 1px solid rgba(28, 37, 34, .12); }
.login-brand > span:last-child { display: grid; gap: 3px; }
.login-brand strong { font-size: 17px; letter-spacing: -.02em; }
.login-brand small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.brand-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(23, 79, 66, .2);
}

.brand-mark i { width: 3px; display: block; border-radius: 3px; background: #fff; }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(5) { height: 8px; opacity: .65; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 17px; }
.brand-mark i:nth-child(3) { height: 25px; background: var(--mint); }

.login-copy { padding: 31px 0 23px; }
.eyebrow { margin: 0 0 10px; color: var(--green-2); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; letter-spacing: -.035em; }
.login-copy > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.login-error {
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 1px solid rgba(161, 67, 56, .24);
  border-radius: 12px;
  color: var(--red);
  background: rgba(161, 67, 56, .08);
  font-size: 13px;
  line-height: 1.45;
}

.login-form { display: grid; }
.login-form > label { margin: 0 0 7px; font-size: 12px; font-weight: 750; }
.login-form > input, .password-field { margin-bottom: 18px; }

.login-form input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #c8c5bc;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  font-size: 16px;
}

.login-form input:hover { border-color: #a8ada8; }
.login-form input:focus { border-color: var(--green-2); }

.password-field { position: relative; }
.password-field input { padding-right: 102px; }
.password-field button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: var(--green-2);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.password-field button:hover { background: rgba(35, 112, 93, .08); }

.submit-button {
  min-height: 54px;
  margin-top: 2px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 11px 24px rgba(23, 79, 66, .2);
  font-weight: 800;
  cursor: pointer;
}
.submit-button:hover { background: #1c6150; }
.submit-button:active { transform: translateY(1px); }

.form-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

@media (max-width: 520px) {
  .login-shell { place-items: start center; padding: max(18px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom)); }
  .login-card { padding: 25px 20px 24px; border-radius: 22px; }
  .login-brand { padding-bottom: 21px; }
  .login-copy { padding: 25px 0 20px; }
  h1 { font-size: 33px; }
}

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