/* P01 Functional Rebaseline — capabilities first, presentation flexible.
 * Keeps V2.28 interaction density while making privacy + category navigation first-class again.
 */
:root{--ws-sidebar:252px}
.vf-functional-sidebar{padding-bottom:12px}
.vf-sidebar-scroll{min-height:0;flex:1;overflow:auto;padding-right:2px;scrollbar-width:thin;scrollbar-color:var(--ws-line-strong) transparent}
.vf-nav-section-first{margin-top:0;padding-top:4px;border-top:0}
.vf-quick-nav{margin-bottom:2px}
.vf-sidebar-scope-section{margin-top:2px}
.vf-sidebar-scope{margin:0 5px 3px;padding:3px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;border:1px solid var(--ws-line);border-radius:8px;background:var(--ws-soft)}
.vf-sidebar-scope a{min-width:0;padding:6px 4px;border-radius:6px;display:flex;align-items:center;justify-content:center;gap:4px;text-decoration:none;color:var(--ws-muted);font-size:11.5px}
.vf-sidebar-scope a:hover{background:var(--ws-panel);color:var(--ws-text)}
.vf-sidebar-scope a.active{background:var(--ws-panel);color:var(--ws-teal);box-shadow:0 1px 2px rgba(15,23,42,.06);font-weight:700}
.vf-sidebar-scope b{font-size:10px;font-weight:650;color:var(--ws-muted-2);font-variant-numeric:tabular-nums}
.vf-sidebar-scope a.active b{color:var(--ws-teal)}
.vf-category-section{margin:10px 4px 0;padding-top:11px;border-top:1px solid var(--ws-line)}
.vf-category-title{padding:0 5px 7px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--ws-muted-2);font-size:11px;letter-spacing:.02em}
.vf-category-title a{color:var(--ws-teal);text-decoration:none;font-size:10.5px}
.vf-category-search{height:31px;margin:0 3px 7px;padding:0 8px;display:flex;align-items:center;gap:6px;border:1px solid var(--ws-line);border-radius:7px;background:var(--ws-panel);color:var(--ws-muted-2)}
.vf-category-search:focus-within{border-color:#8dc5bf;box-shadow:0 0 0 2px color-mix(in srgb,var(--ws-teal) 8%,transparent)}
.vf-category-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ws-text);font-size:11.5px}
.vf-category-tree{display:grid;gap:1px}
.vf-category-tree a,.vf-category-node summary{min-height:31px;border-radius:6px;display:flex;align-items:center;color:var(--ws-text);font-size:12px}
.vf-category-tree a{padding:5px 7px;text-decoration:none;gap:6px}
.vf-category-tree a:hover,.vf-category-node summary:hover{background:var(--ws-soft)}
.vf-category-tree a.active,.vf-category-node.active>summary>a,.vf-category-node.active:not(details){background:var(--ws-teal-soft);color:var(--ws-teal);font-weight:700}
.vf-category-tree a span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vf-category-tree a em{margin-left:auto;color:var(--ws-muted-2);font-size:10.5px;font-style:normal;font-variant-numeric:tabular-nums}
.vf-category-node{margin:0}
details.vf-category-node>summary{list-style:none;padding:0 2px;cursor:pointer}
details.vf-category-node>summary::-webkit-details-marker{display:none}
details.vf-category-node>summary>a{min-width:0;flex:1;padding:5px 5px 5px 1px}
.vf-category-caret{width:18px;height:24px;display:grid;place-items:center;color:var(--ws-muted-2);font-size:13px;transition:transform .12s ease}
details[open]>summary>.vf-category-caret{transform:rotate(90deg)}
.vf-category-children{margin-left:13px;padding-left:5px;border-left:1px solid var(--ws-line)}
.vf-category-node[data-filter-hidden="1"]{display:none!important}
.vf-functional-head{margin-bottom:8px}
.vf-context-chips{margin-top:7px;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.vf-context-chip{padding:3px 7px;border:1px solid var(--ws-line);border-radius:999px;background:var(--ws-panel);color:var(--ws-muted);font-size:10.5px}
.vf-context-chip.private,.vf-chip.private,.vf-status-label.private{border-color:#e7c8d2;background:#fff3f6;color:#9f3154}
html[data-theme=dark] .vf-context-chip.private,html[data-theme=dark] .vf-chip.private,html[data-theme=dark] .vf-status-label.private{border-color:#6f394c;background:#351e27;color:#f0a8c0}
.vf-context-path-chip{display:inline-flex;align-items:center;gap:4px;max-width:min(720px,100%)}
.vf-context-path-chip a{color:var(--ws-teal);text-decoration:none;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vf-context-path-chip b{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ws-text);font-weight:700}
.vf-context-path-label{color:var(--ws-muted-2)}
.vf-context-path-sep{color:var(--ws-muted-2)}
.vf-chip.private{font-weight:650}
.vf-mobile-functional-filters{display:none;margin-bottom:8px;gap:6px}
.vf-mobile-functional-filters select,.vf-mobile-category-trigger{min-width:0;height:34px;border:1px solid var(--ws-line);border-radius:7px;background:var(--ws-panel);color:var(--ws-text);padding:0 8px;font-size:12px}
.vf-mobile-category-trigger{display:none;align-items:center;gap:6px;text-align:left;cursor:pointer}
.vf-mobile-category-trigger>span{color:var(--ws-muted-2);font-size:10.5px}
.vf-mobile-category-trigger>b{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.vf-mobile-category-trigger>i{font-style:normal;color:var(--ws-muted-2)}
.vf-mobile-category-overlay{display:none}
.vf-bulkbar select[data-bulk-privacy]{min-width:106px}
.vf-privacy-hint{grid-column:1/-1;margin:-2px 0 2px;padding:7px 9px;border-radius:7px;background:var(--ws-soft);color:var(--ws-muted);font-size:11px;line-height:1.45}
.vf-privacy-hint.private{background:#fff3f6;color:#8f294b}
html[data-theme=dark] .vf-privacy-hint.private{background:#351e27;color:#efabc1}
.vf-functional-workspace .vf-shell-main{width:min(1220px,calc(100% - 40px))}
.vf-functional-workspace .vf-workspace-toolbar{position:sticky;top:70px;z-index:20}
.vf-functional-workspace .vf-workspace-toolbar nav{scrollbar-width:none}
.vf-functional-workspace .vf-workspace-toolbar nav::-webkit-scrollbar{display:none}
@media(max-width:1050px){:root{--ws-sidebar:220px}.vf-category-search{display:none}.vf-sidebar-scope a{font-size:11px}}
@media(max-width:760px){
  :root{--ws-sidebar:0px}
  .vf-functional-sidebar .vf-sidebar-scroll{display:block;overflow:visible;padding:0}
  .vf-functional-sidebar .vf-nav-section,.vf-functional-sidebar .vf-quick-nav,.vf-functional-sidebar .vf-sidebar-scope-section,.vf-functional-sidebar .vf-category-section{display:none}
  .vf-functional-sidebar .vf-main-nav{display:grid}
  .vf-mobile-functional-filters{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.4fr)}
  .vf-mobile-functional-filters select:only-child{grid-column:1/-1}
  .vf-mobile-functional-filters.is-picker-enhanced select[aria-label="导航分类"],.vf-mobile-functional-filters.is-picker-enhanced select[aria-label="网址分类"],.vf-mobile-functional-filters.is-picker-enhanced select[aria-label="分类"]{display:none}
  .vf-mobile-functional-filters.is-picker-enhanced .vf-mobile-category-trigger{display:flex}
  .vf-mobile-functional-filters.is-picker-enhanced .vf-mobile-category-trigger:only-child{grid-column:1/-1}
  body.vf-mobile-category-open{overflow:hidden}
  .vf-mobile-category-overlay{position:fixed;inset:0;z-index:220;display:flex;align-items:flex-end;background:rgba(15,23,42,.34);opacity:0;transition:opacity .15s ease}
  .vf-mobile-category-overlay[hidden]{display:none!important}
  .vf-mobile-category-overlay.open{opacity:1}
  .vf-mobile-category-panel{width:100%;max-height:min(78vh,680px);display:flex;flex-direction:column;border:1px solid var(--ws-line);border-bottom:0;border-radius:16px 16px 0 0;background:var(--ws-panel);box-shadow:0 -18px 48px rgba(15,23,42,.18);transform:translateY(18px);transition:transform .15s ease;overflow:hidden}
  .vf-mobile-category-overlay.open .vf-mobile-category-panel{transform:none}
  .vf-mobile-category-panel>header{min-height:58px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--ws-line)}
  .vf-mobile-category-panel>header strong,.vf-mobile-category-panel>header small{display:block}.vf-mobile-category-panel>header strong{font-size:14px;color:var(--ws-strong)}.vf-mobile-category-panel>header small{margin-top:2px;color:var(--ws-muted-2);font-size:10.5px}
  .vf-mobile-category-close{width:34px;height:34px;border:1px solid var(--ws-line);border-radius:8px;background:var(--ws-panel);color:var(--ws-muted);font-size:22px;line-height:1;cursor:pointer}
  .vf-mobile-category-search{height:38px;margin:10px 12px 7px;padding:0 10px;display:flex;align-items:center;gap:7px;border:1px solid var(--ws-line-strong);border-radius:8px;background:var(--ws-soft);color:var(--ws-muted-2)}
  .vf-mobile-category-search:focus-within{border-color:#8dc5bf;box-shadow:0 0 0 3px color-mix(in srgb,var(--ws-teal) 8%,transparent)}
  .vf-mobile-category-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ws-text);font-size:13px}
  .vf-mobile-category-list{min-height:0;overflow:auto;padding:2px 8px calc(18px + env(safe-area-inset-bottom));overscroll-behavior:contain}
  .vf-mobile-category-list a{min-height:42px;padding:7px 10px 7px calc(10px + min(var(--category-depth),4)*16px);display:flex;align-items:center;gap:8px;border-radius:8px;text-decoration:none;color:var(--ws-text);font-size:13px}
  .vf-mobile-category-list a:hover{background:var(--ws-soft)}
  .vf-mobile-category-list a.active{background:var(--ws-teal-soft);color:var(--ws-teal);font-weight:700}
  .vf-mobile-category-list a[hidden]{display:none!important}
  .vf-mobile-category-list a span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .vf-mobile-category-list a em{min-width:24px;text-align:right;color:var(--ws-muted-2);font-size:10.5px;font-style:normal;font-variant-numeric:tabular-nums}
  .vf-mobile-category-list a em:empty{display:none}
  .vf-functional-workspace .vf-workspace-toolbar{top:58px;position:sticky;align-items:flex-start;overflow:visible}
  .vf-functional-workspace .vf-workspace-toolbar nav{max-width:100%}
  .vf-functional-workspace .vf-toolbar-controls{flex-wrap:wrap;justify-content:flex-end}
  .vf-functional-workspace .vf-toolbar-controls select[aria-label="排序"]{
    display:block;
    min-width:118px;
    max-width:min(44vw,168px);
    height:38px;
    padding-inline:8px;
    border-color:var(--ws-line-strong);
    background:var(--ws-panel);
    color:var(--ws-text);
  }
  .vf-functional-workspace .vf-shell-main{width:calc(100% - 20px);padding-top:14px}
  .vf-functional-head>div{min-width:0}
  .vf-context-chips{margin-top:5px}
  .vf-context-path-chip{max-width:100%}
  .vf-context-path-chip a{max-width:100px}.vf-context-path-chip b{max-width:150px}
}
@media(max-width:520px){
  .vf-functional-workspace .vf-workspace-toolbar{display:block;padding:4px}
  .vf-functional-workspace .vf-workspace-toolbar nav{margin-bottom:4px}
  .vf-functional-workspace .vf-toolbar-controls{justify-content:flex-start}
  .vf-functional-workspace .vf-toolbar-controls a{display:none}
  .vf-mobile-functional-filters{grid-template-columns:1fr 1.5fr}
}


/* P01 auth entry + login dialog · 2026-09-01 */
.vf-auth-dialog{width:min(390px,calc(100vw - 28px));padding:0;border:1px solid var(--ws-line-strong);border-radius:14px;background:var(--ws-panel);color:var(--ws-text);box-shadow:0 24px 70px rgba(15,23,42,.24)}
.vf-auth-dialog::backdrop{background:rgba(15,23,42,.38);backdrop-filter:blur(2px)}
.vf-auth-card{display:grid;gap:16px;padding:18px}
.vf-auth-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.vf-auth-card>header strong,.vf-auth-card>header small{display:block}.vf-auth-card>header strong{font-size:16px;color:var(--ws-strong)}.vf-auth-card>header small{margin-top:4px;color:var(--ws-muted);font-size:12px;line-height:1.5}
.vf-auth-card>header button{width:32px;height:32px;border:1px solid var(--ws-line);border-radius:8px;background:var(--ws-panel);color:var(--ws-muted);font-size:20px;cursor:pointer}
.vf-auth-card label{display:grid;gap:6px}.vf-auth-card label span{font-size:12px;font-weight:650}.vf-auth-card input{height:42px;padding:0 11px;border:1px solid var(--ws-line-strong);border-radius:8px;background:var(--ws-bg);color:var(--ws-text);font:inherit;outline:0}.vf-auth-card input:focus{border-color:#78bdb5;box-shadow:0 0 0 3px color-mix(in srgb,var(--ws-teal) 10%,transparent)}
.vf-auth-card [data-vf-auth-error]{margin:0;padding:8px 10px;border-radius:8px;background:color-mix(in srgb,var(--ws-danger) 8%,var(--ws-panel));color:var(--ws-danger);font-size:12px;line-height:1.45}
.vf-auth-card footer{display:flex;justify-content:flex-end;gap:8px}.vf-auth-card footer button{min-height:38px;padding:0 14px;border:1px solid var(--ws-line-strong);border-radius:8px;background:var(--ws-panel);color:var(--ws-text);font-weight:650;cursor:pointer}.vf-auth-card footer [data-vf-auth-submit]{border-color:var(--ws-teal);background:var(--ws-teal);color:#fff}.vf-auth-card footer button:disabled{opacity:.6;cursor:wait}
@media(max-width:520px){.vf-auth-dialog{width:calc(100vw - 20px);margin:auto 10px}.vf-auth-card{padding:16px}.vf-auth-card footer button{min-height:42px}}


/* P01 mobile auth entry · 2026-09-01 */
.vf-global-auth-action{display:none}
@media(max-width:760px){
  .vf-global-domain-nav-inner{padding-right:6px}
  .vf-global-domain-nav .vf-global-auth-action{position:sticky;right:0;margin-left:auto;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ws-panel) 98%,transparent);color:var(--ws-teal);font-weight:750;box-shadow:-10px 0 14px color-mix(in srgb,var(--ws-panel) 92%,transparent)}
  .vf-global-domain-nav .vf-global-auth-action::after{display:none!important}
}
/* Global personal-search fallback: only after zero local matches. */
.vf-search-fallback{margin:0 0 10px;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--ws-line);border-radius:8px;background:var(--ws-soft);font-size:10.5px}
.vf-search-fallback span{color:var(--ws-muted-2)}
.vf-search-fallback a{color:var(--ws-teal);font-weight:750;text-decoration:none}
@media(max-width:600px){.vf-search-fallback{align-items:flex-start;flex-direction:column;gap:4px}}

/* Search-to-save bridge: a pasted URL with zero local matches becomes a save action, not a dead end. */
.vf-search-fallback-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.vf-search-fallback-actions button{padding:0;border:0;background:transparent;color:var(--ws-teal);font:inherit;font-weight:780;cursor:pointer}
.vf-search-fallback-actions button:hover{text-decoration:underline}
.vf-search-fallback-actions button:focus-visible{outline:2px solid var(--ws-teal);outline-offset:3px;border-radius:3px}
.vf-search-fallback.is-url-candidate>a,.vf-search-fallback-actions a{font-weight:650}
@media(max-width:600px){.vf-search-fallback-actions{width:100%;justify-content:space-between;gap:12px}}


/* P01 Navigation category picker R13.
 * Resource add/edit uses the same canonical category order as the Navigation tree,
 * but presents it as a bounded searchable chooser instead of a native tall select. */
body.surface-start.vf-functional-workspace .vf-editor-category-picker-native{
  position:absolute!important;
  width:1px!important;height:1px!important;
  margin:-1px!important;padding:0!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  white-space:nowrap!important;
  border:0!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker{
  position:relative;
  width:100%;
  min-width:0;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-trigger{
  width:100%;
  min-height:42px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid var(--ws-line-strong);
  border-radius:8px;
  background:var(--ws-panel);
  color:var(--ws-text);
  font:inherit;
  font-size:12.5px;
  text-align:left;
  cursor:pointer;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-trigger:hover,
body.surface-start.vf-functional-workspace .vf-editor-category-picker.is-open .vf-editor-category-picker-trigger{
  border-color:color-mix(in srgb,var(--ws-teal) 46%,var(--ws-line-strong));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--ws-teal) 10%,transparent);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-trigger i{
  flex:0 0 auto;
  color:var(--ws-muted-2);
  font-size:14px;
  font-style:normal;
  transition:transform .12s ease;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker.is-open .vf-editor-category-picker-trigger i{
  transform:rotate(180deg);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-value{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-panel{
  position:absolute;
  z-index:70;
  top:calc(100% + 7px);
  left:0;
  right:0;
  padding:8px;
  display:grid;
  gap:7px;
  border:1px solid var(--ws-line);
  border-radius:10px;
  background:var(--ws-panel);
  box-shadow:0 14px 38px rgba(15,23,42,.14);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-panel[hidden]{
  display:none!important;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-search{
  min-height:38px;
  padding:0 10px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:7px;
  border:1px solid var(--ws-line);
  border-radius:8px;
  background:var(--ws-soft);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-search span{
  color:var(--ws-muted-2);
  font-size:12px;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-search input{
  width:100%!important;
  min-height:36px!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--ws-text)!important;
  font:inherit!important;
  font-size:12.5px!important;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-meta{
  padding:0 3px;
  color:var(--ws-muted-2);
  font-size:10.5px;
  line-height:1.35;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-list{
  max-height:286px;
  padding:2px;
  display:grid;
  gap:2px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-option{
  width:100%;
  min-height:44px;
  padding:6px 9px 6px calc(9px + min(var(--category-depth),5) * 14px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--ws-text);
  font:inherit;
  text-align:left;
  cursor:pointer;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-option:hover,
body.surface-start.vf-functional-workspace .vf-editor-category-picker-option:focus-visible{
  outline:0;
  background:var(--ws-soft);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-option.is-selected{
  background:var(--ws-teal-soft);
  color:var(--ws-teal);
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-copy{
  min-width:0;
  display:grid;
  gap:2px;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-copy b{
  overflow:hidden;
  font-size:12.5px;
  font-weight:680;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-copy small{
  overflow:hidden;
  color:var(--ws-muted-2);
  font-size:10.5px;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-option em{
  min-width:30px;
  flex:0 0 auto;
  color:var(--ws-teal);
  font-size:10px;
  font-style:normal;
  font-weight:700;
  text-align:right;
}
body.surface-start.vf-functional-workspace .vf-editor-category-picker-empty{
  padding:20px 10px;
  color:var(--ws-muted-2);
  font-size:11.5px;
  text-align:center;
}
