:root,
[data-bs-theme="light"] {
  --hm-auth-ambient-a: rgba(37, 99, 235, 0.18);
  --hm-auth-ambient-b: rgba(14, 116, 144, 0.16);
  --hm-auth-card-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  --hm-auth-muted: #64748b;
}

[data-bs-theme="dark"] {
  --hm-auth-ambient-a: rgba(59, 130, 246, 0.18);
  --hm-auth-ambient-b: rgba(15, 23, 42, 0.62);
  --hm-auth-card-shadow: 0 24px 60px rgba(2, 6, 23, 0.5);
  --hm-auth-muted: #94a3b8;
}

html,
body {
  height: 100%;
}

body.hm-auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--hm-page-bg, #f1f5f9);
  color: var(--tblr-body-color, #0f172a);
  overflow: hidden;
}

.hm-auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
}

.hm-auth-ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.hm-auth-ambient-b {
  width: 32rem;
  height: 32rem;
  right: -11rem;
  bottom: -13rem;
  background: radial-gradient(circle, var(--hm-auth-ambient-b) 0%, rgba(0, 0, 0, 0) 72%);
}

.hm-auth-card {
  position: relative;
  width: min(26rem, 100%);
  border: 1px solid var(--hm-topbar-border, #e2e8f0);
  border-radius: 1rem;
  background: var(--hm-topbar-bg, rgba(248, 250, 252, 0.92));
  backdrop-filter: blur(14px);
  box-shadow: var(--hm-auth-card-shadow);
}

.hm-auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.hm-auth-brand-compact {
  margin-bottom: 1rem;
}

.hm-auth-logo-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  border: 1px solid var(--hm-topbar-border, #e2e8f0);
  background: var(--hm-topbar-bg-solid, #f8fafc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-auth-logo {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
}

.hm-auth-title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--hm-sidebar-link, #1e293b);
}

.hm-auth-alert {
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.hm-auth-form .form-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hm-auth-muted);
  font-weight: 700;
}

.hm-auth-form .form-control {
  border-radius: 0.7rem;
  border-color: var(--hm-topbar-border, #e2e8f0);
}

[data-bs-theme="light"] .hm-auth-form .form-control {
  background: #ffffff;
  color: #0f172a;
}

[data-bs-theme="dark"] .hm-auth-form .form-control {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

.hm-auth-form .form-control:focus {
  border-color: rgba(var(--tblr-primary-rgb), 0.58);
  box-shadow: 0 0 0 0.2rem rgba(var(--tblr-primary-rgb), 0.18);
}

.hm-auth-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.hm-auth-remember .form-check-input {
  margin-top: 0;
  float: none;
}

.hm-auth-remember .form-check-label {
  font-size: 0.92rem;
  color: var(--hm-auth-muted);
}

.hm-auth-submit {
  border-radius: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hm-auth-secondary-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.hm-auth-secondary-actions form {
  margin: 0;
}

.hm-auth-resend {
  min-height: 2.75rem;
  border-radius: 0.75rem;
  font-weight: 650;
}

.hm-auth-cancel {
  min-height: 2.35rem;
  color: var(--hm-auth-muted);
  font-weight: 650;
  text-decoration: none;
}

.hm-auth-cancel:hover,
.hm-auth-cancel:focus {
  color: var(--tblr-primary, #206bc4);
  text-decoration: none;
}

@media (max-width: 576px) {
  .hm-auth-shell {
    padding: 1.15rem;
  }

  .hm-auth-title {
    font-size: 1.7rem;
  }
}
