:root {
  --bg: #f3f6fb;
  --bg-accent: #e7eef8;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #162033;
  --muted: #67748b;
  --line: rgba(22, 32, 51, 0.1);
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: rgba(37, 99, 235, 0.12);
  --success: #1f9d61;
  --success-soft: rgba(31, 157, 97, 0.12);
  --warning: #c77d1f;
  --warning-soft: rgba(199, 125, 31, 0.12);
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
  --shell-sidebar-width: 300px;
  --shell-space: 28px;
  --topbar-padding-x: 30px;
  --topbar-padding-y: 24px;
  --topbar-min-height: 126px;
  --topbar-copy-width: 700px;
  --card-radius: 24px;
  --card-padding: 24px;
  --surface-shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.05);
  --surface-shadow-medium: 0 10px 30px rgba(37, 99, 235, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.brand-badge,
.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-wrap {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}

.login-brand h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 0.96;
}

.login-brand p {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.6;
}

.login-card,
.card {
  background: #ffffff;
  backdrop-filter: none;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--surface-shadow-soft);
}

.login-card { padding: 32px; }
.login-card h2 { margin: 8px 0; font-size: 32px; }
.intro { margin: 0 0 12px; }

.stack-form { display: grid; gap: 12px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.btn-primary,
.btn-secondary,
button,
.logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease;
}

.btn-primary,
button {
  color: #fff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.btn-secondary,
.logout {
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.btn-primary:hover,
button:hover,
.btn-secondary:hover,
.logout:hover {
  transform: translateY(-1px);
}

.alert {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #9f1d1d;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.16);
}

.single-column { grid-template-columns: 1fr; }
.narrow-wrap { width: min(560px, 100%); }

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

@media (max-width: 760px) {
  .login-shell { padding: 18px; }
  .login-card { padding: 18px; }
}
