/* ==========================================================================
   Central de Indicadores — folha de estilo
   Tokens extraídos do design original (Claude Design · "Painel otimizado
   Looker Studio"). As cores de série ficam em --c-* e são consumidas também
   pelo JS, via getComputedStyle, para pintar os SVGs.
   ========================================================================== */

:root {
  /* superfícies e tinta */
  --bg:            #f8f9fa;
  --surface:       #ffffff;
  --surface-2:     #f8f9fa;
  --surface-3:     #f6f7f9;
  --border:        #e3e5e8;
  --border-2:      #d6d9dd;
  --rule:          #f1f3f4;
  --grid:          #e8eaed;
  --axis:          #c6c9ce;
  --track:         #eceef1;

  --ink:           #1f2124;
  --ink-2:         #3c4043;
  --ink-3:         #5f6368;
  --ink-4:         #80868b;
  --ink-5:         #9aa0a6;

  /* paleta categórica — validada para CVD (ver README) */
  --c-accent:      #2f6bd8;
  --c-done:        #16a394;
  --c-warn:        #e8a33d;
  --c-bad:         #d1495b;
  --c-purple:      #7b61c9;
  --c-gray:        #9aa0a6;

  /* estados */
  --ok-fg:         #0f7a6d;  --ok-bg:      #e8f6f3;
  --warn-fg:       #b57614;  --warn-bg:    #fdf3e3;
  --bad-fg:        #b3303f;  --bad-bg:     #fbeced;

  --shadow-1:      0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2:      0 2px 8px rgba(15, 23, 42, .12);
  --shadow-3:      0 12px 40px rgba(15, 23, 42, .18);
  --radius:        8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: Roboto, "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Seções como .welcome/.drawer/.dash fixam `display` no seletor de classe,
   que no cascade vence a regra padrão do navegador pra `[hidden]` (mesma
   especificidade, mas origem "author" > "user agent"). Sem isto, `hidden`
   vira só um atributo decorativo nelas. */
[hidden] { display: none !important; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: #1b4fae; text-decoration: underline; }
svg { display: block; overflow: visible; }
table { border-collapse: collapse; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Barra superior ────────────────────────────────────────────── */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar__brand > div { min-width: 0; }
.logo {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: #eef3fd;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--c-accent);
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.topbar__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.topbar__sub   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Telas estreitas: menos respiro lateral e nada de rótulo cortado. */
@media (max-width: 560px) {
  .topbar { padding: 12px 14px; }
  .shell { padding: 14px 14px 40px; }
  .card { padding: 14px 14px 16px; }
  .welcome { padding: 24px 0; }
  .welcome__card { padding: 26px 20px; }
  .topbar__title { font-size: 14px; }
  .select { max-width: 150px; }
}

.pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot--live { background: var(--c-done); }

.select {
  font-family: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  max-width: 220px;
}

/* ── Botões ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, opacity .12s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #275cbb; }
.btn--ghost { background: var(--surface); color: var(--ink-2); border-color: var(--border-2); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn--lg { font-size: 13.5px; padding: 10px 18px; }
.btn--sm { font-size: 11.5px; padding: 5px 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.iconbtn {
  width: 30px; height: 30px;
  border: none; background: transparent;
  color: var(--ink-3);
  font-size: 22px; line-height: 1;
  border-radius: 6px; cursor: pointer;
  flex-shrink: 0;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }

.linkbtn {
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
  background: none; border: none; padding: 2px 0;
  cursor: pointer; text-decoration: underline;
}
.linkbtn:hover { color: var(--c-accent); }

/* ── Layout ────────────────────────────────────────────────────── */

.shell { max-width: 1376px; margin: 0 auto; padding: 16px 28px 48px; }
.dash  { display: flex; flex-direction: column; gap: 12px; }
#dashBody { display: flex; flex-direction: column; gap: 12px; }

.row { display: grid; gap: 12px; }
.row--2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1080px) { .row--2-1 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 16px 18px 18px;
  min-width: 0;
}
.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.card__title { font-size: 13.5px; font-weight: 600; }
.card__sub   { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.card__section {
  font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-4);
  margin: 22px 0 10px;
}

.chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 5px 11px;
  white-space: nowrap;
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend__item {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-3);
}
.legend--click .legend__item {
  cursor: pointer; border-radius: 999px; padding: 3px 8px; margin: -3px 0;
}
.legend--click .legend__item:hover { background: var(--bg); }
.legend__swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

.foot {
  font-size: 11px; color: var(--ink-5);
  text-align: center; padding: 14px 0 0; line-height: 1.6;
}

/* ── Barra de filtros ──────────────────────────────────────────── */

.filterbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; min-height: 32px;
}
.filterbar__label {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-4); margin-right: 2px;
}
.filterbar__chips { display: contents; }
.filterbar__hint { margin-left: auto; font-size: 11.5px; color: var(--ink-5); }
@media (max-width: 900px) { .filterbar__hint { display: none; } }

.fchip {
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: #fff; border: none; border-radius: 999px;
  padding: 6px 10px 6px 12px; cursor: pointer;
}
.fchip:hover { opacity: .88; }
.fchip__x { font-size: 14px; line-height: 1; opacity: .8; }

.schip {
  font-size: 12.5px; color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.clearall {
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-3); background: transparent; border: none;
  padding: 5px 4px; cursor: pointer; text-decoration: underline;
}

/* ── Avisos ────────────────────────────────────────────────────── */

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 28px 24px;
  display: flex; gap: 14px; align-items: flex-start;
}
.notice__icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--warn-bg); color: var(--warn-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.notice__title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.notice__text  { font-size: 13px; color: var(--ink-3); max-width: 640px; line-height: 1.5; }

.warn {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--warn-bg);
  border: 1px solid #f3e0bd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12.5px; color: #7a5310; line-height: 1.45;
  margin-bottom: 8px;
}
.warn__icon { font-weight: 700; flex-shrink: 0; }

/* ── KPIs ──────────────────────────────────────────────────────── */

.kpigrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 14px 16px 13px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 116px; min-width: 0;
  text-align: left; font-family: inherit;
  cursor: pointer;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.kpi:hover { box-shadow: var(--shadow-2); }
.kpi--static { cursor: default; }
.kpi--static:hover { box-shadow: var(--shadow-1); }
.kpi__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.kpi__label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-4); line-height: 1.35;
}
.kpi__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.kpi__value {
  font-size: 25px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  line-height: 1.15; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
}
.kpi__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.kpi__delta { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ── Barras de progresso ───────────────────────────────────────── */

.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.bar__head {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-2);
  margin-bottom: 6px; font-variant-numeric: tabular-nums;
}
.bar__stat { color: var(--ink-3); }

.people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
@media (max-width: 700px) { .people { grid-template-columns: 1fr; } }
.person {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; border-radius: 6px;
  padding: 4px 6px; margin: -4px -6px;
  border: none; background: none; font-family: inherit; text-align: left;
  width: calc(100% + 12px);
}
.person:hover { background: var(--surface-2); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg);
  font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.person__body { flex: 1; min-width: 0; }
.person__head {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; margin-bottom: 5px;
}
.person__name {
  font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person__stat { color: var(--ink-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ── Donut ─────────────────────────────────────────────────────── */

.donut { display: flex; align-items: center; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.donut__legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 150px; }
.donut__row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; cursor: pointer;
  border-radius: 5px; padding: 3px 5px; margin: -3px -5px;
  border: none; background: none; font-family: inherit; width: calc(100% + 10px);
}
.donut__row:hover { background: var(--surface-2); }
.donut__name {
  flex: 1; color: var(--ink-2); text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.donut__value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.donut__pct { color: var(--ink-4); font-variant-numeric: tabular-nums; width: 38px; text-align: right; }

/* ── Quadros ───────────────────────────────────────────────────── */

.boards { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.board {
  cursor: pointer; border-radius: 6px; padding: 6px; margin: -6px;
  border: none; background: none; font-family: inherit; text-align: left; width: calc(100% + 12px);
}
.board:hover { background: var(--surface-2); }
.board__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; margin-bottom: 8px;
}
.board__name { font-weight: 600; color: var(--ink); }
.board__stat { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.board__labels {
  display: flex; gap: 14px; margin-top: 8px;
  font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.boards__note {
  border-top: 1px solid var(--track);
  padding-top: 14px;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
}

/* ── Tabela ────────────────────────────────────────────────────── */

.tablewrap { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; font-size: 12.5px; min-width: 720px; }
.table th {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}
.table th.num { text-align: right; }
.table th.pctcol { width: 200px; }
.table td {
  padding: 10px; border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--bg); }
.table tbody tr.is-selected { background: #f6f8fc; }
.tcell { display: flex; align-items: center; gap: 9px; }
.tswatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.tname { font-weight: 500; }
.tbar { display: flex; align-items: center; gap: 10px; }
.tpct { font-variant-numeric: tabular-nums; color: var(--ink-3); width: 44px; text-align: right; flex-shrink: 0; }

/* ── Login ─────────────────────────────────────────────────────────
   Tela cheia própria: ocupa a viewport inteira, sem topbar nem shell,
   pra que nada do painel apareça antes da autenticação. */

.auth {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
  /* Wash sutil do accent no canto superior, sobre o cinza do app. */
  background:
    radial-gradient(1100px 520px at 50% -8%, #e7eefc 0%, rgba(231, 238, 252, 0) 62%),
    var(--bg);
}

.auth__card {
  width: 100%; max-width: 396px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  padding: 32px;
  display: flex; flex-direction: column;
  animation: authIn .22s ease;
}
@keyframes authIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .auth__card { animation: none; } }

.auth__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth__logo {
  width: 38px; height: 38px; border-radius: 9px;
  background: #eef3fd; color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: -.02em;
  flex-shrink: 0;
}
.auth__product { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.auth__org { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }

.auth__title { font-size: 19px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; }
.auth__text  { font-size: 13px; color: var(--ink-3); line-height: 1.5; margin: 0 0 22px; }

.authfield { display: block; margin-bottom: 14px; }
.authfield__label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.authfield__wrap { position: relative; display: block; }
.authfield__input {
  width: 100%;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  padding: 10px 12px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.authfield__wrap .authfield__input { padding-right: 74px; }
.authfield__input::placeholder { color: var(--ink-5); }
.authfield__input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 216, .14);
}
.authfield__input.is-error {
  border-color: var(--bad-fg);
  box-shadow: 0 0 0 3px rgba(179, 48, 63, .12);
}
.authfield__reveal {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px; cursor: pointer;
}
.authfield__reveal:hover { color: var(--ink); background: var(--surface-3); }

.auth__google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin: 0 0 4px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: #202124; text-decoration: none;
  background: #fff;
  border: 1px solid #dadce0; border-radius: 7px;
  padding: 10px 16px;
  transition: background .12s ease, box-shadow .12s ease;
}
.auth__google:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60,64,67,.15); }
.auth__google-icon { width: 18px; height: 18px; flex-shrink: 0; }

.auth__split {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 14px;
  color: var(--ink-5); font-size: 11.5px;
}
.auth__split::before, .auth__split::after {
  content: ''; flex: 1; height: 1px; background: var(--rule);
}

.auth__submit {
  width: 100%; margin-top: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: #fff; background: var(--c-accent);
  border: 1px solid transparent; border-radius: 7px;
  padding: 11px 16px; cursor: pointer;
  transition: background .12s ease, opacity .12s ease;
}
.auth__submit:hover:not(:disabled) { background: #275cbb; }
.auth__submit:disabled { opacity: .55; cursor: not-allowed; }

/* Reserva a altura da mensagem pra que o card não "pule" ao errar a senha. */
.auth__status {
  min-height: 17px;
  font-size: 12px; line-height: 1.4;
  margin: 12px 0 0; text-align: center;
}
.auth__status--ok   { color: var(--ok-fg); }
.auth__status--bad  { color: var(--bad-fg); }
.auth__status--busy { color: var(--ink-3); }

.auth__foot {
  font-size: 11.5px; color: var(--ink-5); line-height: 1.5;
  text-align: center; margin: 18px 0 0;
  padding-top: 16px; border-top: 1px solid var(--rule);
}

@media (max-width: 420px) {
  .auth { padding: 16px; align-items: flex-start; }
  .auth__card { padding: 26px 20px; }
}

/* ── Estados ───────────────────────────────────────────────────── */

.welcome { display: flex; justify-content: center; padding: 60px 0; }
.welcome__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 40px; max-width: 560px; text-align: center;
}
.welcome__icon {
  width: 48px; height: 48px; border-radius: 11px;
  background: #eef3fd; color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; margin: 0 auto 18px;
}
.welcome__title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 10px; }
.welcome__text  { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; margin: 0 0 22px; }
.welcome__note  { font-size: 11.5px; color: var(--ink-5); line-height: 1.6; margin: 20px 0 0; }

.loading { display: flex; flex-direction: column; align-items: center; padding: 80px 0; gap: 14px; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--c-accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
.loading__label { font-size: 13.5px; font-weight: 600; }
.loading__hint  { font-size: 12px; color: var(--ink-4); }

/* ── Tooltip ───────────────────────────────────────────────────── */

.tooltip {
  position: fixed; z-index: 60;
  background: #1f2124; color: #fff;
  font-size: 11.5px; line-height: 1.45;
  border-radius: 6px; padding: 7px 10px;
  pointer-events: none;
  box-shadow: var(--shadow-2);
  max-width: 260px;
  font-variant-numeric: tabular-nums;
}
.tooltip b { font-weight: 600; }
.tooltip__dim { color: #b6bbc2; }

/* ── Configurações (drawer) ────────────────────────────────────── */

.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .34);
  z-index: 40;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  z-index: 50;
  display: flex; flex-direction: column;
  animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  .overlay, .drawer { animation: none; }
}

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer__title { font-size: 15px; font-weight: 600; margin: 0; }
.drawer__sub   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.drawer__body  { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 26px; }
.drawer__foot  {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.fieldset { display: flex; flex-direction: column; gap: 14px; }
.fieldset--locked { opacity: .5; pointer-events: none; }
.fieldset__head { display: flex; align-items: flex-start; gap: 10px; }
.fieldset__title { font-size: 13px; font-weight: 600; }
.fieldset__sub   { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.fieldset__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.step {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); color: var(--ink-3);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.step.is-done { background: var(--ok-bg); color: var(--ok-fg); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field__hint  { font-size: 11.5px; color: var(--ink-4); line-height: 1.45; }
.field__inputwrap { position: relative; display: flex; }

.input {
  font-family: inherit; font-size: 13px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 6px; padding: 8px 10px;
  width: 100%;
}
.input:focus { border-color: var(--c-accent); outline: none; box-shadow: 0 0 0 3px rgba(47, 107, 216, .14); }
.input.is-error { border-color: var(--c-bad); }
select.input { cursor: pointer; }

.reveal {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 11px; font-weight: 600;
  color: var(--ink-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; cursor: pointer;
}
.reveal:hover { color: var(--ink); }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--c-accent); flex-shrink: 0; }
.check__hint { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-4); margin-top: 2px; line-height: 1.45; }

.status { font-size: 12px; line-height: 1.4; }
.status--ok   { color: var(--ok-fg); }
.status--bad  { color: var(--bad-fg); }
.status--busy { color: var(--ink-3); }

.boardlist {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px;
}
.boardlist__empty { font-size: 12px; color: var(--ink-4); padding: 10px; text-align: center; }
.boardlist__tools { display: flex; gap: 14px; }

.boardrow {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 5px; cursor: pointer;
}
.boardrow:hover { background: var(--surface-2); }
.boardrow input { accent-color: var(--c-accent); flex-shrink: 0; }
.boardrow__body { flex: 1; min-width: 0; }
.boardrow__name {
  font-size: 12.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.boardrow__meta { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.badge {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  border-radius: 3px; padding: 2px 5px; flex-shrink: 0;
}
.badge--scrum  { background: #eef3fd; color: var(--c-accent); }
.badge--kanban { background: var(--track); color: var(--ink-3); }

.swatches { display: flex; gap: 8px; }
.swatch {
  width: 30px; height: 30px; border-radius: 7px;
  border: 2px solid transparent; cursor: pointer;
  padding: 0; outline-offset: 3px;
}
.swatch.is-active { border-color: var(--ink); }

/* ── Hub de bases ──────────────────────────────────────────────── */

.hub { display: flex; flex-direction: column; gap: 20px; padding: 8px 0 24px; }
.hub__title { font-size: 22px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 6px; }
.hub__text { font-size: 13.5px; color: var(--ink-3); margin: 0; line-height: 1.5; }
.hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.hubcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  min-height: 168px;
}
.hubcard__main {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 16px 12px; text-align: left;
  border: none; background: none; font-family: inherit; cursor: pointer;
}
.hubcard__main:hover { background: var(--surface-2); }
.hubcard__mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: #e8f0fe; color: #1a73e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.hubcard__name { font-size: 15px; font-weight: 500; color: var(--ink); }
.hubcard__host { font-size: 12px; color: var(--ink-4); }
.hubcard__meta { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.hubcard__actions {
  display: flex; gap: 12px; padding: 8px 16px 12px;
  border-top: 1px solid var(--rule);
}
.hubcard--add {
  align-items: center; justify-content: center; gap: 6px;
  color: var(--ink-3); cursor: pointer; font-family: inherit;
  border-style: dashed;
}
.hubcard--add:hover { border-color: var(--c-accent); color: var(--c-accent); background: #f8fbff; }

/* ── Canvas Looker-like ────────────────────────────────────────── */

.ls-canvas {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  align-items: start;
}
.widget { min-width: 0; position: relative; }
.widget--full { grid-column: span 12; }
.widget--wide { grid-column: span 8; }
.widget--narrow { grid-column: span 4; }
.widget--half { grid-column: span 6; }
.widget--bare {
  background: transparent; border: none; box-shadow: none; padding: 0;
}
.widget__head { align-items: flex-start; }
.widget__head--kpi { justify-content: flex-end; padding: 0 0 8px; }
.widget__tools { display: flex; gap: 2px; flex-shrink: 0; }
.widget__tools .iconbtn { width: 26px; height: 26px; font-size: 14px; }
.widget-add {
  grid-column: span 12;
  min-height: 88px;
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-3);
  font-family: inherit; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
}
.widget-add:hover { border-color: var(--c-accent); color: var(--c-accent); }
.widget-add__plus {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
}

@media (max-width: 1080px) {
  .widget--wide, .widget--narrow, .widget--half { grid-column: span 12; }
}

.modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 23, 42, .34);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal__card {
  width: min(560px, 100%);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; max-height: min(80vh, 720px);
}
.modal__body { padding: 16px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.catalog { display: grid; gap: 8px; }
.catalog__item {
  text-align: left; font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.catalog__item:hover { border-color: var(--c-accent); background: #f8fbff; }
.catalog__item strong { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.catalog__item span { font-size: 12px; color: var(--ink-4); }
