
/* ===== IMPORTADO E CONSOLIDADO DE assets/patch/v2800-front28.css ===== */

/* Cênika ERP Front 28 — camada visual de homologação sobre RC3.4.42 */
:root{
  --c28-rail:#22256f;--c28-rail2:#191c57;--c28-accent:#e40e20;
  --c28-bg:#f4f6fb;--c28-surface:#fff;--c28-soft:#f7f9fd;--c28-line:#dce2f0;
  --c28-text:#202536;--c28-muted:#6c7488;--c28-blue:#252772;--c28-blue-soft:#e9edff;
}
html[data-cenika-theme="dark"],html[data-theme="dark"]{
  --c28-bg:#141621;--c28-surface:#1d2030;--c28-soft:#232738;--c28-line:#353b52;
  --c28-text:#f5f7fb;--c28-muted:#b9c1d3;--c28-blue:#b1b7ff;--c28-blue-soft:#292f52;
}
.shell.c28-enabled{grid-template-columns:52px 200px minmax(0,1fr)!important;background:var(--c28-bg)!important}
.shell.c28-enabled.sidebar-compact{grid-template-columns:52px 200px minmax(0,1fr)!important}
.c28-rail{grid-column:1;grid-row:1;position:sticky;top:0;height:100vh;background:linear-gradient(180deg,var(--c28-rail),var(--c28-rail2));display:flex;flex-direction:column;align-items:center;padding:10px 0;gap:6px;z-index:95;color:#fff}
.c28-rail-logo{width:36px;height:36px;border-radius:11px;background:radial-gradient(circle at 28% 25%,#666cff,var(--c28-accent) 31%,#282a78 70%);display:grid;place-items:center;font-weight:800;font-size:16px;box-shadow:0 8px 18px rgba(0,0,0,.18);margin-bottom:4px}
.c28-rail-btn{width:42px;min-height:46px;border:0;background:transparent;color:#d9ddff;border-radius:11px;display:grid;place-items:center;gap:2px;padding:4px 0;cursor:pointer}
.c28-rail-btn svg{width:16px!important;height:16px!important}.c28-rail-btn span{font-size:7px;line-height:1}.c28-rail-btn:hover,.c28-rail-btn.active{background:rgba(255,255,255,.14);color:#fff}.c28-rail-bottom{margin-top:auto}
.shell.c28-enabled>.sidebar{grid-column:2;grid-row:1;width:200px!important;min-width:200px!important;max-width:200px!important;background:linear-gradient(180deg,var(--c28-soft),var(--c28-surface))!important;color:var(--c28-text)!important;border-right:1px solid var(--c28-line)!important;box-shadow:7px 0 22px rgba(27,39,89,.06)!important;padding:0!important}
.shell.c28-enabled>.workspace{grid-column:3;grid-row:1;min-width:0!important;overflow:auto!important;background:var(--c28-bg)!important}
.shell.c28-enabled .sidebar .brand{min-height:64px!important;padding:0 10px!important;border-bottom:1px solid var(--c28-line)!important;display:flex!important;align-items:center!important;gap:8px!important;background:var(--c28-surface)!important}
.shell.c28-enabled .sidebar .brand-logo-box-new{width:32px!important;height:32px!important;min-width:32px!important;border-radius:9px!important;background:var(--c28-rail)!important;display:grid!important;place-items:center!important;overflow:hidden!important}
.shell.c28-enabled .sidebar .brand-logo-box-new .c226-unified-brand-mark{font-size:14px!important}
.shell.c28-enabled .sidebar .brand-copy-new strong{font-size:13px!important;color:var(--c28-blue)!important}
.shell.c28-enabled .sidebar .brand-copy-new span{font-size:8px!important;color:var(--c28-muted)!important}
.shell.c28-enabled .sidebar .sidebar-collapse-btn,.shell.c28-enabled .sidebar .workspace-card-new,.shell.c28-enabled .sidebar .version-pill{display:none!important}
.shell.c28-enabled .sidebar .nav{padding:10px!important;overflow:auto!important;flex:1!important}
.shell.c28-enabled .sidebar .nav:before{content:attr(data-c28-title);display:block;padding:2px 8px 7px;font-size:8px;font-weight:800;letter-spacing:.12em;color:var(--c28-muted)}
.shell.c28-enabled .sidebar .nav-group{margin:2px 0!important}
.shell.c28-enabled .sidebar .nav-group-toggle,.shell.c28-enabled .sidebar .nav-root-item,.shell.c28-enabled .sidebar .nav-group-items button{min-height:34px!important;padding:0 8px!important;border-radius:9px!important;background:transparent!important;color:var(--c28-muted)!important;font-size:10px!important;border:1px solid transparent!important;margin:2px 0!important}
.shell.c28-enabled .sidebar .nav-group-toggle{font-weight:800!important;color:var(--c28-blue)!important}
.shell.c28-enabled .sidebar .nav-group-toggle:hover,.shell.c28-enabled .sidebar .nav-root-item:hover,.shell.c28-enabled .sidebar .nav-group-items button:hover{background:var(--c28-blue-soft)!important;border-color:var(--c28-line)!important;color:var(--c28-text)!important}
.shell.c28-enabled .sidebar .nav-group.open>.nav-group-items{display:block!important;padding:2px 0 5px 8px!important}
.shell.c28-enabled .sidebar .nav-group:not(.open)>.nav-group-items{display:none!important}
.shell.c28-enabled .sidebar .nav-group-items button.active,.shell.c28-enabled .sidebar .nav-root-item.active{background:var(--c28-blue-soft)!important;color:var(--c28-blue)!important;font-weight:800!important;border-color:var(--c28-line)!important;box-shadow:inset 3px 0 0 var(--c28-blue)!important}
.shell.c28-enabled .sidebar .nav-group-items button.active:before,.shell.c28-enabled .sidebar .nav-root-item.active:before{display:none!important}
.shell.c28-enabled .sidebar .side-user{padding:10px!important;border-top:1px solid var(--c28-line)!important;background:var(--c28-soft)!important}
.shell.c28-enabled .sidebar .side-user strong{font-size:9px!important;color:var(--c28-text)!important}.shell.c28-enabled .sidebar .side-user span{font-size:8px!important;color:var(--c28-muted)!important}.shell.c28-enabled .sidebar .logout{font-size:8px!important;color:var(--c28-blue)!important}
.c28-hidden,.shell.c28-enabled .c28-hidden{display:none!important}
.shell.c28-enabled .topbar{height:64px!important;min-height:64px!important;padding:0 18px!important;background:color-mix(in srgb,var(--c28-surface) 94%,transparent)!important;border-bottom:1px solid var(--c28-line)!important}
.shell.c28-enabled .topbar .title h1{font-size:17px!important;color:var(--c28-text)!important}.shell.c28-enabled .topbar .title p{font-size:9px!important;color:var(--c28-muted)!important}
.shell.c28-enabled .content{max-width:1600px!important;padding:18px 20px 38px!important;background:var(--c28-bg)!important}
.shell.c28-enabled .search input{width:min(420px,34vw)!important}
/* Tarefas / quadros: preservar função atual e padronizar no visual homologado */
.shell.c28-enabled .task-unified-tabs{display:flex!important;gap:8px!important;overflow-x:auto!important;border-bottom:1px solid var(--c28-line)!important;margin:0 0 14px!important;padding:0!important;scrollbar-width:thin}
.shell.c28-enabled .task-unified-tabs button{white-space:nowrap!important;min-height:48px!important;padding:0 15px!important;border:0!important;border-radius:11px 11px 0 0!important;background:transparent!important;color:var(--c28-muted)!important;font-size:11px!important;font-weight:800!important}
.shell.c28-enabled .task-unified-tabs button:hover{background:var(--c28-soft)!important;color:var(--c28-blue)!important}.shell.c28-enabled .task-unified-tabs button.active{background:#f0ebff!important;color:#6938f0!important;border-bottom:2px solid #6938f0!important}
html[data-cenika-theme="dark"] .shell.c28-enabled .task-unified-tabs button.active{background:#2d2942!important;color:#c8b9ff!important}
.shell.c28-enabled .task-unified-shell .kanban,.shell.c28-enabled .board2100-kanban{grid-template-columns:repeat(var(--kanban-columns,5),190px)!important;gap:12px!important;justify-content:flex-start!important;overflow-x:auto!important}
.shell.c28-enabled .task-unified-shell .kanban-col,.shell.c28-enabled .board2100-col{width:190px!important;min-width:190px!important}
.shell.c28-enabled .task-card{padding:10px!important}.shell.c28-enabled .task-card h4{font-size:11px!important;line-height:1.25!important}.shell.c28-enabled .task-card .project{font-size:8px!important}.shell.c28-enabled .task-meta{font-size:9px!important}
/* Conteúdo mais denso, sem alterar regras */
.shell.c28-enabled .stats{gap:10px!important;margin-bottom:12px!important}.shell.c28-enabled .stat{min-height:86px!important;padding:13px!important}.shell.c28-enabled .stat strong{font-size:21px!important}.shell.c28-enabled .grid-2,.shell.c28-enabled .grid-3{gap:12px!important}.shell.c28-enabled .panel-head{padding:12px 14px!important}.shell.c28-enabled .panel-body{padding:13px 14px!important}
@media(max-width:900px){.shell.c28-enabled{grid-template-columns:1fr!important}.c28-rail{display:none!important}.shell.c28-enabled>.sidebar{position:fixed!important;left:0;top:0;z-index:200;width:220px!important;min-width:220px!important;max-width:220px!important;transform:translateX(-102%);transition:.2s}.shell.c28-enabled>.sidebar.open{transform:translateX(0)}.shell.c28-enabled>.workspace{grid-column:1!important}.shell.c28-enabled .search input{width:100%!important}}


/* =========================================================
   FRONT 28 RC8 — BRANDING E NAVEGAÇÃO CONSOLIDADOS
   ========================================================= */

.c28-rail-logo{
  width:36px!important;height:36px!important;border-radius:13px!important;
  background:radial-gradient(circle at 28% 25%,#666cff,#e20d1d 31%,#282a78 70%)!important;
  color:#fff!important;display:grid!important;place-items:center!important;
  font:800 16px/1 Manrope,Arial,sans-serif!important;
  box-shadow:0 10px 20px rgba(0,0,0,.22)!important;margin-bottom:5px!important
}
.shell.c28-enabled .sidebar .brand-logo-box-new{
  width:32px!important;height:32px!important;min-width:32px!important;border-radius:11px!important;
  background:linear-gradient(145deg,#24266f,#3d42a1)!important;color:#fff!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;box-shadow:none!important
}
.shell.c28-enabled .sidebar .brand-logo-box-new .c226-unified-brand-mark{
  width:32px!important;height:32px!important;border-radius:11px!important;
  background:linear-gradient(145deg,#24266f,#3d42a1)!important;color:#fff!important;
  display:grid!important;place-items:center!important;
  font:800 14px/1 Manrope,Arial,sans-serif!important;box-shadow:none!important;margin:0!important
}
.c28-rail-btn .c28-svg{
  width:16px!important;height:16px!important;fill:none!important;stroke:currentColor!important;
  stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important
}
.c28-agenda-submenu{
  display:block;padding:2px 0 6px 8px;margin:0 0 5px 10px;
  border-left:1px dashed var(--c28-line,#d7def0)
}
.c28-agenda-subtitle{
  padding:4px 8px 3px;font-size:8px;font-weight:800;letter-spacing:.08em;
  color:var(--c28-muted,#6c7488)
}
.c28-agenda-submenu button{
  display:flex;align-items:center;width:100%;min-height:32px;border:1px solid transparent;
  background:transparent;border-radius:8px;padding:0 8px;color:var(--c28-muted,#6c7488);
  text-align:left;font-size:10px;cursor:pointer
}
.c28-agenda-submenu button:hover,.c28-agenda-submenu button.active{
  background:var(--c28-blue-soft,#e9ecff);color:var(--c28-blue,#252772);
  border-color:var(--c28-line,#d7def0)
}
.shell.c28-enabled .sidebar .brand-copy-new strong{
  display:block!important;color:var(--c28-blue,#252772)!important;
  font:800 13px/1.15 Manrope,Arial,sans-serif!important
}
.shell.c28-enabled .sidebar .brand-copy-new span{
  display:block!important;margin-top:2px!important;color:var(--c28-muted,#6c7488)!important;
  font-size:8px!important;line-height:1.2!important
}


/* =========================================================
   FRONT 28 RC9 — SHELL + AGENDA DEFINITIVOS
   Referência: Arquitetura de Navegação v1.2
   ========================================================= */
.shell.c28-enabled>.c28-rail{width:52px!important;min-width:52px!important}
.c28-rail-logo{width:44px!important;height:44px!important;border-radius:13px!important;background:radial-gradient(circle at 30% 30%,#5E66FF,#e20d1d 30%,#252772 70%)!important;font:800 18px Manrope!important;box-shadow:0 10px 20px rgba(0,0,0,.18)!important}
.shell.c28-enabled>.sidebar{width:200px!important;min-width:200px!important;max-width:200px!important}
.shell.c28-enabled .sidebar .brand{height:72px!important;min-height:72px!important;padding:0 12px!important;gap:10px!important;background:linear-gradient(180deg,var(--c28-surface,#fff),var(--c28-surface-2,#f7f8fc))!important}
.shell.c28-enabled .sidebar .brand-logo-box-new{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;background:linear-gradient(145deg,#252772,#3e43a6)!important;box-shadow:0 8px 18px rgba(37,39,114,.18)!important}
.shell.c28-enabled .sidebar .brand-logo-box-new .c226-unified-brand-mark{width:40px!important;height:40px!important;border-radius:12px!important;background:linear-gradient(145deg,#252772,#3e43a6)!important;font:800 16px Manrope!important;color:#fff!important}
.shell.c28-enabled .sidebar .brand-copy-new strong{font:800 15px Manrope!important;color:#252772!important;white-space:nowrap!important}
.shell.c28-enabled .sidebar .brand-copy-new span{font-size:10px!important;color:#6c7488!important;white-space:nowrap!important;margin-top:2px!important}

/* Agenda contextual */
.c28-agenda-submenu{display:block;padding:2px 0 7px 10px!important;margin:0 8px 4px 18px!important;border-left:1px dashed #d7def0!important}
.c28-agenda-subtitle{font-size:9px!important;font-weight:800!important;letter-spacing:.08em!important;color:#6c7488!important;padding:5px 8px!important}
.c28-agenda-submenu button{width:100%!important;min-height:34px!important;border:1px solid transparent!important;background:transparent!important;color:#68748d!important;border-radius:9px!important;text-align:left!important;padding:0 8px!important;font-size:10px!important;cursor:pointer!important}
.c28-agenda-submenu button:hover,.c28-agenda-submenu button.active{background:#eef1fb!important;border-color:#d7def0!important;color:#252772!important}

/* Agenda Visão Geral Front 28 */
.agenda-page .agenda-tabs{margin-top:10px!important}
.agenda-page .agenda-summary{margin:10px 0 14px!important}
.agenda-overview-kpis{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin:12px 0 16px}
.agenda-overview-kpi{background:#fff;border:1px solid #dfe4f0;border-radius:14px;padding:16px 18px;box-shadow:0 8px 24px rgba(32,42,95,.05)}
.agenda-overview-kpi small{display:block;color:#68748d;font-size:10px;margin-bottom:8px}
.agenda-overview-kpi strong{display:block;color:#252772;font:800 25px/1 Manrope;margin-bottom:8px}
.agenda-overview-kpi span{display:block;color:#68748d;font-size:9px}
.agenda-overview-kpi.warn strong{color:#b26a00}.agenda-overview-kpi.danger strong{color:#c93446}
.agenda-overview-panel{background:#fff;border:1px solid #dfe4f0;border-radius:14px;overflow:hidden;box-shadow:0 8px 24px rgba(32,42,95,.05)}
.agenda-overview-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #e4e8f2}
.agenda-overview-head h3{margin:0;color:#252772;font:800 15px Manrope}.agenda-overview-head p{margin:2px 0 0;color:#68748d;font-size:9px}
.agenda-overview-week{display:grid;grid-template-columns:repeat(7,minmax(180px,1fr));gap:10px;padding:14px;overflow-x:auto}
.agenda-overview-day{background:#f8f9fd;border:1px solid #dfe4f0;border-radius:12px;min-height:220px;padding:10px}
.agenda-overview-day.today{border-color:#7b61ff;box-shadow:inset 0 0 0 1px #7b61ff}
.agenda-overview-day>header{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #e5e8f1}
.agenda-overview-day>header b{font:800 10px Manrope;color:#252772;text-transform:uppercase}.agenda-overview-day>header span{font-size:10px;color:#68748d}
.agenda-overview-event{display:block;width:100%;border:1px solid #dfe4f0;border-left:4px solid #252772;background:#fff;border-radius:10px;padding:8px;margin:0 0 8px;text-align:left;cursor:pointer}
.agenda-overview-event:hover{transform:translateY(-1px);box-shadow:0 5px 12px rgba(32,42,95,.08)}
.agenda-overview-event small{display:block;color:#68748d;font-size:8px;margin-bottom:3px}.agenda-overview-event b{display:block;color:#17223b;font-size:10px;line-height:1.25}.agenda-overview-event span{display:block;color:#68748d;font-size:8px;margin-top:4px}
.agenda-overview-event.purple{border-left-color:#8155be}.agenda-overview-event.green{border-left-color:#2d8b57}.agenda-overview-event.amber{border-left-color:#e59116}.agenda-overview-event.red{border-left-color:#e24b55}.agenda-overview-event.blue{border-left-color:#347dca}
@media(max-width:1100px){.agenda-overview-kpis{grid-template-columns:repeat(2,minmax(160px,1fr))}}


/* =========================================================
   FRONT 28 RC10 — CORREÇÃO DEFINITIVA DE BRANDING E CONTRASTE
   ========================================================= */

/* O container de logo legado é ocultado para impedir deformações por CSS antigo */
body .shell.c28-enabled .sidebar .brand > .brand-logo-box-new{
  display:none!important;
}

/* Logo correto do mockup: quadrado azul com C branco */
body .shell.c28-enabled .sidebar .c28-brand-mark-final{
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  max-width:40px!important;
  max-height:40px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#252772,#3e43a6)!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  font:800 16px/1 Manrope,Arial,sans-serif!important;
  box-shadow:0 8px 18px rgba(37,39,114,.18)!important;
  overflow:hidden!important;
}

/* Texto do branding conforme mockup */
body .shell.c28-enabled .sidebar .brand-copy-new{
  min-width:0!important;
  opacity:1!important;
  visibility:visible!important;
}
body .shell.c28-enabled .sidebar .brand-copy-new strong{
  color:#252772!important;
  opacity:1!important;
  visibility:visible!important;
}
body .shell.c28-enabled .sidebar .brand-copy-new span{
  color:#6c7488!important;
  opacity:1!important;
  visibility:visible!important;
}

/* Agendas: eliminar qualquer herança de branco/opacidade do shell legado */
body .shell.c28-enabled .sidebar .c28-agenda-submenu{
  opacity:1!important;
  visibility:visible!important;
  color:#4f5d78!important;
}
body .shell.c28-enabled .sidebar .c28-agenda-submenu .c28-agenda-subtitle{
  color:#657189!important;
  opacity:1!important;
  visibility:visible!important;
}
body .shell.c28-enabled .sidebar .c28-agenda-submenu button,
body .shell.c28-enabled .sidebar .c28-agenda-submenu button span{
  color:#4f5d78!important;
  opacity:1!important;
  visibility:visible!important;
  text-shadow:none!important;
  filter:none!important;
  -webkit-text-fill-color:#4f5d78!important;
}
body .shell.c28-enabled .sidebar .c28-agenda-submenu button:hover,
body .shell.c28-enabled .sidebar .c28-agenda-submenu button.active{
  color:#252772!important;
  -webkit-text-fill-color:#252772!important;
  background:#eef1fb!important;
}

/* Mantém o bloco de marca horizontal, como no mockup */
body .shell.c28-enabled .sidebar .brand{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  height:72px!important;
  min-height:72px!important;
  padding:0 12px!important;
}


/* ===== IMPORTADO E CONSOLIDADO DE assets/patch/v2802-front28-hotfix-final.css ===== */


/* Cênika ERP Front 28 — Hotfix consolidado RC2 */

/* Rail e sidebar: mesma linguagem do mockup UX28 */
.c28-rail{width:52px!important}
.c28-rail-btn{width:42px!important;min-height:46px!important;border-radius:13px!important}
.c28-rail-btn .c28-svg{width:17px;height:17px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.c28-rail-btn>span:last-child{font-size:7px!important}
.shell.c28-enabled>.sidebar{width:200px!important;min-width:200px!important;max-width:200px!important}
.shell.c28-enabled .sidebar .brand{height:64px!important;min-height:64px!important}
.shell.c28-enabled .sidebar .nav-group-toggle,
.shell.c28-enabled .sidebar .nav-root-item,
.shell.c28-enabled .sidebar .nav-group-items button{font-size:10px!important;min-height:34px!important;border-radius:9px!important}
.c28-agenda-links{padding:3px 0 7px 8px;margin:2px 0 6px;border-left:1px dashed var(--c28-line)}
.c28-agenda-links .c28-subtitle{font-size:8px;font-weight:800;letter-spacing:.08em;color:var(--c28-muted);padding:4px 8px}
.c28-agenda-links button{width:100%;min-height:32px;border:1px solid transparent;background:transparent;color:var(--c28-muted);border-radius:8px;text-align:left;padding:0 8px;font-size:10px;cursor:pointer}
.c28-agenda-links button:hover{background:var(--c28-blue-soft);color:var(--c28-blue)}

/* Cabeçalhos dos quadros: ações sempre na mesma linha */
.task-unified-shell .page-head,
.board2100-shell .page-head,
.approval-kanban .page-head,
[data-board-view] .page-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important}
.task-unified-shell .page-head>.row-actions,
.board2100-shell .page-head>.row-actions,
.task-unified-shell .page-head>.actions,
.board2100-shell .page-head>.actions{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin-left:auto!important}

/* Modal de tarefas e modais gerais: caber na viewport */
.modal-backdrop{padding:3vh 3vw!important;align-items:center!important;overflow:hidden!important}
.modal-backdrop>.modal,
.modal-backdrop>.modal-wide,
.modal-backdrop>section.modal{width:min(1180px,94vw)!important;max-width:94vw!important;max-height:92vh!important;height:auto!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.modal-backdrop .modal-head{flex:0 0 auto!important;position:relative!important}
.modal-backdrop .modal-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important}
.modal-backdrop .modal-actions{flex:0 0 auto!important}
.task-modal,.task-editor-modal,.task-full-modal{max-width:94vw!important;max-height:92vh!important}

/* Projeto: contraste e cabeçalho mais compacto */
.project-hero{padding:22px 28px!important;border-radius:16px!important;background:linear-gradient(135deg,#262a7b,#3e43a6)!important;border-bottom:4px solid #e20d1d!important}
.project-hero h1,.project-hero h2,.project-hero h3{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.18)!important}
.project-hero p,.project-hero .meta,.project-hero .meta *{color:#eef0ff!important}
.project-hero .badge{background:rgba(255,255,255,.16)!important;color:#fff!important;border-color:rgba(255,255,255,.18)!important}
.project-tabs,.finance-tabs{display:flex!important;gap:2px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;scrollbar-width:thin!important;border-bottom:1px solid var(--c28-line)!important}
.project-tabs .tab,.finance-tabs .tab{white-space:nowrap!important;min-width:max-content!important;padding:13px 14px!important;font-size:10px!important;line-height:1.1!important}
.project-tabs .tab.active,.finance-tabs .tab.active{color:#252772!important;border-bottom:2px solid #252772!important}

/* Quadros padronizados */
.task-unified-shell .kanban,
.board2100-kanban,
.approval-kanban .kanban{gap:12px!important;justify-content:flex-start!important;overflow-x:auto!important}
.board2100-col,.task-unified-shell .kanban-col{width:190px!important;min-width:190px!important}
.board2100-card,.task-card{border-radius:12px!important;box-shadow:0 5px 14px rgba(32,42,95,.05)!important}
.approval-kanban .kanban-col:nth-child(1){border-top:4px solid #e59116!important;background:#fff3dc!important}
.approval-kanban .kanban-col:nth-child(2){border-top:4px solid #e24b55!important;background:#fdebed!important}
.approval-kanban .kanban-col:nth-child(3){border-top:4px solid #2d8b57!important;background:#eaf7ef!important}

/* CRM Leads: padrão de cores por estágio */
[data-v218-crm-board],.crm-kanban,.v218-crm-kanban{display:grid!important;gap:12px!important;overflow-x:auto!important}
[data-v218-crm-board]>*:nth-child(1),.crm-kanban>*:nth-child(1),.v218-crm-kanban>*:nth-child(1){border-top:4px solid #7f8a98!important;background:#f1f3f6!important}
[data-v218-crm-board]>*:nth-child(2),.crm-kanban>*:nth-child(2),.v218-crm-kanban>*:nth-child(2){border-top:4px solid #347dca!important;background:#eaf4ff!important}
[data-v218-crm-board]>*:nth-child(3),.crm-kanban>*:nth-child(3),.v218-crm-kanban>*:nth-child(3){border-top:4px solid #8155be!important;background:#f2eaff!important}
[data-v218-crm-board]>*:nth-child(4),.crm-kanban>*:nth-child(4),.v218-crm-kanban>*:nth-child(4){border-top:4px solid #e59116!important;background:#fff3dc!important}
[data-v218-crm-board]>*:nth-child(5),.crm-kanban>*:nth-child(5),.v218-crm-kanban>*:nth-child(5){border-top:4px solid #2d8b57!important;background:#eaf7ef!important}
.crm-kanban .card,.v218-crm-kanban .card,[data-v218-crm-board] .card{border-left:4px solid #6972b8!important}

/* Contratos mensais: maior separação visual */
.v218-card{border:1px solid #dfe5f1!important;border-left:5px solid #3e43a6!important;border-radius:14px!important;padding:16px 18px!important;box-shadow:0 7px 18px rgba(32,42,95,.06)!important;background:#fff!important}
.v218-card:nth-child(even){background:#f7f9fd!important;border-left-color:#2d8b57!important}
.v218-card .v218-pill.ok{background:#e8f6ee!important;color:#15804d!important}
.v218-card .v218-actions{margin-top:12px!important}

/* Campos de regra contratual */
.c28-contract-panel{margin:12px 0;padding:12px 14px;border:1px solid #d7def0;border-radius:12px;background:#f8f9fd}
.c28-contract-panel strong{color:#252772}.c28-contract-panel small{display:block;color:#6c7488;margin-top:4px}
.c28-contract-panel .row-actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}

@media(max-width:900px){
  .project-tabs .tab,.finance-tabs .tab{padding:11px 12px!important}
  .modal-backdrop{padding:2vh 2vw!important}
  .modal-backdrop>.modal,.modal-backdrop>.modal-wide,.modal-backdrop>section.modal{width:96vw!important;max-width:96vw!important;max-height:94vh!important}
}


/* ===== IMPORTADO E CONSOLIDADO DE assets/patch/v2803-front28-boards-restore.css ===== */

/* CÊNIKA ERP — Front 28 / Boards Standard RC1
   Objetivo: padronizar TODOS os quadros de área pelo visual do Quadro Geral.
   Somente apresentação. Não altera handlers, RPCs, drag-and-drop, permissões ou dados. */

:root{
  --c28-board-w:190px;
  --c28-board-gap:12px;
  --c28-card-radius:12px;
  --c28-col-radius:14px;
  --c28-line:var(--line,#dfe4f1);
  --c28-text:var(--text,#202536);
  --c28-muted:var(--muted,#6c7488);
  --c28-surface:var(--surface,#fff);
}

/* ============================================================
   1. QUADROS OPERACIONAIS / ÁREAS (ADM, FINANCEIRO, DESIGN ETC.)
   ============================================================ */
.shell.c28-enabled .board2100-head{
  align-items:flex-start!important;
  gap:14px!important;
  margin-bottom:12px!important;
}
.shell.c28-enabled .board2100-head h2{
  margin:0 0 4px!important;
  font-size:24px!important;
  line-height:1.15!important;
}
.shell.c28-enabled .board2100-head p{
  margin:0!important;
  font-size:12px!important;
  color:var(--c28-muted)!important;
}
.shell.c28-enabled .board2100-head .row.gap{
  gap:8px!important;
  flex-wrap:wrap!important;
}
.shell.c28-enabled .board2100-summary{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  flex-wrap:wrap!important;
  margin:0 0 14px!important;
  padding:9px 12px!important;
  min-height:38px!important;
  border:1px solid var(--c28-line)!important;
  background:var(--c28-surface)!important;
  border-radius:11px!important;
  font-size:10px!important;
  color:var(--c28-muted)!important;
  box-shadow:none!important;
}

.shell.c28-enabled .board2100-kanban{
  display:grid!important;
  grid-template-columns:repeat(var(--kanban-columns,5),var(--c28-board-w))!important;
  grid-auto-columns:var(--c28-board-w)!important;
  gap:var(--c28-board-gap)!important;
  justify-content:flex-start!important;
  align-items:start!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding:0 0 10px!important;
}
.shell.c28-enabled .board2100-col{
  width:var(--c28-board-w)!important;
  min-width:var(--c28-board-w)!important;
  max-width:var(--c28-board-w)!important;
  min-height:520px!important;
  overflow:hidden!important;
  border:1px solid var(--c28-line)!important;
  border-radius:var(--c28-col-radius)!important;
  background:#f1f3f6!important;
  border-top:4px solid #7f8a98!important;
  box-shadow:none!important;
}
.shell.c28-enabled .board2100-col:nth-child(2){background:#eaf4ff!important;border-top-color:#347dca!important}
.shell.c28-enabled .board2100-col:nth-child(3){background:#fff3dc!important;border-top-color:#e59116!important}
.shell.c28-enabled .board2100-col:nth-child(4){background:#f2eaff!important;border-top-color:#8155be!important}
.shell.c28-enabled .board2100-col:nth-child(5){background:#eaf7ef!important;border-top-color:#2d8b57!important}
.shell.c28-enabled .board2100-col[data-kind="done"]{background:#eaf7ef!important;border-top-color:#2d8b57!important}
.shell.c28-enabled .board2100-col[data-kind="approval"]{background:#f2eaff!important;border-top-color:#8155be!important}
.shell.c28-enabled .board2100-col[data-kind="adjustments"]{background:#fff0f1!important;border-top-color:#e5484d!important}
.shell.c28-enabled .board2100-col.drag-over{
  outline:2px dashed #3e43a6!important;
  outline-offset:-5px!important;
}

.shell.c28-enabled .board2100-col>header{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:11px 12px 9px!important;
  border-bottom:0!important;
  color:var(--c28-text)!important;
  font-size:10px!important;
  line-height:1.2!important;
  font-weight:800!important;
  background:transparent!important;
}
.shell.c28-enabled .board2100-col>header small{
  min-width:26px!important;
  height:26px!important;
  padding:0 7px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(255,255,255,.72)!important;
  border:0!important;
  border-radius:999px!important;
  color:var(--c28-text)!important;
  font-size:8px!important;
  font-weight:800!important;
}
.shell.c28-enabled .board2100-col .kanban-stack{
  padding:0 10px 10px!important;
}
.shell.c28-enabled .board2100-card{
  position:relative!important;
  margin:0 0 10px!important;
  padding:10px!important;
  background:var(--c28-surface)!important;
  border:1px solid var(--c28-line)!important;
  border-left:4px solid #2c2f7d!important;
  border-radius:var(--c28-card-radius)!important;
  box-shadow:0 5px 15px rgba(26,35,92,.05)!important;
  color:var(--c28-text)!important;
}
.shell.c28-enabled .board2100-col:nth-child(2) .board2100-card{border-left-color:#347dca!important}
.shell.c28-enabled .board2100-col:nth-child(3) .board2100-card{border-left-color:#e59116!important}
.shell.c28-enabled .board2100-col:nth-child(4) .board2100-card{border-left-color:#8155be!important}
.shell.c28-enabled .board2100-col:nth-child(5) .board2100-card,
.shell.c28-enabled .board2100-col[data-kind="done"] .board2100-card{border-left-color:#2d8b57!important}
.shell.c28-enabled .board2100-col[data-kind="adjustments"] .board2100-card{border-left-color:#e5484d!important}

.shell.c28-enabled .board2100-card .task-project{
  margin:0 0 5px!important;
  font-size:7px!important;
  line-height:1.3!important;
  letter-spacing:.02em!important;
  color:var(--c28-muted)!important;
}
.shell.c28-enabled .board2100-card>b{
  display:block!important;
  margin:0 0 6px!important;
  font-size:10px!important;
  line-height:1.28!important;
  color:var(--c28-text)!important;
}
.shell.c28-enabled .board2100-card .small,
.shell.c28-enabled .board2100-card .muted{
  font-size:7px!important;
  line-height:1.35!important;
  color:var(--c28-muted)!important;
}
.shell.c28-enabled .board2100-card-bottom{
  margin-top:8px!important;
  gap:5px!important;
}
.shell.c28-enabled .board2100-actions{
  gap:5px!important;
  margin-top:8px!important;
}
.shell.c28-enabled .board2100-actions .btn.mini{
  min-height:27px!important;
  padding:4px 7px!important;
  border-radius:8px!important;
  font-size:8px!important;
}
.shell.c28-enabled .approval-chip{
  padding:4px 7px!important;
  font-size:7px!important;
}
.shell.c28-enabled .approved-mark{font-size:8px!important}
.shell.c28-enabled .board-empty{
  min-height:150px!important;
  display:grid!important;
  place-items:center!important;
  padding:14px 8px!important;
  color:var(--c28-muted)!important;
  font-size:9px!important;
}

/* ============================================================
   2. APROVAÇÃO DO GESTOR — MESMA DENSIDADE DO QUADRO GERAL
   ============================================================ */
.shell.c28-enabled .approval-metrics{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(150px,1fr))!important;
  gap:10px!important;
  margin:0 0 14px!important;
}
.shell.c28-enabled .approval-metrics>div{
  padding:12px 14px!important;
  background:var(--c28-surface)!important;
  border:1px solid var(--c28-line)!important;
  border-radius:13px!important;
  box-shadow:0 6px 18px rgba(32,42,95,.04)!important;
}
.shell.c28-enabled .approval-metrics b{font-size:20px!important;line-height:1.1!important;color:var(--c28-text)!important}
.shell.c28-enabled .approval-metrics span{font-size:9px!important;color:var(--c28-muted)!important}

.shell.c28-enabled .approval-kanban{
  display:grid!important;
  grid-template-columns:repeat(3,var(--c28-board-w))!important;
  gap:var(--c28-board-gap)!important;
  justify-content:flex-start!important;
  align-items:start!important;
  overflow-x:auto!important;
  padding-bottom:10px!important;
}
.shell.c28-enabled .approval-col{
  width:var(--c28-board-w)!important;
  min-width:var(--c28-board-w)!important;
  max-width:var(--c28-board-w)!important;
  min-height:520px!important;
  overflow:hidden!important;
  border:1px solid var(--c28-line)!important;
  border-radius:var(--c28-col-radius)!important;
  background:#f1f3f6!important;
  border-top:4px solid #7f8a98!important;
}
.shell.c28-enabled .approval-col.pending{background:#fff3dc!important;border-top-color:#e59116!important}
.shell.c28-enabled .approval-col.changes{background:#fff0f1!important;border-top-color:#e5484d!important}
.shell.c28-enabled .approval-col.approved{background:#eaf7ef!important;border-top-color:#2d8b57!important}
.shell.c28-enabled .approval-col>header{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:11px 12px 9px!important;
  border:0!important;
  background:transparent!important;
  color:var(--c28-text)!important;
  font-size:10px!important;
  line-height:1.2!important;
  font-weight:800!important;
}
.shell.c28-enabled .approval-col>header small{
  min-width:26px!important;
  height:26px!important;
  padding:0 7px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.72)!important;
  font-size:8px!important;
  color:var(--c28-text)!important;
}
.shell.c28-enabled .approval-col>div{padding:0 10px 10px!important}
.shell.c28-enabled .approval-card{
  margin:0 0 10px!important;
  padding:10px!important;
  background:var(--c28-surface)!important;
  border:1px solid var(--c28-line)!important;
  border-left:4px solid #e59116!important;
  border-radius:var(--c28-card-radius)!important;
  box-shadow:0 5px 15px rgba(26,35,92,.05)!important;
}
.shell.c28-enabled .approval-col.changes .approval-card{border-left-color:#e5484d!important}
.shell.c28-enabled .approval-col.approved .approval-card{border-left-color:#2d8b57!important}
.shell.c28-enabled .approval-card-top{margin:0 0 6px!important;gap:5px!important}
.shell.c28-enabled .approval-card .task-project{font-size:7px!important;line-height:1.3!important;margin-bottom:5px!important}
.shell.c28-enabled .approval-card h3{margin:0 0 6px!important;font-size:10px!important;line-height:1.28!important;color:var(--c28-text)!important}
.shell.c28-enabled .approval-card p.small,
.shell.c28-enabled .approval-card .small{font-size:7px!important;line-height:1.35!important}
.shell.c28-enabled .approval-asset{font-size:8px!important;gap:4px!important}
.shell.c28-enabled .approval-comment{font-size:8px!important;padding:7px 8px!important;margin-top:6px!important}

/* ============================================================
   3. DARK MODE
   ============================================================ */
[data-theme="dark"] .shell.c28-enabled .board2100-col,
[data-theme="dark"] .shell.c28-enabled .approval-col{background:#252934!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col:nth-child(2){background:#223146!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col:nth-child(3),
[data-theme="dark"] .shell.c28-enabled .approval-col.pending{background:#3c3020!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col:nth-child(4){background:#302642!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col:nth-child(5),
[data-theme="dark"] .shell.c28-enabled .board2100-col[data-kind="done"],
[data-theme="dark"] .shell.c28-enabled .approval-col.approved{background:#20352a!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col[data-kind="adjustments"],
[data-theme="dark"] .shell.c28-enabled .approval-col.changes{background:#3a2529!important}
[data-theme="dark"] .shell.c28-enabled .board2100-col>header small,
[data-theme="dark"] .shell.c28-enabled .approval-col>header small{background:rgba(255,255,255,.08)!important}

@media(max-width:900px){
 .shell.c28-enabled .approval-metrics{grid-template-columns:1fr!important}
 .shell.c28-enabled .approval-kanban{grid-template-columns:repeat(3,var(--c28-board-w))!important}
}


/* RC3 — reforço pós-hotfix final: preservar cabeçalho alinhado sem alterar o design aprovado */
.shell.c28-enabled .board2100-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
}
.shell.c28-enabled .board2100-head>.row.gap,
.shell.c28-enabled .board2100-head>.actions{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  margin-left:auto!important;
}
@media(max-width:980px){
  .shell.c28-enabled .board2100-head>.row.gap,
  .shell.c28-enabled .board2100-head>.actions{flex-wrap:wrap!important}
}



/* ============================================================
   FRONT 28 CONSOLIDADO 1.0 — REGRAS FINAIS
   Estas regras são a autoridade visual final.
   ============================================================ */

:root{
  --c28-rail-w:52px;
  --c28-side-w:200px;
  --c28-modal-gap:16px;
}

/* ---------- APP SHELL ---------- */
.shell.c28-consolidated{
  grid-template-columns:var(--c28-rail-w) var(--c28-side-w) minmax(0,1fr)!important;
  min-width:0!important;
}
.shell.c28-consolidated>.workspace{
  min-width:0!important;
  overflow-x:hidden!important;
}
.shell.c28-consolidated .content{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  overflow-x:hidden!important;
}
.shell.c28-consolidated .c28-hidden{
  display:none!important;
}

/* Branding */
.shell.c28-consolidated .brand>.brand-logo-box-new{display:none!important}
.shell.c28-consolidated .c28-brand-mark-final{
  flex:0 0 40px!important;
  width:40px!important;height:40px!important;
  display:grid!important;place-items:center!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#252772,#3e43a6)!important;
  color:#fff!important;
  font:800 16px/1 Manrope,Arial,sans-serif!important;
  box-shadow:0 8px 18px rgba(37,39,114,.18)!important;
}
.shell.c28-consolidated .brand-copy-new strong{
  color:#252772!important;font:800 15px/1.15 Manrope,Arial,sans-serif!important;
}
.shell.c28-consolidated .brand-copy-new span{
  color:#6c7488!important;font-size:9px!important;line-height:1.2!important;
}
.shell.c28-consolidated [hidden]{display:none!important}

/* Context menu never leaks from another domain */
.shell.c28-consolidated .sidebar .nav>.c28-hidden{display:none!important}

/* Agenda contextual submenu */
.shell.c28-consolidated .c28-agenda-submenu{
  display:block!important;
  margin:0 0 5px 10px!important;
  padding:2px 0 6px 8px!important;
  border-left:1px dashed var(--c28-line,#d7def0)!important;
}
.shell.c28-consolidated .c28-agenda-subtitle{
  padding:4px 8px 3px!important;
  font-size:8px!important;font-weight:800!important;letter-spacing:.08em!important;
  color:#657189!important;
}
.shell.c28-consolidated .c28-agenda-submenu button{
  width:100%!important;min-height:32px!important;
  display:flex!important;align-items:center!important;
  border:1px solid transparent!important;border-radius:8px!important;
  background:transparent!important;color:#4f5d78!important;
  -webkit-text-fill-color:#4f5d78!important;
  opacity:1!important;visibility:visible!important;
  padding:0 8px!important;font-size:10px!important;text-align:left!important;
}
.shell.c28-consolidated .c28-agenda-submenu button:hover,
.shell.c28-consolidated .c28-agenda-submenu button.active{
  background:#eef1fb!important;color:#252772!important;
  -webkit-text-fill-color:#252772!important;border-color:#d7def0!important;
}

/* User chip */
.c28-user-chip{
  display:flex;align-items:center;gap:7px;height:38px;
  padding:4px 8px;border:1px solid var(--c28-line,#dce2f0);
  border-radius:10px;background:var(--c28-surface,#fff);
  font-size:9px;white-space:nowrap;
}
.c28-user-chip>b{
  width:28px;height:28px;border-radius:8px;background:#252772;color:#fff;
  display:grid;place-items:center;
}
.c28-user-chip span strong{display:block}
.c28-user-chip span small{display:block;color:#6c7488}

/* ---------- MODAL SYSTEM ---------- */
body>.modal-backdrop,
.modal-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:1000!important;
  display:grid!important;
  place-items:center!important;
  padding:clamp(10px,2vw,24px)!important;
  overflow:hidden!important;
}

.modal-backdrop>.modal,
.modal-backdrop>section.modal,
.modal-backdrop>.modal-wide,
.modal-backdrop>section.modal-wide{
  width:min(1180px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  height:min(860px,calc(100vh - 32px))!important;
  max-height:calc(100vh - 32px)!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-radius:16px!important;
}

/* Header stays visible. */
.modal-backdrop .modal-head{
  flex:0 0 auto!important;
  min-height:72px!important;
  position:relative!important;
  z-index:4!important;
  background:var(--surface,#fff)!important;
}

/* IMPORTANT: modal-layout is a grid, never generic flex-column on desktop. */
.modal-backdrop .modal-layout{
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  overflow:hidden!important;
}
.modal-backdrop .modal-with-aside .modal-layout{
  grid-template-columns:minmax(0,1fr) minmax(300px,36%)!important;
}

/* Form has one scrolling body plus fixed actions. */
.modal-backdrop .modal-layout>form{
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  overflow:hidden!important;
}
.modal-backdrop .modal-body{
  min-width:0!important;
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  padding-bottom:18px!important;
}

/* Actions do not float in the middle of the page. */
.modal-backdrop .modal-actions{
  position:relative!important;
  inset:auto!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:11px 18px!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:8px!important;
  background:var(--surface,#fff)!important;
  border-top:1px solid var(--line,#dfe4f1)!important;
  z-index:5!important;
}
.modal-backdrop .modal-actions .destructive-action{margin-right:auto!important}

/* Aside is independent on desktop, stacked on smaller screens. */
.modal-backdrop .modal-aside{
  min-width:0!important;
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  border-left:1px solid var(--line,#dfe4f1)!important;
}

/* ---------- ACCORDION / FORM SECTIONS ---------- */
.modal-backdrop details.form-section{
  display:block!important;
  overflow:visible!important;
  height:auto!important;
  min-height:0!important;
}
.modal-backdrop details.form-section>summary{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  cursor:pointer!important;
  user-select:none!important;
  list-style:none!important;
  position:relative!important;
  padding-right:42px!important;
}
.modal-backdrop details.form-section>summary::-webkit-details-marker{display:none!important}
.modal-backdrop details.form-section>summary::after{
  content:"⌄"!important;
  position:absolute!important;
  right:16px!important;
  top:50%!important;
  transform:translateY(-50%) rotate(0deg)!important;
  transform-origin:center!important;
  font-size:18px!important;
  line-height:1!important;
  color:#657189!important;
  transition:transform .15s ease!important;
}
.modal-backdrop details.form-section[open]>summary::after{
  transform:translateY(-50%) rotate(180deg)!important;
}
.modal-backdrop details.form-section>summary span{
  min-width:0!important;
  font-weight:800!important;
}
.modal-backdrop details.form-section>summary small{
  margin-left:auto!important;
  max-width:55%!important;
  text-align:right!important;
  color:var(--muted,#6c7488)!important;
  white-space:normal!important;
}
.modal-backdrop details.form-section[open]>.form-grid,
.modal-backdrop details.form-section[open]>.panel-body,
.modal-backdrop details.form-section[open]>.tf216-section-body{
  overflow:visible!important;
  max-height:none!important;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media(max-width:1365px){
  :root{--c28-side-w:176px}
  .shell.c28-consolidated .sidebar .nav{padding:8px!important}
  .shell.c28-consolidated .content{padding-left:16px!important;padding-right:16px!important}
  .shell.c28-consolidated .search input{width:min(340px,30vw)!important}
}

@media(max-width:1100px){
  :root{--c28-side-w:164px}
  .modal-backdrop .modal-with-aside .modal-layout{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .modal-backdrop .modal-with-aside .modal-layout>form{
    overflow:visible!important;
    min-height:auto!important;
  }
  .modal-backdrop .modal-with-aside .modal-body{
    overflow:visible!important;
  }
  .modal-backdrop .modal-aside{
    overflow:visible!important;
    border-left:0!important;
    border-top:1px solid var(--line,#dfe4f1)!important;
  }
  .modal-backdrop .modal-actions{
    position:sticky!important;
    bottom:0!important;
  }
}

@media(max-width:900px){
  .shell.c28-consolidated{
    grid-template-columns:1fr!important;
  }
  .shell.c28-consolidated>.c28-rail{display:none!important}
  .shell.c28-consolidated>.sidebar{
    position:fixed!important;
    left:0!important;top:0!important;bottom:0!important;
    width:min(280px,86vw)!important;
    min-width:0!important;max-width:none!important;
    transform:translateX(-102%)!important;
    z-index:220!important;
    transition:transform .18s ease!important;
  }
  .shell.c28-consolidated>.sidebar.open{transform:translateX(0)!important}
  .shell.c28-consolidated>.workspace{grid-column:1!important}
  .shell.c28-consolidated .topbar{padding:0 12px!important}
  .shell.c28-consolidated .topbar .title p{display:none!important}
  .shell.c28-consolidated .search input{width:min(44vw,280px)!important}

  .modal-backdrop{
    padding:8px!important;
  }
  .modal-backdrop>.modal,
  .modal-backdrop>section.modal,
  .modal-backdrop>.modal-wide,
  .modal-backdrop>section.modal-wide{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    height:calc(100vh - 16px)!important;
    max-height:calc(100vh - 16px)!important;
    border-radius:12px!important;
  }
  .modal-backdrop .modal-head{min-height:60px!important}
  .modal-backdrop .modal-actions{
    padding:9px 12px!important;
  }
  .modal-backdrop details.form-section>summary{
    min-height:44px!important;
    padding-right:36px!important;
  }
  .modal-backdrop details.form-section>summary small{
    display:none!important;
  }
}

@media(max-width:640px){
  .c28-user-chip span{display:none!important}
  .shell.c28-consolidated .search{display:none!important}
  .modal-backdrop .modal-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .modal-backdrop .modal-actions .destructive-action{
    grid-column:1/-1!important;
    margin:0!important;
  }
}


/* ============================================================
   FRONT 28 CONSOLIDADO 1.0.3 — RESPONSIVIDADE POR CONTAINER
   O layout responde à largura REAL do modal, não apenas ao viewport.
   ============================================================ */

/* Todos os modais se tornam containers de layout. */
.modal-backdrop > .modal,
.modal-backdrop > section.modal,
.modal-backdrop > .modal-wide,
.modal-backdrop > section.modal-wide{
  container-type:inline-size!important;
  container-name:c28modal!important;
  min-width:0!important;
}

/* Nenhum grid/field pode impor largura maior que o container. */
.modal-backdrop .modal-body,
.modal-backdrop .modal-layout,
.modal-backdrop .modal-layout > *,
.modal-backdrop .form-grid,
.modal-backdrop .field,
.modal-backdrop .field > *,
.modal-backdrop input,
.modal-backdrop select,
.modal-backdrop textarea,
.modal-backdrop .panel,
.modal-backdrop .panel-body,
.modal-backdrop .list,
.modal-backdrop .list-item,
.modal-backdrop .crm-opportunity-layout,
.modal-backdrop .crm-opportunity-main,
.modal-backdrop .crm-conversation,
.modal-backdrop .task-conversation{
  min-width:0!important;
  max-width:100%!important;
}

/* Inputs nunca ultrapassam a célula. */
.modal-backdrop input,
.modal-backdrop select,
.modal-backdrop textarea{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Formulários genéricos: 2 colunas quando há espaço real. */
.modal-backdrop .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  align-items:start!important;
}
.modal-backdrop .form-grid > .field.full{
  grid-column:1/-1!important;
}

/* DETAILS precisa conter fisicamente seus campos.
   overflow:visible estava permitindo a invasão das seções seguintes. */
.modal-backdrop details.form-section{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  contain:none!important;
}
.modal-backdrop details.form-section[open]{
  height:auto!important;
  min-height:max-content!important;
}
.modal-backdrop details.form-section > .form-grid{
  position:relative!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  padding:16px!important;
}
.modal-backdrop details.form-section:not([open]) > .form-grid{
  display:none!important;
}

/* Progressive form não pode sobrepor os próprios filhos. */
.modal-backdrop .progressive-form{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
  min-height:0!important;
}
.modal-backdrop .progressive-form > details{
  flex:0 0 auto!important;
}

/* TASK MODAL */
.modal-backdrop .modal-with-aside .modal-layout{
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr)!important;
}
.modal-backdrop .modal-with-aside .modal-layout > form{
  min-width:0!important;
}
.modal-backdrop .modal-aside{
  min-width:0!important;
  width:auto!important;
}

/* CRM opportunity */
.modal-backdrop .crm-opportunity-layout{
  grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)!important;
  width:100%!important;
}
.modal-backdrop .crm-conversation{
  min-width:0!important;
}
.modal-backdrop .crm-comment-actions{
  min-width:0!important;
}
.modal-backdrop .crm-comment-actions label,
.modal-backdrop .crm-comment-actions select{
  min-width:0!important;
  max-width:100%!important;
}

/* cards/kpis podem reduzir sem estourar */
.modal-backdrop .crm-kpis{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.modal-backdrop .crm-kpis > div{
  min-width:0!important;
  overflow-wrap:anywhere!important;
}

/* Textos longos nunca alargam modal. */
.modal-backdrop p,
.modal-backdrop b,
.modal-backdrop strong,
.modal-backdrop small,
.modal-backdrop span,
.modal-backdrop label{
  overflow-wrap:anywhere;
}

/* ------------------------------------------------------------
   CONTAINER QUERIES
   ------------------------------------------------------------ */

/* O próprio modal ficou abaixo de 1050px:
   comentários/aside passam para baixo do conteúdo principal. */
@container c28modal (max-width:1050px){
  .modal-with-aside .modal-layout{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .modal-with-aside .modal-layout > form{
    border-right:0!important;
    border-bottom:1px solid var(--line,#dfe4f1)!important;
    overflow:visible!important;
  }
  .modal-with-aside .modal-body{
    overflow:visible!important;
  }
  .modal-with-aside .modal-aside{
    position:static!important;
    width:100%!important;
    max-height:none!important;
    overflow:visible!important;
    border-left:0!important;
    border-top:1px solid var(--line,#dfe4f1)!important;
  }

  .crm-opportunity-layout{
    grid-template-columns:1fr!important;
  }
  .crm-conversation{
    position:static!important;
    width:100%!important;
    min-height:0!important;
    border-left:0!important;
    border-top:1px solid var(--line,#dfe4f1)!important;
    padding-left:0!important;
    padding-top:16px!important;
  }
}

/* Modal abaixo de 820px: formulários viram coluna única. */
@container c28modal (max-width:820px){
  .form-grid{
    grid-template-columns:1fr!important;
  }
  .form-grid > .field,
  .form-grid > .field.full{
    grid-column:1!important;
  }

  .crm-kpis{
    grid-template-columns:1fr!important;
  }

  .crm-conversation-head{
    flex-direction:column!important;
    align-items:stretch!important;
  }
  .crm-filter-tabs{
    flex-wrap:wrap!important;
  }
  .crm-comment-actions,
  .crm-comment-actions label{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%!important;
  }
  .crm-comment-actions select{
    width:100%!important;
  }

  .modal-head{
    padding:14px 16px!important;
  }
  .modal-body{
    padding:16px!important;
  }
}

/* Modal abaixo de 620px: controles e ações compactos. */
@container c28modal (max-width:620px){
  .modal-head h2{
    font-size:17px!important;
  }
  .modal-head p{
    font-size:10px!important;
  }
  .modal-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }
  .modal-actions > *{
    min-width:0!important;
    width:100%!important;
  }
  .modal-actions .destructive-action{
    grid-column:1/-1!important;
  }

  details.form-section > summary{
    min-height:44px!important;
    padding:10px 36px 10px 12px!important;
  }
  details.form-section > summary small{
    display:none!important;
  }

  .crm-opportunity-toolbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .crm-opportunity-toolbar .btn{
    width:100%!important;
    min-width:0!important;
  }

  .conversation-actions{
    width:100%!important;
    justify-content:stretch!important;
  }
  .conversation-actions .btn{
    flex:1 1 auto!important;
  }
}

/* Fallback para browsers sem container query:
   ainda reorganiza pelo viewport. */
@supports not (container-type:inline-size){
  @media(max-width:1200px){
    .modal-backdrop .modal-with-aside .modal-layout,
    .modal-backdrop .crm-opportunity-layout{
      grid-template-columns:1fr!important;
    }
    .modal-backdrop .crm-conversation{
      position:static!important;
      border-left:0!important;
      border-top:1px solid var(--line,#dfe4f1)!important;
      padding-left:0!important;
      padding-top:16px!important;
    }
  }
  @media(max-width:900px){
    .modal-backdrop .form-grid{
      grid-template-columns:1fr!important;
    }
    .modal-backdrop .form-grid > .field{
      grid-column:1!important;
    }
  }
}


/* ============================================================
   FRONT 28 CONSOLIDADO 1.0.6 — CRM RESPONSIVO
   Tratamento específico para Editar oportunidade e Detalhe do lead.
   ============================================================ */

/* ---------- CRM EDITAR OPORTUNIDADE ---------- */
.modal-backdrop .c28-crm-edit-modal{
  width:min(1120px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  height:min(860px,calc(100vh - 32px))!important;
  max-height:calc(100vh - 32px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  container-type:inline-size!important;
  container-name:c28crmedit!important;
}

.modal-backdrop .c28-crm-edit-modal > [data-body]{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
}

.modal-backdrop .c28-crm-edit-modal form[data-lead-form]{
  height:100%!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  overflow:hidden!important;
}

.modal-backdrop .c28-crm-edit-modal form[data-lead-form] > .modal-body{
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  padding:18px 20px!important;
}

.modal-backdrop .c28-crm-edit-modal form[data-lead-form] > .modal-actions{
  flex:0 0 auto!important;
  position:relative!important;
  margin:0!important;
  padding:12px 20px!important;
  background:#fff!important;
  border-top:1px solid var(--line,#dfe4f1)!important;
  z-index:4!important;
}

.modal-backdrop .c28-crm-edit-modal .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
}

.modal-backdrop .c28-crm-edit-modal .form-grid > .field{
  min-width:0!important;
  width:auto!important;
}

.modal-backdrop .c28-crm-edit-modal .form-grid > .field.full{
  grid-column:1/-1!important;
}

.modal-backdrop .c28-crm-edit-modal input,
.modal-backdrop .c28-crm-edit-modal select,
.modal-backdrop .c28-crm-edit-modal textarea{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* ---------- CRM DETALHE / OPORTUNIDADE ---------- */
.modal-backdrop .c28-crm-detail-modal{
  width:min(1220px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  height:min(860px,calc(100vh - 32px))!important;
  max-height:calc(100vh - 32px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  container-type:inline-size!important;
  container-name:c28crmdetail!important;
}

.modal-backdrop .c28-crm-detail-modal > [data-body]{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-opportunity-toolbar{
  flex:0 0 auto!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  padding:12px 18px!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-opportunity-layout{
  flex:1 1 auto!important;
  min-height:0!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.5fr) minmax(320px,.85fr)!important;
  gap:16px!important;
  padding:16px 18px!important;
  overflow:hidden!important;
  align-items:stretch!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-opportunity-main{
  min-width:0!important;
  min-height:0!important;
  overflow:auto!important;
  padding-right:4px!important;
  overscroll-behavior:contain!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-conversation{
  position:relative!important;
  top:auto!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  padding-left:16px!important;
  border-left:1px solid var(--line,#dfe4f1)!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-conversation-head,
.modal-backdrop .c28-crm-detail-modal .crm-comment-box{
  flex:0 0 auto!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-timeline{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-kpis{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-kpis > div{
  min-width:0!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-comment-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:10px!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-comment-actions label{
  min-width:0!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
}

.modal-backdrop .c28-crm-detail-modal .crm-comment-actions select{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}

/* ---------- CONTAINER QUERIES: EDIT ---------- */
@container c28crmedit (max-width:900px){
  .form-grid{
    grid-template-columns:1fr!important;
  }
  .form-grid > .field,
  .form-grid > .field.full{
    grid-column:1!important;
  }
}

@container c28crmedit (max-width:620px){
  .modal-body{
    padding:14px!important;
  }
  .modal-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .modal-actions > *{
    width:100%!important;
    min-width:0!important;
  }
}

/* ---------- CONTAINER QUERIES: DETAIL ---------- */
@container c28crmdetail (max-width:1100px){
  .crm-opportunity-layout{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .crm-opportunity-main{
    overflow:visible!important;
    padding-right:0!important;
  }
  .crm-conversation{
    position:static!important;
    min-height:360px!important;
    overflow:visible!important;
    border-left:0!important;
    border-top:1px solid var(--line,#dfe4f1)!important;
    padding-left:0!important;
    padding-top:16px!important;
  }
  .crm-timeline{
    max-height:420px!important;
    overflow:auto!important;
  }
}

@container c28crmdetail (max-width:760px){
  .crm-kpis{
    grid-template-columns:1fr!important;
  }
  .crm-conversation-head{
    flex-direction:column!important;
    align-items:stretch!important;
  }
  .crm-filter-tabs{
    flex-wrap:wrap!important;
  }
  .crm-comment-actions{
    grid-template-columns:1fr!important;
  }
  .crm-comment-actions label{
    grid-template-columns:1fr!important;
  }
  .crm-comment-actions .btn{
    width:100%!important;
  }
  .crm-opportunity-toolbar{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .crm-opportunity-toolbar .btn{
    width:100%!important;
    min-width:0!important;
  }
}

/* viewport fallback */
@media(max-width:1000px){
  .modal-backdrop .c28-crm-edit-modal .form-grid{
    grid-template-columns:1fr!important;
  }
  .modal-backdrop .c28-crm-edit-modal .form-grid > .field,
  .modal-backdrop .c28-crm-edit-modal .form-grid > .field.full{
    grid-column:1!important;
  }
}

@media(max-width:1180px){
  .modal-backdrop .c28-crm-detail-modal .crm-opportunity-layout{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .modal-backdrop .c28-crm-detail-modal .crm-opportunity-main{
    overflow:visible!important;
  }
  .modal-backdrop .c28-crm-detail-modal .crm-conversation{
    border-left:0!important;
    border-top:1px solid var(--line,#dfe4f1)!important;
    padding-left:0!important;
    padding-top:16px!important;
  }
}


/* ============================================================
   FRONT 28 CONSOLIDADO 1.1.0 — SHELL + TAREFAS + PROJETOS
   Somente apresentação. Core, renderer, RPCs e regras preservados.
   ============================================================ */

:root{
  --c28-board-width:190px;
  --c28-board-gap:12px;
  --c28-content-gap:18px;
}

/* ------------------------------------------------------------
   1. SHELL / WORKSPACE
   ------------------------------------------------------------ */

.shell.c28-consolidated .workspace,
.shell.c28-consolidated .content,
.shell.c28-consolidated [data-task-unified-content],
.shell.c28-consolidated [data-project-body],
.shell.c28-consolidated [data-project-navigation]{
  min-width:0!important;
}

.shell.c28-consolidated .topbar{
  min-width:0!important;
  padding-left:18px!important;
  padding-right:18px!important;
}

.shell.c28-consolidated .topbar>.title{
  min-width:0!important;
  flex:1 1 auto!important;
}

.shell.c28-consolidated .topbar>.title h1,
.shell.c28-consolidated .topbar>.title p{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.shell.c28-consolidated .top-actions{
  flex:0 0 auto!important;
  min-width:0!important;
}

.shell.c28-consolidated .search input{
  width:clamp(220px,26vw,420px)!important;
  max-width:100%!important;
}

/* ------------------------------------------------------------
   2. TAREFAS / HUB DE QUADROS
   ------------------------------------------------------------ */

.shell.c28-consolidated .c28-task-hub{
  min-width:0!important;
}

/* Tabs são áreas, nunca projetos. Uma linha única com scroll. */
.shell.c28-consolidated .c28-task-hub>.task-unified-tabs{
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
  scrollbar-width:thin!important;
  scroll-snap-type:x proximity!important;
  padding:0 2px!important;
  margin:0 0 14px!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.shell.c28-consolidated .c28-task-hub>.task-unified-tabs button{
  flex:0 0 auto!important;
  min-width:max-content!important;
  min-height:42px!important;
  padding:0 13px!important;
  margin:0!important;
  border-radius:10px 10px 0 0!important;
  scroll-snap-align:start!important;
  font-size:10px!important;
  font-weight:800!important;
}

.shell.c28-consolidated .c28-task-hub>.task-unified-tabs button.active{
  background:#f0edff!important;
  color:#4f36d7!important;
  border-bottom:2px solid #5f43e8!important;
}

/* Board header: título de um lado e as duas ações lado a lado. */
.shell.c28-consolidated .c28-board-surface>.board2100-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:14px!important;
  margin-bottom:10px!important;
}

.shell.c28-consolidated .c28-board-surface>.board2100-head>div:first-child{
  min-width:0!important;
}

.shell.c28-consolidated .c28-board-surface>.board2100-head h2{
  margin:0 0 4px!important;
  font-size:21px!important;
  line-height:1.15!important;
}

.shell.c28-consolidated .c28-board-surface>.board2100-head p{
  margin:0!important;
  font-size:11px!important;
  color:var(--c28-muted)!important;
}

.shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  margin:0!important;
}

.shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap .btn{
  white-space:nowrap!important;
}

/* Summary compacta e legível. */
.shell.c28-consolidated .c28-board-surface>.board2100-summary{
  display:flex!important;
  align-items:center!important;
  gap:8px 14px!important;
  flex-wrap:wrap!important;
  min-height:36px!important;
  margin:0 0 12px!important;
  padding:8px 11px!important;
  border-radius:10px!important;
  font-size:9px!important;
}

/* Kanban: padrão compacto aprovado, horizontal previsível. */
.shell.c28-consolidated .c28-board-surface>.board2100-kanban{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:var(--c28-board-width)!important;
  grid-template-columns:none!important;
  gap:var(--c28-board-gap)!important;
  align-items:start!important;
  justify-content:start!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain!important;
  scroll-snap-type:x proximity!important;
  scrollbar-gutter:stable!important;
  padding:0 2px 12px!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-col{
  width:var(--c28-board-width)!important;
  min-width:var(--c28-board-width)!important;
  max-width:var(--c28-board-width)!important;
  min-height:500px!important;
  scroll-snap-align:start!important;
  border-radius:13px!important;
}

/* Cabeçalho da coluna permanece visualmente estável. */
.shell.c28-consolidated .c28-board-surface .board2100-col>header{
  min-height:44px!important;
  padding:9px 10px!important;
  gap:7px!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-col>header>span{
  min-width:0!important;
  font-size:10px!important;
  line-height:1.2!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-col>header>small{
  flex:0 0 auto!important;
  min-width:24px!important;
  height:24px!important;
  display:grid!important;
  place-items:center!important;
  padding:0 6px!important;
  border-radius:999px!important;
  font-size:9px!important;
}

/* Cards compactos, sem esconder informação funcional. */
.shell.c28-consolidated .c28-board-surface .kanban-stack{
  padding:8px!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-card{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  margin:0 0 8px!important;
  padding:10px!important;
  border-radius:11px!important;
  box-shadow:0 3px 10px rgba(30,42,90,.055)!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-card .task-project{
  margin-bottom:5px!important;
  font-size:8px!important;
  line-height:1.25!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-card>b{
  display:block!important;
  font-size:11px!important;
  line-height:1.3!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-card .muted.small{
  margin-top:6px!important;
  font-size:9px!important;
  line-height:1.3!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-card-bottom{
  margin-top:8px!important;
  gap:5px!important;
  flex-wrap:wrap!important;
}

.shell.c28-consolidated .c28-board-surface .approval-chip{
  max-width:100%!important;
  font-size:8px!important;
  padding:3px 6px!important;
  white-space:normal!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
  margin-top:8px!important;
}

.shell.c28-consolidated .c28-board-surface .board2100-actions .btn.mini{
  width:100%!important;
  min-width:0!important;
  min-height:28px!important;
  padding:4px 6px!important;
  font-size:8px!important;
  white-space:normal!important;
  line-height:1.2!important;
}

/* Aprovação do Gestor permanece um quadro independente. */
.shell.c28-consolidated .approval-kanban{
  min-width:0!important;
  overflow-x:auto!important;
  scrollbar-gutter:stable!important;
}

/* ------------------------------------------------------------
   3. PROJETOS — LISTA E DETALHE
   ------------------------------------------------------------ */

.shell.c28-consolidated .c28-project-list-surface .filters{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}

.shell.c28-consolidated .c28-project-list-surface .filters .control{
  flex:0 1 240px!important;
  min-width:170px!important;
  max-width:100%!important;
}

.shell.c28-consolidated .c28-project-list-surface .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  scrollbar-gutter:stable!important;
}

.shell.c28-consolidated .c28-project-list-surface .data-table{
  min-width:760px!important;
}

/* Hero com contraste aprovado. */
.shell.c28-consolidated .c28-project-detail .project-hero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:7px!important;
  margin:0 0 14px!important;
  padding:18px 22px!important;
  border-radius:15px!important;
  overflow:hidden!important;
}

.shell.c28-consolidated .c28-project-detail .project-hero h2{
  min-width:0!important;
  margin:0!important;
  color:#fff!important;
  font-size:22px!important;
  line-height:1.15!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-project-detail .project-hero p{
  min-width:0!important;
  margin:0!important;
  color:#eef0ff!important;
  font-size:10px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}

.shell.c28-consolidated .c28-project-detail .project-hero .meta{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  min-width:0!important;
}

/* Navegação interna: sempre uma linha, sem quebrar os títulos. */
.shell.c28-consolidated .c28-project-detail [data-project-navigation]{
  min-width:0!important;
  margin-bottom:14px!important;
}

.shell.c28-consolidated .c28-project-detail .project-breadcrumb{
  margin:0 0 7px!important;
  color:var(--c28-muted)!important;
  font-size:9px!important;
  line-height:1.3!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.shell.c28-consolidated .c28-project-detail .project-menu,
.shell.c28-consolidated .c28-project-detail .financial-section-menu,
.shell.c28-consolidated .c28-project-detail .project-submenu{
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
  scrollbar-width:thin!important;
  scroll-snap-type:x proximity!important;
}

.shell.c28-consolidated .c28-project-detail .project-menu{
  padding:0 0 5px!important;
  margin:0 0 5px!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.shell.c28-consolidated .c28-project-detail .financial-section-menu{
  padding:5px 0!important;
  margin:0 0 4px!important;
}

.shell.c28-consolidated .c28-project-detail .project-submenu{
  padding:0!important;
  margin:0!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.shell.c28-consolidated .c28-project-detail .project-menu-button,
.shell.c28-consolidated .c28-project-detail .financial-section-button,
.shell.c28-consolidated .c28-project-detail .project-submenu .tab{
  flex:0 0 auto!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  scroll-snap-align:start!important;
}

.shell.c28-consolidated .c28-project-detail .project-menu-button{
  min-height:36px!important;
  padding:0 12px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  background:transparent!important;
  color:var(--c28-muted)!important;
  font-size:10px!important;
  font-weight:800!important;
}

.shell.c28-consolidated .c28-project-detail .project-menu-button.active{
  background:#eef0fb!important;
  color:#252772!important;
  border-color:#d9def2!important;
}

.shell.c28-consolidated .c28-project-detail .financial-section-button{
  min-height:31px!important;
  padding:0 10px!important;
  border:1px solid #dfe4f1!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#667085!important;
  font-size:9px!important;
  font-weight:700!important;
}

.shell.c28-consolidated .c28-project-detail .financial-section-button.active{
  background:#252772!important;
  border-color:#252772!important;
  color:#fff!important;
}

.shell.c28-consolidated .c28-project-detail .project-submenu .tab{
  min-height:38px!important;
  padding:0 11px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  background:transparent!important;
  color:#667085!important;
  font-size:9px!important;
  font-weight:800!important;
}

.shell.c28-consolidated .c28-project-detail .project-submenu .tab.active{
  color:#252772!important;
  border-bottom-color:#252772!important;
}

/* Desktop usa botões; selects ficam como fallback responsivo. */
.shell.c28-consolidated .c28-project-detail .financial-section-select,
.shell.c28-consolidated .c28-project-detail .project-submenu-select{
  display:none!important;
}

/* Conteúdo do projeto nunca impõe largura além do workspace. */
.shell.c28-consolidated .c28-project-detail [data-project-body],
.shell.c28-consolidated .c28-project-detail [data-project-body]>*{
  min-width:0!important;
  max-width:100%!important;
}

.shell.c28-consolidated .c28-project-detail .table-wrap{
  max-width:100%!important;
  overflow-x:auto!important;
  scrollbar-gutter:stable!important;
}

.shell.c28-consolidated .c28-project-detail .grid-2,
.shell.c28-consolidated .c28-project-detail .stats{
  min-width:0!important;
}

/* ------------------------------------------------------------
   4. BREAKPOINTS
   ------------------------------------------------------------ */

@media(max-width:1365px){
  :root{
    --c28-board-width:184px;
    --c28-board-gap:10px;
  }

  .shell.c28-consolidated .c28-board-surface>.board2100-head h2{
    font-size:19px!important;
  }

  .shell.c28-consolidated .c28-project-detail .project-hero{
    padding:16px 18px!important;
  }
}

@media(max-width:1100px){
  :root{
    --c28-board-width:178px;
  }

  .shell.c28-consolidated .c28-board-surface>.board2100-head{
    grid-template-columns:1fr!important;
  }

  .shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap{
    justify-content:flex-start!important;
  }

  .shell.c28-consolidated .c28-project-detail .stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .shell.c28-consolidated .c28-project-detail .grid-2{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:900px){
  .shell.c28-consolidated .search input{
    width:min(38vw,280px)!important;
  }

  .shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }

  .shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap .btn{
    width:100%!important;
    min-width:0!important;
    white-space:normal!important;
  }

  .shell.c28-consolidated .c28-project-detail .project-menu,
  .shell.c28-consolidated .c28-project-detail .financial-section-menu,
  .shell.c28-consolidated .c28-project-detail .project-submenu{
    display:none!important;
  }

  .shell.c28-consolidated .c28-project-detail .financial-section-select,
  .shell.c28-consolidated .c28-project-detail .project-submenu-select{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:6px 0!important;
  }

  .shell.c28-consolidated .c28-project-detail .project-breadcrumb{
    white-space:normal!important;
  }

  .shell.c28-consolidated .c28-project-detail .stats{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:640px){
  .shell.c28-consolidated .c28-board-surface>.board2100-head>.row.gap{
    grid-template-columns:1fr!important;
  }

  .shell.c28-consolidated .c28-project-list-surface .filters{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  .shell.c28-consolidated .c28-project-list-surface .filters .control{
    width:100%!important;
    min-width:0!important;
  }
}


/* ============================================================
   FRONT 28 CONSOLIDADO 1.2.0 — GESTÃO / FINANCEIRO
   ============================================================ */

#viewRoot.c28-finance-surface{
  min-width:0!important;
  width:100%!important;
}

#viewRoot.c28-finance-surface .page-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:14px!important;
  margin-bottom:14px!important;
}

#viewRoot.c28-finance-surface .page-head>div:first-child{
  min-width:0!important;
}

#viewRoot.c28-finance-surface .page-head h2{
  margin:0 0 4px!important;
  font-size:22px!important;
  line-height:1.15!important;
  color:#15213b!important;
}

#viewRoot.c28-finance-surface .page-head p{
  margin:0!important;
  max-width:900px!important;
  font-size:11px!important;
  line-height:1.4!important;
  color:#7a869f!important;
}

#viewRoot.c28-finance-surface .row-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  min-width:0!important;
}

#viewRoot.c28-finance-surface .row-actions .btn{
  min-width:0!important;
  white-space:nowrap!important;
}

/* Panels */
#viewRoot.c28-finance-surface .panel{
  min-width:0!important;
  max-width:100%!important;
  border-radius:14px!important;
  border:1px solid #dde3ef!important;
  box-shadow:0 5px 16px rgba(29,42,88,.045)!important;
}

#viewRoot.c28-finance-surface .panel-head{
  min-width:0!important;
  gap:10px!important;
}

#viewRoot.c28-finance-surface .panel-body{
  min-width:0!important;
}

/* Forms */
#viewRoot.c28-finance-surface .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:13px 14px!important;
  min-width:0!important;
}

#viewRoot.c28-finance-surface .form-grid>.field{
  min-width:0!important;
}

#viewRoot.c28-finance-surface .form-grid>.field.full,
#viewRoot.c28-finance-surface .form-grid>.span-2{
  grid-column:1/-1!important;
}

#viewRoot.c28-finance-surface input,
#viewRoot.c28-finance-surface select,
#viewRoot.c28-finance-surface textarea,
#viewRoot.c28-finance-surface .control{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Tables */
#viewRoot.c28-finance-surface .table-wrap,
#viewRoot.c28-finance-surface .resource2220-table{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:auto!important;
  scrollbar-gutter:stable!important;
}

#viewRoot.c28-finance-surface table{
  min-width:760px!important;
}

#viewRoot.c28-finance-surface th,
#viewRoot.c28-finance-surface td{
  vertical-align:top!important;
}

#viewRoot.c28-finance-surface td{
  overflow-wrap:anywhere!important;
}

/* ------------------------------------------------------------
   PAINEL DE RECURSOS E RUBRICAS
   ------------------------------------------------------------ */

#viewRoot.c28-view-resource-dashboard .resource2220{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-head{
  margin-bottom:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-filters{
  padding:14px!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-filter-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  min-width:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-filter-grid label{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  font-size:9px!important;
  font-weight:700!important;
  color:#596780!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-checks{
  display:flex!important;
  align-items:center!important;
  gap:8px 14px!important;
  flex-wrap:wrap!important;
  margin-top:12px!important;
  padding-top:10px!important;
  border-top:1px solid #e7ebf3!important;
  font-size:9px!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-checks small{
  flex:1 1 320px!important;
  color:#7c879c!important;
  line-height:1.35!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-kpis{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  min-width:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-kpis>*{
  min-width:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-main{
  display:grid!important;
  grid-template-columns:180px minmax(0,1fr)!important;
  gap:12px!important;
  min-width:0!important;
  align-items:start!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-reportnav{
  position:sticky!important;
  top:12px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  padding:10px!important;
  min-width:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-reportnav strong{
  padding:8px 8px 4px!important;
  font-size:8px!important;
  letter-spacing:.08em!important;
  color:#7d879a!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-reportnav button{
  width:100%!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  padding:0 9px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#596780!important;
  font-size:9px!important;
  font-weight:700!important;
  text-align:left!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-reportnav button:hover{
  background:#f3f5fb!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-reportnav button.active{
  background:#eeecff!important;
  border-color:#ddd8ff!important;
  color:#3f2eb2!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-results{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  min-width:0!important;
}

#viewRoot.c28-view-resource-dashboard .resource2220-chart,
#viewRoot.c28-view-resource-dashboard .resource2220-table{
  min-width:0!important;
}

/* ------------------------------------------------------------
   CONTROLES FINANCEIROS / NF / PAGAMENTOS
   ------------------------------------------------------------ */

#viewRoot.c28-finance-surface .finance-control-card{
  min-width:0!important;
  padding:12px!important;
  border:1px solid #dde4f0!important;
  border-radius:12px!important;
  background:#f9faff!important;
}

#viewRoot.c28-finance-surface .finance-control-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-width:0!important;
}

#viewRoot.c28-finance-surface .finance-control-head>*{
  min-width:0!important;
}

#viewRoot.c28-finance-surface .finance-control-stats{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  margin-top:10px!important;
}

#viewRoot.c28-finance-surface .finance-control-stats>span{
  min-width:0!important;
  padding:9px!important;
  border-radius:9px!important;
  background:#fff!important;
  border:1px solid #e3e8f2!important;
  font-size:8px!important;
  color:#6e7990!important;
}

#viewRoot.c28-finance-surface .finance-control-stats b{
  display:block!important;
  margin-top:3px!important;
  font-size:12px!important;
  color:#17213a!important;
  overflow-wrap:anywhere!important;
}

/* NF request previews */
#viewRoot.c28-view-nf-request .rubricas-preview{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  min-width:0!important;
}

#viewRoot.c28-view-nf-request .rubricas-preview textarea{
  min-height:180px!important;
  resize:vertical!important;
}

/* Financial project tabs */
#viewRoot.c28-view-financial-projects .finance-tabs{
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  margin-bottom:12px!important;
  border-bottom:1px solid #e0e5ef!important;
}

#viewRoot.c28-view-financial-projects .finance-tabs .tab{
  flex:0 0 auto!important;
  min-width:max-content!important;
  min-height:38px!important;
  padding:0 11px!important;
  white-space:nowrap!important;
}

/* Financial tables */
#viewRoot.c28-view-financial-projects .finance-operational-table{
  min-width:980px!important;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media(max-width:1500px){
  #viewRoot.c28-view-resource-dashboard .resource2220-filter-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  #viewRoot.c28-view-resource-dashboard .resource2220-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:1180px){
  #viewRoot.c28-finance-surface .page-head{
    grid-template-columns:1fr!important;
  }

  #viewRoot.c28-finance-surface .row-actions{
    justify-content:flex-start!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-main{
    grid-template-columns:1fr!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-reportnav{
    position:static!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:thin!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-reportnav strong{
    flex:0 0 auto!important;
    display:flex!important;
    align-items:center!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-reportnav button{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
  }

  #viewRoot.c28-finance-surface .finance-control-stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:900px){
  #viewRoot.c28-finance-surface .form-grid{
    grid-template-columns:1fr!important;
  }

  #viewRoot.c28-finance-surface .form-grid>.field,
  #viewRoot.c28-finance-surface .form-grid>.field.full,
  #viewRoot.c28-finance-surface .form-grid>.span-2{
    grid-column:1!important;
  }

  #viewRoot.c28-view-resource-dashboard .resource2220-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  #viewRoot.c28-view-nf-request .rubricas-preview{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:640px){
  #viewRoot.c28-view-resource-dashboard .resource2220-filter-grid,
  #viewRoot.c28-view-resource-dashboard .resource2220-kpis,
  #viewRoot.c28-finance-surface .finance-control-stats{
    grid-template-columns:1fr!important;
  }

  #viewRoot.c28-finance-surface .row-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
  }

  #viewRoot.c28-finance-surface .row-actions .btn{
    width:100%!important;
    white-space:normal!important;
  }
}


/* ============================================================
   FRONT 28 CONSOLIDADO 1.3.0 — COMPONENT SYSTEM
   ============================================================ */

:root{
  --c28-bg:#f4f6fb;
  --c28-surface:#ffffff;
  --c28-surface-soft:#f8f9fc;
  --c28-line:#dfe4ef;
  --c28-line-strong:#cfd7e6;
  --c28-text:#17213a;
  --c28-muted:#75819a;
  --c28-primary:#272a78;
  --c28-primary-2:#4a3fca;
  --c28-danger:#df3040;
  --c28-warning:#c47b00;
  --c28-success:#16865d;
  --c28-radius-sm:8px;
  --c28-radius-md:11px;
  --c28-radius-lg:14px;
  --c28-shadow-sm:0 2px 8px rgba(29,42,88,.05);
  --c28-shadow-md:0 8px 24px rgba(29,42,88,.08);
  --c28-control-h:40px;
}

/* ---------- BUTTONS ---------- */
.shell.c28-consolidated .btn,
.modal-backdrop .btn{
  min-height:var(--c28-control-h)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease!important;
}

.shell.c28-consolidated .btn.primary,
.modal-backdrop .btn.primary{
  background:var(--c28-primary)!important;
  border-color:var(--c28-primary)!important;
  color:#fff!important;
}

.shell.c28-consolidated .btn.primary:hover,
.modal-backdrop .btn.primary:hover{
  background:#202366!important;
  border-color:#202366!important;
}

.shell.c28-consolidated .btn.secondary,
.modal-backdrop .btn.secondary{
  background:#fff!important;
  border:1px solid var(--c28-line)!important;
  color:var(--c28-text)!important;
}

.shell.c28-consolidated .btn.secondary:hover,
.modal-backdrop .btn.secondary:hover{
  background:#f6f7fb!important;
  border-color:var(--c28-line-strong)!important;
}

.shell.c28-consolidated .btn.danger,
.shell.c28-consolidated .btn.destructive,
.modal-backdrop .btn.danger,
.modal-backdrop .btn.destructive{
  background:#fff5f5!important;
  border:1px solid #ffcfd4!important;
  color:var(--c28-danger)!important;
}

.shell.c28-consolidated .btn.small,
.modal-backdrop .btn.small{
  min-height:32px!important;
  padding:0 10px!important;
  font-size:9px!important;
}

.shell.c28-consolidated .btn.mini,
.modal-backdrop .btn.mini{
  min-height:28px!important;
  padding:0 8px!important;
  font-size:8px!important;
}

/* ---------- CONTROLS ---------- */
.shell.c28-consolidated .control,
.shell.c28-consolidated input:not([type="checkbox"]):not([type="radio"]),
.shell.c28-consolidated select,
.shell.c28-consolidated textarea,
.modal-backdrop .control,
.modal-backdrop input:not([type="checkbox"]):not([type="radio"]),
.modal-backdrop select,
.modal-backdrop textarea{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  box-sizing:border-box!important;
  border:1px solid var(--c28-line)!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--c28-text)!important;
  font-size:10px!important;
  box-shadow:none!important;
}

.shell.c28-consolidated input:not([type="checkbox"]):not([type="radio"]),
.shell.c28-consolidated select,
.modal-backdrop input:not([type="checkbox"]):not([type="radio"]),
.modal-backdrop select{
  min-height:var(--c28-control-h)!important;
}

.shell.c28-consolidated textarea,
.modal-backdrop textarea{
  min-height:88px!important;
  padding:10px 11px!important;
  resize:vertical!important;
}

.shell.c28-consolidated .control:focus,
.shell.c28-consolidated input:focus,
.shell.c28-consolidated select:focus,
.shell.c28-consolidated textarea:focus,
.modal-backdrop .control:focus,
.modal-backdrop input:focus,
.modal-backdrop select:focus,
.modal-backdrop textarea:focus{
  outline:none!important;
  border-color:#8a7cf0!important;
  box-shadow:0 0 0 3px rgba(92,73,218,.12)!important;
}

.shell.c28-consolidated .field label,
.modal-backdrop .field label{
  display:block!important;
  margin:0 0 6px!important;
  color:#33415e!important;
  font-size:9px!important;
  font-weight:800!important;
}

/* ---------- PANELS / CARDS ---------- */
.shell.c28-consolidated .panel,
.shell.c28-consolidated .card,
.modal-backdrop .panel,
.modal-backdrop .card{
  border:1px solid var(--c28-line)!important;
  border-radius:var(--c28-radius-lg)!important;
  background:var(--c28-surface)!important;
  box-shadow:var(--c28-shadow-sm)!important;
}

.shell.c28-consolidated .panel-head,
.modal-backdrop .panel-head{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:12px 14px!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.shell.c28-consolidated .panel-body,
.modal-backdrop .panel-body{
  padding:14px!important;
}

/* ---------- BADGES ---------- */
.shell.c28-consolidated .badge,
.modal-backdrop .badge{
  min-height:24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 8px!important;
  border-radius:999px!important;
  font-size:8px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}

.shell.c28-consolidated .badge.blue,
.modal-backdrop .badge.blue{
  background:#eef0ff!important;
  color:#3a35a8!important;
}

.shell.c28-consolidated .badge.green,
.modal-backdrop .badge.green{
  background:#eaf8f2!important;
  color:#167653!important;
}

.shell.c28-consolidated .badge.red,
.modal-backdrop .badge.red{
  background:#fff0f1!important;
  color:#c62d3b!important;
}

.shell.c28-consolidated .badge.orange,
.modal-backdrop .badge.orange{
  background:#fff5e4!important;
  color:#a66500!important;
}

/* ---------- TABS ---------- */
.shell.c28-consolidated .tabs,
.modal-backdrop .tabs{
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.shell.c28-consolidated .tab,
.modal-backdrop .tab{
  flex:0 0 auto!important;
  min-width:max-content!important;
  min-height:40px!important;
  padding:0 12px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  background:transparent!important;
  color:#59657d!important;
  font-size:10px!important;
  font-weight:800!important;
}

.shell.c28-consolidated .tab.active,
.modal-backdrop .tab.active{
  color:var(--c28-primary)!important;
  border-bottom-color:var(--c28-primary)!important;
  background:#f2f0ff!important;
}

/* ---------- TABLES ---------- */
.shell.c28-consolidated .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  border:1px solid var(--c28-line)!important;
  border-radius:12px!important;
  background:#fff!important;
}

.shell.c28-consolidated .data-table,
.shell.c28-consolidated table{
  border-collapse:separate!important;
  border-spacing:0!important;
  width:100%!important;
}

.shell.c28-consolidated th{
  background:#f7f8fb!important;
  color:#526078!important;
  font-size:8px!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
}

.shell.c28-consolidated th,
.shell.c28-consolidated td{
  padding:10px 11px!important;
  border-bottom:1px solid #edf0f5!important;
}

.shell.c28-consolidated tbody tr:hover td{
  background:#fafbfe!important;
}

/* ---------- EMPTY / NOTICE / ERROR ---------- */
.shell.c28-consolidated .empty,
.shell.c28-consolidated .empty-state,
.shell.c28-consolidated .notice,
.modal-backdrop .empty,
.modal-backdrop .empty-state,
.modal-backdrop .notice{
  min-width:0!important;
  padding:18px!important;
  border-radius:12px!important;
  border:1px solid var(--c28-line)!important;
  background:#fafbfe!important;
  color:#66738b!important;
  font-size:10px!important;
  line-height:1.45!important;
}

.shell.c28-consolidated .notice.warning,
.modal-backdrop .notice.warning{
  background:#fff8eb!important;
  border-color:#f4ddb3!important;
  color:#8b5e00!important;
}

.shell.c28-consolidated .notice.error,
.modal-backdrop .notice.error{
  background:#fff3f4!important;
  border-color:#f2c8ce!important;
  color:#b12a37!important;
}

/* ---------- MODALS GLOBAL ---------- */
.modal-backdrop{
  backdrop-filter:blur(2px)!important;
  background:rgba(26,33,52,.58)!important;
}

.modal-backdrop .modal-head{
  padding:16px 20px!important;
  border-bottom:1px solid var(--c28-line)!important;
}

.modal-backdrop .modal-head h2{
  margin:0 0 4px!important;
  color:var(--c28-text)!important;
  font-size:20px!important;
  line-height:1.15!important;
}

.modal-backdrop .modal-head p{
  margin:0!important;
  color:var(--c28-muted)!important;
  font-size:10px!important;
}

/* ---------- UTILITY DENSITY ---------- */
.shell.c28-consolidated .muted,
.modal-backdrop .muted{
  color:var(--c28-muted)!important;
}

.shell.c28-consolidated .small,
.modal-backdrop .small{
  font-size:9px!important;
}

.shell.c28-consolidated .row{
  min-width:0!important;
}

/* ---------- RESPONSIVE COMPONENT SYSTEM ---------- */
@media(max-width:900px){
  :root{
    --c28-control-h:38px;
  }

  .shell.c28-consolidated .btn,
  .modal-backdrop .btn{
    min-height:38px!important;
    padding:0 11px!important;
  }

  .shell.c28-consolidated .panel-body,
  .modal-backdrop .panel-body{
    padding:12px!important;
  }
}

@media(max-width:640px){
  .shell.c28-consolidated .btn,
  .modal-backdrop .btn{
    width:100%!important;
    white-space:normal!important;
  }

  .shell.c28-consolidated .tabs,
  .modal-backdrop .tabs{
    gap:2px!important;
  }
}


/* ============================================================
   FRONT 28 1.3.3 — IDENTIFICAÇÃO DE VERSÃO / AMBIENTE
   ============================================================ */

.shell.c28-consolidated .brand-copy-new{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:4px!important;
}

.shell.c28-consolidated .brand-copy-new strong{
  display:block!important;
  color:#252772!important;
  font:800 15px/1.1 Manrope,Arial,sans-serif!important;
  letter-spacing:-.01em!important;
  white-space:nowrap!important;
}

.shell.c28-consolidated .c28-release-meta{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  min-width:0!important;
}

.shell.c28-consolidated .c28-release-meta span{
  color:#58647c!important;
  font:700 9px/1.2 Manrope,Arial,sans-serif!important;
  white-space:nowrap!important;
}

.shell.c28-consolidated .c28-release-meta em,
.shell.c28-consolidated .c28-env-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:18px!important;
  padding:0 6px!important;
  border:1px solid #f0cf91!important;
  border-radius:999px!important;
  background:#fff6e5!important;
  color:#9a6200!important;
  font:800 7px/1 Manrope,Arial,sans-serif!important;
  font-style:normal!important;
  letter-spacing:.055em!important;
  white-space:nowrap!important;
}

/* Em sidebar mais estreita, mantém a versão visível e evita estouro. */
@media(max-width:1180px){
  .shell.c28-consolidated .c28-release-meta{
    gap:4px!important;
  }
  .shell.c28-consolidated .c28-release-meta span{
    font-size:8px!important;
  }
  .shell.c28-consolidated .c28-release-meta em{
    padding:0 5px!important;
    font-size:6.5px!important;
  }
}

/* Sistema > Sobre */
.shell.c28-consolidated .c28-about-card{
  margin-top:16px!important;
}

.shell.c28-consolidated .c28-about-card .panel-head h3{
  margin:0 0 3px!important;
  color:#17213a!important;
  font-size:15px!important;
}

.shell.c28-consolidated .c28-about-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}

.shell.c28-consolidated .c28-about-grid>div{
  min-width:0!important;
  padding:11px 12px!important;
  border:1px solid #e2e7f1!important;
  border-radius:10px!important;
  background:#f9faff!important;
}

.shell.c28-consolidated .c28-about-grid span{
  display:block!important;
  margin-bottom:4px!important;
  color:#78849a!important;
  font-size:8px!important;
  font-weight:800!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
}

.shell.c28-consolidated .c28-about-grid strong{
  display:block!important;
  color:#1e2942!important;
  font-size:10px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}

@media(max-width:760px){
  .shell.c28-consolidated .c28-about-grid{
    grid-template-columns:1fr!important;
  }
}


/* ============================================================
   FRONT 28 1.3.4 — TAREFAS COMPARTILHADAS
   ============================================================ */
.shell.c28-consolidated .shared-task-chip{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  min-height:22px!important;
  margin-top:7px!important;
  padding:0 8px!important;
  border:1px solid #d8d2ff!important;
  border-radius:999px!important;
  background:#f1efff!important;
  color:#4c37bd!important;
  font-size:8px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.shell.c28-consolidated .board2100-card.has-shared-team,
.shell.c28-consolidated .task-card.has-shared-team{
  outline:1px solid rgba(100,75,220,.18)!important;
  box-shadow:
    inset 0 3px 0 rgba(100,75,220,.58),
    0 3px 10px rgba(30,42,90,.055)!important;
}
.shell.c28-consolidated .board2100-card.has-shared-team:hover,
.shell.c28-consolidated .task-card.has-shared-team:hover{
  outline-color:rgba(100,75,220,.34)!important;
}
@media(max-width:700px){
  .shell.c28-consolidated .shared-task-chip{
    white-space:normal!important;
    line-height:1.2!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
  }
}


/* ============================================================
   FRONT 28 1.4.0 — MODAL & RESPONSIVE STABILIZATION
   Camada FINAL e AUTORITATIVA de modais.
   ============================================================ */

:root{
  --c28-modal-gap:16px;
  --c28-modal-max:1180px;
  --c28-modal-wide-max:1320px;
}

/* ---------- HOST ---------- */
body > .modal-backdrop.c28-modal-system,
.c28-modal-system{
  position:fixed!important;
  inset:0!important;
  z-index:9999!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:var(--c28-modal-gap)!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:rgba(25,32,50,.58)!important;
  backdrop-filter:blur(2px)!important;
}

/* ---------- FRAME ---------- */
.c28-modal-system > .c28-modal-frame{
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  width:min(var(--c28-modal-max),calc(100vw - (var(--c28-modal-gap) * 2)))!important;
  max-width:calc(100vw - (var(--c28-modal-gap) * 2))!important;
  height:auto!important;
  max-height:calc(100dvh - (var(--c28-modal-gap) * 2))!important;
  min-width:0!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border-radius:16px!important;
  background:#fff!important;
  container-type:inline-size!important;
  container-name:c28modal140!important;
}

/* Wide families may use more horizontal space, but never overflow viewport. */
.c28-modal-system.c28-modal-generic-wide > .c28-modal-frame,
.c28-modal-system.c28-modal-nf-confirm > .c28-modal-frame,
.c28-modal-system.c28-modal-crm-detail > .c28-modal-frame,
.c28-modal-system.c28-modal-task-edit > .c28-modal-frame{
  width:min(var(--c28-modal-wide-max),calc(100vw - (var(--c28-modal-gap) * 2)))!important;
}

/* Short modal = natural height. Long modal = viewport-bounded. */
.c28-modal-system > .c28-modal-frame:has(.modal-body){
  height:min(900px,calc(100dvh - (var(--c28-modal-gap) * 2)))!important;
}

/* ---------- HEADER ---------- */
.c28-modal-system .modal-head{
  flex:0 0 auto!important;
  min-width:0!important;
  min-height:0!important;
  padding:15px 18px!important;
  border-bottom:1px solid var(--c28-line,#dfe4ef)!important;
  background:#fff!important;
}

.c28-modal-system .modal-head > div:first-child{
  min-width:0!important;
  flex:1 1 auto!important;
}

.c28-modal-system .modal-head h2{
  margin:0 0 4px!important;
  max-width:100%!important;
  font-size:20px!important;
  line-height:1.15!important;
  overflow-wrap:anywhere!important;
}

.c28-modal-system .modal-head p{
  margin:0!important;
  max-width:100%!important;
  font-size:10px!important;
  line-height:1.4!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* ---------- FORM / BODY / FOOTER ---------- */
.c28-modal-system .c28-modal-frame > form{
  flex:1 1 auto!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  overflow:hidden!important;
}

.c28-modal-system .modal-body{
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  padding:16px 18px!important;
  box-sizing:border-box!important;
}

.c28-modal-system .modal-actions{
  position:relative!important;
  inset:auto!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:11px 18px!important;
  box-sizing:border-box!important;
  border-top:1px solid var(--c28-line,#dfe4ef)!important;
  background:#fff!important;
  z-index:5!important;
}

/* ---------- ABSOLUTE WIDTH PROTECTION ---------- */
.c28-modal-system *,
.c28-modal-system *::before,
.c28-modal-system *::after{
  box-sizing:border-box;
}

.c28-modal-system .modal-body > *,
.c28-modal-system .form-grid,
.c28-modal-system .field,
.c28-modal-system .panel,
.c28-modal-system .panel-body,
.c28-modal-system .grid-2,
.c28-modal-system .stats,
.c28-modal-system .crm-opportunity-layout,
.c28-modal-system .crm-opportunity-main,
.c28-modal-system .crm-conversation{
  min-width:0!important;
  max-width:100%!important;
}

.c28-modal-system input:not([type="checkbox"]):not([type="radio"]),
.c28-modal-system select,
.c28-modal-system textarea,
.c28-modal-system input[type="file"]{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}

.c28-modal-system input[type="file"]{
  overflow:hidden!important;
}

/* ---------- GENERIC FORMS ---------- */
.c28-modal-system .form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:13px 14px!important;
  width:100%!important;
}

.c28-modal-system .form-grid > .field.full,
.c28-modal-system .form-grid > .span-2{
  grid-column:1/-1!important;
}

/* ---------- ACCORDIONS / DETAILS ---------- */
.c28-modal-system details.form-section{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0 0 11px!important;
  overflow:hidden!important;
  border:1px solid var(--c28-line,#dfe4ef)!important;
  border-radius:12px!important;
  background:#fff!important;
}

.c28-modal-system details.form-section > summary{
  min-width:0!important;
  min-height:48px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:11px 14px!important;
  background:#f7f8fb!important;
}

.c28-modal-system details.form-section > summary > *{
  min-width:0!important;
}

.c28-modal-system details.form-section > summary small{
  max-width:440px!important;
  white-space:normal!important;
  text-align:right!important;
  line-height:1.3!important;
  overflow-wrap:anywhere!important;
}

.c28-modal-system details.form-section:not([open]) > .form-grid{
  display:none!important;
}

.c28-modal-system details.form-section[open] > .form-grid{
  position:relative!important;
  height:auto!important;
  min-height:0!important;
  padding:14px!important;
}

/* ============================================================
   VARIANT: TASK EDIT
   ============================================================ */
.c28-modal-system.c28-modal-task-edit > .c28-modal-frame{
  --c28-task-aside:360px;
}

.c28-modal-system.c28-modal-task-edit .modal-layout{
  flex:1 1 auto!important;
  min-height:0!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(300px,var(--c28-task-aside))!important;
  overflow:hidden!important;
}

.c28-modal-system.c28-modal-task-edit .modal-layout > form{
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}

.c28-modal-system.c28-modal-task-edit .modal-aside{
  min-width:0!important;
  min-height:0!important;
  width:auto!important;
  max-width:none!important;
  overflow:auto!important;
}

/* ============================================================
   VARIANT: CRM DETAIL
   ============================================================ */
.c28-modal-system.c28-modal-crm-detail .crm-opportunity-layout{
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.45fr) minmax(320px,.85fr)!important;
  gap:16px!important;
  overflow:hidden!important;
}

.c28-modal-system.c28-modal-crm-detail .crm-opportunity-main{
  min-height:0!important;
  overflow:auto!important;
}

.c28-modal-system.c28-modal-crm-detail .crm-conversation{
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}

.c28-modal-system.c28-modal-crm-detail .crm-timeline{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}

/* ============================================================
   VARIANT: NF CONFIRM
   Identified by DOM fields, not by renderer class.
   ============================================================ */
.c28-modal-system.c28-modal-nf-confirm .modal-body{
  padding:16px 18px!important;
}

.c28-modal-system.c28-modal-nf-confirm details.form-section > .form-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

/* ============================================================
   CONTAINER BREAKPOINTS — ONE POLICY FOR ALL MODALS
   ============================================================ */

/* Medium modal: side panels fall below main content. */
@container c28modal140 (max-width:1050px){
  .modal-layout,
  .crm-opportunity-layout{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }

  .modal-aside,
  .crm-conversation{
    position:static!important;
    width:100%!important;
    max-width:100%!important;
    min-height:300px!important;
    max-height:none!important;
    overflow:visible!important;
    border-left:0!important;
    border-top:1px solid var(--c28-line,#dfe4ef)!important;
  }

  .crm-opportunity-main{
    overflow:visible!important;
  }
}

/* Narrow modal: every form becomes one column. */
@container c28modal140 (max-width:820px){
  .form-grid,
  details.form-section > .form-grid,
  .crm-kpis,
  .stats,
  .grid-2{
    grid-template-columns:1fr!important;
  }

  .form-grid > .field,
  .form-grid > .field.full,
  .form-grid > .span-2{
    grid-column:1!important;
  }

  details.form-section > summary{
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:4px!important;
  }

  details.form-section > summary small{
    max-width:none!important;
    text-align:left!important;
  }

  .crm-conversation-head{
    flex-direction:column!important;
    align-items:stretch!important;
  }

  .crm-comment-actions{
    grid-template-columns:1fr!important;
  }
}

/* Mobile/small notebook: actions stack, spacing tightens. */
@container c28modal140 (max-width:620px){
  .modal-head{
    padding:12px 13px!important;
  }

  .modal-head h2{
    font-size:17px!important;
  }

  .modal-body{
    padding:11px!important;
  }

  .modal-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    padding:10px 11px!important;
  }

  .modal-actions > *{
    width:100%!important;
    min-width:0!important;
    white-space:normal!important;
  }

  details.form-section[open] > .form-grid{
    padding:11px!important;
  }
}

/* ============================================================
   VIEWPORT FALLBACK
   Works even before container-query evaluation or on old browsers.
   ============================================================ */
@media(max-width:1100px){
  :root{
    --c28-modal-gap:10px;
  }

  .c28-modal-system > .c28-modal-frame{
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
    max-height:calc(100dvh - 20px)!important;
  }
}

@media(max-width:900px){
  .c28-modal-system .form-grid,
  .c28-modal-system details.form-section > .form-grid{
    grid-template-columns:1fr!important;
  }

  .c28-modal-system .form-grid > .field,
  .c28-modal-system .form-grid > .field.full,
  .c28-modal-system .form-grid > .span-2{
    grid-column:1!important;
  }
}

@media(max-width:640px){
  :root{
    --c28-modal-gap:5px;
  }

  .c28-modal-system > .c28-modal-frame{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;
    max-height:calc(100dvh - 10px)!important;
    border-radius:11px!important;
  }
}


/* ============================================================
   FRONT 28 1.4.2 — VERSION DISPLAY AUTHORITY
   ============================================================ */
.shell .sidebar .brand .brand-copy-new{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:3px!important;
  overflow:visible!important;
}
.shell .sidebar .brand .brand-copy-new>strong{
  display:block!important;
  color:#252772!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.shell .sidebar .brand .c28-release-meta{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  flex-wrap:wrap!important;
  max-width:145px!important;
}
.shell .sidebar .brand .c28-release-meta>span,
.shell .sidebar .brand .c28-brand-version-static{
  display:block!important;
  color:#59657d!important;
  font-size:8px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.shell .sidebar .brand .c28-release-meta>em,
.shell .sidebar .brand .c28-brand-env-static{
  display:inline-flex!important;
  align-items:center!important;
  min-height:15px!important;
  padding:0 5px!important;
  border:1px solid #efd494!important;
  border-radius:999px!important;
  background:#fff7e7!important;
  color:#956100!important;
  font-size:6.5px!important;
  font-weight:800!important;
  font-style:normal!important;
  line-height:1!important;
  letter-spacing:.045em!important;
  white-space:nowrap!important;
}


/* Mobile domain access remains available while the desktop rail is hidden. */
.shell.c28-consolidated .c28-mobile-domains{display:none!important}
@media(max-width:900px){
  .shell.c28-consolidated .c28-mobile-domains{
    display:grid!important;gap:6px!important;flex:0 0 auto!important;
    padding:10px!important;font:700 12px/1.4 Manrope,Arial,sans-serif!important;
    color:var(--c28-text,#17243b)!important;
  }
  .shell.c28-consolidated .c28-mobile-domains select{
    width:100%!important;min-width:0!important;min-height:44px!important;
    padding:8px!important;border:1px solid var(--c28-line,#d7def0)!important;
    border-radius:8px!important;background:var(--c28-surface,#fff)!important;
    color:var(--c28-text,#17243b)!important;font:inherit!important;
  }
  .shell.c28-consolidated .c28-mobile-domains select:focus-visible{
    outline:2px solid var(--c28-blue,#252772);outline-offset:2px;
  }
}


/* Fase 3: keep the native menu control and overlay at the drawer's 900px breakpoint.
   The legacy .mobile-head rule stops at 760px, leaving 761–900px without a control. */
@media(max-width:900px){
  .shell.c28-consolidated .topbar > .mobile-head[data-action="menu"]{
    display:grid!important;
    place-items:center;
    flex:0 0 auto;
  }
  #app > .mobile-overlay{
    display:none!important;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:210;
  }
  #app > .mobile-overlay.open{display:block!important}
}


/* A barra vertical reduz a área útil abaixo de 320px em telas de 320px.
   Permitir que o body acompanhe essa área, sem esconder conteúdo excedente. */
@media (max-width:360px){
  body{min-width:0!important;}
}
