:root{
  --educanexo-bar-bg:#ffffff;
  --educanexo-bar-text:#1f2937;
  --educanexo-bar-muted:#667085;
  --educanexo-bar-border:#e5e7eb;
  --educanexo-brand:#1f4f8f;
  --educanexo-bar-soft:#eef2f7;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0f172a;
  --panel:#111827;
  --text:#f8fafc;
  --muted:#aab4c3;
  --border:#334155;
  --nav:#0b1220;
  --primary:#8ab4f8;
  --success:#86efac;
  --educanexo-bar-bg:#111827;
  --educanexo-bar-text:#f8fafc;
  --educanexo-bar-muted:#cbd5e1;
  --educanexo-bar-border:#334155;
  --educanexo-brand:#8ab4f8;
  --educanexo-bar-soft:#1e293b;
}
#educanexoGlobalBar{
  position:sticky;top:0;z-index:1000;height:38px;min-height:38px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 12px;background:var(--educanexo-bar-bg);color:var(--educanexo-bar-text);
  border-bottom:1px solid var(--educanexo-bar-border);font-family:Inter,Segoe UI,Arial,sans-serif;
}
#educanexoGlobalBar .enx-left,#educanexoGlobalBar .enx-right{height:100%;display:flex;align-items:center;min-width:0}
#educanexoGlobalBar .enx-left{gap:7px}#educanexoGlobalBar .enx-right{gap:2px}
#educanexoGlobalBar .enx-brand{display:flex;align-items:center;gap:6px;color:var(--educanexo-brand);font-size:13px;font-weight:800;text-decoration:none;white-space:nowrap}
#educanexoGlobalBar .enx-brand-favicon{width:20px;height:20px;display:block;object-fit:contain;flex:0 0 auto}
#educanexoGlobalBar .enx-brand-text{display:inline}
#educanexoGlobalBar .enx-separator{color:#9ca3af;font-size:13px;user-select:none}
#educanexoGlobalBar .enx-module{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;color:var(--educanexo-bar-muted)}
#educanexoGlobalBar .enx-action{height:26px;display:flex;align-items:center;justify-content:center;padding:0 7px;border:0;border-radius:5px;background:transparent;color:var(--educanexo-bar-muted);font:600 12px Inter,Segoe UI,Arial,sans-serif;cursor:pointer;text-decoration:none;white-space:nowrap}
#educanexoGlobalBar .enx-action:hover{background:var(--educanexo-bar-soft);color:var(--educanexo-bar-text)}
#educanexoGlobalBar .enx-profile{color:var(--educanexo-bar-text);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#educanexoGlobalBar .enx-icon{width:28px;padding:0;font-size:15px}
#educanexoGlobalBar .enx-hidden{display:none!important}
#educanexoGlobalBar form{margin:0;padding:0;display:flex;align-items:center}
html.fullscreen-active.fullscreen-hide-bar #educanexoGlobalBar{display:none}

/* A barra ocupa 38 px; o conteúdo próprio do app permanece abaixo dela. */
.app-shell,.ccd-shell,.bpc-shell{min-height:calc(100vh - 38px)!important}
.login-body{min-height:calc(100vh - 38px)!important}

/* Tema global do aplicativo: os módulos existentes reutilizam os mesmos tokens. */
html[data-theme="dark"] body{background:var(--bg)!important;color:var(--text)!important}
html[data-theme="dark"] main,
html[data-theme="dark"] #content,
html[data-theme="dark"] .ccd-shell,
html[data-theme="dark"] .bpc-shell{color:var(--text)}
html[data-theme="dark"] header:not(#educanexoGlobalBar),
html[data-theme="dark"] .card,
html[data-theme="dark"] table,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .tree-card,
html[data-theme="dark"] .tree-unit,
html[data-theme="dark"] .tree-object,
html[data-theme="dark"] .skill-list button,
html[data-theme="dark"] .modal-panel,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .ccd-topbar,
html[data-theme="dark"] .ccd-item,
html[data-theme="dark"] .ccd-dialog,
html[data-theme="dark"] .bpc-topbar,
html[data-theme="dark"] .bpc-item,
html[data-theme="dark"] .bpc-empty,
html[data-theme="dark"] .bpc-dialog,
html[data-theme="dark"] .activity-preview,
html[data-theme="dark"] .activity-preview .preview-question,
html[data-theme="dark"] .bulk-preview,
html[data-theme="dark"] .ccd-view-grid>div,
html[data-theme="dark"] .bpc-view-grid>div,
html[data-theme="dark"] .content-choice{
  background:var(--panel)!important;color:var(--text)!important;border-color:var(--border)!important;
}
html[data-theme="dark"] th,
html[data-theme="dark"] .tree-unit,
html[data-theme="dark"] .detail-grid>div,
html[data-theme="dark"] .result-summary,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .bulk-preview,
html[data-theme="dark"] .activity-preview{background:#172033!important;color:var(--text)!important}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#0f172a!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme="dark"] .muted,
html[data-theme="dark"] header:not(#educanexoGlobalBar) p,
html[data-theme="dark"] .ccd-topbar p,
html[data-theme="dark"] .bpc-topbar p,
html[data-theme="dark"] .ccd-user small,
html[data-theme="dark"] .bpc-user small,
html[data-theme="dark"] .bpc-summary,
html[data-theme="dark"] .bpc-item p,
html[data-theme="dark"] .bulk-help,
html[data-theme="dark"] .content-choice span{color:var(--muted)!important}
html[data-theme="dark"] .table-tools button,
html[data-theme="dark"] .link-btn,
html[data-theme="dark"] .actions button:not(.primary),
html[data-theme="dark"] .ccd-quick-choice button:not(.primary),
html[data-theme="dark"] .login-card .secondary{background:#1e293b!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme="dark"] .tag,
html[data-theme="dark"] .bpc-chip{background:#24324a!important;color:#c7d7ff!important}
html[data-theme="dark"] .login-body{background:linear-gradient(135deg,#08111f,#173b67)!important}

@media(max-width:720px){
  #educanexoGlobalBar{height:38px;min-height:38px;padding:0 8px}
  #educanexoGlobalBar .enx-brand{font-size:12.5px}
  #educanexoGlobalBar .enx-brand-favicon{width:19px;height:19px}
  #educanexoGlobalBar .enx-brand-text{display:none}
  #educanexoGlobalBar .enx-module{max-width:105px;font-size:12px}
  #educanexoGlobalBar .enx-profile{max-width:86px;font-size:11.5px}
  #educanexoGlobalBar .enx-action{height:25px;padding:0 5px;font-size:11.5px}
  #educanexoGlobalBar .enx-icon{width:25px;padding:0}
  .app-shell aside{inset:38px auto 0 0!important}
}
@media print{#educanexoGlobalBar{display:none!important}}
