/* 教务导入差异确认：iOS 毛玻璃 + 黑白极简，用户端与管理端共用 */
.sid-overlay {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.sid-overlay.active { display: flex; opacity: 1; }
.sid-dialog {
    width: min(440px, 100%);
    max-height: calc(var(--skxs-vh, 1vh) * 86);
    display: flex;
    flex-direction: column;
    padding: 22px 18px 16px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(245, 245, 245, 0.96));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.2s ease;
}
.sid-overlay.active .sid-dialog { transform: scale(1) translateY(0); opacity: 1; }
.sid-head { flex: none; padding: 0 4px; text-align: center; }
.sid-title { color: #111; font-size: 1.3rem; font-weight: 750; line-height: 1.3; letter-spacing: -0.01em; }
.sid-desc { margin-top: 6px; color: #8e8e93; font-size: 0.82rem; font-weight: 500; line-height: 1.55; }
.sid-summary {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    color: #3a3a3c;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}
.sid-summary strong { color: #111; font-weight: 750; }
.sid-body > .sid-summary:first-child { margin-top: 0; }
.sid-body > .sid-switch-row:first-child { margin-top: 0; }
.sid-body {
    flex: 1;
    min-height: 0;
    margin: 14px -2px 2px;
    padding: 0 2px 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sid-group { flex: none; border-radius: 20px; background: rgba(0, 0, 0, 0.035); overflow: hidden; }
.sid-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    user-select: none;
}
.sid-group:not(.sid-group-fold) .sid-group-head { cursor: default; }
.sid-group-fold .sid-group-head { cursor: pointer; list-style: none; }
.sid-group-fold .sid-group-head::-webkit-details-marker { display: none; }
.sid-group-titles { flex: 1; min-width: 0; }
.sid-group-title { color: #111; font-size: 0.9rem; font-weight: 700; line-height: 1.35; }
.sid-group-desc { margin-top: 3px; color: #8e8e93; font-size: 0.72rem; font-weight: 500; line-height: 1.45; }
.sid-group-count {
    flex: none;
    min-width: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #6c6c70;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}
.sid-group-toggle {
    flex: none;
    border: 0;
    padding: 4px 2px;
    background: transparent;
    color: #0071e3;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}
.sid-group-toggle:active { opacity: 0.55; }
.sid-group-body { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.sid-group-fold:not([open]) .sid-group-body { display: none; }
.sid-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1.5px solid transparent;
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}
.sid-item.selected,
.sid-item:has(input:checked) { border-color: #1c1c1e; }
.sid-item:active { background: #fafafa; }
.sid-check {
    flex: none;
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    accent-color: #1c1c1e;
}
.sid-item-main { flex: 1; min-width: 0; }
.sid-item-name { display: block; color: #111; font-size: 0.88rem; font-weight: 700; line-height: 1.4; word-break: break-word; }
.sid-item-meta { display: block; margin-top: 3px; color: #8e8e93; font-size: 0.72rem; font-weight: 500; line-height: 1.5; word-break: break-word; }
.sid-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    font-size: 0.66rem;
    font-weight: 700;
    vertical-align: 1px;
}
.sid-empty { padding: 12px 14px; color: #8e8e93; font-size: 0.8rem; }
.sid-error {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 59, 48, 0.08);
    color: #c02b22;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.55;
    text-align: center;
}
.sid-foot { flex: none; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 0 2px; }
.sid-btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 19px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.16s ease;
}
.sid-btn:active { transform: scale(0.985); }
.sid-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.sid-btn-primary { background: #1c1c1e; color: #fff; }
.sid-btn-secondary { background: rgba(0, 0, 0, 0.06); color: #1c1c1e; }
.sid-btn-text { min-height: 42px; background: transparent; color: #8e8e93; font-size: 0.86rem; }
.sid-btn-text:active { color: #1c1c1e; }
.sid-foot-note { color: #8e8e93; font-size: 0.68rem; font-weight: 500; line-height: 1.45; text-align: center; }

/* 管理员：总开关 + 成员摘要 */
.sid-switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.04);
}
.sid-switch-text { flex: 1; min-width: 0; }
.sid-switch-title { color: #111; font-size: 0.86rem; font-weight: 700; line-height: 1.4; }
.sid-switch-desc { margin-top: 2px; color: #8e8e93; font-size: 0.7rem; font-weight: 500; line-height: 1.45; }
.sid-switch {
    position: relative;
    flex: none;
    width: 50px;
    height: 30px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.24);
    cursor: pointer;
    transition: background 0.2s ease;
}
.sid-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.sid-switch:checked { background: #1c1c1e; }
.sid-switch:checked::after { transform: translateX(20px); }
.sid-switch:disabled { opacity: 0.45; }
.sid-subswitches { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-left: 6px; }
.sid-subswitch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; }
.sid-subswitch .sid-switch { width: 44px; height: 26px; }
.sid-subswitch .sid-switch::after { width: 20px; height: 20px; }
.sid-subswitch .sid-switch:checked::after { transform: translateX(18px); }
.sid-subswitch span { color: #3a3a3c; font-size: 0.78rem; font-weight: 600; }
.sid-members { display: flex; flex-direction: column; gap: 8px; }
.sid-member {
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.sid-member-head {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.sid-member-head:active { background: #fafafa; }
.sid-member-info { min-width: 0; }
.sid-member-name { display: block; color: #111; font-size: 0.84rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sid-member-meta { display: block; margin-top: 2px; color: #8e8e93; font-size: 0.7rem; font-weight: 500; }
.sid-member-chips { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
.sid-chip { padding: 3px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); color: #6c6c70; font-size: 0.66rem; font-weight: 700; }
.sid-chip-hot { background: rgba(0, 113, 227, 0.1); color: #0071e3; }
.sid-member-detail { display: none; padding: 0 10px 10px; }
.sid-member.open .sid-member-detail { display: block; }
.sid-member-loading { padding: 10px 12px; color: #8e8e93; font-size: 0.76rem; }
.sid-member-detail .sid-group { margin-top: 8px; }
.sid-member-detail .sid-group-body { gap: 6px; }
.sid-member-detail .sid-item { cursor: default; padding: 9px 10px; }

@media (prefers-reduced-motion: reduce) {
    .sid-overlay, .sid-dialog, .sid-item, .sid-btn, .sid-switch, .sid-switch::after {
        transition-duration: 0.01ms !important;
        animation: none !important;
    }
    .sid-dialog { transform: none; }
}
