:root {
  --bg: #f5f7fa;
  --text: #172033;
  --muted: #667085;
  --line: #dfe4ea;
  --surface: #ffffff;
  --accent: #111827;
  --focus: #2563eb;
  --danger-bg: #fff1f2;
  --danger-text: #9f1239;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
}

.brand-panel {
  background: #111827;
  color: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.brand span { font-weight: 400; opacity: .72; }
.tagline { margin-top: 10px; opacity: .72; font-size: 16px; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}

.card {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 14px 36px rgba(17,24,39,.08);
}

.heading h1 { margin: 0; font-size: 28px; letter-spacing: -.4px; }
.heading p { margin: 8px 0 28px; color: var(--muted); line-height: 1.5; }

label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.label-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top: 20px; }
.label-row label { margin-bottom: 8px; }
a { color: #344054; text-decoration: none; font-size: 13px; }
a:hover { text-decoration: underline; }

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  background: white;
  outline: none;
}
input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37,99,235,.13); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 86px; }
.show-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #344054;
  font-weight: 650;
  cursor: pointer;
}

.primary {
  margin-top: 24px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.primary:disabled { opacity: .58; cursor: wait; }

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 14px;
}

.security-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.security-note span { margin-right: 7px; }

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
footer span { margin-right: auto; }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 210px; padding: 28px; }
  .login-panel { padding: 22px; }
  .card { padding: 28px 22px; }
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.show-password { min-height: 44px; padding: 0 8px; }
.card { min-width: 0; }
@media (max-width: 420px) {
  .brand-panel { min-height: 150px; padding: 24px; }
  .login-panel { padding: 20px 12px; }
  .card { padding: 26px 20px; }
  .label-row { flex-wrap: wrap; gap: 0 12px; margin-bottom: 8px; }
  .label-row a { line-height: 1.6; }
}
