/* =========================================================================
   Auth Layout — split-panel sign in / register experience.
   Form on the left, brand illustration on the right.
   Vodegero palette: amber primary (#FFA101) on a warm dark slate canvas.
   ========================================================================= */

:root {
    --auth-bg: #ffffff;
    --auth-text: #0b0d10;
    --auth-text-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-input-bg: #f6f7f9;
    --auth-input-bg-focus: #ffffff;

    --auth-primary: #FFA101;
    --auth-primary-hover: #e69100;
    --auth-primary-soft: rgba(255, 161, 1, 0.18);
    --auth-primary-ink: #1a1207;

    --auth-art-bg: #11151d;
    --auth-art-bg-deep: #1f1306;
    --auth-art-text: #ffffff;
}

html, body.auth-body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--font-sans, "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

/* ---------- Form pane ---------- */
.auth-pane {
    position: relative;
    display: flex;
    flex-direction: column;
}

.auth-pane--form {
    padding: 1.75rem clamp(1.25rem, 5vw, 4rem);
    background: var(--auth-bg);
}

.auth-pane__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.auth-brand img {
    height: 64px;
    width: auto;
    display: block;
}

@media (min-width: 992px) {
    .auth-brand img {
        height: 72px;
    }
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    transition: background 120ms ease-out, color 120ms ease-out;
}

.auth-back-link:hover {
    background: var(--auth-input-bg);
    color: var(--auth-text);
}

.auth-pane__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.auth-card__subtitle {
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.75rem 0;
}

.auth-pane__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
    padding-top: 1rem;
}

.auth-pane__footer a {
    color: var(--auth-text-muted);
    text-decoration: none;
}

.auth-pane__footer a:hover {
    color: var(--auth-text);
}

.auth-footer-sep {
    opacity: 0.6;
}

/* ---------- Form elements (overrides for auth flows) ---------- */
.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.auth-field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
    margin: 0;
}

.auth-field__hint-link {
    font-size: 0.8125rem;
    color: var(--auth-primary-hover);
    text-decoration: none;
    font-weight: 600;
}

.auth-field__hint-link:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-field__control {
    position: relative;
}

.auth-field__input {
    width: 100%;
    border: 1px solid transparent;
    background: var(--auth-input-bg);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--auth-text);
    transition: background 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out;
}

.auth-field__input::placeholder {
    color: #9ca3af;
}

.auth-field__input:focus {
    outline: none;
    background: var(--auth-input-bg-focus);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-primary-soft);
}

.auth-field--has-toggle .auth-field__input {
    padding-right: 2.75rem;
}

.auth-field__toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--auth-text-muted);
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-field__toggle:hover {
    color: var(--auth-text);
    background: rgba(15, 23, 42, 0.06);
}

.auth-field__error {
    display: block;
    font-size: 0.8125rem;
    color: #b91c1c;
    margin-top: 0.4rem;
}

.auth-field__hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    margin-top: 0.4rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--auth-text);
    user-select: none;
}

.auth-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary);
}

.auth-alert {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.auth-alert:empty {
    display: none;
}

.auth-submit {
    width: 100%;
    background: var(--auth-primary);
    color: var(--auth-primary-ink);
    border: 0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 6px 18px rgba(255, 161, 1, 0.28);
    transition: background 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}

.auth-submit:hover {
    background: var(--auth-primary-hover);
    box-shadow: 0 8px 22px rgba(230, 145, 0, 0.34);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:disabled,
.auth-submit[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-submit .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* htmx-indicator: visible only while a request is in-flight */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.auth-submit { pointer-events: none; }

.auth-foot {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
}

.auth-foot a {
    color: var(--auth-primary-hover);
    font-weight: 700;
    text-decoration: none;
}

.auth-foot a:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

/* ---------- Art / brand pane ---------- */
.auth-pane--art {
    background:
        radial-gradient(80% 60% at 80% 0%, rgba(255, 161, 1, 0.18) 0%, transparent 60%),
        radial-gradient(70% 50% at 0% 100%, rgba(255, 161, 1, 0.10) 0%, transparent 55%),
        linear-gradient(160deg, var(--auth-art-bg) 0%, var(--auth-art-bg-deep) 100%);
    color: var(--auth-art-text);
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .auth-pane--art {
        display: none;
    }
}

.auth-art {
    position: relative;
    height: 100%;
    width: 100%;
    padding: clamp(2rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-art__glow {
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    pointer-events: none;
}

.auth-art__glow--a {
    background: rgba(255, 161, 1, 0.55);
    top: -180px;
    right: -140px;
}

.auth-art__glow--b {
    background: rgba(255, 161, 1, 0.30);
    bottom: -220px;
    left: -180px;
}

.auth-art__content {
    position: relative;
    max-width: 460px;
}

.auth-art__title {
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 1rem 0;
    letter-spacing: -0.01em;
}

.auth-art__title em {
    font-style: normal;
    color: var(--auth-primary);
}

.auth-art__lede {
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 1.75rem 0;
}

.auth-art__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-art__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.92);
}

.auth-art__feature-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 161, 1, 0.14);
    border: 1px solid rgba(255, 161, 1, 0.32);
    border-radius: 10px;
    color: var(--auth-primary);
    font-size: 1rem;
}

