:root {
  --auth-ink: #17212b;
  --auth-blue: #1d3445;
  --auth-muted: #68737d;
  --auth-line: #dfe4e8;
  --auth-orange: #f28b28;
  --auth-orange-dark: #d86e0b;
  --auth-paper: #fff;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    linear-gradient(115deg, rgba(18, 32, 43, .96), rgba(23, 43, 57, .82)),
    url("/static/images/bg01.jpg") center / cover;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-layout {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 30rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .25);
}

.auth-card.auth-card-wide { max-width: 34rem; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 2rem;
  color: var(--auth-ink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-brand img {
  width: 2.35rem;
  height: 2.35rem;
  padding: .25rem;
  border-radius: .65rem;
  background: var(--auth-paper);
  box-shadow: 0 2px 8px rgba(23, 33, 43, .12);
}

.auth-eyebrow {
  margin: 0 0 .55rem;
  color: var(--auth-orange-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.auth-card h1,
.auth-card h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  letter-spacing: -.045em;
}

.auth-lead {
  margin: .65rem 0 1.7rem;
  color: var(--auth-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.auth-form { margin-top: 1.5rem; }

.auth-field { margin-bottom: 1rem; }

.auth-field label {
  display: block;
  margin-bottom: .45rem;
  color: #34424d;
  font-size: .8rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 3rem;
  padding: .75rem .9rem;
  border: 1px solid var(--auth-line);
  border-radius: .7rem;
  outline: none;
  color: var(--auth-ink);
  background: var(--auth-paper);
  font: inherit;
  font-size: .92rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-field input:focus {
  border-color: var(--auth-orange);
  box-shadow: 0 0 0 4px rgba(242, 139, 40, .14);
}

.auth-button,
.auth-link-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.15rem;
  border: 0;
  border-radius: .7rem;
  color: #fff;
  background: var(--auth-blue);
  box-shadow: 0 10px 20px rgba(29, 52, 69, .18);
  cursor: pointer;
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.auth-button:hover,
.auth-link-button:hover {
  color: #fff;
  background: #142837;
  box-shadow: 0 13px 24px rgba(29, 52, 69, .25);
  transform: translateY(-1px);
}

.auth-button-full { width: 100%; }

.auth-button-secondary {
  color: var(--auth-blue);
  background: #eef1f3;
  box-shadow: none;
}

.auth-button-secondary:hover { color: var(--auth-blue); background: #e2e8eb; }

.auth-message {
  margin: 1rem 0;
  padding: .75rem .85rem;
  border: 1px solid #f1c7bd;
  border-radius: .65rem;
  color: #963f31;
  background: #fff5f2;
  font-size: .82rem;
  line-height: 1.45;
}

.auth-message:empty { display: none; }

.auth-note {
  margin: 1rem 0 0;
  color: var(--auth-muted);
  font-size: .84rem;
  line-height: 1.55;
}

.auth-note strong { color: var(--auth-ink); }

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.auth-footer {
  margin-top: 2rem;
  color: #9aa3aa;
  font-size: .72rem;
  text-align: center;
}

.auth-role-list { display: grid; gap: .65rem; margin-top: 1.4rem; }

.auth-role-list a {
  display: flex;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .7rem 1rem;
  border-radius: .7rem;
  color: #fff;
  background: var(--auth-blue);
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
}

.auth-role-list a:hover { color: #fff; background: #142837; }

@media (max-width: 520px) {
  .auth-layout { padding: 1rem; }
  .auth-card { padding: 1.35rem; }
  .auth-actions > * { width: 100%; }
}
