/* ============================================================
   AUTH  —  login / register panel
   ============================================================ */

.auth-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

    /* Backdrop: Royal Copenhagen Navy — mirrors the app's auth backdrop. */
    .auth-wrapper::before {
        content: "";
        position: fixed;
        inset: 0;
        background: linear-gradient(150deg, #0e1628 0%, #1a2849 55%, #1e3060 100%);
        z-index: 0;
    }

    .auth-wrapper::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(10, 14, 28, 0.35);
        z-index: 1;
    }

/* ── Panel ── */
.auth-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    margin: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(215,223,219,0.6);
    box-shadow: 0 14px 48px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: panelIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── Brand row ── */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem 1.5rem 0;
}

.auth-brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.auth-brand-name {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-brand, #1a2849);
}

/* ── Tab pill segmented control ── */
.auth-tabs {
    display: flex;
    padding: 1rem 1.25rem 0;
    gap: 0;
    position: relative;
}

    /* Inner track */
    .auth-tabs::before {
        content: "";
        position: absolute;
        inset: 1rem 1.25rem 0;
        background: #eef2f0;
        border-radius: 10px;
        z-index: 0;
    }

.auth-tab {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 0.6rem 0;
    border: none;
    background: transparent;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-muted, #5b6a63);
    cursor: pointer;
    border-radius: 9px;
    transition: color 0.15s;
}

    .auth-tab.active {
        background: #ffffff;
        color: var(--color-brand, #1a2849);
        font-weight: 700;
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    }

    .auth-tab:hover:not(.active) {
        color: var(--color-brand, #1a2849);
    }

/* ── Form ── */
.auth-form {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Override field labels inside auth-form to not be all-caps */
.auth-form .field label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    opacity: 0.65;
    color: var(--color-dark-text);
}

/* Inputs */
.auth-form .field input {
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid #d7dfdb;
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.9rem;
    color: var(--color-dark-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .auth-form .field input:focus {
        border-color: var(--color-brand, #1a2849);
        box-shadow: 0 0 0 3px rgba(26,40,73,0.1);
        outline: none;
    }

/* ── Forgot password ── */
.auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.35rem;
}

.auth-forgot-btn {
    background: none;
    border: none;
    font-size: 0.78rem;
    color: var(--color-brand, #1a2849);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: inherit;
}

    .auth-forgot-btn:hover {
        opacity: 0.75;
    }

/* ── Submit button ── */
.btn-submit {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--color-brand, #1a2849);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 0.15rem;
    transition: opacity 0.15s, transform 0.1s;
    font-family: var(--font-body, 'Inter', sans-serif);
}

    .btn-submit:hover:not(:disabled) {
        opacity: 0.88;
    }

    .btn-submit:active:not(:disabled) {
        transform: scale(0.99);
    }

    .btn-submit:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

/* ── Compliance block (signup only) ── */
.auth-compliance {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.85rem;
    background: #f4f6f5;
    border-radius: 10px;
    border: 1px solid #d7dfdb;
}

.auth-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
}

    .auth-check-row input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        margin-top: 2px;
        accent-color: var(--color-brand, #1a2849);
        cursor: pointer;
    }

    .auth-check-row span {
        font-size: 0.8rem;
        line-height: 1.5;
        color: var(--color-dark-text);
        opacity: 0.75;
    }

        .auth-check-row span a {
            color: var(--color-brand, #1a2849);
            font-weight: 600;
            text-decoration: underline;
        }

/* ── Message ── */
.auth-message {
    font-size: 0.82rem;
    text-align: center;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
}

    .auth-message.error {
        background: #fff1f1;
        color: #a62525;
        border-color: #f7c5c5;
    }

    .auth-message.success {
        background: #e8ecf6;
        color: var(--color-brand, #1a2849);
        border-color: #b7bfdc;
    }

/* ── Footer links ── */
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding-top: 0.25rem;
    flex-wrap: wrap;
}

.auth-footer-link {
    font-size: 0.78rem;
    color: var(--color-brand, #1a2849);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

    .auth-footer-link:hover {
        opacity: 0.7;
    }

.auth-footer-divider {
    font-size: 0.7rem;
    color: var(--color-muted);
}

/* ── Animation ── */
@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
