:root {
    --matli-orange: #f97316;
    --matli-orange-dark: #c2410c;
    --matli-ink: #111827;
    --matli-muted: #64748b;
    --matli-line: #e5e7eb;
    --matli-soft: #fff7ed;
}

* { box-sizing: border-box; }

body {
    background:
        radial-gradient(circle at 12% 18%, rgba(249, 115, 22, .12), transparent 28%),
        linear-gradient(135deg, #fff 0%, #f8fafc 48%, #fff7ed 100%);
    color: var(--matli-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-shell { align-items: center; display: grid; min-height: 100vh; min-height: 100dvh; padding: clamp(18px, 4vw, 46px); }

.auth-panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .78fr);
    margin: 0 auto;
    max-width: 1120px;
    overflow: hidden;
    width: 100%;
}

.brand-side {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, .92), rgba(67, 20, 7, .9)),
        linear-gradient(135deg, #fb923c, #f97316);
    color: #fff;
    min-height: 640px;
    padding: clamp(30px, 5vw, 56px);
    position: relative;
    overflow: hidden;
}

.brand-side::after {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    content: "";
    height: 300px;
    position: absolute;
    right: -96px;
    top: 74px;
    width: 300px;
}

.logo-mark {
    align-items: center;
    background: var(--matli-orange);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(249, 115, 22, .34);
    color: #fff;
    display: inline-flex;
    font-size: 22px;
    font-weight: 950;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.brand-title {
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.03;
    margin: 54px 0 18px;
    max-width: 680px;
}

.brand-copy { color: rgba(255, 255, 255, .78); font-size: 1rem; line-height: 1.75; max-width: 620px; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 46px; max-width: 680px; }
.feature-card { background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 18px; }
.feature-card i { color: #fed7aa; font-size: 1.25rem; }
.feature-card strong { display: block; font-size: .95rem; margin-top: 12px; }
.feature-card span { color: rgba(255, 255, 255, .72); display: block; font-size: .84rem; line-height: 1.55; margin-top: 6px; }
.form-side { align-items: center; display: flex; padding: clamp(26px, 4vw, 48px); }
.login-card { width: 100%; }
.eyebrow { color: var(--matli-orange-dark); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.login-title { font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 950; line-height: 1.12; margin: 10px 0 10px; }
.login-help { color: var(--matli-muted); font-size: .95rem; line-height: 1.65; margin-bottom: 28px; }
.form-label { color: #334155; font-size: .88rem; font-weight: 800; margin-bottom: 8px; }
.input-group-text { background: #fff; border-color: var(--matli-line); color: #94a3b8; }
.form-control { border-color: var(--matli-line); font-size: .95rem; min-height: 48px; }
.form-control:focus { border-color: var(--matli-orange); box-shadow: 0 0 0 .22rem rgba(249, 115, 22, .13); }
.form-check-input:checked { background-color: var(--matli-orange); border-color: var(--matli-orange); }
.btn-matli { background: var(--matli-orange); border: 0; border-radius: 12px; box-shadow: 0 14px 28px rgba(249, 115, 22, .22); color: #fff; font-weight: 900; min-height: 50px; }
.btn-matli:hover, .btn-matli:focus { background: #ea580c; color: #fff; }

.support-note {
    align-items: flex-start;
    background: var(--matli-soft);
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #9a3412;
    display: flex;
    font-size: .86rem;
    gap: 10px;
    line-height: 1.55;
    margin-top: 22px;
    padding: 14px;
}

.alert { border-radius: 14px; font-size: .9rem; }

@media (max-width: 991.98px) {
    .auth-panel { grid-template-columns: 1fr; max-width: 620px; }
    .brand-side { min-height: auto; padding: 28px; }
    .brand-title { margin-top: 28px; }
    .feature-grid { margin-top: 26px; }
}

@media (max-width: 575.98px) {
    .auth-shell {
        align-items: center;
        padding: 12px;
    }

    .auth-panel {
        border: 0;
        border-radius: 18px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
        min-height: auto;
    }

    .brand-side {
        border-radius: 18px 18px 0 0;
        min-height: auto;
        padding: 22px;
    }

    .brand-side::after {
        height: 180px;
        right: -82px;
        top: 18px;
        width: 180px;
    }

    .logo-mark {
        font-size: 18px;
        height: 44px;
        width: 44px;
    }

    .brand-title {
        display: block;
        font-size: 1.75rem;
        line-height: 1.12;
        margin: 24px 0 10px;
    }

    .brand-copy {
        display: block;
        font-size: .9rem;
        line-height: 1.6;
        margin-bottom: 0;
    }

    .feature-grid {
        display: none;
    }

    .form-side {
        align-items: flex-start;
        padding: 22px;
    }

    .login-title {
        font-size: 1.65rem;
    }

    .login-help {
        font-size: .9rem;
        margin-bottom: 20px;
    }

    .form-control,
    .input-group-text {
        min-height: 50px;
    }

    .input-group-text {
        min-width: 48px;
        justify-content: center;
    }

    .d-flex.align-items-center.justify-content-between.gap-3.mb-4 {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .btn-matli {
        min-height: 52px;
    }
}
