/* ─────────────────────────────────────────────────────────────
   Skyone Console — Design System
   Tokens e componentes extraídos do Figma (Console 2026)
   ───────────────────────────────────────────────────────────── */

:root {
  /* brand */
  --brand-primary-800: #0a1bc9;   /* botões, tabs ativas */
  --brand-primary-900: #13239c;   /* tiles de ícone escuros */
  --bg-navy: #0b125b;             /* header */
  --secondary-500: #00b3fe;       /* badge de notificação */
  --bg-selected: #e8f3ff;         /* item ativo sidebar / tiles claros */
  --text-link: #3558ff;

  /* neutros */
  --text-primary: #212121;
  --text-title: #1a1a1a;
  --text-secondary: #616161;
  --text-secondary-70: rgba(97, 97, 97, 0.7);
  --text-disabled: #a0a8b8;
  --grey-300: #9e9e9e;
  --grey-600: #424242;
  --border-default: #c9d1dc;
  --border-input: #e0e0e0;
  --border-soft: #f3f4f6;
  --bg-subtle: #f5f7fa;
  --bg-page: #f3f4f6;
  --bg-muted-30: rgba(97, 97, 97, 0.3);
  --bg-muted-50: rgba(224, 224, 224, 0.5);
  --white: #ffffff;
  --grayscale-50: #f9fafb;

  /* estados (execuções) */
  --success: #1c7c44;
  --success-bg: #e6f6ec;
  --error: #c62828;
  --error-bg: #fdecea;
  --running: #8a5a00;
  --running-bg: #fff4d6;

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 15px;
  --r-2xl: 24px;
  --r-pill: 999px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); border: 0; background: none; cursor: pointer; }
input, select { font-family: var(--font); }

/* ── Ícones tintáveis (máscara CSS sobre os SVGs exportados do Figma) ── */
.ico {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--ico) no-repeat center / contain;
  mask: var(--ico) no-repeat center / contain;
}
.ico-20 { width: 20px; height: 20px; }
.ico-24 { width: 24px; height: 24px; }
.i-apps        { --ico: url("/static/skyone/icon-apps.svg"); }
.i-search      { --ico: url("/static/skyone/icon-search.svg"); }
.i-search-sm   { --ico: url("/static/skyone/icon-search-sm.svg"); }
.i-bell        { --ico: url("/static/skyone/icon-bell.svg"); }
.i-chevron     { --ico: url("/static/skyone/icon-chevron-down.svg"); }
.i-chevron-l   { --ico: url("/static/skyone/icon-chevron-left.svg"); }
.i-chevron-r   { --ico: url("/static/skyone/icon-chevron-right.svg"); }
.i-caret       { --ico: url("/static/skyone/icon-caret.svg"); }
.i-company     { --ico: url("/static/skyone/icon-company.svg"); }
.i-home        { --ico: url("/static/skyone/icon-home.svg"); }
.i-grid        { --ico: url("/static/skyone/icon-grid.svg"); }
.i-refresh     { --ico: url("/static/skyone/icon-refresh.svg"); }
.i-news        { --ico: url("/static/skyone/icon-news.svg"); }
.i-support     { --ico: url("/static/skyone/icon-support.svg"); }
.i-health      { --ico: url("/static/skyone/icon-health.svg"); }
.i-money       { --ico: url("/static/skyone/icon-money.svg"); }
.i-eye         { --ico: url("/static/skyone/icon-eye.svg"); }
.i-doc         { --ico: url("/static/skyone/icon-doc.svg"); }
.i-book        { --ico: url("/static/skyone/icon-book.svg"); }
.i-bookmark    { --ico: url("/static/skyone/icon-bookmark.svg"); }
.i-external    { --ico: url("/static/skyone/icon-external.svg"); }
.i-filter      { --ico: url("/static/skyone/icon-filter.svg"); }
.i-sort        { --ico: url("/static/skyone/icon-sort.svg"); }
.i-plus        { --ico: url("/static/skyone/icon-plus.svg"); }
.i-more-vert   { --ico: url("/static/skyone/icon-more-vert.svg"); }
.i-login       { --ico: url("/static/skyone/icon-login.svg"); }
.i-module      { --ico: url("/static/skyone/icon-module.svg"); }

/* ── Bandeira do Brasil (composição em camadas do Figma) ── */
.flag-br { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.flag-br img { position: absolute; display: block; }
.flag-br .f-base { inset: 0; width: 100%; height: 100%; }
.flag-br .f-v1 { inset: 19.57% 8.7%; width: 82.6%; height: 60.86%; }
.flag-br .f-v2, .flag-br .f-v3 { inset: 32.61%; width: 34.78%; height: 34.78%; }

/* ═══════════════════ HEADER (SkyHeader) ═══════════════════ */
.sky-header-wrap { padding: 8px 8px 8px; }
.sky-header {
  background: var(--bg-navy);
  border-radius: var(--r-md);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 8px 0 16px;
  color: var(--white);
}
.sky-header .h-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sky-header .h-logo { height: 19px; width: 98px; display: block; }
.sky-header .h-logo-badge {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sky-header .h-appname {
  font-size: 14px;
  line-height: 22px;
  color: #9aa0c3;
  white-space: nowrap;
}
.sky-header .h-right { display: flex; align-items: center; gap: 16px; }
.sky-header .h-bell { position: relative; display: flex; cursor: pointer; border-radius: var(--r-pill); }
.sky-header .h-bell:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sky-header .h-bell .dot {
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  border-radius: 100px;
  background: var(--secondary-500);
  box-shadow: 0 0 0 2px rgba(11, 18, 91, 0.9);
}
.sky-header .h-bell .dot[hidden] { display: none; }
.sky-header .h-profile {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
  border-radius: var(--r-pill);
  cursor: pointer;
  position: relative;
}
.sky-header .h-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  border: 1px solid #f6f8f9;
  background: var(--bg-selected);
  color: var(--brand-primary-800);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.h-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  padding: 4px;
  display: none;
  z-index: 50;
}
.h-menu.open { display: block; }
.h-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
  line-height: 18px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-primary);
}
.h-menu button:hover { background: var(--bg-subtle); }

/* ═══════════════════ LAYOUT ═══════════════════ */
.shell { display: flex; gap: 8px; padding: 0 8px 8px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════ SIDEBAR ═══════════════════ */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 8px;
}
.sb-nav { display: flex; flex-direction: column; padding-top: 4px; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
  min-height: 28px;
}
.sb-item .ico { color: var(--text-secondary); }
.sb-item:hover { background: var(--bg-subtle); }
.sb-item.active { background: var(--bg-selected); color: var(--text-link); }
.sb-item.active .ico { color: var(--text-link); }
.sb-item .spacer { flex: 1; }
.sb-item .ico.i-external { width: 16px; height: 16px; color: var(--text-secondary-70); }
.sb-section {
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  text-transform: uppercase;
  color: var(--text-secondary-70);
  padding: 12px 5px 8px;
}

/* ═══════════════════ SEÇÕES / CARDS ═══════════════════ */
.band { background: var(--white); border-radius: var(--r-sm); overflow: hidden; }
.band-header {
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.band-body { padding: 0 20px 20px; }

/* banner de boas-vindas */
.welcome {
  position: relative;
  border: 0.5px solid var(--border-default);
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  padding: 16px 24px;
  overflow: hidden;
}
.welcome .blob { position: absolute; pointer-events: none; height: 159px; width: 139px; }
.welcome .blob-l { left: -20px; top: -36px; transform: rotate(180deg) scaleY(-1); }
.welcome .blob-r { right: 4px; top: 6px; transform: scaleY(-1); }
.welcome h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.48px;
  color: var(--text-primary);
  position: relative;
}
.welcome p { font-size: 16px; line-height: 1.4; color: var(--text-secondary); margin-top: 8px; position: relative; }

/* cards-atalho (contadores) */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-card {
  border: 1px solid var(--border-input);
  border-radius: var(--r-lg);
  padding: 8px 16px 8px 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
}
.stat-card .tile {
  width: 46px; height: 46px;
  border-radius: 9.6px;
  background: var(--brand-primary-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card .val { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.stat-card .lbl { font-size: 12px; line-height: 18px; color: var(--text-secondary); }

/* módulos (cards de agente) */
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.module {
  position: relative;
  background: var(--white);
  border: 0.5px solid var(--border-default);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}
.module .tile {
  width: 54px; height: 54px;
  border-radius: var(--r-sm);
  background: var(--bg-selected);
  color: var(--brand-primary-800);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.module h3 { font-size: 20px; font-weight: 400; line-height: 1.2; color: var(--text-title); position: relative; z-index: 1; }
.module .desc { font-size: 14px; line-height: 18px; color: var(--text-secondary); position: relative; z-index: 1; }
.module .watermark {
  position: absolute;
  right: -45px;
  top: -50px;
  width: 200px;
  height: 200px;
  opacity: 0.05;
  color: var(--text-primary);
  z-index: 0;
}
.module .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}
.module .meta b { color: var(--text-primary); font-weight: 600; }
.module .actions { display: flex; align-items: center; gap: 12px; margin-top: auto; position: relative; z-index: 1; }

/* pills de status */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  padding: 2px 10px;
}
.pill-idle { background: var(--bg-muted-50); color: var(--text-secondary); }
.pill-running { background: var(--running-bg); color: var(--running); }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-error { background: var(--error-bg); color: var(--error); }
.pill .dot-anim {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ═══════════════════ BOTÕES (SkyButton) ═══════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 64px;
  background: var(--brand-primary-800);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  padding: 4px 10px;
  min-height: 32px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.btn .label { padding: 0 8px; }
.btn:hover { background: var(--brand-primary-900); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn .ico { color: var(--white); }
.btn-lg { min-height: 48px; padding: 10px 16px; font-size: 14px; font-weight: 700; line-height: 22px; }
.btn-ghost {
  background: transparent;
  color: var(--grey-600);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--bg-subtle); }

/* ═══════════════════ INPUTS ═══════════════════ */
.input-float {
  position: relative;
  width: 100%;
  min-height: 48px;
  background: var(--white);
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.15s ease;
}
.input-float:focus-within { border-color: var(--brand-primary-800); }
.input-float label {
  font-size: 14px;
  line-height: 16px;
  color: var(--text-secondary-70);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.12s ease;
  pointer-events: none;
}
.input-float input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-primary);
  width: 100%;
  margin-top: 12px;
}
.input-float:focus-within label,
.input-float.filled label {
  font-size: 10px;
  top: 8px;
  transform: none;
}
.input-plain {
  height: 32px;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  background: var(--white);
}
.input-plain:focus { border-color: var(--brand-primary-800); }

/* busca em pill (filtros) */
.search-pill {
  background: var(--bg-muted-50);
  border-radius: var(--r-pill);
  width: 220px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
}
.search-pill input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-primary);
  width: 100%;
}
.search-pill input::placeholder { color: var(--text-primary); }
.search-pill .ico { color: var(--text-secondary); }

/* checkbox (SkyCheckbox) */
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; color: var(--grey-300); }
.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 14px; height: 14px;
  border: 0.7px solid var(--grey-300);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.checkbox-row input[type="checkbox"]:checked {
  background: var(--brand-primary-800);
  border-color: var(--brand-primary-800);
}
.checkbox-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 3px; height: 7px;
  border: solid var(--white);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* toggle */
.toggle { position: relative; display: inline-block; width: 32px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--border-input);
  transition: background 0.15s ease;
  cursor: pointer;
}
.toggle .track::after {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .track { background: var(--brand-primary-800); }
.toggle input:checked + .track::after { transform: translateX(14px); }

/* ═══════════════════ PÁGINA DE TABELAS ═══════════════════ */
.title-page {
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-page .ico { color: var(--brand-primary-800); }
.title-page h1 { font-size: 16px; font-weight: 700; line-height: 26px; color: var(--text-primary); }

.tabs { display: flex; gap: 8px; align-items: center; padding: 0 12px; }
.tab {
  position: relative;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--text-secondary-70);
}
.tab.active { color: var(--brand-primary-800); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--brand-primary-800);
}

.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
}
.filters-bar .f-label { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--text-primary); }
.filters-bar .f-right { display: flex; align-items: center; gap: 8px; }
.filters-bar .divider { width: 1px; height: 20px; background: var(--border-input); }
.filters-bar .ico { color: var(--text-secondary); }

.table-wrap { padding: 16px 24px 0; overflow-x: auto; }
.sky-table { width: 100%; border-collapse: collapse; }
.sky-table th {
  text-align: left;
  padding: 4px 8px;
  height: 36px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sky-table th .th-inner { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.sky-table th .ico { color: var(--grey-300); }
.sky-table td {
  padding: 8px;
  height: 44px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.sky-table tbody tr:hover { background: var(--bg-subtle); }
.sky-table .cell-secondary { color: var(--text-secondary); font-weight: 400; }
.sky-table .cell-action { text-align: center; width: 44px; }
.sky-table .cell-action button.btn-icon {
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  color: var(--text-secondary);
}
.sky-table .cell-action button.btn-icon:hover { background: var(--bg-muted-50); }

.table-footer {
  background: var(--white);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  margin-top: 8px;
}
.table-footer .rows-label, .table-footer .range { font-size: 12px; line-height: 1.66; }
.table-footer .rows-label { color: var(--text-secondary); }
.table-footer .range { color: var(--text-primary); }
.table-footer select {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}
.table-footer .pg-btn {
  padding: 12px;
  border-radius: 48px;
  display: inline-flex;
  color: var(--text-secondary);
}
.table-footer .pg-btn:hover:not(:disabled) { background: var(--bg-muted-50); }
.table-footer .pg-btn:disabled { opacity: 0.35; cursor: default; }

/* ═══════════════════ CARDS DE AGENDAMENTO ═══════════════════ */
.sched-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 24px 24px;
}
.sched-card {
  border: 1px solid var(--border-input);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
}
.sched-card .sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sched-card .sc-title { font-size: 16px; font-weight: 600; line-height: 1.2; color: var(--text-primary); }
.sched-card .sc-summary {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--brand-primary-800);
  background: var(--bg-selected);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.sched-card .sc-summary.muted { color: var(--text-secondary); background: var(--bg-subtle); font-weight: 400; }
.sched-card .sc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}
.sched-card .sc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-secondary);
}
.sched-card .sc-foot b { color: var(--text-primary); font-weight: 600; }
.sched-card .sc-err { font-size: 11px; color: var(--error); }
@media (max-width: 1100px) {
  .sched-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════ CONSOLE DE LOGS ═══════════════════ */
.log-console {
  background: var(--bg-navy);
  border-radius: var(--r-sm);
  padding: 16px;
  height: 320px;
  overflow-y: auto;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: #dbe2ff;
}
.log-console .log-error { color: #ff9d9d; }
.log-console .log-warn { color: #ffd98a; }
.log-console .log-info { color: #dbe2ff; }

/* ═══════════════════ RELATÓRIO IA ═══════════════════ */
.report-view {
  border: 1px solid var(--border-input);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  background: var(--white);
}
.report-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.report-view .rpt-h {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 18px 0 6px;
}
.report-view .rpt-p {
  font-size: 13px;
  line-height: 20px;
  color: var(--grey-600);
  margin: 6px 0;
}
.report-view .rpt-ul {
  margin: 6px 0 6px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.report-view .rpt-ul li {
  font-size: 13px;
  line-height: 20px;
  color: var(--grey-600);
}
.report-view .rpt-ul li::marker { color: var(--brand-primary-800); }

/* ═══════════════════ MODAL ═══════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 91, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--r-md);
  width: 100%;
  max-width: 760px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
.modal .m-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}
.modal .m-head h2 { font-size: 16px; font-weight: 700; line-height: 26px; }
.modal .m-body { padding: 16px 20px 20px; overflow-y: auto; }

/* ═══════════════════ LOGIN ═══════════════════ */
.login-page {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.login-modal {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  max-width: 1552px;
  height: 776px;
  max-height: calc(100vh - 56px);
  padding: 12px;
  border-radius: var(--r-2xl);
}
.login-card {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: var(--white);
  border-radius: var(--r-md);
  padding: 80px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 55px;
  position: relative;
}
.login-card .flag-br { position: absolute; top: 24px; right: 24px; width: 20px; height: 20px; }
.login-inner {
  width: 100%;
  max-width: 420px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.login-icon-tile {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--bg-selected);
  color: var(--brand-primary-800);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-texts { display: flex; flex-direction: column; gap: 16px; padding: 0 16px; width: 100%; }
.login-texts h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: -0.56px;
  color: var(--text-title);
  text-align: center;
}
.login-texts p { font-size: 14px; line-height: 22px; color: var(--text-secondary); text-align: center; }
.login-error {
  font-size: 13px;
  line-height: 20px;
  color: var(--error);
  background: var(--error-bg);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  text-align: center;
  width: 100%;
}
.login-form { display: flex; flex-direction: column; gap: 40px; width: 100%; align-items: center; }
.login-fields { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; margin-top: 4px; }
.login-row .forgot { font-size: 14px; font-weight: 500; line-height: 22px; color: var(--grey-600); }
.login-note { font-size: 14px; line-height: 22px; color: var(--text-secondary); text-align: center; }
.login-note b { color: var(--brand-primary-800); font-weight: 500; }
.login-footer { font-size: 12px; line-height: 18px; color: var(--text-secondary-70); text-align: center; }
.login-illustration {
  width: 500px;
  max-width: 500px;
  height: 100%;
  flex-shrink: 0;
  border: 1px solid var(--border-input);
  border-radius: var(--r-md);
  overflow: hidden;
}
.login-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ═══════════════════ RESPONSIVO ═══════════════════ */
@media (max-width: 1200px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .login-illustration { display: none; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .module-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Usuários: convite por link ── */
.link-box { display: flex; gap: 8px; align-items: stretch; }
.link-box input {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  padding: 10px 12px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 8px;
  background: var(--bg-muted-50); color: var(--text-primary);
}
.link-box input:focus { outline: 2px solid var(--brand-primary-800); outline-offset: -1px; }
.m-hint { font-size: 12px; line-height: 18px; color: var(--text-secondary); }

/* ═══════════════════ TOAST ═══════════════════ */
.toast-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 420px; width: calc(100% - 48px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px 12px 16px;
  background: var(--white); border-radius: var(--r-md);
  border: 1px solid var(--border-soft); border-left: 4px solid var(--brand-primary-800);
  box-shadow: 0 8px 24px rgba(11, 18, 91, 0.16);
  animation: toast-in 0.18s ease-out;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-text { flex: 1; font-size: 13px; line-height: 19px; color: var(--text-primary); }
.toast-close {
  flex: none; border: 0; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 18px; color: var(--text-secondary); padding: 0 2px;
}
.toast-close:hover { color: var(--text-primary); }
.toast-out { opacity: 0; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* título de seção do relatório com ação (ex.: copiar Resumo executivo) */
.report-view .rpt-h-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.report-view .rpt-h-row .rpt-h { margin: 0; }
.report-view .rpt-copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; line-height: 16px; padding: 5px 10px;
  border: 1px solid var(--border-input); border-radius: 999px; background: var(--white);
  color: var(--brand-primary-800); cursor: pointer;
}
.report-view .rpt-copy:hover { background: var(--bg-subtle); }
.report-view .rpt-copy.done { color: var(--success); border-color: var(--success); }

/* ═══════════════════ NOTIFICAÇÕES (sino) ═══════════════════ */
.h-menu.h-notif { width: 380px; max-width: calc(100vw - 32px); padding: 0; overflow: hidden; cursor: default; text-align: left; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.h-menu.h-notif button.notif-link {
  display: inline; width: auto; padding: 2px 4px; border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 500; line-height: 16px; color: var(--brand-primary-800);
}
.h-menu.h-notif button.notif-link:hover { background: transparent; text-decoration: underline; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-empty { padding: 18px 14px; font-size: 12px; color: var(--text-secondary); text-align: center; }
.notif-item {
  display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  text-decoration: none; color: inherit;
}
.notif-item:last-child { border-bottom: 0; }
a.notif-item:hover { background: var(--bg-subtle); }
.notif-item.unread { background: var(--bg-selected); }
.notif-mark-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--running); }
.notif-error .notif-mark-dot { background: var(--error); }
.notif-body { min-width: 0; }
.notif-title { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-primary); }
.notif-detail { font-size: 12px; line-height: 17px; color: var(--text-secondary); margin-top: 2px; overflow-wrap: anywhere; }
.notif-time { font-size: 11px; line-height: 16px; color: var(--text-disabled); margin-top: 4px; }

/* ═══════════════════ DASHBOARD RS (iframe) ═══════════════════ */
.rs-frame-wrap { padding: 0 20px 20px; }
.rs-frame-wrap iframe {
  display: block; width: 100%; height: calc(100vh - 210px); min-height: 640px;
  border: 0; border-radius: var(--r-md); background: var(--bg-subtle);
}
#rs-updated { font-weight: 400; color: var(--text-secondary); }
