.shell-skip-link {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    background: #111827;
    transform: translateY(-180%);
}
.shell-skip-link:focus { transform: translateY(0); }

.shell-context-banner {
    position: sticky;
    top: 0;
    z-index: 920;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 2px solid #f59e0b;
    border-radius: var(--shell-radius);
    color: #451a03;
    background: #fffbeb;
    box-shadow: 0 8px 24px rgba(146, 64, 14, .12);
}
.shell-context-copy { min-width: 0; }
.shell-context-copy strong,
.shell-context-copy span { display: block; }
.shell-context-copy strong { overflow-wrap: anywhere; font-size: .96rem; }
.shell-context-copy span { margin-top: 3px; font-size: .78rem; line-height: 1.35; }
.shell-context-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.shell-context-action {
    min-height: var(--shell-touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid #92400e;
    border-radius: 10px;
    color: #fff;
    background: #92400e;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.shell-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: none;
    background: rgba(8, 20, 39, .58);
}
.shell-more-backdrop.is-open { display: block; }
.shell-more-sheet {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    color: var(--shell-text);
    background: var(--shell-surface);
}
.shell-more-head { display: flex; align-items: center; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 14px 12px; border-bottom: 1px solid var(--shell-line); }
.shell-more-head h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.shell-more-close { width: var(--shell-touch-target); height: var(--shell-touch-target); border: 1px solid var(--shell-line); border-radius: 11px; background: #fff; cursor: pointer; }
.shell-more-search { width: calc(100% - 28px); min-height: var(--shell-touch-target); margin: 12px 14px; padding: 9px 12px; border: 1px solid var(--shell-line); border-radius: 11px; }
.shell-more-groups { overflow-y: auto; padding: 0 14px calc(24px + env(safe-area-inset-bottom)); }
.shell-more-group h3 { margin: 15px 0 7px; color: var(--shell-muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.shell-more-link { min-height: var(--shell-touch-target); display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--shell-text); text-decoration: none; font-weight: 700; }
.shell-more-link[aria-current="page"] { color: var(--shell-primary); background: #eff6ff; }
.shell-more-link svg { width: 19px; height: 19px; }
.shell-more-link.is-logout { margin-top: 14px; color: var(--shell-danger); border-top: 1px solid var(--shell-line); border-radius: 0; }

.sa-nav-group-title { margin: 12px 12px 4px; color: rgba(255,255,255,.42); font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.sa-nav-legacy { display: none !important; }
.crm-nav-legacy, .mobile-nav-legacy { display: none !important; }
.crm-nav-registry { display: flex; flex: 1 1 auto; flex-direction: column; }
.crm-nav-registry .crm-sidebar-section:last-child { margin-top: auto; }
.sa-mobile-nav { display: none; }

@media (max-width: 768px) {
    .shell-context-banner { position: relative; top: auto; align-items: stretch; flex-direction: column; margin-bottom: 10px; padding: 11px; }
    .shell-context-actions, .shell-context-actions form { width: 100%; }
    .shell-context-action { width: 100%; }
    .sa-sidebar { display: none !important; }
    .crm-nav-link, .crm-chip, .crm-chip-link, .sa-btn { min-height: var(--shell-touch-target); }
    .shell-center-mobile-nav { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); height: auto; min-height: 70px; padding-bottom: max(5px, env(safe-area-inset-bottom)); }
    .shell-center-mobile-nav button { font: inherit; border: 0; background: transparent; }
    .sa-mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 70px;
        padding: 5px 4px max(5px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--shell-line);
        background: rgba(255,255,255,.97);
        box-shadow: 0 -6px 20px rgba(15,23,42,.08);
    }
    .sa-mobile-nav a, .sa-mobile-nav button {
        min-width: 0;
        min-height: var(--shell-touch-target);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        color: var(--shell-muted);
        background: transparent;
        font-size: .68rem;
        font-weight: 800;
        text-decoration: none;
    }
    .sa-mobile-nav [aria-current="page"] { color: var(--shell-primary); }
    .sa-mobile-nav svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
