/* ==========================================================================
   Eacademy Meeting — Authentication Design System
   Shared by: login.html / signup.html / forgot-password.html / reset-password.html
   --------------------------------------------------------------------------
   1.  Design tokens
   2.  Icon set (CSS masks)
   3.  Base
   4.  Layout shell
   5.  Brand panel
   6.  Form panel + theme toggle
   7.  Auth card
   8.  Fields, inputs, validation
   9.  Checkbox
   10. Buttons, social, divider, footer links
   11. Alerts, success view, password strength
   12. Assurance strip
   13. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --auth-brand-50:  #f4eeff;
  --auth-brand-100: #e9dcff;
  --auth-brand-200: #d6bdff;
  --auth-brand-400: #a425fc;
  --auth-brand-500: #6406f5;
  --auth-brand-600: #4a04b8;
  --auth-brand-700: #3a038f;
  --auth-accent:    #e83afc;

  /* canonical eAcademy ramp: cyan -> blue -> violet -> magenta */
  --auth-gradient: linear-gradient(
    135deg,
    #00d9ff 0%,
    #0066ff 38%,
    #6406f5 72%,
    #e83afc 100%
  );
  --auth-gradient-btn: linear-gradient(135deg, #0066ff 0%, #6406f5 50%, #e83afc 100%);
  --auth-gradient-text: linear-gradient(90deg, #0091c7, #0066ff, #6406f5, #c21be0);

  /* Surfaces */
  --auth-bg:            #f8f6ff;
  --auth-surface:       #ffffff;
  --auth-surface-muted: #faf8ff;
  --auth-surface-sunk:  #f2ecfd;
  --auth-panel-from:    #fdfbff;
  --auth-panel-to:      #ece2fd;

  /* Text */
  --auth-text:       #0f1836;
  --auth-text-soft:  #33405f;
  --auth-text-muted: #64708f;
  --auth-text-faint: #96a0bb;

  /* Lines + effects */
  --auth-border:        #e9e3f6;
  --auth-border-strong: #d9d0ee;
  --auth-ring:          rgba(100, 6, 245, .16);
  --auth-shadow-sm:     0 1px 2px rgba(23, 24, 56, .05);
  --auth-shadow-md:     0 10px 26px -14px rgba(28, 26, 74, .28);
  --auth-shadow-lg:     0 26px 60px -30px rgba(31, 27, 82, .34);
  --auth-shadow-brand:  0 12px 26px -12px rgba(100, 6, 245, .5);

  /* States */
  --auth-danger:       #dd3f5c;
  --auth-danger-soft:  rgba(221, 63, 92, .10);
  --auth-success:      #0f9d69;
  --auth-success-soft: rgba(15, 157, 105, .10);
  --auth-warning:      #dd8b2c;

  /* Brand surfaces — tokenised so light and dark never diverge in the rules */
  --auth-veil:       rgba(255, 255, 255, .92);
  --auth-chip-bg:    rgba(255, 255, 255, .7);
  --auth-strip-bg:   #f3edfe;

  /* Radii */
  --auth-radius-sm:   10px;
  --auth-radius-md:   13px;
  --auth-radius-lg:   20px;
  --auth-radius-xl:   26px;
  --auth-radius-pill: 999px;

  /* Fluid rhythm — sized against viewport height so the page always fits */
  --auth-panel-pad-y: clamp(16px, 3.2vh, 44px);
  --auth-panel-pad-x: clamp(20px, 3vw, 60px);
  --auth-card-pad-y:  clamp(20px, 3.4vh, 36px);
  --auth-card-pad-x:  clamp(20px, 2.1vw, 36px);
  --auth-card-width:  clamp(348px, 37vw, 480px);
  --auth-field-gap:   clamp(10px, 1.8vh, 17px);
  --auth-stack:       clamp(11px, 2vh, 19px);
  --auth-input-h:     clamp(42px, 5.8vh, 50px);
  --auth-btn-h:       clamp(44px, 6.2vh, 52px);
  --auth-strip-h:     clamp(60px, 8.4vh, 92px);

  /* Type */
  --auth-font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --auth-fs-display: clamp(27px, 1.5vw + 1.7vh, 42px);
  --auth-fs-title:   clamp(21px, 3.2vh, 29px);
  --auth-fs-body:    clamp(13px, 1.55vh, 14.5px);
  --auth-fs-label:   12.5px;
  --auth-fs-small:   11.5px;

  --auth-ease: cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}

/* Dark palette — explicit choice */
:root[data-scheme="dark"] {
  --auth-brand-50:  #1b0b3d;
  --auth-brand-100: #260f5a;
  --auth-brand-200: #35167d;
  --auth-brand-400: #c07bff;
  --auth-brand-500: #a95cff;
  --auth-brand-600: #8b3bf8;
  --auth-brand-700: #7222e8;
  --auth-accent:    #f06cff;
  --auth-gradient-text: linear-gradient(90deg, #00d9ff, #0066ff, #a425fc, #e83afc);

  --auth-bg:            #0a0616;
  --auth-surface:       #150e2a;
  --auth-surface-muted: #1a1136;
  --auth-surface-sunk:  #201542;
  --auth-panel-from:    #0e0824;
  --auth-panel-to:      #1d0f46;

  --auth-text:       #f0f1fb;
  --auth-text-soft:  #ccd0e6;
  --auth-text-muted: #99a1c1;
  --auth-text-faint: #70789b;

  --auth-border:        #2c1e50;
  --auth-border-strong: #3b2a66;
  --auth-ring:          rgba(169, 92, 255, .3);
  --auth-shadow-sm:     0 1px 2px rgba(0, 0, 0, .45);
  --auth-shadow-md:     0 12px 30px -16px rgba(0, 0, 0, .8);
  --auth-shadow-lg:     0 28px 64px -32px rgba(0, 0, 0, .9);
  --auth-shadow-brand:  0 12px 28px -14px rgba(100, 6, 245, .75);

  --auth-danger:       #ff6d84;
  --auth-danger-soft:  rgba(255, 109, 132, .12);
  --auth-success:      #35c894;
  --auth-success-soft: rgba(53, 200, 148, .12);

  --auth-veil:       rgba(255, 255, 255, .04);
  --auth-chip-bg:    rgba(255, 255, 255, .04);
  --auth-strip-bg:   #120b2c;

  color-scheme: dark;
}

/* Dark palette — system preference, unless the user chose light */
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --auth-brand-50:  #1b0b3d;
    --auth-brand-100: #260f5a;
    --auth-brand-200: #35167d;
    --auth-brand-400: #c07bff;
    --auth-brand-500: #a95cff;
    --auth-brand-600: #8b3bf8;
    --auth-brand-700: #7222e8;
    --auth-accent:    #f06cff;
    --auth-gradient-text: linear-gradient(90deg, #00d9ff, #0066ff, #a425fc, #e83afc);

    --auth-bg:            #0a0616;
    --auth-surface:       #150e2a;
    --auth-surface-muted: #1a1136;
    --auth-surface-sunk:  #201542;
    --auth-panel-from:    #0e0824;
    --auth-panel-to:      #1d0f46;

    --auth-text:       #f0f1fb;
    --auth-text-soft:  #ccd0e6;
    --auth-text-muted: #99a1c1;
    --auth-text-faint: #70789b;

    --auth-border:        #2c1e50;
    --auth-border-strong: #3b2a66;
    --auth-ring:          rgba(169, 92, 255, .3);
    --auth-shadow-sm:     0 1px 2px rgba(0, 0, 0, .45);
    --auth-shadow-md:     0 12px 30px -16px rgba(0, 0, 0, .8);
    --auth-shadow-lg:     0 28px 64px -32px rgba(0, 0, 0, .9);
    --auth-shadow-brand:  0 12px 28px -14px rgba(100, 6, 245, .75);

    --auth-danger:       #ff6d84;
    --auth-danger-soft:  rgba(255, 109, 132, .12);
    --auth-success:      #35c894;
    --auth-success-soft: rgba(53, 200, 148, .12);

    --auth-veil:       rgba(255, 255, 255, .04);
    --auth-chip-bg:    rgba(255, 255, 255, .04);
    --auth-strip-bg:   #120b2c;

    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   2. Icon set — masked SVGs keep the markup clean and theme-aware
   -------------------------------------------------------------------------- */
:root {
  --auth-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3.2'/%3E%3Cpath d='m3.9 7.6 8.1 5.7 8.1-5.7'/%3E%3C/svg%3E");
  --auth-icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.2' y='10' width='15.6' height='10' rx='3'/%3E%3Cpath d='M8 10V7.4a4 4 0 0 1 8 0V10'/%3E%3C/svg%3E");
  --auth-icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.2' r='3.6'/%3E%3Cpath d='M4.8 19.6a7.4 7.4 0 0 1 14.4 0'/%3E%3C/svg%3E");
  --auth-icon-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 12S6.1 5.9 12 5.9 21.4 12 21.4 12 17.9 18.1 12 18.1 2.6 12 2.6 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.9'/%3E%3C/svg%3E");
  --auth-icon-eye-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 3.2 20.8 20.8'/%3E%3Cpath d='M10.4 6.2A9.7 9.7 0 0 1 12 6.1c5.9 0 9.4 5.9 9.4 5.9a16.4 16.4 0 0 1-3.5 4.1'/%3E%3Cpath d='M6.4 8.3A16.2 16.2 0 0 0 2.6 12s3.5 6.1 9.4 6.1a9.5 9.5 0 0 0 3.3-.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
  --auth-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.6 12.4 4.8 4.8L19.4 7.2'/%3E%3C/svg%3E");
  --auth-icon-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14m-5.6-5.6L18.5 12l-5.6 5.6'/%3E%3C/svg%3E");
  --auth-icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12h-14m5.6-5.6L5.5 12l5.6 5.6'/%3E%3C/svg%3E");
  --auth-icon-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3.9'/%3E%3Cpath d='M12 2.7v2.1M12 19.2v2.1M2.7 12h2.1M19.2 12h2.1M5.5 5.5 7 7M17 17l1.5 1.5M18.5 5.5 17 7M7 17l-1.5 1.5'/%3E%3C/svg%3E");
  --auth-icon-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.2A8.4 8.4 0 0 1 9.8 4a8.4 8.4 0 1 0 10.2 10.2Z'/%3E%3C/svg%3E");
  --auth-icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 5 6v5.4c0 4.2 2.9 7.6 7 9.4 4.1-1.8 7-5.2 7-9.4V6Z'/%3E%3Cpath d='m9.2 12 2 2 3.6-3.8'/%3E%3C/svg%3E");
  --auth-icon-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.6'/%3E%3Cpath d='M3.4 12h17.2M12 3.4c2.2 2.4 3.3 5.4 3.3 8.6S14.2 18.2 12 20.6c-2.2-2.4-3.3-5.4-3.3-8.6S9.8 5.8 12 3.4Z'/%3E%3C/svg%3E");
  --auth-icon-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 13.9 9l5.8 1.9-5.8 1.9L12 18.6 10.1 12.8 4.3 10.9 10.1 9Z'/%3E%3Cpath d='m18.6 16.4.7 2.1 2.1.7-2.1.7-.7 2.1-.7-2.1-2.1-.7 2.1-.7Z'/%3E%3C/svg%3E");
  --auth-icon-support: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.4 14.6V12a7.6 7.6 0 0 1 15.2 0v2.6'/%3E%3Crect x='2.6' y='13.4' width='4' height='6.2' rx='2'/%3E%3Crect x='17.4' y='13.4' width='4' height='6.2' rx='2'/%3E%3C/svg%3E");
  --auth-icon-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M13.7 2 5.3 13.4h5L9.7 22l8.9-11.6h-5.3Z'/%3E%3C/svg%3E");
  --auth-icon-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.4' cy='12' r='4.4'/%3E%3Cpath d='M12.8 12h8.4m-2.9 0v3.1m-2.7-3.1v2.3'/%3E%3C/svg%3E");
  --auth-icon-video: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' %3E%3Crect x='2.4' y='5.6' width='13.4' height='12.8' rx='3.4'/%3E%3Cpath d='M17.4 10.5 22 7.5v9l-4.6-3z'/%3E%3C/svg%3E");
  --auth-icon-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' %3E%3Ccircle cx='9.2' cy='8.3' r='3.5'/%3E%3Cpath d='M2.9 19.6a6.4 6.4 0 0 1 12.6 0'/%3E%3Cpath d='M16.4 5.2a3.5 3.5 0 0 1 0 6.2'/%3E%3Cpath d='M17.6 14.1a6.4 6.4 0 0 1 3.6 4.6'/%3E%3C/svg%3E");
  --auth-icon-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' %3E%3Crect x='3' y='4.4' width='18' height='12.8' rx='3.6'/%3E%3Cpath d='M8.6 17.2 8 21l4.9-3.8'/%3E%3Cpath d='M8.4 9.2h7.2M8.4 12.6h4.6'/%3E%3C/svg%3E");
  --auth-icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' %3E%3Crect x='3.2' y='5.2' width='17.6' height='15.2' rx='3.2'/%3E%3Cpath d='M3.2 9.9h17.6M8.4 3.4v3.4M15.6 3.4v3.4'/%3E%3Cpath d='M7.8 13.8h2m3.4 0h2M7.8 17h2m3.4 0h2'/%3E%3C/svg%3E");
  --auth-icon-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' %3E%3Cpath d='M17.4 18.6H7a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.6-1.3 4.3 4.3 0 0 1-.6 10.3Z'/%3E%3Cpath d='M12 15.4V9.6m-2.4 2.5L12 9.6l2.4 2.5'/%3E%3C/svg%3E");
  --auth-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
  --auth-microsoft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 23'%3E%3Crect x='0' y='0' width='10.6' height='10.6' fill='%23f25022'/%3E%3Crect x='12.4' y='0' width='10.6' height='10.6' fill='%237fba00'/%3E%3Crect x='0' y='12.4' width='10.6' height='10.6' fill='%2300a4ef'/%3E%3Crect x='12.4' y='12.4' width='10.6' height='10.6' fill='%23ffb900'/%3E%3C/svg%3E");
  --auth-google: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.6 20.1H42V20H24v8h11.3c-1.6 4.7-6.1 8-11.3 8-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.6-.4-3.9z'/%3E%3Cpath fill='%23FF3D00' d='m6.3 14.7 6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.6 20.1H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C36.9 40.2 44 35 44 24c0-1.3-.1-2.6-.4-3.9z'/%3E%3C/svg%3E");
}

.auth-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-image: var(--auth-glyph);
          mask-image: var(--auth-glyph);
}

.auth-icon--mail        { --auth-glyph: var(--auth-icon-mail); }
.auth-icon--lock        { --auth-glyph: var(--auth-icon-lock); }
.auth-icon--user        { --auth-glyph: var(--auth-icon-user); }
.auth-icon--eye         { --auth-glyph: var(--auth-icon-eye); }
.auth-icon--eye-off     { --auth-glyph: var(--auth-icon-eye-off); }
.auth-icon--check       { --auth-glyph: var(--auth-icon-check); }
.auth-icon--arrow-right { --auth-glyph: var(--auth-icon-arrow-right); }
.auth-icon--arrow-left  { --auth-glyph: var(--auth-icon-arrow-left); }
.auth-icon--sun         { --auth-glyph: var(--auth-icon-sun); }
.auth-icon--moon        { --auth-glyph: var(--auth-icon-moon); }
.auth-icon--shield      { --auth-glyph: var(--auth-icon-shield); }
.auth-icon--globe       { --auth-glyph: var(--auth-icon-globe); }
.auth-icon--spark       { --auth-glyph: var(--auth-icon-spark); }
.auth-icon--support     { --auth-glyph: var(--auth-icon-support); }
.auth-icon--bolt        { --auth-glyph: var(--auth-icon-bolt); }
.auth-icon--key         { --auth-glyph: var(--auth-icon-key); }
.auth-icon--chevron     { --auth-glyph: var(--auth-icon-chevron); }
.auth-icon--video        { --auth-glyph: var(--auth-icon-video); }
.auth-icon--users        { --auth-glyph: var(--auth-icon-users); }
.auth-icon--chat         { --auth-glyph: var(--auth-icon-chat); }
.auth-icon--calendar     { --auth-glyph: var(--auth-icon-calendar); }
.auth-icon--cloud        { --auth-glyph: var(--auth-icon-cloud); }


/* Partner wordmarks — full colour, so these are images rather than masks */
:root {
  --auth-logo-microsoft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 23'%3E%3Crect x='0' y='0' width='10.6' height='10.6' fill='%23f25022'/%3E%3Crect x='12.4' y='0' width='10.6' height='10.6' fill='%237fba00'/%3E%3Crect x='0' y='12.4' width='10.6' height='10.6' fill='%2300a4ef'/%3E%3Crect x='12.4' y='12.4' width='10.6' height='10.6' fill='%23ffb900'/%3E%3C/svg%3E");
  --auth-logo-slack: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e01e5a' d='M5.1 15.1a2.5 2.5 0 1 1-2.5-2.5h2.5v2.5zm1.3 0a2.5 2.5 0 0 1 5 0v6.3a2.5 2.5 0 0 1-5 0v-6.3z'/%3E%3Cpath fill='%2336c5f0' d='M8.9 5.1a2.5 2.5 0 1 1 2.5-2.5v2.5H8.9zm0 1.3a2.5 2.5 0 0 1 0 5H2.6a2.5 2.5 0 0 1 0-5h6.3z'/%3E%3Cpath fill='%232eb67d' d='M18.9 8.9a2.5 2.5 0 1 1 2.5 2.5h-2.5V8.9zm-1.3 0a2.5 2.5 0 0 1-5 0V2.6a2.5 2.5 0 0 1 5 0v6.3z'/%3E%3Cpath fill='%23ecb22e' d='M15.1 18.9a2.5 2.5 0 1 1-2.5 2.5v-2.5h2.5zm0-1.3a2.5 2.5 0 0 1 0-5h6.3a2.5 2.5 0 0 1 0 5h-6.3z'/%3E%3C/svg%3E");
  --auth-logo-zoom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='6' fill='%232d8cff'/%3E%3Cpath fill='%23fff' d='M6 9.4a1.4 1.4 0 0 1 1.4-1.4h5.9a1.4 1.4 0 0 1 1.4 1.4v5.2a1.4 1.4 0 0 1-1.4 1.4H7.4A1.4 1.4 0 0 1 6 14.6zm9.7 1.9 2.5-1.8a.5.5 0 0 1 .8.4v4.2a.5.5 0 0 1-.8.4l-2.5-1.8z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

.auth-body {
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  font-family: var(--auth-font);
  font-size: var(--auth-fs-body);
  line-height: 1.5;
  color: var(--auth-text);
  background-color: var(--auth-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-body a { color: inherit; }

.auth-body :focus-visible {
  outline: 2px solid var(--auth-brand-500);
  outline-offset: 2px;
}

.auth-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Layout shell — full viewport, never scrolls on desktop
   -------------------------------------------------------------------------- */
.auth-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.auth-layout__body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  min-height: 0;
  background-color: var(--auth-surface);
}

/* --------------------------------------------------------------------------
   5. Brand panel
   -------------------------------------------------------------------------- */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 22px);
  min-height: 0;
  padding: var(--auth-panel-pad-y) var(--auth-panel-pad-x);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 8% 4%, var(--auth-veil), transparent 55%),
    linear-gradient(158deg, var(--auth-panel-from) 0%, var(--auth-panel-to) 100%);
  border-right: 1px solid var(--auth-border);
}

/* soft brand glow + dot texture, kept deliberately restrained */
.auth-brand::before {
  content: "";
  position: absolute;
  top: -18%;
  right: -14%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 6, 245, .16), transparent 68%);
  pointer-events: none;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--auth-brand-500);
  opacity: .07;
  -webkit-mask-image: radial-gradient(120% 90% at 88% 6%, #000 0%, transparent 60%);
          mask-image: radial-gradient(120% 90% at 88% 6%, #000 0%, transparent 60%);
  pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }

/* Logo lockup ------------------------------------------------------------- */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--auth-text);
}

/* the brand lockup ships as artwork — one file per ground, swapped on the
   theme so neither colourway is ever painted on the wrong background */
.auth-logo__img {
  display: block;
  width: auto;
  height: clamp(36px, 4.8vh, 50px);
}

.auth-card__logo .auth-logo__img { height: 34px; }

.auth-logo__img--dark { display: none; }

:root[data-scheme="dark"] .auth-logo__img--light { display: none; }
:root[data-scheme="dark"] .auth-logo__img--dark  { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .auth-logo__img--light { display: none; }
  :root:not([data-scheme="light"]) .auth-logo__img--dark  { display: block; }
}

.auth-logo__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-logo__text {
  font-size: clamp(17px, 2.3vh, 21px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.4px;
}

.auth-logo__text em {
  font-style: normal;
  color: var(--auth-brand-500);
}

.auth-logo__tagline {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--auth-text-muted);
}

/* the in-card lockup (mobile) stays compact */
.auth-card__logo .auth-logo__tagline { display: none; }

/* Headline ---------------------------------------------------------------- */
.auth-brand__intro { max-width: min(100%, 620px); }

.auth-brand__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 5px 11px 5px 8px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-pill);
  background-color: var(--auth-chip-bg);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--auth-brand-600);
}

:root[data-scheme="dark"] .auth-brand__eyebrow { background-color: rgba(255, 255, 255, .04); }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .auth-brand__eyebrow { background-color: rgba(255, 255, 255, .04); }
}

.auth-heading {
  margin: 0;
  font-size: var(--auth-fs-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.4px;
}

.auth-heading em {
  display: block;
  font-style: normal;
  background: var(--auth-gradient-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.auth-brand__text {
  margin: clamp(8px, 1.4vh, 14px) 0 0;
  max-width: 46ch;
  color: var(--auth-text-muted);
  line-height: 1.6;
}

/* Showcase — feature list beside the product illustration ------------------ */

.auth-brand__showcase {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    margin-top: -200px;
}

.auth-highlights {
  position: relative;
  z-index: 2;
  width: min(48%, 340px);
  display: grid;
  align-content: center;
  gap: clamp(8px, 1.7vh, 17px);
  margin: 0;
  padding: 0;
  list-style: none;
  margin-top: -50px;
}

.auth-highlight {
  display: flex;
  align-items: center;
  gap: clamp(9px, .8vw, 13px);
  min-width: 0;
}

.auth-highlight__icon {
  display: grid;
  place-items: center;
  width: clamp(36px, 5vh, 48px);
  aspect-ratio: 1;
  flex: none;
  border-radius: clamp(11px, 1.6vh, 15px);
  font-size: clamp(17px, 2.4vh, 22px);
  color: var(--auth-brand-500);
  background-color: var(--auth-surface);
  box-shadow: 0 6px 16px -8px rgba(48, 16, 105, .34), 0 1px 2px rgba(48, 16, 105, .06);
}

.auth-highlight__body { min-width: 0; }

.auth-highlight__title {
  display: block;
  font-size: clamp(12.5px, 1.7vh, 14px);
  font-weight: 600;
  line-height: 1.25;
}

.auth-highlight__text {
  display: block;
  margin-top: 2px;
  font-size: var(--auth-fs-small);
  line-height: 1.35;
  color: var(--auth-text-muted);
}

/* Illustration ------------------------------------------------------------ */
/* absolutely placed so the illustration can bleed past the panel padding and
   tuck behind the logo bar, exactly as the reference composition does */
.auth-brand__stage {
    position: absolute;
    z-index: 1;
    top: 18%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    right: -40px;
    bottom: -90px;
    left: 0;
}

.auth-brand__stage::before {
  content: "";
  position: absolute;
  inset: 6% 2%;
  border-radius: 50%;
  background: radial-gradient(58% 52% at 56% 48%, rgba(100, 6, 245, .12), transparent 72%);
  pointer-events: none;
}

.auth-brand__art {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: right center;
  filter: drop-shadow(0 26px 40px rgba(48, 16, 105, .18));
}

:root[data-scheme="dark"] .auth-brand__art { filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .6)) saturate(.94); }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) .auth-brand__art { filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .6)) saturate(.94); }
}

/* Social proof bar --------------------------------------------------------- */
.auth-trusted {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(10px, 1.4vw, 24px);
  padding: clamp(10px, 1.6vh, 16px) clamp(14px, 1.6vw, 22px);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background-color: color-mix(in srgb, var(--auth-surface) 82%, transparent);
  box-shadow: var(--auth-shadow-md);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
          width: fit-content;
          margin-left:auto;
}

.auth-trusted__title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--auth-text-soft);
}

.auth-trusted__logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 1.8vw, 30px);
}

.auth-trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(12.5px, 1.7vh, 14.5px);
  font-weight: 600;
  letter-spacing: -.3px;
  white-space: nowrap;
  color: var(--auth-text-soft);
}

.auth-trust__mark {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.auth-trust--microsoft .auth-trust__mark { background-image: var(--auth-logo-microsoft); }
.auth-trust--slack     .auth-trust__mark { background-image: var(--auth-logo-slack); }
.auth-trust--zoom      .auth-trust__mark { display: none; }

.auth-trust--zoom .auth-trust__name { color: #2d8cff; font-weight: 700; font-size: 1.1em; letter-spacing: -.8px; }

/* Google's wordmark is letter-coloured — the b tags carry colour, not weight */
.auth-trust--google .auth-trust__name b { font-weight: 600; }
.auth-trust--google b:nth-child(1),
.auth-trust--google b:nth-child(4) { color: #4285f4; }
.auth-trust--google b:nth-child(2),
.auth-trust--google b:nth-child(6) { color: #ea4335; }
.auth-trust--google b:nth-child(3) { color: #fbbc05; }
.auth-trust--google b:nth-child(5) { color: #34a853; }

.auth-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: clamp(9px, 1.4vh, 13px);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--auth-brand-600);
  text-decoration: none;
}

.auth-brand__link .auth-icon { font-size: 15px; transition: transform .2s var(--auth-ease); }
.auth-brand__link:hover .auth-icon { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   6. Form panel + theme toggle
   -------------------------------------------------------------------------- */
/* `align-items: flex-start` + `margin: auto` on the card centres the card while
   keeping it fully reachable if the panel ever has to scroll internally. */
.auth-form-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  /* the extra top padding keeps the card clear of the locale + theme controls */
  padding: calc(var(--auth-panel-pad-y) + 42px) var(--auth-panel-pad-x) var(--auth-panel-pad-y);
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--auth-surface);
  scrollbar-width: thin;
}

.auth-panel-tools {
  position: absolute;
  top: clamp(14px, 2.2vh, 26px);
  right: clamp(16px, 2vw, 30px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-locale {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-md);
  background-color: var(--auth-surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-soft);
  cursor: pointer;
  transition: border-color .18s var(--auth-ease), background-color .18s var(--auth-ease);
}

.auth-locale:hover { border-color: var(--auth-border-strong); background-color: var(--auth-surface-muted); }

.auth-locale .auth-icon--globe   { font-size: 16px; color: var(--auth-text-muted); }
.auth-locale .auth-icon--chevron { font-size: 15px; color: var(--auth-text-faint); }

/* The label is for screen readers; the globe carries the meaning visually. */
.auth-locale__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

/* Stripped back to text: the pill around it is the control. `appearance` has
   to go too, or the browser draws its own arrow beside the chevron. */
.auth-locale__select {
  appearance: none;
  max-width: 132px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-overflow: ellipsis;
}

.auth-locale__select:focus-visible { outline: 2px solid var(--auth-brand-500); outline-offset: 3px; }

/* The list itself is painted by the OS, which does not inherit the pill's
   colours — say them again or a dark scheme gets white-on-white options. */
.auth-locale__select option { background-color: var(--auth-surface); color: var(--auth-text); }

/* Only reachable without scripting: auth.js adds has-js and submits on change. */
.auth-locale__go {
  padding: 3px 9px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-pill);
  background-color: var(--auth-surface-muted);
  font: inherit;
  font-size: 12px;
  color: var(--auth-text-soft);
  cursor: pointer;
}

.auth-locale.has-js .auth-locale__go { display: none; }

.auth-theme-toggle {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-pill);
  background-color: var(--auth-surface-muted);
}

.auth-theme-toggle__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: var(--auth-radius-pill);
  background-color: transparent;
  color: var(--auth-text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: background-color .18s var(--auth-ease), color .18s var(--auth-ease), box-shadow .18s var(--auth-ease);
}

.auth-theme-toggle__btn:hover { color: var(--auth-text); }

.auth-theme-toggle__btn.is-active {
  color: var(--auth-brand-500);
  background-color: var(--auth-surface);
  box-shadow: var(--auth-shadow-sm);
}

/* --------------------------------------------------------------------------
   7. Auth card
   -------------------------------------------------------------------------- */
.auth-card {
  width: 100%;
  max-width: var(--auth-card-width);
  margin: auto;
  padding: var(--auth-card-pad-y) var(--auth-card-pad-x);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-xl);
  background-color: var(--auth-surface);
  box-shadow: var(--auth-shadow-lg);
}

/* Denser rhythm for the longest form (sign up) */
.auth-card--compact {
  --auth-field-gap: clamp(9px, 1.5vh, 14px);
  --auth-stack: clamp(9px, 1.5vh, 15px);
}

.auth-card__logo {
  display: none;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-card__head {
  margin-bottom: var(--auth-stack);
  text-align: center;
}

.auth-card__badge {
  display: grid;
  place-items: center;
  width: clamp(42px, 6vh, 52px);
  aspect-ratio: 1;
  margin: 0 auto clamp(10px, 1.6vh, 16px);
  border-radius: var(--auth-radius-md);
  font-size: clamp(20px, 2.8vh, 25px);
  color: var(--auth-brand-600);
  background-color: var(--auth-brand-50);
  border: 1px solid var(--auth-brand-100);
}

.auth-card__title {
  margin: 0;
  font-size: var(--auth-fs-title);
  font-weight: 700;
  letter-spacing: -.7px;
}

.auth-card__subtitle {
  margin: 6px 0 0;
  color: var(--auth-text-muted);
  font-size: var(--auth-fs-body);
}

.auth-card__subtitle strong {
  color: var(--auth-text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Fields, inputs, validation
   -------------------------------------------------------------------------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--auth-field-gap);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Label row carries the validation message so errors never shift the layout */
.auth-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 16px;
}

.auth-field__label {
  font-size: var(--auth-fs-label);
  font-weight: 600;
  color: var(--auth-text-soft);
}

.auth-field__message {
  font-size: var(--auth-fs-small);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  color: var(--auth-danger);
  opacity: 0;
  transition: opacity .16s var(--auth-ease);
}

.auth-field.is-error .auth-field__message,
.auth-field.is-success .auth-field__message { opacity: 1; }
.auth-field.is-success .auth-field__message { color: var(--auth-success); }

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--auth-input-h);
  border: 1px solid var(--auth-border-strong);
  border-radius: var(--auth-radius-md);
  background-color: var(--auth-surface);
  transition: border-color .18s var(--auth-ease), box-shadow .18s var(--auth-ease), background-color .18s var(--auth-ease);
}

.auth-input-group:hover { border-color: var(--auth-brand-200); }

.auth-input-group:focus-within {
  border-color: var(--auth-brand-500);
  box-shadow: 0 0 0 4px var(--auth-ring);
}

.auth-input-icon {
  display: grid;
  place-items: center;
  width: 42px;
  flex: none;
  font-size: 17px;
  color: var(--auth-text-faint);
  transition: color .18s var(--auth-ease);
}

.auth-input-group:focus-within .auth-input-icon { color: var(--auth-brand-500); }

.auth-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px 0 0;
  border: 0;
  border-radius: inherit;
  background-color: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--auth-text);
  outline: none;
}

/* the wrapper's focus ring is the focus indicator — a second outline is noise */
.auth-input:focus-visible { outline: none; }
.auth-input::placeholder { color: var(--auth-text-faint); }
/* Chromium paints its autofill slab above the input's own background, so no
 * background declaration can clear it — an inset box-shadow, drawn later, is
 * what covers it, repainting the colour .auth-input-group was already showing.
 * The group's background is opaque in both schemes, so it can be named
 * directly. The error tint is not, and a translucent inset would let the slab
 * through, so that state is flattened too — an autofilled field is very often
 * the one that errors, a saved password rejected on sign-in being exactly that
 * case. --auth-danger is the solid half of --auth-danger-soft, so the mix is
 * exact in the light scheme and two levels out of 255 in the dark one, which
 * is not worth a second scheme block down here.
 *
 * -webkit-text-fill-color is not decoration either: Chrome sets `color` on an
 * autofilled field with !important, and the caret still follows `color`, so
 * both have to be named. */
.auth-input-group {
  --auth-autofill-fill: var(--auth-surface);
}

.auth-field.is-error .auth-input-group {
  --auth-autofill-fill: color-mix(in srgb, var(--auth-danger) 10%, var(--auth-surface));
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
  -webkit-box-shadow: inset 0 0 0 1000px var(--auth-autofill-fill);
  box-shadow: inset 0 0 0 1000px var(--auth-autofill-fill);
  -webkit-text-fill-color: var(--auth-text);
  caret-color: var(--auth-text);
}

/* Firefox tints with a filter rather than a background, and keeps `color`. */
.auth-input:autofill { filter: none; }

.auth-password-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 100%;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 0 var(--auth-radius-md) var(--auth-radius-md) 0;
  background-color: transparent;
  color: var(--auth-text-faint);
  font-size: 17px;
  cursor: pointer;
  transition: color .18s var(--auth-ease);
}

.auth-password-toggle:hover { color: var(--auth-brand-500); }

/* Field states ------------------------------------------------------------ */
.auth-field.is-error .auth-input-group {
  border-color: var(--auth-danger);
  background-color: var(--auth-danger-soft);
}

.auth-field.is-error .auth-input-group:focus-within {
  box-shadow: 0 0 0 4px rgba(221, 63, 92, .14);
}

.auth-field.is-error .auth-input-icon { color: var(--auth-danger); }

.auth-field.is-success .auth-input-group { border-color: var(--auth-success); }
.auth-field.is-success .auth-input-group:focus-within { box-shadow: 0 0 0 4px var(--auth-success-soft); }
.auth-field.is-success .auth-input-icon { color: var(--auth-success); }

.auth-input:disabled,
.auth-input[readonly] { color: var(--auth-text-muted); cursor: not-allowed; }

.auth-input-group:has(.auth-input:disabled) {
  background-color: var(--auth-surface-sunk);
  border-color: var(--auth-border);
}

/* Row that pairs the checkbox with a helper link */
.auth-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.auth-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--auth-brand-600);
  text-decoration: none;
  transition: color .18s var(--auth-ease);
}

.auth-link:hover { color: var(--auth-brand-500); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   9. Checkbox
   -------------------------------------------------------------------------- */
.auth-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--auth-text-muted);
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.auth-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-checkbox__box {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: .5px;
  border: 1.5px solid var(--auth-border-strong);
  border-radius: 6px;
  background-color: var(--auth-surface);
  transition: background-color .16s var(--auth-ease), border-color .16s var(--auth-ease), box-shadow .16s var(--auth-ease);
}

.auth-checkbox__box::after {
  content: "";
  width: 11px;
  height: 11px;
  background-color: #fff;
  -webkit-mask: var(--auth-icon-check) center / contain no-repeat;
          mask: var(--auth-icon-check) center / contain no-repeat;
  transform: scale(.4);
  opacity: 0;
  transition: transform .16s var(--auth-ease), opacity .16s var(--auth-ease);
}

.auth-checkbox:hover .auth-checkbox__box { border-color: var(--auth-brand-400); }

.auth-checkbox__input:checked + .auth-checkbox__box {
  background: linear-gradient(140deg, var(--auth-brand-400), var(--auth-brand-600));
  border-color: transparent;
}

.auth-checkbox__input:checked + .auth-checkbox__box::after { transform: scale(1); opacity: 1; }
.auth-checkbox__input:focus-visible + .auth-checkbox__box { box-shadow: 0 0 0 4px var(--auth-ring); }

.auth-checkbox__label { line-height: 1.45; }
.auth-checkbox__label a { color: var(--auth-brand-600); font-weight: 600; text-decoration: none; }
.auth-checkbox__label a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-field--consent { gap: 5px; }
.auth-field--consent .auth-field__message { text-align: left; padding-left: 27px; }
.auth-field--consent.is-error .auth-checkbox__box { border-color: var(--auth-danger); }

/* --------------------------------------------------------------------------
   10. Buttons, social, divider, footer links
   -------------------------------------------------------------------------- */
.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: var(--auth-btn-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--auth-radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--auth-ease), box-shadow .18s var(--auth-ease),
              background-color .18s var(--auth-ease), border-color .18s var(--auth-ease), opacity .18s var(--auth-ease);
}

.auth-btn:active { transform: translateY(1px); }

.auth-btn--primary {
  color: #fff;
  background-image: var(--auth-gradient-btn);
  background-size: 160% 100%;
  background-position: 0 0;
  box-shadow: var(--auth-shadow-brand);
  transition: background-position .35s var(--auth-ease), box-shadow .18s var(--auth-ease),
              transform .16s var(--auth-ease);
}

.auth-btn--primary:hover {
  background-position: 100% 0;
  box-shadow: 0 16px 30px -12px rgba(100, 6, 245, .6);
}

.auth-btn--primary .auth-icon { font-size: 17px; transition: transform .2s var(--auth-ease); }
.auth-btn--primary:hover .auth-icon { transform: translateX(3px); }

.auth-btn--ghost {
  color: var(--auth-text-soft);
  background-color: transparent;
  border-color: var(--auth-border-strong);
}

.auth-btn--ghost:hover { background-color: var(--auth-surface-muted); color: var(--auth-text); }

.auth-btn[disabled],
.auth-btn.is-loading {
  cursor: not-allowed;
  opacity: .72;
  transform: none;
  box-shadow: none;
}

.auth-btn.is-loading { color: transparent; }

.auth-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: var(--auth-btn-h);
  border: 1px solid var(--auth-border-strong);
  border-radius: var(--auth-radius-md);
  background-color: var(--auth-surface);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--auth-text);
  cursor: pointer;
  transition: background-color .18s var(--auth-ease), border-color .18s var(--auth-ease), transform .16s var(--auth-ease);
}

.auth-social:hover {
  background-color: var(--auth-surface-muted);
  border-color: var(--auth-brand-200);
}

.auth-social:active { transform: translateY(1px); }

.auth-socials {
  display: grid;
  gap: 10px;
}

.auth-social__logo {
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--auth-google) center / contain no-repeat;
}

.auth-social__logo--microsoft { background-image: var(--auth-microsoft); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--auth-stack) 0;
  font-size: var(--auth-fs-small);
  color: var(--auth-text-faint);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--auth-border);
}

.auth-footer-link {
  margin: var(--auth-stack) 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--auth-text-muted);
}

.auth-footer-link a {
  font-weight: 600;
  color: var(--auth-brand-600);
  text-decoration: none;
}

.auth-footer-link a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-footer-link--back a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--auth-text-muted);
}

.auth-footer-link--back a:hover { color: var(--auth-brand-600); }
.auth-footer-link--back .auth-icon { font-size: 15px; transition: transform .2s var(--auth-ease); }
.auth-footer-link--back a:hover .auth-icon { transform: translateX(-3px); }

.auth-form__submit { margin-top: clamp(4px, 1vh, 10px); }

/* --------------------------------------------------------------------------
   11. Alerts, success view, password strength
   -------------------------------------------------------------------------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: var(--auth-stack);
  padding: 10px 13px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-md);
  font-size: 12.5px;
  line-height: 1.45;
  background-color: var(--auth-surface-muted);
  color: var(--auth-text-soft);
}

.auth-alert[hidden] { display: none; }
.auth-form > .auth-alert { margin-bottom: 0; }
.auth-alert .auth-icon { font-size: 16px; margin-top: 1px; }

.auth-alert--success {
  border-color: color-mix(in srgb, var(--auth-success) 35%, transparent);
  background-color: var(--auth-success-soft);
  color: var(--auth-success);
}

.auth-alert--error {
  border-color: color-mix(in srgb, var(--auth-danger) 35%, transparent);
  background-color: var(--auth-danger-soft);
  color: var(--auth-danger);
}

.auth-view[hidden] { display: none; }

.auth-view--success { text-align: center; }

.auth-view--success .auth-card__badge {
  color: var(--auth-success);
  background-color: var(--auth-success-soft);
  border-color: color-mix(in srgb, var(--auth-success) 30%, transparent);
}

.auth-view--success .auth-btn,
.auth-view--success .auth-social { margin-top: var(--auth-stack); }

.auth-resend {
  margin: var(--auth-stack) 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--auth-text-muted);
}

.auth-resend button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--auth-brand-600);
  cursor: pointer;
}

.auth-resend button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Password strength ------------------------------------------------------- */
.auth-strength {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}

.auth-strength__track {
  display: flex;
  gap: 4px;
  flex: 1;
}

.auth-strength__track i {
  height: 3px;
  flex: 1;
  border-radius: var(--auth-radius-pill);
  background-color: var(--auth-surface-sunk);
  transition: background-color .22s var(--auth-ease);
}

.auth-strength__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--auth-text-faint);
  min-width: 52px;
  text-align: right;
}

.auth-strength[data-level="1"] .auth-strength__track i:nth-child(-n+1),
.auth-strength[data-level="2"] .auth-strength__track i:nth-child(-n+2),
.auth-strength[data-level="3"] .auth-strength__track i:nth-child(-n+3),
.auth-strength[data-level="4"] .auth-strength__track i { background-color: var(--auth-strength-color, var(--auth-brand-500)); }

.auth-strength[data-level="1"] { --auth-strength-color: var(--auth-danger); }
.auth-strength[data-level="2"] { --auth-strength-color: var(--auth-warning); }
.auth-strength[data-level="3"] { --auth-strength-color: var(--auth-brand-500); }
.auth-strength[data-level="4"] { --auth-strength-color: var(--auth-success); }
.auth-strength[data-level="1"] .auth-strength__label { color: var(--auth-danger); }
.auth-strength[data-level="2"] .auth-strength__label { color: var(--auth-warning); }
.auth-strength[data-level="3"] .auth-strength__label { color: var(--auth-brand-500); }
.auth-strength[data-level="4"] .auth-strength__label { color: var(--auth-success); }

.auth-hint {
  margin: 0;
  font-size: var(--auth-fs-small);
  color: var(--auth-text-faint);
}

/* --------------------------------------------------------------------------
   12. Assurance strip
   -------------------------------------------------------------------------- */
.auth-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  height: var(--auth-strip-h);
  padding: 0 clamp(20px, 3.4vw, 62px);
  border-top: 1px solid var(--auth-border);
  background-color: var(--auth-strip-bg);
  color: var(--auth-text);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: clamp(9px, .9vw, 14px);
  min-width: 0;
}

.auth-feature__icon {
  display: grid;
  place-items: center;
  width: clamp(34px, 4.6vh, 44px);
  aspect-ratio: 1;
  flex: none;
  border-radius: clamp(10px, 1.4vh, 13px);
  font-size: clamp(16px, 2.3vh, 21px);
  color: var(--auth-brand-500);
  background-color: var(--auth-surface);
  box-shadow: 0 6px 16px -8px rgba(48, 16, 105, .3), 0 1px 2px rgba(48, 16, 105, .05);
}

.auth-feature__body { min-width: 0; }

.auth-feature__title {
  display: block;
  font-size: clamp(12px, 1.6vh, 13.5px);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-feature__text {
  display: block;
  margin-top: 2px;
  font-size: clamp(10.5px, 1.35vh, 11.5px);
  line-height: 1.35;
  color: var(--auth-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

/* Laptop widths — give the feature copy room before anything is dropped */
@media (max-width: 1440px) {
  .auth-highlights { width: min(52%, 300px); }
  .auth-brand__stage { left: 34%; }
}

/* Narrow desktop / small laptop — tighten the brand column */
@media (max-width: 1240px) {
  .auth-layout__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth-brand__text { display: none; }
  .auth-highlight__text { display: none; }
  .auth-highlights { width: min(50%, 250px); }
  .auth-brand__stage { left: 30%; }
}

@media (max-width: 1120px) {
  .auth-highlights { display: none; }
  .auth-brand__stage { left: 0; }
  .auth-trusted__title { display: none; }
  .auth-trusted { justify-content: center; }
}

/* Tablet + mobile — single column, natural scrolling */
@media (max-width: 960px) {
  .auth-body {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    background:
      radial-gradient(90% 55% at 50% 0%, var(--auth-panel-to), transparent 70%),
      var(--auth-bg);
  }

  .auth-layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    grid-template-rows: 1fr;
  }

  .auth-layout__body {
    grid-template-columns: 1fr;
    background-color: transparent;
  }

  .auth-brand { display: none; }
  .auth-feature-strip { display: none; }

  .auth-form-panel {
    overflow: visible;
    padding: 68px 20px 44px;
    background-color: transparent;
  }

  .auth-card__logo { display: flex; }

  .auth-panel-tools {
    top: 18px;
    right: 20px;
  }

  :root {
    --auth-card-width: 440px;
    --auth-card-pad-y: 28px;
    --auth-card-pad-x: 26px;
    --auth-field-gap: 15px;
    --auth-stack: 18px;
    --auth-input-h: 50px;
    --auth-btn-h: 52px;
    --auth-fs-title: 26px;
    --auth-fs-body: 14px;
  }
}

@media (max-width: 520px) {
  .auth-form-panel { padding: 62px 14px 34px; }

  .auth-card {
    padding: 24px 20px;
    border-radius: var(--auth-radius-lg);
  }

  .auth-form__row {
    flex-wrap: wrap;
    row-gap: 10px;
  }
}

/* Laptop-height desktops (1600x900, 1440x900, 1366x768) — tighten the rhythm
   so even the tallest form (sign up) stays inside the viewport. */
@media (min-width: 961px) and (max-height: 900px) {
  /* the tallest form (sign up) keeps both providers on one row */
  .auth-socials { grid-template-columns: 1fr 1fr; }
  .auth-social { font-size: 12.5px; }
}

@media (min-width: 961px) and (max-height: 820px) {
  :root {
    --auth-card-pad-y: 22px;
    --auth-input-h: 42px;
    --auth-btn-h: 45px;
    --auth-field-gap: 11px;
    --auth-stack: 12px;
    --auth-fs-title: 22px;
  }

  .auth-card--compact .auth-card__subtitle { display: none; }
}

/* Very short desktop viewports — trim non-essential brand elements */
@media (min-width: 961px) and (max-height: 700px) {
  .auth-brand__text,
  .auth-brand__eyebrow { display: none; }
  .auth-highlight__text { display: none; }
  .auth-card__badge { display: none; }
}

@media (min-width: 961px) and (max-height: 600px) {
  .auth-trusted { display: none; }
  .auth-highlights { display: none; }
  .auth-brand__stage { left: 0; bottom: 0; }
  .auth-feature__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-body *,
  .auth-body *::before,
  .auth-body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
