/* ==========================================================================
   Administração do Resultado Operacional
   1. Barra administrativa (modo Central e modo pré-visualização)
   2. Paleta de busca de pessoas
   3. Central de acessos (trilho, lista, cartão de configuração, lote)
   4. Ajustes na pré-visualização e responsivo
   ========================================================================== */

:root {
    --adm-navy: #173B6D;
    --adm-navy-2: #285B91;
    --adm-line: #D9E3ED;
    --adm-line-soft: #EAF0F6;
    --adm-ink: #1D2938;
    --adm-muted: #526276;
    --adm-faint: #65768A;
    --adm-canvas: #EEF2F6;
    --adm-amber: #B37A00;
    --adm-amber-bg: #FFF6E2;
    --adm-amber-line: #EBD299;
    --adm-green: #16964A;
    --adm-green-bg: #EAF7EF;
    --adm-green-line: #C4E5D2;
    --adm-red: #C63636;
    --adm-red-bg: #FDECEC;
    --adm-red-line: #F0CFCF;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================
   1. BARRA ADMINISTRATIVA
   ========================================================== */
.adminbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 46px;
    padding: 8px 22px;
    border-bottom: 1px solid var(--adm-line);
    background: #F8FBFE;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(16, 43, 79, .06);
}

.adminbar-brand { display: flex; align-items: center; gap: 8px; color: var(--adm-navy); }
.adminbar-brand i {
    width: 30px;
    height: 26px;
    border-radius: 7px;
    background: var(--adm-navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .04em;
}
.adminbar-brand b { font-size: 11px; white-space: nowrap; }

.adminbar-link {
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--adm-muted);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.adminbar-link:hover { border-color: #C6D4E2; background: #fff; color: var(--adm-navy); }
.adminbar-link.active { border-color: #B8CADB; background: #fff; color: var(--adm-navy); box-shadow: 0 1px 4px rgba(16, 43, 79, .08); }

/* Campo de busca: é um botão que abre a paleta, mas se apresenta como campo
   porque é isso que a pessoa espera encontrar. */
.adminbar-search {
    flex: 1 1 320px;
    max-width: 460px;
    min-height: 34px;
    margin-left: auto;
    padding: 0 10px 0 32px;
    border: 1px solid #C5D3E1;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%238D9BAB' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.6' y2='16.6'/%3E%3C/svg%3E") no-repeat 10px center;
    color: var(--adm-faint);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}
.adminbar-search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.adminbar-search:hover { border-color: #9DB6D0; color: var(--adm-muted); }
.adminbar-search:focus-visible, .adminbar-button:focus-visible, .adminbar-link:focus-visible {
    outline: 2px solid var(--adm-navy-2);
    outline-offset: 2px;
}

.admin-palette button:focus-visible,
.central-rail a:focus-visible,
.list-chips button:focus-visible,
.row-link:focus-visible,
.bulk-bar button:focus-visible,
.config-toggle:focus-within,
.config-actions .button:focus-visible,
.list-table input:focus-visible,
.central-view-tabs button:focus-visible,
.org-controls input:focus-visible,
.org-controls select:focus-visible,
.org-controls button:focus-visible,
.org-toggle:focus-visible,
.org-actions a:focus-visible {
    outline: 2px solid var(--adm-navy-2);
    outline-offset: 2px;
}

.adminbar kbd {
    padding: 2px 5px;
    border: 1px solid var(--adm-line);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: #F4F7FA;
    color: var(--adm-faint);
    font: 700 8.5px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Modo pré-visualização: cor diferente para deixar claro que a tela não é a
   do administrador. */
.adminbar.previewing { background: var(--adm-amber-bg); border-bottom-color: var(--adm-amber-line); }

.adminbar-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid var(--adm-amber-line);
    border-radius: 999px;
    background: #fff;
    color: var(--adm-amber);
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}
.adminbar-flag i { width: 7px; height: 7px; border-radius: 50%; background: var(--adm-amber); }

.adminbar-subject { min-width: 0; display: grid; line-height: 1.25; }
.adminbar-subject b { overflow: hidden; color: var(--adm-ink); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.adminbar-subject small { color: var(--adm-amber); font-size: 9px; font-weight: 700; }

.adminbar-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }

.adminbar-button {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #C9D6E3;
    border-radius: 7px;
    background: #fff;
    color: var(--adm-navy);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.adminbar-button:hover { border-color: #9DB6D0; }
.adminbar-button.primary { border-color: var(--adm-navy); background: var(--adm-navy); color: #fff; }
.adminbar-button.primary:hover { background: #21497F; }

/* ==========================================================
   2. PALETA DE BUSCA
   ========================================================== */
.admin-palette { position: fixed; inset: 0; z-index: 120; display: grid; place-items: start center; padding: 8vh 16px 16px; }
.admin-palette[hidden] { display: none; }
.admin-palette-backdrop { position: fixed; inset: 0; background: rgba(11, 27, 48, .45); }

.admin-palette-box {
    position: relative;
    width: min(620px, 100%);
    max-height: 74vh;
    border: 1px solid var(--adm-line);
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(9, 26, 48, .32);
}

.admin-palette-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--adm-line-soft); }
.admin-palette-head input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #C5D3E1;
    border-radius: 8px;
    color: var(--adm-ink);
    font-size: 13px;
}
.admin-palette-head input:focus { outline: 2px solid #BFD8EF; border-color: var(--adm-navy-2); }
.admin-palette-head button {
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--adm-line);
    border-radius: 8px;
    background: #F5F8FB;
    color: var(--adm-faint);
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.admin-palette-filters { display: flex; gap: 5px; padding: 9px 14px; border-bottom: 1px solid var(--adm-line-soft); flex-wrap: wrap; }
.admin-palette-filters button {
    padding: 6px 11px;
    border: 1px solid var(--adm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--adm-muted);
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
}
.admin-palette-filters button.active { border-color: var(--adm-navy); background: var(--adm-navy); color: #fff; }

.admin-palette-list { flex: 1; margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.admin-palette-list li { border-radius: 8px; }
.admin-palette-list .row {
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
    text-align: left;
    cursor: pointer;
}
.admin-palette-list .row:hover, .admin-palette-list .row.active { background: #F1F6FC; }
.admin-palette-list .row b { grid-column: 1; color: var(--adm-ink); font-size: 12px; font-weight: 700; }
.admin-palette-list .row small { grid-column: 1; color: var(--adm-faint); font-size: 9.5px; }
.admin-palette-list .row .tag {
    grid-row: 1 / 3;
    grid-column: 2;
    padding: 4px 9px;
    border-radius: 999px;
    background: #EDF3F9;
    color: var(--adm-navy);
    font-size: 8.5px;
    font-weight: 900;
    white-space: nowrap;
}
.admin-palette-list .hint { padding: 22px 14px; color: var(--adm-faint); font-size: 11.5px; text-align: center; }

.admin-palette-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid var(--adm-line-soft);
    background: #FAFCFE;
    color: var(--adm-faint);
    font-size: 9px;
}
.admin-palette-foot kbd {
    padding: 2px 5px;
    border: 1px solid var(--adm-line);
    border-radius: 4px;
    background: #fff;
    font: 700 8.5px/1 inherit;
}

/* ==========================================================
   3. CENTRAL DE ACESSOS
   ========================================================== */
.admin-central { display: grid; gap: 12px; }

.central-flash {
    margin: 0;
    padding: 10px 13px;
    border: 1px solid var(--adm-green-line);
    border-radius: 8px;
    background: var(--adm-green-bg);
    color: #0F6B37;
    font-size: 11px;
    font-weight: 700;
}
.central-flash.erro { border-color: var(--adm-red-line); background: var(--adm-red-bg); color: var(--adm-red); }

.central-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.central-head h1 { margin: 0; color: var(--adm-navy); font-size: 21px; letter-spacing: -.2px; }
.central-head p { max-width: 560px; margin: 5px 0 0; color: var(--adm-muted); font-size: 11.5px; line-height: 1.5; }
.central-head p b { color: var(--adm-ink); }

.central-counters { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.central-counters > div {
    min-width: 120px;
    padding: 9px 13px;
    border: 1px solid var(--adm-line);
    border-radius: 9px;
    background: #fff;
}
.central-counters dt { color: var(--adm-faint); font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.central-counters dd { margin: 3px 0 0; color: var(--adm-navy); font-size: 20px; font-weight: 800; line-height: 1; }
.central-counters .is-set { border-color: var(--adm-green-line); background: var(--adm-green-bg); }
.central-counters .is-set dd { color: #0F6B37; }
.central-counters .is-default { border-color: var(--adm-line); background: #F7FAFC; }
.central-counters .is-technical { border-color: var(--adm-amber-line); background: var(--adm-amber-bg); }
.central-counters .is-technical dd { color: var(--adm-amber); }

.central-view-tabs {
    display: flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--adm-line);
    border-radius: 10px;
    background: #fff;
    width: max-content;
}
.central-view-tabs button {
    min-height: 32px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--adm-muted);
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}
.central-view-tabs button:hover { background: #F3F7FB; color: var(--adm-navy); }
.central-view-tabs button.active { border-color: var(--adm-navy); background: var(--adm-navy); color: #fff; }
[data-central-view][hidden] { display: none !important; }

.central-grid { display: grid; grid-template-columns: 208px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }

/* -- trilho de perfis -- */
.central-rail { display: grid; gap: 10px; position: sticky; top: 58px; }
.rail-label { display: block; margin-bottom: 6px; color: var(--adm-faint); font-size: 8.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.central-rail nav { padding: 11px; border: 1px solid var(--adm-line); border-radius: 10px; background: #fff; }
.central-rail nav a {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    text-decoration: none;
}
.central-rail nav a + a { margin-top: 2px; }
.central-rail nav a:hover { background: #F3F7FB; }
.central-rail nav a.active { border-color: #C3D6E9; background: #F1F6FC; box-shadow: inset 3px 0 0 var(--adm-navy-2); }
.central-rail nav b { color: var(--adm-navy); font-size: 11px; }
.central-rail nav small { grid-column: 1; color: var(--adm-faint); font-size: 8.5px; }
.central-rail nav em {
    grid-row: 1 / 3;
    grid-column: 2;
    padding: 3px 7px;
    border-radius: 999px;
    background: #EDF3F9;
    color: var(--adm-navy);
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}
.central-rail nav a.active em { background: var(--adm-navy); color: #fff; }

.rail-scope { padding: 11px; border: 1px solid var(--adm-line); border-radius: 10px; background: #FAFCFE; }
.rail-scope ul { margin: 0; padding-left: 14px; color: var(--adm-muted); font-size: 10px; line-height: 1.5; }
.rail-scope li + li { margin-top: 4px; }
.rail-scope p { margin: 8px 0 0; color: var(--adm-faint); font-size: 9.5px; line-height: 1.45; }

/* -- lista de pessoas -- */
.central-list { border: 1px solid var(--adm-line); border-radius: 10px; background: #fff; overflow: hidden; }

.list-toolbar { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--adm-line-soft); flex-wrap: wrap; }
.list-search { flex: 1 1 240px; min-width: 0; }
.list-search input {
    width: 100%;
    height: 34px;
    padding: 0 11px;
    border: 1px solid #C5D3E1;
    border-radius: 8px;
    color: var(--adm-ink);
    font-size: 12px;
}
.list-search input:focus { outline: 2px solid #BFD8EF; border-color: var(--adm-navy-2); }

.list-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.list-chips button {
    padding: 7px 11px;
    border: 1px solid var(--adm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--adm-muted);
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
}
.list-chips button.active { border-color: var(--adm-navy); background: var(--adm-navy); color: #fff; }
.list-chips.secondary { padding-left: 8px; border-left: 1px solid var(--adm-line); }
.list-chips.secondary button.active { border-color: #557897; background: #EAF1F8; color: var(--adm-navy); }
.list-count { color: var(--adm-faint); font-size: 9.5px; font-weight: 800; white-space: nowrap; }

.list-table { width: 100%; border-collapse: collapse; }
.list-table th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--adm-line);
    background: #FAFCFE;
    color: var(--adm-faint);
    font-size: 8.5px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.list-table td { padding: 8px 10px; border-bottom: 1px solid var(--adm-line-soft); vertical-align: middle; }
.list-table tbody tr:last-child td { border-bottom: 0; }
.list-table tbody tr:hover { background: #F8FBFE; }
.list-table tbody tr.open { background: #F1F6FC; box-shadow: inset 3px 0 0 var(--adm-navy-2); }

.col-pick { width: 34px; }
.col-pick input { width: 16px; height: 16px; accent-color: var(--adm-navy-2); }
.col-state { width: 118px; }
.col-modules { width: 270px; }
.col-actions { width: 176px; text-align: right; white-space: nowrap; }

.col-person a { display: grid; gap: 1px; text-decoration: none; }
.col-person b { color: var(--adm-ink); font-size: 12px; }
.col-person small { color: var(--adm-faint); font-size: 9.5px; }
.col-person a:hover b { color: var(--adm-navy-2); text-decoration: underline; }

.state { padding: 4px 9px; border-radius: 999px; font-size: 8.5px; font-weight: 900; white-space: nowrap; }
.state.configurado { border: 1px solid var(--adm-green-line); background: var(--adm-green-bg); color: #0F6B37; }
.state.padrao { border: 1px solid var(--adm-line); background: #F4F7FA; color: var(--adm-muted); }
.state.tecnica { border: 1px solid var(--adm-amber-line); background: var(--adm-amber-bg); color: var(--adm-amber); }

.module-chip {
    display: inline-block;
    margin: 1px 3px 1px 0;
    padding: 3px 7px;
    border: 1px solid;
    border-radius: 5px;
    font-size: 8.5px;
    font-weight: 800;
}
.module-chip.on { border-color: var(--adm-green-line); background: var(--adm-green-bg); color: #0F6B37; }
.module-chip.off { border-color: var(--adm-line); background: #F6F8FA; color: #B3BFCC; text-decoration: line-through; }
.modules-default { color: var(--adm-faint); font-size: 9.5px; }
.modules-default.none { color: var(--adm-amber); }
.col-modules > .state { display: inline-block; margin: 1px 6px 1px 0; }
.scope-auto { display: grid; gap: 1px; }
.scope-auto b { color: var(--adm-navy); font-size: 10px; }
.scope-auto small { color: var(--adm-faint); font-size: 8.5px; }

.row-link { margin-left: 9px; color: var(--adm-muted); font-size: 10px; font-weight: 800; text-decoration: none; }
.row-link:hover { color: var(--adm-navy); text-decoration: underline; }
.row-link.strong { color: var(--adm-navy); }

.list-empty { padding: 34px 20px; text-align: center; }
.list-empty h2 { margin: 0; color: var(--adm-navy); font-size: 15px; }
.list-empty p { max-width: 460px; margin: 6px auto 0; color: var(--adm-muted); font-size: 11px; line-height: 1.5; }
.list-nomatch { margin: 0; padding: 26px; color: var(--adm-faint); font-size: 11px; text-align: center; }

/* -- barra de aplicação em lote -- */
.bulk-bar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid #C9D6E3;
    background: #F1F6FC;
    flex-wrap: wrap;
}
.bulk-bar[hidden] { display: none; }
.bulk-count { color: var(--adm-navy); font-size: 10px; font-weight: 800; white-space: nowrap; }
.bulk-count b { font-size: 14px; }
.bulk-modules { display: flex; gap: 5px; flex-wrap: wrap; }
.bulk-modules label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid var(--adm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--adm-muted);
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}
.bulk-modules input { width: 13px; height: 13px; accent-color: var(--adm-green); }
.bulk-cancel {
    margin-left: auto;
    padding: 8px 11px;
    border: 1px solid var(--adm-line);
    border-radius: 7px;
    background: #fff;
    color: var(--adm-muted);
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
}
.bulk-apply {
    padding: 8px 14px;
    border: 1px solid var(--adm-green);
    border-radius: 7px;
    background: var(--adm-green);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
}

/* -- cartão de configuração -- */
.central-config { position: sticky; top: 58px; border: 1px solid var(--adm-line); border-radius: 10px; background: #fff; overflow: hidden; }

.config-empty { padding: 20px 16px; }
.config-empty h2 { margin: 0; color: var(--adm-navy); font-size: 14px; }
.config-empty p { margin: 6px 0 0; color: var(--adm-muted); font-size: 10.5px; line-height: 1.55; }

.config-person { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--adm-line-soft); background: #FAFCFE; }
.config-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--adm-navy); color: #fff; display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.config-person div { min-width: 0; display: grid; }
.config-person b { overflow: hidden; color: var(--adm-ink); font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.config-person small { color: var(--adm-faint); font-size: 9.5px; }

.config-note { margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--adm-line-soft); background: var(--adm-amber-bg); color: var(--adm-amber); font-size: 9.5px; line-height: 1.45; }

.person-preview { padding: 12px 14px; border-bottom: 1px solid var(--adm-line-soft); }
.person-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 0; }
.person-preview-grid > div { min-width: 0; padding: 7px 8px; border: 1px solid var(--adm-line-soft); border-radius: 7px; background: #FAFCFE; }
.person-preview-grid > div.wide { grid-column: 1 / -1; }
.person-preview-grid dt { color: var(--adm-faint); font-size: 7.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.person-preview-grid dd { overflow-wrap: anywhere; margin: 3px 0 0; color: var(--adm-ink); font-size: 9.5px; font-weight: 700; line-height: 1.35; }

.config-form, .config-scope { padding: 13px 14px; }
.config-label { display: block; color: var(--adm-faint); font-size: 8.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.config-hint { margin: 4px 0 10px; color: var(--adm-muted); font-size: 9.5px; line-height: 1.45; }

.config-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid var(--adm-line);
    border-radius: 8px;
    cursor: pointer;
}
.config-toggle + .config-toggle { margin-top: 6px; }
.config-toggle:hover { border-color: #9DB6D0; }
.config-toggle input { width: 17px; height: 17px; accent-color: var(--adm-green); flex: 0 0 auto; }
.config-toggle span { display: grid; gap: 1px; }
.config-toggle b { color: var(--adm-navy); font-size: 10.5px; }
.config-toggle small { color: var(--adm-muted); font-size: 8.5px; line-height: 1.35; }

.config-scope ul { margin: 8px 0 0; padding-left: 15px; color: var(--adm-muted); font-size: 10px; line-height: 1.5; }
.config-scope li + li { margin-top: 4px; }

.config-actions { display: flex; gap: 7px; margin-top: 12px; }
.config-actions .button { flex: 1; }

/* -- organograma administrativo ------------------------------------------ */
.central-organogram { border: 1px solid var(--adm-line); border-radius: 12px; background: #fff; overflow: hidden; }
.org-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--adm-line); background: #FAFCFE; }
.org-head h2 { margin: 2px 0 0; color: var(--adm-navy); font-size: 17px; }
.org-head p { max-width: 620px; margin: 5px 0 0; color: var(--adm-muted); font-size: 10.5px; line-height: 1.45; }
.org-controls { display: flex; align-items: flex-end; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.org-controls label { display: grid; gap: 4px; color: var(--adm-faint); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.org-controls input,.org-controls select { height: 34px; min-width: 150px; padding: 0 9px; border: 1px solid #C5D3E1; border-radius: 7px; background: #fff; color: var(--adm-ink); font-size: 10px; }
.org-controls input { min-width: 220px; }
.org-controls button { height: 34px; padding: 0 10px; border: 1px solid #B9C9D9; border-radius: 7px; background: #fff; color: var(--adm-navy); font-size: 9px; font-weight: 900; cursor: pointer; }
.org-controls button:hover { background: #EFF5FB; }
.org-summary { min-height: 38px; padding: 8px 18px; border-bottom: 1px solid var(--adm-line-soft); color: var(--adm-muted); font-size: 9.5px; font-weight: 700; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.org-summary strong { padding:4px 8px; border-radius:999px; background:#E9F1FA; color:#173B6D; font-size:9px; text-transform:uppercase; letter-spacing:.03em; }
.org-legend { display: flex; align-items: center; gap: 5px; padding: 8px 18px; border-bottom: 1px solid var(--adm-line-soft); flex-wrap: wrap; }
.org-legend span,.org-legend i { padding: 4px 8px; border: 1px solid var(--adm-line); border-radius: 999px; color: var(--adm-muted); font-size: 8px; font-style: normal; font-weight: 900; }
.org-legend .director { border-color: #9EB7D1; background: #E9F1FA; color: #153D6E; }
.org-legend .manager { border-color: #AFBFE1; background: #EEF1FB; color: #314A89; }
.org-legend .coordinator { border-color: #B7D4CC; background: #EEF8F5; color: #176B58; }
.org-legend .supervisor { border-color: #E8D4A2; background: #FFF8E7; color: #8C6500; }
.org-legend .collaborator { border-color: #CFD9E4; background: #F6F8FB; color: #526276; }
.org-legend i { border-color: var(--adm-amber-line); background: var(--adm-amber-bg); color: var(--adm-amber); }
.org-legend i.inactive { border-color:#E8B8B8; background:#FFF0F0; color:#A83B3B; }

.org-canvas { max-height: 72vh; min-height: 260px; padding: 18px; overflow: auto; background: linear-gradient(90deg, rgba(233,240,247,.45) 1px, transparent 1px) 0 0/24px 24px, #F7FAFD; }
.org-message { margin: 70px auto; color: var(--adm-muted); font-size: 11px; text-align: center; }
.org-message.error { color: var(--adm-red); }
.org-tree,.org-tree ul { margin: 0; padding: 0; list-style: none; }
.org-tree { min-width: 720px; }
.org-tree ul { position: relative; margin-left: 24px; padding-left: 30px; }
.org-tree ul::before { content: ''; position: absolute; left: 10px; top: -7px; bottom: 18px; width: 1px; background: #B8C9DA; }
.org-node { position: relative; padding: 5px 0; }
.org-tree ul > .org-node::before { content: ''; position: absolute; left: -20px; top: 28px; width: 20px; height: 1px; background: #B8C9DA; }
.org-card { position: relative; display: grid; grid-template-columns: 25px 32px minmax(210px,1fr) auto auto; align-items: center; gap: 8px; width: min(760px,calc(100vw - 120px)); min-height: 48px; padding: 7px 9px; border: 1px solid var(--adm-line); border-left: 4px solid #8195AA; border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgba(20,49,82,.06); }
.org-card.director { border-left-color: #173B6D; }
.org-card.manager { border-left-color: #536BB0; }
.org-card.coordinator { border-left-color: #28816D; }
.org-card.supervisor { border-left-color: #C08A13; }
.org-card.collaborator { border-left-color: #8A9CAD; }
.org-card.inactive { background:#FBFCFD; border-style:dashed; opacity:.78; }
.org-card.inactive .org-person b { text-decoration:line-through; text-decoration-color:#B8C1CB; }
.org-card.highlight { outline: 3px solid #F2B233; outline-offset: 2px; box-shadow: 0 8px 20px rgba(31,69,110,.18); }
.org-toggle { width: 24px; height: 24px; padding: 0; border: 1px solid #B9C9D9; border-radius: 6px; background: #F4F8FC; color: var(--adm-navy); font-size: 15px; font-weight: 900; cursor: pointer; }
.org-toggle.placeholder { display: block; border-color: transparent; background: transparent; }
.org-avatar { width: 30px; height: 30px; border-radius: 50%; background: #E8EFF7; color: var(--adm-navy); display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.org-person { min-width: 0; display: grid; gap: 1px; }
.org-person b { overflow: hidden; color: var(--adm-ink); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.org-person small { color: var(--adm-faint); font-size: 8.5px; }
.org-badges { display: flex; gap: 4px; align-items: center; }
.org-badges em,.org-badges i { padding: 3px 6px; border-radius: 999px; background: #EDF3F9; color: var(--adm-navy); font-size: 7.5px; font-style: normal; font-weight: 900; white-space: nowrap; }
.org-badges i { background: var(--adm-amber-bg); color: var(--adm-amber); }
.org-badges i.login { background: var(--adm-green-bg); color: #0F6B37; }
.org-badges i.inactive { background:#FFF0F0; color:#A83B3B; }
.org-actions { display: flex; gap: 6px; justify-content: flex-end; }
.org-actions a { color: var(--adm-muted); font-size: 8.5px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.org-actions a.strong { color: var(--adm-navy); }
.org-actions a:hover { text-decoration: underline; }
.org-actions .historical-only { color:#8A5B5B; font-size:8px; font-weight:900; text-transform:uppercase; white-space:nowrap; }
.org-cycle { padding: 8px; color: var(--adm-red); font-size: 9px; }

/* ==========================================================
   4. PRÉ-VISUALIZAÇÃO E RESPONSIVO
   ========================================================== */
/* Durante a pré-visualização a barra administrativa já diz de quem é o painel
   e como voltar. Estes blocos repetiam a mesma informação dentro da página. */
.admin-previewing .result-scope-banner,
.admin-previewing .scope-banner,
.admin-previewing .requester-toolbar > a[href*="admin"][href*="acessos"] { display: none !important; }

@media (max-width: 1180px) {
    .central-grid { grid-template-columns: 190px minmax(0, 1fr); }
    .central-config { grid-column: 1 / -1; position: static; }
    .col-modules { width: 190px; }
    .org-head { align-items: stretch; flex-direction: column; }
    .org-controls { justify-content: flex-start; }
}

@media (max-width: 900px) {
    .adminbar { padding: 8px 12px; flex-wrap: wrap; }
    .adminbar-search { flex-basis: 100%; max-width: none; margin-left: 0; order: 3; }
    .adminbar-actions { flex-basis: 100%; margin-left: 0; order: 3; }
    .adminbar-button kbd { display: none; }
    .central-grid { grid-template-columns: 1fr; }
    .central-rail { position: static; }
    .central-rail nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 5px; }
    .central-rail nav a + a { margin-top: 0; }
    .col-modules, .col-state { display: none; }
    .col-actions { width: auto; }
    .org-card { grid-template-columns: 25px 32px minmax(170px,1fr) auto; width: min(700px,calc(100vw - 85px)); }
    .org-badges { display: none; }
}

@media (max-width: 620px) {
    .central-head { display: block; }
    .central-counters { margin-top: 10px; }
    .list-toolbar { align-items: stretch; flex-direction: column; }
    .list-chips.secondary { padding-top: 7px; padding-left: 0; border-top: 1px solid var(--adm-line); border-left: 0; }
    .list-count { text-align: right; }
    .admin-palette { padding: 4vh 10px 10px; }
    .bulk-bar { align-items: stretch; flex-direction: column; }
    .bulk-cancel, .bulk-apply { margin-left: 0; width: 100%; }
    .central-view-tabs { width: 100%; }
    .central-view-tabs button { flex: 1; }
    .person-preview-grid { grid-template-columns: 1fr; }
    .person-preview-grid > div.wide { grid-column: auto; }
    .org-controls { display: grid; grid-template-columns: 1fr 1fr; }
    .org-controls label:first-child { grid-column: 1 / -1; }
    .org-controls input,.org-controls select { width: 100%; min-width: 0; }
    .org-canvas { padding: 12px; }
    .org-card { grid-template-columns: 25px 28px minmax(150px,1fr); width: min(520px,calc(100vw - 70px)); }
    .org-actions { grid-column: 3; justify-content: flex-start; }
}

@media print {
    .adminbar, .admin-palette, .bulk-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .adminbar *, .admin-palette *, .admin-central * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

@media (forced-colors: active) {
    .adminbar-flag i, .adminbar-brand i, .state, .module-chip, .adminbar-button.primary {
        forced-color-adjust: auto;
    }
    .central-rail nav a.active, .list-table tbody tr.open {
        outline: 2px solid CanvasText;
    }
}

/* Recorte dos seis perfis reais de Apoio na busca global. */
.admin-palette-support{display:flex;flex-wrap:wrap;gap:10px;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.admin-palette-support[hidden]{display:none}
.admin-palette-support label{display:grid;gap:4px;font-size:12px;font-weight:600;color:#475569;flex:1;min-width:130px}
.admin-palette-support select{width:100%;min-width:0;padding:7px 9px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#18212f;font:inherit}
@media(max-width:620px){
 .admin-palette-support:not([hidden])~.admin-palette-list .row{grid-template-columns:minmax(0,1fr)}
 .admin-palette-support:not([hidden])~.admin-palette-list .row .tag{grid-row:auto;grid-column:1;justify-self:start;white-space:normal;max-width:100%}
}
