/* ── Auth split layout (Maven-style) ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.auth-page {
    font-family: 'Alexandria', system-ui, sans-serif;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
}

html[dir="ltr"] .auth-brand {
    order: 2;
}

html[dir="ltr"] .auth-form-panel {
    order: 1;
}

/* Brand panel — green gradient */
.auth-brand {
    background: linear-gradient(145deg, var(--dash-slate) 0%, var(--dash-teal) 55%, var(--dash-mint) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

    .auth-brand::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 75% 25%, rgba(255, 255, 255, .14), transparent 55%);
        pointer-events: none;
    }

.auth-brand-header {
    position: relative;
    z-index: 2;
    padding: 28px 40px 0;
    display: flex;
    justify-content: flex-start;
}

html[dir="ltr"] .auth-brand-header {
    justify-content: flex-end;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 48px 48px;
}

.auth-brand-centered {
    justify-content: center;
}

.auth-hero-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    min-height: 200px;
}

    .auth-hero-icon svg {
        width: min(300px, 55vw);
        height: auto;
        color: #fff;
        opacity: .22;
        filter: drop-shadow(0 8px 32px rgba(0, 0, 0, .15));
    }

/* شعار العلامة — رابط للصفحة الرئيسية */
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    padding: 10px 18px 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .2s, transform .2s, box-shadow .2s;
}

html[dir="ltr"] .auth-logo {
    padding: 10px 12px 10px 18px;
}

.auth-logo:hover {
    background: rgba(255, 255, 255, .22);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    color: #fff;
}

.auth-logo:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .85);
    outline-offset: 3px;
}

.auth-logo-mark {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--mh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.auth-logo-mark svg {
    display: block;
}

.auth-logo-text {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    white-space: nowrap;
}

.auth-welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.auth-welcome-sub {
    font-size: .95rem;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 32px;
    max-width: 340px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

    .auth-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: .88rem;
        color: rgba(255, 255, 255, .9);
    }

.auth-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

/* Dashboard preview mock */
.auth-preview {
    margin-top: auto;
    background: rgba(15, 23, 42, .55);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 16px;
    backdrop-filter: blur(8px);
}

.auth-preview-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.auth-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.auth-preview-card {
    background: rgba(255, 255, 255, .08);
    border-radius: 8px;
    padding: 12px 10px;
    min-height: 52px;
}

    .auth-preview-card.wide {
        grid-column: span 2;
        min-height: 72px;
    }

.auth-preview-line {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .2);
    margin-bottom: 6px;
}

    .auth-preview-line.short {
        width: 60%;
    }

    .auth-preview-line.accent {
        background: rgba(124, 58, 237, .6);
        width: 40%;
    }

/* Form panel */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: #fafafa;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, .08);
    border: 1px solid #f0f0f0;
}

.auth-lang {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
}

    .auth-lang form {
        display: inline;
    }

.auth-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: .82rem;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
}

    .auth-lang-btn:hover {
        border-color: var(--primary, #0f4c5c);
        color: var(--primary, #0f4c5c);
    }

.auth-heading {
    margin-bottom: 24px;
}

    .auth-heading h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111827;
        margin-bottom: 6px;
    }

    .auth-heading p {
        font-size: .88rem;
        color: #6b7280;
    }

.auth-required-note {
    font-size: .75rem;
    color: #9ca3af;
    margin-top: 8px;
}

.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 16px;
}

.auth-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-field {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .auth-field label {
        position: static;
        inset-inline-start: auto;
        background: none;
        padding: 0;
        font-size: .84rem;
        font-weight: 700;
        color: #374151;
        line-height: 1.35;
    }

        .auth-field label .req {
            color: #c0392b;
            font-weight: 800;
        }

    .auth-field input {
        width: 100%;
        padding: 12px 14px;
        border: 1.5px solid #d1d5db;
        border-radius: 10px;
        font-family: inherit;
        font-size: .92rem;
        background: #f8fafb;
        color: #111827;
        transition: border-color .15s, box-shadow .15s, background .15s;
    }

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

        .auth-field input:focus {
            outline: none;
            border-color: var(--primary, #0f4c5c);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(15, 76, 92, .12);
        }

.auth-field-password {
    position: relative;
}

.auth-password-wrap {
    position: relative;
}

    .auth-password-wrap input {
        direction: ltr;
        text-align: left;
        padding-right: 44px;
        padding-left: 14px;
    }

html[dir="rtl"] .auth-password-wrap input {
    padding-right: 14px;
    padding-left: 44px;
}

.auth-toggle-pwd {
    position: absolute;
    right: 12px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    line-height: 0;
}

html[dir="rtl"] .auth-toggle-pwd {
    right: auto;
    left: 12px;
}

    .auth-toggle-pwd:hover {
        color: var(--primary, #0f4c5c);
    }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: .85rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    cursor: pointer;
}

    .auth-remember input[type="checkbox"] {
        flex-shrink: 0;
    }

.auth-forgot {
    color: var(--primary, #0f4c5c);
    text-decoration: none;
    font-weight: 600;
}

    .auth-forgot:hover {
        text-decoration: underline;
    }

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 13px 20px;
    background-color: #0f4c5c;
    background-image: linear-gradient(135deg, #2096c2 0%, #0f4c5c 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(15, 76, 92, .28);
    transition: opacity .15s, transform .1s, box-shadow .15s;
}

    .auth-submit svg {
        flex-shrink: 0;
        stroke: #fff;
    }

    .auth-submit:hover {
        opacity: .95;
        box-shadow: 0 6px 18px rgba(15, 76, 92, .34);
    }

    .auth-submit:active {
        transform: scale(.99);
    }

    .auth-submit:focus-visible {
        outline: 2px solid #2096c2;
        outline-offset: 2px;
    }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: .88rem;
    color: #6b7280;
}

    .auth-footer a {
        color: var(--primary, #0f4c5c);
        font-weight: 600;
        text-decoration: none;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

.auth-form-wrap.wide,
.auth-form-wrap-wide {
    max-width: 480px;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.auth-select {
    width: 100%;
    padding: 14px 14px 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-family: inherit;
    font-size: .92rem;
    background: #fff;
    cursor: pointer;
}

    .auth-select:focus {
        outline: none;
        border-color: var(--mh-btn);
        box-shadow: 0 0 0 3px rgba(46, 125, 50, .15);
    }

.auth-slug-preview {
    font-size: .78rem;
    color: #6b7280;
    margin-top: 6px;
    direction: ltr;
    text-align: left;
}

    .auth-slug-preview strong {
        color: var(--mh-btn);
    }

@media (max-width: 520px) {
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

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

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        background: #fff;
        min-height: 100vh;
    }

    .auth-form-wrap {
        box-shadow: none;
        border: none;
        padding: 24px 16px;
    }
}
