.auth-shell {
    display: grid;
    grid-template-columns: minmax(420px, 560px) 1fr;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
}

.auth-form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-8) 64px;
    max-width: 560px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 56px;
}

.auth-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-accent);
}

.auth-brand-name {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.auth-title { font-size: 32px; margin-bottom: 8px; }
.auth-subtitle { color: color-mix(in srgb, var(--color-text) 60%, transparent); font-size: 14px; margin-bottom: 36px; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin-top: -4px; }

.auth-check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

.auth-check {
    appearance: none;
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 4px;
    border: 1.5px solid var(--color-divider);
    background: var(--color-surface);
    cursor: pointer;
    position: relative;
}
.auth-check:checked { border-color: var(--color-accent); background: var(--color-accent); }
.auth-check:checked::after {
    content: "";
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: solid var(--color-bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.auth-check:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.auth-link-row { font-size: 13px; margin-top: 28px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.auth-link-row p { margin: 6px 0; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: color-mix(in srgb, var(--color-text) 45%, transparent); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-divider); }

/* The image panel is light artwork shown as delivered — no filter, no wash. It
   keeps the same fixed values in both themes (light art beside a form that can
   be dark), so its text uses fixed dark ink rather than the theme tokens. */
.auth-side {
    position: relative;
    overflow: hidden;
    background: #f3f4fe;
    color: #1e2130;
}
.auth-side-placeholder {
    position: absolute;
    inset: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: #f3f4fe;
}

/* Photo layer — slowly drifting (Ken Burns). Inset -4% so the drift never
   exposes an edge; the artwork is painted to the palette already, so nothing
   is corrected on top of it. */
.auth-side-placeholder::before {
    content: "";
    position: absolute;
    inset: -4%;
    background: url('/images/login.png') center / cover no-repeat;
    animation: auth-kenburns 34s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes auth-kenburns {
    0%   { transform: scale(1) translate3d(0, 0, 0); }
    100% { transform: scale(1.06) translate3d(-2%, -2.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-side-placeholder::before { animation: none; }
}

/* Just enough of the artwork's own ground under the caption to hold small text
   at contrast — not a tint over the image, which is why it stops at 55%. */
.auth-side-fade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 55%, rgba(243, 244, 254, 0.92) 100%);
}
.auth-side-quote {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 48px;
    pointer-events: none;
    text-align: right;
}
.auth-side-quote p:first-child {
    font-family: var(--font-heading);
    font-size: 21px;
    line-height: 1.35;
    max-width: 460px;
    margin: 0 0 0 auto;
}
.auth-side-quote p:last-child { font-size: 13px; margin-top: 10px; }
/* !important because app.css overrides Bootstrap .text-muted with one of its
   own, and that rule is theme-dependent — on this panel, which is light in both
   themes, the dark-theme value would put pale ink on pale artwork. */
.auth-side .text-muted { color: rgba(30, 33, 48, 0.66) !important; }

.auth-alert {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-danger) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-danger) 38%, transparent);
    color: color-mix(in srgb, var(--color-danger) 70%, var(--color-text));
    margin-bottom: 16px;
}

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-form-col { max-width: 100%; }
}
