:root {
    --cds-font-family-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --cds-white: #ffffff;
    --cds-danger-color: #da1e28;
    --cds-letter-spacing-16: 0.16px;
    --cds-letter-spacing-32: 0.32px;
    --cds-primary-color: #6932d5;
    --cds-font-size-14px: 0.875rem;

    /* Theme-aware tokens — light defaults */
    --cds-link-color: #0f62fe;
    --page-bg:              #ffffff;
    --panel-bg:             #ffffff;
    --input-bg:             #f4f4f4;
    --input-readonly-bg:    #e8e8e8;
    --input-readonly-color: #525252;
    --body-text:            #161616;
    --secondary-text:       #525252;
    --footer-bg:            #ffffff;
    --alert-error-bg:       #fff1f1;
    --btn-secondary-bg:     #E9E0F9;   /* light purple tint — primary at 15% on white */
    --btn-secondary-color:  var(--cds-primary-color);
}

[data-theme="dark"] {
    /* Carbon g100 base tokens — matches portal dark theme mixin */
    --page-bg:              #161616; /* --cds-background (g100) */
    --panel-bg:             #161616; /* --cds-background (g100) */
    --input-bg:             #393939; /* --cds-field-02  (g100) — portal: --cds-field: var(--cds-field-02) */
    --input-readonly-bg:    #262626; /* --cds-layer-01  (g100) */
    --input-readonly-color: #6f6f6f; /* --cds-text-placeholder (g100) */
    --body-text:            #f4f4f4; /* --cds-text-primary  (g100) */
    --secondary-text:       #c6c6c6; /* --cds-text-secondary (g100) */
    --footer-bg:            #161616;
    --alert-error-bg:       #390c0c; /* Carbon g100 notification-error background */
    --btn-secondary-bg:     rgba(255, 255, 255, 0.2); /* portal: $tertiary-button-bg-color-dark */
    --btn-secondary-color:  #f4f4f4; /* light text on dark secondary button */
    --cds-link-color:       #78a9ff; /* lighter blue for links in dark mode */
}

html, body {
    margin: 0;
    height: 100%;
    font-family: var(--cds-font-family-sans) !important;
    color: var(--body-text);
    background: var(--page-bg);
}

p {
    padding: 0;
    margin: 0;
    line-height: 5px;
    font-size: var(--cds-font-size-14px);
}

.mt-10 {
    margin-top: 10px;
}

.mt-4 {
    margin-top: 4px;
}

.mb-14 {
    margin-bottom: 14px;
}

.pdn-top-10 {
    padding-top: 10px !important;
}

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: inline; }

.login-layout {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    min-height: 100vh;
}

.login-left {
    grid-column: span 8;
    padding: 26px 52px;
    background: var(--panel-bg);
}

.login-right {
    grid-column: span 8;
    min-height: 100vh;
    background:
        radial-gradient(700px 700px at 100% 0%, rgba(147, 51, 234, 0.16) 0%, transparent 60%),
        radial-gradient(700px 700px at 0% 100%, rgba(37, 99, 235, 0.16) 0%, transparent 60%),
        linear-gradient(160deg, #030114 0%, #09062a 55%, #12083d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;
    padding: 32px 24px;
    box-sizing: border-box;
}

.login-content {
    margin-top: 22px;
}

.welcome-title {
    font-size: 1.375rem !important;
    line-height: 36px;
    font-weight: normal;
    margin: 0 0 2px 0;
}

.welcome-title b {
    font-weight: 600;
}

.reset-title {
    font-size: 1.375rem !important;
    line-height: 36px;
    margin: 0 0 2px 0;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    letter-spacing: var(--cds-letter-spacing-32);
    line-height: 1rem;
    color: var(--secondary-text);
}

.form-group input {
    width: 100%;
    padding: 11px 11px 11px 16px;
    border: none;
    border-radius: 30px;
    box-sizing: border-box;
    background-color: var(--input-bg) !important;
    color: var(--body-text);
}

.form-group input::placeholder {
    font-size: var(--cds-font-size-14px);
    color: var(--secondary-text);
    font-family: var(--cds-font-family-sans);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--body-text) !important;
}

.form-group input:focus {
    background: var(--panel-bg) !important;
    border: 1px solid var(--cds-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(105, 50, 213, 0.15);
}

.form-group input[readonly] {
    background-color: var(--input-readonly-bg) !important;
    color: var(--input-readonly-color);
    cursor: not-allowed;
    border: none;
}

.form-group input[readonly]:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.login-btn {
    width: 100%;
    padding: 11px 15px;
    border: none;
    border-radius: 24px;
    background: var(--cds-primary-color);
    color: var(--cds-white);
    font-size: var(--cds-font-size-14px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
    font-family: var(--cds-font-family-sans);
}

.forgot-password {
    text-align: left;
    margin-top: 20px;
    font-size: var(--cds-font-size-14px);
    letter-spacing: var(--cds-letter-spacing-16);
    color: var(--cds-link-color);
}

.error {
    border: 2px solid var(--cds-danger-color) !important;
}

.error-message {
    color: var(--cds-danger-color);
    font-size: 0.75rem;
    line-height: 1.33333;
    letter-spacing: var(--cds-letter-spacing-32);
    margin: .25rem 0 0;
}

.error-icon {
    position: absolute;
    right: 16px;
    top: 35px;
}

.eye-icon {
    position: absolute;
    right: 16px;
    top: 36px;
}

#password-error-icon, #password-confirm-error-icon {
    right: 40px;
}

.alert-error {
    background-color: var(--alert-error-bg);
    color: var(--cds-danger-color);
    padding: 12px 16px;
    border-radius: 5px;
    margin-top: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--cds-danger-color);
    border-left: 5px solid var(--cds-danger-color);
    border-right: 5px solid var(--cds-danger-color);
}

.none {
    display: none;
}

.required-asterisk {
    color: var(--cds-danger-color);
}

.signup-text {
    line-height: 1.5;
    margin: 0;
}

.signup-text a {
    color: var(--cds-link-color);
    text-decoration: none;
}

.forgot-password a {
    color: var(--cds-link-color);
    text-decoration: none;
}

.check-your-inbox {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 8px 0 20px 0;
    line-height: 36px;
}

.verify-email-text p {
    font-size: var(--cds-font-size-14px);
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
    margin-bottom: 12px;
}

.verify-email-text p strong {
    font-weight: 600;
}

.back-to-login {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.back-to-login > div:nth-child(1) a {
    color: var(--btn-secondary-color);
    text-decoration: none;
    font-size: var(--cds-font-size-14px);
    background: var(--btn-secondary-bg);
    padding: 8px 24px 8px 16px;
    border-radius: 30px;
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
    white-space: nowrap;
}

.back-to-login > div:nth-child(2) {
    font-size: var(--cds-font-size-14px);
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
}

.back-to-login > div:nth-child(2) span {
    font-size: var(--cds-font-size-14px);
    color: var(--cds-link-color);
    opacity: 0.7;
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
}

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 35%;
    padding: 1rem 52px;
    font-size: 0.75rem;
    line-height: 1.33333;
    letter-spacing: var(--cds-letter-spacing-32);
    background: var(--footer-bg);
    box-sizing: border-box;
}

.page-footer a {
    color: var(--cds-link-color);
    text-decoration: none;
}

/* ── Register page ──────────────────────────────────────────── */

.signup-title {
    font-size: 1.375rem !important;
    line-height: 36px;
    margin: 0;
    font-weight: 400;
}

.register-subtitle {
    color: var(--secondary-text);
    font-size: var(--cds-font-size-14px);
    line-height: 1.5;
    margin: 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.password-hint {
    color: var(--secondary-text);
    font-size: 0.75rem;
    line-height: 1.33333;
    letter-spacing: var(--cds-letter-spacing-32);
    margin-top: 4px;
}

.signup-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--secondary-text);
    line-height: 1.5;
}

.register-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 32px;
}

.back-btn {
    padding: 11px 15px;
    border: none;
    border-radius: 24px;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    font-size: var(--cds-font-size-14px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
    font-family: var(--cds-font-family-sans);
}

.signup-btn {
    padding: 11px 15px;
    border: none;
    border-radius: 24px;
    background: var(--cds-primary-color);
    color: var(--cds-white);
    font-size: var(--cds-font-size-14px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    line-height: 1.28572;
    letter-spacing: var(--cds-letter-spacing-16);
    font-family: var(--cds-font-family-sans);
}

.login-btn:disabled,
.signup-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-spinner {
    flex-shrink: 0;
    animation: btn-spin 0.75s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ── Auth side panel ────────────────────────────────────────── */
/* Always dark, independent of [data-theme] — matches the fixed
   .login-right gradient background above. */

.auth-panel {
    /* Matches the reference visualization's exact palette (Tailwind
       purple-500 / blue-500 / emerald-500 / red-500) rather than the brand
       purple, so the panel reads identically to the approved design. */
    --auth-panel-purple-rgb: 168, 85, 247;
    --auth-panel-blue-rgb: 59, 130, 246;
    --auth-panel-emerald-rgb: 16, 185, 129;
    --auth-panel-red-rgb: 239, 68, 68;
    --auth-panel-row-height: 58px;
    --auth-panel-row-gap: 28px;
    --auth-panel-icon-size: 40px;
    --auth-panel-col-width: 230px;

    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.auth-panel__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-panel__headline {
    max-width: 480px;
    margin-bottom: 24px;
}

.auth-panel__headline h2 {
    font-size: clamp(1.5rem, 1.1rem + 1.2vw, 1.875rem);
    font-weight: 700;
    line-height: 1.375;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.auth-panel__headline-accent {
    background: linear-gradient(90deg, #8aa0ff, #b794f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-panel__headline p {
    margin: 0;
    font-size: clamp(0.75rem, 0.65rem + 0.3vw, 0.875rem);
    font-weight: 500;
    line-height: 1.625;
    color: #cbd5e1;
}

.auth-panel__badge {
    /* Stacked above the connector on purpose: the badge comes before the
       stage-list in the DOM, and without an explicit z-index a later
       element (the connector, reaching up into the badge's own space)
       paints on top of it by default — the line would visibly cross the
       text instead of disappearing behind the opaque pill. */
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    margin-bottom: 28px;
    border-radius: 999px;
    background: #0d0932;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
}

.auth-panel__badge-avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #8a5fe0, #4242d3);
}

.auth-panel__badge-name {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-panel__badge-role {
    font-size: 0.625rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.55);
}

.auth-panel__stage-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--auth-panel-row-gap);
}

.auth-panel__stage-row {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.auth-panel__stage-text-slot,
.auth-panel__card-slot {
    flex: 1;
    min-width: 0;
    display: flex;
}

.auth-panel__stage-text-slot {
    justify-content: flex-end;
}

.auth-panel__card-slot {
    /* Explicit flex + justify-content, not just "block, so it defaults to
       the start edge" — .card is display:inline-flex, an inline-level box,
       so without a real flex container here its position falls back to the
       parent's inherited text-align (center, from .login-right), centering
       it in the slot instead of hugging the icon. */
    justify-content: flex-start;
}

.auth-panel__stage-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-height: var(--auth-panel-row-height);
    max-width: var(--auth-panel-col-width);
    text-align: right;
    opacity: 0.45;
    transform: translateY(3px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__stage-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.auth-panel__stage-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.auth-panel__eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
}

.auth-panel__badge-tag {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__badge-tag {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.auth-panel__badge-tag[data-accent="red"] {
    color: #f87171;
    border-color: rgba(var(--auth-panel-red-rgb), 0.2);
    background: rgba(var(--auth-panel-red-rgb), 0.1);
}

.auth-panel__badge-tag[data-accent="blue"] {
    color: #60a5fa;
    border-color: rgba(var(--auth-panel-blue-rgb), 0.2);
    background: rgba(var(--auth-panel-blue-rgb), 0.1);
}

.auth-panel__badge-tag[data-accent="emerald"] {
    color: #34d399;
    border-color: rgba(var(--auth-panel-emerald-rgb), 0.2);
    background: rgba(var(--auth-panel-emerald-rgb), 0.1);
}

.auth-panel__badge-tag[data-accent="purple"] {
    color: #c4b5fd;
    border-color: rgba(var(--auth-panel-purple-rgb), 0.25);
    background: rgba(var(--auth-panel-purple-rgb), 0.12);
}

.auth-panel__stage-title {
    font-size: clamp(0.75rem, 0.68rem + 0.25vw, 0.875rem);
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.auth-panel__stage-subtitle {
    /* The global `p { line-height: 5px; }` reset (meant for the login
       form's tiny helper text) otherwise wins here by default, since this
       rule never overrode it — lines only 5px apart is what read as an
       "overlap" whenever this wraps to 2 lines. Not a connector/icon
       geometry issue at all. */
    font-size: clamp(0.625rem, 0.58rem + 0.15vw, 0.6875rem);
    line-height: 1.4;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
}

.auth-panel__icon-col {
    position: relative;
    flex-shrink: 0;
    width: var(--auth-panel-icon-size);
    height: var(--auth-panel-row-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-panel__connector {
    /* No overflow:hidden — the fill's own height stays within these bounds
       on its own, and the particle deliberately straddles the top/bottom
       edges (centered on them via translate(-50%,-50%)) to read as a full
       circle at the start/end of its travel. */
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 2px;
    height: calc(var(--auth-panel-row-height) + var(--auth-panel-row-gap));
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.12);
    z-index: 0;
}

/* Extends the spine up into the author badge — height is measured and set
   at runtime by auth-side-panel.js (the badge's own height flexes with its
   content), this is just a pre-JS fallback. */
.auth-panel__connector--first {
    height: 62px;
}

.auth-panel__connector-fill {
    /* Anchored at the top (the previous, already-lit stage) and grows
       downward into the current stage — light flows top-to-bottom,
       matching the trace-to-enforce reading order. */
    position: absolute;
    inset: 0 0 auto 0;
    height: 0%;
    background: linear-gradient(to bottom, rgba(var(--auth-panel-purple-rgb), 0.7), rgba(var(--auth-panel-emerald-rgb), 0.7));
    box-shadow: 0 0 10px rgba(var(--auth-panel-purple-rgb), 0.5);
    transition: height 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__connector-fill {
    height: 100%;
}

.auth-panel__connector-particle {
    position: absolute;
    left: 50%;
    top: 0%;
    z-index: 3;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: top 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__connector-particle {
    top: 100%;
    opacity: 1;
}

.auth-panel__icon-node {
    position: relative;
    z-index: 2;
    width: var(--auth-panel-icon-size);
    height: var(--auth-panel-icon-size);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0d0932;
    opacity: 0.45;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, border-color 0.5s ease-out, background-color 0.5s ease-out;
}

.auth-panel__icon-node svg {
    color: #64748b;
    transition: color 0.4s ease-out;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__icon-node {
    opacity: 1;
    transform: scale(1);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__icon-node svg {
    color: #ffffff;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__icon-node[data-accent="purple"] {
    border-color: rgba(var(--auth-panel-purple-rgb), 0.65);
    background: #140d3d;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__icon-node[data-accent="blue"] {
    border-color: rgba(var(--auth-panel-blue-rgb), 0.65);
    background: #0a173d;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__icon-node[data-accent="emerald"] {
    border-color: rgba(var(--auth-panel-emerald-rgb), 0.65);
    background: #072426;
}

.auth-panel__icon-bloom {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

.auth-panel__icon-bloom[data-accent="purple"] {
    box-shadow: 0 0 20px 4px rgba(var(--auth-panel-purple-rgb), 0.45);
}

.auth-panel__icon-bloom[data-accent="blue"] {
    box-shadow: 0 0 20px 4px rgba(var(--auth-panel-blue-rgb), 0.45);
}

.auth-panel__icon-bloom[data-accent="emerald"] {
    box-shadow: 0 0 20px 4px rgba(var(--auth-panel-emerald-rgb), 0.45);
}

.auth-panel__icon-bloom[data-arrival="true"] {
    animation: auth-panel-bloom 0.8s ease-out;
}

.auth-panel__card {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: var(--auth-panel-col-width);
    min-height: var(--auth-panel-row-height);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 9, 50, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0.5;
    transform: translateY(3px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color 0.3s ease-out;
    box-sizing: border-box;
    font-size: 0.6875rem;
    text-align: left;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="purple"] {
    border-color: rgba(var(--auth-panel-purple-rgb), 0.35);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="blue"] {
    border-color: rgba(var(--auth-panel-blue-rgb), 0.35);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="emerald"] {
    border-color: rgba(var(--auth-panel-emerald-rgb), 0.35);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card:hover {
    transform: translateY(-2px);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="purple"]:hover {
    border-color: rgba(var(--auth-panel-purple-rgb), 0.6);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="blue"]:hover {
    border-color: rgba(var(--auth-panel-blue-rgb), 0.6);
}

.auth-panel__stage-row[data-active="true"] .auth-panel__card[data-accent="emerald"]:hover {
    border-color: rgba(var(--auth-panel-emerald-rgb), 0.6);
}

.auth-panel__card-label {
    color: rgba(255, 255, 255, 0.55);
}

.auth-panel__card-value {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-panel__card-highlight {
    display: block;
    font-weight: 600;
    margin-top: 8px;
}

.auth-panel__card[data-accent="purple"] .auth-panel__card-highlight {
    color: #c4b5fd;
}

.auth-panel__card[data-accent="blue"] .auth-panel__card-highlight {
    color: #93c5fd;
}

.auth-panel__card[data-accent="emerald"] .auth-panel__card-highlight {
    color: #34d399;
}

.auth-panel__card-links {
    /* Sized down (not wrapped) so all 4 tools reliably fit on one line
       within the card's existing width — smaller text + tighter gap
       rather than widening the card/panel for this one line. flex-wrap
       stays as a last-resort safety net only. */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.6rem;
    color: #34d399;
    font-weight: 600;
}

.auth-panel__card-pr-id {
    color: #c4b5fd;
    font-weight: 700;
}

.auth-panel__card-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.auth-panel__card-pill[data-tone="success"] {
    color: #34d399;
    background: rgba(var(--auth-panel-emerald-rgb), 0.15);
    border: 1px solid rgba(var(--auth-panel-emerald-rgb), 0.3);
}

.auth-panel__card-desc {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.auth-panel__card-status-line {
    /* If the pill still doesn't fit next to the label (e.g. an unusually
       long dollar amount), drop it to its own line as a whole unit
       (flex-wrap) rather than letting its own text wrap internally — that
       reads as a layout bug, this reads as a two-line status. Kept as a
       safety net; the label/pill below are sized to fit on one line at
       the card's normal 230px width in the common case. */
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
    align-items: center;
    gap: 4px;
    color: #34d399;
}

.auth-panel__card-status-label {
    /* Smaller than the badge tags (0.625rem) specifically so "label + pill"
       reliably fits one line within the card's existing width — sized
       down rather than widening the whole card/panel for one line. */
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.auth-panel__card-status-line .auth-panel__card-pill {
    margin-left: 0;
    padding: 1px 5px;
    font-size: 0.5rem;
}

.auth-panel__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(var(--auth-panel-emerald-rgb));
    animation: auth-panel-pulse 1.6s ease-in-out infinite;
}

.auth-panel__trust-row {
    width: 100%;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-panel__trust-chip {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes auth-panel-bloom {
    from {
        opacity: 0.8;
        transform: scale(0.9);
    }
    to {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes auth-panel-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel__badge,
    .auth-panel__stage-text,
    .auth-panel__badge-tag,
    .auth-panel__card,
    .auth-panel__connector-fill,
    .auth-panel__connector-particle,
    .auth-panel__icon-node,
    .auth-panel__icon-bloom,
    .auth-panel__status-dot {
        animation: none !important;
        transition: none !important;
    }
}

/* Auth panel: below this, the two flex columns either side of the icon
   (stage text + card) get too narrow to hold their content on one line.
   Independent of the .login-left/.login-right breakpoints below, since
   it's driven by the panel's own column width, not the page grid split. */
@media (max-width: 1150px) {
    .auth-panel__stage-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .auth-panel__stage-list {
        gap: 24px;
    }

    .auth-panel__stage-text-slot,
    .auth-panel__card-slot {
        flex: none;
        width: 100%;
    }

    .auth-panel__stage-text-slot {
        justify-content: center;
    }

    .auth-panel__stage-text {
        align-items: center;
        text-align: center;
        min-height: auto;
    }

    .auth-panel__stage-meta {
        justify-content: center;
    }

    .auth-panel__connector {
        display: none;
    }

    .auth-panel__card-slot {
        display: flex;
        justify-content: center;
    }

    .auth-panel__card {
        max-width: 280px;
        align-items: center;
        text-align: center;
    }

    .auth-panel__card-links,
    .auth-panel__card-metrics,
    .auth-panel__card-status-line {
        justify-content: center;
    }
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-left {
        grid-column: span 8;
        padding: 26px 40px;
    }

    .login-right {
        grid-column: span 8;
    }

    .page-footer {
        width: 50%;
        padding: 1rem 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .login-layout {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-left {
        grid-column: span 1;
        padding: 24px 24px 40px;
    }

    .login-right {
        display: none;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .register-actions {
        gap: 16px;
    }

    .back-btn,
    .signup-btn {
        flex: 1;
    }

    .page-footer {
        position: static;
        width: 100%;
        padding: 1rem 24px;
        box-sizing: border-box;
        text-align: center;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .login-left {
        padding: 20px 20px 32px;
    }

    .welcome-title,
    .reset-title,
    .signup-title,
    .check-your-inbox {
        font-size: 1.125rem !important;
        line-height: 1.4;
    }

    .register-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .back-btn,
    .signup-btn {
        flex: unset;
        width: 100%;
        justify-content: space-between;
    }

    .back-to-login {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
