/* === components/features/organizations/orgs_shared/orgs-shared.css === */
/*
 * orgs-shared.css — single source of truth for orgs UI primitives
 *
 * Naming: orgs- prefix (BEM-like) throughout.
 *   - Global style.css has a .btn primitive, but it uses border:none and
 *     double-dash BEM modifiers (--primary). Orgs buttons have a visible border
 *     and were historically defined locally per pane. Namespacing avoids
 *     collisions without touching global styles.
 *   - All pane/modal CSS files were updated to drop duplicates; they now
 *     contain only component-specific layout and overrides.
 *
 * Load order: this file BEFORE per-pane stylesheets so pane overrides win.
 */

/* ── Page heading ────────────────────────────────────────── */
.orgs-page-head { margin-bottom: 24px; }
.orgs-page-head .breadcrumb { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--font-size-xs); margin-bottom: 6px; }
.orgs-page-head .breadcrumb .material-symbols-rounded { font-size: 14px; opacity: .7; }
.orgs-page-head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.orgs-page-head .sub { color: var(--text-muted); font-size: var(--font-size-sm); margin-top: 4px; }
.orgs-page-head .head-row { display: flex; align-items: center; gap: 14px; }
.orgs-page-head .head-row .head-text { flex: 1; }

/* ── Card overrides ───────────────────────────────────────── */
.overview-pane .px-card,
.settings-pane .px-card,
.invites-pane .px-card,
.audit-pane .px-card {
  --px-card-bg: var(--surface);
  --px-card-radius: var(--radius-lg);
  --px-card-padding: 20px 24px;
  --px-card-header-sep: transparent;
  margin-bottom: 20px;
  overflow: visible;
}

/* ── Buttons ──────────────────────────────────────────────── */
.orgs-btn { padding: 7px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); cursor: pointer; font-size: var(--font-size-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: var(--transition); text-decoration: none; }
.orgs-btn:hover { background: var(--bg); border-color: var(--brand-muted); }
.orgs-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.orgs-btn:disabled:hover { background: var(--surface-alt); border-color: var(--border); }
.orgs-btn .material-symbols-rounded { font-size: 16px; }
.orgs-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--text-on-brand); }
.orgs-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.orgs-btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.orgs-btn--ghost:hover { background: var(--surface-alt); color: var(--text); border-color: transparent; }
.orgs-btn--danger { color: var(--error); border-color: var(--error-border); }
.orgs-btn--danger:hover { background: var(--error-bg); border-color: var(--error); }
.orgs-btn--sm { padding: 4px 9px; font-size: var(--font-size-xs); }

/* icon-only close/action button used inside modals */
.orgs-icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); }
.orgs-icon-btn:hover { background: var(--surface-alt); color: var(--text); }

/* ── Role pills ───────────────────────────────────────────── */
.orgs-role-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-full); background: var(--surface-alt); color: var(--text-muted); font-size: var(--font-size-xs); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: filter var(--transition), border-color var(--transition), box-shadow var(--transition); }
.orgs-role-pill:hover { filter: brightness(1.1); border-color: var(--border); box-shadow: var(--shadow-sm); }
.orgs-role-pill .material-symbols-rounded { font-size: 14px; }
.orgs-role-pill--owner  { background: var(--role-owner-bg); color: var(--role-owner-fg); }
.orgs-role-pill--admin  { background: var(--role-admin-bg); color: var(--role-admin-fg); }
.orgs-role-pill--editor { background: var(--brand-subtle);  color: var(--brand-accent); }
.orgs-role-pill--viewer { background: var(--surface-alt);   color: var(--text-muted); }
/* active state used in perms_modal where the pill toggles */
.orgs-role-pill--admin.active  { background: var(--role-admin-bg); color: var(--role-admin-fg); }
.orgs-role-pill--editor.active { background: var(--brand-subtle);  color: var(--brand-accent); }
.orgs-role-pill--viewer.active { background: var(--surface-alt);   color: var(--text-muted); }
.orgs-role-pill-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Modal scaffold ───────────────────────────────────────── */
.orgs-modal-bd { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 200; }
.orgs-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 480px; max-width: 90vw; color: var(--text); box-shadow: var(--shadow-md); }
.orgs-modal--wide { width: 600px; }
.orgs-modal__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.orgs-modal__head .title { flex: 1; font-size: var(--font-size-md); font-weight: 600; }
.orgs-modal__body { padding: 16px 20px; }
.orgs-modal__foot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); align-items: center; }

/* ── Form fields ──────────────────────────────────────────── */
.orgs-field { margin-bottom: 14px; }
.orgs-field label { display: block; font-size: var(--font-size-xs); font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.orgs-field input[type=text],
.orgs-field input[type=email],
.orgs-field input[type=password],
.orgs-field select,
.orgs-field textarea { width: 100%; padding: 9px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: inherit; font-size: var(--font-size-sm); outline: 0; transition: border-color var(--transition); }
.orgs-field input:focus,
.orgs-field select:focus,
.orgs-field textarea:focus { border-color: var(--border-focus); }
.orgs-field input:disabled { color: var(--text-muted); cursor: not-allowed; }
.orgs-field .hint { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 5px; }
.orgs-field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Avatar pile ──────────────────────────────────────────── */
.orgs-av-stack { display: flex; }
.orgs-av-stack .av { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-on-brand); margin-left: -6px; }
.orgs-av-stack .av:first-child { margin-left: 0; }
.orgs-av-stack .av.more { background: var(--surface-alt); color: var(--text-muted); }
.orgs-av-stack .empty { font-size: var(--font-size-xxs); color: var(--text-muted); }

/* ── Layout utilities ─────────────────────────────────────── */
/* spacer that absorbs leftover horizontal flex space, replacing inline
   `style="flex: 1;"` on `<span>` separators inside .orgs-modal__foot. */
.orgs-flex-spacer { flex: 1; }

/* ── Empty states ─────────────────────────────────────────── */
.orgs-empty-line { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 12px 0; font-size: var(--font-size-sm); justify-content: center; }
.orgs-empty-state { text-align: center; padding: 30px 16px; color: var(--text-muted); font-size: var(--font-size-sm); display: flex; flex-direction: column; gap: 12px; align-items: center; grid-column: 1 / -1; }

/* ── Team grid / card (shared by overview and teams panes) ── */
.orgs-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.orgs-team-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; position: relative; color: var(--text); }
.orgs-team-card .ribbon { height: 4px; border-radius: var(--radius-sm); margin: -16px -16px 14px; }
.orgs-team-card .head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.orgs-team-card .team-avatar { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-on-brand); font-weight: 800; font-size: 14px; flex-shrink: 0; }
.orgs-team-card .team-name { font-size: 14.5px; font-weight: 600; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgs-team-card .desc { font-size: var(--font-size-xs); color: var(--text-muted); line-height: 1.45; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.orgs-team-card .members-strip { display: flex; align-items: center; gap: 0; margin-top: 12px; }
.orgs-team-card .res-counts { margin-left: auto; display: flex; gap: 10px; font-size: var(--font-size-xxs); color: var(--text-muted); }
.orgs-team-card .res-counts span { display: inline-flex; align-items: center; gap: 3px; }
.orgs-team-card .res-counts .material-symbols-rounded { font-size: 13px; }

/* === components/layout/navbar/navbar.css === */
/* ── Navbar sidebar toggle ───────────────────────────────── */
.nav-sidebar-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cream);
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.nav-sidebar-toggle:hover { color: var(--text-on-brand); }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 1.5rem;
    height: 3.25rem;
    background: var(--brand);
    flex-shrink: 0;
}

.site-logo {
    height: 1.75rem;
    width: auto;
    display: block;
}

.nav-left {
    display: flex; align-items: center; gap: 1.5rem;
    justify-self: start;
}
.nav-right {
    display: flex; align-items: center; gap: 0.5rem;
    justify-self: end;
}

.nav-user-dropdown__pop form { margin: 0; }

.nav-theme-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cream);
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.nav-theme-toggle:hover { color: var(--text-on-brand); }

/* ── Navbar search button ────────────────────────────────── */
.nav-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem 0.375rem 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-md);
    color: var(--cream);
    cursor: pointer;
    font-family: inherit; font-size: 13px;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.nav-search-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-on-brand);
    border-color: rgba(255, 255, 255, 0.18);
}
.nav-search-btn__label { font-weight: 500; }
.nav-search-btn__kbd {
    font-family: inherit; font-size: 11px; font-weight: 600;
    padding: 1px 6px; border-radius: 4px;
    background: rgba(0, 0, 0, 0.18);
    color: var(--cream); opacity: 0.75;
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.4;
}

/* ── Navbar nav links (Chat, Documentos) ─────────────────── */
.nav-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: center;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--cream);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    /* These are <a> tags without href (they use hx-get), so the browser
       won't apply the default link cursor. Force it. */
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-on-brand);
}
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-on-brand);
}
.nav-link svg { flex-shrink: 0; }

/* ── User dropdown (right side) ──────────────────────────── */
/* Positioning context + outer scaffold (.popover, .popover--align-end,
   .popover__panel) lives in app/adapters/web/components/ui/popover/popover.css.
   Rules below only style the variant-specific surfaces. */
.nav-user-dropdown__trigger {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--cream);
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
}
.nav-user-dropdown__trigger:hover,
.nav-user-dropdown__trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-on-brand);
}
/* Suppress the default mouse-click outline; keep the keyboard focus ring
   painted by the .popover__trigger:focus-visible rule in popover.css. */
.nav-user-dropdown__trigger:focus { outline: none; box-shadow: none; }

.nav-user-dropdown__avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--cream);
    color: var(--brand);
    font-weight: 800;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.nav-user-dropdown__email {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-dropdown__caret { flex-shrink: 0; opacity: 0.8; }

.nav-user-dropdown__pop {
    /* Outer scaffold (position, border, shadow, z-index) lives in
       popover.css. Only variant-specific overrides here. */
    top: calc(100% + 6px);
    min-width: 240px;
    padding: 6px;
}
.nav-user-dropdown__item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background var(--transition), color var(--transition);
}
.nav-user-dropdown__item:hover { background: var(--surface-alt); color: var(--brand-accent); }
.nav-user-dropdown__item svg { flex-shrink: 0; }
.nav-user-dropdown__item .material-symbols-rounded { font-size: 1rem; flex-shrink: 0; }
.nav-user-dropdown__divider { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }

/* ── Orgs dropdown ───────────────────────────────────────── */
.nav-orgs-dropdown { position: relative; }
.nav-orgs-dropdown .nav-link-btn {
    background: transparent; border: 0; cursor: pointer;
    color: var(--cream); font: inherit;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: var(--font-size-sm); font-weight: 600;
    transition: background var(--transition), color var(--transition);
}
.nav-orgs-dropdown .nav-link-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-on-brand); }
.nav-orgs-dropdown .nav-link-btn.is-active { background: rgba(255,255,255,0.16); color: var(--text-on-brand); }
/* Suppress the default mouse-click outline; keep the keyboard focus ring.
   (This block targets a legacy nav-orgs-dropdown still present in stylesheet
   ordering; safe to leave through the popover migration.) */
.nav-orgs-dropdown .nav-link-btn:focus { outline: none; box-shadow: none; }
.nav-orgs-dropdown .nav-link-btn:active { transform: none; }
.nav-orgs-dropdown .nav-link-btn svg { flex-shrink: 0; }

.nav-orgs-dropdown__pop {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 280px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 6px;
    box-shadow: var(--shadow-md); z-index: 100;
}
.nav-orgs-dropdown__item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; cursor: pointer;
}
.nav-orgs-dropdown__item:hover { background: var(--surface-alt); }
.nav-orgs-dropdown__item.is-current { background: var(--brand-subtle); color: var(--brand-accent); }
.nav-orgs-dropdown__avatar {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    color: #1A2110; font-weight: 800; font-size: 12px;
    flex-shrink: 0;
}
.nav-orgs-dropdown__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-orgs-dropdown__name { font-size: 13.5px; font-weight: 600; }
.nav-orgs-dropdown__role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.nav-orgs-dropdown__loading,
.nav-orgs-dropdown__empty { padding: 12px; color: var(--text-muted); font-size: 13px; text-align: center; }
.nav-orgs-dropdown__divider { height: 1px; background: var(--border); margin: 4px 6px; }
.nav-orgs-dropdown__create {
    width: 100%; text-align: left; background: transparent; border: 0;
    padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted); font-size: 13px; font-weight: 600;
    font-family: inherit;
}
.nav-orgs-dropdown__create:hover { background: var(--surface-alt); color: var(--text); }
.nav-orgs-dropdown__current-avatar {
    width: 1.25rem; height: 1.25rem; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    color: #1A2110; font-weight: 800; font-size: 0.7rem;
    flex-shrink: 0;
}
.nav-orgs-dropdown__current-name {
    font-weight: 600; max-width: 180px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* ── team switcher ─────────────────────────────────────── */
.nav-team-dropdown { position: relative; }
.nav-team-dropdown__label {
    font-weight: 600; max-width: 140px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.nav-team-dropdown__pop {
    position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 220px; max-height: 360px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 4px; z-index: 50;
}
.nav-team-dropdown__group {
    padding: 6px 10px 4px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted);
}
.nav-team-dropdown__item {
    width: 100%; text-align: left; background: transparent; border: 0;
    padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; color: var(--text); font-size: 13px;
    font-family: inherit;
}
.nav-team-dropdown__item:hover { background: var(--surface-alt); }
.nav-team-dropdown__item.is-current { font-weight: 700; color: var(--accent); }
.nav-team-dropdown__name {
    flex: 1; min-width: 0; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

/* ── nav-active-org ──────────────────────────────────────────────── */
/* Triggers share the .nav-link shape so the navbar reads as one row. */
.nav-active-org__trigger,
.nav-team-filter__trigger {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent; border: 0;
    border-radius: var(--radius-md);
    color: var(--cream);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-sm); font-weight: 600;
    transition: background var(--transition), color var(--transition);
    max-width: 22rem;
}
.nav-team-filter__trigger { max-width: 14rem; }
.nav-active-org__trigger:hover,
.nav-team-filter__trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-on-brand);
}
.nav-active-org__trigger > svg,
.nav-team-filter__trigger > svg { flex-shrink: 0; }

/* nav-active-org outer scaffold lives in popover.css. */
.nav-active-org__badge {
    display: inline-block; flex-shrink: 0; max-width: 12rem;
    padding: 1px 10px; border-radius: 9999px;
    color: #1a1a1a; font-size: 12px; font-weight: 600; line-height: 1.5;
    border: 1px solid rgba(0, 0, 0, 0.15);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    vertical-align: middle;
}
/* Avatar in the trigger — hidden by default; only the small-screen
   rule swaps it in when the badge is hidden. */
.nav-active-org__trigger-avatar {
    display: none;
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    align-items: center; justify-content: center;
    color: #1a1a1a; font-size: 0.7rem; font-weight: 800;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0; text-transform: uppercase;
}
.nav-active-org__placeholder { color: var(--cream); }
.nav-active-org__pop {
    /* Variant overrides — outer scaffold in popover.css. */
    top: calc(100% + 6px);
    min-width: 260px; max-height: 360px; overflow-y: auto;
    padding: 6px;
}
.nav-active-org__row {
    display: flex; align-items: stretch; gap: 2px;
    border-radius: var(--radius-sm);
}
.nav-active-org__row:not(.is-current):hover { background: var(--surface-alt); }
.nav-active-org__row.is-current { background: var(--brand-subtle); }
.nav-active-org__pick.is-static { cursor: default; }
.nav-active-org__switch { flex: 1 1 auto; min-width: 0; margin: 0; }
.nav-active-org__pick {
    width: 100%; text-align: left; background: transparent; border: 0;
    padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    color: var(--text); font-size: 13px; font-family: inherit;
}
.nav-active-org__row.is-current .nav-active-org__pick {
    color: var(--brand-accent); font-weight: 600;
}
.nav-active-org__avatar {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.nav-active-org__meta {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.nav-active-org__name-text {
    font-size: 13.5px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-active-org__role {
    font-size: 11px; color: var(--text-muted);
    text-transform: capitalize;
}
.nav-active-org__check { color: var(--brand-accent); flex-shrink: 0; }
.nav-active-org__nav {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px; border-radius: var(--radius-sm);
    color: var(--text-muted); text-decoration: none;
    flex-shrink: 0;
}
.nav-active-org__nav:hover { background: rgba(0, 0, 0, 0.06); color: var(--text); }
.nav-active-org__divider { height: 1px; background: var(--border); margin: 4px 6px; }
.nav-active-org__create {
    width: 100%; text-align: left; background: transparent; border: 0;
    padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted); font-size: 13px; font-family: inherit;
}
.nav-active-org__create:hover { background: var(--surface-alt); color: var(--text); }

/* ── nav-team-filter ─────────────────────────────────────────────── */
/* Outer scaffold (.popover, .popover__panel positioning, border, shadow,
   z-index) lives in popover.css. Variant-specific surfaces below. */
.nav-team-filter__chips {
    flex: 0 1 auto; min-width: 0;
    display: inline-flex; align-items: center; gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
    line-height: 1.6;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}
.nav-team-filter__chips::-webkit-scrollbar { display: none; }
.nav-team-filter__chips.is-overflowing {
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 1rem), transparent);
            mask-image: linear-gradient(to right, black calc(100% - 1rem), transparent);
}
.nav-team-filter__chip {
    flex-shrink: 0;
    padding: 1px 8px; border-radius: 9999px;
    color: #1a1a1a; font-size: 11px; font-weight: 600; line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.15);
    max-width: 10rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-team-filter__placeholder {
    color: var(--cream); font-style: italic; opacity: 0.75;
    white-space: nowrap;
}
.nav-team-filter__pop {
    /* Variant overrides — outer scaffold lives in popover.css. */
    top: calc(100% + 6px);
    min-width: 260px; padding: 12px;
}
.nav-team-filter__hint {
    margin-bottom: 8px; color: var(--text-muted); font-size: 12px;
}
.nav-team-filter__options {
    display: flex; flex-direction: column; gap: 4px;
    margin-bottom: 12px; max-height: 18rem; overflow-y: auto;
}
.nav-team-filter__option {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 6px; border-radius: var(--radius-sm); cursor: pointer;
    color: var(--text); font-size: 13px;
}
.nav-team-filter__option:hover { background: var(--surface-alt); }
.nav-team-filter__swatch {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15); flex-shrink: 0;
}
.nav-team-filter__name { flex: 1; }
.nav-team-filter__actions {
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Responsive ────────────────────────────────────────────
   Kept at the end of the file so per-feature `.nav-team-filter__chips`
   etc. don't override these `display: none` rules via source order. */

/* Medium (≤1200px): collapse right cluster + search to icons; keep
   center nav labels and the org badge. Chevrons stay visible as a
   dropdown affordance on the team-filter and org triggers. */
@media (max-width: 1200px) {
    .navbar { padding: 0 1rem; }

    .nav-search-btn { padding: 0.375rem 0.5rem; }
    .nav-search-btn__label,
    .nav-search-btn__kbd { display: none; }

    .nav-team-filter__chips { display: none; }
    .nav-team-filter__trigger { padding: 0.375rem 0.5rem; }

    .nav-user-dropdown__email,
    .nav-user-dropdown__caret { display: none; }
    .nav-user-dropdown__trigger { padding: 4px; }

    .nav-active-org__badge { max-width: 8rem; }
}

/* Small (≤768px): nav links go icon-only with title tooltips and
   the org badge swaps to a circular initials avatar. */
@media (max-width: 768px) {
    .navbar { padding: 0 0.5rem; }
    .nav-left { gap: 0.75rem; }

    .nav-link { padding: 0.375rem 0.5rem; gap: 0; font-size: 0; }
    .nav-link svg { font-size: initial; }

    .nav-active-org__badge { display: none; }
    .nav-active-org__trigger-avatar { display: inline-flex; }
}

/* === components/layout/app_shell/app-shell.css === */
/* app-shell.css */
/* Layout extracted from per-page page CSS; previously duplicated across
   docs_page.css / forms_page.css / orgs_page.css / etc. */

/* Skip-to-content link — keyboard users can jump past the navbar/sidebar
   straight into <main id="app-content">. Hidden off-screen by default,
   appears on :focus. */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand);
    color: var(--text-on-brand);
    padding: 0.5rem 1rem;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus {
    top: 0;
}

/* body.page-body is `display: flex; flex-direction: column; height: 100dvh; overflow: hidden`
   (see static/style.css). Navbar sits above; app-shell takes the remaining vertical
   space exactly. `min-height: 0` lets the inner overflow-auto regions actually scroll. */
.app-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.app-main__primary {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#app-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sidebar-backdrop { display: none; }

@media (max-width: 768px) {
    #sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: var(--z-modal-backdrop);
        background: var(--backdrop-modal);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
    }
    #sidebar-backdrop.sidebar-backdrop--visible {
        opacity: 1;
        pointer-events: auto;
    }
}

/* === components/layout/sidebar_shell/sidebar-shell.css === */
/* SidebarShell — shared layout for /chat and /docs sidebars.
   Domain-specific styles live in each consumer's own CSS. */

.sidebar {
    width: 260px;
    flex-shrink: 0;
    align-self: stretch;          /* explicit — fight any inherited align-items override */
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 200ms ease, opacity 200ms ease;
}

.sidebar--closed {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

/* Pre-paint collapse — set by an inline script in <head> when localStorage
   says the sidebar should start closed. Cleared by x-init once Alpine
   hydrates, after which `.sidebar--closed` is the sole source of truth.
   `transition: none` avoids a flash if Alpine's class lands a frame late. */
html[data-sidebar-initial="closed"] .sidebar {
    width: 0;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

/* Persistent inner wrapper — also a flex column so the footer's
   `margin-top: auto` pins to the bottom of the aside, not just to
   the bottom of the body's content stack. */
#sidebar-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Shared chrome — every consumer SHOULD use these classes so /chat,
   /docs, and /forms sidebars share spacing, typography, and hover
   rhythm. Domain-specific bits (icon tiles, folder groups, conversation
   rows) live in each consumer's own CSS. */

.sidebar__header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar__footer {
    margin-top: auto;
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* ── "New X" button used by every header (Nova conversa /
   Novo documento + Nova pasta / Novo formulário) ───────────────── */
.sidebar-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--brand-subtle);
    color: var(--brand);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.sidebar-new-btn:hover {
    background: var(--brand-subtle);
    border-color: var(--brand-muted);
}
.sidebar-new-btn .material-symbols-rounded {
    font-size: 1.125rem;
}

/* ── Search input (used by docs + forms) ──────────────────────────── */
.sidebar-search {
    position: relative;
    margin: 0.5rem 0.5rem 0.25rem;
}
.sidebar-search-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}
.sidebar-search-input {
    width: 100%;
    padding: 0.375rem 0.5rem 0.375rem 2rem;
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-size-sm);
    outline: 0;
    transition: background var(--transition), border-color var(--transition);
}
.sidebar-search-input::placeholder { color: var(--text-muted); }
.sidebar-search-input:focus {
    border-color: var(--brand-muted);
    background: var(--surface);
}
.sidebar-search-input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.sidebar-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    width: 14px;
    margin-left: 0.25rem;
    cursor: pointer;
    border-radius: 50%;
    background:
        linear-gradient(45deg, transparent 45%, var(--text-muted) 45%, var(--text-muted) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, var(--text-muted) 45%, var(--text-muted) 55%, transparent 55%);
    background-color: var(--surface-alt);
    background-size: 60% 60%;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color var(--transition);
}
.sidebar-search-input::-webkit-search-cancel-button:hover {
    background:
        linear-gradient(45deg, transparent 45%, var(--brand) 45%, var(--brand) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, var(--brand) 45%, var(--brand) 55%, transparent 55%);
    background-color: var(--brand-subtle);
    background-size: 60% 60%;
    background-repeat: no-repeat;
    background-position: center;
}

/* ── Section label (chat "Administração", forms "Todos os
   formulários" — small uppercase muted divider) ───────────────── */
.sidebar-section-label {
    padding: 0.5rem 1rem 0.25rem;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Empty-list message (used by chat + forms) ────────────────────── */
.sidebar__empty {
    padding: 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
}
.sidebar__empty p { margin: 0; }

/* ── Footer link (Lixeira on /docs and /forms) ────────────────────── */
.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    transition: background var(--transition), color var(--transition);
}
.sidebar-footer-link:hover {
    background: var(--surface-alt);
    color: var(--text);
}
.sidebar-footer-link .material-symbols-rounded {
    font-size: 1.125rem;
}

/* ── Folder groups (used by /docs and /forms sidebars) ───────────── */
.folder-group { list-style: none; margin: 0.125rem 0; }
.folder-group-header {
    display: flex; align-items: center; gap: 0.375rem; width: 100%;
    padding: 0.375rem 0.5rem; border: 0; background: transparent;
    color: var(--text); cursor: pointer; border-radius: var(--radius-md);
    font-size: var(--font-size-sm); font-family: inherit; text-align: left;
    transition: background var(--transition);
}
.folder-group-header:hover { background: var(--surface-alt); }
.folder-group-chevron {
    transition: transform 150ms ease;
    color: var(--text-muted); flex-shrink: 0; font-size: 1rem;
}
.folder-group[data-collapsed="false"] > .folder-group-header > .folder-group-chevron {
    transform: rotate(90deg);
}
.folder-group-icon { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }
.folder-group-name {
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 600;
    user-select: none;
}
.folder-group-name[hidden] { display: none; }
.folder-group-name-input {
    flex: 1; min-width: 0;
    padding: 0.125rem 0.375rem;
    border: 1px solid var(--brand-muted); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font-family: inherit; font-size: var(--font-size-sm); font-weight: 600;
    outline: none;
}
.folder-group-name-input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}
.folder-group-name-input[hidden] { display: none; }
.folder-group-count {
    font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0;
    margin-left: -0.125rem;
}
.folder-group-header > .folder-group-action:first-of-type { margin-left: auto; }
.folder-group-action {
    width: 1.5rem; height: 1.5rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--text-muted);
    border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0;
    opacity: 0; transition: opacity var(--transition), background var(--transition), color var(--transition);
}
.folder-group-action .material-symbols-rounded { font-size: 1rem; }
.folder-group-action:hover { background: var(--surface-alt); color: var(--text); }
.folder-group-action--danger:hover { background: var(--error-bg); color: var(--error); }
.folder-group:hover .folder-group-action,
.folder-group-header:focus-within .folder-group-action { opacity: 1; }
.folder-group-docs {
    list-style: none; margin: 0; padding: 0 0 0 0.875rem;
    border-left: 1px solid var(--border); margin-left: 0.875rem;
}
.folder-group-docs[hidden] { display: none; }
.folder-group--unfiled > .folder-group-docs { padding-left: 0; border-left: 0; margin-left: 0; }

.folder-group-header--static { cursor: default; }
.folder-group-header--static:hover { background: transparent; }
.folder-group-header--static .folder-group-name { font-weight: 600; color: var(--text-muted); }

/* Hint row inside an empty unfiled bucket — gives the drop zone substance. */
.folder-group-empty-hint {
    list-style: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    margin: 0.25rem 0.5rem;
}

.folder-group.drag-over > .folder-group-header,
.folder-group--unfiled.drag-over { background: var(--brand-subtle); }

/* Empty named regions collapse so domains can opt out of header/footer
   without us emitting border/padding for an empty slot. */
.sidebar__header:empty,
.sidebar__footer:empty { display: none; }

/* ── Mobile overlay drawer ────────────────────────────────────────
   On narrow viewports the sidebar slides out from the left as an
   overlay drawer (instead of the desktop "shrink to width: 0"
   collapse). Lifted from the legacy chat-sidebar.css so all
   AppShell-hosted pages share the behaviour. */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 200;
        width: 260px;
        transform: translateX(0);
        transition: transform 200ms ease;
    }

    .sidebar--closed {
        width: 260px;
        opacity: 1;
        transform: translateX(-100%);
    }
}

/* === components/layout/sidebar_shell/primitives/item_row/item-row.css === */
/* item-row.css — visual rhythm matches features/library/.doc-row so
   nav-style sidebars (orgs) and file-style sidebars (library) feel
   like one component family. */
.sidebar-item { list-style: none; margin: 0.0625rem 0; }
.sidebar-item-link {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    color: var(--text); text-decoration: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sidebar-item-link:hover { background: var(--surface-alt); }
.sidebar-item--active > .sidebar-item-link {
    background: var(--brand-subtle); color: var(--brand);
}
.sidebar-item-icon {
    width: 2rem; height: 2rem;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--brand-accent);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sidebar-item-icon .material-symbols-rounded { font-size: 1.125rem; }
.sidebar-item--active > .sidebar-item-link .sidebar-item-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--text-on-brand);
}
.sidebar-item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 0.125rem; }
.sidebar-item-label {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 600;
}
.sidebar-item-meta { font-size: var(--font-size-xs); color: var(--text-muted); }
.sidebar-item-count {
    font-size: var(--font-size-xs); color: var(--text-muted); flex-shrink: 0;
    margin-left: auto;
}

/* === components/layout/sidebar_shell/primitives/identity_card/identity-card.css === */
/* identity-card.css — avatar swatch is delegated to <Avatar> (ui-avatar.css).
   The shared <Avatar> is circular, but in this card we want the existing
   rounded-square look (matches the legacy orgs-sidebar-avatar). */
.sidebar-identity-card {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--surface-alt);
}
.sidebar-identity-card .ui-avatar { border-radius: var(--radius-md); }
.sidebar-identity-meta { display: flex; flex-direction: column; min-width: 0; }
.sidebar-identity-primary {
    font-size: var(--font-size-sm); font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-identity-secondary {
    font-size: var(--font-size-xs); color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* === components/features/organizations/audit_pane/audit-pane.css === */
/* audit-pane — layout and pane-specific rules only.
   Shared primitives (buttons, page-head, empty-line) live in orgs-shared.css. */

.audit-pane #audit-events-card { --px-card-padding: 8px 24px; }
.audit-pane .audit-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.audit-pane .audit-row:last-child { border-bottom: 0; }
.audit-pane .audit-row .icw { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.audit-pane .audit-row .body { flex: 1; min-width: 0; }
.audit-pane .audit-row .desc { font-size: var(--font-size-sm); color: var(--text); line-height: 1.5; }
.audit-pane .audit-row .desc .strong { font-weight: 600; }
.audit-pane .audit-row .when { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 4px; }
.audit-pane .load-more { width: 100%; margin-top: 12px; padding: 10px; background: transparent; border: 1px dashed var(--border); color: var(--text-muted); border-radius: var(--radius-md); cursor: pointer; font-size: var(--font-size-sm); }

/* === components/features/organizations/create_org_modal/create-org-modal.css === */
/* create-org-modal — relies on AppModal scaffolding from orgs-shared.css. */

/* === components/features/organizations/danger_pane/danger-pane.css === */
/* danger-pane — layout and pane-specific rules only.
   Shared primitives (buttons, modal scaffold, page-head) live in orgs-shared.css. */

.danger-pane .card.danger-zone { background: var(--surface); border: 1px solid var(--error-border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px; }
.danger-pane .card-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 8px; }
.danger-pane .card-head h2 { margin: 0; font-size: var(--font-size-md); font-weight: 600; color: var(--text); }
.danger-pane .card-head .sub { margin-top: 2px; font-size: var(--font-size-xs); color: var(--text-muted); }
.danger-pane .card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.danger-pane .hint { font-size: var(--font-size-xs); color: var(--text-muted); }
.danger-pane .warn { color: var(--error); font-size: var(--font-size-sm); line-height: 1.5; margin-bottom: 12px; }
.danger-pane .confirm-input { width: 100%; padding: 9px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--font-size-sm); outline: 0; font-family: ui-monospace, monospace; }
.danger-pane .confirm-input:focus { border-color: var(--error); }

/* === components/features/organizations/invite_modal/invite-modal.css === */
/* invite-modal — no modal-specific overrides needed beyond orgs-shared.css.
   All structure (scaffold, fields, buttons) is provided by orgs-shared.css. */

/* === components/features/organizations/invites_pane/invites-pane.css === */
/* invites-pane — layout and pane-specific rules only.
   Shared primitives (buttons, role pills, page-head, etc.) live in orgs-shared.css. */

.invites-pane #invites-list-card { --px-card-padding: 12px 24px; }
.invites-pane .invite-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.invites-pane .invite-row:last-child { border-bottom: 0; }
.invites-pane .invite-row .av { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.invites-pane .invite-row .meta { flex: 1; min-width: 0; }
.invites-pane .invite-row .e { font-size: var(--font-size-sm); color: var(--text); }
.invites-pane .invite-row .s { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.invites-pane .invite-row .actions { display: flex; gap: 6px; }
.invites-pane .team-tag { display: inline-flex; align-items: center; gap: 4px; }
.invites-pane .team-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* === components/features/organizations/members_pane/members-pane.css === */
/* members-pane — layout and pane-specific rules only.
   Shared primitives (buttons, role pills, page-head, etc.) live in orgs-shared.css. */

.members-pane .members-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.members-pane .toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.members-pane .search-mini { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 5px 10px; flex: 0 0 320px; }
.members-pane .search-mini input { background: transparent; border: 0; color: var(--text); font-size: var(--font-size-sm); outline: 0; flex: 1; }
.members-pane .search-mini .material-symbols-rounded { color: var(--text-muted); font-size: 18px; }
.members-pane .filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-muted); font-size: var(--font-size-xs); cursor: pointer; text-decoration: none; }
.members-pane .filter-pill.active { border-color: var(--brand); color: var(--brand); }
.members-pane .filter-pill .material-symbols-rounded { font-size: 14px; }
.members-pane .counter { font-size: var(--font-size-xs); color: var(--text-muted); }
.members-pane .members-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); color: var(--text); }
.members-pane .members-table thead { background: var(--bg); }
.members-pane .members-table th { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 700; font-size: var(--font-size-xxs); letter-spacing: 0.06em; text-transform: uppercase; }
.members-pane .members-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.members-pane .members-table tr:hover td { background: var(--surface-alt); }
.members-pane .members-table tr.you td { background: var(--brand-subtle); }
.members-pane .person { display: flex; align-items: center; gap: 11px; }
.members-pane .person .av { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--text-on-brand); flex-shrink: 0; }
.members-pane .person .meta { min-width: 0; }
.members-pane .person .name { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.members-pane .person .name .you-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); background: var(--brand-subtle); color: var(--brand-accent); border: 1px solid var(--brand-muted); }
.members-pane .person .email { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 2px; }
.members-pane .role-pop { position: relative; }
.members-pane .role-pop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 50;
    min-width: 180px;
}
.members-pane .role-pop-menu .orgs-role-pill {
    justify-content: flex-start;
    width: 100%;
}
.members-pane .team-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.members-pane .team-role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-full); font-size: var(--font-size-xxs); cursor: pointer; }
.members-pane .team-role-chip:hover { background: var(--surface-alt); }
.members-pane .team-role-chip .dot { width: 8px; height: 8px; border-radius: 2px; }
.members-pane .team-role-chip .role-mini { font-weight: 600; color: var(--text-muted); }
.members-pane .team-role-chip .role-mini.admin { color: var(--role-admin-fg); }
.members-pane .team-role-chip .role-mini.editor { color: var(--brand-accent); }
.members-pane .team-role-chip .role-mini.viewer { color: var(--text-muted); }
.members-pane .no-teams { color: var(--text-muted); font-size: var(--font-size-xs); }
.members-pane .add-team-chip { width: 24px; height: 24px; border-radius: 50%; background: transparent; border: 1px dashed var(--border); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.members-pane .add-team-chip .material-symbols-rounded { font-size: 14px; }
.members-pane .last-active { font-size: var(--font-size-xs); color: var(--text-muted); }
.members-pane .row-actions { text-align: right; }
.members-pane .icon-btn { background: transparent; border: 0; cursor: pointer; padding: 6px; border-radius: 6px; color: var(--text-muted); }
.members-pane .icon-btn.danger:hover { color: var(--error); background: var(--error-bg); }

/* === components/features/organizations/org_switcher/org-switcher.css === */
/* org-switcher — switcher button, dropdown, and create-org modal.
   Shared primitives (orgs-btn, orgs-field, orgs-icon-btn, x-cloak) live in orgs-shared.css.
   Outer scaffold (.popover positioning, .popover__panel border/shadow)
   lives in app/adapters/web/components/ui/popover/popover.css. */

.org-switcher { margin-left: auto; }
.org-switcher-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: var(--text-on-brand); padding: 5px 10px 5px 6px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: var(--font-size-sm); font-weight: 600;
}
.org-switcher-btn:hover { background: rgba(255,255,255,.14); }
.org-switcher .org-avatar {
  width: 24px; height: 24px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: var(--text-on-brand);
}
.org-switcher-pop {
  /* Variant overrides — outer scaffold lives in popover.css. */
  top: calc(100% + 6px);
  min-width: 280px; padding: 6px;
}
.org-switcher-pop .item {
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
}
.org-switcher-pop .item:hover { background: var(--surface-alt); }
.org-switcher-pop .item .org-avatar { width: 30px; height: 30px; border-radius: 6px; font-size: 13px; }
.org-switcher-pop .item .meta { flex: 1; min-width: 0; }
.org-switcher-pop .item .name { font-size: var(--font-size-sm); font-weight: 600; }
.org-switcher-pop .item .sub { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 2px; }
.org-switcher-pop .item .check { color: var(--brand); }
.org-switcher-pop .divider { height: 1px; background: var(--border); margin: 4px 6px; }
.org-switcher-pop .new-org {
  width: 100%; text-align: left; background: transparent; border: 0;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: var(--font-size-sm); font-weight: 600;
}
.org-switcher-pop .new-org:hover { background: var(--surface-alt); color: var(--text); }

/* === components/features/organizations/overview_pane/overview-pane.css === */
/* overview-pane — layout and pane-specific rules only.
   Shared primitives (buttons, cards, role pills, av-stack, etc.) live in orgs-shared.css. */

.overview-pane .stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
.overview-pane .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
.overview-pane .stat .icw { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-alt); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--brand-muted); flex-shrink: 0; }
.overview-pane .stat .v { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.overview-pane .stat .lab { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

.overview-pane .invite-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.overview-pane .invite-row:last-child { border-bottom: 0; }
.overview-pane .invite-row .av { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.overview-pane .invite-row .meta { flex: 1; min-width: 0; }
.overview-pane .invite-row .e { font-size: var(--font-size-sm); color: var(--text); }
.overview-pane .invite-row .s { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.overview-pane .team-tag { display: inline-flex; align-items: center; gap: 4px; }
.overview-pane .team-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Role distribution bar — the segment background / colour / flex grow
   come from CSS custom properties set on the segment element so the
   template never carries presentational literals. */
.overview-pane__role-dist { display: flex; width: 100%; min-height: 40px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.overview-pane__role-dist-seg { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; font-size: var(--font-size-xs); font-weight: 600; min-width: 0; background: var(--seg-bg, var(--surface-alt)); color: var(--seg-fg, var(--text-muted)); flex: var(--seg-flex, 0); }
.overview-pane__role-dist-seg:not(:last-child) { border-right: 1px solid var(--border); }
.overview-pane__role-dist-seg[style*="--seg-flex: 0"] { flex: 0 0 0; padding: 0; border-right: 0; overflow: hidden; }
.overview-pane__role-dist-label { text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-pane__role-dist-count { font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Inline activity rows reuse the audit-pane .audit-row styling. Tighten the
   vertical rhythm so the overview card stays compact. */
.overview-pane__activity .audit-row { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; gap: 14px; }
.overview-pane__activity .audit-row:last-child { border-bottom: 0; }
.overview-pane__activity .audit-row .icw { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.overview-pane__activity .audit-row .icw .material-symbols-rounded { font-size: 16px; }
.overview-pane__activity .audit-row .body { flex: 1; min-width: 0; }
.overview-pane__activity .audit-row .desc { font-size: var(--font-size-sm); color: var(--text); line-height: 1.45; }
.overview-pane__activity .audit-row .when { font-size: var(--font-size-xxs); color: var(--text-muted); margin-top: 3px; }

@media (max-width: 1100px) {
    .overview-pane .stat-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .overview-pane .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* === components/features/organizations/perms_modal/perms-modal.css === */
/* perms-modal — modal-specific rules only.
   Modal scaffold, buttons, and role pills live in orgs-shared.css. */

.orgs-modal .hint-block { font-size: var(--font-size-sm); color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.orgs-modal .perms-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.orgs-modal .perms-table th,
.orgs-modal .perms-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; }
.orgs-modal .perms-table th { background: var(--bg); color: var(--text-muted); font-size: var(--font-size-xxs); text-transform: uppercase; letter-spacing: 0.06em; }
.orgs-modal .team-cell { display: flex; align-items: center; gap: 10px; }
.orgs-modal .team-cell .team-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.orgs-modal .team-cell .team-name { font-weight: 600; color: var(--text); }

/* === components/features/organizations/rag_trace_detail_pane/rag-trace-detail-pane.css === */
.rag-trace-detail-pane { padding: 1rem; max-width: 960px; margin: 0 auto; }
.rag-trace-detail-pane__header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.rag-trace-detail-pane__meta { display: flex; gap: 1rem; align-items: baseline; color: var(--text-muted); font-size: var(--font-size-sm); margin-bottom: 0.5rem; }
.rag-trace-detail-pane__trace-id { font-family: var(--font-mono, monospace); }
.rag-trace-detail-pane__actor { display: flex; gap: 1.5rem; font-size: var(--font-size-sm); margin-bottom: 0.75rem; }
.rag-trace-detail-pane__question-label { margin: 0 0 4px 0; font-size: var(--font-size-sm); color: var(--text-muted); font-weight: 500; }
.rag-trace-detail-pane__question p { margin: 0; }
.rag-trace-detail-pane__section { margin-bottom: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.rag-trace-detail-pane__section summary { padding: 0.75rem 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rag-trace-detail-pane__section[open] summary { border-bottom: 1px solid var(--border); }
.rag-trace-detail-pane__section-title { font-weight: 600; }
.rag-trace-detail-pane__duration { color: var(--text-muted); font-size: var(--font-size-sm); }
.rag-trace-detail-pane__hint { color: var(--text-muted); font-size: var(--font-size-sm); font-style: italic; }
.rag-trace-detail-pane__table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.rag-trace-detail-pane__table th, .rag-trace-detail-pane__table td { padding: 0.5rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.rag-trace-detail-pane__table th { color: var(--text-muted); font-weight: 500; }
.rag-trace-detail-pane__kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 1rem; padding: 0.75rem 1rem; margin: 0; }
.rag-trace-detail-pane__kv dt { color: var(--text-muted); font-size: var(--font-size-sm); }
.rag-trace-detail-pane__kv dd { margin: 0; }
.rag-trace-detail-pane__response-text { padding: 0.75rem 1rem; white-space: pre-wrap; }
.rag-trace-detail-pane__citations { padding: 0 1rem 0.75rem 1rem; color: var(--text-muted); font-size: var(--font-size-sm); }
.rag-trace-detail-pane__citation { font-family: var(--font-mono, monospace); margin-right: 4px; }
.rag-trace-detail-pane__feedback { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; }
.rag-trace-detail-pane__feedback .vote-up { color: var(--success); }
.rag-trace-detail-pane__feedback .vote-down { color: var(--error); }
.rag-trace-detail-pane__payload { margin: 0; padding: 0.75rem 1rem; font-family: var(--font-mono, monospace); font-size: var(--font-size-sm); white-space: pre-wrap; }
.rag-trace-detail-pane__empty { color: var(--text-muted); padding: 0.75rem 1rem; }

.rag-trace-detail-pane__rerank-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-family: var(--font-mono, monospace);
    font-size: var(--font-size-sm);
}
.rag-trace-detail-pane__rerank-table th,
.rag-trace-detail-pane__rerank-table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}
.rag-trace-detail-pane__rerank-row--kept { background: var(--brand-subtle); }
.rag-trace-detail-pane__rerank-cut td {
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    border-top: 2px dashed var(--border);
    border-bottom: 2px dashed var(--border);
    padding: 0.25rem 0;
}
.rag-trace-detail-pane__rerank-delta--up { color: var(--brand); }
.rag-trace-detail-pane__rerank-delta--down { color: var(--error); }
.rag-trace-detail-pane__rerank-delta--zero { color: var(--text-muted); }
.rag-trace-detail-pane__mode-badge {
    display: inline-block;
    padding: 0 0.4rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rag-trace-detail-pane__mode-badge--shadow { background: var(--brand-subtle); color: var(--brand-accent); }
.rag-trace-detail-pane__mode-badge--active { background: var(--brand); color: var(--text-on-brand); }
.rag-trace-detail-pane__hint--error { color: var(--error); }
.rag-trace-detail-pane .px-tooltip { --px-tooltip-max-width: 32ch; }
.rag-trace-detail-pane__retrieval-row { cursor: pointer; }
.rag-trace-detail-pane__retrieval-row:hover { background: var(--brand-subtle); }
.rag-trace-detail-pane__retrieval-expansion > td { padding: 0; background: var(--surface-alt); border-bottom: 2px solid var(--border); }
.rag-trace-detail-pane__chunk-expansion { padding: 0.75rem 1rem; }
.rag-trace-detail-pane__chunk-text pre { margin: 0; white-space: pre-wrap; font-family: var(--font-mono, monospace); font-size: var(--font-size-sm); }
.rag-trace-detail-pane__chunk-meta { color: var(--text-muted); font-size: var(--font-size-xs); margin-bottom: 0.5rem; }
.rag-trace-detail-pane__tool-chip {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--brand-subtle);
    color: var(--brand-accent);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-family: var(--font-mono, monospace);
    margin: 0 0.15rem 0.15rem 0;
}

/* === components/features/organizations/rag_traces_pane/rag-traces-pane.css === */
.rag-traces-pane { padding: 1rem; }
.rag-traces-pane__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.rag-traces-pane__title { font-family: var(--font-display); font-size: 22px; margin: 0; }
.rag-traces-pane__filters { display: inline-flex; gap: 0.25rem; align-items: center; }
.rag-traces-pane .filter-chip { padding: 0.25rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-full); cursor: pointer; font-size: var(--font-size-sm); color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.rag-traces-pane .filter-chip.is-active { background: var(--surface-alt); border-color: var(--brand); color: var(--text); }
.rag-traces-pane .filter-chip .material-symbols-rounded { font-size: 16px; }
.rag-traces-pane__table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.rag-traces-pane__table th { text-align: left; font-weight: 500; padding: 0.5rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.rag-traces-pane__table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.rag-traces-pane__table td.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rag-traces-pane__table .vote-up { color: var(--success, #2ea043); }
.rag-traces-pane__table .vote-down { color: var(--error, #d1242f); }
.rag-traces-pane__row { cursor: pointer; }
.rag-traces-pane__row:hover { background: var(--brand-subtle); }
.rag-traces-pane__expansion > td { padding: 0; background: var(--surface-alt); border-bottom: 2px solid var(--border); }
.rag-traces-pane__expansion-inner { padding: 1rem; }
.rag-traces-pane__more { margin-top: 1rem; width: 100%; padding: 10px; background: transparent; border: 1px dashed var(--border); color: var(--text-muted); border-radius: var(--radius-md); cursor: pointer; font-size: var(--font-size-sm); }
.rag-traces-pane__empty { color: var(--text-muted); padding: 2rem; text-align: center; }

/* === components/features/organizations/settings_pane/settings-pane.css === */
/* settings-pane — layout and pane-specific rules only.
   Shared primitives (buttons, cards, fields, page-head) live in orgs-shared.css. */

.settings-pane .logo-upload { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.settings-pane .logo-upload .preview { width: 64px; height: 64px; border-radius: var(--radius-lg); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: var(--text-on-brand); flex-shrink: 0; }
.settings-pane .logo-upload .logo-meta .title { font-size: var(--font-size-sm); font-weight: 600; color: var(--text); }
.settings-pane .logo-upload .logo-meta .hint { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 3px; margin-bottom: 8px; }
.settings-pane .toggle-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 10px; }
.settings-pane .toggle-row .body { flex: 1; }
.settings-pane .toggle-row .body .lab { font-size: var(--font-size-sm); color: var(--text); font-weight: 600; }
.settings-pane .toggle-row .body .desc { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.settings-pane .toggle-row .body .warn { font-size: var(--font-size-xs); color: var(--error); margin-top: 6px; }
.settings-pane .toggle { width: 38px; height: 22px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-full); position: relative; cursor: pointer; transition: background var(--transition); flex-shrink: 0; }
.settings-pane .toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: all var(--transition); }
.settings-pane .toggle.on { background: var(--brand-muted); border-color: var(--brand-muted); }
.settings-pane .toggle.on::after { left: 18px; background: var(--text-on-brand); }
.settings-pane .toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.settings-pane__form-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* === components/features/organizations/team_modal/team-modal.css === */
/* team-modal — modal-specific rules only.
   Modal scaffold, buttons, and fields live in orgs-shared.css. */

.orgs-modal .color-swatches { display: flex; gap: 8px; }
.orgs-modal .swatch { width: 32px; height: 32px; border-radius: var(--radius-md); border: 2px solid transparent; cursor: pointer; }
.orgs-modal .swatch.active { border-color: var(--text); }

/* === components/features/organizations/teams_pane/teams-pane.css === */
/* teams-pane — layout and pane-specific rules only.
   Shared primitives (buttons, team cards, av-stack, etc.) live in orgs-shared.css. */

/* add-team placeholder card — teams_pane-specific variant */
.orgs-team-card.add-team { border-style: dashed; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--text-muted); min-height: 156px; background: transparent; }
.orgs-team-card.add-team:hover { border-color: var(--brand-muted); color: var(--text); }
.orgs-team-card.add-team .material-symbols-rounded { font-size: 24px; }

/* hover lift for clickable team cards in teams pane */
.teams-pane .orgs-team-card { cursor: default; transition: all var(--transition); }
.teams-pane .orgs-team-card:hover { border-color: var(--brand); transform: translateY(-1px); }

/* team-menu button (three-dot in card head) */
.orgs-team-card .team-menu { width: 28px; height: 28px; border-radius: 7px; background: transparent; border: 0; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.orgs-team-card .team-menu:hover { background: var(--surface-alt); color: var(--text); }

/* footer action buttons inside team cards */
.orgs-team-card .footer-actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.orgs-team-card .footer-actions .orgs-btn { padding: 5px 8px; font-size: var(--font-size-xs); }

/* === components/ui/orgs_card_header/orgs-card-header.css === */
.orgs-card-header { display: flex; align-items: flex-end; gap: 14px; }
.orgs-card-header__text { flex: 1; min-width: 0; }
.orgs-card-header__title { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.005em; }
.orgs-card-header__sub { margin-top: 2px; font-size: var(--font-size-xs); color: var(--text-muted); }
.orgs-card-header__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* === components/pages/home/home-page.css === */
/* page-body, .app-shell, .app-main, .app-main__primary, and the mobile
   sidebar backdrop now live in static/style.css so any page (chat, docs,
   …) gets the layout without depending on home-page.css being loaded. */

/* ── Chat sidebar conversation list ──────────────────────────────
   The legacy chat-sidebar.css component is gone now that the chat
   sidebar is composed via build_chat_sidebar_layout — the rules
   below were the chat-specific bits (the rest, including the mobile
   overlay drawer behaviour, lifted into sidebar-shell.css). */
#chat-sidebar-list { padding: 0.5rem 0; }

.conv-item {
    display: block;
    width: 100%;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text);
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.conv-item:hover { background: var(--surface-alt); }

.conv-item--active {
    background: var(--brand-subtle);
    color: var(--brand);
    font-weight: 600;
}

.conv-item--active:hover { background: var(--brand-subtle); }

.px-panel-trigger[aria-selected="true"] .conv-item {
    background: var(--brand-subtle);
    color: var(--brand);
    font-weight: 600;
}

.px-panel-trigger[aria-selected="true"] .conv-item:hover {
    background: var(--brand-subtle);
}

.conv-item__title {
    display: block;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-item.conv-item--icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Chat column: Panel host fills height so .chat-view can pin input to the
   bottom. The selectors target `#app-content > .px-panel` directly because
   AppShell wraps every page's content in `<div id="app-content">…</div>`,
   so the chat panel host sits one level deeper than the legacy
   `.app-main__primary > .px-panel` shape. Without these rules the panel
   host gets default `min-height: auto` and the input bar runs off the
   viewport bottom. */
#app-content > .px-panel {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

#app-content .px-panel__panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#app-content .px-panel__panel > .chat-view {
    flex: 1;
    min-height: 0;
}

/* ── Welcome dialog ──────────────────────────────────────── */
.welcome-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    padding: 0;
    width: min(580px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    outline: none;
}
.welcome-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.welcome-dialog__card {
    display: flex;
    flex-direction: column;
}
.welcome-dialog__body {
    padding: 1.5rem;
    overflow-y: auto;
}
.welcome-dialog__content {
    min-width: 0;
}
.welcome-dialog__intro {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.875rem;
}
.welcome-dialog__intro .welcome-dialog__alpha-banner {
    margin-bottom: 0;
}
.welcome-dialog__mascot {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.welcome-dialog__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.625rem;
    text-align: start;
}
.welcome-dialog__text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.6;
}
.welcome-dialog__section-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text);
    margin: 0.75rem 0 0.25rem;
}
.welcome-dialog__list {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.7;
}
.welcome-dialog__alpha-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.875rem;
    border-radius: var(--radius-md);
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.5;
}
.welcome-dialog__alpha-badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.1em 0.5em;
    border-radius: var(--radius-full);
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.4);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a16207;
    margin-top: 0.1em;
}
.welcome-dialog__info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-top: 0.625rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.5;
}
.welcome-dialog__info-badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.1em 0.5em;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1d4ed8;
    margin-top: 0.1em;
}
.welcome-dialog__actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* #sidebar-backdrop rules moved to static/style.css (shared by all pages). */

/* === components/pages/library/library-page.css === */
/* Library page — content pane host. Shell + body layout come from
   style.css / app-shell.css; only library-specific overrides here. */

.library-pane-host {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem;
}

.library-pane-host__placeholder {
    color: var(--text-muted);
}

/* ── Sidebar tree ─────────────────────────────────────────────────── */

.library-sidebar-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.library-folder-group,
.library-folder-node {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 3px solid transparent;
    transition: border-color var(--transition);
}

.library-folder-group__label {
    display: block;
    padding: 0.5rem 0.875rem 0.25rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.library-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ── Folder node (recursive <details>) ───────────────────────────── */

.library-folder-node[open] > .library-folder-node__summary .library-folder-node__chevron {
    transform: rotate(90deg);
}

.library-folder-node__summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    color: var(--text);
    font-weight: 600;
    font-size: var(--font-size-sm);
    user-select: none;
    transition: background var(--transition);
    list-style: none;
}

/* Hide native disclosure triangle (Webkit + standards-track). */
.library-folder-node__summary::-webkit-details-marker {
    display: none;
}
.library-folder-node__summary::marker {
    display: none;
    content: "";
}

.library-folder-node__summary:hover {
    background: var(--brand-subtle);
}

.library-folder-node__chevron {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.library-folder-node__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-folder-node__body {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.5rem;
}

/* === components/features/library/library_file_row/library-file-row.css === */
/* LibraryFileRow — visually identical to main's `.doc-row`. The class
   names re-use `doc-row*` so this CSS is the single source of truth
   (the legacy doc-row.css was deleted when the doc_row component was). */

.doc-row {
    list-style: none;
    border-left: 3px solid transparent;
    transition: background var(--transition), border-color var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    color: var(--text);
    text-decoration: none;
}
.doc-row:hover { background: var(--brand-subtle); }
.doc-row--active {
    background: var(--brand-subtle);
    border-left-color: var(--brand);
}
/* Drag-and-drop affordances. The .dragging class is applied to the
   row being dragged; .drag-over to the folder-group hovered as a
   drop target. Both are cleared on dragend. */
.doc-row[draggable="true"] {
    -webkit-user-drag: element;
}
.doc-row.dragging {
    opacity: 0.4;
}
.folder-group.drag-over {
    background: var(--brand-subtle);
    outline: 2px dashed var(--brand);
    outline-offset: -2px;
}

.doc-row-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--brand-accent);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.doc-row-icon .material-symbols-rounded { font-size: 1.125rem; }
.doc-row--active .doc-row-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--text-on-brand);
}

.doc-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.doc-row-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    min-width: 0;
}
.doc-row-author,
.doc-row-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-row-avatar {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand);
    color: var(--text-on-brand);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}
.doc-row-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Kind label inside the meta row — same neutral chip style on hover/active. */
.doc-row-kind {
    flex-shrink: 0;
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 0 0.375rem;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    color: var(--text-muted);
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.doc-row-kind--form {
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}

/* ── Novo dropdown (header create-menu) ───────────────────────── */
.sidebar-new-split {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex: 1 1 auto;
}
.sidebar-new-btn--main {
    flex: 1 1 auto;
    justify-content: center;
    position: relative;
}
.sidebar-new-btn__caret {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
}
.sidebar-new-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    padding: 0.25rem;
}
.sidebar-new-menu[hidden] { display: none; }
.sidebar-new-menu__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-align: left;
    transition: background var(--transition);
}
.sidebar-new-menu__item:hover { background: var(--brand-subtle); }
.sidebar-new-menu__item .material-symbols-rounded {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* === components/features/library/library_file_index_status/library-file-index-status.css === */
.library-file-index-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--text-muted);
    pointer-events: none;
}
.library-file-index-status .material-symbols-rounded {
    font-size: 1rem;
    line-height: 1;
}
.library-file-index-status--pending { color: var(--text-muted); }
.library-file-index-status--indexed { color: var(--brand); }
.library-file-index-status--failed  { color: var(--error); }

/* Stalled / failed — both render as a clickable button that re-enqueues
 * indexing. Stalled = DB says pending but the indexer worker isn't
 * actually processing this file (e.g. lost on restart). Failed = the
 * worker tried and errored out. Either way the affordance is the same:
 * pointer-events restored over the row's parent, explicit interactive
 * styling. The icon (refresh vs error) and label carry the distinction. */
button.library-file-index-status--stalled,
button.library-file-index-status--failed {
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--error);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
button.library-file-index-status--stalled:hover,
button.library-file-index-status--failed:hover {
    color: var(--brand);
    background: var(--brand-subtle);
}
button.library-file-index-status--stalled:focus-visible,
button.library-file-index-status--failed:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* === components/features/library/library_index_poller/library-index-poller.css === */
.library-index-poller { display: none; }

/* === components/features/library/library_trash_view/library-trash-view.css === */
/* LibraryTrashView — trash list of soft-deleted files. Re-uses the
   `.doc-row*` icon/body/title classes that ship with library_file_row,
   so the visual rhythm matches the live file rows on /library. The
   wrapper / preview / actions live under `.library-trash-view*`. */

.library-trash-view {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.library-trash-view__header {
    max-width: 900px;
    margin: 0 auto 1rem;
}

.library-trash-view__header h1 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text);
}

.library-trash-view__hint {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin: 0.25rem 0 0;
}

.library-trash-view__list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* The trash row inherits `.doc-row` (icon-box, body) but overrides
   the cursor and the row-click affordance (no row-level hx-get). */
.library-trash-view__row.doc-row {
    cursor: default;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.library-trash-view__row.doc-row:hover {
    background: var(--surface);
}

.library-trash-view__preview {
    display: block;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.45;
    margin: 0.25rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Allow up to 2 lines of preview before clipping. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.library-trash-view__actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
}

.library-trash-view__action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.library-trash-view__action:hover {
    background: var(--brand-subtle);
    border-color: var(--brand-muted);
}

.library-trash-view__action--purge {
    color: var(--error);
}

.library-trash-view__action--purge:hover {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

.library-trash-view__empty {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--surface-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
}

/* Typed-confirmation modal (mirrors danger_pane). */
.library-trash-view__warn {
    color: var(--error);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.library-trash-view__confirm-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: ui-monospace, monospace;
    outline: 0;
}
.library-trash-view__confirm-input:focus {
    border-color: var(--error);
}
.library-trash-view__confirm-input:focus-visible {
    outline: 2px solid var(--error);
    outline-offset: 1px;
}
.library-trash-view__action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === components/features/library/upload_button/upload-button.css === */
/* ── Library Upload Button ─────────────────────────────────── */
#library-upload-btn .material-symbols-rounded {
    font-size: 18px;
}

/* === components/features/library/upload_dialog/upload-dialog.css === */
/* ── Library Upload Dialog ─────────────────────────────────── */
/* Modal frame styles come from orgs-shared.css (.orgs-modal-bd /
   .orgs-modal / .orgs-modal__head / __body / __foot). This sheet
   only styles the upload-specific body content. */

.upload-dialog__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1.5rem;
    width: 100%;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.upload-dialog__dropzone:hover,
.upload-dialog__dropzone--over {
    border-color: var(--brand);
    background: var(--surface-alt);
    color: var(--text);
}
.upload-dialog__dropzone:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.upload-dialog__dropzone .material-symbols-rounded {
    font-size: 32px;
}

.upload-dialog__list {
    list-style: none;
    margin: 0.75rem 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 220px;
    overflow-y: auto;
}
.upload-dialog__item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    font-size: var(--font-size-sm);
}
.upload-dialog__item-icon {
    color: var(--text-muted);
    font-size: 18px;
}
.upload-dialog__item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.upload-dialog__item-size,
.upload-dialog__item-kind {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}
.upload-dialog__item-remove {
    background: transparent;
    border: 0;
    padding: 0.125rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.upload-dialog__item-remove:hover {
    background: var(--surface);
    color: var(--error);
}

.upload-dialog__errors {
    list-style: none;
    margin: 0.75rem 0 0 0;
    padding: 0.5rem 0.75rem;
    background: color-mix(in srgb, var(--error) 8%, transparent);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: var(--font-size-sm);
}

/* === components/features/library/upload_status/upload-status.css === */
/* ── Library Upload Status ─────────────────────────────────── */
.upload-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
}
.upload-status:empty {
    display: none;
}

.upload-status-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    font-size: var(--font-size-sm);
}
.upload-status-row__icon {
    color: var(--text-muted);
    font-size: 18px;
}
.upload-status-row__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.upload-status-row__badge {
    font-size: var(--font-size-xs);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
}
.upload-status-row__badge--failed {
    color: var(--error);
    border-color: var(--error);
}
.upload-status-row__btn {
    background: transparent;
    border: 0;
    padding: 0.125rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.upload-status-row__btn:hover {
    background: var(--surface);
    color: var(--text);
}

/* === components/ui/toast/toast.css === */
.orgs-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  pointer-events: none;
}
.orgs-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}
.orgs-toast .material-symbols-rounded { color: var(--brand); font-size: 18px; }

/* === components/ui/popover/popover.css === */
/*
 * Popover primitive — scaffold-only.
 *
 * Variant-specific styling (chip preview, search inputs, role pills,
 * etc.) lives in each feature's CSS via the `class_name` prop on
 * Popover / PopoverTrigger / PopoverPanel.
 */

.popover {
    position: relative;
    display: inline-block;
}

.popover__trigger {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.popover__trigger:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.popover__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    min-width: 12rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.popover--align-end .popover__panel {
    left: auto;
    right: 0;
}

