/* Área do Cliente Tagawa — login + painel de campanha (simulação). Escopo: .tgw-app */
.tgw-app {
  --ink: #141416; --ink-2: #222327; --paper: #F6F5F1; --card: #FFFFFF; --rule: #E2E0DA; --rule-2: #EEECE6;
  --mute: #5E5E5A; --mute-2: #8A8984; --red: #CA0A36; --red-hot: #EA0A3F; --red-soft: #FBE7EC;
  --on: #141416; --off: #B9B6AE; --ok: #1F7A4D; --warn: #A45A00;
  --disp: 'Shippori Mincho B1', serif; --ui: 'Zen Kaku Gothic New', sans-serif;
  font: 400 15px/1.5 var(--ui); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
.tgw-app *, .tgw-app *::before, .tgw-app *::after { box-sizing: border-box; }
:where(.tgw-app) :where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
:where(.tgw-app) :where(ul, ol) { list-style: none; }
:where(.tgw-app) :where(a) { color: inherit; }
:where(.tgw-app) :where(button, input, select) { font: inherit; color: inherit; }
.tgw-app ::selection { background: var(--red); color: #fff; }
.tgw-app :focus-visible { outline: 2px solid var(--red-hot); outline-offset: 2px; }
.tgw-app .num { font-variant-numeric: tabular-nums; }
.tgw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Login ---------- */
.tgw-login { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); min-height: 100vh; }
.tgw-login__brand { background: var(--ink); color: #fff; padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; position: relative; overflow: hidden; }
.tgw-login__logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.tgw-login__logo img { width: 40px; height: 40px; }
.tgw-login__logo svg { width: 104px; height: auto; display: block; }
.tgw-login__title { font: 700 clamp(40px, 4.6vw, 72px)/1.06 var(--disp); letter-spacing: -0.02em; max-width: 12ch; text-wrap: balance; }
.tgw-login__lede { margin-top: 24px; font-size: 18px; line-height: 1.6; color: #B8B7B2; max-width: 44ch; }
.tgw-login__list { display: grid; gap: 14px; margin-top: 40px; }
.tgw-login__list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: #DAD9D4; font-size: 15px; }
.tgw-login__list svg { width: 22px; height: 22px; color: var(--red-hot); margin-top: 1px; }
.tgw-login__preview { position: absolute; right: -80px; bottom: -40px; width: 54%; opacity: .14; pointer-events: none; }
.tgw-login__foot { font-size: 13px; color: #8E8D88; }
.tgw-login__form-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vw, 96px) clamp(24px, 5vw, 72px); }
.tgw-login__form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.tgw-login__h { font: 700 32px/1.15 var(--disp); letter-spacing: -0.015em; }
.tgw-login__sub { color: var(--mute); margin-top: -8px; }
.tgw-field { display: flex; flex-direction: column; gap: 8px; }
.tgw-field label { font-size: 14px; font-weight: 700; }
.tgw-field input { height: 52px; padding: 0 16px; border: 1px solid var(--rule); background: var(--card); border-radius: 2px; transition: border-color 160ms; }
.tgw-field input:hover { border-color: var(--mute-2); }
.tgw-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,22,.08); }
.tgw-login__row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.tgw-check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.tgw-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.tgw-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tgw-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 22px; border: 0; border-radius: 2px; background: var(--red-hot); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: background-color 200ms; }
.tgw-btn:hover { background: var(--ink); }
.tgw-btn svg { width: 20px; height: 20px; }
.tgw-btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.tgw-sso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tgw-btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); height: 48px; justify-content: center; font-size: 14px; }
.tgw-btn--line:hover { background: var(--card); box-shadow: inset 0 0 0 1px var(--ink); }
.tgw-or { display: flex; align-items: center; gap: 12px; color: var(--mute-2); font-size: 13px; }
.tgw-or::before, .tgw-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.tgw-note { display: flex; gap: 10px; padding: 12px 14px; border: 1px dashed var(--red); color: var(--red); font-size: 13px; line-height: 1.45; }
.tgw-note svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.tgw-err { color: var(--red); font-size: 13px; min-height: 1em; }

/* ---------- Painel: estrutura ---------- */
.tgw-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.tgw-side { background: var(--ink); color: #D8D7D2; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.tgw-side__brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; text-decoration: none; }
.tgw-side__brand img { width: 34px; height: 34px; }
.tgw-side__brand svg { width: 88px; height: auto; display: block; }
.tgw-side__client { margin: 0 8px; padding: 14px; background: var(--ink-2); border-radius: 4px; display: flex; align-items: center; gap: 12px; }
.tgw-side__client img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 3px; padding: 6px; }
.tgw-side__client b { display: block; color: #fff; font-size: 14px; }
.tgw-side__client span { font-size: 12px; color: #9C9B96; }
.tgw-nav { display: flex; flex-direction: column; gap: 2px; }
.tgw-nav__h { padding: 0 12px; margin: 8px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7F7E79; }
.tgw-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 3px; text-decoration: none; font-size: 14px; font-weight: 500; color: #D8D7D2; transition: background-color 160ms, color 160ms; }
.tgw-nav a svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: .8; }
.tgw-nav a:hover { background: var(--ink-2); color: #fff; }
.tgw-nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }
.tgw-nav a[aria-current="page"] svg { color: var(--red); opacity: 1; }
.tgw-nav a .tgw-soon { margin-left: auto; font-size: 10px; font-weight: 700; color: #8E8D88; border: 1px solid #45454A; padding: 2px 6px; border-radius: 99px; }
.tgw-side__foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.tgw-side__foot a { color: #B8B7B2; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.tgw-side__foot a:hover { color: #fff; }
.tgw-side__foot svg { width: 16px; height: 16px; }

.tgw-main { min-width: 0; padding: 28px clamp(20px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 24px; }
.tgw-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.tgw-top__crumb { font-size: 13px; color: var(--mute); }
.tgw-top__h { font: 700 clamp(28px, 2.6vw, 38px)/1.1 var(--disp); letter-spacing: -0.015em; margin-top: 4px; }
.tgw-top__meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--mute); }
.tgw-live { display: inline-flex; align-items: center; gap: 8px; }
.tgw-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(31,122,77,.14); }
.tgw-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--rule); border-radius: 99px; background: var(--card); color: var(--ink); font-weight: 700; }
.tgw-user i { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }

.tgw-demo { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--red-soft); color: #7A0B26; font-size: 13px; border-radius: 3px; }
.tgw-demo svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* Filtros */
.tgw-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; }
.tgw-filter { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1 1 160px; }
.tgw-filter label { font-size: 12px; font-weight: 700; color: var(--mute); }
.tgw-filter select { height: 42px; padding: 0 36px 0 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141416' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; appearance: none; cursor: pointer; }
.tgw-filter select:hover { border-color: var(--mute-2); }
.tgw-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; height: 42px; }
.tgw-seg button { border: 0; background: var(--paper); padding: 0 14px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--mute); }
.tgw-seg button + button { border-left: 1px solid var(--rule); }
.tgw-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tgw-filters__reset { height: 42px; padding: 0 14px; border: 0; background: none; cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Cartões */
.tgw-card { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 20px; min-width: 0; }
.tgw-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tgw-card__h { font-size: 16px; font-weight: 700; }
.tgw-card__sub { font-size: 13px; color: var(--mute); }
.tgw-grid { display: grid; gap: 16px; }
.tgw-grid--kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tgw-grid--2 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.tgw-grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tgw-kpi { display: flex; flex-direction: column; gap: 6px; }
.tgw-kpi__k { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--mute); }
.tgw-kpi__k svg { width: 16px; height: 16px; color: var(--ink); }
.tgw-kpi__v { font: 700 30px/1.1 var(--ui); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tgw-kpi__d { font-size: 12px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.tgw-kpi__d.up { color: var(--ok); }
.tgw-kpi__d.down { color: var(--red); }
.tgw-kpi__d span { color: var(--mute-2); font-weight: 500; }
.tgw-kpi--hl { background: var(--ink); color: #fff; border-color: var(--ink); }
.tgw-kpi--hl .tgw-kpi__k, .tgw-kpi--hl .tgw-kpi__d span { color: #A7A6A1; }
.tgw-kpi--hl .tgw-kpi__k svg { color: var(--red-hot); }
.tgw-kpi--hl .tgw-kpi__d.up { color: #6FD3A2; }
.tgw-spark { height: 30px; margin-top: 4px; }
.tgw-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Funil */
.tgw-funnel { display: flex; flex-direction: column; gap: 4px; }
.tgw-fstep { display: grid; grid-template-columns: 110px minmax(0, 1fr) 96px; gap: 14px; align-items: center; }
.tgw-fstep__k { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tgw-fstep__k svg { width: 16px; height: 16px; color: var(--mute); }
.tgw-fstep__bar { height: 40px; position: relative; display: flex; justify-content: center; }
.tgw-fstep__fill { height: 100%; background: var(--ink); border-radius: 2px; min-width: 4px; transition: width 600ms cubic-bezier(.16,1,.3,1); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tgw-fstep:last-child .tgw-fstep__fill { background: var(--red-hot); }
.tgw-fstep__fill.is-narrow { color: var(--ink); justify-content: flex-start; overflow: visible; }
.tgw-fstep__fill.is-narrow span { margin-left: calc(100% + 8px); }
.tgw-fstep__v { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tgw-fstep__v small { display: block; font-size: 11px; font-weight: 500; color: var(--mute); }
.tgw-fconv { display: grid; grid-template-columns: 110px minmax(0, 1fr) 96px; gap: 14px; font-size: 11px; color: var(--mute); }
.tgw-fconv span { grid-column: 2; text-align: center; }
.tgw-fconv b { color: var(--ink); }

/* Gráficos */
.tgw-chart { width: 100%; }
.tgw-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.tgw-chart { min-height: 220px; }
.tgw-chart .ax { font: 500 11px var(--ui); fill: var(--mute); }
.tgw-chart .grid { stroke: var(--rule-2); }
.tgw-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--mute); margin-top: 12px; }
.tgw-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tgw-legend i.line { height: 3px; width: 14px; vertical-align: 3px; }
.tgw-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 12px; border-radius: 3px; font-size: 12px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0,0,0,.18); opacity: 0; transition: opacity 120ms; font-variant-numeric: tabular-nums; }
.tgw-tip b { display: block; font-size: 13px; margin-bottom: 2px; }

/* On × Off */
.tgw-split { display: flex; height: 14px; border-radius: 2px; overflow: hidden; margin: 6px 0 4px; }
.tgw-split span { display: block; height: 100%; }
.tgw-split__labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); }
.tgw-split__labels b { color: var(--ink); }
.tgw-onoff { display: grid; gap: 18px; }

/* Tabelas */
.tgw-table-wrap { overflow-x: auto; margin: 0 -20px -20px; }
.tgw-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tgw-table th { text-align: right; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--paper); }
.tgw-table td { text-align: right; padding: 12px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tgw-table th:first-child, .tgw-table td:first-child { text-align: left; padding-left: 20px; }
.tgw-table th:last-child, .tgw-table td:last-child { padding-right: 20px; }
.tgw-table tbody tr { transition: background-color 120ms; }
.tgw-table tbody tr:hover { background: var(--paper); }
.tgw-table tbody tr[data-dev] { cursor: pointer; }
.tgw-table tfoot td { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 0; }
.tgw-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--paper); border: 1px solid var(--rule); }
.tgw-tag--on::before, .tgw-tag--off::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.tgw-tag--on::before { background: var(--on); }
.tgw-tag--off::before { background: var(--off); }
.tgw-ch { display: flex; align-items: center; gap: 10px; }
.tgw-ch__bar { height: 6px; background: var(--rule-2); border-radius: 3px; width: 80px; overflow: hidden; }
.tgw-ch__bar i { display: block; height: 100%; background: var(--ink); }

/* VGV */
.tgw-vgv { display: flex; flex-direction: column; gap: 16px; }
.tgw-vgv__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
.tgw-vgv__name { font-weight: 700; font-size: 14px; }
.tgw-vgv__name small { display: block; font-weight: 500; font-size: 12px; color: var(--mute); }
.tgw-vgv__val { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.tgw-vgv__val b { display: block; font-size: 15px; }
.tgw-vgv__bar { grid-column: 1 / -1; height: 10px; background: var(--rule-2); border-radius: 2px; overflow: hidden; display: flex; }
.tgw-vgv__bar i { display: block; height: 100%; background: var(--ink); transition: width 600ms cubic-bezier(.16,1,.3,1); }
.tgw-vgv__bar i + i { background: var(--off); }
.tgw-vgv__total { display: flex; gap: 32px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.tgw-vgv__total div { font-size: 12px; color: var(--mute); }
.tgw-vgv__total b { display: block; font: 700 24px/1.15 var(--ui); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Fases de obra */
.tgw-phase { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.tgw-phase::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tgw-phase--pre { color: #7A5AF0; }
.tgw-phase--lan { color: var(--red); }
.tgw-phase--obr { color: var(--warn); }
.tgw-phase--pro { color: var(--ok); }

/* Peças */
.tgw-ads { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tgw-ad { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.tgw-ad img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; background: var(--rule-2); }
.tgw-ad b { font-size: 13px; }
.tgw-ad dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: var(--mute); font-variant-numeric: tabular-nums; }
.tgw-ad dd { color: var(--ink); font-weight: 700; text-align: right; }
.tgw-ad__rank { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }

/* Agenda */
.tgw-feed { display: flex; flex-direction: column; }
.tgw-feed li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); font-size: 13px; }
.tgw-feed li:last-child { border-bottom: 0; }
.tgw-feed i { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.tgw-feed i svg { width: 16px; height: 16px; }
.tgw-feed b { display: block; font-size: 14px; }
.tgw-feed span { color: var(--mute); }

.tgw-empty { padding: 40px; text-align: center; color: var(--mute); }

/* Topo do painel no celular */
.tgw-mtop { display: none; }

@media (max-width: 1279px) {
  .tgw-ads { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tgw-ads .tgw-ad:nth-child(5) { display: none; }
}
@media (max-width: 1119px) {
  .tgw-grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tgw-grid--2, .tgw-grid--half { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .tgw-shell { grid-template-columns: minmax(0, 1fr); }
  .tgw-side { display: none; }
  .tgw-mtop { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; }
  .tgw-mtop a { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
  .tgw-mtop img { width: 30px; height: 30px; }
  .tgw-mtop svg { width: 80px; height: auto; display: block; }
  .tgw-mnav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 20px; background: var(--ink); scrollbar-width: none; }
  .tgw-mnav a { flex: 0 0 auto; padding: 8px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #C9C8C3; text-decoration: none; }
  .tgw-mnav a[aria-current="page"] { background: #fff; color: var(--ink); }
  .tgw-login { grid-template-columns: minmax(0, 1fr); }
  .tgw-login__brand { padding: 28px 24px 40px; gap: 28px; }
  .tgw-login__list, .tgw-login__preview, .tgw-login__foot { display: none; }
  .tgw-login__lede { font-size: 16px; margin-top: 16px; }
}
@media (min-width: 1024px) { .tgw-mnav { display: none; } }
@media (max-width: 767px) {
  .tgw-main { padding: 20px 16px 48px; gap: 16px; }
  .tgw-filter { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .tgw-filters .tgw-seg { width: 100%; }
  .tgw-filters .tgw-seg button { flex: 1; }
  .tgw-kpi__v { font-size: 24px; }
  .tgw-fstep, .tgw-fconv { grid-template-columns: 80px minmax(0, 1fr) 70px; gap: 8px; }
  .tgw-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tgw-ads .tgw-ad:nth-child(n+5) { display: none; }
  .tgw-top__meta .tgw-user { display: none; }
  .tgw-sso { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tgw-app * { transition: none !important; animation: none !important; }
}

/* VGV em largura total */
.tgw-vgvwrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.tgw-vgvwrap .tgw-vgv__total { flex-direction: column; gap: 20px; padding: 0 32px 0 0; border-bottom: 0; border-right: 1px solid var(--rule); }
.tgw-vgv--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.tgw-seg button { white-space: nowrap; }
@media (max-width: 1023px) {
  .tgw-vgvwrap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tgw-vgvwrap .tgw-vgv__total { flex-direction: row; flex-wrap: wrap; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .tgw-vgv--grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .tgw-filters .tgw-filter:first-child, .tgw-filters .tgw-filter:has(.tgw-seg) { flex: 1 1 100%; }
  .tgw-kpi__d { flex-wrap: wrap; }
}

/* ---------- Login: números ilustrativos ---------- */
.tgw-lstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 40px; max-width: 560px; }
.tgw-lstat { background: var(--ink-2); border: 1px solid #34343A; border-radius: 4px; padding: 18px 18px 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.tgw-lstat__k { font-size: 13px; font-weight: 700; color: #A7A6A1; }
.tgw-lstat__v { font: 700 34px/1.1 var(--ui); letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.tgw-lstat__d { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #6FD3A2; }
.tgw-lstat__sp { display: block; width: calc(100% + 36px); height: 48px; margin: 10px -18px 0; }
.tgw-lstats__note { grid-column: 1 / -1; font-size: 11px; color: #7F7E79; }
@media (max-width: 1023px) {
  .tgw-lstats { margin-top: 24px; gap: 10px; }
  .tgw-lstat__v { font-size: 24px; }
  .tgw-lstat { padding: 14px 14px 0; }
  .tgw-lstat__sp { width: calc(100% + 28px); margin: 6px -14px 0; height: 36px; }
}

/* ---------- Jobs: kanban ---------- */
.tgw-btn--sm { height: 44px; padding: 0 16px; font-size: 14px; gap: 10px; justify-content: center; }
.tgw-btn--sm svg { width: 18px; height: 18px; }
.tgw-input { height: 42px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.tgw-input:focus { outline: none; border-color: var(--ink); }
.tgw-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity; }
.tgw-col { background: #EDEBE5; border-radius: 4px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; scroll-snap-align: start; transition: background-color 150ms, box-shadow 150ms; }
.tgw-col.is-over { background: #E4E1D9; box-shadow: inset 0 0 0 2px var(--ink); }
.tgw-col__head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.tgw-col__h { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tgw-col__h i { width: 10px; height: 10px; border-radius: 50%; }
.tgw-col__n { font-size: 12px; font-weight: 700; color: var(--mute); background: var(--card); border-radius: 99px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.tgw-col__hint { font-size: 12px; color: var(--mute); padding: 0 4px; }
.tgw-jcard { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: grab; text-align: left; width: 100%; font: inherit; color: inherit; box-shadow: 0 1px 2px rgba(20,20,22,.04); transition: box-shadow 160ms, transform 160ms; }
.tgw-jcard:hover { box-shadow: 0 6px 18px rgba(20,20,22,.08); }
.tgw-jcard.is-drag { opacity: .45; }
.tgw-jcard.is-new { animation: tgw-pop 700ms cubic-bezier(.16,1,.3,1); }
@keyframes tgw-pop { 0% { transform: scale(.96); box-shadow: 0 0 0 3px var(--red-hot); } 100% { transform: none; } }
.tgw-jcard__top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tgw-jcard__dev { font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.tgw-jcard__t { font-size: 15px; font-weight: 700; line-height: 1.35; }
.tgw-jcard__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--mute); }
.tgw-jcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tgw-jcard__meta svg { width: 14px; height: 14px; }
.tgw-jcard__meta .is-late { color: var(--red); font-weight: 700; }
.tgw-jcard__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--rule-2); }
.tgw-av { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.tgw-prio { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tgw-prio--alta { background: #FFF1DE; color: var(--warn); }
.tgw-prio--urgente { background: var(--red-soft); color: #9A0B2E; }
.tgw-prio--normal { background: var(--paper); color: var(--mute); }
.tgw-tipo { font-size: 11px; font-weight: 700; border: 1px solid var(--rule); border-radius: 99px; padding: 2px 8px; color: var(--ink-2); }
.tgw-prog { height: 4px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.tgw-prog i { display: block; height: 100%; background: var(--ink); }

/* Modal e gaveta */
.tgw-modal, .tgw-drawer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tgw-modal[hidden], .tgw-drawer[hidden] { display: none; }
.tgw-modal__bg { position: absolute; inset: 0; background: rgba(20,20,22,.48); }
.tgw-modal__box { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 48px); overflow: auto; background: var(--paper); border-radius: 4px; padding: 28px; box-shadow: 0 24px 64px rgba(0,0,0,.24); animation: tgw-in 280ms cubic-bezier(.16,1,.3,1); }
@keyframes tgw-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tgw-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.tgw-modal__h { font: 700 28px/1.15 var(--disp); letter-spacing: -0.015em; }
.tgw-icon-btn { width: 40px; height: 40px; border: 1px solid var(--rule); background: var(--card); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.tgw-icon-btn svg { width: 18px; height: 18px; }
.tgw-icon-btn:hover { border-color: var(--ink); }
.tgw-jform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tgw-field--full { grid-column: 1 / -1; }
.tgw-jform select, .tgw-jform textarea { padding: 12px 14px; border: 1px solid var(--rule); background: var(--card); border-radius: 2px; }
.tgw-jform select { height: 52px; }
.tgw-jform textarea { resize: vertical; line-height: 1.5; }
.tgw-jform input[type=file] { height: auto; padding: 12px; }
.tgw-jform select:focus, .tgw-jform textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,22,.08); }
.tgw-jform__actions { display: flex; justify-content: flex-end; gap: 12px; }
.tgw-drawer { justify-content: flex-end; padding: 0; }
.tgw-drawer__box { position: relative; width: min(520px, 100%); height: 100dvh; overflow: auto; background: var(--paper); padding: 28px; box-shadow: -16px 0 48px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 20px; animation: tgw-slide 300ms cubic-bezier(.16,1,.3,1); }
@keyframes tgw-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tgw-dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; font-size: 14px; }
.tgw-dl dt { color: var(--mute); }
.tgw-dl dd { font-weight: 700; }
.tgw-check-list { display: flex; flex-direction: column; gap: 8px; }
.tgw-check-list label { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.tgw-check-list input { width: 18px; height: 18px; accent-color: var(--ink); }
.tgw-hist li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.tgw-hist li span { color: var(--mute); }
.tgw-sec-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
@media (max-width: 767px) {
  .tgw-jform { grid-template-columns: minmax(0, 1fr); }
  .tgw-modal { padding: 0; align-items: stretch; }
  .tgw-modal__box { max-height: 100dvh; border-radius: 0; padding: 20px 16px; }
  .tgw-kanban { grid-auto-columns: 82%; }
  .tgw-top__meta .tgw-btn--sm { display: inline-flex; }
}
