/*
 * FABBRAIN: the pages the prototype does not draw (phase 2, Task 5), after the
 * shared components of fabbrain-ui-resto.css (same conventions: tokens only;
 * :root:not(#fabbrain-resto) plus :where() lists, (1,1,0); !important only
 * against an upstream !important). Loaded right after it, on every page and in
 * index.php's "fabbrain" bundle.
 *
 *   6. page headers and toolbars      7. settings and the admin pages
 *   8. lists and cards of the pages   9. login
 *  11. settings that no longer apply (10, the task list, is fabbrain-ui-tarefas.css)
 */

/* ---- 6. Page headers and toolbars ----------------------------------------- */

/* The title of a page: the h1 of the reading column (24 / 600), its icon
   faint like every icon of the prototype, not in the accent */
:root:not(#fabbrain-resto) .poznote-page-title {
    gap: var(--fb-space-5);
    margin-bottom: var(--fb-space-8);
    color: var(--fb-text);
    font-family: var(--fb-font-sans);
    font-size: var(--fb-text-h1);
    font-weight: var(--fb-weight-semibold);
    letter-spacing: var(--fb-tracking-h2);
    line-height: var(--fb-leading-heading);
}

:root:not(#fabbrain-resto) .poznote-page-title > :where(i, .lucide),
:root:not(#fabbrain-resto) .poznote-page-title .poznote-page-title-name > :where(i, .lucide) {
    color: var(--fb-faint);
    font-size: var(--fb-icon);
}

/* The workspace next to it: the prototype's .chip */
:root:not(#fabbrain-resto) :where(.poznote-page-title-workspace, .settings-current-user-badge) {
    min-height: var(--fb-chip-height);
    padding: 0 var(--fb-space-5);
    border: 0;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-fill);
    box-shadow: none;
    color: var(--fb-text-2);
    font-size: var(--fb-text-sm);
    font-weight: var(--fb-weight-regular);
    letter-spacing: 0;
}

:root:not(#fabbrain-resto) :where(.poznote-page-title-workspace, .settings-current-user-badge):hover,
:root:not(#fabbrain-resto) .poznote-page-title-workspace[aria-expanded="true"] {
    background: var(--fb-active);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.poznote-page-title-workspace, .settings-current-user-badge) :where(i, .lucide) {
    color: var(--fb-faint);
    font-size: var(--fb-icon-xs);
}

/* The toolbar buttons of a page: the prototype's quiet .icon-btn */
:root:not(#fabbrain-resto) :where(.pz-toolbar-btn, .pz-search-toggle, .board-view-btn, .dashboard-filter-btn, .clear-filter-btn,
    .shared-filter-tree-actions button, .trash-empty-btn) {
    min-width: var(--fb-row-height);
    height: var(--fb-row-height);
    padding: 0 var(--fb-space-4);
    border: 0;
    border-radius: var(--fb-radius);
    background: transparent;
    box-shadow: none;
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
}

:root:not(#fabbrain-resto) :where(.pz-toolbar-btn, .pz-search-toggle, .board-view-btn, .dashboard-filter-btn, .clear-filter-btn,
    .shared-filter-tree-actions button, .trash-empty-btn):where(:hover, [aria-pressed="true"], [aria-expanded="true"], .active) {
    background: var(--fb-hover);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.pz-toolbar-btn, .pz-search-toggle, .board-view-btn, .dashboard-filter-btn, .clear-filter-btn, .trash-empty-btn) :where(i, .lucide) {
    color: inherit;
    font-size: var(--fb-icon-sm);
}

/* The page's empty trash: the red stays for the icon only */
:root:not(#fabbrain-resto) .trash-empty-btn {
    color: var(--fb-danger);
}

/* Counts beside a toolbar ("0 notas na lixeira"): muted text, no pill */
:root:not(#fabbrain-resto) :where(.trash-page-count, .tags-count, .shared-count, .page-count, .list-tags-count, .favorites-count) {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
    font-weight: var(--fb-weight-regular);
}

/* Empty states: muted text, a faint glyph, no disc */
:root:not(#fabbrain-resto) :where(.empty-state, .trash-empty, .no-notes, .no-results, .empty-message, .tags-empty, .shared-empty,
    .favorites-empty, .tasks-page-empty, .attachments-empty, .empty-trash-message, .trash-no-notes-text) {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--fb-muted);
    font-size: var(--fb-text-base);
}

:root:not(#fabbrain-resto) :where(.empty-state-icon, .empty-icon, .trash-empty-icon, .trash-no-notes-icon) {
    background: transparent;
    color: var(--fb-faint);
}

/* The floating buttons at the bottom right of a page (focus, page "…"):
   quiet, as on the note page */
:root:not(#fabbrain-resto) .pz-edge-stack .pz-edge-btn {
    width: var(--fb-row-height);
    height: var(--fb-row-height);
    border: 0;
    border-radius: var(--fb-radius);
    background: transparent;
    box-shadow: none;
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) .pz-edge-stack .pz-edge-btn:hover {
    background: var(--fb-hover);
    color: var(--fb-text);
}

/* ---- 7. Settings and the admin pages -------------------------------------- */

/* The section list: the tree's rows */
:root:not(#fabbrain-resto) .settings-nav-item {
    gap: var(--fb-space-gap-row);
    min-height: var(--fb-row-height);
    padding: var(--fb-space-3) var(--fb-space-5);
    border: 0;
    border-radius: var(--fb-radius-row);
    background: transparent;
    color: var(--fb-text-2);
    font-size: var(--fb-text-row);
    font-weight: var(--fb-weight-regular);
}

:root:not(#fabbrain-resto) .settings-nav-item:hover {
    background: var(--fb-hover);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.settings-nav-item.is-active, .settings-nav-item.active, .settings-nav-item[aria-current="true"], .settings-nav-item[aria-current="page"]) {
    background: var(--fb-active);
    color: var(--fb-text);
    font-weight: var(--fb-weight-regular);
}

:root:not(#fabbrain-resto) .settings-nav-item :where(i, .lucide) {
    color: var(--fb-faint);
    font-size: var(--fb-icon-sm);
}

/* Personal / Admin: the prototype's .seg */
:root:not(#fabbrain-resto) .settings-scope-switch {
    gap: var(--fb-space-1);
    padding: var(--fb-space-1);
    border: 0;
    border-radius: var(--fb-radius);
    background: var(--fb-fill);
}

:root:not(#fabbrain-resto) .settings-scope-option {
    border: 0;
    border-radius: var(--fb-radius-sm);
    background: transparent;
    color: var(--fb-muted);
    font-size: var(--fb-text-sm);
}

:root:not(#fabbrain-resto) :where(.settings-scope-option.is-active, .settings-scope-option[aria-selected="true"]) {
    background: var(--fb-surface-seg-on);
    box-shadow: var(--fb-shadow-seg);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) .settings-scope-option :where(i, .lucide) {
    color: inherit;
}

/* A section title: the prototype's h2 */
:root:not(#fabbrain-resto) :where(.settings-category-title, .settings-section-header) {
    padding-bottom: var(--fb-space-4);
    border-bottom: 0;
    color: var(--fb-text);
    font-size: var(--fb-text-h2);
    font-weight: var(--fb-weight-semibold);
    letter-spacing: var(--fb-tracking-h2);
}

/* Group labels: the tree's .sect (12px, muted, 500, not shouted) */
:root:not(#fabbrain-resto) :where(.settings-group-title, .settings-subsection-title, .admin-section-title) {
    color: var(--fb-muted);
    font-size: var(--fb-text-xs);
    font-weight: var(--fb-weight-medium);
    letter-spacing: 0;
    text-transform: none;
}

/* A group of setting rows: no frame, rows separated by hairlines */
:root:not(#fabbrain-resto) .settings-group {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:root:not(#fabbrain-resto) .settings-group > .home-card + .home-card,
:root:not(#fabbrain-resto) .settings-group > * + .home-card {
    border-top: var(--fb-hairline) solid var(--fb-line);
}

:root:not(#fabbrain-resto) .home-card {
    border: 0;
    border-radius: var(--fb-radius-row);
    background: transparent;
    box-shadow: none;
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) .home-card:hover {
    background: var(--fb-hover);
    box-shadow: none;
    transform: none;
}

:root:not(#fabbrain-resto) .home-card-title {
    color: var(--fb-text);
    font-size: var(--fb-text-base);
    font-weight: var(--fb-weight-regular);
}

/* The icon of a row: faint, no tinted tile */
:root:not(#fabbrain-resto) .home-card-icon {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) .home-card-icon :where(i, .lucide) {
    color: var(--fb-faint);
    font-size: var(--fb-icon);
}

/* The state of a row: a muted chip, not a green or red badge. A real
   warning keeps the red text (the default password, an error). */
:root:not(#fabbrain-resto) .setting-status {
    padding: var(--fb-space-1) var(--fb-space-4);
    border: 0;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-fill);
    color: var(--fb-text-2);
    font-size: var(--fb-text-sm);
    font-weight: var(--fb-weight-regular);
}

:root:not(#fabbrain-resto) .setting-status.disabled {
    background: var(--fb-fill);
    color: var(--fb-muted);
}

:root:not(#fabbrain-resto) :where(.setting-status.warning, .setting-status.danger, .setting-status.is-default, #change-password-card .setting-status.disabled) {
    background: var(--pz-danger-soft);
    color: var(--fb-danger);
}

/* A boolean row draws its state as a switch (settings.css): the switch keeps
   its shape, in the prototype's colours */
:root:not(#fabbrain-resto) .settings-toggle-card .setting-status {
    padding: 0;
    background: var(--fb-dot);
    color: transparent;
}

:root:not(#fabbrain-resto) .settings-toggle-card .setting-status.enabled {
    background: var(--fb-accent);
}

/* A section's grid of rows: no frame around the group */
:root:not(#fabbrain-resto) :where(.settings-with-nav .home-grid) {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* The help and pin icons of a row: faint until hovered */
:root:not(#fabbrain-resto) :where(.setting-help, .settings-card-pin) :where(i, .lucide) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) .home-card.is-pinned .settings-card-pin :where(i, .lucide) {
    color: var(--fb-accent);
}

/* Inline controls of a row (selects of language, time zone) */
:root:not(#fabbrain-resto) :where(.settings-inline-control, .settings-inline-select) {
    min-height: var(--fb-field-height);
    border: 0;
    border-radius: var(--fb-radius);
    background: var(--fb-surface-field);
    box-shadow: var(--fb-field-ring);
    color: var(--fb-text);
    font-size: var(--fb-text-ui);
}

/* The storage figures */
:root:not(#fabbrain-resto) .settings-storage-icon {
    background: transparent;
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) .settings-storage-value {
    color: var(--fb-text);
    font-weight: var(--fb-weight-semibold);
    font-variant-numeric: tabular-nums;
}

:root:not(#fabbrain-resto) :where(.settings-storage-meta, .settings-storage-detail, .settings-group-hint, .setting-description, .home-card-description) {
    color: var(--fb-muted);
}

/* Admin pages and the settings sub-pages: tables with row hairlines only */
:root:not(#fabbrain-resto) :where(.settings-shell, .admin-container, .users-container, .home-container) table {
    border: 0;
    border-collapse: collapse;
    background: transparent;
    box-shadow: none;
    font-size: var(--fb-text-base);
    font-variant-numeric: tabular-nums;
}

:root:not(#fabbrain-resto) :where(.settings-shell, .admin-container, .users-container, .home-container) :where(th, td) {
    padding: var(--fb-space-td) var(--fb-space-6) var(--fb-space-td) 0;
    border: 0;
    border-top: var(--fb-hairline) solid var(--fb-line);
    background: transparent;
    color: var(--fb-text);
    text-align: left;
}

:root:not(#fabbrain-resto) :where(.settings-shell, .admin-container, .users-container, .home-container) th {
    border-top: 0;
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
    font-weight: var(--fb-weight-medium);
}

:root:not(#fabbrain-resto) :where(.settings-shell, .admin-container, .users-container, .home-container) :where(thead, tr) {
    border: 0;
    background: transparent;
}

/* Frames of the sub-pages (Git, backups, AI, webhooks, import): the page is
   the ground; a section is separated by space and its heading, not boxed */
:root:not(#fabbrain-resto) :where(.settings-subpage-body, .card-container, .settings-section, .git-sync-section, .backup-section,
    .restore-section, .admin-card, .settings-panel, .webhook-card, .ai-settings-section, .restore-import-card,
    .backup-export-card, .import-card, .export-card) {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* The collapsible rows of a sub-page (AI, Git): rows on hairlines, their icon faint */
:root:not(#fabbrain-resto) :where(.settings-box + .settings-box) {
    border-top: var(--fb-hairline) solid var(--fb-line);
}

:root:not(#fabbrain-resto) :where(.settings-box, .settings-subpage-body) :where(h2, h3, h4, .settings-box-title) > :where(i, .lucide) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.config-hint, .settings-hint) :where(i, .lucide) {
    color: var(--fb-muted);
}

/* The graph's header: on the page ground */
:root:not(#fabbrain-resto) :where(.graph-head, .graph-toolbar, .graph-controls) {
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Table headers are labels, not shouted */
:root:not(#fabbrain-resto) :where(.settings-shell, .admin-container, .users-container, .home-container) th {
    letter-spacing: 0;
    text-transform: none;
}

/* Counters and states (users, activity): the prototype's .chip */
:root:not(#fabbrain-resto) :where(.badge, .users-stat-badge, .status-badge, .activity-action-badge, .user-status) {
    min-height: var(--fb-chip-height);
    padding: 0 var(--fb-space-4);
    border: 0;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-fill);
    color: var(--fb-text-2);
    font-size: var(--fb-text-sm);
    font-weight: var(--fb-weight-regular);
}

:root:not(#fabbrain-resto) :where(.badge-inactive, .badge-danger, .badge-error) {
    color: var(--fb-danger);
}

/* A drop zone: a dashed hairline, the quiet fill */
:root:not(#fabbrain-resto) :where(.drop-zone, .upload-area, .file-drop-area, .dropzone) {
    border: var(--fb-hairline) dashed var(--fb-dot);
    border-radius: var(--fb-radius-md);
    background: transparent;
    color: var(--fb-muted);
}

/* ---- 8. Lists and cards of the pages --------------------------------------- */

/* A row of a list page (shared items, folders, attachments, favourites): the tree's row */
:root:not(#fabbrain-resto) :where(.shared-note-item, .favorite-item, .attachment-list-item, .notes-manager-item, .mention-item) {
    border: 0;
    border-bottom: var(--fb-hairline) solid var(--fb-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.shared-note-item, .favorite-item, .attachment-list-item, .notes-manager-item, .mention-item):hover {
    background: var(--fb-hover);
}

:root:not(#fabbrain-resto) :where(.shared-note-item, .favorite-item, .attachment-list-item, .notes-manager-item) :where(.shared-folder-icon, .lucide-folder, .lucide-file-text, .lucide-file) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.folder-inline-action-btn, .folder-list-menu-btn, .shared-folder-toggle, .row-action-btn) {
    border: 0;
    border-radius: var(--fb-radius);
    background: transparent;
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.folder-inline-action-btn, .folder-list-menu-btn, .row-action-btn):hover {
    background: var(--fb-hover);
    color: var(--fb-text);
}

/* Cards (dashboard, tags, trash, favourites): a tile on the quiet fill, no
   frame, no lift; the icon faint */
:root:not(#fabbrain-resto) :where(.dash-card, .tag-card, .trash-notecard, .favorite-card, .board-card, .tag-item-card, .kanban-card) {
    border: 0;
    border-radius: var(--fb-radius-md);
    background: var(--fb-fill);
    box-shadow: none;
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.dash-card, .tag-card, .favorite-card, .board-card, .tag-item-card):hover {
    background: var(--fb-active);
    box-shadow: none;
    transform: none;
}

:root:not(#fabbrain-resto) :where(.dash-card-icon, .tag-card-icon) :where(i, .lucide),
:root:not(#fabbrain-resto) :where(.dash-card-icon, .tag-card-icon) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.dash-card-name, .dash-card-note-title, .tag-card-name) {
    color: var(--fb-text);
    font-weight: var(--fb-weight-medium);
}

:root:not(#fabbrain-resto) :where(.dash-card-count, .tag-count, .note-count-badge, .folder-count-badge) {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fb-muted); /* text: 4.5:1 or better (fix wave; --fb-faint is for glyphs only) */
    font-size: var(--fb-text-xs);
    font-variant-numeric: tabular-nums;
}

:root:not(#fabbrain-resto) :where(.dash-card-pin, .dash-card-meta, .board-card-date, .board-card-excerpt) {
    color: var(--fb-muted);
}

/* The trash: a note card is a row with its title and actions */
:root:not(#fabbrain-resto) .trash-notecard {
    background: transparent;
    border-bottom: var(--fb-hairline) solid var(--fb-line);
    border-radius: 0;
}

/* The tags of a tag page and of a note list: the prototype's .chip */
:root:not(#fabbrain-resto) :where(.tag, .tag-chip, .note-tag, .note-print-tag, .tag-pill) {
    min-height: var(--fb-chip-height);
    padding: 0 var(--fb-space-5);
    border: 0;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-fill);
    color: var(--fb-text-2);
    font-size: var(--fb-text-sm);
}

/* The progress bar of the tasks page and of a task list: a thin accent line */
:root:not(#fabbrain-resto) :where(.tasks-progress-bar, .tasklist-progress-bar, .progress-bar) {
    height: var(--fb-space-2);
    border: 0;
    border-radius: var(--fb-radius-bar);
    background: var(--fb-fill);
}

:root:not(#fabbrain-resto) :where(.tasks-progress-fill, .tasklist-progress-fill, .progress-bar-inner, .progress-fill) {
    border-radius: var(--fb-radius-bar);
    background: var(--fb-accent);
}

:root:not(#fabbrain-resto) :where(.tasklist-progress-label, .tasks-progress-label) {
    color: var(--fb-muted);
    font-size: var(--fb-text-xs);
}

/* The tasks page and the pages that share its shell: one ground (upstream
   paints a band behind the toolbar) */
:root:not(#fabbrain-resto) :where(.tasks-page-header, .tasks-page-toolbar, .dashboard-topbar, .shared-filter-bar, .trash-filter-bar) {
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* The graph: the page ground, quiet controls */
:root:not(#fabbrain-resto) :where(.graph-container, #graph-container, .graph-canvas-wrap) {
    border: 0;
    background: var(--fb-bg);
}

/* Revisions: two panes on the page ground, no frames; the note's table as in the note */
:root:not(#fabbrain-resto) :where(.revisions-sidebar, .revisions-main) {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:root:not(#fabbrain-resto) .revisions-sidebar {
    background: var(--fb-side);
}

:root:not(#fabbrain-resto) .revisions-main :where(table) {
    border: 0;
    border-collapse: collapse;
    font-size: var(--fb-text-base);
    font-variant-numeric: tabular-nums;
}

:root:not(#fabbrain-resto) .revisions-main :where(th, td) {
    padding: var(--fb-space-td) var(--fb-space-6) var(--fb-space-td) 0;
    border: 0;
    border-top: var(--fb-hairline) solid var(--fb-line);
    background: transparent;
    text-align: left;
}

:root:not(#fabbrain-resto) .revisions-main :where(th) {
    border-top: 0;
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
    font-weight: var(--fb-weight-medium);
}

:root:not(#fabbrain-resto) :where(.revisions-btn) {
    min-height: var(--fb-btn-height);
    padding: 0 var(--fb-space-gap-mi);
    border: 0;
    border-radius: var(--fb-radius-row);
    background: var(--fb-fill);
    color: var(--fb-text);
    font-size: var(--fb-text-ui);
    font-weight: var(--fb-weight-medium);
}

/* Side panel titles (revisions, the diary's outline, Element visibility): the tree's .sect */
:root:not(#fabbrain-resto) :where(.revisions-sidebar-title, .outline-title, .ui-custom-panel-title, .ui-custom-panel-header h2) {
    color: var(--fb-muted);
    font-size: var(--fb-text-xs);
    font-weight: var(--fb-weight-medium);
    letter-spacing: 0;
    text-transform: none;
}

/* The outline's current entry: the tree's active row, not a link */
:root:not(#fabbrain-resto) :where(.outline-nav-link.active) {
    background: var(--fb-active);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.dashboard-color-filter-btn, .toggle-outline-btn) {
    border: 0;
    border-radius: var(--fb-radius);
    background: transparent;
    color: var(--fb-muted);
}

/* Element visibility: counts in the faint figures of the tree */
:root:not(#fabbrain-resto) :where(.ui-custom-section-count, .ui-custom-count, .ui-custom-hidden-count) {
    border: 0;
    background: transparent;
    color: var(--fb-muted); /* text: 4.5:1 or better (fix wave; --fb-faint is for glyphs only) */
    font-size: var(--fb-text-xs);
    font-variant-numeric: tabular-nums;
}

/* Revisions: the list is the tree, the diff in the prototype's colours */
:root:not(#fabbrain-resto) :where(.revision-item, .revisions-list-item) {
    border: 0;
    border-radius: var(--fb-radius-row);
    background: transparent;
    color: var(--fb-text-2);
    font-size: var(--fb-text-row);
}

:root:not(#fabbrain-resto) :where(.revision-item, .revisions-list-item):hover {
    background: var(--fb-hover);
}

:root:not(#fabbrain-resto) :where(.revision-item.active, .revision-item.selected, .revisions-list-item.active) {
    background: var(--fb-active);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(ins, .diff-added, .diff-insert) {
    background: var(--fb-accent-soft);
    color: var(--fb-text);
    text-decoration: none;
}

:root:not(#fabbrain-resto) :where(del, .diff-removed, .diff-delete) {
    background: var(--pz-danger-soft);
    color: var(--fb-text-2);
    text-decoration-color: var(--fb-danger);
}

/* ---- 9. Login -------------------------------------------------------------- */

:root:not(#fabbrain-resto) .login-container {
    max-width: var(--fb-login-width);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* The mark: the rail's "F" tile, not upstream's blue logo */
:root:not(#fabbrain-resto) .login-header .logo {
    display: grid;
    place-items: center;
    width: var(--fb-search-height);
    height: var(--fb-search-height);
    margin: 0 auto var(--fb-space-7);
    border-radius: var(--fb-radius);
    background: var(--fb-text);
    color: var(--fb-bg);
    font-size: var(--fb-text-md);
    font-weight: var(--fb-weight-semibold);
    letter-spacing: var(--fb-tracking-logo);
    line-height: 1;
}

:root:not(#fabbrain-resto) .login-header .logo > * {
    display: none;
}

:root:not(#fabbrain-resto) .login-header .logo::before {
    content: var(--fb-mark-letter);
}

:root:not(#fabbrain-resto) .login-title {
    margin: 0 0 var(--fb-space-12);
    color: var(--fb-text);
    font-size: var(--fb-text-h1);
    font-weight: var(--fb-weight-semibold);
    letter-spacing: var(--fb-tracking-h2);
}

:root:not(#fabbrain-resto) .login-method-title {
    color: var(--fb-muted);
    font-size: var(--fb-text-xs);
    font-weight: var(--fb-weight-medium);
}

:root:not(#fabbrain-resto) .login-container :where(#username, #password, .totp-code-input) {
    width: 100%;
    min-height: var(--fb-ask-height);
    padding: 0 var(--fb-space-6);
    border-radius: var(--fb-radius-md);
    font-size: var(--fb-text-row);
}

:root:not(#fabbrain-resto) .login-container .password-toggle {
    border: 0;
    background: transparent;
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) .login-container .login-button {
    width: 100%;
    min-height: var(--fb-ask-height);
    border-radius: var(--fb-radius-md);
    font-size: var(--fb-text-row);
}

:root:not(#fabbrain-resto) .login-container :where(.remember-me-label, .account-select-intro, .totp-enroll-help) {
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
}

:root:not(#fabbrain-resto) .login-container .error {
    margin-top: var(--fb-space-3);
    color: var(--fb-danger);
    font-size: var(--fb-text-ui);
    text-align: left;
}

:root:not(#fabbrain-resto) .login-container :where(.admin-warning, .session-expired-notice) {
    margin-bottom: var(--fb-space-10);
    padding: var(--fb-space-6) var(--fb-space-7);
    text-align: left;
}

:root:not(#fabbrain-resto) .login-container :where(.account-option, .totp-copy-button) {
    border: 0;
    border-radius: var(--fb-radius-row);
    background: var(--fb-fill);
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.login-footer, .login-container > a, .login-link) {
    color: var(--fb-muted);
    font-size: var(--fb-text-ui);
}

/* ---- 11. Settings that no longer apply -------------------------------------
   The FabBrain look fixes these to the prototype's values (Tasks 1-3): the app
   font (Geist), the sidebar and note font sizes, the tree indentation, the
   note's centred width, the theme list (only light and dark exist), the
   workspace colour as accent, the two icon scales and the tree's offline dot.
   Their controls are hidden rather than left dead, in Settings, in Element
   visibility and in the tree's options menu; the stored values are untouched
   (FABBRAIN.md, "Tema FabBrain"). */
:root:not(#fabbrain-resto) :where(#main-font-card, #font-size-card, #note-width-card, #workspace-accent-card, #index-icon-scale-card,
    #icon-rail-scale-card, #sidebar-offline-marks-card, #theme-list-card),
:root:not(#fabbrain-resto) :where(.ui-custom-item:has(> input[data-ui-key="card:main-font-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:font-size-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:note-width-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:workspace-accent-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:index-icon-scale-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:icon-rail-scale-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:sidebar-offline-marks-card"]),
    .ui-custom-item:has(> input[data-ui-key="card:theme-list-card"])),
:root:not(#fabbrain-resto) :where(#sidebarTreeIndentSlider) {
    display: none;
}

/* ---- Legacy colours brought to the palette (fix wave) ----------------------
   The notes manager: titles in the text colour (a link by place, as the tree's
   rows), the kind glyphs faint like the tree's (upstream: teal, blue, green,
   purple). The Tasks page: a list's title in the text colour. A page title's
   glyph is faint on every page (the revisions page had the accent), and the
   dashboard's "home" crumb is muted. */
:root:not(#fabbrain-resto) :where(.nm-note-link, .tasks-note-header .note-name) {
    color: var(--fb-text);
}

:root:not(#fabbrain-resto) :where(.nm-note-link, .tasks-note-header .note-name):hover {
    color: var(--fb-text);
    text-decoration-color: var(--fb-dot);
}

:root:not(#fabbrain-resto) :where(.nm-note-type-icon, .nm-note-type-icon > i) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.revisions-title > i, .revisions-heading .lucide) {
    color: var(--fb-faint);
}

:root:not(#fabbrain-resto) :where(.bc-home, .bc-home > .lucide) {
    color: var(--fb-muted);
}

:root:not(#fabbrain-resto) :where(.revisions-menu, .revisions-state, .revisions-panel-actions) :where(.lucide) {
    color: var(--fb-muted);
}

/* A release dot in the settings list is the accent, as on the rail: the danger
   colour is kept for the security warning (fix wave) */
:root:not(#fabbrain-resto) :where(.settings-nav-item, .settings-category-title, .settings-sidebar) .update-badge {
    background: var(--fb-accent);
}
