/* Only the navigation, side menus and their appearance controls are themed. */
#menu-nav .vc-menu-main {
    --vc-menu-main-bg-active-color: var(--admin-menu-active-bg);
}
#nav.vc-nav .title,
#nav.vc-nav .title a {
    color: var(--vc-nav-color);
}

#nav.vc-nav > div:first-child {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
#nav.vc-nav > div:first-child::-webkit-scrollbar { display: none; }
#nav.vc-nav > div:last-child { flex-shrink: 0; }
#nav.vc-nav > div > ul { flex-wrap: nowrap; }
#nav.vc-nav > div > ul > li { flex-shrink: 0; white-space: nowrap; }

#nav .admin-theme-entry { position: static; display: flex; align-items: center; }
.admin-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 20px;
    cursor: pointer;
}
.admin-theme-toggle:hover,
.admin-theme-toggle[aria-expanded="true"] { background: var(--admin-nav-hover); color: var(--admin-nav-hover-text); }
.admin-theme-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.admin-theme-panel[hidden] { display: none !important; }
.admin-theme-panel {
    position: fixed;
    z-index: 2200;
    top: 58px;
    right: 16px;
    width: 352px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 74px);
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    background: #ffffff;
    color: #222a36;
    box-shadow: 0 8px 32px rgba(20, 30, 48, 0.18);
    font: 14px/1.5 "Helvetica Neue", "Microsoft YaHei", sans-serif;
    text-align: left;
    white-space: normal;
    cursor: default;
    scrollbar-width: thin;
    scrollbar-color: #aab4c3 #ffffff;
}
.admin-theme-panel * { box-sizing: border-box; }
.admin-theme-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.admin-theme-heading h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 24px; }
.admin-theme-close { border: 0; background: transparent; color: #374151; padding: 4px 7px; cursor: pointer; }
.admin-theme-description { margin: 0 0 20px; color: #536071; font-size: 12px; line-height: 18px; }
.admin-theme-group { position: relative; min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.admin-theme-group legend { width: auto; margin: 0 0 10px; font-size: 14px; font-weight: 600; line-height: 20px; }
.admin-theme-auto { position: absolute; top: -30px; right: 0; display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; font-weight: 400; color: #4b5563; cursor: pointer; }
.admin-theme-auto input { margin: 0; accent-color: #3e77fc; }
.admin-theme-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-theme-field > span { display: block; margin-bottom: 6px; color: #536071; font-size: 12px; line-height: 18px; }
.admin-theme-color { display: flex; align-items: center; gap: 6px; }
.admin-theme-color input[type="color"] { flex: 0 0 32px; width: 32px; height: 32px; padding: 2px; border: 1px solid #cbd2dc; border-radius: 4px; background: #ffffff; cursor: pointer; }
.admin-theme-color input[type="text"] { min-width: 0; width: 100%; height: 32px; border: 1px solid #cbd2dc; border-radius: 4px; padding: 4px 6px; background: #ffffff; color: #222a36; font: 12px/20px ui-monospace, monospace; }
.admin-theme-color input:disabled { opacity: 1; cursor: not-allowed; background: #f2f4f7; color: #536071; }
.admin-theme-color input[aria-invalid="true"] { border-color: #b42318; }
.admin-theme-panel :focus-visible,
.admin-theme-toggle:focus-visible { outline: 2px solid #3e77fc; outline-offset: 3px; }
.admin-theme-toggle:focus-visible { outline-color: currentColor; }
.admin-theme-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid #e5e9ef; }
.admin-theme-reset { padding: 6px 12px; border: 1px solid #bdc6d4; border-radius: 4px; background: #ffffff; color: #222a36; font: inherit; cursor: pointer; }
.admin-theme-reset:hover { background: #f2f4f7; }
.admin-theme-save { padding: 7px 14px; border: 0; border-radius: 4px; background: #245fdc; color: #ffffff; font: inherit; cursor: pointer; }
.admin-theme-save:hover { background: #1e50b9; }
.admin-theme-history { margin-top: 18px; }
.admin-theme-history h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 13px; font-weight: 600; line-height: 20px; }
.admin-theme-history h3 > span { font-size: 12px; font-weight: 400; color: #536071; }
.admin-theme-empty { margin: 0; font-size: 12px; line-height: 18px; color: #536071; white-space: normal; }
.admin-theme-history-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-theme-scheme { display: grid; grid-template-columns: 1fr auto; gap: 7px 4px; min-width: 0; padding: 9px; border: 1px solid #cbd2dc; border-radius: 5px; background: #ffffff; color: #222a36; text-align: left; font: 12px/18px "Helvetica Neue", "Microsoft YaHei", sans-serif; cursor: pointer; }
.admin-theme-scheme[hidden], .admin-theme-empty[hidden] { display: none !important; }
.admin-theme-scheme:hover { background: #f5f7fb; }
.admin-theme-scheme[aria-pressed="true"] { border-color: #245fdc; }
.admin-theme-scheme strong { font-weight: 600; }
.admin-theme-scheme-state { font-size: 11px; color: #245fdc; }
.admin-theme-preview { display: flex; grid-column: 1 / -1; overflow: hidden; border-radius: 3px; }
.admin-theme-preview > span { flex: 1; padding: 2px 0; text-align: center; font-size: 10px; }
.admin-theme-saved-at { grid-column: 1 / -1; color: #536071; font-size: 11px; font-variant-numeric: tabular-nums; }
.admin-theme-status { min-height: 36px; margin: 12px 0 0; color: #536071; font-size: 12px; line-height: 18px; }
#menu-nav .vc-menu-main li.active,
#menu-nav .vc-menu-sub li.active { box-shadow: inset 3px 0 currentColor; font-weight: 600; }
#menu-nav .vc-menu-sub li.sub-footer { color: var(--admin-sub-footer-text); }
