/* === V4 Ingest - tema operacional =========================================
   Tokens canônicos compartilhados com o SPA. Os VALORES de cor aqui devem
   espelhar web/spa/src/styles.css (:root). Ao mudar a paleta, atualize os dois
   arquivos juntos — o SPA é a fonte de verdade do vocabulário de cor. */
:root {
    color-scheme: dark;
    --bg: #101114;
    --bg-raised: #181a1f;       /* === SPA --surface */
    --bg-hover: #202329;        /* === SPA --surface-2 */
    --bg-deep: #101114;
    --border: rgba(255,255,255,0.1);
    --border-soft: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.28);
    --text: #f2f3f5;
    --text-muted: #b6bac3;
    --accent: #ff6348;          /* vermelho principal (=== SPA --accent) */
    --accent-strong: #e42504;
    --accent-dim: rgba(251,46,10,.18);
    --accent-glow: rgba(251,46,10,.18);
    --ok: #6ce860;
    --status-green: #6ce860;
    --warn: #e3c778;
    --err: #ff6b5b;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --page-bg: var(--bg);
    --topbar-bg: rgba(24, 26, 31, .92);
    --panel-bg: var(--bg-raised);
    --metric-bg: color-mix(in srgb, var(--bg) 92%, #000);
    --workspace-bg: rgba(255,255,255,.025);
    --subtle-bg: rgba(255,255,255,.035);
    --table-hover: rgba(255,255,255,.035);
    --shadow-soft: 0 8px 24px rgba(0,0,0,.18);
    --shadow-elevated: 0 8px 24px rgba(0,0,0,.18);
    --bg-elevated: #2a2e36;     /* === SPA --surface-3 */
    --text-subtle: #9298a5;
    --accent-soft: rgba(251,46,10,.18);
    --ok-soft: rgba(108,232,96,.15);
    --warn-soft: rgba(227,199,120,.16);
    --info: #7fb6e6;        --info-soft: rgba(127,182,230,.15);
    --danger: #ff6b5b;      --danger-soft: rgba(255,107,91,.18);
    --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
    --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 999px;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f6f8;
    --bg-raised: #ffffff;
    --bg-hover: #eef0f4;
    --bg-deep: #e1e5eb;
    --border: rgba(32,36,44,0.12);
    --border-soft: rgba(32,36,44,0.12);
    --border-strong: rgba(0,0,0,0.28);
    --text: #20242c;
    --text-muted: #596170;
    --accent: #ba1e03;
    --accent-strong: #ba1e03;
    --accent-dim: rgba(186,30,3,.1);
    --accent-glow: rgba(186,30,3,.1);
    --ok: #286d0b;
    --warn: #6f5821;
    --err: #ba190a;
    --page-bg: #f5f6f8;
    --topbar-bg: rgba(255,255,255,.92);
    --panel-bg: #ffffff;
    --metric-bg: #ffffff;
    --workspace-bg: rgba(23, 32, 42, .025);
    --subtle-bg: rgba(23, 32, 42, .045);
    --table-hover: rgba(215, 34, 46, .04);
    --shadow-soft: 0 1px 0 rgba(17,24,39,.06), 0 10px 24px rgba(31,42,55,.08);
    --shadow-elevated: 0 18px 45px rgba(25,30,40,.08);
    --bg-elevated: #e1e5eb;
    --text-subtle: #5c6472;
    --accent-soft: rgba(186,30,3,.1);
    --ok-soft: rgba(40,109,11,.12);
    --warn-soft: rgba(111,88,33,.16);
    --info: #29638f;        --info-soft: rgba(41,99,143,.12);
    --danger: #ba190a;      --danger-soft: rgba(186,25,10,.1);
}

@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/worksans-wght.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibmplexmono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibmplexmono-600.woff2") format("woff2"); }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--page-bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

code {
    font-family: var(--mono);
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--accent-strong);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px 12px;
    padding: 14px 28px;
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
    box-shadow: var(--shadow-soft);
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; letter-spacing: 0.4px;
    text-transform: uppercase;
}
.logo {
    color: var(--accent);
    font-size: 1.4em;
    text-shadow: 0 0 12px var(--accent-glow);
}
.brand-sub {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.78em;
    margin-left: 6px;
}
.version-chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--bg-hover);
    font-family: var(--mono);
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
}

.topbar nav {
    display: flex;
    gap: 4px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.topbar nav::-webkit-scrollbar {
    display: none;
}
.topbar nav a {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 500;
}
.topbar nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.topbar nav a.active {
    background: var(--accent);
    color: white;
}

html[data-theme="light"] .topbar nav a.active {
    background: var(--accent);
    color: #ffffff;
}

.main-nav {
    flex: 1 1 auto;
}
.admin-menu {
    position: relative;
    flex: 0 0 auto;
}
.admin-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--text-muted);
    background: var(--bg-raised);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 700;
    list-style: none;
}
.admin-menu > summary::-webkit-details-marker {
    display: none;
}
.admin-menu[open] > summary,
.admin-menu > summary:hover {
    color: var(--text);
    background: var(--bg-hover);
}
.topbar .admin-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
    box-shadow: var(--shadow-soft);
    overflow: visible;
    flex: none;
}
.topbar .admin-menu-panel a {
    width: 100%;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--text-muted);
    font: inherit;
    font-size: .84rem;
    cursor: pointer;
    white-space: nowrap;
}
.brand,
.theme-toggle,
.user-chip {
    flex: 0 0 auto;
}
.theme-toggle:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-raised);
    font-size: 0.85em;
}
.user-chip .email { color: var(--text); }
.user-chip form { margin: 0; }
.user-chip .logout {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    padding: 2px 6px;
    border-radius: 4px;
}
.user-chip .logout:hover { color: var(--accent-strong); background: var(--bg-hover); }

.section-title-row,
.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.section-title-row {
    justify-content: space-between;
    margin-bottom: 12px;
}
.section-title-row h2 { margin: 0; }
.row-actions a,
.row-actions button {
    margin-right: 4px;
}
.score-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 40px;
}

footer {
    max-width: 1200px;
    margin: 40px auto 24px;
    padding: 0 24px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.3px;
}

h1 {
    margin: 0 0 6px;
    font-size: 1.7em;
    font-weight: 700;
    letter-spacing: 0;
}
h1 .mark {
    display: inline-block;
    width: 6px; height: 22px; background: var(--accent);
    margin-right: 10px; vertical-align: -4px; border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}
h2 { margin: 0 0 14px; font-size: 1.15em; font-weight: 600; color: var(--text); }

.muted { color: var(--text-muted); }
.small { font-size: 0.85em; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.mono { font-family: var(--mono); font-size: 0.9em; }
.mono.short {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.card {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
    opacity: 0.6;
}
.card-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
}
.card-value {
    font-size: 1.9em;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.card-value.ok { color: var(--ok); }
.card-value.warn { color: var(--warn); }
.card-value.err { color: var(--err); }
.card-value.accent { color: var(--accent-strong); text-shadow: 0 0 12px var(--accent-glow); }
.card-sub {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-top: 4px;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 22px 24px;
    margin: 18px 0;
}
.panel.accent { border-color: var(--accent-dim); }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 800px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Tables */
table.data {
    width: 100%;
    border-collapse: collapse;
}
table.data th, table.data td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}
table.data th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table.data tr:hover td { background: var(--bg-hover); }

/* Alias: templates usam .data-table, regras acima usam table.data — unificar */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}
table.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table.data-table tr:hover td { background: var(--bg-hover); }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid;
}
.alert-warn {
    background: var(--warn-soft);
    border-color: var(--warn);
    color: var(--warn);
}
.alert-ok {
    background: var(--ok-soft);
    border-color: var(--ok);
    color: var(--ok);
}
.alert-err {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
}
/* Notices — inline page messages (used by ask.html, search.html, etc.) */
.notice {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: .875rem;
    border: 1px solid;
    line-height: 1.5;
}
.notice-error {
    background: rgba(255, 77, 77, .08);
    border-color: rgba(255, 77, 77, .4);
    color: #ffb5b5;
}
.notice-warn {
    background: rgba(244, 194, 29, .07);
    border-color: rgba(244, 194, 29, .35);
    color: var(--warn);
}
.notice-info {
    background: rgba(96, 165, 250, .07);
    border-color: rgba(96, 165, 250, .3);
    color: #93c5fd;
}
.inline-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0;
    padding: 9px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
    color: var(--text);
    font-size: .86rem;
}
.inline-feedback-err {
    border-color: rgba(255, 77, 77, .42);
    background: rgba(255, 77, 77, .09);
    color: #ffb5b5;
}
.inline-feedback button {
    flex: 0 0 auto;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 5px 8px;
    color: var(--text);
    background: var(--bg-raised);
    cursor: pointer;
}

/* Forms */
.field { margin: 18px 0; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); }
.field label .muted { margin-left: 6px; font-weight: 400; }
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field textarea,
.field select {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input[type=text],
.field input[type=password] {
    font-family: var(--mono);
    font-size: 13px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Picker */
.picker-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.picker-list {
    list-style: none;
    padding: 8px 12px;
    margin: 10px 0 0;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    max-height: 280px;
    overflow: auto;
}
.picker-list li {
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-soft);
}
.picker-list li:last-child { border-bottom: 0; }
.picker-list li:hover { background: var(--bg-hover); }
.btn-link {
    background: transparent;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92em;
    padding: 2px 6px;
    text-align: left;
}
.btn-link.use { flex: 1; color: var(--text); font-weight: 500; }
.btn-link:hover { text-decoration: underline; color: var(--accent-strong); }

/* Focus visible — keyboard navigation accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: 0;
    padding: 8px 16px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.92em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
}
.btn:hover {
    background: var(--accent-strong);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.btn:active { transform: translateY(1px); }
html[data-theme="light"] .btn {
    background: var(--accent);
    color: #ffffff;
}
html[data-theme="light"] .btn:hover {
    background: var(--accent-strong);
}
.btn.btn-secondary {
    background: var(--bg-raised);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border-soft);
}
.btn.btn-secondary:hover {
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1px var(--accent-dim);
}
.btn.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    box-shadow: inset 0 0 0 1px var(--border-soft);
}
.btn.btn-ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-dim); }
.btn-small { padding: 5px 12px; font-size: 0.82em; }

.badge {
    background: var(--accent-dim);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72em;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 600;
}
.badge.ok { background: #1d6b3e; }
.badge.warn { background: #8a6b12; }
.badge.err { background: #8a1a22; }

/* Health score badge */
.health-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 20px; padding: 0 6px; border-radius: 10px;
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
    letter-spacing: -.3px; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-muted);
}
.health-badge.h-ok   { background: rgba(61,220,132,.13); color: #1d6b3e; border-color: color-mix(in srgb, var(--ok), transparent 50%); }
.health-badge.h-warn { background: rgba(242,184,75,.13); color: #8a6b12; border-color: rgba(242,184,75,.5); }
.health-badge.h-err  { background: rgba(220,53,69,.13);  color: #8a1a22; border-color: rgba(220,53,69,.5); }
.health-badge.h-na   { opacity: .45; }

.breadcrumb {
    margin-bottom: 10px;
    font-size: 0.88em;
    color: var(--text-muted);
}

/* Log viewer */
.log-viewer {
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    padding: 14px 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    max-height: 70vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: #d9d9d9;
}

/* Auth screen (login/register) */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: none;
}
.auth-brand {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.auth-brand .logo { font-size: 1.5em; }
.auth-brand .brand-lockup-logo { max-width: min(100%, 220px); height: 30px; }
.auth-brand .theme-toggle { margin-left: auto; min-height: 39px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-hover); color: var(--text); font: inherit; }
html[data-theme="light"] .auth-brand .brand-lockup-logo { filter: brightness(0); }
.auth-card h1 {
    font-size: 1.4em;
    margin-bottom: 4px;
    color: var(--text);
}
.auth-card p.muted { margin-bottom: 18px; }
.auth-card .actions { margin-top: 24px; }
.auth-card .actions .btn { width: 100%; justify-content: center; text-align: center; }
.auth-card .actions .btn[name="decision"] { width: auto; }
.auth-card .switch {
    margin-top: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
}
.auth-card .field input[type=text],
.auth-card .field input[type=email] { font-family: var(--font-sans); font-size: 14px; }
.auth-card .field input[type=password] { font-family: var(--mono); }
.auth-card .field input,
.auth-card .field textarea,
.auth-card .field select { border-radius: 12px; }
.auth-card .btn { min-height: 39px; border-radius: 12px; background: var(--accent-strong); color: #fff; box-shadow: none; }
.auth-card .btn:hover { background: var(--accent-strong); color: #fff; box-shadow: none; filter: brightness(.92); }
.auth-card .btn.btn-secondary { background: var(--bg-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); filter: none; }
.auth-card .btn.btn-secondary:hover { background: var(--bg-deep); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); filter: none; }
.auth-card .google-btn:hover { filter: none; }
.auth-card code { color: var(--accent); }
@media (max-width: 390px) {
    .auth-shell { align-items: flex-start; padding: 16px 12px; }
    .auth-card { padding: 24px 18px; }
    .auth-brand { gap: 8px; }
    .auth-brand .brand-lockup-logo { max-width: 185px; }
    .auth-card .actions { gap: 8px; }
}
@media (max-width: 320px) {
    .auth-card { padding: 20px 14px; }
    .auth-brand .brand-lockup-logo { max-width: 150px; }
    .auth-brand .theme-toggle { padding: 7px 8px; }
}

/* Calendar / Insights cards */
.event {
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: var(--bg-raised);
    margin-bottom: 10px;
}
.event .title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.event .when {
    color: var(--text-muted);
    font-size: 0.85em;
    font-family: var(--mono);
}
.event .meta {
    margin-top: 8px;
    display: flex; gap: 10px; flex-wrap: wrap;
    font-size: 0.85em;
}
.event .meta a { color: var(--accent); }
.event .attach {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bg-deep);
    border: 1px dashed var(--accent-dim);
    border-radius: 6px;
    font-size: 0.85em;
}

/* Pill (status indicator) */
.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.pill.ok  { background: rgba(61, 220, 132, 0.15); color: var(--ok); }
.pill.err { background: rgba(255, 77, 77, 0.15); color: var(--err); }
.pill.warn { background: rgba(244, 194, 29, 0.12); color: var(--warn); }
.pill.accent { background: var(--accent-glow); color: var(--accent-strong); }

/* Google sign-in button + divider (auth screens) */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #fff !important;
    color: #1a1a1a !important;
    font-weight: 600;
    font-size: 0.95em;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    margin-bottom: 14px;
    text-decoration: none;
    letter-spacing: 0.1px;
    border: 1px solid #d0d0d0;
}
.google-btn:hover {
    background: #f4f4f4 !important;
    color: #1a1a1a !important;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.google-btn .g-mark {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75%);
    color: white; font-weight: 800; font-size: 12px;
    font-family: Arial, sans-serif;
    line-height: 1;
}
.oauth-disabled {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    background: var(--subtle-bg);
    font-size: 0.95em;
    font-weight: 600;
}
.oauth-disabled .g-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-raised);
    color: var(--text-muted);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}
.btn[disabled],
button[disabled].btn {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.8em;
    margin: 6px 0 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ---------- Chips (sinalizadores inline — /client-sb, /opportunities) ---------- */
.chip {
    display: inline-block;
    min-width: 1.5em;
    padding: 0 .4em;
    margin-left: .3em;
    border-radius: 10px;
    background: var(--accent-dim, #333);
    color: #fff;
    font-size: 0.75em;
    text-align: center;
    line-height: 1.6;
    vertical-align: middle;
}
.chip-warn { background: #b85c00; }

/* Inline form (filtros + atribuições PM×cliente) */
.inline-form {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: .75rem;
}
.inline-form .field { flex: 1 1 140px; margin: 0; }

/* Details expansível em oportunidades */
details summary {
    cursor: pointer;
    list-style: none;
}
details summary::-webkit-details-marker { display: none; }

/* ========== Base V4 / Base de conhecimento interna ========== */

.panel.success {
    border-color: #2f5c3a;
    background: rgba(47, 92, 58, .12);
}
.panel.error {
    border-color: #6c2a2a;
    background: rgba(108, 42, 42, .12);
}

.meta-panel dl.meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 18px;
    margin: 0 0 12px 0;
}
.meta-panel dl.meta dt {
    color: var(--text-muted);
    font-size: .82em;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.meta-panel dl.meta dd {
    margin: 0;
    color: var(--text);
}

ul.compact {
    margin: .3rem 0;
    padding-left: 1.2rem;
}
ul.compact li { margin: 2px 0; }

pre.extracted-text {
    max-height: 60vh;
    overflow: auto;
    padding: 14px;
    background: rgba(0,0,0,.35);
    border: 1px solid var(--accent-dim);
    border-radius: 6px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: .92em;
    line-height: 1.5;
}

/* ========== Kanban de oportunidades ========== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 14px;
    align-items: start;
}
@media (max-width: 1100px) {
    .kanban-board { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 760px) {
    .kanban-board { grid-template-columns: 1fr; }
}
.kanban-column {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-raised) 82%, var(--bg) 18%);
    padding: 12px;
    min-height: 180px;
}
html[data-theme="light"] .kanban-column {
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(17,24,39,.04);
}
.kanban-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.kanban-column-head h2 {
    margin: 0;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0;
}
.kanban-card {
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    cursor: grab;
    transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
}
.kanban-card.dragging,
.kanban-card.saving {
    opacity: .62;
}
.kanban-card.dragging {
    cursor: grabbing;
    transform: scale(.99);
}
.kanban-card p { margin: 8px 0; }
.kanban-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.evidence {
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: var(--bg-deep);
    color: var(--text-muted);
    font-size: .9em;
}
.mini-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 10px;
    margin: 10px 0;
    font-size: .86em;
}
.mini-meta dt { color: var(--text-muted); }
.mini-meta dd { margin: 0; }
.compact-form {
    align-items: center;
}
.compact-form select { min-width: 130px; }
.compact-form input[type=number] {
    max-width: 110px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    color: var(--text);
    border-radius: 7px;
    padding: 8px 10px;
}
.err { color: var(--err); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.split-grid h3 {
    margin-top: 0;
}
.tag-cloud,
.queue-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.queue-taxonomy h3 {
    margin-bottom: 8px;
}
.queue-tags code,
.tag-cloud code {
    font-size: .76rem;
    white-space: nowrap;
}
.opportunities-board {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
}
.opportunities-board .kanban-column {
    min-width: 0;
}
.opportunity-board-note {
    margin: 8px 0 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--text-muted);
    background: var(--subtle-bg);
    font-size: .84rem;
}
.kanban-dropzone {
    min-height: 90px;
    border-radius: 8px;
}
.kanban-dropzone.drag-over {
    outline: 1px dashed var(--accent);
    outline-offset: 4px;
    background: rgba(190, 18, 60, .08);
}
.opportunity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}
.opportunity-head {
    align-items: flex-end;
}
.opportunity-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.opportunity-summary-metric {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-raised);
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow .15s;
}
.opportunity-summary-metric:hover { box-shadow: var(--shadow-elevated); }
.opportunity-summary-metric span,
.opportunity-summary-metric small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.opportunity-summary-metric strong {
    display: block;
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.opportunity-summary-metric.attention {
    background: linear-gradient(0deg, var(--warn-soft), transparent 70%), var(--bg-raised);
}
.opportunity-summary-metric.attention strong { color: var(--warn); }
.opportunity-status-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 14px;
    scrollbar-width: none;
}
.opportunity-status-strip::-webkit-scrollbar { display: none; }
.opportunity-status-strip span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 160px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-raised);
    box-shadow: var(--shadow-soft);
}
.opportunity-status-strip b {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.opportunity-status-strip strong {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.opportunity-workspace-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin: 12px 0 8px;
}
.opportunity-filter-shell {
    margin: 10px 0 16px;
}
.filter-bar.filter-bar-primary {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
    margin-bottom: 8px;
}
.filter-advanced {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
}
.filter-advanced summary {
    padding: 9px 12px;
    color: var(--text-muted);
    font-size: .86rem;
}
.filter-advanced[open] summary {
    border-bottom: 1px solid var(--border-soft);
}
.filter-advanced-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px;
}
.filter-advanced-grid .field {
    margin: 0;
}
.opportunity-kanban-card {
    display: grid;
    gap: 8px;
}
.opportunity-card-top {
    align-items: flex-start;
}
.opportunity-card-title {
    margin: 2px 0 0;
    color: var(--text);
    line-height: 1.35;
}
.opportunity-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text);
    background: var(--metric-bg);
    font-size: .78rem;
}
.opportunity-evidence {
    margin: 2px 0;
}
.opportunity-context-ok {
    color: var(--ok);
    font-size: .78rem;
}
.opportunity-next-step {
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid var(--border-soft);
    border-left-width: 3px;
    border-radius: 8px;
    background: var(--subtle-bg);
}
.opportunity-next-step span {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.opportunity-next-step strong {
    color: var(--text);
    font-size: .86rem;
}
.opportunity-next-step.priority-context,
.opportunity-next-step.priority-classify {
    border-left-color: var(--warn);
}
.opportunity-next-step.priority-proposal {
    border-left-color: var(--accent);
}
.opportunity-next-step.priority-closed {
    border-left-color: var(--ok);
}
.opportunity-card-form,
.opportunity-list-form {
    margin-top: 4px;
}
.opportunity-card-form {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(82px, .55fr) auto;
    gap: 8px;
}
.kanban-card .opportunity-card-form {
    grid-template-columns: 1fr;
}
.kanban-card .opportunity-card-form .btn {
    width: 100%;
}
.opportunity-list-wrap {
    overflow-x: auto;
}
.opportunity-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.opportunity-pagination span {
    color: var(--text-muted);
    font-size: .86rem;
}
.opportunity-load-more {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}
.opportunity-list-table td {
    vertical-align: top;
}
.opportunity-list-table .context-warning {
    margin: 6px 0 0;
}
.opportunity-list-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(80px, .55fr) auto;
    gap: 6px;
    align-items: center;
}
.opportunity-list-form select,
.opportunity-list-form input,
.opportunity-card-form select,
.opportunity-card-form input {
    min-width: 0;
    width: 100%;
}
.checkins-head {
    align-items: flex-end;
}
.checkin-trend-strip span {
    min-width: 150px;
}
.checkin-filter-shell {
    margin-top: 10px;
}
.checkin-advanced-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
}
.checkin-list-table td {
    vertical-align: top;
}
.checkin-row-attention td {
    background: color-mix(in srgb, var(--warn) 5%, transparent);
}
.checkin-context-tags {
    margin-top: 8px;
}
.checkin-inline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.checkin-trend {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--metric-bg);
    font-size: .78rem;
}
.checkin-trend.trend-melhorando {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok), transparent 62%);
}
.checkin-trend.trend-estavel {
    color: var(--text);
}
.checkin-trend.trend-piorando {
    color: var(--err);
    border-color: color-mix(in srgb, var(--err), transparent 58%);
}
.checkin-score-main {
    display: grid;
    gap: 2px;
    width: fit-content;
    min-width: 96px;
    padding: 7px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
}
.checkin-score-main span {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.checkin-score-main strong {
    color: var(--text);
}
.checkin-score-strip {
    max-width: 340px;
}
.checkin-summary-text {
    margin: 0;
    max-width: 520px;
    color: var(--text);
    line-height: 1.42;
    overflow-wrap: anywhere;
}
.checkin-pending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.checkin-pending-list span {
    display: inline-flex;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--subtle-bg);
    font-size: .78rem;
}
.checkin-context-warning {
    margin-top: 8px;
}

.reports-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.reports-filter-shell {
    margin-top: 18px;
}

.reports-section-grid,
.reports-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.reports-table td {
    vertical-align: top;
}

.reports-table-wrap {
    overflow-x: auto;
}
.soft-badge,
.flag-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: .78rem;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    background: rgba(255,255,255,.04);
}
.flag-safe { color: var(--ok); border-color: color-mix(in srgb, var(--ok), transparent 60%); }
.soft-badge.status-green { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, var(--border-soft)); background: rgba(61,220,132,.09); }
.flag-care,
.flag-warning { color: #f2b84b; border-color: rgba(242,184,75,.42); }
.flag-danger,
.flag-critical { color: var(--err); border-color: color-mix(in srgb, var(--err), transparent 58%); }
.flag-pending { color: var(--text-muted); border-color: var(--border-soft); }
.project-status-badge {
    width: fit-content;
    font-weight: 800;
}
.project-status-badge.status-ok,
.status-pill.status-ok {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 38%, var(--border-soft));
    background: rgba(71, 199, 130, .09);
}
.project-status-badge.status-warn,
.status-pill.status-warn {
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 42%, var(--border-soft));
    background: rgba(255, 184, 77, .09);
}
.project-status-badge.status-err,
.status-pill.status-err {
    color: var(--err);
    border-color: color-mix(in srgb, var(--err) 44%, var(--border-soft));
    background: rgba(255, 60, 75, .09);
}
.project-status-badge.status-neutral,
.status-pill.status-neutral {
    color: var(--text-muted);
    border-color: var(--border-soft);
    background: var(--subtle-bg);
}
.gap-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.gap-care { color: #f2b84b; }
.gap-danger,
.gap-critical { color: var(--err); }

/* ========== Avaliação sistemática de reuniões ========== */
.eval-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.035);
}
.eval-summary.eval-safe { border-color: rgba(61, 220, 132, .38); }
.eval-summary.eval-care { border-color: rgba(242,184,75,.44); }
.eval-summary.eval-danger,
.eval-summary.eval-critical { border-color: rgba(255,77,77,.42); }
.eval-status,
.eval-value {
    margin-top: 4px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}
.score-pills,
.eval-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}
.score-pills { margin: 0 0 12px; }
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255,255,255,.035);
    font-size: .82rem;
}
.score-pill strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.score-1 strong,
.score-2 strong { color: var(--err); }
.score-3 strong { color: var(--warn); }
.score-4 strong,
.score-5 strong { color: var(--ok); }
.eval-row {
    margin: 8px 0;
    color: var(--text-muted);
    font-size: .86rem;
}
.eval-row.compact { margin: 0; }
.eval-notes {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
}
.eval-notes ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--text-muted);
}
@media (max-width: 760px) {
    .eval-summary { grid-template-columns: 1fr; }
}
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}
.meeting-page-actions {
    margin: 8px 0 14px;
}
.meeting-summary-grid {
    align-items: start;
}
.meeting-summary-main {
    min-height: 100%;
}
.meeting-summary-meta {
    margin-top: 14px;
}
.meeting-participants {
    margin-top: 8px;
}
.meeting-summary-eval {
    margin-top: 14px;
}
.meeting-summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}
.meeting-summary-actions {
    display: grid;
    gap: 8px;
}
.meeting-summary-action {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.meeting-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.section-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding: 8px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
    backdrop-filter: blur(12px);
}
.section-tabs a {
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text-muted);
    text-decoration: none;
}
.section-tabs a:hover {
    color: var(--text);
    border-color: var(--border-soft);
    background: var(--subtle-bg);
}
.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.ops-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.ops-metric {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-raised);
    box-shadow: var(--shadow-soft);
    display: flex; flex-direction: column; gap: 4px;
    transition: box-shadow .15s;
}
.score-mini-strip {
    display: flex;
    gap: 0;
    padding: 0;
    background: var(--metric-bg);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-bottom: 16px;
}
.score-mini-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    flex: 1;
    gap: 3px;
    text-align: center;
    padding: 10px 8px 9px;
    border-right: 1px solid var(--border-soft);
}
.score-mini-item:last-child {
    border-right: none;
}
.score-mini-item .ops-label {
    font-size: .64rem;
    letter-spacing: .05em;
}
.score-mini-item strong {
    font-size: 1.25rem;
    line-height: 1.1;
}
.score-mini-avg {
    background: color-mix(in srgb, var(--accent) 6%, var(--metric-bg));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.eval-dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.eval-dim-block { display: flex; flex-direction: column; gap: 4px; }
/* Eval form v2 */
.coordinator-eval-card { border: 1px solid var(--border-soft, rgba(255,255,255,.1)); border-radius: var(--radius, 8px); margin-bottom: 16px; }
.eval-form-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; padding: 10px 14px; font-size: .875rem; color: var(--text-muted); user-select: none; }
.eval-form-summary::before { content: '▸'; font-size: .75rem; transition: transform .15s; }
details[open] .eval-form-summary::before { transform: rotate(90deg); }
.eval-form-body { padding: 0 14px 14px; }
.eval-dimension-grid-v2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.eval-dim-block-v2 { display: flex; flex-direction: column; gap: 4px; }
.eval-dim-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.eval-dim-label { font-size: .8rem; flex: 1; }
.eval-score-select { font-size: .8rem; padding: 2px 4px; border-radius: 4px; border: 1px solid var(--border-subtle, rgba(255,255,255,.1)); background: transparent; color: inherit; cursor: pointer; width: 80px; flex-shrink: 0; }
.eval-score-general { width: 100%; }
.eval-justification-input { font-size: .8rem; padding: 4px 6px; border-radius: 4px; border: 1px solid var(--border-subtle, rgba(255,255,255,.1)); background: transparent; color: inherit; width: 100%; box-sizing: border-box; }
.eval-general-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px; margin-bottom: 10px; }
.eval-obs-wrap { display: flex; flex-direction: column; gap: 4px; }
.eval-highlights-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.eval-submit-row { display: flex; align-items: center; gap: 10px; }
.objectives-checklist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.objective-item { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; cursor: pointer; }
.objective-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.objective-done { text-decoration: line-through; opacity: .55; }
/* Objetivos individuais */
.objectives-field { grid-column: 1 / -1; }
.objectives-individual-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; min-height: 24px; }
.objective-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--surface-2, rgba(255,255,255,.04)); font-size: .875rem; }
.objective-row:hover { background: var(--surface-3, rgba(255,255,255,.07)); }
.objective-text { flex: 1; min-width: 0; }
.objective-status-done .objective-text { text-decoration: line-through; opacity: .5; }
.objective-status-cancelled .objective-text { opacity: .35; }
.objective-status-form, .objective-delete-form { display: inline; }
.obj-status-select { font-size: .8rem; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border-subtle, rgba(255,255,255,.1)); background: transparent; color: inherit; cursor: pointer; }
.obj-status-select.obj-status-done { color: var(--ok, #4caf50); }
.obj-status-select.obj-status-cancelled { opacity: .5; }
.objective-add-form { display: flex; gap: 8px; margin-top: 6px; }
.objective-add-input { flex: 1; }
.score-prev-value { font-size: .78rem; color: var(--text-muted); }
.flag-change-alert { font-size: .78rem; color: var(--warn); font-weight: 600; }
/* Evidence table filter */
.evidence-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.evidence-filter-input { flex: 1; max-width: 340px; }
.evidence-count-label { white-space: nowrap; }
.evidence-cell { position: relative; }
.evidence-inline-details summary { cursor: pointer; list-style: none; }
.evidence-inline-details summary::-webkit-details-marker { display: none; }
.evidence-full { margin-top: 4px; font-size: .8rem; }
.evidence-copy-btn { margin-left: 4px; cursor: pointer; background: none; border: none; color: inherit; font-size: .75rem; opacity: .5; padding: 0 2px; vertical-align: middle; }
.evidence-copy-btn:hover { opacity: 1; }
.ops-metric:hover { box-shadow: var(--shadow-elevated); }
.project-ops-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.ops-label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.ops-metric strong {
    display: block;
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.ops-metric small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}
.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.project-card {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.03);
}
.project-card h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.project-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.client-profile-context {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border-soft));
}
.client-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.profile-signal {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.profile-signal span {
    color: var(--text-muted);
    font-size: .76rem;
    text-transform: uppercase;
}
.profile-signal strong {
    font-size: 1.15rem;
}
.profile-signal small {
    color: var(--text-muted);
}
.profile-derived-blocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.stakeholder-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.stakeholder-chip {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-size: .78rem;
}
.stakeholder-chip.is-account,
.account-badge {
    color: var(--accent-strong);
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border-soft));
    background: rgba(255, 43, 56, .08);
}
.stakeholder-inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 6px;
    align-items: center;
}
.stakeholder-inline-form input,
.stakeholder-inline-form select {
    min-height: 32px;
    font-size: .82rem;
}
.project-stakeholder-list {
    display: grid;
    gap: 10px;
}

.team-admin-grid {
    align-items: start;
}

.team-user-form {
    display: grid;
    gap: 14px;
}

.permission-editor summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.permission-grid label {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    background: var(--subtle-bg);
}

.permission-grid span {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}

.permission-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 420px;
}

.permission-chip-list span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 6px;
    border: 1px solid var(--border-soft);
    background: var(--subtle-bg);
    color: var(--text-muted);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 10px;
}

.compact-permission-editor form {
    display: grid;
    gap: 10px;
    min-width: min(640px, 80vw);
    margin-top: 10px;
}
.project-archive-banner {
    border-color: color-mix(in srgb, var(--warn) 32%, var(--border-soft));
    background: color-mix(in srgb, var(--warn) 9%, var(--bg-raised));
}
.project-archive-action {
    position: relative;
}
.project-archive-action summary {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
}
.project-archive-action form {
    display: grid;
    gap: 8px;
    min-width: 220px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    background: var(--bg-raised);
    box-shadow: var(--shadow-soft);
}
.project-stakeholders-panel {
    align-self: start;
}
.stakeholder-edit-row {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.stakeholder-operational-row {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--border-soft);
}
.stakeholder-card {
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-bg) 94%, transparent);
}
.stakeholder-card + .stakeholder-card,
.stakeholder-operational-row.stakeholder-card:first-child {
    border-top: 1px solid var(--border-soft);
    padding-top: 12px;
}
.stakeholder-operational-row:first-child {
    border-top: 0;
    padding-top: 0;
}
.stakeholder-identity,
.stakeholder-context,
.stakeholder-correction {
    min-width: 0;
}
.stakeholder-row-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 10px;
    cursor: pointer;
}
.stakeholder-row-summary > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.stakeholder-row-summary strong,
.stakeholder-row-summary small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.stakeholder-summary-badges {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.stakeholder-row-summary::after,
.score-item-summary::after {
    content: "recolher";
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.stakeholder-operational-row:not([open]) .stakeholder-row-summary::after,
.score-item-row:not([open]) .score-item-summary::after {
    content: "expandir";
}
.stakeholder-row-body {
    display: grid;
    grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.1fr) minmax(280px, 1fr);
    gap: 12px;
}
.stakeholder-name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.stakeholder-name-line strong {
    min-width: 0;
    overflow-wrap: anywhere;
}
.stakeholder-meta-grid,
.stakeholder-context-grid {
    margin-top: 8px;
}
.stakeholder-fallback-note {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.35;
}
.stakeholder-attendance {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    background: var(--subtle-bg);
    font-size: .76rem;
    font-weight: 700;
}
.stakeholder-attendance-noshow {
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 42%, var(--border-soft));
    background: color-mix(in srgb, var(--warn) 9%, transparent);
}
.profile-elements-list {
    display: grid;
    gap: 6px;
}
.profile-element {
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--subtle-bg);
}
.profile-element span {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.profile-element strong {
    color: var(--text);
    font-size: .84rem;
    line-height: 1.35;
}
.profile-element-editor select,
.profile-element-editor textarea {
    width: 100%;
}
.stakeholder-context {
    display: grid;
    align-content: start;
    gap: 7px;
}
.stakeholder-correction {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
    align-content: start;
}
.stakeholder-correction > label:not(.checkbox-inline) {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.stakeholder-correction > label > span {
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 700;
}
.stakeholder-correction .checkbox-inline,
.stakeholder-correction .inline-details,
.stakeholder-correction .stakeholder-company-external {
    grid-column: 1 / -1;
}
.stakeholder-classification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}
.stakeholder-classification-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.stakeholder-specific-table-wrap {
    margin-top: 8px;
    overflow-x: visible;
}
.stakeholder-specific-table {
    min-width: 0;
    width: 100%;
}
.stakeholder-specific-table,
.stakeholder-specific-table thead,
.stakeholder-specific-table tbody,
.stakeholder-specific-table tr,
.stakeholder-specific-table td {
    display: block;
}
.stakeholder-specific-table thead {
    display: none;
}
.stakeholder-specific-table tr {
    display: grid;
    gap: 5px;
    border-top: 1px solid var(--border-soft);
    padding-top: 6px;
}
.stakeholder-specific-table th,
.stakeholder-specific-table td {
    font-size: .78rem;
    vertical-align: top;
}
.stakeholder-specific-table td {
    display: grid;
    grid-template-columns: minmax(88px, .42fr) minmax(0, 1fr);
    gap: 8px;
    border: 0;
    padding: 2px 0;
    min-width: 0;
}
.stakeholder-specific-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-weight: 700;
}
.stakeholder-specific-table td > * {
    min-width: 0;
}
.stakeholder-correction .inline-details textarea {
    margin-top: 6px;
    width: 100%;
}
.stakeholder-correction input,
.stakeholder-correction select,
.stakeholder-correction textarea {
    min-width: 0;
    width: 100%;
}
.stakeholder-correction .btn {
    justify-self: start;
}
.stakeholder-summary {
    display: grid;
    gap: 3px;
}
.stakeholder-profile-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.person-kind-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 700;
}
.person-kind-venturini {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 44%, var(--border-soft));
}
.person-kind-client {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border-soft));
}
.people-profile-list {
    display: grid;
    gap: 8px;
}
.people-profile-list.compact {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.person-profile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--panel-bg);
}
.person-row-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.people-timeline {
    display: grid;
    gap: 8px;
}
.people-timeline.compact {
    gap: 5px;
}
.people-timeline-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}
.person-mini-timeline summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: .82rem;
}
.project-stakeholder-form {
    grid-template-columns: minmax(130px, 1fr) minmax(110px, .75fr) minmax(120px, 1fr) minmax(96px, .65fr) auto minmax(120px, .8fr) auto;
}
.project-stakeholder-form.stakeholder-correction {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    color: var(--text-muted);
    font-size: .82rem;
}
.checkbox-inline input {
    min-height: auto;
}
.inline-details {
    min-width: 0;
}
.inline-details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: .82rem;
}
.inline-details textarea,
.inline-details input {
    width: 100%;
    margin-top: 6px;
}
.compact-grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.025);
}
.compact-grid-form .span-2 {
    grid-column: 1 / -1;
}
.action-create-form {
    margin-bottom: 14px;
    align-items: end;
}
.action-manual-create {
    margin: 0 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
}
.action-manual-create summary {
    padding: 9px 12px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 700;
}
.action-manual-create[open] summary {
    border-bottom: 1px solid var(--border-soft);
}
.action-manual-create .action-create-form {
    padding: 12px;
}
.action-create-form input[type="text"] {
    min-width: 180px;
}
.action-row-form {
    justify-content: flex-start;
}
.action-row-prefilled {
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-bg) 94%, transparent);
}
.action-inline-details {
    margin-top: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
    overflow: hidden;
}
.action-inline-details summary {
    cursor: pointer;
    padding: 9px 11px;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 700;
}
.action-inline-details[open] summary {
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
}
.action-inline-details .action-row-prefilled {
    border: 0;
    border-radius: 0;
    background: transparent;
}
.action-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}
.action-status-grid span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
    color: var(--text-muted);
    font-size: .82rem;
}
.action-status-grid strong {
    color: var(--text);
    font-size: 1rem;
}
.action-plan-list {
    display: grid;
    gap: 10px;
}
.action-plan-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.action-plan-item.action-status-bloqueada {
    border-color: color-mix(in srgb, var(--err) 46%, var(--border-soft));
}
.action-plan-item.action-status-aguardando_cliente {
    border-color: color-mix(in srgb, var(--warn) 42%, var(--border-soft));
}
.action-sequence {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: .82rem;
}
.action-plan-main {
    min-width: 0;
}
.action-plan-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.action-inline-editor {
    margin-top: 10px;
}
.source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: .82rem;
}
.source-meta > * {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    text-decoration: none;
}
.score-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.score-card-small {
    padding: 10px 11px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.03);
}
.score-card-headline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
}
.score-card-headline strong {
    color: var(--text);
}
.score-card-small.score-1,
.score-card-small.score-2 {
    border-color: color-mix(in srgb, var(--err) 46%, var(--border-soft));
}
.score-card-small.score-4,
.score-card-small.score-5 {
    border-color: color-mix(in srgb, var(--ok) 38%, var(--border-soft));
}
.score-evidence {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.35;
}
.score-detail-panel {
    margin-top: 12px;
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
}
.score-detail-panel summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 700;
}
.score-detail-table-wrap {
    margin-top: 10px;
}
.score-detail-table td {
    vertical-align: top;
}
.score-view-toggle {
    margin-top: 12px;
}
.score-complete-view {
    margin-top: 12px;
}
.score-item-list {
    display: grid;
    gap: 10px;
}
.score-item-row {
    display: block;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-left-width: 4px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel-bg) 94%, transparent);
    min-width: 0;
}
.score-item-danger {
    border-left-color: var(--err);
}
.score-item-warn {
    border-left-color: var(--warn);
}
.score-item-ok {
    border-left-color: var(--ok);
}
.score-item-neutral {
    border-left-color: var(--border-strong);
}
.score-item-main {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}
.score-item-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr);
    gap: 12px;
    margin-top: 10px;
    min-width: 0;
}
.score-item-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.score-item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
}
.score-item-title strong {
    min-width: 0;
    overflow-wrap: anywhere;
}
.score-analysis {
    color: var(--text);
    font-size: .9rem;
    line-height: 1.38;
}
.score-summary-meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: .78rem;
}
.score-evidence-details {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--panel-bg);
}
.score-evidence-details summary {
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
}
.score-evidence-details[open] summary {
    margin-bottom: 8px;
    color: var(--text);
}
.score-context-grid {
    align-content: start;
    min-width: 0;
}
.score-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}
.score-group-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 11px;
    background: var(--panel-bg);
}
.score-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.score-history-table td {
    vertical-align: top;
}
.score-evidence-list {
    display: grid;
    gap: 10px;
}
.score-evidence-item {
    display: grid;
    gap: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 10px;
    background: color-mix(in srgb, var(--panel-bg) 92%, transparent);
}
.score-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    font-weight: 700;
}
/* v1.62.3 — .score-cell.score-cell-N: o bloco base .score-cell mais abaixo
   (~l.3716) seta color muted e vencia estas regras por ordem; a dupla classe
   garante que a cor semântica do score sempre aplique. */
.score-cell.score-cell-1,
.score-cell.score-cell-2 {
    color: var(--err);
    border-color: color-mix(in srgb, var(--err) 42%, var(--border-soft));
}
.score-cell.score-cell-4,
.score-cell.score-cell-5 {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 38%, var(--border-soft));
}
.context-warning {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    padding: 8px 9px;
    border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--border-soft));
    border-radius: 8px;
    background: rgba(255, 184, 77, .08);
    color: var(--text-muted);
    font-size: .82rem;
}
.context-warning strong {
    color: var(--warn);
}
.context-warning span {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
}
.context-warning.compact {
    margin: 6px 0 0;
    padding: 6px 7px;
}

.warning-panel,
.inline-warning {
    border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--border-soft));
    background: color-mix(in srgb, var(--warn) 10%, transparent);
}

.inline-warning {
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.86rem;
    margin: 0.65rem 0 0.9rem;
    padding: 0.7rem 0.85rem;
}
.operation-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.module-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}
.module-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-size: .76rem;
}
.module-chips-block {
    margin-top: 12px;
}
.project-shell {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}
.project-priority-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.project-priority-strip strong,
.project-priority-strip small {
    display: block;
}
.project-priority-strip strong {
    font-size: .9rem;
    font-weight: 600;
}
.project-priority-strip small {
    margin-top: 2px;
    font-size: .76rem;
    color: var(--text-muted);
}
.project-priority-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.project-side-nav {
    position: sticky;
    top: 74px;
    display: grid;
    gap: 10px;
    min-width: 0;
    max-height: calc(100svh - 92px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--panel-bg);
}
.project-side-nav-header {
    display: grid;
    gap: 2px;
    padding: 2px 2px 6px;
    border-bottom: 1px solid var(--border-soft);
}
.project-side-nav-header strong {
    color: var(--text);
}
.project-side-nav-list.project-focus-map {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 7px;
}
.project-side-nav-section {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.project-side-nav-section-title {
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.project-side-nav-list.project-focus-map a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    align-items: center;
    min-height: 0;
    padding: 10px;
    border-color: var(--border-soft);
    background: var(--workspace-bg);
}
.project-side-nav-list.project-focus-map a:hover,
.project-side-nav-list.project-focus-map a:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--border-soft));
    background: var(--subtle-bg);
    text-decoration: none;
}
.project-side-nav-list.project-focus-map a.is-active {
    border-color: color-mix(in srgb, var(--accent) 56%, var(--border-soft));
    background: color-mix(in srgb, var(--accent) 10%, var(--metric-bg));
    box-shadow: inset 3px 0 0 var(--accent);
}
.project-side-nav-list.project-focus-map strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    font-size: .95rem;
}
.project-side-nav-list.project-focus-map small {
    grid-column: 1;
    font-size: .76rem;
}
.project-side-nav-primary {
    border-left: 3px solid var(--accent);
}
.project-side-nav .project-collapse-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
}
.project-side-nav .project-collapse-actions .btn {
    width: 100%;
}
.project-content,
.project-workspace {
    min-width: 0;
}
.project-workspace {
    display: grid;
    gap: 16px;
}
.project-score-section {
    scroll-margin-top: 84px;
}
.project-score-central-panel {
    display: grid;
    gap: 12px;
}
.project-section-collapsible {
    display: grid;
    gap: 10px;
}
.project-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px 10px 13px;
    border: 1px solid var(--border-soft);
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: var(--metric-bg);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: border-left-color .15s, background .15s;
}
details[open] > .project-section-summary {
    border-left-color: var(--accent);
}
.project-section-summary:hover {
    background: var(--subtle-bg);
    border-left-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.project-section-summary > span:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.project-section-summary strong,
.project-section-summary small {
    min-width: 0;
    overflow-wrap: anywhere;
}
.project-section-summary strong {
    color: var(--text);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: -.01em;
}
.project-section-summary small {
    color: var(--text-muted);
    font-size: .74rem;
}
.project-section-summary::after {
    content: "▾";
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .2s;
    display: inline-block;
}
.project-section-collapsible:not([open]) .project-section-summary::after {
    transform: rotate(-90deg);
}
.project-section-body {
    min-width: 0;
}
.project-section-lazy-body {
    display: grid;
    gap: 12px;
}
.project-section-fragment,
.panel-lite {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.project-lazy-section.is-loading .project-section-summary {
    border-color: rgba(255, 43, 56, .28);
}
.project-lazy-section.has-error .project-section-summary {
    border-color: rgba(239, 68, 68, .45);
}
.project-section-skeleton {
    display: grid;
    gap: 10px;
    padding: 4px 0;
}
.skeleton-line {
    display: block;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--border-soft), var(--metric-bg), var(--border-soft));
    background-size: 220% 100%;
    animation: skeleton-shimmer 1.35s ease-in-out infinite;
}
.skeleton-line-strong {
    height: 18px;
    max-width: 360px;
}
.skeleton-line-short {
    max-width: 220px;
}
.project-section-lazy-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.project-section-error {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, .35);
    border-radius: 8px;
    background: rgba(239, 68, 68, .08);
}
.project-section-error strong {
    color: var(--text);
}
@keyframes skeleton-shimmer {
    0% { background-position: 220% 0; }
    100% { background-position: -220% 0; }
}
details.project-section-collapsible:not([open]) > .project-section-body,
details.project-section-collapsible:not([open]) > :not(summary) {
    display: none !important;
}
.project-field-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 8px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--metric-bg);
    font-size: .82rem;
}
.project-collapse-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}
.toggle-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-size: .82rem;
    white-space: nowrap;
}
.toggle-check input {
    margin: 0;
}
.project-hide-evidence [data-field-group~="evidence"],
.project-hide-metadata [data-field-group~="metadata"],
.project-hide-forms [data-field-group~="forms"],
.is-hidden {
    display: none !important;
}
.project-operational-summary {
    display: grid;
    gap: 14px;
}
.project-operational-summary-head,
.meeting-context-title,
.action-kanban-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.project-operational-summary-head h2 {
    margin-bottom: 3px;
}
.project-summary-grid,
.meeting-metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}
.project-summary-grid > div,
.meeting-metadata-grid > div,
.project-latest-meeting {
    min-width: 0;
    padding: 10px 13px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
    transition: border-color .15s;
}
.project-summary-grid > div:hover,
.meeting-metadata-grid > div:hover {
    border-color: var(--border);
}
.project-summary-grid dt,
.meeting-metadata-grid dt {
    margin: 0 0 3px;
    color: var(--text-muted);
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.project-summary-grid dd,
.meeting-metadata-grid dd {
    margin: 0;
    color: var(--text);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.project-latest-meeting {
    display: grid;
    gap: 6px;
}
.project-latest-meeting strong {
    color: var(--text);
}
.project-latest-meeting .btn {
    justify-self: start;
}
.strategy-evidence-list,
.meta-project-signal-list,
.area-evidence-items {
    display: grid;
    gap: 10px;
}
.strategy-evidence-list {
    margin-top: 12px;
}
.strategy-evidence-card,
.meta-project-signal,
.area-evidence-card,
.area-evidence-item {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--metric-bg);
}
.strategy-evidence-card,
.meta-project-signal {
    display: grid;
    gap: 8px;
}
.strategy-evidence-card.is-missing,
.meta-project-signal.is-missing {
    border-style: dashed;
    color: var(--text-muted);
}
.strategy-evidence-card p,
.meta-project-signal p,
.area-evidence-item p {
    margin: 0;
}
.strategy-evidence-head,
.area-evidence-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.strategy-evidence-head strong,
.area-evidence-head h3 {
    min-width: 0;
    overflow-wrap: anywhere;
}
.area-evidence-panel {
    grid-column: 1 / -1;
}
.area-evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.area-evidence-card {
    display: grid;
    align-content: start;
    gap: 10px;
}
.area-evidence-head h3 {
    margin: 0;
    font-size: .95rem;
}
.area-evidence-item {
    display: grid;
    gap: 7px;
    border-left: 3px solid var(--border);
    background: var(--workspace-bg);
}
.evidence-tone-danger {
    border-left-color: var(--err);
}
.evidence-tone-warn {
    border-left-color: var(--warn);
}
.evidence-tone-neutral {
    border-left-color: var(--border);
}
.conditional-form-card {
    margin: 0 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--metric-bg);
}
.conditional-form-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    font-weight: 800;
}
.conditional-form-card > summary small {
    color: var(--text-muted);
    font-weight: 500;
}
.conditional-form-card > form {
    padding: 0 12px 12px;
}
.action-view-toggle {
    margin: 12px 0;
}
.action-quick-status-form {
    margin: 0;
}
.action-quick-status-form select {
    min-height: 30px;
    max-width: 190px;
    padding: 5px 28px 5px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--bg-deep);
    color: var(--text);
    font-size: .78rem;
}
.action-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px;
}
.action-kanban-column {
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--metric-bg);
    overflow: hidden;
}
.action-kanban-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-soft);
}
.action-kanban-column-head h3 {
    margin: 0;
    font-size: .9rem;
}
.action-kanban-lane {
    display: grid;
    gap: 8px;
    padding: 10px;
}
.action-kanban-card {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.action-kanban-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
}
.meeting-context-list {
    display: grid;
    gap: 10px;
}
.meeting-context-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.meeting-context-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.meeting-derived-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.meeting-derived-grid > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
}
.meeting-derived-grid ul {
    margin: 6px 0 0 16px;
    padding: 0;
}
.meeting-derived-grid li {
    margin: 0 0 4px;
    color: var(--text);
}
.meeting-context-actions {
    display: grid;
    align-content: start;
    justify-items: end;
    gap: 8px;
}
.project-focus-map {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--border-soft);
}
.project-focus-map a {
    display: grid;
    gap: 4px;
    min-height: 86px;
    padding: 12px 13px;
    background: var(--metric-bg);
    color: var(--text-muted);
    text-decoration: none;
}
.project-focus-map a:hover {
    background: var(--bg-hover);
}
.project-focus-map span {
    font-size: .74rem;
    text-transform: uppercase;
}
.project-focus-map strong {
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.15;
}
.project-focus-map small {
    line-height: 1.25;
}
.project-workspace-notice {
    margin-bottom: 14px;
}
.compact-row-actions {
    gap: 5px;
}
.compact-row-actions .btn {
    white-space: nowrap;
}
.anchor-offset {
    display: block;
    position: relative;
    top: -78px;
    visibility: hidden;
}
.section-subtitle {
    margin: 14px 0 8px;
    font-size: .92rem;
    color: var(--text-muted);
}
.project-intelligence-section {
    align-items: start;
}
.project-intelligence-derived-panel {
    grid-column: 1 / -1;
}
.intelligence-signal-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.intelligence-signal-card {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    background: var(--metric-bg);
}
.intelligence-signal-card p {
    margin: 0;
}
.intelligence-signal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.intelligence-signal-head > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.intelligence-signal-head strong,
.intelligence-signal-head span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.intelligence-signal-danger {
    border-left-color: var(--err);
}
.intelligence-signal-warn {
    border-left-color: var(--warn);
}
.intelligence-signal-ok {
    border-left-color: var(--ok);
}
.intelligence-signal-neutral {
    border-left-color: var(--border);
}
.project-list-table .project-row-title {
    color: var(--text);
    text-decoration: none;
}
.project-list-table .project-row-title:hover {
    color: var(--accent-strong);
}
.project-index-panel {
    padding: 0;
    overflow: hidden;
}
.project-index-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.project-index-head h2 {
    margin: 0 0 4px;
}
.project-index-list {
    display: grid;
}
.project-index-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.7fr) minmax(110px, .45fr) minmax(230px, .9fr) minmax(190px, auto);
    gap: 16px;
    align-items: start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.project-index-row:last-child {
    border-bottom: 0;
}
.project-index-row:hover {
    background: var(--table-hover);
}
.project-index-row-archived {
    opacity: .78;
    background: color-mix(in srgb, var(--subtle-bg) 72%, transparent);
}
.project-index-main {
    min-width: 0;
}
.project-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.project-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0 4px;
    color: var(--text-muted);
    font-size: .82rem;
}
.project-meta-line > * {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.project-meta-line > * + *::before {
    content: "·";
    color: var(--border-soft);
    margin-right: 2px;
}
.project-operational-note {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: .8rem;
}
.project-index-health {
    display: grid;
    justify-items: start;
    gap: 6px;
}
.project-index-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.project-index-kpis span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--workspace-bg);
    color: var(--text-muted);
    font-size: .76rem;
}
.project-index-kpis strong {
    overflow: hidden;
    color: var(--text);
    font-size: .88rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.project-index-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
}
.project-list-row.category-executar {
    background: var(--workspace-bg);
}
.project-row-subtitle {
    display: inline-flex;
    margin-top: 5px;
    padding: 2px 7px;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-soft));
    border-radius: 999px;
    color: var(--accent-strong);
    background: rgba(255, 43, 56, .07);
    font-size: .76rem;
}
.project-modules-section {
    align-items: start;
}
.project-module-list {
    display: grid;
    gap: 8px;
}
.module-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.module-main {
    min-width: 0;
}
.module-main > strong {
    display: block;
    color: var(--text);
    line-height: 1.25;
}
.module-side {
    display: grid;
    justify-items: end;
    gap: 6px;
    align-content: start;
}
.csat-cell {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 108px;
    padding: 8px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.025);
    color: var(--text-muted);
    font-size: .78rem;
}
.csat-cell strong {
    color: var(--text-muted);
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
}
.csat-cell.has-csat {
    border-color: color-mix(in srgb, var(--ok) 34%, var(--border-soft));
}
.csat-cell.has-csat strong {
    color: var(--ok);
}
.evidence-snippet {
    margin-top: 8px;
    padding: 8px 9px;
    border-left: 2px solid var(--border-soft);
    color: var(--text-muted);
    background: rgba(255,255,255,.025);
    font-size: .82rem;
    line-height: 1.35;
}
.evaluation-score-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}
.view-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 12px;
    padding: 3px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--metric-bg);
}
.segmented-btn {
    min-height: 30px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}
.segmented-btn.active,
.segmented-btn:hover {
    background: var(--accent);
    color: #fff;
}
.meeting-evaluation-matrix {
    overflow-x: auto;
}
.meeting-evaluation-matrix table {
    min-width: 980px;
}
.evaluation-dimension-view {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 10px;
}
.dimension-eval-card,
.compact-eval-row,
.context-opportunity {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--workspace-bg);
}
.dimension-eval-card {
    padding: 10px;
}
.dimension-eval-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.dimension-eval-list {
    display: grid;
    gap: 6px;
}
.dimension-eval-list > div,
.compact-eval-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.compact-eval-row {
    padding: 10px 12px;
    margin-bottom: 7px;
}
.compact-score-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}
.compact-score-line span {
    padding: 2px 6px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--subtle-bg);
    font-size: .76rem;
}
.score-cell {
    display: inline-grid;
    min-width: 34px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    color: var(--text-muted);
    background: rgba(255,255,255,.025);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.score-cell.score-1,
.score-cell.score-2 {
    color: var(--err);
    border-color: color-mix(in srgb, var(--err) 42%, var(--border-soft));
    background: rgba(255, 60, 75, .07);
}
.score-cell.score-3 {
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 38%, var(--border-soft));
    background: rgba(255, 184, 77, .07);
}
.score-cell.score-4,
.score-cell.score-5 {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 34%, var(--border-soft));
    background: rgba(71, 199, 130, .07);
}
.context-opportunity-list {
    display: grid;
    gap: 8px;
}
.context-opportunity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
    gap: 12px;
    padding: 12px;
}
.project-opportunity-card {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: start;
}
.project-opportunity-body {
    min-width: 0;
}
.project-opportunity-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.project-opportunity-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(140px, .9fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, .8fr) minmax(110px, .7fr) minmax(110px, .7fr) minmax(180px, 1.2fr) auto;
    gap: 8px;
    align-items: end;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
}
.project-opportunity-form .field {
    margin: 0;
}
.project-opportunity-form .opportunity-edit-details {
    align-self: stretch;
}
.project-opportunity-correction {
    grid-column: auto;
    grid-template-columns: 1fr;
    align-content: start;
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 1px solid var(--border-soft);
}
.project-opportunity-fast-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.project-opportunity-fast-fields .field,
.project-opportunity-correction .field {
    margin: 0;
}
.project-opportunity-correction .opportunity-edit-details {
    margin-top: 8px;
}
.project-opportunity-correction .opportunity-edit-details summary {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: .84rem;
}
.project-opportunity-correction .opportunity-edit-details input,
.project-opportunity-correction .opportunity-edit-details textarea {
    width: 100%;
}
.project-opportunity-correction > .btn {
    justify-self: end;
    margin-top: 8px;
}
.context-opportunity p {
    margin: 4px 0 0;
    color: var(--text-muted);
}
.context-opportunity-side {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 6px;
}
.ingestion-support-rail {
    display: grid;
    gap: 10px;
    margin: 10px 0 14px;
}
.ingestion-upload-details,
.ingestion-guide-shell {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
}
.ingestion-upload-details > summary,
.ingestion-guide-shell > summary {
    cursor: pointer;
    padding: 10px 12px;
    color: var(--text);
    font-weight: 700;
}
.ingestion-upload-details[open] > summary,
.ingestion-guide-shell[open] > summary {
    border-bottom: 1px solid var(--border-soft);
}
.ingestion-upload-body {
    padding: 12px;
}
.ingestion-upload-panel {
    padding: 0;
    border: 0;
    background: transparent;
}
.ingestion-ops-summary {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    margin: 16px 0 10px;
}
.ingestion-ops-summary .card {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 8px;
}
.ingestion-ops-summary .card-value {
    font-size: 1.45rem;
}
.ingestion-decision-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(110px, .55fr));
    gap: 0;
    margin: 10px 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
    overflow: hidden;
}
.ingestion-decision-strip > div {
    min-width: 0;
    padding: 12px 14px;
    border-right: 1px solid var(--border-soft);
}
.ingestion-decision-strip > div:last-child {
    border-right: 0;
}
.ingestion-decision-strip strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.25;
}
.ingestion-decision-strip p {
    margin: 5px 0 0;
}
.ingestion-filter-shell {
    align-items: end;
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.02);
}
.ingestion-guide {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 10px;
}
.guide-step {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 8px;
}
.guide-number {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--text);
    font-weight: 700;
    font-size: .82rem;
}
.guide-step strong {
    display: block;
    margin-bottom: 2px;
}
.guide-step p {
    margin: 0;
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.35;
}
.ingestion-workspace {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.ingestion-lane {
    min-width: 0;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
    overflow: hidden;
}
.lane-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-soft);
}
.lane-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
}
.lane-head h2 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.lane-head p {
    margin: 0;
}
.warn-badge {
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 38%, var(--border-soft));
    background: rgba(255, 184, 77, .08);
}
.ingestion-list {
    display: grid;
    gap: 0;
}
.upload-simple-form {
    display: grid;
    gap: 12px;
}
.upload-primary-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.upload-file-input {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--text-muted);
}
.upload-file-input::file-selector-button {
    margin-right: 10px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 7px 10px;
    font-weight: 700;
    cursor: pointer;
}
.upload-submit {
    display: flex;
    align-items: end;
    min-height: 42px;
}
.advanced-upload {
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
}
.advanced-upload summary {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
}
.upload-advanced-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.ingestion-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
}
.ingestion-item:last-child {
    border-bottom: 0;
}
.ingestion-item-main {
    min-width: 0;
}
.ingestion-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}
.ingestion-item-main strong {
    display: block;
    overflow: visible;
    line-height: 1.28;
    white-space: normal;
    word-break: break-word;
}
.ingestion-title-main {
    max-width: 100%;
}
.ingestion-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-top: 4px;
}
.ingestion-title-detail {
    max-width: 100%;
    margin-top: 2px;
    overflow: visible;
    color: var(--text-muted);
    font-size: .76rem;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
}
.ingestion-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}
.ingestion-context span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--subtle-bg);
    color: var(--text-muted);
    font-size: .76rem;
}
.ingestion-item-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 9px 0 0;
}
.ingestion-item-context-grid div {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--subtle-bg);
}
.ingestion-item-context-grid dt {
    margin: 0 0 2px;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}
.ingestion-item-context-grid dd {
    margin: 0;
    color: var(--text);
    font-size: .8rem;
    line-height: 1.28;
    word-break: break-word;
}
.ingestion-context-gap {
    border-color: color-mix(in srgb, var(--warn) 42%, var(--border-soft)) !important;
    background: rgba(255, 184, 77, .08) !important;
}
.ingestion-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--border-soft);
}
.ingestion-item-side {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 6px;
}
.compact-actions {
    justify-content: flex-end;
}
.ingestion-empty-state {
    margin: 0;
    padding: 14px;
}
.ingestion-table {
    table-layout: auto;
}
.ingestion-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
.detail-panel .ingestion-table-wrap {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
}
.ingestion-table-wrap .ingestion-table {
    min-width: 1120px;
}
.ingestion-table td {
    min-width: 0;
    word-break: break-word;
}
.ingestion-table td[data-label="Ação"] {
    min-width: 172px;
}
.ingestion-table-actions {
    min-width: max-content;
    justify-content: flex-start;
}
.ingestion-table-actions .btn {
    white-space: nowrap;
}
.detail-panel {
    padding: 0;
}
.detail-summary {
    cursor: pointer;
    padding: 14px 16px;
    color: var(--text);
    font-weight: 700;
    list-style: none;
}
.detail-summary::-webkit-details-marker {
    display: none;
}
.detail-summary::after {
    content: "abrir";
    float: right;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 500;
}
.detail-panel[open] .detail-summary::after {
    content: "fechar";
}
.detail-body {
    padding: 0 16px;
}
.detail-panel > table,
.detail-panel > p,
.detail-panel > .data {
    margin-left: 16px;
    margin-right: 16px;
    width: calc(100% - 32px);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,.035);
    color: var(--text-muted);
    font-size: .8rem;
    white-space: nowrap;
}
.status-warn {
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 38%, var(--border-soft));
    background: rgba(255, 184, 77, .08);
}
.status-err {
    color: var(--err);
    border-color: color-mix(in srgb, var(--err) 42%, var(--border-soft));
    background: rgba(255, 60, 75, .08);
}
.status-ok {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 34%, var(--border-soft));
    background: rgba(71, 199, 130, .08);
}
.status-accent {
    color: var(--accent-strong);
    border-color: color-mix(in srgb, var(--accent) 44%, var(--border-soft));
    background: rgba(255, 43, 56, .08);
}
.next-step {
    color: var(--text);
    font-size: .86rem;
    white-space: nowrap;
}
.ingestion-item-context-grid .next-step {
    white-space: normal;
    overflow-wrap: anywhere;
}
.operation-form {
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(255,255,255,.025);
}
.operation-form > label {
    display: block;
    margin-bottom: 8px;
}
.operation-form input[type="number"] {
    width: 96px;
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    white-space: nowrap;
}
.segmented {
    display: inline-flex;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-raised);
}
.seg-btn {
    border: 0;
    color: var(--text-muted);
    background: transparent;
    padding: 9px 13px;
    cursor: pointer;
}
.seg-btn.active {
    color: var(--text);
    background: var(--accent);
}
.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(130px, 1fr)) minmax(150px, 1fr) minmax(130px, .8fr) minmax(130px, .8fr) auto;
    gap: 10px;
    align-items: end;
    margin: 14px 0 18px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
}
.filter-bar .field {
    min-width: 0;
}
.filter-bar input,
.filter-bar select {
    width: 100%;
}
.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.table-wrap {
    overflow-x: auto;
}
.project-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
.project-table-wrap .project-detail-table {
    min-width: 560px;
}
.project-detail-table td {
    vertical-align: top;
    word-break: break-word;
}
.dense-table {
    width: 100%;
    border-collapse: collapse;
}
.dense-table th,
.dense-table td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
    text-align: left;
}
.dense-table th {
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
}
@media (max-width: 1280px) {
    .project-index-row {
        grid-template-columns: minmax(260px, 1.4fr) minmax(210px, .9fr);
    }
    .project-index-health,
    .project-index-actions {
        justify-items: start;
    }
    .project-focus-map {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .filter-bar {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }
    .ingestion-ops-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ingestion-decision-strip {
        grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(100px, .7fr));
    }
    .ingestion-workspace {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .filter-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 1040px) {
    .project-shell {
        grid-template-columns: 1fr;
    }
    .project-side-nav {
        position: static;
        max-height: none;
    }
    .project-side-nav-list.project-focus-map {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .project-side-nav .project-collapse-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .action-kanban-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .page-head {
        display: block;
    }
    .segmented {
        margin-top: 10px;
    }
    .filter-bar {
        grid-template-columns: 1fr;
    }
    .opportunity-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opportunity-workspace-head {
        display: block;
    }
    .filter-bar.filter-bar-primary,
    .filter-advanced-grid,
    .opportunity-card-form,
    .opportunity-list-form,
    .project-opportunity-fast-fields {
        grid-template-columns: 1fr;
    }
    .opportunity-list-table,
    .opportunity-list-table thead,
    .opportunity-list-table tbody,
    .opportunity-list-table tr,
    .opportunity-list-table th,
    .opportunity-list-table td,
    .checkin-list-table,
    .checkin-list-table thead,
    .checkin-list-table tbody,
    .checkin-list-table tr,
    .checkin-list-table th,
    .checkin-list-table td {
        display: block;
    }
    .opportunity-list-table thead,
    .checkin-list-table thead {
        display: none;
    }
    .opportunity-list-table tr,
    .checkin-list-table tr {
        padding: 10px 0;
        border-top: 1px solid var(--border-soft);
    }
    .opportunity-list-table td,
    .checkin-list-table td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 6px 0;
    }
    .opportunity-list-table td::before,
    .checkin-list-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .78rem;
    }
    .project-opportunity-correction {
        grid-column: 1 / -1;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid var(--border-soft);
    }
    .project-opportunity-correction > .btn {
        justify-self: stretch;
    }
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }
    .brand {
        min-width: 0;
        gap: 7px;
    }
    .brand-sub {
        display: none;
    }
    .topbar nav {
        grid-column: 1 / -1;
        order: 3;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        padding: 2px 0 4px;
        -webkit-overflow-scrolling: touch;
    }
    .topbar nav::-webkit-scrollbar {
        display: block;
        height: 4px;
    }
    .topbar nav a {
        padding: 6px 7px;
        font-size: .82rem;
        white-space: nowrap;
    }
    .topbar .main-nav {
        gap: 2px;
    }
    .admin-menu {
        order: 2;
        justify-self: end;
    }
    .topbar .admin-menu-panel {
        grid-column: auto;
        order: initial;
        right: 0;
        overflow: visible;
        scrollbar-width: auto;
    }
    .theme-toggle {
        order: 3;
        justify-self: end;
    }
    .user-chip {
        grid-column: 1 / -1;
        order: 5;
        width: 100%;
        justify-content: space-between;
    }
    .project-index-head {
        display: block;
    }
    .project-index-row,
    .project-index-kpis,
    .project-focus-map {
        grid-template-columns: 1fr;
    }
    .project-side-nav-list.project-focus-map,
    .project-side-nav .project-collapse-actions {
        grid-template-columns: 1fr;
    }
    .project-priority-strip {
        grid-template-columns: 1fr;
    }
    .project-priority-actions {
        justify-content: stretch;
    }
    .project-priority-actions .btn {
        flex: 1 1 120px;
        text-align: center;
    }
    .project-side-nav {
        gap: 8px;
        padding: 10px;
    }
    .project-side-nav-header {
        display: none;
    }
    .project-side-nav-list.project-focus-map.project-side-nav-quick {
        display: flex;
        grid-template-columns: none;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        border: 0;
        background: transparent;
    }
    .project-side-nav-list.project-focus-map.project-side-nav-quick .project-side-nav-section {
        display: contents;
    }
    .project-side-nav-list.project-focus-map.project-side-nav-quick .project-side-nav-section-title,
    .project-side-nav-list.project-focus-map.project-side-nav-quick small {
        display: none;
    }
    .project-side-nav-list.project-focus-map.project-side-nav-quick a {
        min-width: 132px;
        min-height: 58px;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .project-operational-summary-head,
    .meeting-context-title,
    .action-plan-title,
    .action-kanban-card-head {
        display: grid;
    }
    .project-summary-grid,
    .meeting-metadata-grid,
    .meeting-derived-grid,
    .meeting-context-card,
    .action-kanban-board {
        grid-template-columns: 1fr;
    }
    .meeting-context-actions {
        justify-items: stretch;
    }
    .meeting-context-actions .btn {
        text-align: center;
    }
    .project-index-actions {
        justify-items: stretch;
    }
    .project-index-actions > .btn,
    .project-index-actions .row-actions .btn {
        text-align: center;
    }
    .compact-grid-form {
        grid-template-columns: 1fr;
    }
    .ingestion-guide {
        grid-template-columns: 1fr;
    }
    .ingestion-ops-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ingestion-decision-strip {
        grid-template-columns: 1fr;
    }
    .ingestion-decision-strip > div {
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }
    .ingestion-decision-strip > div:last-child {
        border-bottom: 0;
    }
    .ingestion-workspace {
        grid-template-columns: 1fr;
    }
    .upload-primary-row,
    .upload-advanced-grid {
        grid-template-columns: 1fr;
    }
    .ingestion-item {
        grid-template-columns: 1fr;
    }
    .ingestion-item-head,
    .ingestion-item-context-grid {
        grid-template-columns: 1fr;
    }
    .ingestion-item-actions,
    .compact-actions {
        justify-content: flex-start;
    }
    .ingestion-item-side {
        justify-items: start;
    }
    .ingestion-table,
    .ingestion-table thead,
    .ingestion-table tbody,
    .ingestion-table tr,
    .ingestion-table th,
    .ingestion-table td {
        display: block;
    }
    .ingestion-table thead {
        display: none;
    }
    .ingestion-table-wrap {
        overflow-x: visible;
    }
    .detail-panel .ingestion-table-wrap,
    .ingestion-table-wrap {
        width: 100%;
        margin: 0;
    }
    .ingestion-table-wrap .ingestion-table {
        min-width: 0;
    }
    .ingestion-table tr {
        padding: 10px 0;
        border-top: 1px solid var(--border-soft);
    }
    .ingestion-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 6px 0;
    }
    .ingestion-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .78rem;
    }
    .module-row {
        grid-template-columns: 1fr;
    }
    .client-profile-grid,
    .profile-derived-blocks,
    .evaluation-dimension-view,
    .context-opportunity,
    .stakeholder-operational-row,
    .stakeholder-row-body,
    .score-item-row,
    .score-item-body,
    .stakeholder-inline-form,
    .project-stakeholder-form,
    .project-opportunity-form {
        grid-template-columns: 1fr;
    }
    .score-item-summary,
    .stakeholder-row-summary {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .stakeholder-row-summary {
        display: grid;
    }
    .score-summary-meta,
    .stakeholder-summary-badges {
        justify-content: flex-start;
    }
    .stakeholder-classification-grid {
        grid-template-columns: 1fr;
    }
    .context-opportunity-side,
    .module-side {
        justify-items: start;
    }
    .project-field-controls {
        align-items: flex-start;
    }
    .module-side,
    .csat-cell {
        justify-items: start;
    }
    .meeting-evaluation-matrix table,
    .meeting-evaluation-matrix thead,
    .meeting-evaluation-matrix tbody,
    .meeting-evaluation-matrix tr,
    .meeting-evaluation-matrix th,
    .meeting-evaluation-matrix td {
        display: block;
    }
    .meeting-evaluation-matrix table {
        min-width: 0;
    }
    .meeting-evaluation-matrix thead {
        display: none;
    }
    .meeting-evaluation-matrix tr {
        padding: 10px 0;
        border-top: 1px solid var(--border-soft);
    }
    .meeting-evaluation-matrix td {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 5px 0;
    }
    .meeting-evaluation-matrix td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .78rem;
    }
    .project-detail-table,
    .project-detail-table thead,
    .project-detail-table tbody,
    .project-detail-table tr,
    .project-detail-table th,
    .project-detail-table td {
        display: block;
    }
    .project-detail-table thead {
        display: none;
    }
    .project-table-wrap {
        overflow-x: visible;
    }
    .project-table-wrap .project-detail-table {
        min-width: 0;
    }
    .project-detail-table tr {
        padding: 10px 0;
        border-top: 1px solid var(--border-soft);
    }
    .project-detail-table tr:first-child {
        border-top: 0;
    }
    .project-detail-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 5px 0;
    }
    .project-detail-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .78rem;
    }
    .score-history-table,
    .score-history-table thead,
    .score-history-table tbody,
    .score-history-table tr,
    .score-history-table th,
    .score-history-table td {
        display: block;
    }
    .score-history-table thead {
        display: none;
    }
    .score-history-table tr {
        padding: 10px 0;
        border-top: 1px solid var(--border-soft);
    }
    .score-history-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        border: 0;
        padding: 5px 0;
    }
    .score-history-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: .78rem;
    }
    .panel-head {
        display: block;
    }
    .intelligence-signal-head {
        display: grid;
    }
}

/* ========== Diário de bordo ========== */
.timeline {
    display: grid;
    gap: 14px;
}
.timeline-item {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-soft);
}
.timeline-item:first-child { border-top: 0; }
.timeline-date {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: .82em;
}
.timeline-body h3 {
    margin: 0 0 4px;
    font-size: 1.05em;
}
.diary-entry-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.diary-entry-header h3 {
    min-width: 0;
}
.diary-block {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
}
.diary-block pre {
    margin: 6px 0 0;
    white-space: pre-wrap;
    font-family: inherit;
    color: var(--text-muted);
}
.diary-note {
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid var(--accent-dim);
    border-radius: 8px;
    background: rgba(255, 43, 56, .06);
}
@media (max-width: 700px) {
    .timeline-item { grid-template-columns: 1fr; gap: 6px; }
    .action-plan-item { grid-template-columns: 1fr; }
    .action-sequence { width: auto; justify-content: start; padding: 0 10px; place-items: center start; }
    .action-plan-title { flex-direction: column; }
}

/* === Programa Venturini shell adaptation ================================ */
.app-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--page-bg);
}

.app-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex: 0 0 264px;
    flex-direction: column;
    gap: 14px;
    width: 264px;
    height: 100vh;
    padding: 18px 14px;
    border-right: 1px solid var(--border-soft);
    background: color-mix(in srgb, var(--bg-raised) 94%, var(--bg) 6%);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .02);
}

html[data-theme="light"] .app-shell .sidebar {
    background: #ffffff;
    box-shadow: 1px 0 18px rgba(31, 41, 55, .04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.brand-lockup:hover {
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px var(--accent-glow);
}

.brand-lockup .brand-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: block;
}

.auth-brand .brand-lockup-logo {
    height: 30px;
    width: auto;
    display: block;
}

.brand-copy {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

.brand-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: .98rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: .72rem;
}

.shell-version.version-chip {
    height: 17px;
    padding: 0 5px;
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border-soft));
    color: color-mix(in srgb, var(--accent-strong) 75%, var(--text));
    font-size: .66rem;
}

.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search input {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 34px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--text);
    font: inherit;
    outline: none;
}

.sidebar-search input:focus {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--border-soft));
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.shell-search-icon {
    position: absolute;
    left: 11px;
    display: inline-flex;
    color: var(--text-muted);
    pointer-events: none;
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    overflow-y: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.shell-nav-group {
    display: grid;
    gap: 4px;
}

.shell-nav-label {
    padding: 0 8px 4px;
    color: var(--text-subtle);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.shell-nav-link {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}

.shell-nav-link:hover {
    border-color: var(--border-soft);
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

.shell-nav-link.active {
    background: var(--bg-hover);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--accent);
    border-color: transparent;
}

html[data-theme="light"] .shell-nav-link.active {
    background: var(--bg-hover);
    color: var(--text);
}

.shell-nav-icon,
.topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.topbar-icon {
    width: 16px;
    height: 16px;
    font-size: .86rem;
    line-height: 1;
}

.shell-icon-svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.shell-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-nav-badge {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 800;
    text-align: center;
}

.app-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    max-width: calc(100% - 264px);
    min-width: 0;
}

.app-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 10px 26px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--topbar-bg);
    box-shadow: none;
}

html[data-theme="light"] .app-shell .topbar {
    background: rgba(255, 255, 255, .9);
}

.breadcrumb {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--text-muted);
    font-size: .86rem;
}

.breadcrumb strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crumb-sep {
    color: color-mix(in srgb, var(--text-muted) 70%, transparent);
}

.topbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-shell .theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--bg-raised);
    color: var(--text-muted);
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.app-shell .theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 4px 5px 4px 4px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--bg-raised);
}

.topbar-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-hover));
    color: var(--text);
    font-size: .72rem;
    font-weight: 800;
}

.topbar-user-name {
    max-width: 210px;
    overflow: hidden;
    color: var(--text);
    font-size: .84rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user form {
    margin: 0;
}

.topbar-user .logout {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.topbar-user .logout:hover {
    background: var(--bg-hover);
    color: var(--accent-strong);
}

.app-shell main.app-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 26px 28px 38px;
}

.app-footer {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 18px 28px 24px;
    color: var(--text-muted);
    font-size: .78rem;
    text-align: left;
}

.page-head {
    align-items: flex-start;
    margin: 0 0 18px;
}

.page-head h1 {
    margin-bottom: 4px;
}

.page-head p {
    max-width: 760px;
    margin: 0;
}

.panel,
.card,
.ops-metric,
.kanban-card,
.kanban-column,
.opportunity-summary-metric,
.project-index-row,
.ingestion-item {
    border-color: var(--border-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .02);
}

html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .ops-metric,
html[data-theme="light"] .kanban-card,
html[data-theme="light"] .kanban-column,
html[data-theme="light"] .opportunity-summary-metric,
html[data-theme="light"] .project-index-row,
html[data-theme="light"] .ingestion-item {
    box-shadow: 0 1px 2px rgba(31, 41, 55, .04);
}

.panel {
    border-radius: 8px;
}

.cards.stat-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.card {
    border-radius: 8px;
}

.card::before {
    opacity: .38;
}

.card-label {
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .06em;
}

.card-value {
    font-size: 1.85rem;
    letter-spacing: 0;
}

.soft-badge,
.flag-badge,
.status-pill,
.pill {
    border-radius: 999px;
}

table.data,
.data-table {
    width: 100%;
    border-collapse: collapse;
}

table.data th,
table.data td,
.data-table th,
.data-table td {
    border-bottom: 1px solid var(--border-soft);
}

table.data th,
.data-table th {
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .05em;
}

table.data tr:hover td,
.data-table tr:hover td {
    background: var(--table-hover);
}

.filter-bar {
    border-radius: 8px;
    background: var(--panel-bg);
}

.segmented,
.section-tabs,
.tabs {
    border-color: var(--border-soft);
}

.kanban-board,
.kanban {
    gap: 12px;
}

.kanban-column,
.kanban-col {
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-raised) 92%, var(--bg) 8%);
}

.btn {
    border-radius: 7px;
}

.btn.btn-secondary,
.btn.btn-ghost {
    background: var(--bg-raised);
}

.btn.btn-secondary:hover,
.btn.btn-ghost:hover {
    background: var(--bg-hover);
}

@media (max-width: 1100px) {
    .app-shell .sidebar {
        flex-basis: 228px;
        width: 228px;
        padding: 14px 10px;
    }

    .app-content {
        max-width: calc(100% - 228px);
    }

    .shell-nav-link {
        gap: 8px;
        padding-inline: 8px;
    }
}

@media (max-width: 860px) {
    .app-shell {
        display: block;
    }

    .app-shell .sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        max-height: 46vh;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
        overflow: auto;
    }

    .app-content {
        max-width: none;
    }

    .sidebar-brand {
        min-height: 34px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .brand-lockup .brand-logo {
        width: 30px;
        height: 30px;
    }

    .brand-copy small {
        display: none;
    }

    .sidebar-search {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .shell-nav-group {
        display: contents;
    }

    .shell-nav-label {
        display: none;
    }

    .shell-nav-link {
        flex: 0 0 auto;
        min-width: max-content;
        grid-template-columns: 16px auto;
        min-height: 34px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .shell-nav-badge {
        display: none;
    }

    .app-shell .topbar {
        position: static;
        min-height: 52px;
        padding: 9px 14px;
    }

    .app-shell main.app-main {
        width: 100%;
        padding: 18px 14px 30px;
    }

    .app-footer {
        width: 100%;
        padding: 12px 14px 20px;
    }
}

@media (max-width: 620px) {
    .app-shell .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-user-name {
        display: none;
    }

    .breadcrumb {
        font-size: .8rem;
    }

    .cards.stat-grid,
    .stat-grid,
    .opportunity-summary-grid,
    .ops-strip {
        grid-template-columns: 1fr;
    }

    .page-actions {
        justify-content: flex-start;
        margin-top: 10px;
    }
}

/* ===== data-table: mobile responsiveness via data-label ================== */
@media (max-width: 768px) {
    .data-table thead { display: none; }
    .data-table tbody tr {
        display: block;
        border-bottom: 1px solid var(--border);
        padding: 8px 0;
        margin-bottom: 4px;
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 12px;
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .78rem;
        color: var(--text-muted);
        margin-right: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .data-table .row-hover-actions { display: flex; opacity: 1; }
}

/* ===== Required field indicator ========================================== */
label.required::after {
    content: " *";
    color: var(--err);
    font-size: .9em;
}

/* ===== Fontes compartilhadas com o SPA ==================================== */
html, body {
    font-family: var(--font-sans);
}
code, pre, .mono, .num, .shell-version, .brand-copy small, .shell-nav-badge {
    font-family: var(--mono);
}

/* ===== Stat card enhancements (dashboard) ================================ */
.stat-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}
.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
}
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.stat-trend.up   { background: rgba(61,220,132,0.12); color: var(--ok); }
.stat-trend.down { background: rgba(255,77,77,0.12);  color: var(--err); }
.stat-trend.flat { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ===== Table row hover actions =========================================== */
.row-hover-actions {
    opacity: 0;
    transition: opacity .12s;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
table.data tr:hover .row-hover-actions,
.data-table tr:hover .row-hover-actions {
    opacity: 1;
}

/* ===== Flag semantic aliases (verde/amarelo/vermelho) ==================== */
.flag-verde    { color: var(--ok);   border-color: color-mix(in srgb, var(--ok)   30%, var(--border-soft)); background: rgba(61,220,132,0.08); }
.flag-amarelo  { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--border-soft)); background: rgba(244,194,29,0.08); }
.flag-vermelho { color: var(--err);  border-color: color-mix(in srgb, var(--err)  35%, var(--border-soft)); background: rgba(255,77,77,0.08); }

/* ===== Button loading state ============================================== */
.btn[aria-busy="true"] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}
.btn[aria-busy="true"]::after {
    content: ' …';
}

/* ===== Alert transition for auto-dismiss ================================= */
.alert {
    transition: opacity .4s ease, max-height .4s ease;
}
.alert.dismissing {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
}

/* ===== Sidebar footer / user chip ======================================== */
.sidebar-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
}
.sidebar-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    color: var(--text);
}
.sidebar-user-chip:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}
/* Foto de perfil (Google/upload) preenchendo o avatar circular. */
.topbar-avatar, .sidebar-user-avatar { overflow: hidden; }
.topbar-avatar img, .sidebar-user-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block;
}
.sidebar-user-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}
.sidebar-user-info {
    min-width: 0;
    flex: 1;
}
.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Empty state ======================================================= */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-muted);
}
.empty-state p {
    font-size: 13px;
    margin: 4px 0 16px;
}

/* ===== Filter bar inline search ========================================== */
.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    margin-bottom: 14px;
}
.filter-bar .input-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
}
.filter-bar .input-search input {
    width: 100%;
    height: 32px;
    padding: 0 10px 0 32px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--bg-deep);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.filter-bar .input-search input:focus {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--border-soft));
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.filter-bar .input-search .search-icon {
    position: absolute;
    left: 9px;
    color: var(--text-muted);
    pointer-events: none;
}
.filter-bar select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--bg-deep);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color .12s;
}
.filter-bar select:focus {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--border-soft));
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== Segmented control enhanced ======================================== */
.segmented-control {
    display: inline-flex;
    background: var(--bg-raised);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.segmented-control button {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .12s;
    white-space: nowrap;
}
.segmented-control button:hover { color: var(--text); }
.segmented-control button.active {
    background: var(--bg-hover);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== Copy to clipboard button ========================================== */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all .12s;
}
.copy-btn:hover { background: var(--bg-hover); color: var(--text); }
.copy-btn.copied { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--border-soft)); }

/* ═══════════════════════════════════════════════════════════════════════════
   Design System v2 — canonical components (v0.9.5)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page eyebrow ─────────────────────────────────────────────────────────── */
.page-eyebrow {
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent); display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 6px;
}
.page-eyebrow::before {
    content: ""; width: 4px; height: 16px; border-radius: 2px;
    background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}

/* ── KPI strip ────────────────────────────────────────────────────────────── */
.kpi-strip {
    display: grid; gap: 12px; margin-bottom: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi-strip.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-strip.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-raised); padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: var(--shadow-soft); transition: box-shadow .15s;
}
.kpi-card:hover { box-shadow: var(--shadow-elevated); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: .02em; }
.kpi-value {
    font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.kpi-card.tone-ok     { background: linear-gradient(0deg, var(--ok-soft), transparent 70%), var(--bg-raised); }
.kpi-card.tone-warn   { background: linear-gradient(0deg, var(--warn-soft), transparent 70%), var(--bg-raised); }
.kpi-card.tone-accent { background: linear-gradient(0deg, var(--accent-soft), transparent 70%), var(--bg-raised); }
.kpi-card.tone-danger { background: linear-gradient(0deg, var(--danger-soft), transparent 70%), var(--bg-raised); }
.kpi-card.tone-info   { background: linear-gradient(0deg, var(--info-soft), transparent 70%), var(--bg-raised); }
.kpi-card.tone-ok     .kpi-value { color: var(--ok); }
.kpi-card.tone-warn   .kpi-value { color: var(--warn); }
.kpi-card.tone-accent .kpi-value { color: var(--accent-strong); }
.kpi-card.tone-danger .kpi-value { color: var(--danger); }
.kpi-card.tone-info   .kpi-value { color: var(--info); }

/* ── Semantic pill variants ───────────────────────────────────────────────── */
.pill-ok     { color: var(--ok);     background: var(--ok-soft);     border-color: color-mix(in srgb, var(--ok)     30%, transparent); }
.pill-warn   { color: var(--warn);   background: var(--warn-soft);   border-color: color-mix(in srgb, var(--warn)   30%, transparent); }
.pill-info   { color: var(--info);   background: var(--info-soft);   border-color: color-mix(in srgb, var(--info)   30%, transparent); }
.pill-danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.pill-accent { color: var(--accent-strong); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* light theme corrections for pills */
html[data-theme="light"] .pill-ok     { color: #137a4b; }
html[data-theme="light"] .pill-warn   { color: #9c6a00; }
html[data-theme="light"] .pill-info   { color: #2480c2; }
html[data-theme="light"] .pill-danger { color: #c82634; }

/* ── Status chip (for strip summaries) ───────────────────────────────────── */
.status-strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.status-chip {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-raised); padding: 10px 14px;
}
.status-chip b     { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.status-chip strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Improved filter bar ──────────────────────────────────────────────────── */
.filter-bar-v2 {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    padding: 12px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-md); background: var(--bg-raised);
    margin-bottom: 16px;
}
.field-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-group.grow { flex: 1; min-width: 200px; }
.field-group > label {
    font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-muted);
}
.field-v2 {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 34px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg); color: var(--text); font-size: 13px;
}
.field-v2 input, .field-v2 select {
    flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
    color: inherit; font: inherit;
}
.field-v2:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── System status dot ───────────────────────────────────────────────────── */
.topbar-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-raised);
    color: var(--text); font: inherit; font-size: .8rem; cursor: pointer;
    transition: background .15s;
}
.topbar-btn:hover { background: var(--bg-elevated); }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
    background: var(--ok); box-shadow: 0 0 0 2px var(--ok-soft);
    transition: background .3s, box-shadow .3s;
}
.status-dot[data-status="warn"] { background: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.status-dot[data-status="err"]  { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.status-dot-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Segmented control ───────────────────────────────────────────────────── */
.segmented-control {
    display: flex; border-radius: var(--radius-sm); border: 1px solid var(--border);
    overflow: hidden; background: var(--bg-raised);
}
.seg-btn {
    padding: 4px 12px; font-size: .8rem; font-weight: 500; color: var(--text-muted);
    text-decoration: none; transition: background .15s, color .15s;
    border-right: 1px solid var(--border);
}
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: var(--bg-elevated); color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }

/* ── Trend badges (scores) ───────────────────────────────────────────────── */
.trend-up   { color: var(--ok);     font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }
.trend-flat { color: var(--text-muted); }

/* ── AI chat panel ───────────────────────────────────────────────────────── */
.ai-chat-panel { margin-top: 16px; }
.ai-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-chat-input {
    flex: 1; padding: 8px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-raised);
    color: var(--text); font: inherit; font-size: .875rem;
}
.ai-chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-chat-response {
    margin-top: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); border: 1px solid var(--border);
}
.ai-response-text { white-space: pre-wrap; line-height: 1.65; font-size: .875rem; }

/* ── Ekyte section ───────────────────────────────────────────────────────── */
.ekyte-link-section { padding: 16px 0; }
.ekyte-picker { display: flex; flex-direction: column; gap: 12px; }
#ekyte-picker-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ekyte-select { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); font: inherit; font-size: .875rem; min-width: 240px; }
.ekyte-head-actions { display: flex; gap: 8px; align-items: center; }
.ekyte-kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 20px; }
.ekyte-kpi-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 100px; text-align: center; }
.ekyte-kpi-label { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.ekyte-kpi-value { font-size: 1.4rem; font-weight: 700; }
.ekyte-subhead { font-size: .875rem; font-weight: 600; margin: 16px 0 8px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ekyte-task-list, .ekyte-insight-list { display: flex; flex-direction: column; gap: 6px; }
.ekyte-task-row, .ekyte-insight-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-elevated); }
.ekyte-task-name, .ekyte-insight-label { flex: 1; font-size: .875rem; }
.ekyte-task-status { font-size: .75rem; }
.ekyte-insight-value { font-size: .95rem; }
/* Ekyte admin correlation page */
.ekyte-admin-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.ekyte-admin-ws-cell .ekyte-admin-ws-label { font-size: .875rem; }
.ekyte-admin-action-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ekyte-admin-action-cell .ekyte-select { min-width: 200px; }

/* ── Responsive shell breakpoints ────────────────────────────────────────── */
@media (max-width: 1180px) {
    .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-strip.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .kpi-strip, .kpi-strip.cols-3, .kpi-strip.cols-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .kpi-strip, .kpi-strip.cols-3, .kpi-strip.cols-5 { grid-template-columns: 1fr; }
}

/* ── Feedback FAB widget ── */
.feedback-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 900;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-raised); border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    transition: background .15s, color .15s, box-shadow .15s;
}
.feedback-fab:hover { background: var(--bg-hover); color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.feedback-modal {
    display: none; position: fixed; inset: 0; z-index: 910;
    background: rgba(0,0,0,.55); align-items: flex-end; justify-content: flex-end;
    padding: 0 24px 88px;
}
.feedback-modal.open { display: flex; }
.feedback-dialog {
    width: 360px; background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0,0,0,.5);
    display: flex; flex-direction: column; gap: 0; overflow: hidden;
}
.feedback-dialog-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border-soft);
    font-size: .875rem; font-weight: 600;
}
.feedback-close-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 1.2rem; line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.feedback-close-btn:hover { background: var(--bg-hover); color: var(--text); }
.feedback-textarea {
    resize: vertical; border: none; border-bottom: 1px solid var(--border-soft);
    background: var(--bg-raised); color: var(--text); font-family: var(--font-sans);
    font-size: .875rem; padding: 12px 16px; outline: none; min-height: 100px;
}
.feedback-textarea:focus { background: var(--bg-hover); }
.feedback-dialog-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; gap: 8px;
}
@media (max-width: 480px) {
    .feedback-dialog { width: calc(100vw - 48px); }
    .feedback-modal { padding: 0 12px 84px; }
}

/* ── Ekyte enrichment ── */
.ekyte-meta-row { display: flex; gap: 6px; align-items: center; margin: 5px 0; font-size: .875rem; flex-wrap: wrap; }

/* ── Diary AI toolbar ── */
.diary-ai-toolbar { display: flex; gap: 10px; align-items: center; }

/* ── Coordinator eval form ── */
.eval-form-details { border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 16px; }
.eval-form-details summary { cursor: pointer; padding: 10px 14px; font-size: .875rem; color: var(--text-muted); user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }
.eval-form-details summary::before { content: '▸'; font-size: .75rem; transition: transform .15s; }
.eval-form-details[open] summary::before { transform: rotate(90deg); }
.eval-form-body { padding: 0 14px 14px; }

/* ── Diary entry types ── */
.diary-entry-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.diary-entry-header h3 { margin: 0; flex: 1; }
.diary-origin-badge { font-size: .72rem; white-space: nowrap; flex-shrink: 0; }
.diary-badge-ai_synthesis { color: #7c6bff; border-color: rgba(124,107,255,.3); background: rgba(124,107,255,.08); }
.diary-badge-coordinator_evaluation { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--border-soft)); background: rgba(61,220,132,.07); }
.diary-badge-meeting { color: var(--info); border-color: rgba(62,155,220,.3); background: rgba(62,155,220,.07); }
.diary-badge-snapshot { color: var(--text-muted); border-color: var(--border-soft); background: rgba(255,255,255,.03); }
.diary-badge-experience { color: var(--warn); border-color: rgba(244,194,29,.3); background: rgba(244,194,29,.06); }
.diary-badge-manual, .diary-badge-logbook { color: var(--text-muted); border-color: var(--border-soft); background: rgba(255,255,255,.03); }
.diary-eval-score { font-size: .9rem; font-weight: 700; color: var(--ok); margin-top: 4px; }
.diary-summary-text { white-space: pre-line; margin: 0 0 4px; }
.diary-expand-btn { background: none; border: none; padding: 2px 0; cursor: pointer; font-size: .8rem; text-decoration: underline; }
.diary-expand-btn:hover { color: var(--text); }

/* ── Opportunity inline save feedback ── */
.opp-save-ok { outline: 2px solid var(--ok); outline-offset: 3px; transition: outline 0.15s; }
.opp-save-err { outline: 2px solid #e74c3c; outline-offset: 3px; transition: outline 0.15s; }

/* ── showFormStatus helper ── */
.form-status { font-size: .8rem; margin-left: .5rem; }
.form-status-ok { color: var(--ok); }
.form-status-err { color: var(--err); font-weight: 600; }

/* ── Action plan Kanban status select ── */
.action-kanban-status-select { font-size: .78rem; padding: 2px 4px; width: 100%; margin-top: .35rem; }
.action-prazo-overdue { font-size: .7rem; padding: 1px 5px; border-radius: 3px; font-weight: 600;
    background: rgba(220,50,50,.12); color: var(--err); margin-left: 4px; }

/* ── Diary eval sliders (reutiliza padrão quick_eval) ── */
.qe-slider-wrap { display: flex; align-items: center; gap: .5rem; }
.qe-slider { flex: 1; accent-color: var(--accent); }
.qe-slider-val { min-width: 2ch; font-size: 1.1rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.eval-optional-details { margin-top: .75rem; }
.eval-optional-details > summary { cursor: pointer; }

/* ── Onboarding checklist ── */
.onboarding-panel { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.onboarding-steps { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.onboarding-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; background: var(--bg-deep); border-radius: var(--radius); border: 1px solid var(--border-soft); }
.onboarding-step.step-done { opacity: .65; }
.step-num { flex: 0 0 28px; height: 28px; width: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-done .step-num { background: var(--ok); }
.step-body { flex: 1; }
.step-body strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.step-body p { margin: 0 0 8px; }
.saved-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--ok);
    color: var(--ok);
    border-radius: 6px;
    padding: .45rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
    z-index: 9999;
    pointer-events: none;
}
.saved-toast-show { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) {
    .action-kanban-board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .action-kanban-board { grid-template-columns: 1fr; }
}
.step-body .btn { margin-top: 4px; }

/* ── UI/UX Animations v1.0.76 ─────────────────────────────────────────── */
@keyframes v4FadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* Fade-in for lazy-loaded section content */
[data-project-section-target] > * {
    animation: v4FadeSlideIn 0.22s cubic-bezier(.16,1,.3,1);
}

/* Collapsible sections open animation */
details[open] > :not(summary) {
    animation: v4FadeSlideIn 0.18s ease;
}

/* Loading state: dim content while fetching */
[data-project-lazy-section].is-loading [data-project-section-target] {
    opacity: 0.45;
    transition: opacity 0.2s;
}

/* Stakeholder badge states */
.badge-linked {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(34,197,94,.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,.3);
    white-space: nowrap;
}
.badge-suggest {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(251,191,36,.12);
    color: #f59e0b;
    border: 1px solid rgba(251,191,36,.3);
    white-space: nowrap;
}
.badge-suggest a {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.stakeholder-extra-fields summary {
    font-size: .75rem;
    color: var(--text-muted, #888);
    cursor: pointer;
    padding: 4px 0;
    list-style: none;
}
.stakeholder-extra-fields summary::marker { display: none; }
.stakeholder-extra-fields summary::-webkit-details-marker { display: none; }

/* ── Action plan: responsible chip + priority badge ──────────────────────── */
.responsible-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .72rem; padding: 2px 8px; border-radius: 10px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
    white-space: nowrap;
}
.responsible-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(220,38,38,.3); font-size: .6rem; font-weight: 700;
}
.priority-badge {
    font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 8px;
    text-transform: uppercase; letter-spacing: .03em;
}
.priority-badge.priority-critica { background: rgba(239,68,68,.2); color: #ef4444; }
.priority-badge.priority-alta    { background: rgba(249,115,22,.2); color: #f97316; }
.priority-badge.priority-media   { background: rgba(234,179,8,.2);  color: #eab308; }
.priority-badge.priority-baixa   { background: rgba(34,197,94,.2);  color: #22c55e; }

/* ── ROPRE check-in analysis ─────────────────────────────────────────────── */
.ropre-badge { font-size:.65rem; font-weight:700; padding:1px 6px; border-radius:8px; text-transform:uppercase; }
.ropre-badge.ropre-forte, .ropre-cls.ropre-forte { color:#22c55e; }
.ropre-badge.ropre-forte { background:rgba(34,197,94,.2); }
.ropre-badge.ropre-médio, .ropre-cls.ropre-médio { color:#eab308; }
.ropre-badge.ropre-médio { background:rgba(234,179,8,.2); }
.ropre-badge.ropre-fraco, .ropre-cls.ropre-fraco, .ropre-cls.ropre-ausente { color:#ef4444; }
.ropre-badge.ropre-fraco { background:rgba(239,68,68,.2); }
.ropre-table { width:100%; font-size:.78rem; border-collapse:collapse; margin-top:.25rem; }
.ropre-table th { text-align:left; padding:2px 6px; color:var(--text-muted); font-weight:500; }
.ropre-table td { padding:2px 6px; }
.attack-card { margin-top:.35rem; padding:.35rem .5rem; border:1px solid rgba(239,68,68,.3); border-radius:6px; }

/* ── Stakeholder: internal role tags ─────────────────────────────────────── */
.role-tags-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.role-tag-label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.role-tag-label input[type=checkbox] { display: none; }
.role-tag-label span {
    padding: 3px 10px; border-radius: 12px; font-size: .72rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
    transition: background .15s, border-color .15s;
}
.role-tag-label:has(input:checked) span {
    background: rgba(220,38,38,.18); border-color: rgba(220,38,38,.5); color: #ef4444;
}
.role-tag-badge { font-size: .68rem; }
.field-label { font-size: .75rem; color: var(--text-muted, #888); display: block; margin-bottom: 4px; }

/* ── Toast notifications ──────────────────────────────────────────────────── */
.toast-container {
    position: fixed; top: 16px; right: 16px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
    padding: 10px 16px; border-radius: 6px; font-size: .875rem; line-height: 1.5;
    border: 1px solid; min-width: 220px; max-width: 360px; pointer-events: auto;
    animation: toast-in .2s ease;
}
.toast-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.4); color: #6ee7b7; }
.toast-error   { background: rgba(255,77,77,.08);  border-color: rgba(255,77,77,.4);  color: #ffb5b5; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Resumo Operacional v1.2.1 (project_detail) ===== */
.ops-overview {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.9fr;
    gap: 12px;
    margin: 14px 0 22px;
}
.ops-block {
    background: var(--surface-2, var(--bg-2));
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ops-block-state { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ops-block-activity { border-color: color-mix(in srgb, var(--info, #3e9bdc) 45%, transparent); }
.ops-block-plan { border-color: color-mix(in srgb, var(--ok, #28b678) 45%, transparent); }
.ops-block-head {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0 0 4px;
}
.ops-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}
.ops-overview .ops-metric { display: flex; flex-direction: column; gap: 2px; }
.ops-overview .ops-metric strong { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.ops-overview .ops-metric-lg strong { font-size: 1.45rem; line-height: 1.1; }
.ops-overview .ops-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.ops-overview .ops-metric small { font-size: .72rem; color: var(--text-muted); line-height: 1.35; }
.ops-metric-action strong { color: var(--accent); }
.ops-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.ops-link:hover { text-decoration: underline; }
@media (max-width: 1180px) {
    .ops-overview { grid-template-columns: 1fr; }
    .ops-block-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 640px) {
    .ops-overview { gap: 10px; }
    .ops-block { padding: 10px 12px; }
}

/* ===== Stakeholders v1.2.1 (project_detail) ===== */
.stakeholder-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0 14px;
    padding: 8px 10px;
    background: var(--bg-2, var(--surface-2));
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}
.stakeholder-search-input {
    flex: 1 1 240px;
    min-width: 200px;
    padding: 6px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: .85rem;
}
.stakeholder-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.stakeholder-toolbar-actions {
    display: flex;
    gap: 6px;
}
.stakeholder-visible-count {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}
/* Collapsed-default row: cleaner summary, hover affordance */
.project-stakeholders-panel .stakeholder-collapsible-row {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-2, var(--bg-2));
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color .15s;
}
.project-stakeholders-panel .stakeholder-collapsible-row[open] {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border-soft));
    background: var(--bg);
}
.project-stakeholders-panel .stakeholder-collapsible-row > summary.stakeholder-row-summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .15s;
}
.project-stakeholders-panel .stakeholder-collapsible-row > summary.stakeholder-row-summary::-webkit-details-marker { display: none; }
.project-stakeholders-panel .stakeholder-collapsible-row > summary.stakeholder-row-summary::before {
    content: "▸";
    color: var(--text-muted);
    font-size: .75rem;
    transition: transform .15s;
    flex-shrink: 0;
}
.project-stakeholders-panel .stakeholder-collapsible-row[open] > summary.stakeholder-row-summary::before {
    transform: rotate(90deg);
    color: var(--accent);
}
.project-stakeholders-panel .stakeholder-collapsible-row > summary.stakeholder-row-summary:hover {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.stakeholder-row-summary > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}
.stakeholder-summary-badges {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.stakeholder-edit-hint {
    opacity: 0;
    transition: opacity .15s, color .15s;
    font-size: .7rem;
    color: var(--accent);
    font-weight: 600;
}
.project-stakeholders-panel .stakeholder-collapsible-row:hover .stakeholder-edit-hint,
.project-stakeholders-panel .stakeholder-collapsible-row[open] .stakeholder-edit-hint {
    opacity: 1;
}
.project-stakeholders-panel .stakeholder-collapsible-row[open] .stakeholder-edit-hint::before {
    content: "✓ editando · ";
    color: var(--ok, #28b678);
}
.project-stakeholders-panel .stakeholder-collapsible-row[open] .stakeholder-edit-hint {
    color: var(--ok, #28b678);
}

/* ===== Project detail — polish visual v1.5.2 (escopo minimalista) =====
   v1.5.0 quebrou layout porque sobrescrevia .panel e summary global.
   v1.5.2 escopa só dentro de .project-section-body (lazy section content)
   e sidenav, sem mexer em .panel, summary, details (preserva JS lazy load). */

/* Hierarquia tipográfica dentro do conteúdo lazy carregado */
.project-shell .project-section-body h2 {
    font-size: 1.06rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}
.project-shell .project-section-body h3 {
    font-size: .92rem;
    font-weight: 600;
    margin: 14px 0 8px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
}
.project-shell .project-section-body h4 {
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 12px 0 6px;
}

/* Empty states — escopo restrito */
.project-shell .project-section-body .empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    background: var(--bg);
    font-size: .85rem;
}
.project-shell .project-section-body .empty-state strong {
    display: block;
    font-size: .95rem;
    color: var(--text);
    margin-bottom: 4px;
}
.project-shell .project-section-body .empty-state a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.project-shell .project-section-body .empty-state a:hover { text-decoration: underline; }

/* Sidenav badges consistentes */
.project-side-nav-list a strong {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
}
.project-side-nav-list a small {
    font-size: .68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* R2 v1.5.2: espaçamento entre seções (sem mudar internals) */
.project-shell details.project-section-collapsible {
    margin-bottom: 10px;
}

/* Skeleton shimmer melhorado — garante área visível durante lazy load */
.project-shell .project-section-lazy-body { min-height: 100px; }
.project-section-skeleton {
    padding: 14px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.project-section-skeleton .skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, var(--border-soft), color-mix(in srgb, var(--accent) 10%, var(--border-soft)), var(--border-soft));
    background-size: 200% 100%;
    animation: project-skel-shimmer 1.6s ease-in-out infinite;
    border-radius: 4px;
    width: 100%;
}
.project-section-skeleton .skeleton-line-strong { width: 60%; height: 14px; }
.project-section-skeleton .skeleton-line-short { width: 40%; }
@keyframes project-skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
