:root {
  --paper: #fffaf0;
  --ink: #16120d;
  --muted: #6f6659;
  --line: #16120d;
  --acid: #f7d84c;
  --mint: #55b89a;
  --blue: #3868ff;
  --rose: #ff6b7a;
  --surface: #f7efe1;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20px 20px, rgba(22, 18, 13, 0.15) 0 3px, transparent 4px) 0 0 / 42px 42px,
    linear-gradient(180deg, #fffaf0 0%, #f4ead8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--acid);
  border: 3px solid var(--line);
  padding: 10px 14px;
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(18px, 5vw, 72px);
}

.brand-panel,
.login-panel {
  border: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 12px 12px 0 var(--line);
}

.brand-panel {
  min-height: min(720px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(247, 216, 76, 0.28), transparent 34%),
    linear-gradient(315deg, rgba(85, 184, 154, 0.32), transparent 38%),
    var(--paper);
}

.brand-lockup {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--line);
  transform: rotate(-1deg);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-weight: 1000;
}

.brand-lockup strong,
.brand-lockup em {
  display: block;
  font-style: normal;
  line-height: 1.05;
}

.brand-lockup strong {
  font-size: 18px;
  font-weight: 1000;
}

.brand-lockup em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 860px;
}

.eyebrow,
.panel-tag {
  color: var(--blue);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.92;
  font-weight: 1000;
}

h2 {
  margin: 10px 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.98;
  font-weight: 1000;
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.role-card {
  min-height: 148px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--line);
  cursor: pointer;
}

.role-card.active {
  background: var(--acid);
  transform: translate(-2px, -2px);
}

.role-card span,
.role-card strong {
  display: block;
}

.role-card span {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 1000;
  text-transform: uppercase;
}

.role-card strong {
  font-size: clamp(18px, 2.1vw, 28px);
  line-height: 1.08;
  font-weight: 1000;
}

.login-panel {
  width: 100%;
  padding: clamp(22px, 4vw, 38px);
  background: var(--paper);
}

.panel-tag {
  display: inline-flex;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--acid);
  border: 3px solid var(--line);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--line);
  transform: rotate(-1.5deg);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-form.compact {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  color: var(--ink);
  background: #fffdf6;
  border: 3px solid var(--line);
  border-radius: 6px;
  outline: none;
}

input:focus {
  background: #eef3ff;
  box-shadow: 0 0 0 4px rgba(56, 104, 255, 0.18);
}

.primary-action,
.secondary-action {
  min-height: 58px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--line);
  font-weight: 1000;
  cursor: pointer;
}

.primary-action {
  color: var(--paper);
  background: var(--ink);
}

.secondary-action {
  color: var(--ink);
  background: var(--mint);
}

.primary-action:hover,
.secondary-action:hover,
.role-card:hover,
.brand-lockup:hover {
  transform: translate(-2px, -2px);
}

.feedback {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.45;
}

.feedback[data-tone="success"] {
  color: #176b4e;
}

.feedback[data-tone="danger"] {
  color: #a82831;
}

.hidden {
  display: none !important;
}

.bootstrap-box {
  margin-top: 24px;
  padding: 16px;
  background: #fffdf6;
  border: 3px solid var(--line);
  border-radius: var(--radius);
}

.bootstrap-box summary {
  cursor: pointer;
  font-weight: 1000;
}

.back-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 900;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--blue);
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .brand-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 14px;
  }

  .brand-panel,
  .login-panel {
    box-shadow: 7px 7px 0 var(--line);
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: 118px;
  }
}

/* Clean single-entry login refresh */
:root {
  --paper: #fffdf6;
  --surface: #f3ead7;
  --ink: #14110d;
  --muted: #6b6256;
  --line: #14110d;
  --acid: #f4d655;
  --mint: #57b89d;
  --blue: #2f61ff;
  --radius: 8px;
}

body {
  background:
    linear-gradient(90deg, rgba(20, 17, 13, 0.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, #fffdf6 0%, #f6efdf 100%);
}

.login-shell {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 480px);
  gap: clamp(22px, 4vw, 52px);
  max-width: 1240px;
  margin: 0 auto;
}

.brand-panel,
.login-panel {
  border-width: 3px;
  box-shadow: 9px 9px 0 var(--line);
}

.brand-panel {
  min-height: min(600px, calc(100vh - 96px));
  background:
    linear-gradient(130deg, rgba(244, 214, 85, 0.24), transparent 36%),
    linear-gradient(320deg, rgba(87, 184, 157, 0.24), transparent 42%),
    var(--paper);
}

.hero-copy {
  margin: auto 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.94;
}

.hero-copy p {
  max-width: 680px;
}

.login-panel {
  align-self: center;
  background: rgba(255, 253, 246, 0.94);
}

.panel-tag {
  box-shadow: 3px 3px 0 var(--line);
}

.auth-form {
  gap: 16px;
}

input {
  border-width: 2px;
  min-height: 56px;
}

.primary-action,
.secondary-action {
  border-width: 2px;
  box-shadow: 5px 5px 0 var(--acid);
}

.primary-action {
  background: var(--ink);
}

.bootstrap-box {
  border-width: 2px;
  background: rgba(255, 255, 255, 0.46);
}

.login-hint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.login-hint-grid span {
  border: 2px solid rgba(20, 17, 13, 0.14);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  padding: 10px;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .login-hint-grid {
    grid-template-columns: 1fr;
  }
}

/* AI-native login motion */
.brand-panel,
.login-panel,
.brand-lockup,
.panel-tag,
.primary-action,
.secondary-action,
.login-hint-grid span {
  transition:
    transform 180ms cubic-bezier(0.2, 0.9, 0.22, 1),
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.brand-panel,
.login-panel {
  animation: login-rise 520ms ease both;
}

.login-panel {
  animation-delay: 90ms;
}

.brand-panel {
  overflow: hidden;
  position: relative;
}

.brand-panel::before {
  animation: login-signal-sweep 6s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(87, 224, 177, 0.22), transparent);
  content: "";
  inset: 0 auto 0 -42%;
  position: absolute;
  width: 34%;
}

.brand-panel::after {
  animation: login-node-float 4.5s ease-in-out infinite;
  background:
    radial-gradient(circle, #ff4934 0 4px, transparent 5px),
    radial-gradient(circle at 68% 30%, #57e0b1 0 5px, transparent 6px),
    radial-gradient(circle at 36% 72%, #f7d84c 0 5px, transparent 6px);
  content: "";
  height: 150px;
  opacity: 0.9;
  position: absolute;
  right: 28px;
  top: 28px;
  width: 150px;
}

.hero-copy,
.brand-lockup {
  position: relative;
  z-index: 1;
}

.brand-mark {
  overflow: hidden;
  position: relative;
}

.brand-mark::after {
  animation: mark-glint 2.7s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 253, 246, 0.76), transparent);
  content: "";
  inset: -20% auto -20% -80%;
  position: absolute;
  transform: rotate(20deg);
  width: 60%;
}

.primary-action {
  overflow: hidden;
  position: relative;
}

.primary-action::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  content: "";
  inset: 0 auto 0 -60%;
  position: absolute;
  transform: skewX(-20deg);
  width: 50%;
}

.primary-action:hover,
.secondary-action:hover,
.brand-lockup:hover {
  transform: translateY(-2px);
}

.primary-action:hover::after {
  animation: login-button-glint 720ms ease;
}

.login-hint-grid span:hover {
  background: #fff6d8;
  border-color: rgba(20, 17, 13, 0.28);
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-signal-sweep {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(430%);
  }
}

@keyframes login-node-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(4deg);
  }
}

@keyframes mark-glint {
  0%,
  48% {
    left: -80%;
  }
  72%,
  100% {
    left: 130%;
  }
}

@keyframes login-button-glint {
  from {
    left: -60%;
  }
  to {
    left: 130%;
  }
}

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