/* RBD Hub — full custom Keycloak login (no PatternFly layout) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.rbd-html,
body.rbd-body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(239, 68, 68, 0.22), transparent 55%),
    #0a0a0b;
  color: #f5f5f5;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.rbd-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  gap: 1rem;
}

.rbd-brand {
  text-align: center;
}

.rbd-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 0.65rem;
  object-fit: contain;
}

.rbd-wordmark {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.rbd-wordmark span {
  color: #ef4444;
}

.rbd-kicker {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.rbd-card {
  width: 100%;
  max-width: 22.5rem;
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(239, 68, 68, 0.12);
}

.rbd-title {
  margin: 0 0 1.1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.rbd-help {
  margin: -0.35rem 0 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

.rbd-form {
  display: block;
  width: 100%;
}

.rbd-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
  width: 100%;
}

.rbd-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.rbd-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.3;
}

.rbd-input-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.rbd-input {
  display: block;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  height: 3.25rem;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.85rem;
  background: #0c0c0e;
  color: #f5f5f5;
  font-size: 1.08rem;
  line-height: 1.3;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.rbd-input:focus {
  border-color: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.rbd-input-otp {
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 1.35rem;
  font-weight: 700;
}

.rbd-eye {
  flex: 0 0 auto;
  min-width: 4.25rem;
  height: 3.25rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.85rem;
  background: #0c0c0e;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.rbd-eye:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.rbd-actions {
  margin-top: 0.35rem;
}

.rbd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.rbd-btn-primary {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

.rbd-btn-primary:hover {
  background: #dc2626;
}

.rbd-btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.rbd-link {
  color: #fca5a5;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.rbd-link:hover {
  color: #ef4444;
  text-decoration: underline;
}

.rbd-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.rbd-error {
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.35;
}

.rbd-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.rbd-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.rbd-alert-success,
.rbd-alert-info,
.rbd-alert-warning {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e5e5;
}

.rbd-user-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rbd-user-chip-name {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.rbd-restart {
  flex: 0 0 auto;
}

.rbd-footer {
  margin: 0.25rem 0 0;
  max-width: 22.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

.rbd-register {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.rbd-otp-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rbd-steps {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rbd-steps li {
  margin-bottom: 0.85rem;
}

.rbd-apps {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.rbd-qr {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #fff;
  border-radius: 0.85rem;
}

.rbd-qr img {
  display: block;
  width: 180px;
  height: 180px;
}

.rbd-secret {
  margin: 0.5rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  word-break: break-all;
  text-align: center;
}

@media (max-width: 400px) {
  .rbd-card {
    padding: 1.15rem 1.1rem 1.1rem;
  }
  .rbd-input,
  .rbd-eye,
  .rbd-btn {
    min-height: 3.1rem;
    height: 3.1rem;
  }
  .rbd-btn {
    height: auto;
    min-height: 3.1rem;
  }
}

/* Public account forms: readable fields, one compact brand, clear actions. */
.rbd-shell { justify-content: flex-start; padding: clamp(24px, 6vh, 60px) 16px 32px; gap: 24px; }
.rbd-brand { width: 100%; max-width: 440px; text-align: left; }
.rbd-wordmark { font-size: 28px; letter-spacing: -.04em; }
.rbd-card { max-width: 440px; padding: 28px; box-shadow: 0 16px 44px #0004; }
.rbd-title { text-align: left; font-size: 28px; line-height: 1.2; margin-bottom: 24px; }
.rbd-help, .rbd-info { font-size: 16px; line-height: 1.5; color: #c6c3c6; }
.rbd-info { margin-top: 20px; }
.rbd-label { font-size: 15px; color: #d4d1d4; font-weight: 600; }
.rbd-label-wrap { display: flex; align-items: baseline; gap: 4px; }
.rbd-input-wrap { min-width: 0; width: 100%; }
.rbd-field { margin-bottom: 18px; }
.rbd-input { font-family: inherit; font-size: 17px; min-height: 52px; height: 52px; }
textarea.rbd-input { min-height: 120px; height: auto; padding: 12px; }
select.rbd-input { appearance: auto; }
.rbd-input[aria-invalid=true] { border-color: #f87171; }
.rbd-eye { min-height: 52px; height: auto; min-width: 68px; font-size: 14px; color: #ddd; }
.rbd-eye-inherited { width: 84px; line-height: 1.3; }
.rbd-eye-inherited i { display: none; }
.rbd-eye-inherited::after { content: attr(aria-label); }
.rbd-btn { font-family: inherit; min-height: 52px; font-size: 17px; line-height: 1.4; }
.rbd-btn-primary { box-shadow: none; background: #e52831; }
.rbd-btn-primary:hover { background: #cb2029; }
.rbd-content a, .rbd-info a { display: inline-flex; align-items: center; min-height: 44px; color: #ffb7ba; font-size: 16px; line-height: 1.4; white-space: normal; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rbd-label-row { flex-wrap: wrap; align-items: center; }
.rbd-label-row a { min-height: 44px; }
.rbd-content :is(button, input, select, textarea, a):focus-visible { outline: 2px solid #ffb7ba; outline-offset: 3px; }
.rbd-check { min-height: 44px; font-size: 16px; }
.rbd-check input { width: 20px; height: 20px; accent-color: #e52831; }
.rbd-error, .rbd-alert { font-size: 15px; line-height: 1.5; }
.rbd-footer { max-width: 440px; color: #aaa5aa; font-size: 13px; line-height: 1.5; }
.rbd-register { color: #c6c3c6; font-size: 16px; }
.rbd-qr img { max-width: 100%; height: auto; }
@media (max-width: 400px) {
 .rbd-card { padding: 22px; border-radius: 20px; }
 .rbd-title { font-size: 26px; }
 .rbd-input, .rbd-eye, .rbd-btn { min-height: 52px; }
}
@media (max-height: 520px) {
 .rbd-shell { padding-top: 16px; gap: 16px; }
}
