:root {
    --msm-bo-bg: #f2f3f5;
    --msm-bo-surface: #ffffff;
    --msm-bo-sidebar: #15171a;
    --msm-bo-sidebar-muted: #9da3ad;
    --msm-bo-primary: #3155e7;
    --msm-bo-primary-dark: #2341bd;
    --msm-bo-text: #171a1f;
    --msm-bo-muted: #68707c;
    --msm-bo-border: #dfe2e7;
    --msm-bo-danger: #b42318;
    --msm-bo-radius: 13px;
    --msm-bo-sidebar-width: 250px;
}

* {
    box-sizing: border-box;
}

html,
body.msm-bo-body {
    min-height: 100%;
    margin: 0;
    background: var(--msm-bo-bg);
    color: var(--msm-bo-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

body.msm-bo-body {
    overflow-x: hidden;
}

body.msm-bo-body a {
    color: #3155e7;
}

body.msm-bo-body input,
body.msm-bo-body select,
body.msm-bo-body textarea,
body.msm-bo-body button {
    font: inherit;
}

body.msm-bo-body input[type="text"],
body.msm-bo-body input[type="email"],
body.msm-bo-body input[type="password"],
body.msm-bo-body input[type="number"],
body.msm-bo-body input[type="search"],
body.msm-bo-body input[type="date"],
body.msm-bo-body input[type="url"],
body.msm-bo-body select,
body.msm-bo-body textarea {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #aeb4bd;
    border-radius: 6px;
    background: #fff;
    color: #171a1f;
    outline: none;
}

body.msm-bo-body textarea {
    min-height: 96px;
}

body.msm-bo-body input:focus,
body.msm-bo-body select:focus,
body.msm-bo-body textarea:focus {
    border-color: var(--msm-bo-primary);
    box-shadow: 0 0 0 2px rgba(49, 85, 231, .17);
}

body.msm-bo-body .button,
body.msm-bo-body button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--msm-bo-primary);
    border-radius: 5px;
    background: #fff;
    color: var(--msm-bo-primary);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

body.msm-bo-body .button:hover {
    border-color: var(--msm-bo-primary-dark);
    color: var(--msm-bo-primary-dark);
}

body.msm-bo-body .button-primary,
body.msm-bo-body .button.button-primary {
    background: var(--msm-bo-primary);
    color: #fff;
}

body.msm-bo-body .button-primary:hover {
    background: var(--msm-bo-primary-dark);
    color: #fff;
}

body.msm-bo-body .button-small {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 13px;
}

body.msm-bo-body .description {
    color: var(--msm-bo-muted);
}

body.msm-bo-body .notice {
    position: relative;
    margin: 0 0 16px;
    padding: 13px 16px;
    border: 1px solid #a8d5b3;
    border-left: 4px solid #1f8b4c;
    border-radius: 6px;
    background: #effaf2;
}

body.msm-bo-body .notice-error {
    border-color: #efb2ad;
    border-left-color: var(--msm-bo-danger);
    background: #fff1f0;
}

body.msm-bo-body .notice p {
    margin: 0;
}

body.msm-bo-body .notice-dismiss {
    display: none;
}

.msm-bo-app {
    min-height: 100vh;
}

.msm-bo-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--msm-bo-sidebar-width);
    flex-direction: column;
    background: var(--msm-bo-sidebar);
    color: #fff;
}

.msm-bo-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.msm-bo-logo {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--msm-bo-primary);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.msm-bo-brand div {
    min-width: 0;
}

.msm-bo-brand strong,
.msm-bo-brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msm-bo-brand strong {
    font-size: 16px;
}

.msm-bo-brand small {
    margin-top: 2px;
    color: var(--msm-bo-sidebar-muted);
}

.msm-bo-sidebar-close {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.msm-bo-navigation {
    overflow-y: auto;
    padding: 13px 10px 24px;
}

.msm-bo-nav-group + .msm-bo-nav-group {
    margin-top: 17px;
}

.msm-bo-nav-heading {
    display: block;
    padding: 0 10px 7px;
    color: #7f8792;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.msm-bo-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #d9dde4 !important;
    text-decoration: none;
}

.msm-bo-nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff !important;
}

.msm-bo-nav-link.is-active {
    background: var(--msm-bo-primary);
    color: #fff !important;
}

.msm-bo-nav-icon {
    display: inline-flex;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, .09);
    font-size: 13px;
    font-weight: 800;
}

.msm-bo-user {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding: 15px 17px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.msm-bo-user-avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #343942;
    color: #fff;
    font-weight: 800;
}

.msm-bo-user strong,
.msm-bo-user a {
    display: block;
}

.msm-bo-user strong {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.msm-bo-user a {
    margin-top: 2px;
    color: #9fa6b1 !important;
    font-size: 12px;
    text-decoration: none;
}

.msm-bo-main {
    min-height: 100vh;
    margin-left: var(--msm-bo-sidebar-width);
}

.msm-bo-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--msm-bo-border);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
}

.msm-bo-topbar div {
    min-width: 0;
}

.msm-bo-topbar span,
.msm-bo-topbar strong {
    display: block;
}

.msm-bo-topbar span {
    color: var(--msm-bo-muted);
    font-size: 12px;
}

.msm-bo-topbar strong {
    font-size: 18px;
}

.msm-bo-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 9px;
    background: #eef0f4;
    color: #22262d;
    font-size: 21px;
    cursor: pointer;
}

.msm-bo-site-link {
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid var(--msm-bo-border);
    border-radius: 7px;
    color: #39404a !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.msm-bo-content {
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding: 2px 24px 44px;
}

.msm-bo-content .wrap {
    margin: 0;
}

.msm-bo-content .msm-wrap {
    max-width: none;
}

.msm-bo-content .msm-header {
    margin-top: 20px;
}

.msm-bo-content .msm-panel,
.msm-bo-content .msm-card,
.msm-bo-content .msm-checkin-person {
    border-color: var(--msm-bo-border);
    border-radius: var(--msm-bo-radius);
    box-shadow: 0 2px 8px rgba(18, 24, 33, .035);
}

.msm-bo-overlay,
.msm-bo-bottom-nav {
    display: none;
}

.msm-bo-login-shell {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 15%, rgba(49, 85, 231, .15), transparent 32%),
        radial-gradient(circle at 85% 85%, rgba(49, 85, 231, .09), transparent 35%),
        #f1f3f7;
}

.msm-bo-login-card {
    width: 100%;
    max-width: 430px;
    padding: 31px;
    border: 1px solid var(--msm-bo-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(24, 32, 46, .11);
}

.msm-bo-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.msm-bo-login-brand strong,
.msm-bo-login-brand small {
    display: block;
}

.msm-bo-login-brand strong {
    font-size: 17px;
}

.msm-bo-login-brand small {
    margin-top: 2px;
    color: var(--msm-bo-muted);
}

.msm-bo-login-card h1 {
    margin: 0 0 7px;
    font-size: 27px;
}

.msm-bo-login-card > p {
    margin: 0 0 22px;
    color: var(--msm-bo-muted);
}

.msm-bo-login-form {
    display: grid;
    gap: 16px;
}

.msm-bo-login-form label > span {
    display: block;
    margin-bottom: 6px;
    font-weight: 650;
}

.msm-bo-login-form input[type="text"],
.msm-bo-login-form input[type="password"] {
    width: 100%;
    min-height: 48px;
}

.msm-bo-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msm-bo-remember span {
    margin: 0 !important;
    font-weight: 400 !important;
}

.msm-bo-login-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--msm-bo-primary);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.msm-bo-login-button:hover {
    background: var(--msm-bo-primary-dark);
}

.msm-bo-lost-password {
    display: block;
    margin-top: 20px;
    text-align: center;
    text-decoration: none;
}

.msm-bo-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 7px;
}

.msm-bo-alert-error {
    border: 1px solid #efb2ad;
    background: #fff1f0;
    color: var(--msm-bo-danger);
}

@media (max-width: 1100px) {
    :root {
        --msm-bo-sidebar-width: 220px;
    }

    .msm-bo-content {
        padding-right: 17px;
        padding-left: 17px;
    }
}

@media (max-width: 820px) {
    body.msm-bo-body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .msm-bo-sidebar {
        width: min(86vw, 310px);
        transform: translateX(-105%);
        box-shadow: 16px 0 45px rgba(0, 0, 0, .23);
        transition: transform .2s ease;
    }

    .msm-bo-body.is-menu-open .msm-bo-sidebar {
        transform: translateX(0);
    }

    .msm-bo-sidebar-close,
    .msm-bo-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .msm-bo-overlay {
        position: fixed;
        z-index: 45;
        inset: 0;
        background: rgba(10, 12, 15, .47);
    }

    .msm-bo-body.is-menu-open .msm-bo-overlay {
        display: block;
    }

    .msm-bo-main {
        margin-left: 0;
    }

    .msm-bo-topbar {
        min-height: 62px;
        padding: 8px 13px;
    }

    .msm-bo-topbar span {
        display: none;
    }

    .msm-bo-topbar strong {
        font-size: 17px;
    }

    .msm-bo-site-link {
        padding: 7px 9px;
        font-size: 12px;
    }

    .msm-bo-content {
        padding: 1px 12px 30px;
    }

    .msm-bo-content .msm-header {
        gap: 12px;
        margin: 14px 0;
    }

    .msm-bo-content .msm-header h1 {
        font-size: 22px;
    }

    .msm-bo-content .msm-panel,
    .msm-bo-content .msm-card {
        padding: 15px;
    }

    .msm-bo-content .msm-table-scroll {
        margin-right: -3px;
        margin-left: -3px;
        border-radius: 8px;
    }

    .msm-bo-content .msm-table th,
    .msm-bo-content .msm-table td {
        padding: 10px;
    }

    .msm-bo-bottom-nav {
        position: fixed;
        z-index: 40;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(62px + env(safe-area-inset-bottom));
        padding: 5px 4px env(safe-area-inset-bottom);
        border-top: 1px solid var(--msm-bo-border);
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -5px 22px rgba(20, 28, 38, .08);
        backdrop-filter: blur(10px);
    }

    .msm-bo-bottom-link {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 1px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #626a76 !important;
        text-decoration: none;
        cursor: pointer;
    }

    .msm-bo-bottom-link span {
        height: 25px;
        font-size: 18px;
        font-weight: 750;
        line-height: 25px;
    }

    .msm-bo-bottom-link small {
        display: block;
        max-width: 100%;
        overflow: hidden;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .msm-bo-bottom-link.is-active {
        background: #edf0ff;
        color: var(--msm-bo-primary) !important;
    }

    .msm-bo-content .msm-row-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        white-space: normal;
    }

    .msm-bo-content .msm-form-actions {
        flex-wrap: wrap;
    }

    .msm-bo-content .msm-form-actions .button {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .msm-bo-login-shell {
        align-items: stretch;
        padding: 0;
    }

    .msm-bo-login-card {
        max-width: none;
        min-height: 100vh;
        padding: 28px 22px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .msm-bo-content .msm-cards {
        gap: 10px;
    }

    .msm-bo-content .msm-card strong {
        font-size: 27px;
    }

    body.msm-bo-body .button,
    body.msm-bo-body button.button {
        min-height: 42px;
    }
}
