/* Общий внешний каркас. Не задаём стили таблицам и элементам внутри разделов. */
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;
}

/* v1.32: native options contain names only; selected metadata is decorative. */
.fi-shell-event-picker{position:relative;flex:1;min-width:0;width:100%}
.fi-shell-event-picker.has-selection select{height:44px;color:transparent;-webkit-text-fill-color:transparent}
.fi-shell-event-picker select option{color:#263b4d;-webkit-text-fill-color:#263b4d;background:#fff}
.fi-shell-event-decoration{position:absolute;inset:0 30px 0 10px;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:7px;pointer-events:none;min-width:0;color:#263b4d;font:13px/1.3 system-ui,sans-serif}
.fi-shell-event-name{flex:1 1 auto;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fi-shell-event-meta{display:flex;align-items:center;gap:6px;min-width:0;flex:0 0 auto;flex-wrap:nowrap;white-space:nowrap}
.fi-shell-event-meta .fi-shell-event-date{font-size:11px;color:#74899b}
.fi-shell-event-meta .fi-shell-state{padding:3px 6px;font-size:10px;line-height:1.3}
.fi-shell-event-meta .fi-shell-state.is-open{background:#e2f5ea;color:#337250}
.fi-shell-event-meta .fi-shell-state.is-closed{background:#f3e6e8;color:#95515a}
.fi-shell-event-picker:has(select:disabled) .fi-shell-event-decoration{opacity:.65}
@media(forced-colors:active){.fi-shell-event-picker.has-selection select{color:CanvasText;-webkit-text-fill-color:CanvasText;height:42px}.fi-shell-event-decoration{display:none}}

/* v1.33: one line, with stable date/status and an ellipsis for long names. */
@media(max-width:420px){.fi-shell-event-decoration{font-size:12px;gap:5px}.fi-shell-event-meta{gap:4px}.fi-shell-event-meta .fi-shell-event-date{font-size:10px}.fi-shell-event-meta .fi-shell-state{font-size:9px;padding:3px 4px}}

/* v1.46: the mobile workspace is a plain surface, without an outer card. */
@media(max-width:900px){
 .fi-shell-main{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;min-width:0;box-sizing:border-box}
}

.fi-shell-menu-button {padding:0;line-height:1;align-items:center;justify-content:center;}
@media(max-width:720px){.fi-shell-menu-button{display:flex;}}

.fi-shell-header .fi-shell-account .fi-shell-logout{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border-radius:8px}
.fi-shell-header .fi-shell-logout svg{display:block;flex:none}
.fi-shell-header .fi-shell-logout:hover,.fi-shell-header .fi-shell-logout:focus-visible{background:#ffffff24}
