.domain-public-mode .tree-feature { display:none!important; }
#tree-modal .tree-row-spinner { flex:0 0 12px;width:12px;height:12px;border:2px solid #dce5f4;border-top-color:#527cef;border-radius:50%;animation:tree-row-spin .7s linear infinite; }
@keyframes tree-row-spin { to { transform:rotate(360deg); } }
#tree-modal { position:fixed;inset:0;z-index:12000;background:#17203366;display:flex;align-items:center;justify-content:center;padding:24px; }
#tree-modal[hidden] { display:none; }
#tree-modal .tree-dialog { width:min(1240px,96vw);max-height:92vh;display:flex;flex-direction:column;background:var(--card-bg,#fff);color:var(--text,#182235);border-radius:18px;box-shadow:0 24px 90px #101b3440;overflow:hidden; }
#tree-modal .tree-head { padding:22px 24px 14px;border-bottom:1px solid var(--border,#e3e8ef); }
#tree-modal .tree-title { display:flex;align-items:center;justify-content:space-between;gap:12px; }
#tree-modal h2 { margin:0;font-size:21px; }
#tree-modal .tree-subtitle { font-size:12px;color:var(--text-muted,#718096);min-height:18px;margin:8px 0;overflow-wrap:anywhere; }
#tree-modal .tree-settings { display:grid;grid-template-columns:1fr 1fr 2fr;gap:12px; }
#tree-modal label { font-size:12px;color:var(--text-muted,#718096); }
#tree-modal input { width:100%;min-width:0;box-sizing:border-box;padding:10px 11px;border:1px solid var(--border,#d8dfeb);border-radius:8px;background:var(--input-bg,#fff);color:inherit;font:inherit; }
#tree-modal label input { margin-top:5px;font-size:13px; }
#tree-modal input:focus { outline:2px solid #a5c4ff;outline-offset:1px; }
#tree-modal button { border:1px solid var(--border,#e3e8ef);background:var(--input-bg,#fff);color:inherit;border-radius:8px;padding:8px 11px;cursor:pointer;font-size:13px;white-space:nowrap; }
#tree-modal button:disabled { opacity:.5;cursor:wait; }
#tree-modal .tree-close { font-size:20px;border:0; }
#tree-modal .tree-toolbar { display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:16px 24px; }
#tree-modal .tree-updated { color:var(--text-muted,#718096);font-size:11px; }
#tree-modal .tree-delete-all { margin-left:auto;color:#c54848;background:#fff3f3;border-color:#f2dada; }
#tree-modal .tree-table-wrap { flex:1 1 auto;padding:0 24px 24px;overflow:auto;min-height:120px; }
#tree-modal table { width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px; }
#tree-modal th { text-align:left;padding:10px 8px;color:var(--text-muted,#718096);font-size:11px;font-weight:600; }
#tree-modal thead th { position:sticky;top:0;z-index:2;background:var(--card-bg,#fff);box-shadow:0 1px 0 var(--border,#e3e8ef); }
#tree-modal td { padding:9px 8px;border-bottom:1px solid var(--border,#edf0f5);vertical-align:middle; }
#tree-modal .tree-link-cell { display:flex;align-items:center;gap:5px; }
#tree-modal .tree-link-cell input { flex:1; }
#tree-modal a { color:#527cef;text-decoration:none;font-size:18px; }
#tree-modal .tree-add { color:white;background:#24a574;border-color:#24a574; }
#tree-modal .tree-remove { color:#dc3434;opacity:.5;font-size:17px;background:transparent;border:0; }
#tree-modal .tree-remove:hover { opacity:1; }
#tree-modal .tree-row-log { font-size:11px;overflow-wrap:anywhere; }
#tree-modal .tree-date { font-size:11px;color:var(--text-muted,#718096); }
#tree-modal .tree-tags { display:flex;flex-wrap:wrap;gap:4px; }
#tree-modal .tree-tag { max-width:100%;box-sizing:border-box;padding:3px 7px;border:1px solid #dce5f4;border-radius:6px;background:#f0f5fc;color:#526784;font-size:11px;line-height:16px;overflow-wrap:anywhere; }
html[data-theme="dark"] #tree-modal .tree-tag { background:#203247;border-color:#354f70;color:#c8d9ed; }
#tree-modal .tree-empty { text-align:center;padding:32px;color:var(--text-muted,#718096); }
#tree-controls:not([hidden]) { min-height:0;flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden; }
#tree-controls[hidden] { display:none; }
#tree-modal .tree-toolbar, #tree-modal .tree-entry-row, #tree-modal .tree-create-log { flex:0 0 auto; }
.textarea-item > label.tree-url-switch { display:flex;align-items:center;gap:9px;flex:0 0 calc(100% - 38px);width:calc(100% - 38px);box-sizing:border-box;font-size:12px;line-height:18px;font-weight:400;margin:2px 38px 7px 0;cursor:pointer; }
.tree-url-switch select, .pour-tree-option select { flex:0 0 110px;width:110px;min-width:110px;margin:0;padding:4px 8px;font-size:12px; }
.tree-url-switch, .pour-tree-option { white-space:nowrap;flex-wrap:nowrap; }
@media(max-width:760px) { #tree-modal {padding:8px;} #tree-modal .tree-settings {grid-template-columns:1fr;} #tree-modal table {min-width:850px;} #tree-modal .tree-dialog {max-height:96vh;} }

/* Compact link editor with restrained colors for the two input rows. */
#tree-modal table input { padding:6px 9px;font-size:12px;line-height:18px;border-radius:6px; }
#tree-modal td { padding:6px 8px; }
#tree-modal #tree-new-path, #tree-modal #tree-new-target { background:#f0faf4;border-color:#cde8d8; }
#tree-modal #tree-search { background:#f0f6ff;border-color:#d2e2f7; }
#tree-modal .tree-add { padding:6px 10px;font-size:12px; }
html[data-theme="dark"] #tree-modal #tree-new-path, html[data-theme="dark"] #tree-modal #tree-new-target { background:#19362a;border-color:#355746; }
html[data-theme="dark"] #tree-modal #tree-search { background:#1b2d45;border-color:#354f70; }

#tree-modal .tree-auth-details { margin-top:10px;font-size:12px;color:var(--text-muted,#718096); }
#tree-authorization { width:100%;box-sizing:border-box;margin-top:6px;padding:7px;border:1px solid var(--border,#d8dfeb);border-radius:6px;background:var(--input-bg,#fff);color:inherit;font:11px monospace;resize:vertical; }

#tree-modal .tree-entry-row { display:flex;align-items:center;gap:24px;padding:0 24px 12px; }
#tree-modal .tree-entry-row #tree-search { width:300px;flex:0 0 300px; }
#tree-modal .tree-create-fields { margin-left:auto;display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 760px; }
#tree-modal .tree-entry-row input { padding:6px 9px;font-size:12px;line-height:18px;border-radius:6px; }
#tree-modal .tree-create-fields #tree-new-path { flex:1 1 190px;width:190px; }
#tree-modal .tree-create-fields #tree-new-target { flex:1.4 1 250px;width:250px; }
#tree-modal .tree-create-log { padding:0 24px 10px;text-align:right; }
#tree-modal .tree-create-log:empty { display:none; }
@media(max-width:900px) { #tree-modal .tree-entry-row {flex-wrap:wrap;gap:10px;} #tree-modal .tree-create-fields {flex-basis:100%;} #tree-modal .tree-entry-row #tree-search {max-width:100%;flex-shrink:1;} }

#tree-modal .tree-shared-status { padding:7px 10px;margin-bottom:12px;border-radius:7px;background:#f0f6ff;color:#3b587b;font-size:12px; }
#tree-modal .tree-shared-status[data-phase="authorizing"] { background:#fff5da;color:#866422; }
#tree-modal .tree-shared-status[data-phase="error"] { background:#fff0f0;color:#ad4545; }
html[data-theme="dark"] #tree-modal .tree-shared-status { background:#203247;color:#c8d9ed; }

.config-field label.pour-tree-option { display:flex;align-items:center;gap:9px;line-height:18px;margin:2px 0;font-weight:500;cursor:pointer; }
#tree-modal .tree-select-cell { width:38px;text-align:center; }
#tree-modal .tree-select-cell input[type="checkbox"] { width:16px;min-width:16px;height:16px;cursor:pointer; }
