/* ── Brand corner ─────────────────────────────────────────── */
.auth-brand-corner {
    position: absolute; top: 24px; left: 28px;
    font-size: 24px; font-weight: 700;
    color: var(--green); z-index: 10; pointer-events: none;
}

/* ── Page layout ──────────────────────────────────────────── */
.auth-page {
    position: fixed; inset: 0;
    overflow: auto; display: flex;
    align-items: center; justify-content: center;
    padding: 24px; background: var(--pale);
}

.auth-card {
    display: flex; flex-direction: row;
    width: 100%; max-width: 1100px;
    background: #fff; border-radius: 20px;
    padding: 24px; gap: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    overflow: hidden;
}

/* ── Image panel (register only) ─────────────────────────── */
.auth-image-panel {
    flex: 1; min-height: 600px;
    border-radius: var(--r-xl);
    position: relative; display: flex;
    flex-direction: column; padding: 48px; overflow: hidden;
    animation: panel-enter 0.3s ease both;
}

.auth-image-panel--login {
    background:
        linear-gradient(135deg, rgba(6,82,16,0.4) 0%, rgba(6,82,16,0.6) 100%),
        url('/sign-in-cover.webp') center/cover no-repeat;
}

.auth-image-panel--register {
    background:
        linear-gradient(135deg, rgba(6,82,16,0.4) 0%, rgba(6,82,16,0.6) 100%),
        url('/sign-up-cover.webp') center/cover no-repeat;
}

.auth-image-panel__top {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    align-items: flex-start; gap: 10px;
}

.auth-panel-logo {
    width: 100px; height: 100px;
    border-radius: 20px; margin-bottom: 6px;
}
.auth-panel-logo .logo-ellipse--1 { width: 21px; height: 43px; left: 18px; top: 29px; }
.auth-panel-logo .logo-ellipse--2 { width: 36px; height: 64px; left: 32px; top: 18px; }
.auth-panel-logo .logo-ellipse--3 { width: 21px; height: 50px; left: 61px; top: 25px; }

.auth-image-panel > .auth-image-panel__tagline {
    margin-top: auto; position: relative; z-index: 1;
}

.auth-image-panel__welcome {
    font-size: 14px; font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 6px;
}

.auth-image-panel__title {
    font-size: 48px; font-weight: 700;
    color: #fff; line-height: 1.15; margin-bottom: 12px;
}

.auth-image-panel__tagline {
    font-size: 18px; font-weight: 500;
    color: rgba(255,255,255,0.82); line-height: 1.55;
}

@keyframes panel-enter {
    from { opacity: 0; } to { opacity: 1; }
}

/* ── Form panel ───────────────────────────────────────────── */
.auth-form-panel {
    width: 500px; flex-shrink: 0;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 40px 32px;
    animation: form-enter 0.35s ease both;
}
.auth-form-panel form { width: 100%; }

@keyframes form-enter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.auth-heading {
    font-size: 32px; font-weight: 700;
    color: var(--ink); text-align: center;
    width: 100%; margin-bottom: 32px;
    letter-spacing: -0.01em; outline: none;
}

/* ── Inputs ───────────────────────────────────────────────── */
.auth-input-group { width: 100%; margin-bottom: 16px; }

.auth-input-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--ink); margin-bottom: 6px;
}

.auth-input-hint {
    display: block; font-size: 11px; color: var(--grey);
    margin-top: 6px; line-height: 1.4;
}

.auth-input-wrap {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid #D9D9D9; border-radius: 10px;
    padding: 0 16px; min-height: 48px; width: 100%;
    background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input-wrap:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,82,0,0.10);
}

.auth-input-icon {
    flex-shrink: 0; display: flex; align-items: center; color: var(--grey);
}

.auth-input-eye {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    align-self: stretch;
    padding: 0 10px 0 4px; min-width: 44px;
    color: var(--grey); transition: color 0.15s;
}
.auth-input-eye:hover { color: var(--ink); }

.auth-input-wrap input {
    flex: 1; border: none; outline: none;
    font: inherit; font-size: 15px; font-weight: 500;
    color: var(--ink); background: transparent; min-width: 0;
}
.auth-input-wrap input::placeholder { color: var(--grey-light); font-weight: 500; }

/* ── Checkbox, submit, divider ────────────────────────────── */
.auth-checkbox {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; font-size: 13px;
    color: var(--ink); width: 100%;
}
.auth-checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--green); cursor: pointer; flex-shrink: 0;
}

.auth-submit {
    width: 100%; border: none; border-radius: 10px;
    padding: 14px; font: inherit; font-size: 15px; font-weight: 700;
    background: var(--green); color: #fff;
    cursor: pointer; margin-bottom: 20px;
    transition: opacity 0.15s;
}
.auth-submit:hover:not(:disabled) { opacity: 0.88; }
.auth-submit:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 10px; }
.auth-submit:disabled { opacity: 0.6; cursor: default; }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    width: 100%; margin-bottom: 16px;
    font-size: 15px; font-weight: 600; color: var(--ink);
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: #D9D9D9;
}

/* ── Google button & footer ───────────────────────────────── */
.auth-google-btn {
    width: 100%; display: flex;
    align-items: center; justify-content: center; gap: 12px;
    border: 1px solid #D9D9D9; border-radius: 10px;
    padding: 11px 16px; font: inherit; font-size: 15px; font-weight: 600;
    color: var(--grey); background: #fff;
    cursor: pointer; margin-bottom: 28px;
}
.auth-google-btn:disabled { cursor: not-allowed; opacity: 0.55; }

.auth-footer {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--ink);
}
.auth-footer a { color: var(--green); font-weight: 700; text-decoration: none; padding: 4px 2px; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Errors & validation ──────────────────────────────────── */
.auth-error {
    background: var(--red-bg); border: 1px solid var(--red-border);
    color: var(--red); border-radius: 10px;
    padding: 11px 16px; font-size: 14px;
    margin-bottom: 16px; width: 100%;
}

.auth-validation {
    color: var(--red); font-size: 14px;
    margin-bottom: 12px; width: 100%;
    list-style: none; padding: 0;
}
.auth-validation:empty { display: none; margin: 0; }

/* ── Motion preferences ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .auth-image-panel,
    .auth-form-panel { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1023px) {
    .auth-card { border-radius: var(--r-xl); padding: 20px; gap: 20px; }
    .auth-form-panel { width: 380px; padding: 32px 24px; }
    .auth-image-panel { min-height: 500px; padding: 36px; border-radius: var(--r-lg); }
    .auth-image-panel__title { font-size: 36px; }
    .auth-image-panel__tagline { font-size: 15px; }
    .auth-heading { font-size: 26px; margin-bottom: 24px; }
}

@media (max-width: 767px) {
    .auth-page { padding: 16px; align-items: flex-start; }
    .auth-card {
        flex-direction: column; border-radius: var(--r-xl);
        padding: 0; gap: 0; max-width: 480px; margin: 0 auto;
    }
    .auth-image-panel {
        flex: none; min-height: 160px;
        border-radius: 16px 16px 0 0;
        padding: 28px 28px 32px; justify-content: flex-end;
    }
    .auth-image-panel__logo { width: 72px; height: 72px; }
    .auth-image-panel__welcome { font-size: 11px; margin-bottom: 2px; }
    .auth-image-panel__title { font-size: 26px; margin-bottom: 4px; }
    .auth-image-panel__tagline { font-size: 13px; }
    .auth-form-panel {
        width: 100%; padding: 28px 24px 32px;
        border-radius: 0 0 16px 16px; animation: none;
    }
    .auth-heading { font-size: 22px; margin-bottom: 20px; }
    .auth-submit { padding: 13px; }
    .auth-brand-corner { top: 14px; left: 16px; font-size: 20px; }
}

/* Pocket (≤ 480px) */
@media (max-width: 480px) {
    .auth-page { padding: 10px; }
    .auth-image-panel { min-height: 130px; padding: 20px 20px 24px; }
    .auth-image-panel__logo { width: 56px; height: 56px; }
    .auth-image-panel__title { font-size: 22px; }
    .auth-image-panel__tagline { font-size: 12px; }
    .auth-form-panel { padding: 24px 20px 28px; }
    .auth-heading { font-size: 20px; margin-bottom: 16px; }
    .auth-footer { font-size: 13px; }
}
