/* ── Reset & base ────────────────────────────────────────── */
html, body, .login-pf body {
  background: #f3f4f6 !important;
  background-image: none !important;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: #111827;
}

.login-pf-page {
  background: #f3f4f6 !important;
  display: grid !important;
  grid-template-rows: auto 1fr;
  min-height: 100vh !important;
}

/* ── Top header bar (logo) ───────────────────────────────── */
.login-pf-page-header {
  background: #1e293b;
  padding: 0.875rem 1.5rem;
  text-align: left;
}

/* ── Card ────────────────────────────────────────────────── */
.card-pf {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
  max-width: 460px;
  width: 100%;
  margin: 2rem auto !important;
  align-self: center;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .card-pf {
    margin: 1rem !important;
    width: calc(100% - 2rem);
    padding: 1.5rem 1.25rem;
  }
}

/* ── Page title ──────────────────────────────────────────── */
.login-pf-header {
  margin-bottom: 1.5rem;
}

#kc-page-title {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* ── Labels ──────────────────────────────────────────────── */
.pf-c-form__label,
.pf-c-form__label-text {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Form groups ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

/* ── Inputs ──────────────────────────────────────────────── */
.pf-c-form-control {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  color: #111827 !important;
  font-size: 0.9rem !important;
  height: 40px;
  padding: 0 0.75rem !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.pf-c-form-control:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

.pf-c-form-control:focus-visible,
.pf-c-form-control:focus-within,
#username:focus,
#password:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

/* ── Password toggle button ──────────────────────────────── */
.pf-c-input-group {
  display: flex;
}

.pf-c-button.pf-m-control {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-left: none !important;
  border-radius: 0 6px 6px 0 !important;
  color: #6b7280 !important;
  padding: 0 0.75rem;
}

.pf-c-input-group .pf-c-form-control {
  border-radius: 6px 0 0 6px !important;
}

/* ── Primary button ──────────────────────────────────────── */
.pf-c-button.pf-m-primary,
input.pf-c-button.pf-m-primary {
  background: #2563eb !important;
  border: none !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  height: 40px;
  transition: background 0.15s !important;
  width: 100%;
}

.pf-c-button.pf-m-primary:hover,
input.pf-c-button.pf-m-primary:hover {
  background: #1d4ed8 !important;
}

.pf-c-button.pf-m-primary:focus,
input.pf-c-button.pf-m-primary:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3) !important;
  outline: none !important;
}

/* ── Links ───────────────────────────────────────────────── */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}


/* ── Page layout ─────────────────────────────────────────── */
.login-pf-page {
  background: #ffffff;
}

/* ── Card ────────────────────────────────────────────────── */
.card-pf {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  max-width: 440px;
  margin: 0 auto;
}

/* ── Header / logo ───────────────────────────────────────── */
.login-pf-page-header {
  background: #1a2035;
  padding: 1rem;
  text-align: center;
}

/* ── Title ───────────────────────────────────────────────── */
#kc-page-title {
  color: #1a2035;
  font-size: 1.3rem;
  font-weight: 700;
}

/* ── Labels ──────────────────────────────────────────────── */
.pf-c-form__label-text {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Inputs ──────────────────────────────────────────────── */
.pf-c-form-control {
  background: #f9fafb !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  color: #111827 !important;
  height: 42px;
}

.pf-c-form-control:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
  outline: none !important;
}

/* ── Primary button ──────────────────────────────────────── */
.pf-c-button.pf-m-primary {
  background: #f97316 !important;
  border: none !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.pf-c-button.pf-m-primary:hover {
  background: #ea6c0a !important;
}

/* ── Links ───────────────────────────────────────────────── */
a {
  color: #f97316;
}

a:hover {
  color: #ea6c0a;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert-error, .pf-c-alert.pf-m-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
}


.pf-v5-c-login {
  background: transparent;
}

.pf-v5-c-login__container {
  max-width: 420px;
}

/* ── Header (logo area) ──────────────────────────────────── */
#kc-header {
  display: none;
}

.pf-v5-c-login__main-header::before {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='22' fill='none' stroke='%23f97316' stroke-width='3'/%3E%3Ccircle cx='25' cy='25' r='6' fill='%23f97316'/%3E%3Cellipse cx='25' cy='25' rx='22' ry='9' fill='none' stroke='%23f97316' stroke-width='2' transform='rotate(-35 25 25)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── Card ────────────────────────────────────────────────── */
.pf-v5-c-login__main {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: 2.5rem;
}

/* ── Title ───────────────────────────────────────────────── */
.pf-v5-c-login__main-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.pf-v5-c-title {
  color: #1a2035 !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
}

.pf-v5-c-login__main-header-desc {
  color: #6b7280;
  font-size: 0.875rem;
}

/* ── Form labels ─────────────────────────────────────────── */
.pf-v5-c-form__label-text {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Inputs ──────────────────────────────────────────────── */
.pf-v5-c-form-control {
  background: #f9fafb !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  color: #111827 !important;
  height: 42px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-v5-c-form-control:focus,
.pf-v5-c-form-control:focus-within {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
  outline: none !important;
  background: #fff !important;
}

/* ── Primary button ──────────────────────────────────────── */
.pf-v5-c-button.pf-m-primary {
  background: #f97316;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  height: 42px;
  transition: background 0.15s;
  width: 100%;
}

.pf-v5-c-button.pf-m-primary:hover {
  background: #ea6c0a;
}

.pf-v5-c-button.pf-m-primary:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35);
  outline: none;
}

/* ── Links ───────────────────────────────────────────────── */
a, .pf-v5-c-login__main-footer-links-item a {
  color: #f97316;
  text-decoration: none;
}

a:hover {
  color: #ea6c0a;
  text-decoration: underline;
}

/* ── Alert / error ───────────────────────────────────────── */
.pf-v5-c-alert.pf-m-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
}

.pf-v5-c-alert.pf-m-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
}

/* ── Secondary buttons (social login) ───────────────────── */
.pf-v5-c-button.pf-m-secondary {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  transition: border-color 0.15s, background 0.15s;
}

.pf-v5-c-button.pf-m-secondary:hover {
  background: #fff;
  border-color: #f97316;
  color: #111827;
}

/* ── Footer ──────────────────────────────────────────────── */
.pf-v5-c-login__main-footer-band {
  color: #9ca3af;
  font-size: 0.8rem;
}

/* ── Divider ─────────────────────────────────────────────── */
.pf-v5-c-divider {
  border-color: #e5e7eb;
}


#kc-header-wrapper {
  display: none; /* hide default "Sign in to <realm>" header */
}

.pf-v5-c-login {
  background: transparent;
}

.pf-v5-c-login__container {
  max-width: 420px;
}

/* ── Card ────────────────────────────────────────────────── */
.pf-v5-c-login__main {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  padding: 2.5rem;
}

/* ── Logo / title area ───────────────────────────────────── */
.pf-v5-c-login__main-header {
  margin-bottom: 1.5rem;
}

.pf-v5-c-login__main-header-desc {
  color: #94a3b8;
  font-size: 0.875rem;
}

.pf-v5-c-title {
  color: #f1f5f9 !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
}

/* ── Form elements ───────────────────────────────────────── */
.pf-v5-c-form__label-text {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
}

.pf-v5-c-form-control {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  color: #f1f5f9 !important;
  height: 42px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-v5-c-form-control:focus,
.pf-v5-c-form-control:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
  outline: none !important;
}

/* ── Primary button ──────────────────────────────────────── */
.pf-v5-c-button.pf-m-primary {
  background: #6366f1;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  height: 42px;
  transition: background 0.15s;
  width: 100%;
}

.pf-v5-c-button.pf-m-primary:hover {
  background: #4f46e5;
}

.pf-v5-c-button.pf-m-primary:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
  outline: none;
}

/* ── Links ───────────────────────────────────────────────── */
a, .pf-v5-c-login__main-footer-links-item a {
  color: #818cf8;
  text-decoration: none;
}

a:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* ── Alert / error messages ──────────────────────────────── */
.pf-v5-c-alert.pf-m-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: #fca5a5;
}

.pf-v5-c-alert.pf-m-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  color: #fcd34d;
}

/* ── Social / identity provider buttons ─────────────────── */
.pf-v5-c-button.pf-m-secondary {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #cbd5e1;
  transition: border-color 0.15s, background 0.15s;
}

.pf-v5-c-button.pf-m-secondary:hover {
  background: #293548;
  border-color: #6366f1;
  color: #f1f5f9;
}

/* ── Footer text ─────────────────────────────────────────── */
.pf-v5-c-login__main-footer-band {
  color: #64748b;
  font-size: 0.8rem;
}

/* ── Divider ─────────────────────────────────────────────── */
.pf-v5-c-divider {
  border-color: #334155;
}
