/* Общий внешний каркас. Не задаём стили таблицам и элементам внутри разделов. */
body.fi-shell-page {
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #f6fafe;
}

.fi-shell-header {
    position: relative;
    z-index: 20;
    background: #009eff;
    color: white;
}

.fi-shell-header [hidden],
.fi-shell-context [hidden] {
    display: none !important;
}

.fi-shell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1400px;
    min-height: 86px;
    margin: 0 auto;
    padding: 18px 24px;
}

.fi-shell-header a,
.fi-shell-header button,
.fi-shell-footer a {
    text-decoration: none !important;
}

.fi-shell-logo img {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
}

.fi-shell-account {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.fi-shell-languages {
    display: flex;
    gap: 4px;
}

.fi-shell-languages a {
    padding: 5px 7px;
    border-radius: 5px;
    color: white;
    font-size: 11px;
    opacity: 0.75;
}

.fi-shell-languages a[aria-current] {
    background: #ffffff26;
    opacity: 1;
}

.fi-shell-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
    color: white;
    font-size: 13px;
}

.fi-shell-profile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-shell-profile svg {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
}

.fi-shell-signin,
.fi-shell-signup,
.fi-shell-logout {
    padding: 8px 12px;
    border: 1px solid #ffffff55;
    border-radius: 8px;
    background: transparent;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.fi-shell-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 14px;
}

.fi-shell-navigation a {
    padding: 9px 13px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
}

.fi-shell-navigation a:hover {
    background: #ffffff1c;
}

.fi-shell-navigation a[aria-current="page"] {
    background: white;
    color: #5555aa;
}

.fi-shell-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #ffffff55;
    border-radius: 8px;
    background: transparent;
    color: white;
    font-size: 22px;
}

.fi-shell-login-panel {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.fi-shell-context {
    background: #edf7fe;
    border-bottom: 1px solid #dceaf4;
}

.fi-shell-context-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 24px;
}

.fi-shell-context-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: #60788a;
    font-size: 12px;
}

.fi-shell-eyebrow {
    color: #37566e;
    font-weight: bold;
}

.fi-shell-state {
    padding: 5px 8px;
    border-radius: 6px;
    background: #e2f5ea;
    color: #337250;
    font-size: 11px;
}

.fi-shell-state.is-archive {
    background: #e7e9f1;
    color: #68758a;
}

.fi-shell-event-form {
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 220px;
    max-width: 520px;
    margin-left: auto;
}

.fi-shell-event-form select {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #c8ddeb;
    border-radius: 9px;
    background: white;
    color: #263b4d;
    font-size: 13px;
}

.fi-shell-event-form button {
    padding: 8px 12px;
    border: 1px solid #c8ddeb;
    border-radius: 8px;
    background: white;
    color: #37566e;
}

.fi-shell-event-status {
    width: 100%;
    color: #60788a;
    font-size: 12px;
}

.fi-shell-event-status:empty {
    display: none;
}

.fi-shell-main {
    max-width: 1400px;
    margin: 24px auto;
    padding: 20px 16px;
    border: 1px solid #dfebf2;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 28px #16364b06;
}

.fi-shell-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    max-width: 1400px;
    margin: 30px auto 0;
    padding: 22px 24px;
    border-top: 1px solid #dfebf2;
    color: #8a9cac;
    font-size: 11px;
}

.fi-shell-footer a {
    color: #60788a;
}

.fi-shell-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1440px) {
    .fi-shell-main {
        margin-right: 18px;
        margin-left: 18px;
    }
}

@media (max-width: 720px) {
    .fi-shell-top {
        min-height: 74px;
        gap: 10px;
        padding: 14px 12px;
    }

    .fi-shell-menu-button {
        display: block;
    }

    .fi-shell-logo img {
        width: 110px;
    }

    .fi-shell-account {
        gap: 5px;
        margin-left: auto;
    }

    .fi-shell-profile {
        padding: 7px;
    }

    .fi-shell-profile span,
    .fi-shell-logout,
    .fi-shell-signup {
        display: none;
    }

    .fi-shell-signin {
        padding: 8px;
        font-size: 11px;
    }

    .fi-shell-navigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        z-index: 30;
        max-height: 65vh;
        padding: 8px;
        overflow-y: auto;
        border: 1px solid #dfebf2;
        border-radius: 12px;
        background: white;
        box-shadow: 0 12px 28px #18334c1f;
    }

    .fi-shell-header.is-menu-open .fi-shell-navigation {
        display: flex;
        flex-direction: column;
    }

    .fi-shell-navigation a {
        min-height: 42px;
        color: #37566e;
    }

    .fi-shell-navigation a[aria-current="page"] {
        background: #f0effb;
    }

    .fi-shell-context-inner {
        gap: 10px;
        padding: 14px 12px;
    }

    .fi-shell-event-form {
        flex-basis: 100%;
        max-width: none;
        margin-left: 0;
    }

    .fi-shell-main {
        margin: 16px 8px;
        padding: 12px 8px;
        border-radius: 12px;
    }

    .fi-shell-footer {
        padding: 18px 12px;
    }
}

.fi-shell-mobile-only {
    display: none;
}

@media (max-width: 720px) {
    .fi-shell-mobile-only {
        display: block;
    }

    .fi-shell-navigation button {
        min-height: 42px;
        padding: 9px 13px;
        border: 0;
        border-radius: 8px;
        background: white;
        color: #37566e;
        font-size: 13px;
        text-align: left;
    }
}

.fi-shell-syllabus {
    color: #37566e;
    font-size: 12px;
    text-decoration: none !important;
}

.fi-shell-state.is-closed {
    background: #f7e1e6;
    color: #8d2038;
    border: 1px solid #e9bac5;
    font-weight: bold;
}
