/* Contrato visual compartilhado: painel, Studio e áreas de marketing. */
:root {
  --gestao-primary: #4264e9;
  --gestao-primary-hover: #304dcc;
  --gestao-background: #f5f7fb;
  --gestao-surface: #fff;
  --gestao-text: #192640;
  --gestao-muted: #56647c;
  --gestao-line: #e5eaf2;
  --gestao-sidebar-width: 16rem;
  --gestao-space: 1.5rem;
  --gestao-radius: .75rem;
  font-size: 16px;
}
.gestao-shell {
  --primary: var(--gestao-primary);
  --primary-dark: var(--gestao-primary-hover);
  --bg: var(--gestao-background);
  --surface: var(--gestao-surface);
  --text: var(--gestao-text);
  --muted: var(--gestao-muted);
  --line: var(--gestao-line);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-width: 0;
  margin: 0;
  padding-left: var(--gestao-sidebar-width);
  background: var(--gestao-background);
  color: var(--gestao-text);
  font: 1rem/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}
.gestao-shell *, .gestao-shell *::before, .gestao-shell *::after { box-sizing: border-box; }
.gestao-shell [hidden] { display: none !important; }
.gestao-shell .app-shell { display: block; width: 100%; min-width: 0; }
.gestao-shell .workspace { min-height: 100dvh; min-width: 0; display: flex; flex-direction: column; }
.gestao-shell > main, .gestao-shell .workspace > main {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: var(--gestao-space);
  flex: 1;
}
.gestao-shell main > *, .gestao-shell .workspace, .gestao-shell .page-head > *, .gestao-shell .gestao-page-heading > * { min-width: 0; max-width: 100%; }
.gestao-shell h1 { font-size: clamp(1.4rem, 1.15rem + .6vw, 1.85rem); font-weight: 720; line-height: 1.25; letter-spacing: -.035em; color: var(--gestao-text); overflow-wrap: anywhere; }
.gestao-shell h2 { font-size: 1.15rem; line-height: 1.4; letter-spacing: -.02em; }
.gestao-shell h3 { font-size: 1rem; line-height: 1.4; }
.gestao-shell p { line-height: 1.65; }
.gestao-shell .panel, .gestao-shell .card { border: 1px solid var(--gestao-line); border-radius: var(--gestao-radius); background: var(--gestao-surface); box-shadow: 0 4px 20px #19264004; }
.gestao-shell button, .gestao-shell input, .gestao-shell select, .gestao-shell textarea { font-family: inherit; }
.gestao-shell button, .gestao-shell .button { min-height: 44px; border-radius: .6rem; font-size: .85rem; line-height: 1.4; }
.gestao-shell button { cursor: pointer; }
.gestao-shell button:disabled { opacity: .55; cursor: wait; }
.gestao-shell input:not([type=checkbox]):not([type=radio]), .gestao-shell select, .gestao-shell textarea { min-height: 44px; border-radius: .6rem; border-color: #dbe2ed; background: #fff; color: var(--gestao-text); }
.gestao-shell :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #6f88ec; outline-offset: 3px; }
.gestao-shell :where(button, a) { -webkit-tap-highlight-color: transparent; }
.gestao-shell .gestao-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--gestao-sidebar-width);
  height: 100dvh;
  padding: 1.1rem .75rem;
  border-right: 1px solid var(--gestao-line);
  background: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
}
.gestao-shell .gestao-sidebar > .brand, .gestao-brand { display: flex; align-items: center; gap: .65rem; min-height: 48px; margin: 0 0 .8rem; padding: .3rem .4rem; text-decoration: none; color: var(--gestao-text); font-size: 1.1rem; font-weight: 750; flex-shrink: 0; }
.gestao-brand-symbol { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: var(--gestao-primary); color: #fff; font-size: 1.6rem; line-height: 1; }
.gestao-shell .gestao-sidebar > .nav-caption { display: none; }
.gestao-shell .gestao-sidebar nav { display: block; min-height: 0; min-width: 0; padding: .35rem .15rem .7rem; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: #cbd4e5 transparent; overscroll-behavior: contain; }
.gestao-nav-tools { padding: .1rem .15rem .5rem; flex-shrink: 0; }
.gestao-nav-search { position: relative; display: flex; align-items: center; gap: .5rem; }
.gestao-nav-search > svg { position: absolute; left: .65rem; width: 1rem; height: 1rem; color: var(--gestao-muted); pointer-events: none; }
.gestao-shell .gestao-nav-search input { width: 100%; min-width: 0; padding: .6rem .6rem .6rem 2.1rem; font-size: .85rem; border: 1px solid var(--gestao-line); background: var(--gestao-background); }
.gestao-group-actions { display: flex; gap: .35rem; margin-top: .35rem; }
.gestao-shell .gestao-group-actions button { flex: 1; min-width: 0; padding: .35rem .2rem; border: 0; background: transparent; color: var(--gestao-muted); font-size: .68rem; font-weight: 550; }
.gestao-search-status { margin: .2rem .3rem 0; color: var(--gestao-muted); font-size: .75rem; }
.gestao-search-status:empty { display: none; }
.gestao-nav-group { margin: .3rem 0 .7rem; }
.gestao-shell .gestao-group-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; gap: .5rem; padding: .6rem .55rem; border: 0; background: transparent; color: var(--gestao-muted); text-align: left; font-size: .65rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.gestao-group-toggle > svg { width: .9rem; height: .9rem; flex: none; }
.gestao-group-toggle[aria-expanded=true] > svg { transform: rotate(180deg); }
.gestao-nav-group[data-active=true] > .gestao-group-toggle { color: var(--gestao-primary); }
.gestao-nav-items { display: grid; gap: .2rem; }
.gestao-shell .gestao-sidebar nav a { display: flex; align-items: center; gap: .7rem; min-height: 44px; min-width: 0; padding: .65rem .7rem; border: 1px solid transparent; border-radius: .6rem; font-size: .8rem; font-weight: 550; line-height: 1.4; color: #56647c; text-decoration: none; }
.gestao-shell .gestao-sidebar nav a > svg { width: 1.15rem; height: 1.15rem; flex: none; }
.gestao-nav-label { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.gestao-shell .gestao-sidebar nav a[aria-current=page] { background: #eef2ff; color: #304dcc; border-color: #dce4ff; font-weight: 700; }
.gestao-sidebar .nav-count:empty { display: none; }
.gestao-shell .gestao-sidebar .sidebar-bottom, .gestao-sidebar-bottom { margin-top: auto; padding: .8rem .35rem 0; border-top: 1px solid var(--gestao-line); flex-shrink: 0; }
.gestao-shell .sidebar-bottom > a, .gestao-public-entry { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .3rem; font-size: .75rem; text-decoration: none; color: var(--gestao-muted); }
.gestao-shell .gestao-desktop-toggle { width: 100%; min-height: 36px; margin-bottom: .6rem; padding: .3rem; color: var(--gestao-muted); background: var(--gestao-background); border: 1px solid var(--gestao-line); }
.gestao-shell .gestao-menu-close, .gestao-shell .gestao-menu-toggle, .gestao-shell #menu-toggle { display: none; }
.gestao-shell .topbar, .gestao-shell-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1rem; min-height: 72px; padding: .8rem var(--gestao-space); border-bottom: 1px solid var(--gestao-line); background: #fff; }
.gestao-bar-left, .gestao-bar-actions { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; gap: .65rem; }
.gestao-bar-actions { margin-left: auto; }
.gestao-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; font-size: .8rem; color: var(--gestao-muted); }
.gestao-breadcrumb a { color: var(--gestao-muted); text-decoration: none; }
.gestao-breadcrumb strong { color: var(--gestao-text); font-weight: 650; overflow-wrap: anywhere; }
.gestao-session-status { min-width: 0; font-size: .75rem; color: var(--gestao-muted); overflow-wrap: anywhere; }
.gestao-shell-bar button { display: inline-flex; align-items: center; justify-content: center; padding: .5rem .8rem; border: 1px solid var(--gestao-line); background: #fff; color: var(--gestao-text); font-size: .8rem; }
.gestao-bar-actions > a { font-size: .8rem; color: var(--gestao-primary); }
.gestao-shell .footer, .gestao-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: auto; padding: 1rem var(--gestao-space); border-top: 1px solid var(--gestao-line); background: #fff; color: var(--gestao-muted); font-size: .7rem; }
.gestao-shell .gestao-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.gestao-shell .gestao-page-heading > .brand { display: none; }
.gestao-shell .gestao-page-heading nav { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.gestao-shell .gestao-page-heading .brand { margin-bottom: 0; }
.gestao-shell .gestao-area-note { padding: 1rem 0 0; margin-top: 1.5rem; background: transparent; color: var(--gestao-muted); font-size: .8rem; }
.gestao-availability { padding: 1rem; border: 1px solid #e9d9ac; background: #fff9e9; border-radius: .6rem; font-size: .85rem; line-height: 1.5; }
.gestao-availability a { text-decoration: underline; }
.gestao-shell-backdrop, .gestao-shell .sidebar-backdrop { position: fixed; inset: 0; z-index: 49; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: #1d2c4660; }
.gestao-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.gestao-skip-nav { margin: 0; padding: 0; height: 0; }
.gestao-skip-link { position: fixed; top: .5rem; left: 1rem; z-index: 100; padding: .75rem 1rem; border-radius: .5rem; background: #fff; color: var(--gestao-primary); transform: translateY(-200%); }
.gestao-skip-link:focus { transform: none; }
.gestao-shell [tabindex="0"]:focus-visible { outline: 3px solid #6f88ec; outline-offset: 3px; }
.gestao-shell main:focus { outline: none; }
@media (hover: hover) {
  .gestao-shell .gestao-sidebar nav a:hover, .gestao-shell .gestao-group-toggle:hover, .gestao-shell .gestao-group-actions button:hover { background: #f1f4fa; color: #304dcc; }
  .gestao-shell .gestao-sidebar nav a[aria-current=page]:hover { background: #e4eaff; }
  .gestao-shell .quiet-button:hover, .gestao-shell .secondary:hover, .gestao-shell-bar button:hover { background: #f1f4fa; border-color: #cbd6eb; }
  .gestao-shell .table-wrap tbody tr:hover, .gestao-shell .studio-table-wrap tbody tr:hover { background: #f8faff; }
}
@media (min-width: 901px) {
  .gestao-nav-collapsed { --gestao-sidebar-width: 5rem; }
  .gestao-nav-collapsed .gestao-sidebar .brand > span:not(.brand-symbol), .gestao-nav-collapsed .gestao-brand-name, .gestao-nav-collapsed .gestao-nav-tools, .gestao-nav-collapsed .gestao-group-toggle, .gestao-nav-collapsed .gestao-nav-label, .gestao-nav-collapsed .nav-count, .gestao-nav-collapsed .sidebar-bottom, .gestao-nav-collapsed .gestao-sidebar-bottom { display: none !important; }
  .gestao-nav-collapsed .gestao-sidebar > .brand, .gestao-nav-collapsed .gestao-brand { justify-content: center; padding: 0; }
  .gestao-nav-collapsed .gestao-sidebar nav a { justify-content: center; padding: .65rem; }
  .gestao-nav-collapsed .gestao-nav-group { padding-bottom: .5rem; border-bottom: 1px solid var(--gestao-line); }
  .gestao-nav-collapsed .gestao-nav-items[hidden] { display: grid !important; }
  .gestao-nav-collapsed .gestao-desktop-toggle svg { transform: rotate(180deg); }
}
@media (max-width: 900px) {
  .gestao-shell { --gestao-space: 1rem; padding-left: 0; }
  .gestao-shell .gestao-sidebar { width: min(20rem, calc(100vw - 1rem)); padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-101%); visibility: hidden; }
  .gestao-shell .gestao-sidebar.open { transform: none; visibility: visible; }
  .gestao-shell .gestao-menu-close { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; margin-bottom: .65rem; padding: .5rem; border: 1px solid var(--gestao-line); background: #fff; color: var(--gestao-text); }
  .gestao-shell .gestao-menu-toggle, .gestao-shell #menu-toggle { display: inline-flex; min-width: 44px; min-height: 44px; padding: .5rem; }
  .gestao-shell .gestao-menu-toggle svg { width: 1.2rem; height: 1.2rem; }
  .gestao-shell .gestao-desktop-toggle { display: none; }
  .gestao-shell .topbar, .gestao-shell-bar { min-height: 64px; padding-top: max(.5rem, env(safe-area-inset-top)); }
  .gestao-menu-open { overflow: hidden; }
  .gestao-shell .topbar-left, .gestao-bar-left { flex: 1 1 12rem; }
  .gestao-shell .breadcrumb { white-space: normal; overflow-wrap: anywhere; }
  .gestao-shell .topbar-actions { margin-left: auto; }
  .gestao-bar-actions { flex: 1 1 100%; width: 100%; flex-wrap: nowrap; justify-content: space-between; }
  .gestao-session-status { flex: 1 1 0; }
  .gestao-bar-actions > button, .gestao-bar-actions > a { flex: none; }
  .gestao-shell input:not([type=checkbox]):not([type=radio]), .gestao-shell select, .gestao-shell textarea { font-size: max(1rem, 16px); }
  .gestao-shell .footer, .gestao-footer { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .gestao-sidebar { transition: transform .18s ease; }
  .gestao-shell :where(button, a, input, select, textarea) { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  .gestao-group-toggle > svg { transition: transform .15s ease; }
  .gestao-shell main[aria-busy=false] #view > * { animation: gestao-appear .16s ease; }
  @keyframes gestao-appear { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .gestao-shell *, .gestao-shell *::before, .gestao-shell *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Paginação também deve caber com a fonte do navegador ampliada. */
.gestao-shell .pagination > div { display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.gestao-shell .pagination button { min-width: 0; max-width: 100%; }
/* Indicadores do Studio mantêm palavras inteiras nas duas colunas do celular. */
.gestao-shell .studio-stat strong { font-size: clamp(1.05rem, 1.8vw, 1.5rem); line-height: 1.25; }
.gestao-shell .studio-management #message:empty { display: none; }
.gestao-brand .brand-sub { display: block; margin-top: .1rem; color: var(--gestao-muted); font-size: .62rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
/* Operação central: tarefas, etapas, busca e visão consolidada. */
.ops-workspace{display:grid;gap:1.25rem;min-width:0}.ops-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:1rem;padding:1.25rem;background:#fff;border:1px solid var(--gestao-line);border-radius:var(--gestao-radius)}.ops-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem}.ops-filters>.ops-actions{grid-column:1/-1}.ops-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,21rem),1fr));align-items:start;gap:1rem}.ops-card{min-width:0;padding:1rem;border:1px solid var(--gestao-line);border-radius:var(--gestao-radius);background:#fff;overflow-wrap:anywhere}.ops-card h2{font-size:1rem;margin-bottom:.5rem}.ops-card p{margin:.6rem 0;font-size:.85rem}.ops-link{display:inline-flex;align-items:center;min-height:44px;color:var(--gestao-primary);font-size:.85rem;font-weight:650;overflow-wrap:anywhere}.ops-empty{padding:2rem;border:1px dashed var(--gestao-line);border-radius:var(--gestao-radius);color:var(--gestao-muted)}.ops-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(16rem,1fr);gap:1rem;overflow-x:auto;overscroll-behavior-x:contain;max-width:100%;padding-bottom:1rem}.ops-column{display:flex;flex-direction:column;gap:.75rem;min-width:0;padding:1rem;background:#edf1f8;border-radius:var(--gestao-radius)}.ops-column>h2{font-size:.9rem}.ops-pagination{display:flex;justify-content:space-between;flex-wrap:wrap;gap:1rem;font-size:.8rem;color:var(--gestao-muted)}.ops-pagination>div{display:flex;flex-wrap:wrap;gap:.5rem}.ops-saved{padding:.7rem 1rem;border:1px solid var(--gestao-line);border-radius:var(--gestao-radius);background:#fff}.ops-saved summary{cursor:pointer;min-height:44px;align-content:center;font-size:.85rem;font-weight:650}.ops-saved>.ops-actions{margin:.5rem 0}.ops-dialog{width:calc(100% - 2rem);max-width:36rem;max-height:90dvh;padding:1.5rem;border:1px solid var(--gestao-line);border-radius:var(--gestao-radius);color:var(--gestao-text);overflow-y:auto}.ops-dialog form{display:grid;gap:1rem;min-width:0}.ops-profile{padding:1.25rem}.ops-profile>.ops-card{margin:.6rem 0}.ops-profile p{overflow-wrap:anywhere}.gestao-personal-tools{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.gestao-personal-shortcuts{flex-shrink:0;max-height:10rem;overflow:auto;border-top:1px solid var(--gestao-line);font-size:.75rem}.gestao-personal-shortcuts summary{cursor:pointer;min-height:44px;align-content:center;padding:0 .6rem;font-weight:650;color:var(--gestao-muted)}.gestao-personal-shortcuts a{display:flex;min-height:44px;align-items:center;padding:.5rem .6rem;text-decoration:none;color:var(--gestao-primary);overflow-wrap:anywhere}.gestao-nav-collapsed .gestao-personal-shortcuts{display:none}@media(max-width:600px){.ops-board{grid-auto-flow:row;grid-auto-columns:initial;grid-template-columns:1fr}.ops-filters,.ops-profile{padding:1rem}}
.ops-workspace>.form-error:empty,.ops-dialog .form-error:empty{display:none}.ops-card>.chip+.chip{margin-left:.5rem}
.ops-workspace>button{justify-self:start}@media(max-width:900px){.gestao-bar-actions{flex-wrap:wrap}.gestao-personal-tools{min-width:0;flex:1 1 auto}.gestao-bar-actions>button{max-width:100%;white-space:normal}}
