/* 06-admin-settings - part of the former static/style.css.
*
* The stylesheet is split by area, but the split is mechanical: rules were
* moved verbatim and NOT regrouped. The numeric prefix is the load order, and
* that order is what preserves the cascade. A rule sits in the file its
* original position fell into, so an area's rules are not all in its file and
* a file is not only that area's rules.
*
* Do not reorder the tags in static/index.html, and do not move a rule
* between files: with 1,151 redeclarations and 1,886 !important in this
* cascade, either can change which declaration wins.
*
* static/index.html and the PRECACHE list in static/sw.js must agree on this
* order. tests/test_static_stylesheet_manifest.py and
* tests/test_css_computed_style_snapshot.py fail if that drifts.
*/
.admin-slider::before {
content: '';
position: absolute;
left: 2px;
top: 2px;
width: 12px;
height: 12px;
background: var(--panel);
border-radius: 50%;
transition: transform 0.08s;
box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.admin-switch input:checked + .admin-slider {
background: var(--red);
}
.admin-switch input:checked + .admin-slider::before {
transform: translateX(14px);
}
/* User rows */
.admin-user-row {
display: flex;
flex-direction: column;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
margin-bottom: 6px;
transition: border-color 0.15s;
}
.admin-user-row:hover {
border-color: color-mix(in srgb, var(--fg) 20%, var(--border));
}
.admin-user-info {
display: flex;
align-items: center;
gap: 8px;
}
.admin-user-name { font-size: 13px; font-weight: 500; }
/* Privilege panel */
.admin-priv-panel {
max-height: 600px;
transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
overflow: hidden;
}
.admin-priv-panel.hidden {
max-height: 0 !important;
opacity: 0;
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-top: 0 !important;
border-top: none !important;
}
/* Privilege toggle rows */
.admin-priv-panel [data-priv] {
accent-color: var(--accent, var(--red));
}
/* Section headers */
.admin-priv-section {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
opacity: 0.35;
font-weight: 600;
margin: 10px 0 4px;
}
.admin-priv-section:first-child {
margin-top: 0;
}
/* Model checkbox list */
.priv-models-list {
max-height: 150px;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 6px;
padding: 4px 6px;
background: var(--bg);
scrollbar-width: thin;
}
.priv-models-list::-webkit-scrollbar {
width: 4px;
}
.priv-models-list::-webkit-scrollbar-thumb {
background: color-mix(in srgb, var(--fg) 15%, transparent);
border-radius: 2px;
}
.priv-models-list label {
display: flex;
align-items: center;
gap: 6px;
padding: 3px 2px;
font-size: 11px;
cursor: pointer;
border-radius: 3px;
transition: background 0.1s;
}
.priv-models-list label:hover {
background: color-mix(in srgb, var(--fg) 5%, transparent);
}
.priv-models-list input[type="checkbox"] {
accent-color: var(--accent, var(--red));
margin: 0;
flex-shrink: 0;
}
/* All/None links */
.priv-models-all,
.priv-models-none {
font-size: 10px;
opacity: 0.5;
color: var(--fg);
text-decoration: none;
cursor: pointer;
transition: opacity 0.1s;
}
.priv-models-all:hover,
.priv-models-none:hover {
opacity: 1;
}
/* MCP tool toggles panel */
.mcp-tools-panel {
width: 100%;
padding: 8px 0 4px;
border-top: 1px solid var(--border);
margin-top: 8px;
max-height: 600px;
transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
overflow: hidden;
}
.mcp-tools-panel.hidden {
max-height: 0 !important;
opacity: 0;
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-top: 0 !important;
}
.mcp-tools-panel .mcp-tools-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
}
.mcp-tools-panel .mcp-tools-header span:first-child {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
opacity: 0.35;
font-weight: 600;
}
.mcp-tools-panel .mcp-tools-header a {
font-size: 10px;
opacity: 0.5;
color: var(--fg);
text-decoration: none;
cursor: pointer;
transition: opacity 0.1s;
}
.mcp-tools-panel .mcp-tools-header a:hover {
opacity: 1;
}
.mcp-tools-list {
max-height: 200px;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 6px;
padding: 4px 6px;
background: color-mix(in srgb, var(--fg) 3%, transparent);
}
.mcp-tools-list::-webkit-scrollbar {
width: 4px;
}
.mcp-tools-list::-webkit-scrollbar-thumb {
background: color-mix(in srgb, var(--fg) 15%, transparent);
border-radius: 2px;
}
.mcp-tools-list label {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 6px;
font-size: 11px;
cursor: pointer;
border-radius: 3px;
min-width: 0;
}
.mcp-tools-list label > span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.mcp-tools-list label:hover {
background: color-mix(in srgb, var(--fg) 5%, transparent);
}
.mcp-tools-list input[type="checkbox"] {
accent-color: var(--accent, var(--red));
margin: 0;
flex-shrink: 0;
}
/* Dot-style toggle (mirrors .note-check-dot) for the Add Models row,
replacing the native checkbox while keeping it for click handling. */
.adm-cb-hidden {
position: absolute;
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
.adm-check-dot {
/* Lock the dot to a fixed 12×12 box. The parent rule
`.mcp-tools-list label > span { flex: 1 }` was stretching this span
to fill the row when it didn't have its own flex override. */
flex: 0 0 12px !important;
width: 12px !important;
height: 12px;
min-width: 12px;
max-width: 12px;
box-sizing: border-box;
border-radius: 50%;
border: 1.5px solid color-mix(in srgb, var(--fg) 35%, transparent);
position: relative;
transition: background 0.2s, border-color 0.2s, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.adm-model-row {
display: flex;
align-items: center;
gap: 8px;
min-height: 28px;
padding: 2px 4px;
box-sizing: border-box;
width: 100%;
}
.adm-model-label {
display: flex;
align-items: center;
gap: 8px;
flex: 1 1 auto;
min-width: 0;
cursor: pointer;
}
.adm-model-name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.adm-model-tools-col {
display: inline-flex;
align-items: center;
gap: 6px;
flex: 0 0 auto;
margin-left: auto;
}
.adm-model-tools-label {
font-size: 10px;
opacity: 0.45;
flex-shrink: 0;
user-select: none;
}
.adm-model-tool-mode,
.admin-tools-select {
height: 24px;
min-height: 24px;
line-height: 22px;
font-size: 11px;
padding: 0 18px 0 6px;
width: 124px;
max-width: 130px;
flex-shrink: 0;
border-radius: 4px;
border: 1px solid var(--border);
background-color: var(--select-bg);
color: var(--select-fg);
box-sizing: border-box;
vertical-align: middle;
}
@media (max-width: 480px) {
.adm-model-tool-mode,
.admin-tools-select {
width: 105px;
max-width: 110px;
font-size: 10px;
padding: 0 14px 0 4px;
}
}
.adm-model-row:hover .adm-check-dot {
border-color: var(--accent, var(--red));
transform: scale(1.15);
}
.adm-cb-hidden:checked + .adm-check-dot {
background: var(--accent, var(--red));
border-color: var(--accent, var(--red));
}
/* Added Models bulk selection uses the shared dot, without a check glyph. */
.adm-endpoint-select-dot {
flex-basis: 11px !important;
width: 11px !important;
height: 11px;
min-width: 11px;
max-width: 11px;
}
/* Disabled endpoints — dim the row but keep the toggle/delete buttons
at full opacity so the user can re-enable or remove without squinting. */
.admin-user-row.admin-ep-disabled { opacity: 0.55; }
.admin-user-row.adm-ep-just-added {
border-radius: 8px;
animation: adm-ep-just-added-glow 2.2s ease-out;
}
.admin-user-row.admin-ep-disabled .admin-btn-sm,
.admin-user-row.admin-ep-disabled .admin-btn-delete,
.admin-user-row.admin-ep-disabled .admin-badge-off { opacity: 1; }
/* Local / API subsection labels inside the Endpoints card */
.adm-ep-section-head {
display: flex;
align-items: center;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--fg);
opacity: 0.5;
margin-bottom: 4px;
}
/* Collapsible Add-Models subsections (API / Local) — the whole header row
acts as a toggle so a long cloud-API form can be tucked away when you
only want to paste a local URL. */
.adm-section-toggle {
cursor: pointer;
user-select: none;
opacity: 0.8;
border: 1px solid var(--border);
border-radius: 6px;
padding: 6px 9px;
margin-bottom: 6px;
background: color-mix(in srgb, var(--fg) 4%, transparent);
transition: border-color 0.12s, background 0.12s, opacity 0.12s;
}
.adm-section-toggle:hover {
opacity: 1;
border-color: var(--red);
background: color-mix(in srgb, var(--red) 8%, transparent);
}
.adm-section-toggle .adm-section-caret { opacity: 0.6; }
/* When expanded, square off the bottom so the header reads as attached to
the form it controls. */
.adm-add-section:not(.collapsed) .adm-section-toggle {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin-bottom: 0;
}
.adm-section-caret {
margin-left: auto;
flex-shrink: 0;
transition: transform 0.18s ease;
}
.adm-quickstart-toggle {
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
user-select: none;
opacity: 0.72;
border: 1px solid var(--border);
border-radius: 6px;
padding: 4px 8px;
font-size: 11px;
background: color-mix(in srgb, var(--fg) 3%, transparent);
}
.adm-quickstart-toggle:hover {
opacity: 1;
border-color: var(--red);
}
.adm-quickstart-body {
display: flex;
align-items: center;
gap: 6px;
border: 1px solid var(--border);
border-top: 0;
border-radius: 0 0 6px 6px;
padding: 6px 8px;
}
/* Custom provider picker (logo + name) replacing the native