/**
 * WatchDemo — Admin Auth (login) styles.
 * Mirrors the dashboard refresh: accent system, dark-mode parity, Cairo typography, RTL-safe.
 *
 * Accent tokens (set by /admin/assets/js/accent-registry.js + changeTheme partial):
 *   --accent        : current accent hex
 *   --accent-rgb    : current accent as "r, g, b" triplet
 *   --accent-soft   : tinted background
 *   --accent-ring   : focus halo
 *   --sf-primary    : alias used by seniorForm
 *
 * Local aliases below let this stylesheet stay readable while always tracking the
 * live accent. Defaults fall back to aqua (#2AA6B5, rgb 42, 166, 181).
 */

:root {
  --auth-primary: var(--accent, #2AA6B5);
  --auth-primary-rgb: var(--accent-rgb, 42, 166, 181);
  --auth-primary-600: var(--accent-btn-hover, #1E8A97);
  --auth-primary-soft: rgba(var(--auth-primary-rgb), 0.10);
  --auth-primary-ring: var(--accent-ring, rgba(var(--auth-primary-rgb), 0.18));
  --auth-ink: #1F2D36;
  --auth-ink-2: #4A5A66;
  --auth-muted: #7A8A93;
  --auth-line: #E6EDF0;
  --auth-canvas: #F5FAFB;
}

/* ===== Cairo font across the entire auth page ===== */
html, body,
.authentication-wrapper, .authentication-inner,
.app-brand, .app-brand-link,
#formAuthentication,
#formAuthentication *:not(.ti):not([class^="ti-"]):not([class*=" ti-"]),
.form-label, .form-control, .input-group, .input-group-text,
.btn, h1, h2, h3, h4, h5, h6, p, span, label, a, div, button,
.toast-message, .toast-title,
.swal2-popup, .swal2-title, .swal2-html-container, .swal2-actions {
  font-family: "Cairo", "Public Sans", "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Tabler glyphs — must not inherit Cairo from rules above */
.hk-auth .ti,
.hk-auth .ti::before,
#formAuthentication .ti,
#formAuthentication .ti::before {
  font-family: "tabler-icons" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-variant: normal !important;
  text-transform: none !important;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hk-auth__input-affix .ti {
  font-size: 1.15rem;
  color: inherit;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-weight: 400;
  letter-spacing: 0;
}

.authentication-wrapper.authentication-cover { background: #fff; }

/* ===== Left cover background — soft brand tint ===== */
.auth-cover-bg.auth-cover-bg-color {
  background: linear-gradient(135deg,
    rgba(var(--auth-primary-rgb), 0.10) 0%,
    var(--auth-canvas) 100%) !important;
  position: relative;
}
.auth-cover-bg.auth-cover-bg-color::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(var(--auth-primary-rgb), 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.auth-illustration { filter: drop-shadow(0 14px 28px rgba(var(--auth-primary-rgb), 0.18)); }

/* ===== Logo ===== */
.auth-logo { transition: transform .25s ease; }
.auth-logo:hover { transform: scale(1.03); }

/* ===== Typography — softer weights to match dashboard ===== */
#formAuthentication + *,
.authentication-inner h4.fw-bold {
  color: var(--auth-ink);
}
.authentication-inner h4 {
  font-weight: 600 !important;
  font-size: 1.5rem;
  letter-spacing: 0;
  color: var(--auth-ink) !important;
}
.authentication-inner p.mb-4 {
  color: var(--auth-muted);
  font-weight: 400;
  font-size: .95rem;
  line-height: 1.55;
}

/* ===== Form labels ===== */
#formAuthentication .form-label {
  color: var(--auth-ink) !important;
  font-weight: 500 !important;
  font-size: .88rem !important;
  margin-bottom: .4rem;
  letter-spacing: 0;
}

/* ===== Inputs ===== */
#formAuthentication .form-control,
#formAuthentication .input-group-merge {
  border-radius: 10px;
  border: 1px solid var(--auth-line);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  font-weight: 400;
}
#formAuthentication .form-control {
  height: 46px;
  font-size: .92rem;
  color: var(--auth-ink);
  background: #fff;
}
#formAuthentication .form-control::placeholder {
  color: #B6BEC8;
  font-weight: 400;
}

#formAuthentication .form-control:focus,
#formAuthentication .input-group-merge:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px var(--auth-primary-soft);
  background: #fff;
}
#formAuthentication .input-group-merge .form-control {
  border: 0 !important;
  box-shadow: none !important;
}
#formAuthentication .input-group-merge .input-group-text {
  background: transparent;
  border: 0;
  color: var(--auth-muted);
  cursor: pointer;
  transition: color .2s ease;
}
#formAuthentication .input-group-merge .input-group-text:hover {
  color: var(--auth-primary);
}

/* ===== Primary button — accent gradient ===== */
#btnForm.btn-primary {
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-600) 100%);
  border: 0;
  height: 46px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: 0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(var(--auth-primary-rgb), 0.25);
  transition: box-shadow .2s ease, transform .08s ease, filter .2s ease;
}
#btnForm.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 22px rgba(var(--auth-primary-rgb), 0.32);
}
#btnForm.btn-primary:active { transform: translateY(1px); }
#btnForm.btn-primary:focus { box-shadow: 0 0 0 3px var(--auth-primary-ring); }

/* ===== Validation messages ===== */
#formAuthentication .invalid-feedback,
#formAuthentication .fv-plugins-message-container .fv-help-block {
  font-size: .8rem;
  font-weight: 400;
  color: #ef4444;
}

/* ===== Toastr — match brand ===== */
#toast-container > .toast-success {
  background-color: var(--auth-primary) !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(var(--auth-primary-rgb), 0.32) !important;
  border-radius: 10px !important;
}
#toast-container > .toast-error {
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.28) !important;
}
#toast-container > div {
  font-weight: 500;
  font-size: .9rem;
  padding: 14px 18px 14px 50px;
}

/* ===== Dark mode ===== */
html.dark-style,
.dark-style body,
body.dark-style {
  background: #0f1720 !important;
  color: #cbd5e1 !important;
}
.dark-style .authentication-wrapper.authentication-cover { background: #0f1720 !important; }
.dark-style .auth-cover-bg.auth-cover-bg-color {
  background: linear-gradient(135deg, #112028 0%, #0f1720 100%) !important;
}
.dark-style .auth-cover-bg.auth-cover-bg-color::before {
  background-image: radial-gradient(rgba(var(--auth-primary-rgb), 0.18) 1px, transparent 1px);
}
.dark-style .authentication-inner h4,
.dark-style #formAuthentication .form-label {
  color: #e2e8f0 !important;
}
.dark-style .authentication-inner p.mb-4 { color: #94a3b8; }
.dark-style #formAuthentication .form-control,
.dark-style #formAuthentication .input-group-merge {
  background: #1a2530 !important;
  border-color: #2a3744 !important;
  color: #e2e8f0 !important;
}
.dark-style #formAuthentication .form-control::placeholder { color: #64748b; }
.dark-style #formAuthentication .input-group-merge .input-group-text { color: #94a3b8; }
.dark-style #formAuthentication .form-control:focus,
.dark-style #formAuthentication .input-group-merge:focus-within {
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--auth-primary-rgb), 0.22) !important;
}

/* ═══════════════════════════════════════
   WatchDemo Auth — modern layout (.hk-auth__*)
   ═══════════════════════════════════════ */

/* Lock login to viewport — no document scroll */
html.hk-auth-body,
body.hk-auth-body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.authentication-wrapper.hk-auth {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0 !important;
  background: var(--auth-canvas);
  overflow: hidden;
}

.authentication-wrapper.hk-auth.authentication-cover {
  align-items: stretch;
}

.authentication-wrapper.hk-auth .authentication-inner,
.hk-auth__layout {
  height: 100%;
  max-height: 100%;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}

.hk-auth__layout.row {
  height: 100%;
  --bs-gutter-y: 0;
}

.hk-auth__layout > [class*="col-"] {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* Vendor page-auth cover margins push content past the viewport */
.authentication-wrapper.hk-auth.authentication-cover .authentication-inner .auth-cover-bg,
.authentication-wrapper.hk-auth .hk-auth__cover.auth-cover-bg {
  margin: 0 !important;
  height: 100% !important;
  border-radius: 0;
}

.hk-auth__layout {
  min-height: 0;
}

.hk-auth__pane {
  position: relative;
  isolation: isolate;
  min-height: 0;
}

.hk-auth__pane--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-bottom));
}

.hk-auth__pane--cover {
  display: flex;
  min-height: 220px;
}

/* ── Ambient orbs (left pane) ── */
.hk-auth__orb {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 30% 30%,
    rgba(var(--auth-primary-rgb), 0.45) 0%,
    rgba(var(--auth-primary-rgb), 0) 65%);
  animation: hk-auth-float 16s ease-in-out infinite;
}
.hk-auth__orb--a { top: -120px; inset-inline-start: -120px; }
.hk-auth__orb--b {
  bottom: -140px;
  inset-inline-end: -140px;
  animation-direction: reverse;
  animation-duration: 22s;
  background: radial-gradient(circle at 70% 70%,
    rgba(var(--auth-primary-rgb), 0.30) 0%,
    rgba(var(--auth-primary-rgb), 0) 70%);
}

@keyframes hk-auth-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, -22px, 0) scale(1.04); }
}

.hk-auth__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(var(--auth-primary-rgb), 0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
  opacity: 0.6;
}

/* ── Card stage ── */
.hk-auth__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: clamp(12px, 3vw, 24px);
  margin-inline: auto;
}

.hk-auth__card {
  position: relative;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 48px -16px rgba(var(--auth-primary-rgb), 0.18),
    0 8px 24px -8px rgba(15, 23, 32, 0.10);
  overflow: hidden;
}

.hk-auth__card-strip {
  position: absolute;
  inset-block: 18px;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--auth-primary), var(--auth-primary-600));
  box-shadow: 0 0 14px rgba(var(--auth-primary-rgb), 0.45);
}
html[dir="rtl"] .hk-auth__card-strip {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-radius: 4px 0 0 4px;
}

/* ── Brand row ── */
.hk-auth__brand {
  margin-bottom: 20px;
}

.hk-auth__brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.hk-auth__brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hk-auth__brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--auth-ink);
  letter-spacing: -.02em;
}

.hk-auth__brand-tag {
  font-size: .72rem;
  font-weight: 600;
  color: var(--auth-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hk-auth__brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background:
    linear-gradient(135deg,
      rgba(var(--auth-primary-rgb), 0.16) 0%,
      rgba(var(--auth-primary-rgb), 0.06) 100%);
  border: 1px solid rgba(var(--auth-primary-rgb), 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 8px 18px -8px rgba(var(--auth-primary-rgb), 0.32);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.hk-auth__brand-logo-wrap:hover {
  transform: scale(1.04) rotate(-2deg);
}

.hk-auth__brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* ── Headline ── */
.hk-auth__intro {
  margin-bottom: 24px;
}

.hk-auth__title {
  margin: 0 0 6px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--auth-ink);
}
.hk-auth__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--auth-primary), rgba(var(--auth-primary-rgb), 0.2));
}

.hk-auth__subtitle {
  margin: 0;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--auth-muted);
}

/* ── Form fields ── */
.hk-auth__form { margin-bottom: 18px; }

.hk-auth__field { position: relative; }

.hk-auth__label,
#formAuthentication .form-label.hk-auth__label {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  width: 100%;
  margin: 0 0 8px !important;
  padding: 0;
  font-size: .88rem !important;
  font-weight: 600 !important;
  line-height: 1.4;
  color: var(--auth-ink) !important;
  clip: auto !important;
  clip-path: none !important;
  height: auto !important;
  overflow: visible !important;
}

.hk-auth__input-group {
  border-radius: 12px !important;
  border: 1px solid var(--auth-line) !important;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}

.hk-auth__input-group:focus-within {
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 4px var(--auth-primary-soft) !important;
}

.hk-auth__input-affix {
  background: transparent !important;
  border: 0 !important;
  color: var(--auth-muted) !important;
  padding-inline: 12px !important;
  font-size: 1rem;
  transition: color .18s ease;
}
.hk-auth__input-affix--toggle { cursor: pointer; }
.hk-auth__input-group:focus-within .hk-auth__input-affix:not(.hk-auth__input-affix--toggle) {
  color: var(--auth-primary) !important;
}
.hk-auth__input-affix--toggle:hover { color: var(--auth-primary) !important; }

.hk-auth__input.form-control {
  border: 0 !important;
  box-shadow: none !important;
  height: 48px !important;
  min-height: 48px;
  font-size: max(16px, .94rem);
  color: var(--auth-ink);
  background: transparent !important;
}

.hk-auth__input-affix--toggle {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.hk-auth__input.form-control::placeholder {
  color: #B6BEC8;
  font-weight: 400;
}

/* ── Submit button (rich accent + sheen + spinner) ── */
.hk-auth__submit.btn-primary {
  position: relative;
  height: 50px;
  border: 0;
  border-radius: 12px;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-600) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 0 rgba(var(--auth-primary-rgb), 0.55),
    0 12px 24px -6px rgba(var(--auth-primary-rgb), 0.45);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow .22s ease,
              filter .22s ease;
}
.hk-auth__submit.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 3px 0 rgba(var(--auth-primary-rgb), 0.55),
    0 18px 32px -8px rgba(var(--auth-primary-rgb), 0.55),
    0 0 0 6px rgba(var(--auth-primary-rgb), 0.14);
}
.hk-auth__submit.btn-primary:active { transform: translateY(0); }
.hk-auth__submit.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--auth-primary-ring),
    0 12px 24px -6px rgba(var(--auth-primary-rgb), 0.45);
}
.hk-auth__submit.btn-primary:disabled,
.hk-auth__submit.btn-primary.is-loading {
  cursor: progress;
  filter: saturate(0.92) brightness(0.96);
  transform: none;
}

.hk-auth__submit-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.hk-auth__submit-icon { font-size: 1.1rem; line-height: 1; }
.hk-auth__submit-icon--spin { animation: hk-auth-spin 1s linear infinite; }
@keyframes hk-auth-spin { to { transform: rotate(360deg); } }

.hk-auth__submit-sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: -60%;
  width: 40%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 100%);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 1;
  transition: inset-inline-start .7s ease;
}
.hk-auth__submit.btn-primary:hover .hk-auth__submit-sheen {
  inset-inline-start: 120%;
}

/* ── Footer chips ── */
.hk-auth__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding-top: 16px;
  border-top: 1px dashed rgba(var(--auth-primary-rgb), 0.18);
  margin-top: 6px;
}

.hk-auth__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--auth-muted);
  background: rgba(var(--auth-primary-rgb), 0.05);
  border: 1px solid rgba(var(--auth-primary-rgb), 0.14);
  border-radius: 999px;
}
.hk-auth__chip i {
  font-size: .9rem;
  color: var(--auth-primary);
  opacity: .85;
}

/* ═══════════════════════════════════════
   Right cover pane
   ═══════════════════════════════════════ */

.hk-auth__cover {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg,
    rgba(var(--auth-primary-rgb), 0.14) 0%,
    rgba(var(--auth-primary-rgb), 0.04) 60%,
    var(--auth-canvas) 100%) !important;
}

.hk-auth__cover-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.hk-auth__cover-glow--a {
  top: -160px;
  inset-inline-end: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(var(--auth-primary-rgb), 0.42) 0%, transparent 65%);
  animation: hk-auth-float 18s ease-in-out infinite;
}
.hk-auth__cover-glow--b {
  bottom: -180px;
  inset-inline-start: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(var(--auth-primary-rgb), 0.30) 0%, transparent 70%);
  animation: hk-auth-float 24s ease-in-out infinite reverse;
}

.hk-auth__cover-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: conic-gradient(
    from 180deg at 50% 100%,
    rgba(var(--auth-primary-rgb), 0.08) 0deg,
    transparent 60deg,
    transparent 300deg,
    rgba(var(--auth-primary-rgb), 0.08) 360deg
  );
  opacity: .7;
  z-index: 0;
}

.hk-auth__cover-shape {
  position: absolute;
  bottom: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: min(640px, 80%);
  z-index: 0;
  opacity: .55;
  pointer-events: none;
}

.hk-auth__cover-inner {
  position: relative;
  z-index: 1;
  width: min(560px, 88%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 40px 24px;
}

.hk-auth__cover-illustration {
  position: relative;
  width: min(340px, 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hk-auth__cover-orbit {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px dashed rgba(var(--auth-primary-rgb), 0.32);
  animation: hk-auth-spin 14s linear infinite;
}
.hk-auth__cover-orbit--2 {
  inset: 16px;
  border-style: dotted;
  border-color: rgba(var(--auth-primary-rgb), 0.22);
  animation-duration: 22s;
  animation-direction: reverse;
}

.hk-auth__cover-img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(var(--auth-primary-rgb), 0.30));
  animation: hk-auth-cover-bob 6s ease-in-out infinite;
}

@keyframes hk-auth-cover-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hk-auth__cover-text { max-width: 480px; }

.hk-auth__cover-title {
  margin: 0 0 10px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--auth-ink);
}

.hk-auth__cover-lead {
  margin: 0 0 22px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--auth-muted);
}

.hk-auth__feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

.hk-auth__feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid rgba(var(--auth-primary-rgb), 0.18);
  border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgba(var(--auth-primary-rgb), 0.22);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hk-auth__feature:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--auth-primary-rgb), 0.35);
  box-shadow: 0 12px 22px -8px rgba(var(--auth-primary-rgb), 0.32);
}

.hk-auth__feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: .95rem;
  color: var(--auth-primary);
  background: rgba(var(--auth-primary-rgb), 0.12);
}

/* ═══════════════════════════════════════
   Dark-mode parity for new layout
   ═══════════════════════════════════════ */

.dark-style .hk-auth { background: #0b121a; }

.dark-style .hk-auth__card {
  background: #131c26;
  border-color: #243140;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 28px 56px -16px rgba(var(--auth-primary-rgb), 0.28),
    0 12px 30px -8px rgba(0, 0, 0, 0.55);
}

.dark-style .hk-auth__title { color: #e2e8f0; }
.dark-style .hk-auth__subtitle { color: #94a3b8; }
.dark-style .hk-auth__brand-name { color: #e2e8f0; }
.dark-style .hk-auth__brand-tag { color: #94a3b8; }
.dark-style .hk-auth__label { color: #e2e8f0 !important; }

@media (max-width: 767.98px) {
  .dark-style .hk-auth__cover { border-bottom-color: #2a3744; }
}

.dark-style .hk-auth__brand-logo-wrap {
  background:
    linear-gradient(135deg,
      rgba(var(--auth-primary-rgb), 0.22) 0%,
      rgba(var(--auth-primary-rgb), 0.10) 100%);
  border-color: rgba(var(--auth-primary-rgb), 0.32);
}

.dark-style .hk-auth__input-group {
  background: #1a2530 !important;
  border-color: #2a3744 !important;
}
.dark-style .hk-auth__input.form-control { color: #e2e8f0; }
.dark-style .hk-auth__input.form-control::placeholder { color: #64748b; }
.dark-style .hk-auth__input-affix { color: #94a3b8 !important; }

.dark-style .hk-auth__chip {
  color: #94a3b8;
  background: rgba(var(--auth-primary-rgb), 0.08);
  border-color: rgba(var(--auth-primary-rgb), 0.18);
}

.dark-style .hk-auth__chips { border-top-color: rgba(var(--auth-primary-rgb), 0.22); }

.dark-style .hk-auth__cover {
  background: linear-gradient(135deg,
    rgba(var(--auth-primary-rgb), 0.18) 0%,
    rgba(var(--auth-primary-rgb), 0.05) 60%,
    #0b121a 100%) !important;
}
.dark-style .hk-auth__cover-title { color: #e2e8f0; }
.dark-style .hk-auth__cover-lead { color: #94a3b8; }

.dark-style .hk-auth__feature {
  color: #e2e8f0;
  background: #131c26;
  border-color: rgba(var(--auth-primary-rgb), 0.26);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.6);
}

/* ═══════════════════════════════════════
   Responsive — mobile · tablet · laptop
   ═══════════════════════════════════════ */

@media (min-width: 992px) {
  .hk-auth__pane--form,
  .hk-auth__pane--cover {
    min-height: 0;
    height: 100%;
  }

  .hk-auth__stage { max-width: 460px; }

  .hk-auth__cover-inner { padding: 48px 40px; }

  .hk-auth__cover-img { max-width: min(380px, 42vw); }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hk-auth__layout { flex-wrap: nowrap; }

  .hk-auth__pane--form,
  .hk-auth__pane--cover {
    min-height: 0;
    height: 100%;
  }

  .hk-auth__card { padding: 28px 22px 24px; border-radius: 18px; }
  .hk-auth__title { font-size: 1.4rem; }

  .hk-auth__cover-inner {
    flex-direction: column;
    padding: 28px 20px;
    text-align: center;
  }

  .hk-auth__cover-img { max-width: 200px; max-height: 200px; }
  .hk-auth__cover-title { font-size: 1.25rem; }
  .hk-auth__cover-lead { font-size: .88rem; }
  .hk-auth__cover-shape,
  .hk-auth__cover-orbit { display: none; }
}

@media (max-width: 767.98px) {
  .hk-auth__layout { flex-direction: column; }

  .hk-auth__pane--cover {
    order: -1;
    flex: 0 0 auto;
    height: auto;
    max-height: min(26dvh, 168px);
    min-height: 0;
  }

  .hk-auth__pane--form {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    align-items: center;
    padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
  }

  .hk-auth__cover {
    min-height: 0 !important;
    height: 100% !important;
    border-bottom: 1px solid var(--auth-line);
  }

  .hk-auth__stage {
    max-height: 100%;
    overflow: hidden;
    padding: 10px 12px;
  }

  .hk-auth__intro { margin-bottom: 14px; }
  .hk-auth__brand { margin-bottom: 12px; }

  .hk-auth__cover-inner {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px clamp(14px, 4vw, 20px);
    width: 100%;
    max-width: 100%;
  }

  .hk-auth__cover-illustration { flex: 0 0 auto; margin: 0; }

  .hk-auth__cover-orbit,
  .hk-auth__cover-shape,
  .hk-auth__cover-rays { display: none; }

  .hk-auth__cover-img {
    width: 72px;
    height: 72px;
    max-width: 72px;
    object-fit: contain;
  }

  .hk-auth__cover-text {
    flex: 1;
    min-width: 0;
    text-align: start;
  }

  .hk-auth__cover-title {
    font-size: 1rem;
    margin: 0 0 4px;
    line-height: 1.3;
  }

  .hk-auth__cover-lead {
    font-size: .78rem;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hk-auth__card {
    padding: 22px 18px 20px;
    border-radius: 16px;
  }

  .hk-auth__title { font-size: 1.28rem; }
  .hk-auth__subtitle { font-size: .84rem; }
  .hk-auth__brand-logo-wrap { width: 44px; height: 44px; border-radius: 12px; }
  .hk-auth__brand-logo { width: 28px; height: 28px; }
  .hk-auth__orb { width: 200px; height: 200px; filter: blur(48px); opacity: .4; }

  .hk-auth__submit.btn-primary { min-height: 48px; height: 48px; }
}

@media (max-width: 575.98px) {
  .hk-auth__stage { padding: 12px; }
  .hk-auth__intro { margin-bottom: 18px; }
  .hk-auth__brand-name { font-size: .95rem; }
  .authentication-inner h4 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hk-auth__orb,
  .hk-auth__cover-glow,
  .hk-auth__cover-orbit,
  .hk-auth__cover-img,
  .hk-auth__submit-sheen,
  .hk-auth__submit-icon--spin,
  .hk-auth__card--shake,
  .hk-auth__error-banner--enter,
  .hk-auth__swal--shake {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════
   Failure-state UX (shake, banner, attempts, Swal)
   ═══════════════════════════════════════ */

/* ── Card shake on auth failure ── */
@keyframes hk-auth-shake {
  0%, 100% { transform: translateX(0); }
  12% { transform: translateX(-9px); }
  24% { transform: translateX(8px); }
  36% { transform: translateX(-6px); }
  48% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  72% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.hk-auth__card--shake {
  animation: hk-auth-shake 0.6s cubic-bezier(.36, .07, .19, .97) both;
}

/* ── Inline error banner above the form ── */
.hk-auth__error-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background:
    linear-gradient(135deg,
      rgba(244, 63, 94, 0.12) 0%,
      rgba(244, 63, 94, 0.05) 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #b91c44;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 8px 20px -10px rgba(244, 63, 94, 0.35);
  overflow: hidden;
}

@keyframes hk-auth-banner-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hk-auth__error-banner--enter {
  animation: hk-auth-banner-in 0.32s cubic-bezier(.34, 1.56, .64, 1) both;
}

.hk-auth__error-banner::before {
  content: "";
  position: absolute;
  inset-block: 6px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #f43f5e, #be123c);
}
html[dir="rtl"] .hk-auth__error-banner::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-radius: 3px 0 0 3px;
}

.hk-auth__error-banner__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 6px 14px -6px rgba(244, 63, 94, 0.55);
  animation: hk-auth-banner-pulse 1.6s ease-in-out infinite;
}

@keyframes hk-auth-banner-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.45); }
  60% { box-shadow: 0 0 0 7px rgba(244, 63, 94, 0); }
}

.hk-auth__error-banner__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.45;
}

.hk-auth__error-banner__title {
  font-weight: 700;
  font-size: .88rem;
  color: #9f1239;
  letter-spacing: -.005em;
}

.hk-auth__error-banner__msg {
  font-size: .82rem;
  font-weight: 500;
  color: #b91c44;
  opacity: .92;
  word-break: break-word;
}

.hk-auth__error-banner__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: rgba(244, 63, 94, 0.08);
  color: #9f1239;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.hk-auth__error-banner__close:hover {
  background: rgba(244, 63, 94, 0.18);
  transform: rotate(90deg);
}

/* ── Attempts hint under the submit ── */
.hk-auth__attempts {
  display: block;
  margin-top: 10px;
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
  color: #b91c44;
  background: rgba(244, 63, 94, 0.06);
  border: 1px dashed rgba(244, 63, 94, 0.28);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ── Inputs flash red after failure (until next edit) ── */
.hk-auth__card--shake .hk-auth__input-group {
  border-color: rgba(244, 63, 94, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14) !important;
}

/* ── SweetAlert2 — failure popup polish ── */
.hk-auth__swal.swal2-popup {
  border-radius: 22px !important;
  padding: 22px 22px 18px !important;
  background:
    radial-gradient(circle at 50% -20%, rgba(244, 63, 94, 0.18) 0%, transparent 60%),
    #fff !important;
  border: 1px solid rgba(244, 63, 94, 0.28);
  box-shadow:
    0 28px 56px -16px rgba(244, 63, 94, 0.40),
    0 12px 24px -8px rgba(0, 0, 0, 0.18) !important;
}

.dark-style .hk-auth__swal.swal2-popup {
  background:
    radial-gradient(circle at 50% -20%, rgba(244, 63, 94, 0.26) 0%, transparent 60%),
    #131c26 !important;
  border-color: rgba(244, 63, 94, 0.4);
  color: #e2e8f0;
}

.hk-auth__swal-title.swal2-title {
  font-family: "Cairo", "Public Sans", sans-serif !important;
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: #9f1239 !important;
  margin-top: 4px !important;
}
.dark-style .hk-auth__swal-title.swal2-title { color: #fda4af !important; }

.hk-auth__swal-html.swal2-html-container {
  margin: 8px 0 4px !important;
  font-family: "Cairo", "Public Sans", sans-serif !important;
}

.hk-auth__swal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.hk-auth__swal-msg {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--auth-ink);
  line-height: 1.5;
}
.dark-style .hk-auth__swal-msg { color: #e2e8f0; }

.hk-auth__swal-hint {
  margin: 0;
  font-size: .82rem;
  font-weight: 500;
  color: var(--auth-muted);
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hk-auth__swal-hint i { color: var(--auth-primary); }

.hk-auth__swal-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #9f1239;
  background: rgba(244, 63, 94, 0.10);
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: 999px;
}
.dark-style .hk-auth__swal-counter {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.42);
}

.hk-auth__swal-actions.swal2-actions {
  margin-top: 14px !important;
  gap: 10px;
}

.hk-auth__submit--swal {
  min-width: 160px;
  height: 44px !important;
  font-size: .9rem !important;
  border-radius: 10px !important;
}
.hk-auth__submit--swal i { font-size: 1rem; margin-inline-end: 4px; }

/* Subtle horizontal shake of the Swal popup itself */
@keyframes hk-auth-swal-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.hk-auth__swal--shake { animation: hk-auth-swal-shake 0.5s cubic-bezier(.36, .07, .19, .97) both; }

/* Dark-mode parity for inline error banner */
.dark-style .hk-auth__error-banner {
  background:
    linear-gradient(135deg,
      rgba(244, 63, 94, 0.20) 0%,
      rgba(244, 63, 94, 0.08) 100%);
  border-color: rgba(244, 63, 94, 0.48);
  color: #fecaca;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 26px -10px rgba(244, 63, 94, 0.50);
}
.dark-style .hk-auth__error-banner__title { color: #fecdd3; }
.dark-style .hk-auth__error-banner__msg { color: #fda4af; }
.dark-style .hk-auth__error-banner__close {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}
.dark-style .hk-auth__attempts {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.40);
}

/* WatchDemo horizontal logo */
.hk-auth__brand-logo-wrap { width: 124px; height: 68px; background: #fff; }
.hk-auth__brand-logo { width: 112px; height: auto; max-height: 60px; object-fit: contain; }
@media (max-width: 576px) { .hk-auth__brand-logo-wrap { width: 102px; height: 56px; } .hk-auth__brand-logo { width: 94px; height: auto; } }
