/* Shared across login/signup/forgot-password/reset-password — the same design
   tokens canton-theme itself defines (canton-theme/src/index.css), hand-copied
   here since this is a server-rendered Spring page, not a React app that can
   import the library directly. Keep these values in sync with that file if
   canton-theme's palette ever changes.

   Light-only, deliberately: canton-theme defines a .dark/[data-theme='dark']
   token set, but neither frontend/web nor frontend/admin currently wires up
   anything that ever sets that class/attribute (confirmed: no data-theme,
   .dark, or prefers-color-scheme reference in either app's source) — they
   render light-only today regardless of OS preference. This page auto-
   switching via @media (prefers-color-scheme: dark) while the rest of the
   product stays light would be the actual inconsistency: a dark-OS user
   would see a light app but a dark login page. Matches current real
   behavior; revisit if/when the React apps get an actual theme toggle. */
:root {
  color-scheme: light;

  --color-canton-bg: #f7f3ea;
  --color-canton-bg-muted: #efe9db;
  --color-canton-surface: #ffffff;
  --color-canton-fg: #16130e;
  --color-canton-muted: #6b6558;
  --color-canton-placeholder: #9a9385;
  --color-canton-border: #e3ddcf;
  --color-canton-gold: #b9924a;
  --color-canton-gold-strong: #8c6d33;

  --font-display: 'Playfair Display', ui-serif, Georgia, serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-canton-bg);
  color: var(--color-canton-fg);
  font-family: var(--font-sans);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-canton-surface);
  border: 1px solid var(--color-canton-border);
  border-radius: 4px;
  padding: 40px 36px;
}

/* The mark's own natural bounding box (after its internal rotate() transforms)
   is ~80x41, not square — forcing a square box here just reintroduces the
   whitespace the tighter SVG viewBox was cropped to remove. width: auto lets
   it render at its real ~1.95:1 aspect ratio instead. */
.auth-logo {
  display: block;
  height: 30px;
  width: auto;
  margin: 0 auto 20px;
}

.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
}

.auth-subtitle {
  margin: 8px 0 28px;
  text-align: center;
  color: var(--color-canton-muted);
  font-size: 14px;
}

.auth-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--color-canton-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-canton-border);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-canton-muted);
}

a {
  font-size: 13px;
  color: var(--color-canton-gold-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.field-hint {
  font-size: 12px;
  color: var(--color-canton-muted);
}

input[type='email'],
input[type='password'],
input[type='text'] {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-canton-fg);
  background: var(--color-canton-surface);
  border: 1px solid var(--color-canton-border);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s;
}

input::placeholder {
  color: var(--color-canton-placeholder);
}

input:hover {
  border-color: color-mix(in srgb, var(--color-canton-fg) 40%, transparent);
}

input:focus-visible {
  border-color: var(--color-canton-gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-canton-gold) 30%, transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--color-canton-gold);
  color: var(--color-canton-bg);
  margin-top: 6px;
}

.btn-primary:hover {
  background: var(--color-canton-gold-strong);
}

.btn-outline {
  background: transparent;
  color: var(--color-canton-fg);
  border-color: color-mix(in srgb, var(--color-canton-fg) 30%, transparent);
}

.btn-outline:hover {
  border-color: var(--color-canton-fg);
  background: color-mix(in srgb, var(--color-canton-fg) 5%, transparent);
}

.btn-outline svg {
  height: 16px;
  width: 16px;
  flex-shrink: 0;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--color-canton-muted);
}

.auth-banner {
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 13px;
  text-align: center;
}

.auth-banner-error {
  background: color-mix(in srgb, #c0392b 12%, transparent);
  color: #c0392b;
  border: 1px solid color-mix(in srgb, #c0392b 30%, transparent);
}

.auth-banner-success {
  background: color-mix(in srgb, var(--color-canton-gold) 15%, transparent);
  color: var(--color-canton-gold-strong);
  border: 1px solid color-mix(in srgb, var(--color-canton-gold) 35%, transparent);
}

.strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.strength-bar {
  display: flex;
  flex: 1;
  gap: 4px;
}

.strength-bar span {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--color-canton-border);
  transition: background-color 0.15s;
}

.strength-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-canton-muted);
  white-space: nowrap;
}

.strength-weak {
  background: #c0392b;
}

.strength-fair {
  background: #c07a2b;
}

.strength-good {
  background: var(--color-canton-gold-strong);
}

.strength-strong {
  background: #3f7d52;
}

.strength-label.strength-weak {
  color: #c0392b;
}

.strength-label.strength-fair {
  color: #c07a2b;
}

.strength-label.strength-good {
  color: var(--color-canton-gold-strong);
}

.strength-label.strength-strong {
  color: #3f7d52;
}
