:root {
    --bg-dark: #060d23;
    --bg-dark-2: #0c1634;
    --panel: #ffffff;
    --ink: #1f2735;
    --muted: #5f6d81;
    --line: #d7dfec;
    --accent: #0f4ea3;
    --accent-2: #1f67c8;
}

* {
    box-sizing: border-box;
}

body.madi-login {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    background: #0a1227;
}

.split-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.8fr) minmax(420px, 0.9fr);
}

.split-brand {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(6, 13, 35, 0.88), rgba(12, 22, 52, 0.92)),
        url("../img/banner-madi.jpg");
    background-size: cover;
    background-position: center;
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(90, 115, 168, 0.08) 15%, transparent 15%),
        linear-gradient(325deg, rgba(77, 104, 154, 0.07) 20%, transparent 20%);
    background-size: 420px 420px;
    opacity: 0.6;
}

.brand-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: #e9efff;
}

.brand-watermark {
    width: min(320px, 42%);
    max-height: 120px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.08) saturate(0.9);
    opacity: 0.92;
    margin-bottom: 16px;
}

.brand-content h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2.1rem);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-content p {
    margin: 12px 0 0;
    max-width: 42ch;
    font-size: 0.88rem;
    color: rgba(233, 239, 255, 0.85);
}

.split-auth {
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(9, 17, 40, 0.25);
}

.auth-wrap {
    width: min(90%, 470px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-logo {
    width: 128px;
    max-height: 48px;
    object-fit: contain;
    margin-bottom: 4px;
}

.back-link {
    color: #4e5b70;
    text-decoration: none;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    color: var(--accent);
}

.auth-title {
    margin: 2px 0 0;
    font-size: 1.9rem;
    line-height: 1.05;
    color: #171f2d;
    font-weight: 800;
}

.auth-subtitle {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.message-area .alert {
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.btn-madi {
    margin-top: 4px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 18px rgba(21, 83, 165, 0.25);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-madi:hover,
.btn-madi:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(21, 83, 165, 0.3);
}

.auth-meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-meta a,
.auth-meta span {
    font-size: 0.77rem;
    color: #5c687d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-meta a:hover {
    color: var(--accent);
}

@media (max-width: 980px) {
    .split-login {
        grid-template-columns: 1fr;
    }

    .split-brand {
        min-height: 34vh;
    }

    .brand-watermark {
        width: min(210px, 50%);
        max-height: 80px;
        margin-bottom: 8px;
    }

    .brand-content h1 {
        font-size: 1.3rem;
    }

    .brand-content p {
        font-size: 0.8rem;
    }

    .split-auth {
        min-height: 66vh;
        border-left: none;
    }

    .auth-wrap {
        width: min(92%, 460px);
        padding: 18px 0;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}
