/* =============================================================================
   Jaihind News — Auth Design System
   Tokens first. Composition second. No Bootstrap auth cards.
   ============================================================================= */

:root {
    /* Color */
    --auth-brand: #d71920;
    --auth-brand-dark: #b5141a;
    --auth-ink: #121417;
    --auth-ink-soft: #3d4450;
    --auth-muted: #6b7280;
    --auth-placeholder: #9aa3af;
    --auth-line: #e4e7ec;
    --auth-line-strong: #cfd5de;
    --auth-surface: #ffffff;
    --auth-canvas: #f6f7f9;
    --auth-danger: #b91c1c;
    --auth-danger-bg: #fef2f2;
    --auth-success: #166534;
    --auth-success-bg: #f0fdf4;
    --auth-warning: #92400e;
    --auth-warning-bg: #fffbeb;

    /* Type family — brand UI + intentional editorial display */
    --auth-font: "Anek Malayalam", system-ui, -apple-system, "Segoe UI", sans-serif;
    --auth-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;

    /* Type size */
    --auth-fs-title: 2.25rem;       /* 36px */
    --auth-fs-body: 1rem;           /* 16px */
    --auth-fs-label: 0.875rem;      /* 14px */
    --auth-fs-input: 1rem;          /* 16px */
    --auth-fs-button: 0.9375rem;    /* 15px */
    --auth-fs-secondary: 0.875rem;  /* 14px */
    --auth-fs-meta: 0.8125rem;      /* 13px */
    --auth-fs-micro: 0.75rem;       /* 12px */
    --auth-fs-panel-kicker: 0.75rem;
    --auth-fs-panel-title: clamp(2.25rem, 3.2vw, 3rem);
    --auth-fs-panel-meta: 0.9375rem;

    /* Weight */
    --auth-fw-regular: 400;
    --auth-fw-medium: 500;
    --auth-fw-semibold: 600;
    --auth-fw-bold: 700;

    /* Line height */
    --auth-lh-title: 1.2;
    --auth-lh-body: 1.55;
    --auth-lh-label: 1.35;
    --auth-lh-input: 1.45;
    --auth-lh-button: 1;
    --auth-lh-meta: 1.45;
    --auth-lh-panel: 1.18;

    /* Tracking */
    --auth-ls-title: -0.02em;
    --auth-ls-body: 0;
    --auth-ls-kicker: 0.14em;
    --auth-ls-micro: 0.06em;

    /* Spacing scale: 4 8 12 16 20 24 32 40 48 56 64 */
    --auth-space-1: 4px;
    --auth-space-2: 8px;
    --auth-space-3: 12px;
    --auth-space-4: 16px;
    --auth-space-5: 20px;
    --auth-space-6: 24px;
    --auth-space-7: 32px;
    --auth-space-8: 40px;
    --auth-space-9: 48px;
    --auth-space-10: 56px;
    --auth-space-11: 64px;

    /* Control geometry */
    --auth-form-width: 420px;
    --auth-input-height: 48px;
    --auth-button-height: 48px;
    --auth-radius: 10px;
    --auth-focus-ring: 0 0 0 3px rgba(215, 25, 32, 0.16);
    --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Legacy aliases (components / prior class names) */
    --jh-auth-brand: var(--auth-brand);
    --jh-auth-brand-dark: var(--auth-brand-dark);
    --jh-auth-ink: var(--auth-ink);
    --jh-auth-ink-soft: var(--auth-ink-soft);
    --jh-auth-muted: var(--auth-muted);
    --jh-auth-line: var(--auth-line);
    --jh-auth-line-strong: var(--auth-line-strong);
    --jh-auth-surface: var(--auth-surface);
    --jh-auth-canvas: var(--auth-canvas);
    --jh-auth-danger: var(--auth-danger);
    --jh-auth-danger-bg: var(--auth-danger-bg);
    --jh-auth-success: var(--auth-success);
    --jh-auth-success-bg: var(--auth-success-bg);
    --jh-auth-radius: var(--auth-radius);
    --jh-auth-font: var(--auth-font);
    --jh-auth-serif: var(--auth-font-display);
    --jh-auth-ease: var(--auth-ease);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.jh-auth-app {
    margin: 0;
    height: 100%;
    min-height: 100%;
    font-family: var(--auth-font);
    font-size: var(--auth-fs-body);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-body);
    letter-spacing: var(--auth-ls-body);
    color: var(--auth-ink);
    background: var(--auth-canvas);
    -webkit-font-smoothing: antialiased;
}

body.jh-auth-app {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

a {
    color: inherit;
}

/* -----------------------------------------------------------------------------
   Shell
   ----------------------------------------------------------------------------- */

.jh-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    animation: jh-auth-fade 0.4s var(--auth-ease) both;
}

@keyframes jh-auth-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes jh-auth-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------------------
   Editorial panel
   ----------------------------------------------------------------------------- */

.jh-auth-brand-panel {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 85% at 0% 0%, rgba(215, 25, 32, 0.48) 0%, transparent 52%),
        radial-gradient(90% 70% at 100% 100%, rgba(215, 25, 32, 0.2) 0%, transparent 48%),
        linear-gradient(165deg, #1b0c0e 0%, #0b0c10 46%, #151820 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--auth-space-9) var(--auth-space-8);
}

.jh-auth-brand-panel__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 30%, #000 20%, transparent 75%);
    opacity: 0.7;
}

.jh-auth-brand-panel__media::after {
    content: "";
    position: absolute;
    width: min(72vw, 520px);
    height: min(72vw, 520px);
    right: -18%;
    top: -12%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(215, 25, 32, 0.12);
}

.jh-auth-brand-panel__grain {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 18% 72%, rgba(215, 25, 32, 0.28), transparent 34%),
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.08), transparent 28%);
    pointer-events: none;
}

.jh-auth-brand-panel__veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(8, 8, 10, 0.08) 0%, rgba(8, 8, 10, 0.35) 45%, rgba(8, 8, 10, 0.82) 100%);
    pointer-events: none;
}

.jh-auth-brand-panel__content {
    position: relative;
    z-index: 3;
    max-width: 22rem;
    animation: jh-auth-rise 0.5s 0.06s var(--auth-ease) both;
}

.jh-auth-brand-panel__logo {
    display: none;
}

.jh-auth-brand-panel__kicker {
    margin: 0 0 var(--auth-space-3);
    font-family: var(--auth-font);
    font-size: var(--auth-fs-panel-kicker);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-label);
    letter-spacing: var(--auth-ls-kicker);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.jh-auth-brand-panel__statement {
    margin: 0;
    font-family: var(--auth-font-display);
    font-size: var(--auth-fs-panel-title);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-panel);
    letter-spacing: var(--auth-ls-title);
    color: #fff;
    max-width: 12ch;
}

.jh-auth-brand-panel__meta {
    margin: var(--auth-space-5) 0 0;
    font-family: var(--auth-font);
    font-size: var(--auth-fs-panel-meta);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-body);
    letter-spacing: var(--auth-ls-body);
    color: rgba(255, 255, 255, 0.58);
}

/* -----------------------------------------------------------------------------
   Form stage — single vertical axis
   ----------------------------------------------------------------------------- */

.jh-auth-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    background: var(--auth-surface);
    padding: var(--auth-space-7) var(--auth-space-8);
}

.jh-auth-stage-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: var(--auth-form-width);
    max-height: 100%;
    min-height: 0;
    animation: jh-auth-rise 0.45s 0.04s var(--auth-ease) both;
}

.jh-auth-stage-brand {
    margin: 0 0 var(--auth-space-5);
}

.jh-auth-mark {
    display: inline-flex;
    text-decoration: none;
}

.jh-auth-mark img {
    display: block;
    width: 120px;
    height: auto;
}

.jh-auth-copy {
    margin: 0 0 var(--auth-space-5);
    max-width: 36ch;
}

.jh-auth-heading {
    margin: 0;
    font-size: var(--auth-fs-title);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-title);
    letter-spacing: var(--auth-ls-title);
    color: var(--auth-ink);
    overflow-wrap: break-word;
}

.jh-auth-lede {
    margin: var(--auth-space-2) 0 0;
    font-size: var(--auth-fs-body);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-body);
    letter-spacing: var(--auth-ls-body);
    color: var(--auth-ink-soft);
    overflow-wrap: break-word;
}

/* Form stack */
.jh-auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--auth-space-4);
    width: 100%;
}

.jh-auth-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--auth-space-3);
    margin: calc(var(--auth-space-2) * -1) 0 0;
    width: 100%;
}

.jh-auth-check {
    display: inline-flex;
    align-items: center;
    gap: var(--auth-space-2);
    min-height: 44px;
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-label);
    color: var(--auth-ink-soft);
    cursor: pointer;
    user-select: none;
}

.jh-auth-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--auth-brand);
    cursor: pointer;
    flex-shrink: 0;
}

.jh-auth-link {
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-label);
    color: var(--auth-brand);
    text-decoration: none;
    white-space: nowrap;
}

.jh-auth-link:hover,
.jh-auth-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.jh-auth-switch {
    margin: var(--auth-space-5) 0 0;
    text-align: center;
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-body);
    color: var(--auth-ink-soft);
}

.jh-auth-switch a {
    font-weight: var(--auth-fw-semibold);
    color: var(--auth-ink);
    text-decoration: none;
    margin-left: var(--auth-space-1);
}

.jh-auth-switch a:hover,
.jh-auth-switch a:focus-visible {
    color: var(--auth-brand);
    outline: none;
}

.jh-auth-back {
    display: inline-flex;
    align-items: center;
    gap: var(--auth-space-2);
    margin-top: var(--auth-space-5);
    min-height: 44px;
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-label);
    color: var(--auth-ink-soft);
    text-decoration: none;
}

.jh-auth-back:hover,
.jh-auth-back:focus-visible {
    color: var(--auth-ink);
    outline: none;
}

.jh-auth-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--auth-space-2);
    margin-top: var(--auth-space-5);
    padding-top: var(--auth-space-4);
    border-top: 1px solid var(--auth-line);
    font-size: var(--auth-fs-meta);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-meta);
    color: var(--auth-muted);
}

.jh-auth-legal a {
    text-decoration: none;
    color: inherit;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.jh-auth-legal a:hover,
.jh-auth-legal a:focus-visible {
    color: var(--auth-ink);
    outline: none;
}

.jh-auth-terms {
    display: flex;
    align-items: flex-start;
    gap: var(--auth-space-3);
    font-size: var(--auth-fs-meta);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-meta);
    color: var(--auth-ink-soft);
}

.jh-auth-terms input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--auth-brand);
    flex-shrink: 0;
}

.jh-auth-terms a {
    color: var(--auth-ink);
    font-weight: var(--auth-fw-medium);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   Fields
   ----------------------------------------------------------------------------- */

.jh-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--auth-space-2);
    width: 100%;
}

.jh-field__label {
    font-size: var(--auth-fs-label);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-label);
    letter-spacing: var(--auth-ls-body);
    color: var(--auth-ink);
}

.jh-field__input {
    width: 100%;
    height: var(--auth-input-height);
    padding: 0 var(--auth-space-4);
    border: 1px solid var(--auth-line-strong);
    border-radius: var(--auth-radius);
    background: var(--auth-surface);
    color: var(--auth-ink);
    font-family: inherit;
    font-size: var(--auth-fs-input);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-input);
    letter-spacing: var(--auth-ls-body);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.jh-field__input::placeholder {
    color: var(--auth-placeholder);
    font-weight: var(--auth-fw-regular);
    opacity: 1;
}

.jh-field__input:hover {
    border-color: #b8c0cc;
}

.jh-field__input:focus {
    outline: none;
    border-color: var(--auth-brand);
    box-shadow: var(--auth-focus-ring);
}

.jh-field__input.is-invalid {
    border-color: var(--auth-danger);
    background: var(--auth-danger-bg);
}

.jh-field__input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.jh-field__password {
    position: relative;
    width: 100%;
}

.jh-field__password .jh-field__input {
    padding-right: var(--auth-space-10);
}

.jh-field__reveal {
    position: absolute;
    top: 50%;
    right: var(--auth-space-1);
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.jh-field__reveal:hover,
.jh-field__reveal:focus-visible {
    color: var(--auth-ink);
    background: var(--auth-canvas);
    outline: none;
}

.jh-field__error {
    margin: 0;
    font-size: var(--auth-fs-meta);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-meta);
    color: var(--auth-danger);
}

/* -----------------------------------------------------------------------------
   Buttons / divider / alerts
   ----------------------------------------------------------------------------- */

.jh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--auth-space-3);
    width: 100%;
    min-height: var(--auth-button-height);
    height: var(--auth-button-height);
    padding: 0 var(--auth-space-5);
    border-radius: var(--auth-radius);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: var(--auth-fs-button);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-button);
    letter-spacing: var(--auth-ls-body);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.jh-btn:disabled,
.jh-btn.is-loading {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.jh-btn--primary {
    background: var(--auth-brand);
    color: #fff;
}

.jh-btn--primary:hover:not(:disabled):not(.is-loading) {
    background: var(--auth-brand-dark);
}

.jh-btn--primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.28);
}

.jh-btn--primary:active:not(:disabled):not(.is-loading) {
    transform: translateY(1px);
}

.jh-btn--social,
.jh-btn--secondary {
    background: var(--auth-surface);
    color: var(--auth-ink);
    border-color: var(--auth-line-strong);
    font-weight: var(--auth-fw-semibold);
}

.jh-btn--social:hover,
.jh-btn--secondary:hover:not(:disabled):not(.is-loading) {
    background: var(--auth-canvas);
    border-color: #b8c0cc;
}

.jh-btn--social:focus-visible,
.jh-btn--secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 20, 23, 0.1);
}

.jh-btn__google {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.jh-btn__google svg {
    display: block;
}

.jh-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--auth-space-4);
    width: 100%;
    margin: var(--auth-space-4) 0;
    color: var(--auth-muted);
    font-size: var(--auth-fs-micro);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-label);
    letter-spacing: var(--auth-ls-micro);
    text-transform: uppercase;
}

.jh-divider::before,
.jh-divider::after {
    content: "";
    height: 1px;
    background: var(--auth-line);
}

.jh-alert {
    margin: 0 0 var(--auth-space-5);
    padding: var(--auth-space-3) var(--auth-space-4);
    border-radius: var(--auth-radius);
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-meta);
}

.jh-auth-status .jh-alert {
    margin-bottom: 0;
}

.jh-alert--danger {
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
    border: 1px solid #fecaca;
}

.jh-alert--success {
    background: var(--auth-success-bg);
    color: var(--auth-success);
    border: 1px solid #bbf7d0;
}

.jh-alert--warning {
    background: var(--auth-warning-bg);
    color: var(--auth-warning);
    border: 1px solid #fde68a;
}

.jh-auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jh-auth-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.jh-auth-spinner--dark {
    border-color: rgba(18, 20, 23, 0.2);
    border-top-color: var(--auth-ink);
}

.jh-auth-back--center {
    justify-content: center;
    margin-top: 0;
    width: 100%;
}

.is-hidden,
[hidden] {
    display: none !important;
}

.jh-auth-context {
    margin: 0 0 var(--auth-space-4);
    padding: var(--auth-space-3) var(--auth-space-4);
    border-radius: var(--auth-radius);
    border: 1px solid rgba(215, 25, 32, 0.18);
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.06), rgba(215, 25, 32, 0.02));
}

.jh-auth-context__title {
    margin: 0;
    font-size: var(--auth-fs-label);
    font-weight: var(--auth-fw-semibold);
    line-height: var(--auth-lh-label);
    color: var(--auth-brand);
}

.jh-auth-context__text {
    margin: var(--auth-space-1) 0 0;
    font-size: var(--auth-fs-secondary);
    font-weight: var(--auth-fw-regular);
    line-height: var(--auth-lh-body);
    color: var(--auth-ink-soft);
}

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

/* -----------------------------------------------------------------------------
   Verification / status
   ----------------------------------------------------------------------------- */

.jh-auth-status {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--auth-space-5);
    width: 100%;
}

.jh-auth-status--inline {
    margin-bottom: var(--auth-space-1);
}

.jh-auth-status__icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.jh-auth-status__icon--success {
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.jh-auth-status__icon--danger {
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.jh-auth-status__icon--warning {
    background: var(--auth-warning-bg);
    color: var(--auth-warning);
}

.jh-auth-status__actions {
    display: flex;
    flex-direction: column;
    gap: var(--auth-space-4);
    width: 100%;
}

.jh-auth-status__ok {
    margin: 0;
    font-size: var(--auth-fs-meta);
    font-weight: var(--auth-fw-medium);
    line-height: var(--auth-lh-meta);
    color: var(--auth-success);
}

/* -----------------------------------------------------------------------------
   Login modal
   ----------------------------------------------------------------------------- */

.jh-login-modal .modal-dialog {
    max-width: calc(var(--auth-form-width) + 40px);
}

.jh-login-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 18, 24, 0.22);
}

.jh-login-modal .modal-header {
    border: 0;
    padding: var(--auth-space-5) var(--auth-space-5) var(--auth-space-1);
}

.jh-login-modal .modal-body {
    padding: var(--auth-space-2) var(--auth-space-5) var(--auth-space-6);
}

.jh-login-modal .jh-auth-heading {
    font-size: 1.75rem;
}

.jh-login-modal .jh-auth-stage-brand {
    margin-bottom: var(--auth-space-5);
}

.jh-login-modal .jh-auth-copy {
    margin-bottom: var(--auth-space-5);
}

.jh-login-modal .jh-auth-legal {
    display: none;
}

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */

@media (max-width: 1023.98px) {
    :root {
        --auth-fs-title: 1.5rem;
        --auth-fs-panel-title: 1.125rem;
        --auth-input-height: 40px;
        --auth-button-height: 40px;
        --auth-fs-body: 0.875rem;
        --auth-fs-input: 0.875rem;
        --auth-fs-label: 0.75rem;
        --auth-fs-button: 0.875rem;
        --auth-fs-secondary: 0.8125rem;
    }

    .jh-auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: 100dvh;
        max-height: 100dvh;
    }

    .jh-auth-brand-panel {
        min-height: 0;
        height: auto;
        flex: 0 0 auto;
        padding: 10px 16px;
        align-items: center;
    }

    .jh-auth-brand-panel__content {
        max-width: none;
    }

    .jh-auth-brand-panel__statement {
        max-width: none;
        font-size: 1.125rem;
        line-height: 1.15;
    }

    .jh-auth-brand-panel__meta {
        display: none;
    }

    .jh-auth-brand-panel__kicker {
        margin-bottom: 2px;
        font-size: 0.625rem;
    }

    .jh-auth-stage {
        align-items: stretch;
        justify-content: flex-start;
        padding: 12px 16px 10px;
        overflow: hidden;
    }

    .jh-auth-stage-inner {
        max-width: var(--auth-form-width);
        margin: 0 auto;
        justify-content: flex-start;
        height: 100%;
    }

    .jh-auth-stage-brand {
        display: none;
    }

    .jh-auth-copy {
        margin-bottom: 8px;
        max-width: none;
    }

    .jh-auth-lede {
        margin-top: 2px;
        font-size: 0.8125rem;
        line-height: 1.35;
    }

    .jh-auth-form {
        gap: 8px;
    }

    .jh-field {
        gap: 4px;
    }

    .jh-auth-form-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 16px;
        margin-top: 0;
    }

    .jh-auth-check {
        min-height: 0;
    }

    .jh-auth-terms {
        font-size: 0.75rem;
        gap: 8px;
        line-height: 1.35;
    }

    .jh-auth-back {
        min-height: 32px;
        margin-top: 8px;
    }

    .jh-divider {
        margin: 8px 0;
        gap: 8px;
    }

    .jh-auth-switch {
        margin-top: 8px;
        font-size: 0.8125rem;
    }

    .jh-auth-legal {
        display: none;
    }

    .jh-auth-context {
        margin-bottom: 8px;
        padding: 8px 10px;
    }

    .jh-auth-context__title {
        font-size: 0.75rem;
    }

    .jh-auth-context__text {
        font-size: 0.75rem;
        margin-top: 2px;
    }

    .jh-alert {
        margin-bottom: 8px;
        padding: 8px 10px;
        font-size: 0.8125rem;
    }

    .jh-btn {
        min-height: var(--auth-button-height);
        height: var(--auth-button-height);
        padding: 0 12px;
    }
}

@media (max-width: 359.98px) {
    :root {
        --auth-fs-title: 1.5rem;
        --auth-input-height: 42px;
        --auth-button-height: 42px;
    }

    .jh-auth-stage {
        padding-inline: var(--auth-space-4);
    }

    .jh-auth-brand-panel {
        padding: var(--auth-space-2) var(--auth-space-4);
    }

    .jh-auth-brand-panel__statement {
        font-size: 1.125rem;
    }
}

/* Short desktop viewports — keep form side inside without page scroll */
@media (min-width: 1024px) and (max-height: 860px) {
    :root {
        --auth-fs-title: 1.75rem;
        --auth-input-height: 44px;
        --auth-button-height: 44px;
    }

    .jh-auth-brand-panel {
        padding: var(--auth-space-7) var(--auth-space-7);
    }

    .jh-auth-stage {
        padding: var(--auth-space-5) var(--auth-space-6);
    }

    .jh-auth-stage-brand {
        margin-bottom: var(--auth-space-4);
    }

    .jh-auth-mark img {
        width: 108px;
    }

    .jh-auth-copy {
        margin-bottom: var(--auth-space-4);
    }

    .jh-auth-form {
        gap: var(--auth-space-3);
    }

    .jh-auth-legal {
        margin-top: var(--auth-space-4);
        padding-top: var(--auth-space-3);
    }

    .jh-auth-brand-panel__statement {
        font-size: clamp(1.75rem, 2.6vw, 2.25rem);
    }
}

@media (min-width: 1440px) and (min-height: 900px) {
    .jh-auth-brand-panel {
        padding: var(--auth-space-11) var(--auth-space-9);
    }

    .jh-auth-stage {
        padding: var(--auth-space-9) var(--auth-space-9);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jh-auth-shell,
    .jh-auth-stage-inner,
    .jh-auth-brand-panel__content,
    .jh-auth-spinner,
    .jh-btn {
        animation: none !important;
        transition: none !important;
    }
}
