/* ============================================================
   HealthFlow — Auth Page Styles
   auth.css
   ============================================================ */

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes hf-auth-float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(0.5deg);
  }
  66% {
    transform: translateY(-5px) rotate(-0.3deg);
  }
}

@keyframes hf-auth-float-slow {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-14px) scale(1.01);
  }
}

@keyframes hf-auth-float-alt {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  40% {
    transform: translateY(-8px) translateX(4px);
  }
  70% {
    transform: translateY(-12px) translateX(-3px);
  }
}

@keyframes hf-auth-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.35), 0 0 60px rgba(59, 130, 246, 0.15);
  }
  50% {
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.55), 0 0 90px rgba(139, 92, 246, 0.25);
  }
}

@keyframes hf-shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-7px); }
  30%       { transform: translateX(7px); }
  45%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-2px); }
  90%       { transform: translateX(2px); }
}

@keyframes hf-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hf-strength-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes hf-success-pop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   AUTH LAYOUT — FULL PAGE SPLIT
   ============================================================ */

.hf-auth-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--hf-bg-page);
  font-family: var(--hf-font-sans);
}

/* ============================================================
   LEFT PANEL — DECORATIVE / BRANDING
   ============================================================ */

.hf-auth-panel-left {
  position: relative;
  width: 45%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--hf-space-12) var(--hf-space-10);
  overflow: hidden;
  background: linear-gradient(
    145deg,
    #1e3a8a 0%,
    #1d4ed8 25%,
    #2563eb 50%,
    #7c3aed 80%,
    #5b21b6 100%
  );
}

/* Ambient orb — top right */
.hf-auth-panel-left::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Ambient orb — bottom left */
.hf-auth-panel-left::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Hide left panel on mobile */
@media (max-width: 767px) {
  .hf-auth-panel-left {
    display: none;
  }
}

/* ============================================================
   AUTH LOGO (left panel — large branding area)
   ============================================================ */

.hf-auth-brand {
  text-align: center;
  margin-bottom: var(--hf-space-10);
  position: relative;
  z-index: 1;
}

.hf-auth-brand-icon {
  width: 76px;
  height: 76px;
  border-radius: var(--hf-radius-2xl);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #ffffff;
  margin: 0 auto var(--hf-space-5);
  animation: hf-auth-glow-pulse 3.5s ease-in-out infinite;
}

.hf-auth-brand-name {
  font-size: var(--hf-text-4xl);
  font-weight: var(--hf-font-extrabold);
  color: #ffffff;
  letter-spacing: var(--hf-tracking-tight);
  margin-bottom: var(--hf-space-2);
  line-height: var(--hf-leading-tight);
}

.hf-auth-brand-tagline {
  font-size: var(--hf-text-base);
  color: rgba(255, 255, 255, 0.68);
  max-width: 280px;
  margin: 0 auto;
  line-height: var(--hf-leading-relaxed);
}

/* ============================================================
   FEATURE LIST (left panel)
   ============================================================ */

.hf-auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 320px;
  position: relative;
  z-index: 1;
}

.hf-auth-feature {
  display: flex;
  align-items: center;
  gap: var(--hf-space-3);
  padding: var(--hf-space-3) var(--hf-space-4);
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--hf-text-sm);
  font-weight: var(--hf-font-medium);
  margin-bottom: var(--hf-space-2);
  border-radius: var(--hf-radius-xl);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background var(--hf-duration-normal) var(--hf-ease-in-out),
              border-color var(--hf-duration-normal) var(--hf-ease-in-out),
              transform var(--hf-duration-normal) var(--hf-ease-spring);
}

.hf-auth-feature:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(3px);
}

.hf-auth-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--hf-radius-lg);
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

/* Checkmark badge variant */
.hf-auth-feature-check {
  width: 20px;
  height: 20px;
  border-radius: var(--hf-radius-full);
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6ee7b7;
  flex-shrink: 0;
}

/* ============================================================
   FLOATING DECORATIVE CARDS (left panel)
   ============================================================ */

.hf-auth-deco-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--hf-radius-2xl);
  padding: var(--hf-space-3) var(--hf-space-4);
  color: #ffffff;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.20);
  z-index: 2;
}

/* Card 1 — top right area */
.hf-auth-deco-card-1 {
  top: 11%;
  right: 6%;
  opacity: 0.92;
  transform: scale(1);
  animation: hf-auth-float 5.2s ease-in-out infinite;
}

/* Card 2 — bottom left area */
.hf-auth-deco-card-2 {
  bottom: 18%;
  left: 4%;
  opacity: 0.82;
  transform: scale(0.94);
  animation: hf-auth-float-slow 6.4s ease-in-out infinite 1.1s;
}

/* Card 3 — mid right area */
.hf-auth-deco-card-3 {
  bottom: 38%;
  right: 5%;
  opacity: 0.78;
  transform: scale(0.88);
  animation: hf-auth-float-alt 4.8s ease-in-out infinite 0.6s;
}

/* Card 4 — upper left area (optional 4th card) */
.hf-auth-deco-card-4 {
  top: 32%;
  left: 3%;
  opacity: 0.70;
  transform: scale(0.84);
  animation: hf-auth-float 7s ease-in-out infinite 2s;
}

.hf-deco-card-inner {
  display: flex;
  align-items: center;
  gap: var(--hf-space-3);
}

.hf-deco-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--hf-radius-lg);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.hf-deco-metric-value {
  font-size: var(--hf-text-xl);
  font-weight: var(--hf-font-bold);
  line-height: 1.1;
  letter-spacing: var(--hf-tracking-tight);
}

.hf-deco-metric-label {
  font-size: var(--hf-text-xs);
  opacity: 0.65;
  margin-top: 2px;
  font-weight: var(--hf-font-medium);
  letter-spacing: var(--hf-tracking-wide);
  text-transform: uppercase;
}

.hf-deco-metric-change {
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-semibold);
  color: #6ee7b7;
  margin-top: 2px;
}

.hf-deco-metric-change.down {
  color: #fca5a5;
}

/* ============================================================
   RIGHT PANEL — AUTH FORM AREA
   ============================================================ */

.hf-auth-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--hf-space-8) var(--hf-space-6);
  overflow-y: auto;
  background: var(--hf-bg-page);
  position: relative;
}

/* Subtle background pattern for right panel */
.hf-auth-panel-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   AUTH FORM CARD (glassmorphism)
   ============================================================ */

.hf-auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--hf-glass-bg-strong);
  backdrop-filter: var(--hf-glass-backdrop-blur) var(--hf-glass-saturate);
  -webkit-backdrop-filter: var(--hf-glass-backdrop-blur) var(--hf-glass-saturate);
  border: 1px solid var(--hf-glass-border);
  border-radius: var(--hf-radius-3xl);
  padding: var(--hf-space-10) var(--hf-space-8);
  box-shadow: var(--hf-shadow-glass), var(--hf-shadow-xl);
  animation: hf-fade-in-up var(--hf-duration-moderate) var(--hf-ease-out) both;
}

@media (max-width: 767px) {
  .hf-auth-panel-right {
    padding: var(--hf-space-6) var(--hf-space-4);
    align-items: flex-start;
    padding-top: var(--hf-space-12);
  }

  .hf-auth-card {
    max-width: 100%;
    padding: var(--hf-space-8) var(--hf-space-6);
    border-radius: var(--hf-radius-2xl);
  }
}

@media (max-width: 400px) {
  .hf-auth-card {
    padding: var(--hf-space-6) var(--hf-space-4);
    border-radius: var(--hf-radius-xl);
  }
}

/* ============================================================
   AUTH LOGO (right panel — compact form header)
   ============================================================ */

.hf-auth-logo {
  display: flex;
  align-items: center;
  gap: var(--hf-space-3);
  margin-bottom: var(--hf-space-8);
  justify-content: center;
}

.hf-auth-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--hf-radius-xl);
  background: linear-gradient(135deg, var(--hf-color-primary-500), var(--hf-color-accent-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 21px;
  box-shadow: var(--hf-shadow-primary);
  flex-shrink: 0;
}

.hf-auth-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hf-auth-logo-name {
  font-size: var(--hf-text-xl);
  font-weight: var(--hf-font-bold);
  color: var(--hf-text-primary);
  letter-spacing: var(--hf-tracking-tight);
}

.hf-auth-logo-tagline {
  font-size: var(--hf-text-xs);
  color: var(--hf-text-tertiary);
  font-weight: var(--hf-font-medium);
  letter-spacing: var(--hf-tracking-wide);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================================
   AUTH TABS — LOGIN / REGISTER SWITCH
   ============================================================ */

.hf-auth-tabs {
  display: flex;
  background: var(--hf-bg-subtle);
  border: 1px solid var(--hf-border-default);
  border-radius: var(--hf-radius-full);
  padding: 3px;
  margin-bottom: var(--hf-space-7);
  gap: 2px;
}

.hf-auth-tab {
  flex: 1;
  padding: var(--hf-space-2) var(--hf-space-4);
  text-align: center;
  font-size: var(--hf-text-sm);
  font-weight: var(--hf-font-medium);
  color: var(--hf-text-tertiary);
  cursor: pointer;
  border-radius: var(--hf-radius-full);
  transition: background var(--hf-duration-normal) var(--hf-ease-in-out),
              color var(--hf-duration-normal) var(--hf-ease-in-out),
              box-shadow var(--hf-duration-normal) var(--hf-ease-in-out);
  background: transparent;
  border: none;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.hf-auth-tab:hover:not(.active) {
  color: var(--hf-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

.hf-auth-tab.active {
  background: var(--hf-bg-surface);
  color: var(--hf-color-primary-600);
  box-shadow: var(--hf-shadow-sm);
  font-weight: var(--hf-font-semibold);
}

[data-theme="dark"] .hf-auth-tab.active {
  background: var(--hf-bg-surface-raised);
  color: var(--hf-color-primary-400);
}

/* ============================================================
   AUTH FORM HEADINGS
   ============================================================ */

.hf-auth-heading {
  font-size: var(--hf-text-2xl);
  font-weight: var(--hf-font-bold);
  color: var(--hf-text-primary);
  letter-spacing: var(--hf-tracking-tight);
  line-height: var(--hf-leading-tight);
  margin-bottom: var(--hf-space-1);
}

.hf-auth-subheading {
  font-size: var(--hf-text-sm);
  color: var(--hf-text-secondary);
  line-height: var(--hf-leading-relaxed);
  margin-bottom: var(--hf-space-6);
}

/* ============================================================
   FORM GROUP SPACING
   ============================================================ */

.hf-form-group {
  margin-bottom: var(--hf-space-5);
}

.hf-form-group:last-of-type {
  margin-bottom: 0;
}

.hf-form-label {
  display: block;
  font-size: var(--hf-text-sm);
  font-weight: var(--hf-font-medium);
  color: var(--hf-text-secondary);
  margin-bottom: var(--hf-space-1-5);
  letter-spacing: var(--hf-tracking-wide);
}

.hf-form-label .hf-required {
  color: var(--hf-color-danger-500);
  margin-left: 2px;
}

.hf-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hf-space-4);
}

@media (max-width: 480px) {
  .hf-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   INPUT STYLES (auth context)
   ============================================================ */

.hf-auth-card .hf-input {
  width: 100%;
  height: var(--hf-input-height);
  padding: var(--hf-space-input);
  background: var(--hf-input-bg);
  border: 1px solid var(--hf-input-border);
  border-radius: var(--hf-radius-input);
  font-size: var(--hf-text-sm);
  font-family: var(--hf-font-sans);
  color: var(--hf-input-text);
  outline: none;
  transition: border-color var(--hf-duration-normal) var(--hf-ease-in-out),
              box-shadow var(--hf-duration-normal) var(--hf-ease-in-out),
              background var(--hf-duration-normal) var(--hf-ease-in-out);
  box-sizing: border-box;
}

.hf-auth-card .hf-input::placeholder {
  color: var(--hf-input-placeholder);
}

.hf-auth-card .hf-input:hover:not(:disabled) {
  border-color: var(--hf-input-border-hover);
}

.hf-auth-card .hf-input:focus {
  border-color: var(--hf-input-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--hf-bg-surface);
}

.hf-auth-card .hf-input:disabled {
  background: var(--hf-input-disabled-bg);
  color: var(--hf-input-disabled-text);
  cursor: not-allowed;
}

/* Error state input */
.hf-auth-card .hf-input.hf-input--error {
  border-color: var(--hf-color-danger-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Success state input */
.hf-auth-card .hf-input.hf-input--success {
  border-color: var(--hf-color-success-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* ============================================================
   PASSWORD FIELD — SHOW / HIDE TOGGLE
   ============================================================ */

.hf-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.hf-password-wrapper .hf-input {
  padding-right: 44px;
}

.hf-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: var(--hf-space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hf-text-quaternary);
  cursor: pointer;
  border-radius: var(--hf-radius-sm);
  font-size: 15px;
  transition: color var(--hf-duration-fast) var(--hf-ease-in-out),
              background var(--hf-duration-fast) var(--hf-ease-in-out);
  outline: none;
  z-index: 1;
}

.hf-password-toggle:hover {
  color: var(--hf-text-secondary);
  background: var(--hf-bg-subtle);
}

.hf-password-toggle:focus-visible {
  box-shadow: var(--hf-focus-ring);
}

/* ============================================================
   PASSWORD STRENGTH METER
   ============================================================ */

.hf-password-strength-wrapper {
  margin-top: var(--hf-space-2);
}

.hf-password-strength {
  display: flex;
  gap: 5px;
  margin-bottom: var(--hf-space-1);
}

.hf-strength-segment {
  flex: 1;
  height: 4px;
  border-radius: var(--hf-radius-full);
  background: var(--hf-bg-muted);
  overflow: hidden;
  position: relative;
  transition: background var(--hf-duration-moderate) var(--hf-ease-in-out);
}

/* Strength level modifiers applied to the segments */
/* Level 1 — Weak (red): fills segment 1 */
.hf-password-strength[data-strength="1"] .hf-strength-segment:nth-child(1) {
  background: var(--hf-color-danger-500);
}

/* Level 2 — Fair (amber): fills segments 1-2 */
.hf-password-strength[data-strength="2"] .hf-strength-segment:nth-child(1),
.hf-password-strength[data-strength="2"] .hf-strength-segment:nth-child(2) {
  background: var(--hf-color-warning-500);
}

/* Level 3 — Good (blue): fills segments 1-3 */
.hf-password-strength[data-strength="3"] .hf-strength-segment:nth-child(1),
.hf-password-strength[data-strength="3"] .hf-strength-segment:nth-child(2),
.hf-password-strength[data-strength="3"] .hf-strength-segment:nth-child(3) {
  background: var(--hf-color-primary-500);
}

/* Level 4 — Strong (green): fills all 4 segments */
.hf-password-strength[data-strength="4"] .hf-strength-segment {
  background: var(--hf-color-success-500);
}

/* Class-based approach (JS adds classes to segments directly) */
.hf-strength-segment.strength-1 { background: var(--hf-color-danger-500); }
.hf-strength-segment.strength-2 { background: var(--hf-color-warning-500); }
.hf-strength-segment.strength-3 { background: var(--hf-color-primary-500); }
.hf-strength-segment.strength-4 { background: var(--hf-color-success-500); }

.hf-strength-label {
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  color: var(--hf-text-tertiary);
  line-height: 1;
}

.hf-strength-label[data-strength="1"] { color: var(--hf-color-danger-600); }
.hf-strength-label[data-strength="2"] { color: var(--hf-color-warning-600); }
.hf-strength-label[data-strength="3"] { color: var(--hf-color-primary-600); }
.hf-strength-label[data-strength="4"] { color: var(--hf-color-success-600); }

[data-theme="dark"] .hf-strength-label[data-strength="1"] { color: var(--hf-color-danger-400); }
[data-theme="dark"] .hf-strength-label[data-strength="2"] { color: var(--hf-color-warning-400); }
[data-theme="dark"] .hf-strength-label[data-strength="3"] { color: var(--hf-color-primary-400); }
[data-theme="dark"] .hf-strength-label[data-strength="4"] { color: var(--hf-color-success-400); }

/* ============================================================
   FIELD ERROR MESSAGES
   ============================================================ */

.hf-field-error {
  display: flex;
  align-items: center;
  gap: var(--hf-space-1-5);
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  color: var(--hf-color-danger-600);
  margin-top: var(--hf-space-1-5);
  line-height: var(--hf-leading-snug);
  animation: hf-fade-in-up var(--hf-duration-fast) var(--hf-ease-out) both;
}

[data-theme="dark"] .hf-field-error {
  color: var(--hf-color-danger-400);
}

.hf-field-error-icon {
  font-size: 12px;
  flex-shrink: 0;
  line-height: 1;
}

/* Field-level success hint */
.hf-field-success {
  display: flex;
  align-items: center;
  gap: var(--hf-space-1-5);
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  color: var(--hf-color-success-600);
  margin-top: var(--hf-space-1-5);
  animation: hf-fade-in-up var(--hf-duration-fast) var(--hf-ease-out) both;
}

[data-theme="dark"] .hf-field-success {
  color: var(--hf-color-success-400);
}

/* Field hint / helper text */
.hf-field-hint {
  font-size: var(--hf-text-xs);
  color: var(--hf-text-tertiary);
  margin-top: var(--hf-space-1-5);
  line-height: var(--hf-leading-relaxed);
}

/* ============================================================
   FORM UTILITY ROWS
   ============================================================ */

.hf-form-check {
  display: flex;
  align-items: center;
  gap: var(--hf-space-2);
  font-size: var(--hf-text-sm);
  color: var(--hf-text-secondary);
  cursor: pointer;
  user-select: none;
}

.hf-form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--hf-color-primary-500);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--hf-radius-sm);
}

.hf-form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--hf-space-5);
}

.hf-forgot-link {
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  color: var(--hf-color-primary-600);
  text-decoration: none;
  transition: color var(--hf-duration-fast) var(--hf-ease-in-out);
  white-space: nowrap;
}

.hf-forgot-link:hover {
  color: var(--hf-color-primary-700);
  text-decoration: underline;
}

[data-theme="dark"] .hf-forgot-link {
  color: var(--hf-color-primary-400);
}

[data-theme="dark"] .hf-forgot-link:hover {
  color: var(--hf-color-primary-300);
}

/* ============================================================
   DIVIDER WITH TEXT
   ============================================================ */

.hf-divider-text {
  display: flex;
  align-items: center;
  gap: var(--hf-space-3);
  margin: var(--hf-space-5) 0;
  color: var(--hf-text-quaternary);
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  letter-spacing: var(--hf-tracking-wider);
  text-transform: uppercase;
}

.hf-divider-text::before,
.hf-divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hf-border-default);
}

/* ============================================================
   DEMO BUTTON
   ============================================================ */

.hf-btn-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hf-space-2);
  width: 100%;
  padding: var(--hf-space-btn);
  background: transparent;
  border: 1.5px dashed var(--hf-border-strong);
  border-radius: var(--hf-radius-btn);
  font-size: var(--hf-text-sm);
  font-weight: var(--hf-font-medium);
  font-family: var(--hf-font-sans);
  color: var(--hf-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--hf-duration-normal) var(--hf-ease-in-out),
              color var(--hf-duration-normal) var(--hf-ease-in-out),
              background var(--hf-duration-normal) var(--hf-ease-in-out),
              transform var(--hf-duration-fast) var(--hf-ease-spring);
  outline: none;
}

.hf-btn-demo:hover {
  border-color: var(--hf-color-primary-400);
  border-style: solid;
  color: var(--hf-color-primary-600);
  background: var(--hf-color-primary-muted);
}

.hf-btn-demo:active {
  transform: scale(0.98);
}

.hf-btn-demo:focus-visible {
  box-shadow: var(--hf-focus-ring);
}

[data-theme="dark"] .hf-btn-demo:hover {
  border-color: var(--hf-color-primary-400);
  color: var(--hf-color-primary-400);
}

/* ============================================================
   DEMO / INFO NOTICE BANNER
   ============================================================ */

.hf-demo-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hf-space-2);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--hf-radius-lg);
  padding: var(--hf-space-2) var(--hf-space-3);
  font-size: var(--hf-text-xs);
  font-weight: var(--hf-font-medium);
  color: var(--hf-color-primary-700);
  margin-bottom: var(--hf-space-5);
  text-align: center;
}

[data-theme="dark"] .hf-demo-notice {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.30);
  color: var(--hf-color-primary-400);
}

/* ============================================================
   AUTH FORM VISIBILITY
   ============================================================ */

.hf-auth-form {
  display: block;
}

.hf-auth-form.hidden {
  display: none;
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */

.hf-auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--hf-space-8) var(--hf-space-4);
  animation: hf-fade-in-up var(--hf-duration-moderate) var(--hf-ease-out) both;
}

.hf-auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--hf-radius-full);
  background: var(--hf-color-success-muted);
  border: 2px solid var(--hf-color-success-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--hf-color-success-600);
  margin-bottom: var(--hf-space-5);
  animation: hf-success-pop var(--hf-duration-moderate) var(--hf-ease-spring) both;
}

[data-theme="dark"] .hf-auth-success-icon {
  background: var(--hf-color-success-muted);
  border-color: rgba(52, 211, 153, 0.40);
  color: var(--hf-color-success-400);
}

.hf-auth-success-title {
  font-size: var(--hf-text-xl);
  font-weight: var(--hf-font-bold);
  color: var(--hf-text-primary);
  margin-bottom: var(--hf-space-2);
}

.hf-auth-success-message {
  font-size: var(--hf-text-sm);
  color: var(--hf-text-secondary);
  line-height: var(--hf-leading-relaxed);
  max-width: 300px;
}

/* ============================================================
   ALERT / BANNER ERROR (form-level)
   ============================================================ */

.hf-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--hf-space-3);
  padding: var(--hf-space-3) var(--hf-space-4);
  border-radius: var(--hf-radius-lg);
  font-size: var(--hf-text-sm);
  line-height: var(--hf-leading-snug);
  margin-bottom: var(--hf-space-5);
  animation: hf-fade-in-up var(--hf-duration-fast) var(--hf-ease-out) both;
}

.hf-auth-alert--error {
  background: var(--hf-color-danger-muted);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--hf-color-danger-700);
}

.hf-auth-alert--warning {
  background: var(--hf-color-warning-muted);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--hf-color-warning-700);
}

.hf-auth-alert--success {
  background: var(--hf-color-success-muted);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--hf-color-success-700);
}

[data-theme="dark"] .hf-auth-alert--error   { color: var(--hf-color-danger-400); }
[data-theme="dark"] .hf-auth-alert--warning { color: var(--hf-color-warning-400); }
[data-theme="dark"] .hf-auth-alert--success { color: var(--hf-color-success-400); }

.hf-auth-alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   SUBMIT BUTTON (auth-specific overrides)
   ============================================================ */

.hf-auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hf-space-2);
  padding: var(--hf-space-btn-lg);
  background: linear-gradient(135deg, var(--hf-color-primary-500), var(--hf-color-primary-600));
  color: var(--hf-text-on-primary);
  border: none;
  border-radius: var(--hf-radius-btn);
  font-size: var(--hf-text-base);
  font-weight: var(--hf-font-semibold);
  font-family: var(--hf-font-sans);
  cursor: pointer;
  outline: none;
  box-shadow: var(--hf-shadow-primary);
  transition: background var(--hf-duration-normal) var(--hf-ease-in-out),
              box-shadow var(--hf-duration-normal) var(--hf-ease-in-out),
              transform var(--hf-duration-fast) var(--hf-ease-spring);
  margin-top: var(--hf-space-2);
}

.hf-auth-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--hf-color-primary-600), var(--hf-color-primary-700));
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.hf-auth-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--hf-shadow-primary);
}

.hf-auth-submit:focus-visible {
  box-shadow: var(--hf-focus-ring), var(--hf-shadow-primary);
}

.hf-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.hf-auth-submit.loading {
  pointer-events: none;
  opacity: 0.80;
}

/* ============================================================
   TERMS / LINKS ROW
   ============================================================ */

.hf-auth-terms {
  font-size: var(--hf-text-xs);
  color: var(--hf-text-tertiary);
  text-align: center;
  line-height: var(--hf-leading-relaxed);
  margin-top: var(--hf-space-4);
}

.hf-auth-terms a {
  color: var(--hf-text-link);
  text-decoration: none;
  font-weight: var(--hf-font-medium);
}

.hf-auth-terms a:hover {
  text-decoration: underline;
  color: var(--hf-text-link-hover);
}

.hf-auth-switch {
  font-size: var(--hf-text-sm);
  color: var(--hf-text-secondary);
  text-align: center;
  margin-top: var(--hf-space-5);
}

.hf-auth-switch a,
.hf-auth-switch-link {
  color: var(--hf-color-primary-600);
  font-weight: var(--hf-font-semibold);
  text-decoration: none;
  cursor: pointer;
}

.hf-auth-switch a:hover,
.hf-auth-switch-link:hover {
  text-decoration: underline;
  color: var(--hf-color-primary-700);
}

[data-theme="dark"] .hf-auth-switch a,
[data-theme="dark"] .hf-auth-switch-link {
  color: var(--hf-color-primary-400);
}

/* ============================================================
   SHAKE ANIMATION UTILITY
   ============================================================ */

.hf-shake {
  animation: hf-shake 0.42s var(--hf-ease-in-out);
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */

[data-theme="dark"] .hf-auth-panel-right {
  background: var(--hf-bg-page);
}

[data-theme="dark"] .hf-auth-panel-right::before {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

[data-theme="dark"] .hf-auth-card {
  background: var(--hf-glass-bg);
  border-color: var(--hf-glass-border);
  box-shadow: var(--hf-shadow-glass), var(--hf-shadow-2xl);
}

[data-theme="dark"] .hf-auth-tabs {
  background: var(--hf-bg-subtle);
  border-color: var(--hf-border-default);
}
