:root {
  color-scheme: light;
  --background: #f8fafc;
  --foreground: #1f2937;
  --card: #ffffff;
  --secondary: #ffffff;
  --muted-foreground: #64748b;
  --accent: #2563eb;
  --border: #cbd5e1;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.login-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-container { width: 100%; max-width: 380px; }
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.brand-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.brand-name-for { color: #081729; }
.brand-name-warny { color: #aeaeae; }
.login-heading {
  margin: 0 0 32px;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: center;
}
.login-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
#kc-form-login { display: flex; flex-direction: column; }
.field-label {
  margin: 0 0 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.field-label:not(:first-child) { margin-top: 16px; }
input {
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: 0;
  background: #f1f5f9;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted-foreground); }
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: flex;
  padding: 2px;
  border: 0;
  transform: translateY(-50%);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.password-toggle svg { stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }
.submit-button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.submit-button:hover { opacity: .88; }
.submit-button:focus-visible, .password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--error-border);
  border-radius: 7px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 13px;
}
.login-error svg { flex: 0 0 auto; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 480px) { .login-page { padding: 18px; } .login-card { padding: 24px; } }
