:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #0c0f16;
  --surface: #141925;
  --surface-2: #1a2030;
  --surface-3: #202839;
  --line: #262f42;
  --line-soft: #1e2636;
  --text: #eef2f8;
  --muted: #aab4c5;
  --muted-2: #6f7c92;
  --brand: #6b8afd;
  --brand-hover: #7f9bfe;
  --brand-wash: #1a2338;
  --on-brand: #0a0e18;
  --produtivo: #29b57e;
  --neutro: #4a90e2;
  --naoprod: #e8814a;
  --semclass: #5a677d;
  --good: #2fb872; --good-wash: #12271e;
  --warn: #e9a53a; --warn-wash: #2a2314;
  --bad: #e05a6a; --bad-wash: #2a1820;
  --info: #6b8afd; --info-wash: #1a2338;
  --field: #10141a;
  --card: #13171d;
  --track: #232a32;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
  --shadow-raised: 0 12px 32px rgba(0,0,0,.18);
  --ring: color-mix(in srgb, var(--brand) 20%, transparent);
  --overlay: #05070ad0;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
svg { display: block; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--on-brand); background: var(--brand); font-size: .75rem; font-weight: 700; text-decoration: none; transform: translateY(-150%); transition: transform .12s; }
.skip-link:focus { transform: translateY(0); }

/* ============ brand / shared ============ */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--on-brand); background: var(--brand); font-weight: 800; font-size: .82rem; }
.brand strong { display: block; font-size: .9rem; font-weight: 650; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 1px; color: var(--muted-2); font-size: .6rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow, .panel-kicker, .context-label { margin: 0; color: var(--muted-2); font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 16px; border: 0; border-radius: 9px; color: var(--on-brand); background: var(--brand); font-size: .82rem; font-weight: 700; transition: background-color .15s; }
.primary-button:hover { background: var(--brand-hover); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.secondary-button, .danger-button, .deployment-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--info-wash); border-radius: 8px; color: var(--info); background: var(--info-wash); font-size: .68rem; font-weight: 650; cursor: pointer; }
.secondary-button:hover { border-color: var(--brand); }
.danger-button { border-color: var(--bad-wash); color: var(--bad); background: var(--bad-wash); }
.deployment-button { border-color: var(--warn-wash); color: var(--warn); background: var(--warn-wash); }

/* ============ login (centered, premium) ============ */
.login-view { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 24px; overflow: hidden; background: var(--bg); }
.login-view::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% -5%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); }
.login-view::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(circle at 50% 20%, #000, transparent 60%); mask-image: radial-gradient(circle at 50% 20%, #000, transparent 60%); opacity: .5; }
.login-glow { display: none; }
.login-card { position: relative; z-index: 1; width: min(392px, 100%); }
.brand-login { flex-direction: column; gap: 0; margin-bottom: 22px; text-align: center; }
.brand-login .brand-mark { width: 52px; height: 52px; border-radius: 14px; font-size: 1.1rem; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 30%, transparent); }
.brand-login > span:last-child { margin-top: 14px; }
.brand-login strong { font-size: 1.7rem; font-weight: 720; letter-spacing: -.03em; }
.brand-login small { margin-top: 6px; font-size: .64rem; letter-spacing: .2em; }
.login-copy { display: none; }
.login-card > form, .login-card .security-note { position: relative; z-index: 1; }
.login-card form { display: grid; gap: 14px; padding: 26px 24px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.login-card form > input, .credential-field, .password-field { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); transition: border-color .15s, box-shadow .15s; }
.login-card form > input { padding: 12px 14px; color: var(--text); font-size: .9rem; outline: 0; }
.login-card form > input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.credential-field, .password-field { display: flex; }
.credential-field:focus-within, .password-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.credential-field input, .password-field input { flex: 1 1 auto; width: 100% !important; min-width: 0 !important; padding: 12px 14px; border: 0 !important; border-radius: 10px; color: var(--text); background: transparent !important; font-size: .9rem; outline: 0; }
.credential-field input:-webkit-autofill, .password-field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--field) inset; }
.icon-button { border: 0; padding: 0 14px; color: var(--brand); background: transparent; font-size: .75rem; font-weight: 650; }
.password-toggle { flex: 0 0 auto; align-self: stretch; min-width: 72px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--brand); background: transparent; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.form-error { min-height: 16px; margin: 2px 0 0; color: var(--bad); font-size: .74rem; }
.login-card form .primary-button { min-height: 48px; margin-top: 4px; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--muted-2); font-size: .7rem; }
.security-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--good); color: transparent; overflow: hidden; }

/* ============ app shell / left sidebar ============ */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar .brand { padding: 4px 6px 16px; }
.tenant-context { display: grid; gap: 3px; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.tenant-context span { display: block; overflow: hidden; color: var(--muted-2); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.tenant-context strong { display: block; overflow: hidden; color: var(--muted); font-size: .74rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tenant-context small { display: block; overflow: hidden; color: var(--muted-2); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { margin: 12px 10px 4px; color: var(--muted-2); font-size: .56rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: .81rem; font-weight: 600; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: var(--brand); background: var(--brand-wash); }
.nav-icon { display: grid; place-items: center; width: 18px; height: 18px; color: currentColor; font-size: .95rem; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.nav-count { min-width: 18px; margin-left: auto; padding: 1px 6px; border-radius: 20px; color: #fff; background: var(--bad); font-size: .58rem; font-weight: 800; text-align: center; }
.sidebar-spacer { flex: 1; min-height: 12px; }
.privacy-card { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 20px; color: var(--muted-2); font-size: .64rem; font-weight: 600; }
.privacy-card .privacy-icon { color: var(--brand); }
.privacy-card strong, .privacy-card p { display: none; }
.privacy-note { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 20px; color: var(--muted-2); font-size: .64rem; font-weight: 600; }
.privacy-note .privacy-icon { color: var(--brand); }
.theme-toggle { display: flex; align-items: center; gap: 7px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 650; cursor: pointer; transition: border-color .15s, color .15s; }
.theme-toggle:hover { border-color: var(--brand); color: var(--text); }
.theme-toggle-icon { font-size: .82rem; line-height: 1; }
.logout-button { margin-top: 8px; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted-2); background: transparent; font-size: .72rem; font-weight: 600; text-align: left; }
.logout-button:hover { color: var(--text); background: var(--surface-2); }
.product-signature { margin: 12px 6px 0; color: var(--muted-2); font-size: .6rem; line-height: 1.4; text-align: center; }
.product-signature strong { color: var(--muted); font-weight: 650; }
.sidebar-signature { width: 100%; margin: 8px 0 0; padding-top: 9px; border-top: 1px solid var(--line-soft); letter-spacing: .01em; }
.mobile-product-signature { display: none; }

.workspace { min-width: 0; }
.support-mode-banner { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; gap: 12px; padding: 10px 28px; color: var(--text); background: var(--warn-wash); border-bottom: 1px solid var(--warn); }
.support-mode-banner strong { font-size: .72rem; }
.support-mode-banner span { color: var(--muted); font-size: .64rem; }
.support-mode-banner button { margin-left: auto; min-height: 32px; }
.dashboard:focus { outline: none; }
.global-filter-bar { width: 100%; max-width: 1440px; margin: 0 auto; padding: 16px 28px 0; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, 150px) minmax(150px, 190px) minmax(180px, 230px) auto; align-items: end; gap: 10px; }
.global-filter-heading { min-width: 0; align-self: center; }
.global-filter-heading strong { display: block; margin-top: 4px; overflow: hidden; color: var(--text); font-size: .72rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.global-filter-bar label, .directory-filters label { min-width: 0; margin: 0; color: var(--muted); font-size: .62rem; font-weight: 650; }
.global-filter-bar input, .global-filter-bar select, .directory-filters input, .directory-filters select { width: 100%; min-height: 36px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); outline: none; }
.global-filter-bar input:focus, .global-filter-bar select:focus, .directory-filters input:focus, .directory-filters select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.global-filter-bar .secondary-button { min-height: 36px; white-space: nowrap; }

/* ============ page / topbar ============ */
.dashboard { min-width: 0; max-width: 1440px; width: 100%; margin: 0 auto; padding: 22px 28px 48px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 3px 0 0; font-size: 1.3rem; font-weight: 650; letter-spacing: -.015em; }
.topbar-actions { display: flex; align-items: flex-end; gap: 9px; }
.page-description { margin: 6px 0 0; color: var(--muted); font-size: .78rem; max-width: 620px; }
.date-field { display: grid; gap: 5px; }
.date-field span { color: var(--muted-2); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-field input { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); color-scheme: dark; font-size: .78rem; }
.refresh-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: var(--brand); background: var(--surface); font-size: 1.05rem; }
.refresh-button:hover { border-color: var(--brand); }
.loading-panel { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 320px; color: var(--muted); font-size: .82rem; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--track); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.context-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.context-row p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.update-status { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: .68rem; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.visibility-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--warn-wash); border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--warn-wash); }
.visibility-alert-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--on-brand); background: var(--warn); font-size: .74rem; font-weight: 800; }
.visibility-alert strong { display: block; color: var(--text); font-size: .74rem; }
.visibility-alert p { margin: 2px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.4; }
.visibility-rate { color: var(--warn); font-size: .68rem; font-weight: 700; white-space: nowrap; }

.ai-banner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; margin-bottom: 14px; padding: 15px 18px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); background: linear-gradient(100deg, var(--brand-wash) 0%, var(--surface) 58%); }
.ai-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--on-brand); background: var(--brand); }
.ai-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.ai-who { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ai-who b { font-size: .82rem; font-weight: 650; }
.ai-who span { padding: 1px 8px; border-radius: 20px; color: var(--brand); background: var(--brand-wash); font-size: .6rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ai-body p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.ai-body p b { color: var(--text); font-weight: 650; }

/* ============ metric cards ============ */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metric-card { min-height: 108px; padding: 16px; display: flex; flex-direction: column; gap: 5px; }
.executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-icon.external { color: var(--brand); }
.metric-icon.communication { color: var(--good); }
.metric-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .72rem; font-weight: 600; }
.metric-icon { color: var(--muted-2); }
.metric-icon.productive { color: var(--produtivo); }
.metric-icon.utilization { color: var(--neutro); }
.metric-icon.quality { color: var(--warn); }
.metric-value { margin-top: auto; font-size: 1.65rem; font-weight: 680; letter-spacing: -.02em; }
.metric-value small { margin-left: 2px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.metric-foot { margin-top: 2px; color: var(--muted-2); font-size: .67rem; line-height: 1.4; }

/* ============ panels ============ */
.main-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 12px; margin-top: 12px; }
.trend-panel, .ranking-panel-wide { margin-top: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.back-link:hover { color: var(--brand); }
.profile-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.profile-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; font-size: 1.1rem; font-weight: 700; flex: none; }
.profile-info { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; gap: 10px; }
.profile-name-row h1 { margin: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; color: var(--muted); font-size: .76rem; }
.agent-card-clickable, .rank-row-clickable { cursor: pointer; transition: background-color .12s; }
.agent-card-clickable:hover, .agent-card-clickable:focus-visible { background: var(--field); }
.rank-row-clickable:hover, .rank-row-clickable:focus-visible { background: var(--field); }
.panel-sub { margin: 0 0 14px; color: var(--muted-2); font-size: .74rem; }
.trend-chart svg { width: 100%; height: 160px; overflow: visible; display: block; }
.trend-gridline { stroke: var(--line-soft); stroke-width: 1; }
.trend-area { fill: var(--brand-wash); opacity: .9; stroke: none; }
.trend-line { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-scheduled { stroke: var(--muted); stroke-width: 2; opacity: .55; }
.trend-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.trend-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted-2); font-size: .64rem; }
.trend-legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted-2); font-size: .6rem; }
.trend-legend i { width: 14px; height: 3px; border-radius: 4px; background: var(--brand); }
.trend-legend i.scheduled { background: var(--muted); }
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th { padding: 0 12px 10px; color: var(--muted-2); font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.ranking-table td { padding: 11px 12px; border-top: 1px solid var(--line-soft); font-size: .78rem; vertical-align: middle; }
.ranking-table .rank-pos { color: var(--muted-2); font-weight: 700; text-align: center; width: 28px; }
.ranking-table .rank-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ranking-table .rank-person .ava { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: .62rem; font-weight: 700; flex: none; }
.ranking-table .rank-person b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-table .rank-dept { color: var(--muted); }
.ranking-table .rank-focus { display: flex; align-items: center; gap: 9px; }
.ranking-table .rank-focus .bar { width: 90px; height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.ranking-table .rank-focus .bar i { display: block; height: 100%; border-radius: 4px; }
.ranking-table .rank-focus b { font-weight: 650; min-width: 34px; }
.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { border-radius: var(--radius); padding: 18px; }
.panel-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-header h2 { margin: 3px 0 0; font-size: .95rem; font-weight: 650; }
.status-pill, .privacy-badge { padding: 3px 9px; border: 1px solid var(--warn-wash); border-radius: 999px; color: var(--warn); background: var(--warn-wash); font-size: .64rem; font-weight: 650; }
.status-pill.reliable { border-color: var(--good-wash); color: var(--good); background: var(--good-wash); }
.privacy-badge { border-color: var(--info-wash); color: var(--info); background: var(--info-wash); }
.text-link { color: var(--brand); font-size: .68rem; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.quality-panel { margin-top: 12px; }
.quality-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.quality-grid article { min-width: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--field); }
.quality-grid span, .quality-grid small { display: block; color: var(--muted-2); font-size: .62rem; line-height: 1.45; }
.quality-grid strong { display: block; margin: 7px 0 4px; font-size: 1.05rem; font-weight: 680; }
.quality-grid small { min-height: 2.9em; }
.data-gap { color: var(--warn); font-weight: 650; }

.donutwrap { display: flex; align-items: center; gap: 22px; margin-top: 4px; }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.journey-donut { width: 132px; height: 132px; }
.journey-donut circle { fill: none; stroke-width: 15; transition: stroke-dasharray .5s ease, stroke-dashoffset .5s ease; }
.donut-track { stroke: var(--track); }
.bar-productive { stroke: var(--produtivo); }
.bar-neutral { stroke: var(--neutro); }
.bar-unrelated { stroke: var(--naoprod); }
.bar-unclassified { stroke: var(--semclass); }
.bar-ignored { stroke: var(--muted-2); }
.ignored-bg, .report-composition-track .ignored { background: var(--muted-2); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 1.4rem; font-weight: 680; letter-spacing: -.02em; }
.donut-center span { display: block; color: var(--muted-2); font-size: .6rem; font-weight: 600; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-top: 16px; }
.donutwrap .legend-grid { flex: 1; min-width: 0; margin-top: 0; }
.legend-grid > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.legend-grid span:not(.legend-dot) { color: var(--muted); font-size: .7rem; }
.legend-grid strong { font-size: .74rem; font-weight: 650; }
.legend-dot { width: 8px; height: 8px; border-radius: 2.5px; }
.productive-bg { background: var(--produtivo); } .neutral-bg { background: var(--neutro); } .unrelated-bg { background: var(--naoprod); } .unclassified-bg { background: var(--semclass); }
.state-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.state-summary div { display: grid; gap: 5px; min-width: 0; }
.state-summary span { color: var(--muted-2); font-size: .66rem; }
.state-summary strong { font-size: .82rem; font-weight: 650; }

.team-count { display: grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px; color: var(--muted-2); background: var(--surface-3); font-size: .68rem; font-weight: 700; }
.agent-list { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.agent-card { padding: 8px 6px; border-radius: 8px; }
.agent-card:hover { background: var(--surface-2); }
.agent-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.agent-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-soft); color: var(--muted); background: var(--surface-3); font-size: .64rem; font-weight: 700; }
.agent-name { min-width: 0; }
.agent-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; font-weight: 600; }
.agent-name span { display: block; overflow: hidden; margin-top: 1px; color: var(--muted-2); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.agent-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; color: var(--muted); background: var(--surface-3); font-size: .62rem; font-weight: 650; white-space: nowrap; }
.agent-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.agent-status.online { color: var(--good); background: var(--good-wash); }
.agent-status.online::before { background: var(--good); }
.agent-status.offline { color: var(--bad); background: var(--bad-wash); }
.agent-status.offline::before { background: var(--bad); }
.agent-meta { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: .62rem; }
.deployment-chip { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 999px; color: var(--warn) !important; background: var(--warn-wash); font-size: .56rem !important; font-weight: 700; }

.ranking-list { display: grid; gap: 10px; margin-top: 4px; }
.rank-item { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.5fr) auto; align-items: center; gap: 10px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.rank-time { color: var(--muted-2); font-size: .66rem; text-align: right; }
progress { width: 100%; height: 11px; overflow: hidden; border: 0; border-radius: 5px; appearance: none; }
progress::-webkit-progress-bar { border-radius: 3px; background: var(--track); }
progress::-webkit-progress-value { border-radius: 3px 0 0 3px; background: linear-gradient(90deg, var(--neutro), var(--brand)); }
progress::-moz-progress-bar { border-radius: 3px; background: var(--brand); }
.ranking-empty, .empty-state { padding: 26px 0; color: var(--muted-2); text-align: center; font-size: .76rem; }

.activity-panel { margin-top: 12px; }
.browser-activity-panel .panel-sub { margin-bottom: 10px; }
.browser-quality { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--warn); border-radius: 8px; color: var(--warn); font-size: .65rem; }
.keyword-search-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.keyword-search-form label { display: grid; gap: 5px; color: var(--muted); font-size: .66rem; font-weight: 650; }
.keyword-search-form input { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); outline: none; font-size: .78rem; }
.keyword-search-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.keyword-search-grid { display: grid; grid-template-columns: minmax(240px, .95fr) minmax(0, 1.45fr); gap: 14px; margin-top: 14px; }
.keyword-results-title { margin: 0 0 10px; color: var(--text); font-size: .8rem; font-weight: 650; }
.keyword-match-kind { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; padding: 3px 7px; border-radius: 999px; color: var(--brand); background: var(--brand-wash); font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.keyword-match-meta { color: var(--muted-2); font-size: .64rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 0 10px 9px; color: var(--muted-2); font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .72rem; }
td:first-child, td:last-child { color: var(--muted-2); }
.domain-warning { color: var(--warn); font-weight: 650; }
.classification-badge, .state-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: .6rem; font-weight: 650; }
.classification-badge.productive { color: var(--produtivo); background: var(--good-wash); }
.classification-badge.neutral { color: var(--neutro); background: var(--info-wash); }
.classification-badge.unrelated { color: var(--naoprod); background: var(--warn-wash); }
.classification-badge.unclassified, .classification-badge.ignored { color: var(--muted); background: var(--surface-3); }
.state-badge { color: var(--neutro); background: var(--info-wash); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 40; padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--card); box-shadow: 0 16px 40px rgba(0,0,0,.4); font-size: .76rem; }

/* ============ admin ============ */
.admin-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.admin-summary article { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-summary span { color: var(--muted-2); font-size: .68rem; }
.admin-summary strong { color: var(--text); font-size: 1.08rem; font-weight: 680; }
.admin-tabs { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.admin-tab { flex: 1; min-width: max-content; min-height: 34px; padding: 8px 13px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 650; }
.admin-tab:hover { color: var(--text); background: var(--surface-2); }
.admin-tab.active { color: var(--brand); background: var(--brand-wash); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-panel { padding: 18px; }
.admin-help { margin: -6px 0 14px; color: var(--muted-2); font-size: .66rem; line-height: 1.5; }
.admin-form, .manager-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.admin-form label, .rule-form label, .manager-form > label, .manager-reason, .dialog-form label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: .66rem; font-weight: 650; }
.admin-form input, .admin-form select, .admin-form textarea, .rule-form input, .rule-form select, .manager-form input, .manager-form select, .manager-form textarea, .dialog-form input, .dialog-form select, .dialog-form textarea { width: 100%; min-width: 0; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); outline: none; font-size: .78rem; }
.admin-form textarea { min-height: 112px; resize: vertical; }
.admin-form .full-width, .tenant-form-dialog .full-width { grid-column: 1 / -1; }
.artifact-summary { grid-column: 1 / -1; margin: -4px 0 12px; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted-2); background: var(--surface-2); font-size: .64rem; }
.weekly-schedule-editor { grid-column: 1 / -1; display: grid; gap: 7px; }
.schedule-weekly-fields { display: grid; gap: 8px; }
.schedule-toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.schedule-rotation-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.rotation-preview { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; min-height: 38px; padding-top: 3px; }
.rotation-preview span { padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); background: var(--card); font-size: .68rem; }
.rotation-preview span.work { color: var(--brand); border-color: var(--brand); background: var(--brand-wash); }
.schedule-day { padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--card); }
.schedule-day.disabled { background: var(--surface-2); }
.schedule-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.schedule-day-heading > label { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: .7rem; }
.schedule-day-heading input { width: auto; min-height: auto; accent-color: var(--brand); }
.schedule-periods { display: grid; gap: 7px; margin-top: 9px; }
.schedule-period { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 8px; }
.schedule-period label { display: grid; gap: 4px; color: var(--muted); font-size: .62rem; }
.schedule-period input { min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); }
.schedule-day-off { margin: 7px 0 0; color: var(--muted-2); font-size: .64rem; }
.schedule-day-tools, .schedule-period-tools { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ modelo de jornada — 5x2/6x1 (somente horários necessários) ============ */
.schedule-simple-fields {
  display: grid; gap: 8px; padding: 12px;
  border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2);
}
.schedule-simple-label { color: var(--muted); font-size: .66rem; font-weight: 650; }
.schedule-simple-saturday {
  display: grid; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-soft);
}

/* ============ exceções e feriados (substitui textarea cru) ============ */
.schedule-exceptions-field { display: grid; gap: 8px; }
.schedule-exceptions-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.schedule-exceptions-list:empty::before {
  content: "Nenhuma exceção cadastrada."; color: var(--muted-2); font-size: .68rem;
}
.exception-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--field);
  color: var(--text); font-size: .68rem;
}
.exception-chip button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: var(--surface-3); color: var(--muted); font-size: .72rem; line-height: 1; cursor: pointer;
}
.exception-chip button:hover { background: var(--bad-wash); color: var(--bad); }
.schedule-exceptions-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schedule-exceptions-add input[type="date"] {
  min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: var(--field);
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus, .rule-form input:focus, .rule-form select:focus, .manager-form input:focus, .manager-form select:focus, .manager-form textarea:focus, .dialog-form input:focus, .dialog-form select:focus, .dialog-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.compact { width: auto; min-width: 140px; min-height: 36px; padding: 9px 14px; align-self: end; }
.admin-form > .compact { justify-self: start; }
.weekday-fieldset { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 9px; }
.weekday-fieldset legend { padding: 0 4px; color: var(--muted-2); font-size: .66rem; }
.weekday-fieldset label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .72rem; }
.weekday-fieldset input { width: auto; min-height: auto; accent-color: var(--brand); }
.time-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.admin-list { display: grid; gap: 7px; max-height: 320px; overflow: auto; }
.admin-list:empty { display: none; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--card); }
.admin-row-main { min-width: 0; flex: 1; }
.admin-row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; font-weight: 600; }
.admin-row-main span { color: var(--muted-2); font-size: .64rem; }
.admin-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.action-menu-trigger { display: grid; place-items: center; width: 34px; min-width: 34px; min-height: 34px; padding: 0; cursor: pointer; font-size: 18px; line-height: 1; letter-spacing: 2px; }
.status-chip {
  min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 11px; border: 1px solid var(--good); border-radius: 8px;
  color: var(--good); background: var(--good-wash); font-size: .68rem; font-weight: 650;
}
.status-chip.inactive { border-color: var(--bad); color: var(--bad); background: var(--bad-wash); }
.manager-departments-fieldset { grid-column: 1 / -1; min-width: 0; padding: 11px; border: 1px solid var(--line-soft); border-radius: 9px; }
.manager-departments-fieldset legend { padding: 0 5px; color: var(--muted-2); font-size: .66rem; font-weight: 650; }
.manager-department-options { display: flex; flex-wrap: wrap; gap: 7px; }
.manager-department-options label { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); background: var(--card); font-size: .66rem; cursor: pointer; }
.manager-department-options input { width: auto; min-height: auto; margin: 0; accent-color: var(--brand); }
.manager-list { max-height: 390px; }
.manager-active-field { width: fit-content; }
.rules-admin-panel { margin-top: 12px; }
.rule-form { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(220px, 2.2fr) minmax(140px, .9fr) minmax(160px, 1.1fr) auto; align-items: end; gap: 10px; margin-bottom: 16px; }
.rule-pattern { min-width: 160px; }
.rule-row-actions { align-items: center; justify-content: flex-end; }
.external-type-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(120px, .7fr) minmax(160px, .8fr) auto; align-items: end; gap: 10px; }
.external-entry-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.checkbox-field { min-height: 36px; display: flex !important; grid-template-columns: none !important; flex-direction: row; align-items: center; gap: 8px !important; padding: 0 4px; white-space: nowrap; }
.rule-form .checkbox-field input { flex: 0 0 15px; width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--brand); }
.state-summary div { min-width: 0; }

/* dialogs */
.token-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.token-dialog::backdrop { background: var(--overlay); backdrop-filter: blur(3px); }
.token-dialog-header { display: flex; justify-content: space-between; }
.token-dialog-header button { border: 0; color: var(--muted-2); background: transparent; font-size: 1.3rem; cursor: pointer; }
.token-dialog h2 { margin: 10px 0 5px; font-size: 1.05rem; }
.token-dialog > p { color: var(--muted); font-size: .74rem; line-height: 1.55; }
.token-box { display: grid; gap: 9px; margin: 16px 0; }
.token-box code, .token-box input { overflow-wrap: anywhere; width: 100%; padding: 13px; border: 1px solid var(--good-wash); border-radius: 9px; color: var(--good); background: var(--field); font: .74rem ui-monospace, monospace; user-select: all; }
.token-box button { padding: 10px; border: 0; border-radius: 8px; color: var(--on-brand); background: var(--brand); font-weight: 700; }
.token-box.command-box textarea {
  overflow-wrap: anywhere; width: 100%; min-height: 84px; resize: vertical;
  padding: 13px; border: 1px solid var(--good-wash); border-radius: 9px;
  color: var(--good); background: var(--field); font: .7rem ui-monospace, monospace; user-select: all;
}

/* ============ escolha do método de entrega (Computadores) ============ */
.delivery-method-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.delivery-method-button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px; text-align: left; min-height: auto;
}
.delivery-method-button strong { color: var(--text); font-size: .78rem; }
.delivery-method-button span { color: var(--muted); font-size: .66rem; font-weight: 500; }
.install-command code { max-height: 110px; overflow: auto; white-space: pre-wrap; user-select: text; }
.token-close-button { width: 100%; margin-top: 10px; padding: 10px; }
.dialog-form { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; border: 0; }
.dialog-wide { grid-column: 1 / -1; }
.reclassification-dialog { width: min(520px, calc(100% - 32px)); }
.reclassification-impact { margin: 0; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--muted); background: var(--field); font-size: .65rem; line-height: 1.5; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-buttons .compact { min-width: 150px; }
.action-dialog-form { display: grid; gap: 12px; }
.action-dialog-form .dialog-buttons { position: sticky; bottom: -22px; z-index: 2; margin: 0 -22px -22px; padding: 12px 22px 22px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.dialog-action { width: fit-content; min-width: 160px; }

/* ============ reports ============ */
.report-topbar { align-items: center; }
.report-export-actions { display: flex; align-items: center; gap: 8px; }
.report-filter { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(150px, .8fr) auto; align-items: end; gap: 10px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.report-filter label { min-width: 0; margin: 0; color: var(--muted); font-size: .66rem; font-weight: 650; }
.report-filter input, .report-filter select { width: 100%; min-height: 36px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); outline: none; font-size: .78rem; }
.report-filter input:focus, .report-filter select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.report-filter-note { grid-column: 1 / -1; margin: 0; color: var(--muted-2); font-size: .61rem; }
.report-period-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 0 14px; }
.report-period-summary p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.report-quality-alert { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--warn-wash); border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--warn-wash); }
.report-quality-alert strong { display: block; color: var(--text); font-size: .74rem; }
.report-quality-alert p { margin: 4px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.5; }
.report-quality-alert.reliable { border-color: var(--good-wash); border-left-color: var(--good); background: var(--good-wash); }
.report-quality-alert.reliable strong { color: var(--good); }
.report-trend-panel, .report-employee-panel { margin-top: 12px; }
.report-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; color: var(--muted-2); font-size: .6rem; }
.report-legend i { display: inline-block; width: 7px; height: 7px; margin: 2px 0 0 3px; border-radius: 2px; }
.report-series { min-height: 205px; display: flex; align-items: flex-end; gap: 12px; overflow-x: auto; padding: 20px 10px 5px; }
.report-series-column { flex: 1 0 48px; min-width: 48px; display: grid; justify-items: center; align-items: end; gap: 7px; }
.report-series-value { min-height: 13px; color: var(--muted-2); font-size: .53rem; white-space: nowrap; }
.report-series-bar { width: clamp(24px, 42%, 30px); min-height: 18px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: 6px 6px 3px 3px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-soft); }
.report-series-segment { display: block; width: 100%; min-height: 3px; }
.report-series-segment.productive { background: var(--produtivo); }
.report-series-segment.neutral { background: var(--neutro); }
.report-series-segment.unrelated { background: var(--naoprod); }
.report-series-segment.unclassified { background: var(--semclass); }
.report-series-segment.ignored { background: var(--muted-2); }
.report-series-label { color: var(--muted-2); font-size: .55rem; }
.report-department-list { display: grid; gap: 7px; }
.report-department-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--card); }
.report-department-row strong { display: block; overflow: hidden; font-size: .74rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.report-department-row span { display: block; margin-top: 3px; color: var(--muted-2); font-size: .6rem; }
.report-row-metrics { display: flex; gap: 14px; text-align: right; }
.report-row-metrics small { display: block; color: var(--muted-2); font-size: .53rem; }
.report-row-metrics strong { margin-top: 2px; font-size: .68rem; }
.report-composition { display: grid; gap: 14px; }
.report-composition-row { display: grid; grid-template-columns: 100px minmax(80px, 1fr) 65px; align-items: center; gap: 9px; }
.report-composition-row > span:first-child { color: var(--muted); font-size: .64rem; }
.report-composition-row > strong { font-size: .66rem; text-align: right; }
.report-composition-track { height: 12px; overflow: hidden; border-radius: 99px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-soft); }
.report-composition-track i { display: block; height: 100%; }
.report-composition-track .productive { background: var(--produtivo); } .report-composition-track .neutral { background: var(--neutro); } .report-composition-track .unrelated { background: var(--naoprod); } .report-composition-track .unclassified { background: var(--semclass); } .report-composition-track .external { background: var(--brand); }
.report-table { min-width: 760px; }
.report-table th { white-space: nowrap; }
.report-table td { font-size: .66rem; white-space: nowrap; }
.report-employee-name { color: var(--text); font-weight: 650; }
.report-provisional { color: var(--warn); }

/* ============ alerts ============ */
.alert-guidance { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--info-wash); border-radius: var(--radius); background: var(--info-wash); }
.alert-guidance > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--info-wash); border-radius: 8px; color: var(--info); font-size: .72rem; font-weight: 800; }
.alert-guidance p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.alert-guidance strong { color: var(--text); }
.alert-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.alert-summary article { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.alert-summary-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-size: .72rem; font-weight: 800; }
.alert-summary-icon.critical { color: var(--bad); background: var(--bad-wash); }
.alert-summary-icon.warning { color: var(--warn); background: var(--warn-wash); }
.alert-summary-icon.total { color: var(--info); background: var(--info-wash); }
.alert-summary strong { display: block; color: var(--text); font-size: 1.15rem; font-weight: 680; line-height: 1; }
.alert-summary small { display: block; margin-top: 4px; color: var(--muted-2); font-size: .63rem; }
.alert-filters { display: flex; gap: 4px; margin-bottom: 12px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.alert-filters button { flex: 1; min-width: max-content; min-height: 32px; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: .66rem; font-weight: 650; }
.alert-filters button:hover { color: var(--text); background: var(--surface-2); }
.alert-filters button.active { color: var(--brand); background: var(--brand-wash); }
.alert-feed-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 0 12px; }
.alert-feed-header p { margin: 4px 0 0; color: var(--muted-2); font-size: .66rem; }
.alert-list { display: grid; gap: 9px; }
.alert-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; padding: 15px; border: 1px solid var(--line-soft); border-left-width: 3px; border-radius: var(--radius); background: var(--surface); }
.alert-card.critical { border-left-color: var(--bad); }
.alert-card.warning { border-left-color: var(--warn); }
.alert-card.information { border-left-color: var(--brand); }
.alert-marker { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); background: var(--surface-3); font-size: .68rem; font-weight: 800; }
.alert-card.critical .alert-marker { color: var(--bad); background: var(--bad-wash); }
.alert-card.warning .alert-marker { color: var(--warn); background: var(--warn-wash); }
.alert-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.alert-category { display: block; color: var(--muted-2); font-size: .56rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.alert-card h2 { margin: 4px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: .8rem; font-weight: 650; line-height: 1.35; }
.alert-severity { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: .56rem; font-weight: 700; }
.alert-severity.critical { color: var(--bad); background: var(--bad-wash); }
.alert-severity.warning { color: var(--warn); background: var(--warn-wash); }
.alert-severity.information { color: var(--info); background: var(--info-wash); }
.alert-description, .alert-recommendation { margin: 9px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.alert-recommendation { color: var(--muted-2); }
.alert-recommendation strong { color: var(--muted); }
.alert-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.alert-card-footer > span { overflow: hidden; color: var(--muted-2); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.alert-action { color: var(--brand); font-size: .62rem; font-weight: 650; text-decoration: none; }
.alert-action:hover { text-decoration: underline; }
.alert-empty { display: grid; justify-items: center; min-height: 200px; padding: 38px 20px; text-align: center; }
.alert-empty > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--good); background: var(--good-wash); font-size: 1rem; }
.alert-empty strong { margin-top: 12px; font-size: .82rem; }
.alert-empty p { max-width: 420px; margin: 6px 0 0; color: var(--muted-2); font-size: .67rem; line-height: 1.5; }

/* ============ live ============ */
.live-topbar { align-items: center; }
.live-update { display: flex; align-items: center; gap: 12px; }
.live-guidance { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--info-wash); border-radius: var(--radius); background: var(--info-wash); }
.live-guidance > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--info-wash); border-radius: 8px; color: var(--info); font-size: .72rem; font-weight: 800; }
.live-guidance p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.live-guidance strong { color: var(--text); }
.live-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.live-summary article { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.live-summary span { color: var(--muted-2); font-size: .66rem; }
.live-summary strong { color: var(--text); font-size: 1.15rem; font-weight: 680; }
.live-filters { display: grid; grid-template-columns: minmax(190px, 1.25fr) minmax(170px, .8fr) minmax(170px, .8fr) auto; align-items: end; gap: 10px; margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.live-filters label { min-width: 0; margin: 0; color: var(--muted); font-size: .64rem; font-weight: 650; }
.live-filters input, .live-filters select { width: 100%; min-height: 36px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); outline: none; font-size: .78rem; }
.live-filters input:focus, .live-filters select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.live-filters .secondary-button { min-height: 36px; white-space: nowrap; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-card { padding: 15px; border: 1px solid var(--line-soft); border-left: 3px solid var(--surface-3); border-radius: var(--radius); background: var(--surface); }
.live-card.active_now { border-left-color: var(--good); }
.live-card.outside_schedule { border-left-color: var(--brand); }
.live-card.offline, .live-card.never_connected { border-left-color: var(--bad); }
.live-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.live-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.live-identity strong, .live-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-identity strong { color: var(--text); font-size: .77rem; font-weight: 600; }
.live-identity div span { margin-top: 3px; color: var(--muted-2); font-size: .61rem; }
.live-state { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-3); font-size: .57rem; font-weight: 700; }
.live-state.active_now { color: var(--good); background: var(--good-wash); }
.live-state.outside_schedule { color: var(--info); background: var(--info-wash); }
.live-state.offline, .live-state.never_connected { color: var(--bad); background: var(--bad-wash); }
.live-activity { display: grid; gap: 4px; margin-top: 13px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--field); }
.live-activity.current { border-color: var(--good-wash); background: var(--good-wash); }
.live-activity > span { color: var(--muted-2); font-size: .55rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.live-activity strong { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.live-activity small { color: var(--muted-2); font-size: .59rem; }
.live-screen-preview { position: relative; min-height: 160px; display: grid; place-items: center; margin-top: 12px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 9px; background: #070a10; }
.live-screen-preview img { width: 100%; height: 100%; min-height: 160px; max-height: 250px; object-fit: contain; }
.live-screen-preview.empty::before { content: "Tela disponível sob demanda"; color: #75808b; font-size: .62rem; }
.live-screen-preview.unavailable::before { content: "Transmissão indisponível neste estado"; color: #69727c; font-size: .6rem; }
.live-screen-preview.agent-update-required::before { content: "Atualize o agente para habilitar a tela ao vivo"; color: #9aa6b3; }
.live-screen-preview-button { position: absolute; inset: 0; border: 0; color: transparent; background: transparent; cursor: zoom-in; }
.live-screen-preview-button:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.live-screen-preview-status { position: absolute; left: 8px; bottom: 7px; padding: 4px 7px; border-radius: 6px; color: #cbd7e4; background: #091019d9; font-size: .53rem; font-weight: 700; }
.live-interaction-signals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.live-interaction-signals span { padding: 4px 7px; border-radius: 6px; color: var(--muted); background: var(--field); font-size: .54rem; }
.live-technical { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-top: 11px; color: var(--muted-2); font-size: .58rem; }
.live-technical .attention { color: var(--warn); font-weight: 700; }
.live-empty { display: grid; justify-items: center; min-height: 170px; padding: 34px 20px; text-align: center; }
.live-empty strong { font-size: .82rem; }
.live-empty p { margin: 6px 0 0; color: var(--muted-2); font-size: .67rem; }
.live-privacy-note { margin: 15px 0 0; color: var(--muted-2); font-size: .6rem; text-align: center; }
.live-screen-dialog { width: min(96vw, 1280px); max-width: none; padding: 0; overflow: hidden; border: 1px solid #3b4857; border-radius: 14px; color: var(--text); background: #10151b; box-shadow: 0 24px 70px #000b; }
.live-screen-dialog::backdrop { background: #020407d9; backdrop-filter: blur(4px); }
.live-screen-fullscreen-surface { width: 100%; color: var(--text); background: #10151b; }
.live-screen-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.live-screen-dialog-header h2 { margin: 3px 0 0; font-size: .95rem; }
.live-screen-dialog-header p { margin: 3px 0 0; color: var(--muted); font-size: .63rem; }
.live-screen-dialog-header button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #171e26; font-size: 1.1rem; }
.live-screen-stage { position: relative; display: grid; place-items: center; min-height: min(70vh, 720px); overflow: hidden; background: #050608; }
.live-screen-stage canvas { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #050608; }
.live-screen-stage > img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
.live-screen-waiting { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 11px; color: #8d98a5; background: #080b0f; font-size: .68rem; }
.live-screen-recording { position: absolute; top: 11px; left: 11px; padding: 6px 8px; border-radius: 7px; color: #ffc2c8; background: #5d1424e8; font-size: .59rem; font-weight: 700; }
.live-screen-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--line-soft); }
.live-screen-controls label { margin: 0; color: var(--muted); font-size: .56rem; }
.live-screen-controls select { display: block; min-width: 128px; min-height: 34px; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #11171d; }
.live-screen-controls button { min-height: 34px; }
.live-screen-note { margin: 0; padding: 0 18px 13px; color: #727c87; font-size: .55rem; }
.profile-live-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 12px; }
.profile-live-panel .panel-header { grid-column: 1 / -1; }
.recording-player-controls { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line-soft); }
.recording-player-controls input { width: 100%; accent-color: var(--brand); }
.recording-player-controls strong, .recording-player-controls label { color: var(--muted); font-size: .62rem; }
.recording-link { white-space: nowrap; }
.live-screen-fullscreen-surface:fullscreen { width: 100vw; height: 100vh; margin: 0; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: #10151b; }
.live-screen-fullscreen-surface:fullscreen .live-screen-stage { min-height: 0; height: 100%; }
.live-screen-fullscreen-surface:fullscreen .live-screen-stage canvas { width: 100%; height: 100%; max-height: none; }

/* ============ platform console ============ */
.platform-security-card { border-color: var(--info-wash); }
.platform-nav .nav-item { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.platform-nav .nav-item.active { background: var(--brand-wash); }
.platform-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.capability-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.capability-fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.capability-fieldset legend { padding: 0 5px; color: var(--muted); font-size: .65rem; }
.platform-grid { display: grid; grid-template-columns: minmax(540px, 1.15fr) minmax(380px, .85fr); gap: 12px; }
.onboarding-panel, .tenant-list-panel { min-height: 600px; }
.platform-form { margin: 0; padding: 0; border: 0; }
.platform-form-section { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--field); }
.platform-form-section legend { padding: 0 5px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.platform-form-section label { margin: 0; }
.platform-form-section label small { color: var(--muted-2); font-size: .58rem; line-height: 1.4; }
.form-section-help { grid-column: 1 / -1; margin: -2px 0 2px; color: var(--muted-2); font-size: .63rem; line-height: 1.45; }
.platform-time-grid, .platform-reason { grid-column: 1 / -1; }
.platform-submit-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; margin: 0; padding: 4px 0 0; }
.platform-submit-row .primary-button { min-width: 170px; }
.tenant-list { display: grid; gap: 10px; max-height: 680px; overflow: auto; }
.tenant-card { padding: 15px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); }
.tenant-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tenant-card-header strong { display: block; font-size: .8rem; font-weight: 650; }
.tenant-card-header div > span { color: var(--muted-2); font-size: .62rem; }
.tenant-contacts { display: grid; gap: 3px; margin: 10px 0; }
.tenant-contacts p { margin: 0; color: var(--muted-2); font-size: .66rem; line-height: 1.45; }
.tenant-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.tenant-metrics div { display: grid; gap: 2px; }
.tenant-metrics strong { font-size: .74rem; }
.tenant-metrics span { color: var(--muted-2); font-size: .58rem; }
.tenant-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tenant-details-dialog { width: min(700px, calc(100% - 32px)); }
.tenant-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.tenant-details-grid div { padding: 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--field); }
.tenant-details-grid span { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; }
.tenant-details-grid strong { display: block; overflow-wrap: anywhere; font-size: .73rem; line-height: 1.4; }

/* ============ product experience reconciliation ============ */
.directory-filters { display: grid; grid-template-columns: minmax(200px, 1.2fr) repeat(2, minmax(145px, .7fr)) auto; align-items: end; gap: 10px; margin-bottom: 12px; padding: 15px; }
.directory-filters .secondary-button { min-height: 36px; white-space: nowrap; }
.directory-panel { min-height: 280px; }
.directory-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.directory-table th { padding: 0 12px 10px; color: var(--muted-2); font-size: .59rem; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.directory-table td { padding: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .72rem; line-height: 1.4; vertical-align: middle; }
.directory-table .directory-name { color: var(--text); font-weight: 650; }
.directory-row { cursor: pointer; transition: background-color .12s; }
.directory-row:hover, .directory-row:focus-visible { background: var(--surface-2); outline-offset: -2px; }
.privacy-boundary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--info-wash); border-radius: var(--radius); background: var(--info-wash); }
.privacy-boundary > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--info); background: var(--surface); font-weight: 800; }
.privacy-boundary p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.privacy-boundary strong { color: var(--text); }
.profile-ranking-groups { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-ranking-groups > *, .profile-ranking-groups .ranking-list { min-width: 0; }
.profile-ranking-groups h3 { margin: 0 0 9px; color: var(--muted-2); font-size: .61rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.profile-external-panel { margin-top: 12px; }
.panel-header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pending-count { padding: 4px 9px; border-radius: 999px; color: var(--warn); background: var(--warn-wash); font-size: .62rem; font-weight: 700; }
.classification-bulk-toolbar label { display: grid; gap: 3px; color: var(--muted-2); font-size: .58rem; font-weight: 700; }
.classification-bulk-toolbar select { min-width: 132px; padding: 7px 28px 7px 9px; }
.classification-bulk-toolbar { display: flex; align-items: end; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.classification-bulk-toolbar.hidden { display: none; }
.classification-bulk-toolbar > button { align-self: end; }
.classification-selection { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: .62rem; font-weight: 700; }
.classification-selection input { accent-color: var(--accent); }
.status-chip.external-approved { color: var(--good); background: var(--good-wash); }
.status-chip.external-pending { color: var(--warn); background: var(--warn-wash); }
.status-chip.external-denied, .status-chip.external-cancelled { color: var(--bad); background: var(--bad-wash); }
.admin-tab-panel > .rules-admin-panel + .rules-admin-panel { margin-top: 12px; }
.external-flow-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--info-wash); border-radius: 9px; color: var(--muted); background: var(--info-wash); font-size: .66rem; line-height: 1.5; }
.external-flow-note > span { display: grid; place-items: center; flex: 0 0 20px; height: 20px; border-radius: 50%; color: var(--info); background: var(--surface); font-weight: 800; }
.external-activity-row { align-items: center; padding: 13px 14px; }
.external-activity-content { min-width: 0; flex: 1; }
.external-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.external-activity-heading > strong { overflow: hidden; color: var(--text); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.external-activity-heading .status-chip { min-height: 25px; padding: 4px 8px; }
.external-activity-metadata { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(140px, 1fr) minmax(250px, 1.5fr) minmax(80px, .55fr); gap: 9px 18px; margin: 10px 0 0; }
.external-activity-metadata div { min-width: 0; }
.external-activity-metadata dt { color: var(--muted-2); font-size: .53rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.external-activity-metadata dd { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.ranking-table .directory-name { color: var(--text); font-weight: 650; }
.table-wrap { border-radius: var(--radius-sm); scrollbar-color: var(--line) transparent; }
table th { white-space: nowrap; }
dialog[open] { animation: dialog-in .16s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(.99); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ light theme ============ */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f7f9fc; --surface-3: #eef2f8;
    --line: #e3e8f0; --line-soft: #edf1f6; --text: #141a24; --muted: #4a586b; --muted-2: #8592a5;
    --brand: #3f5bd8; --brand-hover: #3550c8; --brand-wash: #e9edfc; --on-brand: #ffffff;
    --produtivo: #17976a; --neutro: #2f6fd0; --naoprod: #d0673a; --semclass: #97a3b5;
    --good: #17976a; --good-wash: #e3f4ec; --warn: #b47d12; --warn-wash: #f8efd9; --bad: #cf3d51; --bad-wash: #fbe7ea;
    --info: #3f5bd8; --info-wash: #e9edfc;
    --field: #f3f5f8; --card: #ffffff; --track: #e1e6eb;
    --ring: color-mix(in srgb, var(--brand) 18%, transparent); --overlay: #16202b66;
    --shadow: 0 1px 2px rgba(20,26,36,.06);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f7f9fc; --surface-3: #eef2f8;
  --line: #e3e8f0; --line-soft: #edf1f6; --text: #141a24; --muted: #4a586b; --muted-2: #8592a5;
  --brand: #3f5bd8; --brand-hover: #3550c8; --brand-wash: #e9edfc; --on-brand: #ffffff;
  --produtivo: #17976a; --neutro: #2f6fd0; --naoprod: #d0673a; --semclass: #97a3b5;
  --good: #17976a; --good-wash: #e3f4ec; --warn: #b47d12; --warn-wash: #f8efd9; --bad: #cf3d51; --bad-wash: #fbe7ea;
  --info: #3f5bd8; --info-wash: #e9edfc;
  --field: #f3f5f8; --card: #ffffff; --track: #e1e6eb;
  --ring: color-mix(in srgb, var(--brand) 18%, transparent); --overlay: #16202b66;
  --shadow: 0 1px 2px rgba(20,26,36,.06);
}

/* ============ roteiro de implantação (orientação, não wizard) ============ */
.onboarding-steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  margin: 0 0 var(--space-4); padding: 0; list-style: none;
}
.onboarding-steps li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted-2); font-size: .66rem; font-weight: 650;
}
.onboarding-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface-3); color: var(--muted-2); font-size: .6rem;
}
.onboarding-steps li.done { border-color: var(--good); color: var(--good); }
.onboarding-steps li.done .onboarding-index { background: var(--good-wash); color: var(--good); }
.onboarding-steps li.current { border-color: var(--brand); color: var(--text); }
.onboarding-steps li.current .onboarding-index { background: var(--brand); color: var(--on-brand); }
/* Implantação concluída: o roteiro recua para não competir com o conteúdo. */
.onboarding-steps.complete { opacity: .55; }

.inline-create-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }

/* ============ listagens (pesquisa, filtro, paginação) ============ */
.listing-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-3);
}
.listing-toolbar label {
  display: flex; flex-direction: column; gap: 5px;
  color: var(--muted); font-size: .66rem; font-weight: 650;
}
.listing-toolbar input, .listing-toolbar select {
  min-height: 34px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--field); color: var(--text); font-size: .74rem;
}
.listing-toolbar input:focus-visible, .listing-toolbar select:focus-visible {
  outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--brand);
}
.listing-summary { margin: 0 0 var(--space-2); color: var(--muted-2); font-size: .68rem; }
.listing-summary:empty { margin: 0; }
.listing-pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-3); margin-top: var(--space-4);
}
.listing-pagination:empty { margin: 0; }
.listing-position { color: var(--muted); font-size: .68rem; font-weight: 650; }
.listing-pagination button[disabled] { opacity: .45; cursor: not-allowed; }

/* ============ menu "Mais" das linhas ============ */
.row-menu { display: inline-flex; }
.row-menu-items {
  position: fixed; z-index: 170; width: max-content; min-width: 204px;
  max-width: calc(100vw - 16px); display: grid; gap: 2px; padding: 5px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); box-shadow: var(--shadow-raised);
}
.row-menu-items.hidden { display: none; }
.row-menu-item {
  min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text);
  font-size: 12px; font-weight: 600; text-align: left; cursor: pointer;
}
.row-menu-item:hover { background: var(--surface-3); }
.row-menu-item.danger { color: var(--bad); }
.row-menu-item.danger:hover { background: var(--bad-wash); }

.dialog-divider { height: 1px; margin: var(--space-5) 0; background: var(--line); }
.dialog-subsection h3 { margin: 0 0 6px; font-size: .82rem; }
.dialog-subsection p { margin: 0 0 var(--space-3); }

/* ============ responsive ============ */
@media (max-width: 1500px) {
  .admin-grid[data-admin-panel="jornadas"] { grid-template-columns: 1fr; }
}
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-filter-heading { grid-column: 1 / -1; }
  .directory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .keyword-search-grid { grid-template-columns: 1fr; }
  .admin-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .rule-form, .external-type-form, .external-entry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-summary, .live-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: 1fr; }
  .platform-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidebar nav { order: 4; width: 100%; margin: 0; flex-direction: row; overflow-x: auto; }
  .nav-group-label { display: none; }
  .nav-item { flex: 0 0 auto; }
  .tenant-context { max-width: 160px; margin: 0 0 0 auto; }
  .sidebar-spacer, .privacy-card, .privacy-note, .product-signature { display: none; }
  .dashboard { padding: 20px 16px 44px; }
  .global-filter-bar { padding: 14px 16px 0; grid-template-columns: 1fr; }
  .global-filter-heading { grid-column: auto; }
  .metric-grid, .breakdown-grid, .legend-grid, .quality-grid, .profile-ranking-groups, .directory-filters { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-form, .manager-form, .rule-form, .external-type-form, .external-entry-form, .keyword-search-form { grid-template-columns: 1fr; }
  .schedule-period { grid-template-columns: 1fr 1fr; }
  .schedule-period button { grid-column: 1 / -1; }
  .platform-form-section, .time-grid, .report-filter { grid-template-columns: 1fr; }
  .listing-toolbar { grid-template-columns: 1fr; }
  .listing-pagination { justify-content: space-between; }
  .delivery-method-choice { grid-template-columns: 1fr; }
  .capability-fieldset, .tenant-metrics { grid-template-columns: 1fr 1fr; }
  .live-summary, .live-filters, .live-grid { grid-template-columns: 1fr; }
  .alert-card { grid-template-columns: 1fr; }
  .alert-marker { display: none; }
  .state-summary { grid-template-columns: repeat(2, 1fr); }
  .compact { width: 100%; }
  .mobile-product-signature { display: block; margin: 26px 0 0; color: var(--muted-2); font-size: .64rem; text-align: center; }
  .mobile-product-signature strong { color: var(--muted); }
}

/* ============ tenant product UI system ============ */
:root {
  --bg: #07101c;
  --surface: #0d1826;
  --surface-2: #111e2e;
  --surface-3: #17263a;
  --line: #223249;
  --line-soft: #18283b;
  --text: #edf3fa;
  --muted: #9aabbe;
  --muted-2: #64788f;
  --brand: #5c7cfa;
  --brand-hover: #7390ff;
  --brand-wash: #162749;
  --on-brand: #fff;
  --field: #091421;
  --card: #0b1624;
  --shadow: 0 1px 2px rgb(0 0 0 / 28%);
  --shadow-raised: 0 18px 50px rgb(0 0 0 / 34%);
  --control-height: 38px;
  --row-height: 60px;
}

body { font-size: 13px; background: radial-gradient(circle at 55% -20%, #132644 0, var(--bg) 36rem); }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { z-index: 20; padding: 20px 14px 14px; background: #091321; box-shadow: inset -1px 0 0 rgb(255 255 255 / 2%); }
.sidebar .brand { padding: 0 9px 14px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 7px 20px color-mix(in srgb, var(--brand) 22%, transparent); }
.tenant-context { order: 0; margin: 0 4px 9px; padding: 10px 11px; border-color: var(--line-soft); background: linear-gradient(135deg, #101e30, #0c1827); }
.tenant-context > span { color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.tenant-context strong { margin-top: 2px; color: var(--text); font-size: 12px; }
.tenant-context small { color: var(--muted-2); font-size: 10px; }
.sidebar nav { min-height: 0; margin-top: 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.nav-group-label { margin: 14px 10px 5px; font-size: 9px; letter-spacing: .13em; }
.nav-item { min-height: 37px; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.nav-item.active { color: #a9baff; background: linear-gradient(90deg, #172c50, #12233e); box-shadow: inset 2px 0 0 var(--brand); }
.nav-item:hover { background: #101e2f; }
.sidebar-spacer { min-height: 8px; }

.account-area { position: relative; }
.account-trigger { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--text); background: #0d1928; text-align: left; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { border-color: #354b69; background: #112033; }
.account-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: #dce5ff; background: linear-gradient(135deg, #314a80, #263964); font-size: 11px; font-weight: 800; }
.account-identity { min-width: 0; display: grid; gap: 1px; }
.account-identity strong, .account-identity small, .account-identity em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { font-size: 11px; font-weight: 700; }
.account-identity small { color: var(--muted); font-size: 9px; }
.account-identity em { color: var(--muted-2); font-size: 9px; font-style: normal; }
.account-chevron { color: var(--muted-2); font-size: 11px; }
.account-menu { position: fixed; z-index: 160; width: 224px; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #111d2d; box-shadow: var(--shadow-raised); }
.account-menu button { width: 100%; min-height: 40px; display: grid; gap: 2px; justify-items: start; padding: 8px 10px; border: 0; border-radius: 7px; color: var(--text); background: transparent; text-align: left; }
.account-menu button:hover { background: var(--surface-3); }
.account-menu button span { font-size: 11px; font-weight: 680; }
.account-menu button small { color: var(--muted-2); font-size: 9px; }
.account-menu .theme-toggle { display: flex; align-items: center; gap: 8px; margin: 0; }
.account-menu .logout-button { margin: 0; color: #ff8897; }
.account-menu-divider { height: 1px; margin: 4px 5px; background: var(--line-soft); }
.sidebar-signature { margin-top: 8px; padding-top: 8px; }

.workspace { min-height: 100vh; background: linear-gradient(180deg, rgb(11 24 40 / 55%), transparent 310px); }
.global-filter-bar { max-width: 1500px; padding: 14px 30px 0; grid-template-columns: minmax(210px, 1fr) 150px 190px 220px auto; }
.global-filter-heading strong { font-size: 11px; }
.global-filter-bar input, .global-filter-bar select, .directory-filters input, .directory-filters select { min-height: var(--control-height); background: var(--field); }
.dashboard { max-width: 1500px; padding: 24px 30px 56px; }
.topbar { align-items: center; margin-bottom: 18px; }
.topbar h1 { margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.page-description { max-width: 760px; font-size: 12px; line-height: 1.55; }
.primary-button { min-height: var(--control-height); padding: 8px 14px; border-radius: 8px; font-size: 11px; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 18%, transparent); }
.secondary-button, .danger-button, .deployment-button { min-height: 34px; border-color: var(--line); color: var(--muted); background: var(--surface-2); font-size: 10px; }
.secondary-button:hover { color: var(--text); border-color: #3a4e6b; }
.refresh-button { border-color: var(--line); background: var(--surface-2); }

.panel, .metric-card { border-color: var(--line-soft); background: linear-gradient(150deg, rgb(15 29 46 / 96%), rgb(10 22 36 / 96%)); box-shadow: 0 1px 0 rgb(255 255 255 / 2%); }
.panel { border-radius: 12px; }
.panel-header h2 { font-size: 13px; font-weight: 700; }
.panel-header p { margin: 5px 0 0; color: var(--muted-2); font-size: 10px; }
.metric-grid { gap: 10px; }
.metric-card { min-height: 132px; padding: 15px 16px; border-radius: 11px; }
.metric-heading span:first-child { color: var(--muted); font-size: 10px; }
.metric-value { margin-top: 12px; font-size: 26px; letter-spacing: -.035em; }
.metric-foot { margin-top: auto; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.executive-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.executive-metrics .metric-card:nth-child(6) { display: none; }
.ai-banner { margin: 12px 0; border-color: #294166; background: linear-gradient(110deg, #101f36, #101a2a); }
.ai-icon { color: #9db1ff; background: #1b3157; font-size: 15px; }
.ai-who b { color: var(--text); }
.quality-panel { margin: 12px 0; }
.main-grid, .breakdown-grid { gap: 12px; }
.activity-panel { margin-top: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: 9px; background: rgb(6 14 24 / 28%); }
table { border-collapse: collapse; }
table th { padding: 10px 12px; color: var(--muted-2); background: #0a1624; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
table td { padding: 11px 12px; border-top: 1px solid var(--line-soft); font-size: 10px; }

.live-summary, .alert-summary, .admin-summary { gap: 9px; }
.live-summary article, .alert-summary article, .admin-summary article { min-height: 78px; border-color: var(--line-soft); background: var(--surface); }
.live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.live-card { border-color: var(--line); border-radius: 12px; background: linear-gradient(150deg, #101d2e, #0a1522); box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
.live-card .live-screen-preview { min-height: 230px; margin: 0 -1px; border-radius: 8px; background: #05090e; }
.live-card-heading { padding: 13px 14px 10px; }
.live-activity, .live-interaction-signals, .live-technical { margin-inline: 14px; }
.live-technical { padding-bottom: 13px; }

.directory-filters { padding: 12px; border-radius: 10px; background: var(--surface); }
.directory-panel { padding: 14px; }
.directory-table { min-width: 1080px; }
.directory-table th, .directory-table td { padding: 10px 11px; }
.directory-row { cursor: default; }
.directory-row:hover { background: #101f31; }
.directory-row td:last-child { text-align: right; }
.directory-actions-heading { text-align: right !important; }

.profile-head { min-width: 0; padding: 17px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.profile-info { width: auto; max-width: 100%; min-width: 0; }
.profile-name-row, .profile-name-row h1 { min-width: 0; }
.profile-name-row h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta { min-width: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.profile-meta span { min-width: 0; display: grid; gap: 3px; padding: 8px 10px; border-left: 1px solid var(--line-soft); }
.profile-meta small { color: var(--muted-2); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.profile-meta strong { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-tabs, .section-tabs { display: flex; gap: 4px; margin: 12px 0; padding: 4px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.profile-tabs button, .section-tabs button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; }
.profile-tabs button.active, .section-tabs button.active { color: #cbd5ff; background: var(--brand-wash); }
[data-profile-panel] { animation: tenant-panel-in .14s ease-out; }
@keyframes tenant-panel-in { from { opacity: .4; transform: translateY(3px); } }

.admin-grid { grid-template-columns: minmax(0, 1fr); }
.configuration-workspace.configuration-active { display: block; }
.configuration-surface, .configuration-surface > .admin-grid, .configuration-surface > .panel { min-width: 0; }
.configuration-surface { overflow: hidden; }
.configuration-surface .admin-panel { min-width: 0; overflow: hidden; }
.admin-panel, .rules-admin-panel { padding: 15px; }
.module-panel-header { align-items: center; }
.module-panel-header p { margin: 4px 0 0; color: var(--muted); font-size: .66rem; }
.listing-toolbar { grid-template-columns: minmax(260px, 420px) 1fr; align-items: end; margin: 14px 0 10px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: #0a1624; }
.listing-toolbar input { width: 100%; min-height: 36px; }
.listing-summary { align-self: center; margin: 0; text-align: right; }
.admin-list { display: grid; border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; background: rgb(6 14 24 / 25%); }
.admin-row { min-height: var(--row-height); padding: 10px 11px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
.admin-row:last-child { border-bottom: 0; }
.admin-row:hover { background: #101e30; }
.admin-row-main strong { font-size: 11px; }
.admin-row-main span { margin-top: 3px; font-size: 9px; }
.admin-row-actions { flex-wrap: nowrap; }
.structured-admin-list { display: block; width: 100%; min-width: 0; max-width: 100%; max-height: 390px; overflow: auto; }
.admin-table-header { color: var(--muted-2); background: var(--surface-2); font-size: .54rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.admin-table-header > span { padding: 9px 10px; }
.admin-table-header > span:last-child { text-align: right; }
.admin-structured-row { display: grid; align-items: center; min-width: 760px; }
.admin-structured-row.admin-row { display: grid; min-height: 54px; padding: 0; }
.admin-structured-row-departments { grid-template-columns: minmax(145px, 1.35fr) minmax(105px, .8fr) minmax(125px, .9fr) 94px 105px; }
.admin-structured-row-schedules { grid-template-columns: minmax(120px, 1.05fr) 68px minmax(170px, 1.45fr) 76px 88px 76px 96px; min-width: 880px; }
.admin-structured-row-devices { grid-template-columns: minmax(130px, 1.15fr) minmax(105px, .95fr) minmax(95px, .85fr) minmax(105px, .95fr) minmax(105px, .9fr) 96px; min-width: 810px; }
.admin-structured-row-managers { grid-template-columns: minmax(110px, .85fr) minmax(150px, 1.15fr) minmax(110px, .85fr) minmax(115px, .95fr) 76px 96px; min-width: 810px; }
.admin-structured-cell { min-width: 0; overflow: hidden; padding: 9px 10px; color: var(--muted); font-size: .63rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.admin-structured-cell.primary { color: var(--text); font-size: .68rem; font-weight: 650; }
.admin-structured-cell .status-chip { min-height: 27px; padding: 4px 8px; font-size: .56rem; }
.admin-structured-actions { display: flex; justify-content: flex-end; padding: 7px 9px; }
.admin-structured-actions .admin-row-actions > .secondary-button { min-width: auto; }
.status-chip { font-size: 9px; }
.action-menu-panel { position: fixed; background: #132033; }

.tenant-form-dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow: auto; }
.tenant-form-dialog-large { width: min(820px, calc(100% - 28px)); }
.tenant-form-dialog .admin-form, .tenant-form-dialog .manager-form, .tenant-form-dialog .rule-form { margin-top: 18px; padding: 0; border: 0; background: transparent; }
.tenant-form-dialog .dialog-buttons { margin-top: 8px; }
.token-dialog-header button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); }
.rules-secondary { margin-top: 12px; }
.rules-secondary > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.rules-secondary > summary::-webkit-details-marker { display: none; }
.rules-secondary > summary strong { display: block; margin-top: 4px; font-size: 12px; }
.rules-secondary[open] > summary { margin-bottom: 12px; }
.section-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 9px; }
.section-panel-heading h3 { margin: 3px 0 0; font-size: 12px; }
.external-tabs { width: max-content; }
.account-details-hero { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.account-details-hero .account-avatar { width: 44px; height: 44px; }
.account-details-hero h2, .account-details-hero p { margin: 0; }
.account-details-hero p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.account-details-grid div { padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--field); }
.account-details-grid dt { color: var(--muted-2); font-size: 8px; text-transform: uppercase; }
.account-details-grid dd { margin: 4px 0 0; color: var(--text); font-size: 10px; }
.export-menu { position: relative; }
.export-menu > summary { list-style: none; cursor: pointer; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu > div { position: absolute; z-index: 80; top: calc(100% + 6px); right: 0; width: 230px; display: grid; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); box-shadow: var(--shadow-raised); }
.export-menu > div button { min-height: 43px; display: grid; justify-items: start; gap: 2px; padding: 8px 10px; border: 0; border-radius: 7px; color: var(--text); background: transparent; text-align: left; }
.export-menu > div button:hover { background: var(--surface-3); }
.export-menu > div button span { color: var(--muted-2); font-size: 9px; }

@media (max-width: 1320px) {
  .executive-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-filter-bar { grid-template-columns: minmax(190px, 1fr) 140px 170px 190px auto; }
}
@media (max-width: 1450px) {
  .profile-ranking-groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1180px) {
  #perfil-colaborador .profile-focus-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1180px) {
  .live-grid { grid-template-columns: 1fr; }
  .executive-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar .tenant-context { max-width: 190px; margin-left: auto; }
  .account-area { margin-left: 0; }
  .account-trigger { width: 42px; padding: 4px; border: 0; background: transparent; }
  .account-trigger .account-identity, .account-chevron { display: none; }
  .profile-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #perfil-colaborador .profile-summary-grid { grid-template-columns: minmax(0, 1fr); }
  #perfil-colaborador .profile-focus-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-tabs, .section-tabs { overflow-x: auto; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .listing-toolbar { grid-template-columns: 1fr; }
  .listing-summary { text-align: left; }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --field: #f8fafc;
  --line: #d8e0eb;
  --line-soft: #e7ecf3;
  --text: #172033;
  --muted: #5e6c82;
  --muted-2: #7d899b;
  --brand-wash: #e8edff;
  --shadow: 0 1px 2px rgb(29 43 68 / 8%);
  --shadow-raised: 0 18px 50px rgb(29 43 68 / 18%);
}
:root[data-theme="light"] body { background: radial-gradient(circle at 55% -20%, #ffffff 0, var(--bg) 36rem); }
:root[data-theme="light"] .sidebar { background: #ffffff; box-shadow: inset -1px 0 0 var(--line-soft); }
:root[data-theme="light"] .tenant-context { border-color: var(--line); background: linear-gradient(135deg, #f7f9fd, #f1f5fb); }
:root[data-theme="light"] .nav-item.active { color: #344fa3; background: linear-gradient(90deg, #edf1ff, #f2f5ff); }
:root[data-theme="light"] .nav-item:hover { background: #f1f4f9; }
:root[data-theme="light"] .account-trigger { background: #f7f9fc; }
:root[data-theme="light"] .account-trigger:hover,
:root[data-theme="light"] .account-trigger[aria-expanded="true"] { border-color: #bac6d8; background: #eef2f8; }
:root[data-theme="light"] .account-menu { background: #ffffff; }
:root[data-theme="light"] .workspace { background: linear-gradient(180deg, rgb(235 240 248 / 62%), transparent 310px); }
:root[data-theme="light"] .panel,
:root[data-theme="light"] .metric-card { background: linear-gradient(150deg, #ffffff, #fbfcfe); box-shadow: var(--shadow); }
:root[data-theme="light"] .ai-banner { border-color: #d7def1; background: linear-gradient(110deg, #f5f7ff, #fafbff); }
:root[data-theme="light"] .ai-icon { color: #425ba8; background: #e6ebff; }
:root[data-theme="light"] table th,
:root[data-theme="light"] .listing-toolbar { background: #f4f7fb; }
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .admin-list { background: #ffffff; }
:root[data-theme="light"] .admin-row:hover,
:root[data-theme="light"] .directory-row:hover { background: #f5f7fb; }
:root[data-theme="light"] .live-card { background: linear-gradient(150deg, #ffffff, #f7f9fc); box-shadow: 0 8px 24px rgb(29 43 68 / 8%); }
:root[data-theme="light"] .action-menu-panel { background: #ffffff; }

/* Tenant Product final target — direct runtime port of the frozen prototype. */
.app-shell { grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 226px; height: 100vh; padding: 17px 12px 13px; }
.sidebar .brand { padding: 1px 7px 14px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.tenant-context { margin: 0 2px 13px; padding: 10px 11px; border-radius: 9px; }
.sidebar nav { margin-top: 0; }
.nav-group-label { margin: 8px 8px 5px; }
.nav-item { min-height: 32px; padding: 0 9px; border: 0; border-radius: 7px; font-size: 11.5px; }
.nav-parent { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.nav-parent-chevron { margin-left: auto; color: var(--muted-2); }
.nav-parent[aria-expanded="true"] .nav-parent-chevron { transform: rotate(180deg); }
.nav-children { position: relative; display: grid; margin: 2px 0 3px 17px; padding-left: 13px; }
.nav-children.hidden { display: none; }
.nav-children::before { content: ""; position: absolute; inset: 2px auto 2px 0; width: 1px; background: #263b55; }
.nav-children a { position: relative; min-height: 29px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px; color: #8ea2b7; font-size: 11px; text-decoration: none; }
.nav-children a.active { color: #f1f5ff; background: #12243e; font-weight: 650; }
.nav-children a.active::before { content: ""; position: absolute; left: -14px; width: 2px; height: 18px; border-radius: 2px; background: var(--brand); }
.workspace { grid-column: 2; min-width: 0; }
.final-topline { width: auto; max-width: 1510px; min-height: 71px; display: grid; grid-template-columns: minmax(300px, 1fr) 150px 180px 210px auto; align-items: end; gap: 8px; margin: 0 auto; padding: 19px 24px 0; }
.final-page-title .context-label { color: #71869e; font-size: 9px; letter-spacing: .1em; }
.final-page-title h1 { margin: 3px 0 0; font-size: 23px; line-height: 1.1; letter-spacing: -.025em; }
.final-page-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.final-topline label { display: grid; gap: 4px; color: #71869e; font-size: 9.5px; font-weight: 700; }
.final-topline input, .final-topline select { min-height: 35px; padding: 0 10px; border-radius: 7px; }
.final-topline > button { min-height: 35px; }
.dashboard { max-width: 1510px; padding: 13px 24px 28px; }
#visao-geral > .topbar, #relatorios > .topbar, #administracao > .topbar { display: none; }
#visao-geral .context-row, #visao-geral .ai-banner, #visao-geral .quality-panel,
#visao-geral .activity-panel { display: none !important; }
/* team-focus-avg-banner reuses .ai-banner's visual pattern but is not the retired
   "Destaques do período" insight the blanket rule above targets — keep it visible. */
#visao-geral .team-focus-avg-banner { display: grid !important; }
#dashboard-content { display: grid; grid-template-columns: minmax(0, 1.86fr) minmax(330px, 1fr); gap: 10px; }
#dashboard-content.hidden { display: none; }
#dashboard-content > .visibility-alert { grid-column: 1 / -1; }
#dashboard-content > .executive-metrics { grid-column: 1 / -1; order: 1; }
#dashboard-content > .main-grid { display: contents; }
#dashboard-content .trend-panel { position: relative; display: flex; flex-direction: column; grid-column: 1; order: 2; height: 286px; margin: 0; overflow: hidden; }
#dashboard-content .journey-panel { grid-column: 2; order: 3; height: 286px; }
#dashboard-content .ranking-panel-wide { grid-column: 1; order: 4; min-height: 216px; margin: 0; }
#dashboard-content .team-panel { grid-column: 2; order: 5; min-height: 216px; }
#dashboard-content > .breakdown-grid { grid-column: 1 / -1; order: 6; margin: 0; gap: 10px; }
.executive-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin: 0; }
.executive-metrics .metric-card { min-height: 111px; padding: 13px 14px 11px; }
.metric-card { position: relative; overflow: hidden; border-radius: 10px; }
.metric-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--brand); opacity: .72; }
.metric-card .metric-value { margin: 7px 0 1px; font-size: 29px; line-height: 1; }
.metric-card .metric-foot { margin-top: 2px; font-size: 10px; }
.panel-header { min-height: 49px; padding: 11px 14px 7px; }
.panel-header h2 { font-size: 15.5px; }
.panel-header p { margin: 2px 0 0; font-size: 10px; }
.trend-panel .panel-sub { display: none; }
.trend-panel .trend-chart { flex: 1; min-height: 0; height: auto; padding: 0 12px 7px; }
.trend-chart svg { height: 100%; }
.trend-line { stroke-width: 4; }
.trend-labels { position: absolute; inset: auto 14px 7px; }
.trend-labels span:only-child { margin-inline: auto; }
.journey-panel .donutwrap { height: 226px; display: grid; grid-template-columns: 154px 1fr; align-items: center; gap: 8px; padding: 1px 16px 15px; }
.journey-panel .donut { width: 142px; height: 142px; }
.journey-panel .journey-donut { width: 142px; height: 142px; }
.journey-panel .legend-grid { grid-template-columns: 1fr; gap: 8px; }
.journey-panel .legend-grid > div { min-height: auto; padding: 0; border: 0; background: transparent; }
.journey-panel .state-summary { display: none; }
.team-count { display: none; }
.team-panel .agent-list { display: grid; padding: 0 13px 10px; }
.team-panel .attention-item { height: 48px; min-height: 48px; display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; overflow: hidden; padding: 6px 4px; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
.team-panel .attention-item .agent-avatar, .team-panel .attention-item .deployment-chip { display: none; }
.team-panel .attention-item .agent-main { display: contents; }
.team-panel .attention-item .agent-name { grid-column: 1; grid-row: 1; }
.team-panel .attention-item .agent-name strong { font-size: 10.5px; }
.team-panel .attention-item .agent-name span { font-size: 8.5px; }
.team-panel .attention-item .agent-status { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #8ea6ff; background: transparent; font-size: 9px; }
.team-panel .attention-item .agent-meta { grid-column: 1; grid-row: 2; font-size: 8.5px; }
.team-panel .attention-item .agent-meta { margin: 0; padding: 0; }
.ranking-panel-wide .panel-sub { margin: -6px 14px 5px; }
.ranking-panel-wide .table-wrap { margin: 0 14px 12px; border: 0; }
.ranking-table th { height: 28px; padding: 0 10px; background: transparent; }
.ranking-table td { height: 49px; padding: 7px 10px; }
.sector-metric strong { display: block; color: var(--text); font-size: 9.5px; text-align: right; }
.sector-metric > span { display: block; height: 8px; margin-top: 4px; overflow: hidden; border-radius: 4px; background: var(--track); }
.sector-metric > span i { display: block; height: 100%; border-radius: inherit; background: #6682ff; }
.sector-metric-2 > span i { background: #43c7a1; }
.sector-metric-3 > span i { background: #a78bfa; }
.sector-metric-4 > span i { background: #57a4ef; }
.breakdown-grid .ranking-panel:first-child { order: 2; }
.breakdown-grid .ranking-panel:last-child { order: 1; }
.ranking-panel { min-height: 174px; }
.ranking-list { padding: 1px 14px 12px; }
.rank-item { min-height: 30px; grid-template-columns: 190px minmax(90px, 1fr) 76px; }
.rank-item progress { height: 7px; }

/* Employee profile summary: independent cards with safe, local shrinking. */
#perfil-colaborador, #profile-content, #perfil-colaborador .profile-summary-grid,
#perfil-colaborador .profile-summary-grid > *, #perfil-colaborador .ranking-panel,
#perfil-colaborador .journey-panel, #perfil-colaborador .profile-live-panel,
#perfil-colaborador .profile-live-panel > *, #perfil-colaborador .profile-focus-grid,
#perfil-colaborador .profile-focus-grid > *, #perfil-colaborador .profile-focus-why-card { min-width: 0; }
#perfil-colaborador .profile-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 18px; }
#perfil-colaborador .profile-toolbar .back-link { margin: 0 auto 0 0; }
#perfil-colaborador .profile-date-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#perfil-colaborador .profile-date-controls label { font-size: 12px; color: var(--muted); }
#perfil-colaborador .profile-date-controls input { width: 155px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--field); font: inherit; font-size: 12px; }
#perfil-colaborador .profile-update-status { width: max-content; margin: 0; }
#perfil-colaborador .profile-head { padding: 24px; margin-bottom: 20px; }
#perfil-colaborador .profile-meta { gap: 12px; margin-top: 18px; }
#perfil-colaborador .profile-meta small { font-size: 11px; text-transform: none; letter-spacing: 0; }
#perfil-colaborador .profile-meta strong { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
#perfil-colaborador .profile-tabs { margin-bottom: 18px; }
#perfil-colaborador .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; gap: 16px; }
#perfil-colaborador .profile-coverage-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }
#perfil-colaborador .profile-toolbar { flex-wrap: wrap; gap: 12px; }
#perfil-colaborador .profile-toolbar .journey-period-seg { margin-left: auto; }
@media (max-width: 800px) {
  #perfil-colaborador .metric-grid { grid-template-columns: minmax(0, 1fr); }
}
#perfil-colaborador .metric-card:nth-child(2) { border-top-color: var(--produtivo); }
#perfil-colaborador .metric-card:nth-child(3) { border-top-color: var(--neutro); }
#perfil-colaborador .metric-card:nth-child(4) { border-top-color: var(--warn); }
#perfil-colaborador .profile-focus-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-bottom: 16px;
}
#perfil-colaborador .profile-focus-grid > * { min-width: 0; }
#perfil-colaborador .profile-focus-why-card { margin: 0; align-items: flex-start; }
#perfil-colaborador .profile-focus-why-card .ai-body p { color: var(--muted); }
#perfil-colaborador .profile-journey-evolution-panel > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--text); }
#perfil-colaborador .profile-journey-evolution-panel[open] > summary { margin-bottom: 16px; }
#perfil-colaborador .donut-center .num { font-size: 19px; line-height: 1.25; }
#perfil-colaborador .focus-card { background: linear-gradient(135deg, rgba(37, 99, 235, .12), transparent 75%), var(--surface); }
#perfil-colaborador .profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
#perfil-colaborador .profile-summary-grid .panel { margin: 0; }
#perfil-colaborador .profile-journey-card { height: auto; }
#perfil-colaborador .profile-journey-card .donutwrap {
  height: auto;
  min-height: 156px;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 8px;
  padding: 2px 14px 10px;
}
#perfil-colaborador .profile-journey-card .donut,
#perfil-colaborador .profile-journey-card .journey-donut { width: 108px; height: 108px; }
#perfil-colaborador .profile-journey-card .legend-grid { min-width: 0; gap: 7px; }
#perfil-colaborador .profile-journey-card .legend-grid > div { grid-template-columns: auto minmax(0, 1fr) auto; }
#perfil-colaborador .profile-journey-card .legend-grid span:not(.legend-dot) {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#perfil-colaborador .profile-journey-card .state-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 14px 12px;
  padding-top: 10px;
}
#perfil-colaborador .profile-ranking-card .rank-item {
  min-width: 0;
  grid-template-columns: minmax(0, 1.25fr) minmax(44px, .8fr) max-content;
  gap: 8px;
}
#perfil-colaborador .profile-ranking-card .rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#perfil-colaborador .profile-ranking-card .rank-item progress { min-width: 0; }
#perfil-colaborador .profile-ranking-card .rank-time { white-space: nowrap; }
.admin-refresh-actions { display: flex; align-items: center; gap: 10px; }

/* Report Center */
#relatorios { padding-top: 8px; }
.global-filter-bar.report-mode { grid-template-columns: minmax(210px, 1fr) 190px 220px auto; }
.report-mode #global-date-field { display: none; }
#relatorios > .topbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
#relatorios > .topbar > div { display: none; }
@media (max-width: 1100px) { .global-filter-bar.report-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .global-filter-bar.report-mode { grid-template-columns: 1fr; } }
.report-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 10px; }
.report-metrics .metric-card { min-height: 111px; padding: 13px 14px 11px; }
.final-report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.final-report-layout .report-trend-panel { height: auto; min-height: 274px; }
.report-series { height: 240px; align-items: end; justify-content: space-around; gap: 16px; padding: 8px 16px 20px; overflow-x: auto; background: repeating-linear-gradient(to bottom, transparent 0 55px, var(--line-soft) 56px 57px); }
.report-series-column { flex: 1 0 48px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.report-series-column > * { flex-shrink: 0; }
.report-series-value { display: block; font-size: 11px; }
.report-series-bar { width: clamp(38px, 58%, 66px); max-width: 66px; min-height: 0; border-radius: 6px 6px 2px 2px; }
.report-series-label { font-size: 9px; }
.report-breakdown-grid { grid-template-columns: 1.15fr .85fr; gap: 10px; }
.report-composition-track { height: 12px; }
.report-employee-panel { margin-top: 10px; }

/* Classification and external activities */
#administracao { padding-top: 8px; }
.configuration-surface { overflow: visible; }
.rules-admin-panel { padding: 0; }
[data-admin-panel="classificacao"] > .rules-admin-panel:first-child,
[data-admin-panel="externas"] { overflow: visible; border: 0; background: transparent; box-shadow: none; }
[data-admin-panel="classificacao"] > .rules-admin-panel:first-child > .panel-header,
[data-admin-panel="externas"] > .panel-header { padding: 0 0 13px; }
.classification-bulk-toolbar { min-height: 58px; align-items: end; justify-content: flex-start; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid #385081; border-radius: 9px; background: #132440; box-shadow: inset 3px 0 #6983ff; }
.classification-bulk-toolbar .pending-count { margin-right: 8px; }
.classification-bulk-toolbar select { min-width: 150px; }
#unclassified-list { overflow: visible; }
.admin-structured-row-classification { grid-template-columns: minmax(180px, 1.55fr) 82px 112px 82px minmax(150px, 1.2fr) 118px 112px; min-width: 920px; }
.admin-structured-row-classification-batch { grid-template-columns: 38px minmax(170px, 1.45fr) 78px 105px 75px minmax(140px, 1.15fr) 112px 112px; min-width: 940px; }
.classification-row-actions { position: relative; }
.classification-trigger { min-width: 90px; }
.classification-popover { position: absolute; top: calc(100% - 2px); right: 0; z-index: 90; width: 260px; overflow: hidden; border: 1px solid #334e6e; border-radius: 10px; background: #122238; box-shadow: 0 18px 44px rgb(0 0 0 / 46%); }
[data-admin-panel="classificacao"] .panel-header:has(.classification-bulk-toolbar:not(.hidden)) { display: grid; grid-template-columns: 1fr; }
[data-admin-panel="classificacao"] .panel-header-actions:has(.classification-bulk-toolbar:not(.hidden)) { display: contents; }
[data-admin-panel="classificacao"] .classification-bulk-toolbar:not(.hidden) { width: 100%; margin: 10px 0 0; }
.classification-popover-head { padding: 10px 11px 7px; border-bottom: 1px solid var(--line); }
.classification-popover-head strong, .classification-popover-head span { display: block; }
.classification-popover-head strong { font-size: 11px; }
.classification-popover-head span { color: var(--muted-2); font-size: 8.5px; }
.classification-option { width: 100%; min-height: 47px; display: grid; grid-template-columns: 23px 1fr; align-items: center; gap: 6px; border: 0; border-bottom: 1px solid #20344a; padding: 7px 10px; color: var(--text); background: transparent; text-align: left; }
.classification-option:hover { background: #192c45; }
.classification-option > span:first-child { font-size: 17px; text-align: center; }
.classification-option strong, .classification-option small { display: block; }
.classification-option strong { font-size: 10.5px; }
.classification-option small { color: var(--muted-2); font-size: 8.5px; }
.rules-secondary { min-height: 55px; padding: 11px 14px; }
[data-admin-panel="externas"] .section-tabs { width: 100%; gap: 2px; margin: 0 0 10px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
[data-admin-panel="externas"] .section-tabs button { min-width: 92px; border-radius: 0; background: transparent; }
[data-admin-panel="externas"] .section-tabs button.active { color: var(--text); box-shadow: inset 0 -2px var(--brand); }
[data-admin-panel="externas"] [data-external-panel] { border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
[data-admin-panel="externas"] .section-panel-heading { min-height: 55px; margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
[data-admin-panel="externas"] .external-flow-note { margin: 10px; }
[data-admin-panel="externas"] .admin-list { margin: 0; border: 0; border-radius: 0 0 10px 10px; }
.admin-structured-row-external-pending { grid-template-columns: 1.1fr 1fr 1.35fr .65fr 1.5fr .72fr 82px; min-width: 970px; }
.admin-structured-row-external-history { grid-template-columns: 1.15fr 1fr 1.35fr .65fr .8fr 1fr 76px; min-width: 930px; }
.admin-structured-row-external-types { grid-template-columns: 1.55fr 1fr .8fr 1fr .72fr 80px; min-width: 820px; }
.external-review-drawer { width: 465px; max-width: 100vw; height: 100vh; max-height: 100vh; inset: 0 0 0 auto; margin: 0; padding: 21px 22px 0; border: 0; border-left: 1px solid #304b68; border-radius: 0; background: #0f1e30; }
.external-review-drawer::backdrop { background: rgb(2 8 15 / 64%); backdrop-filter: blur(2px); }
.external-review-drawer .token-dialog-header { margin: 0 -22px; padding: 0 22px 17px; }
.external-review-drawer > h2 { margin: 14px 0 2px; }
.external-review-drawer > p { color: var(--muted); font-size: 10px; }
.external-review-details { margin: 16px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #0b1928; }
.external-review-details h3 { margin: 0 0 11px; font-size: 12px; }
.external-review-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; margin: 0; }
.external-review-details dt { color: var(--muted-2); font-size: 8.5px; text-transform: uppercase; }
.external-review-details dd { margin: 3px 0 0; color: var(--text); font-size: 10.5px; }
.external-review-details p { margin: 0; color: var(--muted); line-height: 1.55; }
.external-review-drawer .action-dialog-form { position: absolute; inset: auto 0 0; padding: 14px 22px; border-top: 1px solid var(--line); background: #0c1928; }

/* Settings are full-width modules; the main sidebar is the only navigation. */
.configuration-surface .admin-panel { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
.configuration-surface .module-panel-header { min-height: 66px; padding: 0 0 13px; }
.configuration-surface .module-panel-header h2 { font-size: 23px; }
.configuration-surface .listing-toolbar { min-height: 55px; display: flex; align-items: end; gap: 8px; margin: 0; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 10px 10px 0 0; }
.configuration-surface .listing-toolbar label:first-child { min-width: 260px; }
.configuration-surface .listing-toolbar label { display: grid; gap: 4px; color: var(--muted-2); font-size: 9px; }
.configuration-surface .listing-toolbar input, .configuration-surface .listing-toolbar select { min-height: 35px; }
.configuration-surface .listing-summary { margin-left: auto; }
.configuration-surface .admin-list { max-height: none; border-radius: 0 0 10px 10px; }
[data-admin-panel="computadores"] .admin-help,
[data-admin-panel="computadores"] .artifact-summary,
[data-admin-panel="gestores"] .admin-help { display: none; }
.admin-structured-row-departments { grid-template-columns: minmax(220px, 1.8fr) 1fr 1fr .72fr 70px; }
.admin-structured-row-schedules { grid-template-columns: minmax(160px, 1.2fr) .7fr minmax(220px, 1.7fr) .65fr .7fr .7fr 70px; }
.admin-structured-row-devices { grid-template-columns: 1.15fr 1.15fr 1fr 1fr .9fr 70px; }
.admin-structured-row-managers { grid-template-columns: .9fr 1.25fr .9fr 1fr .7fr 70px; }

@media (max-width: 1400px) {
  .app-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .sidebar { width: 204px; padding-inline: 10px; }
  .sidebar nav > .nav-group-label:not(:first-child) { margin-top: 3px; margin-bottom: 2px; }
  .workspace { grid-column: 2; }
  .final-topline { min-height: 64px; grid-template-columns: minmax(280px, 1fr) 120px 150px 170px auto; padding: 14px 17px 0; }
  .final-page-title h1 { font-size: 21px; }
  .dashboard { padding: 9px 17px 22px; }
  #dashboard-content { gap: 8px; }
  .executive-metrics { gap: 7px; }
  .executive-metrics .metric-card { min-height: 102px; padding: 11px 12px 9px; }
  .metric-card .metric-value { font-size: 26px; }
  #dashboard-content .trend-panel, #dashboard-content .journey-panel { height: 267px; }
  .journey-panel .donutwrap { height: 207px; grid-template-columns: 130px 1fr; padding-inline: 12px; }
  .journey-panel .donut, .journey-panel .journey-donut { width: 124px; height: 124px; }
  .report-series { gap: 10px; }
  .nav-item { font-size: 10.5px; }
}

/* Repaginação 2026-09: superfícies grafite e navegação descritiva compartilhadas. */
:root {
  --bg: #0b0d12; --sidebar-bg: #10131b;
  --surface: #171b23; --surface-2: #1d222d; --surface-3: #252b37;
  --field: #10141c; --card: #171b23; --line: #303744; --line-soft: #242b36;
  --text: #f2f4f8; --muted: #b7bfcd; --muted-2: #9aa5b6;
  --brand: #8bb4ff; --brand-hover: #adcaff; --brand-wash: #1c2b44;
  --action-bg: #2563eb; --action-hover: #1d4ed8;
  --nav-blue: #8bb4ff; --nav-cyan: #5dd7e5; --nav-violet: #bd9bff;
  --nav-amber: #f3bd63; --nav-slate: #b7bfcd;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 18px;
}
:root[data-theme="light"] {
  --bg: #f4f6fa; --sidebar-bg: #fff;
  --surface: #fff; --surface-2: #f2f5f9; --surface-3: #e8edf4;
  --field: #f8fafc; --card: #fff; --line: #ccd5e2; --line-soft: #dfe5ee;
  --text: #172033; --muted: #526176; --muted-2: #5e6c82;
  --brand: #2458b8; --brand-hover: #1d4592; --brand-wash: #e8effb;
  --nav-blue: #2458b8; --nav-cyan: #087786; --nav-violet: #7544bb;
  --nav-amber: #936013; --nav-slate: #526176;
}
body { background: var(--bg); }
.app-shell { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { width: 272px; padding: 20px 14px 12px; background: var(--sidebar-bg); }
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; }
.sidebar .brand, .tenant-context, .account-area, .sidebar-signature { flex-shrink: 0; }
.sidebar-spacer { flex: 0 0 8px; }
.nav-group-label { margin: 14px 10px 6px; color: var(--muted-2); }
.sidebar .nav-item {
  min-height: 54px; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--muted); background: transparent; font-size: 12px;
}
.nav-copy { display: block; flex: 1; min-width: 0; }
.nav-title { display: block; font-weight: 650; line-height: 1.4; }
.nav-description {
  display: block; margin-top: 2px; color: var(--muted-2);
  font-size: 10.5px; font-weight: 400; line-height: 1.4; white-space: normal;
}
[data-nav-color="blue"] { --nav-accent: var(--nav-blue); }
[data-nav-color="cyan"] { --nav-accent: var(--nav-cyan); }
[data-nav-color="violet"] { --nav-accent: var(--nav-violet); }
[data-nav-color="amber"] { --nav-accent: var(--nav-amber); }
[data-nav-color="slate"] { --nav-accent: var(--nav-slate); }
.sidebar .nav-item .nav-icon, .admin-platform-body .admin-nav-icon {
  flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; color: var(--nav-accent, var(--brand));
  background: color-mix(in srgb, var(--nav-accent, var(--brand)) 10%, transparent);
}
.sidebar .nav-item:hover { color: var(--text); background: var(--surface-2); }
.sidebar .nav-item.active { color: var(--text); background: var(--brand-wash); box-shadow: inset 2px 0 0 var(--brand); }
.sidebar .nav-children::before { background: var(--line); }
.sidebar .nav-children a { color: var(--muted); }
.sidebar .nav-children a:hover, .sidebar .nav-children a.active { color: var(--text); background: var(--surface-3); }
.tenant-context, .account-trigger { background: var(--surface); border-color: var(--line-soft); }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line); }
.account-menu { background: var(--surface-2); }
.brand-mark { background: var(--action-bg); color: #fff; }
.workspace {
  background-color: var(--bg);
  background-image: linear-gradient(color-mix(in srgb, var(--line) 24%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 24%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
}
.panel, .metric-card, .live-card { background: var(--surface); border-color: var(--line); border-radius: 14px; }
.table-wrap { background: var(--field); }
table th { background: var(--field); color: var(--muted-2); }
.directory-row:hover { background: var(--surface-2); }
.ai-banner { background: var(--surface); border-color: var(--line); }
.ai-icon { color: var(--brand); background: var(--brand-wash); }
.primary-button {
  background: var(--action-bg); border-color: var(--action-bg); color: #fff;
  border-radius: 10px; font-weight: 650; box-shadow: none;
}
.primary-button:hover { background: var(--action-hover); border-color: var(--action-hover); }
.secondary-button, .danger-button, .deployment-button, .refresh-button { border-radius: 10px; }
.secondary-button:hover { border-color: var(--muted-2); }
.profile-tabs button.active, .section-tabs button.active { color: var(--brand); }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (min-width: 861px) and (max-width: 1400px) {
  .app-shell { grid-template-columns: 256px minmax(0, 1fr); }
  .sidebar { width: 256px; padding-inline: 10px; }
  .sidebar .nav-item { font-size: 11.5px; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; width: auto; height: auto; }
  .workspace { grid-column: 1; }
}

/* Approved journey card: calendar-day bars, one absolute scale for the team. */
#dashboard-content .journey-evolution {
  grid-column: 1 / -1; height: auto; min-height: 0; overflow: visible;
  padding: 28px; border-radius: 22px; border: 1px solid #364150;
  background: linear-gradient(125deg, #0e1721 0%, #111923 65%, #101923 100%);
  color: #f3f5fb;
}
.journey-evolution-header { display: flex; align-items: flex-start; gap: 22px; margin-bottom: 24px; }
.journey-evolution-icon { display: grid; place-items: center; flex: 0 0 60px; height: 60px; border-radius: 14px; background: linear-gradient(145deg, #0867ff, #2355ed); box-shadow: inset 0 1px 0 #509aff, 0 8px 25px #003ca522; }
.journey-evolution-icon svg { width: 36px; height: 36px; fill: #b5d4ff; }
.journey-evolution-heading { min-width: 0; }
.journey-evolution-heading h2 { margin: 0; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.2; font-weight: 700; }
.journey-evolution-heading > p { margin: 7px 0 0; font-size: 15px; color: #a6b4ca; }
.journey-schedule-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.journey-schedule-chips:empty { display: none; }
.journey-schedule-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 10px; border: 1px solid #3c4a5d; border-radius: 8px; color: #b8c6da; font-size: 12px; overflow-wrap: anywhere; }
.journey-schedule-chip i, .journey-today-status i { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #2080ff; }
.journey-schedule-chip:nth-child(even) i { background: #10bcdf; }
.journey-period-button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; margin-left: auto; flex-shrink: 0; min-height: 45px; padding: 9px 14px; border: 1px solid #3b485b; border-radius: 12px; background: #17212f; color: #f3f5fb; font-size: 14px; }
.journey-period-button svg { width: 23px; height: 23px; fill: none; stroke: #287cff; stroke-width: 2; }
.journey-period-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 20px; padding: 16px; border: 1px solid #38485d; border-radius: 12px; background: #17212f; }
.journey-period-form.hidden { display: none; }
.journey-period-form label { display: grid; gap: 6px; font-size: 13px; color: #b9c7db; }
.journey-period-form p { flex-basis: 100%; margin: 0; color: #a6b4ca; font-size: 12px; }
.team-focus-avg-banner { margin: 0 0 14px; }
.team-focus-avg-banner .ai-who { align-items: baseline; }
.team-focus-avg-banner .ai-who strong.team-focus-avg-number { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.team-focus-avg-banner .ai-who span { padding: 0; border-radius: 0; color: #a6b4ca; background: none; font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.team-focus-panel .team-focus-counts { align-items: center; gap: 8px 20px; padding: 0 10px 18px; border-bottom: 1px solid #27323f; margin: 0 0 4px; }
.team-focus-counts .pill.total i { background: #a6b4ca; }
.journey-evolution-summary { display: flex; align-items: center; gap: 28px; padding: 0 10px 20px; }
.journey-recorded-total, .journey-planned-total { display: grid; gap: 5px; }
.journey-recorded-total strong { font-size: clamp(34px, 3.3vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.journey-recorded-total span, .journey-planned-total span { color: #a6b4ca; font-size: 14px; }
.journey-planned-total { align-content: end; min-height: 62px; border-left: 1px solid #344152; padding-left: 28px; }
.journey-planned-total strong { font-weight: 550; font-size: 27px; letter-spacing: -.025em; }
.journey-today-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid #174a89; border-radius: 22px; background: #0b192b; color: #46a0ff; font-size: 13px; }
.journey-table-wrap { width: 100%; min-width: 0; }
.journey-evolution-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.journey-evolution-table th, .journey-evolution-table td { border: 0; border-bottom: 1px solid #27323f; padding: 13px 14px; background: transparent; vertical-align: middle; }
.journey-evolution-table thead th { border-top: 1px solid #354050; color: #a6b4ca; font-size: 14px; font-weight: 450; text-transform: none; letter-spacing: 0; }
.journey-evolution-table th:first-child { width: 230px; text-align: left; }
.journey-evolution-table th:nth-child(2) { text-align: left; }
.journey-evolution-table th:nth-child(3), .journey-evolution-table th:nth-child(4) { width: 110px; text-align: right; }
.journey-evolution-table tbody th { font-weight: 450; white-space: nowrap; text-transform: none; letter-spacing: 0; color: #f3f5fb; }
.journey-day-date { font-size: 17px; font-variant-numeric: tabular-nums; }
.journey-weekday { margin-left: 13px; font-size: 14px; color: #a6b4ca; }
.journey-day-chip { display: inline-block; margin-left: 10px; padding: 3px 8px; border: 1px solid #245870; border-radius: 18px; background: #0d2430; color: #6bdcfa; font-size: 11px; }
.journey-bar { position: relative; height: 14px; margin: 3px 5px 3px 0; }
.journey-bar-planned, .journey-bar-recorded { display: block; position: absolute; left: 0; top: 0; height: 100%; border-radius: 8px 4px 4px 8px; }
.journey-bar-planned { border: 1px solid #39485d; background: linear-gradient(90deg, #1e2c3f, #1a2533); }
.journey-bar-planned::after { content: ""; position: absolute; right: -1px; top: -3px; height: 18px; width: 2px; background: #c0cede; border-radius: 2px; }
.journey-bar-recorded { background: linear-gradient(90deg, #0f6cff, #2766ee); box-shadow: inset 0 1px 0 #4887ff; }
.journey-row-state { display: block; color: #9eafc5; font-size: 12px; line-height: 1.35; margin-top: 5px; }
.journey-actual, .journey-expected { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journey-evolution-table .journey-actual { font-size: 18px; color: #f3f5fb; }
.journey-evolution-table .journey-expected { font-size: 16px; color: #a6b4ca; }
.journey-expected small { display: block; font-size: 11px; }
.journey-evolution-table .journey-today-row > * { background: #162235; border-top: 1px solid #34465c; border-bottom: 1px solid #34465c; }
.journey-evolution-table .journey-today-row > :first-child { border-left: 2px solid #2487ff; border-radius: 9px 0 0 9px; }
.journey-evolution-table .journey-today-row > :last-child { border-right: 1px solid #34465c; border-radius: 0 9px 9px 0; }
.journey-night-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 17px; padding: 16px 19px; border: 1px solid #3b495a; border-radius: 12px; }
.journey-moon { font-size: 48px; line-height: 1; color: #a4b7d3; }
.journey-night-heading strong { font-size: 15px; font-weight: 550; }
.journey-night-heading p, .journey-night-detail > p { margin: 6px 0 0; font-size: 12px; color: #a6b4ca; }
.journey-night-portions { display: flex; flex-wrap: wrap; margin-left: auto; border: 1px solid #4b5e79; border-radius: 9px; overflow: hidden; background: #192637; }
.journey-night-portions span { padding: 13px 16px; font-size: 13px; }
.journey-night-portions span + span { border-left: 1px solid #4b5e79; }
.journey-evolution-footer { margin-top: 13px; }
.journey-evolution-footer p { margin: 5px 0 0; color: #a6b4ca; font-size: 12px; line-height: 1.5; }
.journey-evolution-footer p + p { color: #8799b1; font-size: 11px; }

/* ---- Foco digital — equipe: reaproveita a casca de .journey-evolution, componentes novos abaixo ---- */
.journey-period-seg { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; flex-shrink: 0; padding: 3px; border: 1px solid #3b485b; border-radius: 12px; background: #17212f; }
.journey-period-seg button { min-height: 37px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #a6b4ca; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.journey-period-seg button.active { color: #f3f5fb; background: linear-gradient(145deg, #0867ff, #2355ed); }
.journey-period-seg.compact { align-self: center; margin-left: 0; padding: 2px; border-radius: 9px; }
.journey-period-seg.compact button { min-height: 28px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; }

/* ---- Evolução da jornada dentro do perfil: painel comum (.panel), não a hero da Visão Geral ---- */
.profile-journey-evolution-panel { padding: 18px; }
.profile-journey-evolution-panel .panel-header { margin-bottom: 10px; }
.profile-journey-evolution-panel .journey-evolution-summary { padding: 0 0 14px; gap: 22px; }
.profile-journey-evolution-panel .journey-recorded-total strong { font-size: clamp(24px, 2.2vw, 30px); }
.profile-journey-evolution-panel .journey-planned-total { padding-left: 20px; }
.profile-journey-evolution-panel .journey-planned-total strong { font-size: 20px; }
.profile-journey-evolution-panel .journey-evolution-table th:first-child { width: 150px; }
.profile-journey-evolution-panel .journey-evolution-footer { margin-top: 8px; }
.team-focus-counts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-left: auto; align-self: center; }
.team-focus-counts .pill { display: inline-flex; align-items: center; gap: 6px; color: #a6b4ca; font-size: 13px; font-weight: 600; }
.team-focus-counts .pill i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.team-focus-counts .pill.bad i { background: var(--bad); } .team-focus-counts .pill.warn i { background: var(--warn); }
.team-focus-counts .pill.good i { background: var(--good); } .team-focus-counts .pill.info i { background: var(--info); }
.team-focus-counts .pill b { color: #f3f5fb; font-weight: 700; }

.team-focus-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 4px 0 22px; border: 1px solid #38485d; border-radius: 12px; background: #27323f; overflow: hidden; }
.team-focus-legend-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #131c28; }
.team-focus-legend-range { font-size: 13px; font-weight: 700; }
.team-focus-legend-item.bad .team-focus-legend-range { color: var(--bad); }
.team-focus-legend-item.warn .team-focus-legend-range { color: var(--warn); }
.team-focus-legend-item.good .team-focus-legend-range { color: var(--good); }
.team-focus-legend-item.info .team-focus-legend-range { color: var(--info); }
.team-focus-legend-item p { margin: 0; color: #a6b4ca; font-size: 12px; line-height: 1.5; }

.team-focus-group-label { margin: 4px 0 6px; color: #a6b4ca; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.team-focus-list { display: flex; flex-direction: column; }
.team-focus-list:empty { display: none; }
.team-focus-row {
  display: grid; grid-template-columns: 38px minmax(0,1.3fr) minmax(0,1.6fr) auto;
  align-items: center; gap: 14px; padding: 11px 8px; border-radius: 10px;
  border-top: 1px solid #27323f; cursor: pointer; transition: background-color .12s;
}
.team-focus-row:first-child { border-top: none; }
.team-focus-row:hover, .team-focus-row:focus-visible { background: #17212f; }
.team-focus-row.quiet { opacity: .72; }
.team-focus-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; }
.team-focus-who { min-width: 0; }
.team-focus-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: #f3f5fb; }
.team-focus-who span { display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a6b4ca; font-size: 12px; }
.team-focus-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-focus-bar { flex: 1; height: 8px; border-radius: 4px; background: #27323f; overflow: hidden; }
.team-focus-bar i { display: block; height: 100%; border-radius: 4px; }
.team-focus-bar.bad i { background: var(--bad); } .team-focus-bar.warn i { background: var(--warn); }
.team-focus-bar.good i { background: var(--good); } .team-focus-bar.info i { background: var(--info); }
.team-focus-track-text { flex: none; color: #a6b4ca; font-size: 12px; white-space: nowrap; }
.team-focus-track-text b { color: #d5dce9; font-weight: 650; }
.team-focus-badge { justify-self: end; display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.team-focus-badge.bad { color: var(--bad); background: var(--bad-wash); }
.team-focus-badge.warn { color: var(--warn); background: var(--warn-wash); }
.team-focus-badge.good { color: var(--good); background: var(--good-wash); }
.team-focus-badge.info { color: var(--info); background: var(--info-wash); }

#dashboard-content .journey-panel { grid-column: 2; order: 4; align-self: start; }
#dashboard-content .ranking-panel-wide { grid-column: 1; order: 3; }
#dashboard-content .team-panel { grid-column: 1 / -1; order: 5; }
[data-theme="light"] #dashboard-content .journey-evolution { background: linear-gradient(125deg, #fff, #f4f8ff); color: #17253a; border-color: #cfdae8; }
[data-theme="light"] .journey-evolution :is(.journey-evolution-heading > p,.journey-recorded-total span,.journey-planned-total span,.journey-evolution-table thead th,.journey-weekday,.journey-row-state,.journey-expected,.journey-night-heading p,.journey-night-detail > p,.journey-evolution-footer p,.journey-schedule-chip) { color: #50617a; }
[data-theme="light"] .journey-evolution .journey-actual, [data-theme="light"] .journey-evolution-table tbody th { color: #17253a; }
[data-theme="light"] .journey-evolution :is(.journey-period-button,.journey-period-form,.journey-night-portions) { background: #eef4fc; color: #17253a; border-color: #c4d1e2; }
[data-theme="light"] .journey-evolution .journey-bar-planned { background: #dce5f1; border-color: #b1c2d8; }
[data-theme="light"] .journey-evolution .journey-bar-planned::after { background: #516b8c; }
[data-theme="light"] .journey-evolution-table .journey-today-row > * { background: #eaf3ff; }
[data-theme="light"] .journey-evolution :is(th,td,.journey-night-detail,.journey-planned-total,.journey-schedule-chip) { border-color: #cbd7e7; }
[data-theme="light"] .journey-evolution .journey-today-row > * { border-color: #acc8ec; }
[data-theme="light"] .journey-evolution .journey-today-row > :first-child { border-left-color: #2487ff; }
[data-theme="light"] .journey-evolution :is(.journey-today-status,.journey-day-chip) { background: #eaf3ff; border-color: #b9d3ef; color: #175c9e; }
[data-theme="light"] .journey-evolution :is(.journey-period-seg,.team-focus-legend) { background: #eef4fc; border-color: #c4d1e2; }
[data-theme="light"] .journey-evolution .journey-period-seg button { color: #50617a; }
[data-theme="light"] .journey-evolution .journey-period-seg button.active { color: #fff; }
[data-theme="light"] .journey-evolution :is(.team-focus-counts .pill,.team-focus-legend-item p,.team-focus-group-label,.team-focus-who span,.team-focus-track-text) { color: #50617a; }
[data-theme="light"] .journey-evolution .team-focus-counts .pill b { color: #17253a; }
[data-theme="light"] .journey-evolution .team-focus-legend-item { background: #fff; }
[data-theme="light"] .journey-evolution .team-focus-who strong { color: #17253a; }
[data-theme="light"] .journey-evolution .team-focus-track-text b { color: #17253a; }
[data-theme="light"] .journey-evolution .team-focus-bar { background: #dce5f1; }
[data-theme="light"] .journey-evolution .team-focus-row { border-color: #e1e8f1; }
[data-theme="light"] .journey-evolution .team-focus-row:hover, [data-theme="light"] .journey-evolution .team-focus-row:focus-visible { background: #eef4fc; }
@media (max-width: 1180px) {
  #dashboard-content .journey-evolution { padding: 22px; }
  .journey-evolution-header { gap: 16px; }
  .journey-evolution-table th:first-child { width: 175px; }
  .journey-evolution-table th:nth-child(3), .journey-evolution-table th:nth-child(4) { width: 90px; }
  .journey-evolution-table th, .journey-evolution-table td { padding: 12px 9px; }
  .journey-day-date { font-size: 15px; }
  .journey-weekday { margin-left: 8px; font-size: 13px; }
  .journey-day-chip { margin-left: 6px; font-size: 10px; padding: 3px 6px; }
}
@media (max-width: 700px) {
  #dashboard-content .journey-evolution { padding: 16px 10px; border-radius: 16px; }
  .journey-evolution-header { gap: 12px; flex-wrap: wrap; padding: 0 5px; }
  .journey-evolution-icon { flex-basis: 44px; height: 44px; border-radius: 11px; }
  .journey-evolution-icon svg { width: 28px; height: 28px; }
  .journey-evolution-heading { flex: 1; }
  .journey-evolution-heading h2 { font-size: 21px; }
  .journey-evolution-heading > p { font-size: 12px; }
  .journey-period-button { margin: 0; width: 100%; }
  .journey-period-seg { margin: 0; width: 100%; }
  .journey-period-seg button { flex: 1; }
  .journey-evolution-summary { flex-wrap: wrap; gap: 18px; padding: 0 5px 18px; }
  .journey-planned-total { padding-left: 18px; }
  .journey-today-status { margin-left: 0; }
  .team-focus-legend { grid-template-columns: 1fr 1fr; }
  .team-focus-row { grid-template-columns: 30px minmax(0,1fr) auto; grid-template-areas: "ava who badge" "ava track track"; row-gap: 6px; }
  .team-focus-row .team-focus-avatar { grid-area: ava; }
  .team-focus-row .team-focus-who { grid-area: who; }
  .team-focus-row .team-focus-badge { grid-area: badge; }
  .team-focus-row .team-focus-track { grid-area: track; }
  .journey-evolution-table th:first-child { width: 85px; }
  .journey-evolution-table tbody th { white-space: normal; }
  .journey-evolution-table th:nth-child(3), .journey-evolution-table th:nth-child(4) { width: 64px; }
  .journey-evolution-table th, .journey-evolution-table td { padding: 11px 5px; }
  .journey-evolution-table thead th { font-size: 11px; }
  .journey-weekday { margin-left: 6px; font-size: 11px; }
  .journey-day-chip { margin: 5px 0 0; }
  .journey-evolution-table .journey-actual, .journey-evolution-table .journey-expected { font-size: 13px; }
  .journey-night-detail { padding: 12px; gap: 10px; }
  .journey-night-heading { flex: 1; }
  .journey-night-portions { margin: 0; }
}

/* ==========================================================================
   MASTER 07B.1 — Classificação e Histórico
   Reutiliza os tokens do console; nenhuma paleta nova é introduzida.
   ========================================================================== */

.classification-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.classification-kpis article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.classification-kpis small { color: var(--muted-2); font-size: 12px; }
.classification-kpis strong { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.classification-kpis .kpi-hint { color: var(--muted-2); font-size: 11px; line-height: 1.35; }

.classification-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.classification-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.classification-tab:hover { color: var(--text); }
.classification-tab.active { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.classification-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
.classification-tab .tab-count {
  background: var(--surface-3);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  padding: 1px 7px;
}
.classification-tab.active .tab-count { background: var(--brand-wash); color: var(--brand); }

.classification-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}
.classification-toolbar label {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted-2);
  min-width: 0;
}
.classification-toolbar .toolbar-search { flex: 1 1 220px; }
.classification-toolbar > button {
  align-self: flex-end;
  min-width: 0;
  min-height: var(--control-height);
  height: var(--control-height);
  margin: 0;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.classification-toolbar label:not(.toolbar-check) > input,
.classification-toolbar label > select {
  height: var(--control-height);
  min-height: var(--control-height);
  box-sizing: border-box;
}
#cls-new-rule-fields label { display: grid; gap: 6px; margin-bottom: 12px; }
#cls-new-rule-fields input, #cls-new-rule-fields select {
  width: 100%; min-width: 0; min-height: var(--control-height);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: var(--field); color: var(--text); font: inherit;
}
.classification-toolbar input[type="search"],
.classification-toolbar input[type="date"],
.classification-toolbar select,
.classification-toolbar input[type="text"] {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  min-width: 0;
}
.classification-toolbar .toolbar-check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 7px;
}

.classification-batch-bar {
  align-items: center;
  background: var(--brand-wash);
  border: 1px solid var(--brand);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
}
.classification-batch-bar span { color: var(--text); font-size: 13px; font-weight: 600; }

.classification-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.classification-table th {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.classification-table td {
  border-top: 1px solid var(--line-soft);
  padding: 10px;
  vertical-align: middle;
}
.classification-table tbody tr:hover { background: var(--surface-2); }

.classification-table .cell-numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.classification-table .cell-actions { text-align: right; white-space: nowrap; }
.classification-table .select-cell { width: 34px; }

.cls-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  white-space: nowrap;
}
.cls-badge.productive { background: var(--good-wash); color: var(--produtivo); }
.cls-badge.neutral { background: var(--info-wash); color: var(--neutro); }
.cls-badge.unrelated { background: var(--warn-wash); color: var(--naoprod); }
.cls-badge.ignored { background: var(--surface-3); color: var(--muted); }
.cls-badge.unclassified { background: var(--surface-3); color: var(--semclass); }
.cls-badge.partial { background: var(--warn-wash); color: var(--warn); }

.quality-chip {
  background: var(--surface-3);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 11px;
  padding: 1px 7px;
  white-space: nowrap;
}

.classification-pagination {
  align-items: center;
  color: var(--muted-2);
  display: flex;
  font-size: 12px;
  gap: 12px;
  justify-content: space-between;
  padding-top: 14px;
}

.error-state {
  background: var(--bad-wash);
  border: 1px solid var(--bad);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  margin: 10px 0;
  padding: 12px 14px;
}

/* --- Drawer lateral -------------------------------------------------- */

.classification-drawer {
  background: var(--surface);
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--text);
  height: 100%;
  margin: 0 0 0 auto;
  max-height: 100vh;
  max-width: 520px;
  padding: 0;
  width: min(520px, 100%);
}
.classification-drawer::backdrop { background: rgb(4 7 12 / 62%); }
/* Header e footer fixos, corpo rolavel: o gestor nao pode precisar rolar ate
   o fim para encontrar Cancelar ou Salvar, sobretudo em 1366x768. */
.classification-drawer-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  padding: 0;
}
.classification-drawer-form > .drawer-head {
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  padding: 20px 24px 16px;
}
.drawer-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px;
}
.classification-drawer-form > .drawer-actions {
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 16px rgb(4 7 12 / 35%);
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 24px;
}

/* Classificacoes em 2x2: Ignorado nao pode ficar sozinho numa terceira linha. */
#cls-drawer-choices,
#batch-drawer .classification-choices { grid-template-columns: repeat(2, 1fr); }
#cls-drawer-choices label,
#batch-drawer .classification-choices label { justify-content: flex-start; min-height: 44px; }

.batch-target-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.batch-target {
  background: var(--surface-3); border-radius: 6px; color: var(--muted);
  font-size: 12px; max-width: 220px; overflow: hidden; padding: 3px 8px;
  text-overflow: ellipsis; white-space: nowrap;
}

/* Acao compacta de linha: largura automatica, nunca um card. */
.row-action {
  appearance: none; background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 7px; color: var(--text); cursor: pointer; font: inherit;
  font-size: 12px; padding: 5px 12px; white-space: nowrap;
}
.row-action:hover { border-color: var(--brand); color: var(--brand); }
.row-action:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Menu compacto ancorado a linha. */
.row-menu { display: inline-block; position: relative; }
.row-menu-trigger {
  appearance: none; background: transparent; border: 1px solid transparent;
  border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 16px;
  height: 28px; line-height: 1; width: 32px;
}
.row-menu-trigger:hover { background: var(--surface-3); color: var(--text); }
.row-menu-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.row-menu-items {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 28px rgb(4 7 12 / 55%); display: flex; flex-direction: column;
  min-width: 170px; padding: 4px; position: fixed; right: auto; top: 0;
  z-index: 170;
}
.row-menu-item {
  appearance: none; background: transparent; border: 0; border-radius: 7px;
  color: var(--text); cursor: pointer; font: inherit; font-size: 13px;
  padding: 8px 10px; text-align: left; white-space: nowrap;
}
.row-menu-item:hover { background: var(--surface-3); }
.row-menu-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* Texto longo numa linha, com reticencias e tooltip. */
.classification-table .cell-item {
  font-weight: 600;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-head { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
.drawer-head h2 { font-size: 19px; margin: 2px 0 0; word-break: break-word; }
.icon-button {
  appearance: none; background: transparent; border: 1px solid var(--line);
  border-radius: 8px; color: var(--muted); cursor: pointer;
  font-size: 18px; height: 32px; line-height: 1; width: 32px;
}
.icon-button:hover { color: var(--text); border-color: var(--brand); }

.drawer-section { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.drawer-section:first-of-type { border-top: 0; padding-top: 0; }
.drawer-section h3 { font-size: 13px; letter-spacing: 0.03em; margin: 0 0 10px; text-transform: uppercase; color: var(--muted-2); }
.drawer-section label { display: flex; flex-direction: column; font-size: 12px; gap: 4px; color: var(--muted-2); margin-top: 10px; }
.drawer-section input[type="text"],
.drawer-section input[type="date"],
.drawer-section select,
.drawer-section textarea {
  background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; width: 100%;
}
.drawer-facts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0; }
.drawer-facts div { min-width: 0; }
.drawer-facts dt { color: var(--muted-2); font-size: 11px; }
.drawer-facts dd { font-size: 14px; font-weight: 600; margin: 2px 0 0; word-break: break-word; }

/* 170px evita que rotulos como "Este dominio e subdominios" quebrem em duas
   linhas dentro do drawer de 520px. */
.classification-choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.classification-choices label {
  align-items: center; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; color: var(--text); flex-direction: row;
  font-size: 13px; gap: 8px; margin: 0; padding: 10px 12px;
}
.classification-choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.classification-choices label:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }

.drawer-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0 0; }
.drawer-warning {
  background: var(--warn-wash); border: 1px solid var(--warn); border-radius: 8px;
  color: var(--text); font-size: 12px; line-height: 1.5; margin: 10px 0 0; padding: 10px 12px;
}
.match-preview { background: var(--surface-2); border-radius: 8px; font-size: 12px; margin-top: 10px; padding: 10px 12px; }
.match-preview strong { display: block; margin-bottom: 4px; font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.03em; }
.match-preview code { color: var(--text); font-size: 12px; }
.match-preview .affects { color: var(--produtivo); }
.match-preview .not-affects { color: var(--muted-2); }

.historical-preview {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px; margin-top: 10px; padding: 12px;
}
.drawer-actions {
  border-top: 1px solid var(--line-soft); display: flex; gap: 10px;
  justify-content: flex-end; margin-top: auto; padding-top: 16px;
}

/* --- Histórico de atividades ----------------------------------------- */

.history-summary {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 16px;
}
.history-summary article {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px;
}
.history-summary small { color: var(--muted-2); font-size: 11px; }
.history-summary strong { font-size: 19px; font-weight: 600; }

.history-banner {
  align-items: center; background: var(--info-wash); border: 1px solid var(--info);
  border-radius: 10px; display: flex; gap: 12px; justify-content: space-between;
  margin-bottom: 12px; padding: 10px 14px; font-size: 13px;
}

/* Em 1366x768 as colunas secundarias empurravam a acao principal para fora do
   quadro visivel. Qualidade e horario continuam disponiveis no drawer e no
   painel de qualidade; a acao "Classificar" nunca pode exigir rolagem. */
@media (max-width: 1440px) {
  .classification-table .cell-secondary { display: none; }
  .classification-table .cell-item { min-width: 150px; max-width: 240px; }
  .classification-toolbar { gap: 8px; }
}

@media (max-width: 1400px) {
  .classification-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .classification-kpis strong { font-size: 19px; }
}

/* Domínio ausente é informação, não célula vazia. */
.classification-table .cell-muted { color: var(--muted-2); font-weight: 500; font-style: italic; }

/* `.drawer-section label` empilha em coluna; o checkbox de retroatividade
   precisa ficar na mesma linha do rótulo, senão flutua para o lado oposto. */
.drawer-section label.toolbar-check {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  flex-direction: row;
  font-size: 13px;
  gap: 8px;
}
.drawer-section label.toolbar-check input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
}
/* Campos de data da retroatividade lado a lado. */
#cls-historical-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}
#cls-historical-fields > button,
#cls-historical-fields > .historical-preview { grid-column: 1 / -1; }

.drawer-highlight { font-size: 16px; font-weight: 600; margin: 0; }

/* Shared confirmation controls live outside form elements. */
.confirmation-dialog #confirmation-reason-field { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; color: var(--text); font-size: .8rem; }
.confirmation-dialog #confirmation-reason-field.hidden { display: none; }
.confirmation-dialog #confirmation-reason { display: block; box-sizing: border-box; width: 100%; min-height: 76px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; resize: vertical; }
.confirmation-dialog #confirmation-reason:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.confirmation-dialog #confirmation-confirm.danger-button { border-color: var(--bad); color: var(--bad); background: var(--bad-wash); font-size: .75rem; }
.confirmation-dialog #confirmation-cancel { font-size: .75rem; }
