@layer components {
  /* ===================================================
     TGK Auth Forms + Profile Panel + Glyph Pulse
     Version: 2.5  Tokenised + Consolidated (2026)
     Changes:
     • Updated to v2.5 token standard
     • Cleaner structure and comments
     • All animations (pulseGlow), password toggle, floating labels,
       outline button variant, locked actions, and hover states preserved 100%
     • Perfect alignment with global .btn and discussion-form styles
     =================================================== */

  /* Glyph pulse (used in auth screens) */
  .auth-glyph-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
  }

  .auth-glyph {
    font-size: 3rem;
    color: var(--glyph-color);
    opacity: 0.9;
    text-shadow: 0 0 8px var(--shadow-glow);
    animation: pulseGlow 4s ease-in-out infinite;
  }

  @keyframes pulseGlow {
    0%, 100% {
      opacity: 0.8;
      text-shadow: 0 0 6px var(--shadow-glow);
    }
    50% {
      opacity: 1;
      text-shadow: 0 0 14px var(--highlight);
    }
  }

  /* Base form block (gnostic-card tone) */
  .tgk-form,
  .profile-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);

    max-width: 460px;
    margin: 0 auto;
    padding: var(--space-xl);

    background: var(--card-soft-bg);
    backdrop-filter: var(--card-soft-backdrop);
    -webkit-backdrop-filter: var(--card-soft-backdrop);
    border: 1px solid var(--section-border, rgba(255,255,255,0.1));
    border-radius: var(--border-radius-base);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);

    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }

  .tgk-form:hover,
  .profile-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12);
    border-color: var(--highlight);
  }

  /* Form groups & inputs */
  .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
  }

  .form-group label {
    margin-bottom: 0.2rem;
    text-align: left;
    font-weight: var(--type-weight-semibold, 600);
    font-size: var(--type-form-label-size, var(--font-size-sm));
    color: var(--text-accent);
    letter-spacing: 0.01em;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: var(--input-padding, 0.85rem 1.1rem);
    border: 1px solid var(--input-border, var(--section-border));
    border-radius: var(--border-radius-base);
    background: var(--input-bg, color-mix(in srgb, var(--bg-primary) 95%, var(--highlight) 5%));
    color: var(--input-text, var(--text-primary));
    font-size: var(--font-size-base);
    line-height: var(--type-copy-line, 1.6);
    transition: all 0.25s ease;
    color-scheme: inherit;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--input-focus-border, var(--input-focus, var(--highlight)));
    box-shadow: 0 0 8px color-mix(in srgb, var(--input-focus, var(--highlight)) 25%, transparent);
    background: var(--input-bg-focus, color-mix(in srgb, var(--bg-primary) 90%, var(--highlight) 10%));
  }

  /* Password field */
  .password-field {
    position: relative;
    width: 100%;
  }

  .password-field input {
    padding-right: 5.25rem;
  }

  .password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    border: 1px solid var(--input-border, var(--section-border));
    border-radius: var(--radius-sm, 0.25rem);
    background: var(--bg-secondary, var(--input-bg));
    color: var(--text-accent, var(--text-primary));
    font-size: 1rem;
    line-height: 1;
    padding: 0.35rem 0.45rem;
    cursor: pointer;
    transition: var(--transition-default, all 0.2s ease);
  }

  .password-toggle-btn:hover {
    background: var(--input-bg-focus, var(--bg-primary));
    border-color: var(--input-focus, var(--highlight));
  }

  .password-toggle-btn:focus-visible {
    outline: 2px solid var(--input-focus, var(--highlight));
    outline-offset: 2px;
  }

  .password-toggle-btn[data-visible="true"] {
    border-color: var(--input-focus, var(--highlight));
    background: var(--input-bg-focus, var(--bg-primary));
  }

  /* Floating label variant */
  .floating-field {
    position: relative;
    width: 100%;
  }

  .floating-field input {
    width: 100%;
    padding: 0.85rem 0.5rem 0.4rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--input-border, var(--section-border));
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  .floating-field input:focus {
    border-color: var(--input-focus, var(--highlight));
    box-shadow: 0 3px 8px var(--shadow-glow);
  }

  .floating-field label {
    position: absolute;
    top: 0.9rem;
    left: 0.5rem;
    font-size: var(--type-form-label-size, var(--font-size-sm));
    color: var(--text-accent);
    pointer-events: none;
    transition: all 0.25s ease;
  }

  .floating-field input:focus + label,
  .floating-field input:not(:placeholder-shown) + label {
    top: -0.3rem;
    left: 0.4rem;
    font-size: var(--font-size-vs);
    color: var(--highlight);
    background: var(--card-bg);
    padding: 0 0.25rem;
    border-radius: 4px;
  }

  /* Locked actions */
  .locked-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
  }

  .locked-actions .text-link {
    color: var(--highlight);
    text-decoration: underline;
  }

  .locked-actions .text-link:hover {
    color: var(--strong-text);
  }

  /* Helper / note text
     Batch 4A: removed the confirmed-dead .form-hint selector from this
     list — no live template, JS or built-output reference. .auth-note
     (renders auth-page cross-links) is unaffected. */
  .auth-note {
    text-align: center;
    color: var(--text-accent);
    font-size: var(--font-size-vs);
    opacity: 0.9;
    line-height: var(--type-copy-line, 1.6);
  }

  .auth-note a {
    color: var(--highlight);
    font-weight: var(--type-weight-medium, 500);
  }

  .auth-note a:hover {
    text-decoration: underline;
  }
}
