:root {
    --mp-bg: #f5f7fb;
    --mp-surface: #ffffff;
    --mp-sidebar: #0a1020;
    --mp-sidebar-soft: #121a2e;
    --mp-primary: #4f6df5;
    --mp-primary-dark: #3d57d8;
    --mp-text: #111827;
    --mp-muted: #687386;
    --mp-border: #e5e9f2;
    --mp-success: #18a66a;
    --mp-danger: #dc3545;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--mp-bg);
    color: var(--mp-text);
    font-family: "Inter", sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.app-sidebar {
    min-height: 100vh;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top left, rgba(79, 109, 245, .20), transparent 35%), var(--mp-sidebar);
    color: #fff;
}

.brand,
.login-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #607cff, #425bdd);
    box-shadow: 0 10px 28px rgba(67, 91, 221, .35);
}

.brand strong,
.login-brand strong {
    display: block;
    letter-spacing: .14em;
    font-size: .86rem;
}

.brand small,
.login-brand small {
    color: #aeb8cd;
    font-size: .78rem;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    margin-top: 42px;
}

    .sidebar-nav a {
        padding: 12px 14px;
        display: flex;
        align-items: center;
        gap: 12px;
        border-radius: 12px;
        color: #aeb8cd;
        text-decoration: none;
        font-size: .93rem;
        transition: .2s ease;
    }

        .sidebar-nav a:hover {
            color: #fff;
            background: var(--mp-sidebar-soft);
        }

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.user-mini {
    display: flex;
    gap: 10px;
    align-items: center;
}

.avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .10);
    font-weight: 700;
}

.user-mini-text strong,
.user-mini-text small {
    display: block;
}

.user-mini-text strong {
    font-size: .85rem;
}

.user-mini-text small {
    color: #8f9ab2;
    font-size: .72rem;
}

.btn-sidebar-logout {
    width: 100%;
    margin-top: 16px;
    color: #aeb8cd;
    border: 1px solid rgba(255, 255, 255, .08);
}

    .btn-sidebar-logout:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, .18);
    }

.app-main {
    padding: 38px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.eyebrow {
    color: var(--mp-primary);
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 800;
}

.page-header h1 {
    margin: 7px 0 5px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.page-header p,
.content-card p {
    color: var(--mp-muted);
}

.environment-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 700;
}

.environment-badge {
    background: #e9f8f1;
    color: #138657;
}

    .environment-badge span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--mp-success);
        box-shadow: 0 0 0 4px rgba(24, 166, 106, .12);
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.metric-card,
.content-card {
    border: 1px solid var(--mp-border);
    border-radius: 18px;
    background: var(--mp-surface);
    box-shadow: 0 10px 30px rgba(27, 39, 78, .04);
}

.metric-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.2rem;
}

    .metric-icon.blue {
        color: #4562e8;
        background: #eef1ff;
    }

    .metric-icon.green {
        color: #138657;
        background: #e9f8f1;
    }

    .metric-icon.purple {
        color: #8756d8;
        background: #f3edff;
    }

.metric-card small,
.metric-card strong,
.metric-card span {
    display: block;
}

.metric-card small {
    color: var(--mp-muted);
}

.metric-card strong {
    margin: 2px 0;
    font-size: 1.65rem;
}

.metric-card span {
    color: #8a94a6;
    font-size: .75rem;
}

.content-card {
    padding: 24px;
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-card h2 {
    margin: 0 0 5px;
    font-size: 1.05rem;
    font-weight: 750;
}

.status-pill.success {
    color: #138657;
    background: #e9f8f1;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    background: #fff;
}

.login-visual {
    position: relative;
    overflow: hidden;
    padding: 52px;
    color: #fff;
    background: radial-gradient(circle at 20% 15%, rgba(96, 124, 255, .32), transparent 30%), radial-gradient(circle at 85% 80%, rgba(80, 210, 180, .14), transparent 34%), #091020;
}

    .login-visual::after {
        position: absolute;
        right: -140px;
        bottom: -190px;
        width: 520px;
        height: 520px;
        content: "";
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 50%;
        box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .018);
    }

.login-visual-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 104px);
    display: flex;
    flex-direction: column;
}

.login-message {
    max-width: 620px;
    margin: auto 0;
}

    .login-message h1 {
        margin: 14px 0 18px;
        font-size: clamp(2.7rem, 5vw, 5.2rem);
        line-height: .98;
        letter-spacing: -.065em;
        font-weight: 800;
    }

        .login-message h1 span {
            display: block;
            color: #8498ff;
        }

    .login-message p {
        max-width: 520px;
        color: #aeb8cd;
        font-size: 1.06rem;
        line-height: 1.75;
    }

.login-trust {
    display: flex;
    gap: 28px;
    color: #aeb8cd;
    font-size: .8rem;
}

    .login-trust i {
        margin-right: 6px;
        color: #7f95ff;
    }

.login-form-side {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(79, 109, 245, .08), transparent 28%), #fff;
}

.login-card {
    width: 100%;
    max-width: 410px;
}

.login-card-header {
    margin-bottom: 32px;
}

.login-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 15px;
    color: var(--mp-primary);
    background: #eef1ff;
    font-size: 1.3rem;
}

.login-card h2 {
    margin-bottom: 7px;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.login-card p,
.login-footer {
    color: var(--mp-muted);
}

.form-label {
    color: #374151;
    font-size: .82rem;
    font-weight: 700;
}

.input-shell {
    position: relative;
}

    .input-shell > i {
        position: absolute;
        top: 50%;
        left: 14px;
        z-index: 2;
        color: #8791a4;
        transform: translateY(-50%);
    }

    .input-shell .form-control {
        min-height: 50px;
        padding-left: 42px;
        border-color: var(--mp-border);
        border-radius: 12px;
    }

.form-control:focus {
    border-color: #9aaaff;
    box-shadow: 0 0 0 .22rem rgba(79, 109, 245, .11);
}

.btn-login {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mp-primary), #4058d7);
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(79, 109, 245, .24);
}

    .btn-login:hover {
        background: linear-gradient(135deg, var(--mp-primary-dark), #334bc8);
    }

.login-footer {
    margin-top: 26px;
    text-align: center;
    font-size: .75rem;
}

.validation-summary-valid {
    display: none;
}

.simple-status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.simple-status-card {
    width: 100%;
    max-width: 460px;
    padding: 38px;
    text-align: center;
    border: 1px solid var(--mp-border);
    border-radius: 20px;
    background: #fff;
}

.status-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 18px;
    font-size: 1.5rem;
}

    .status-icon.warning {
        color: #c78710;
        background: #fff7df;
    }

    .status-icon.danger {
        color: #c83945;
        background: #fdecef;
    }

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
