:root {
  --paper: #ece7dc;
  --ink: #182225;
  --muted: #5c6b70;
  --safety: #e0632a;
  --safety-dark: #c1541f;
  --focus-ring: 0 0 0 3px rgba(224, 99, 42, 0.35);
  --radius: 3px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-photo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px;
  position: relative;
  overflow: hidden;
  background-color: #0f1a20;
  background-image: url('/assets/images/aside.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  border-right: 5px solid var(--safety);
}
.auth-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 16, 20, 0.58), rgba(10, 16, 20, 0.12) 40%, rgba(10, 16, 20, 0.72));
  z-index: 0;
}
.auth-photo > * { position: relative; z-index: 1; }
.auth-logo img {
  display: block;
  width: auto;
  height: 44px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.auth-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.auth-tagline {
  max-width: 30ch;
  color: #f4f6f7;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.auth-foot {
  max-width: 34ch;
  color: #f4f6f7;
  font-size: 13px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.auth-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 48px;
  background: #fff;
}
.auth-wrap { width: 100%; max-width: 380px; }
.auth-wrap h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 600;
}
.auth-sub {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.auth-notice {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}
.auth-notice.error { color: #a8391f; background: #fff0eb; }
.auth-notice.success { color: #176b39; background: #edf8f0; }
.auth-field { margin-bottom: 20px; }
.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
}
.auth-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #c9c2b0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--safety);
  box-shadow: var(--focus-ring);
}
.auth-password { position: relative; }
.auth-password input { padding-right: 82px; }
.auth-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 4px 6px;
  border: 0;
  color: var(--muted);
  background: none;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transform: translateY(-50%);
}
.auth-toggle:focus-visible,
.auth-link:focus-visible,
.auth-submit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.auth-submit {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--safety);
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-submit:hover { background: var(--safety-dark); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  color: #a49c8b;
  font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8d1bf;
}
.auth-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: #c9c2b0;
  text-underline-offset: 3px;
}
.auth-link:hover { color: var(--ink); }
.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.auth-note a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #c9c2b0;
  text-underline-offset: 3px;
}
.auth-note a:hover { color: var(--safety-dark); }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-photo {
    min-height: 220px;
    height: 220px;
    padding: 20px 24px;
    background-image: none;
    border-right: 0;
    border-bottom: 5px solid var(--safety);
  }
  .auth-logo img { height: 68px; }
  .auth-content { min-height: calc(100vh - 220px); padding: 32px 24px; }
  .auth-tagline { display: none; }
}

@media (max-width: 480px) {
  .auth-content { padding: 28px 20px; }
}
