/* CogSecurityOps — tema Figma SecOps Hub */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 248px;
  --accent: #14b8a6;
  --accent-2: #0d9488;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #3b82f6;
  --success: #22c55e;
}

[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-elevated: #111827;
  --bg-card: #151d2e;
  --bg-hover: #1a2438;
  --border: #1f2a3d;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --sidebar-bg: #0d1220;
  --topbar-bg: #0b0f17;
  --input-bg: #111827;
  --shadow: 0 8px 32px rgba(0,0,0,.35);
  --kpi-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --sidebar-bg: #ffffff;
  --topbar-bg: #ffffff;
  --input-bg: #f8fafc;
  --shadow: 0 4px 20px rgba(15,23,42,.08);
  --kpi-shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; font-family: var(--font); }
.hidden { display: none !important; }
.ico { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* Buttons */
.btn {
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-sm);
  min-height: 38px;
  padding: 0 16px;
  font-weight: 600;
  font-size: .875rem;
  transition: .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-icon { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: var(--radius-sm); }
.btn-sm { min-height: 32px; font-size: .8rem; padding: 0 12px; }

/* Login */
.login { min-height: 100vh; position: relative; display: grid; place-items: center; padding: 24px; }
.login-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(20,184,166,.15), transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.1), transparent 40%), var(--bg); }
.login-wrap { position: relative; display: grid; grid-template-columns: 1fr 400px; gap: 48px; max-width: 900px; width: 100%; align-items: center; }
.login-brand { color: var(--text); }
.login-logo { width: 56px; height: 56px; margin-bottom: 20px; }
.login-brand h1 { font-size: 2.2rem; font-weight: 700; margin: 0 0 12px; letter-spacing: -.02em; }
.login-brand p { color: var(--text-muted); margin: 0; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 20px; font-size: 1.25rem; }
.login-card label { display: grid; gap: 6px; margin-bottom: 14px; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.login-card input { height: 42px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.login-card .btn-primary { width: 100%; margin-top: 8px; }
.login-card small { color: var(--text-dim); font-size: .78rem; }
.error { color: var(--danger); font-size: .85rem; min-height: 20px; margin-top: 8px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.shell.collapsed { grid-template-columns: 72px 1fr; }
.shell.collapsed .sidebar-brand div,
.shell.collapsed .nav-label,
.shell.collapsed .nav-item span:not(.badge),
.shell.collapsed .alert-summary,
.shell.collapsed .sidebar-footer .btn-ghost:first-of-type { display: none; }

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.brand-logo { width: 36px; height: 36px; }
.sidebar-brand strong { display: block; font-size: .92rem; font-weight: 600; letter-spacing: -.01em; }
.sidebar-brand small { color: var(--text-dim); font-size: .72rem; }
.nav-group { margin-bottom: 8px; }
.nav-label { display: block; padding: 8px 12px 4px; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: .15s ease;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: rgba(20,184,166,.12); border-color: rgba(20,184,166,.35); color: var(--accent); }
.nav-item.active .ico { fill: var(--accent); }
.badge { margin-left: auto; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.alert-summary { padding: 10px 12px; background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.alert-summary strong { display: block; font-size: .85rem; color: var(--danger); }
.alert-summary small { color: var(--text-dim); font-size: .75rem; }

/* Topbar */
.main-area { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.search-wrap {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 42px;
  color: var(--text-dim);
}
.search-wrap input { flex: 1; border: 0; background: transparent; color: var(--text); outline: none; height: 100%; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.api-pill { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(34,197,94,.15); color: var(--success); }
.api-pill.offline { background: rgba(245,158,11,.15); color: var(--warn); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  color: var(--text);
}
.avatar { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.user-meta { display: grid; text-align: left; line-height: 1.2; }
.user-meta strong { font-size: .82rem; font-weight: 600; }
.user-meta small { font-size: .72rem; color: var(--text-dim); }

/* Content */
.content { padding: 24px; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; }
.page-head-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.page-head-actions .btn { width: auto; justify-content: center; }
.dep-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.dep-head-actions-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-head h1 { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.subtitle { color: var(--text-muted); font-size: .9rem; margin: 4px 0 0; }
.page { display: none; }
.page.active { display: block; }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  box-shadow: var(--kpi-shadow);
}
.kpi span { color: var(--text-muted); font-size: .82rem; font-weight: 500; }
.kpi b { display: block; font-size: 2rem; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.02em; }
.kpi small { font-size: .78rem; }
.kpi small.up { color: var(--success); }
.kpi small.down { color: var(--danger); }
.kpi small.purple { color: #a855f7; }
.kpi-suffix { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); }
.kpi-icon { position: absolute; top: 16px; right: 16px; font-size: 1.1rem; opacity: .7; }
.kpi-teal { border-top: 3px solid var(--accent); }
.kpi-red { border-top: 3px solid var(--danger); }
.kpi-blue { border-top: 3px solid var(--info); }
.kpi-purple { border-top: 3px solid #a855f7; }
.kpi-warn { border-top: 3px solid var(--warn); }
.kpi-medium { border-top: 3px solid #eab308; }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }

.dep-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dep-export-menu {
  position: relative;
}
.dep-export-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dep-export-chevron {
  font-size: .72rem;
  opacity: .85;
  transition: transform .15s ease;
}
.dep-export-menu[data-open="true"] .dep-export-chevron {
  transform: rotate(180deg);
}
.dep-export-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.dep-export-menu[data-open="true"] .dep-export-dropdown {
  display: grid;
  gap: 4px;
}
.dep-export-option {
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.dep-export-option:hover,
.dep-export-option:focus-visible {
  outline: 0;
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent);
}
.dep-global-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dep-top-severity-kpis {
  margin-top: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.dep-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(11, 17, 32, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.dep-kpi-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}
.dep-kpi-value {
  display: block;
  margin: 8px 0 4px;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: #f8fafc;
}
.dep-kpi-hint {
  display: block;
  font-size: .76rem;
  color: rgba(148, 163, 184, 0.88);
}
.dep-kpi-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  opacity: .95;
}
.dep-kpi-total .dep-kpi-accent { background: linear-gradient(90deg, #a855f7, #c084fc); box-shadow: 0 0 18px rgba(168, 85, 247, 0.45); }
.dep-kpi-critical .dep-kpi-accent { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 18px rgba(239, 68, 68, 0.45); }
.dep-kpi-high .dep-kpi-accent { background: linear-gradient(90deg, #f97316, #fb923c); box-shadow: 0 0 18px rgba(249, 115, 22, 0.4); }
.dep-kpi-medium .dep-kpi-accent { background: linear-gradient(90deg, #eab308, #facc15); box-shadow: 0 0 18px rgba(234, 179, 8, 0.35); }
.dep-kpi-low .dep-kpi-accent { background: linear-gradient(90deg, #3b82f6, #60a5fa); box-shadow: 0 0 18px rgba(59, 130, 246, 0.35); }
.dep-kpi-total .dep-kpi-value { color: #e9d5ff; }
.dep-kpi-critical .dep-kpi-value { color: #fecaca; }
.dep-kpi-high .dep-kpi-value { color: #fed7aa; }
.dep-kpi-medium .dep-kpi-value { color: #fef08a; }
.dep-kpi-low .dep-kpi-value { color: #bfdbfe; }
.dep-top-projects {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dep-top-projects-head {
  margin-top: 4px;
}
.dep-top-projects-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
}
.dep-top-projects-sub {
  margin: 4px 0 0;
  font-size: .78rem;
  color: rgba(148, 163, 184, 0.88);
}
.dep-top-projects-toolbar {
  display: block;
}
.dep-recent-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 16px 14px;
  margin: 0;
  border-color: rgba(168, 85, 247, 0.22);
  background: linear-gradient(165deg, rgba(30, 27, 46, 0.98) 0%, rgba(15, 17, 28, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(168, 85, 247, 0.08);
}
.dep-recent-card.is-active {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.18), inset 0 1px 0 rgba(168, 85, 247, 0.12);
}
.dep-recent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.dep-recent-head h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: #f8fafc;
}
.dep-recent-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 50%;
  color: rgba(148, 163, 184, 0.85);
  font-size: .62rem;
  font-weight: 700;
  line-height: 1;
}
.dep-recent-sub {
  margin: 0 0 12px;
  font-size: .74rem;
  color: rgba(148, 163, 184, 0.88);
}
.dep-recent-gauge-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 10px;
}
.dep-recent-gauge-svg {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
}
.dep-recent-gauge-value {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 1.65rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1;
}
.dep-recent-gauge-label {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
}
.dep-recent-gauge-meta {
  margin: 2px 0 0;
  font-size: .72rem;
  color: rgba(148, 163, 184, 0.88);
  text-align: center;
}
.dep-recent-divider {
  height: 1px;
  margin: 12px 0 10px;
  background: rgba(148, 163, 184, 0.14);
}
.dep-recent-list-title {
  margin: 0 0 8px;
  font-size: .72rem;
  color: rgba(148, 163, 184, 0.88);
}
.dep-recent-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}
.dep-recent-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: calc(var(--radius-sm, 8px) - 2px);
  background: rgba(255, 255, 255, 0.03);
}
.dep-recent-list-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .72rem;
  color: rgba(226, 232, 240, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dep-recent-list-badge {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}
.dep-recent-list-empty {
  margin: 0 0 12px;
  font-size: .72rem;
  color: rgba(148, 163, 184, 0.72);
}
.dep-recent-action {
  width: 100%;
  margin-top: auto;
}
.dep-recent-action.is-active {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.14);
  color: #e9d5ff;
}
.dep-top-projects-filters {
  padding: 14px 16px;
  margin: 0;
}
.dep-top-projects-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.dep-top-projects-filters-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
}
.dep-top-projects-filters-chevron {
  display: inline-block;
  transition: transform .2s ease;
  color: var(--text-dim);
}
.dep-top-projects-filters-toggle[aria-expanded="false"] .dep-top-projects-filters-chevron {
  transform: rotate(-90deg);
}
.dep-top-projects-filters-summary {
  margin: 0;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
}
.dep-top-projects-filters-body {
  margin-top: 14px;
}
.dep-top-projects-filters-body.collapsed {
  display: none;
}
.dep-top-projects-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dep-top-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.dep-top-filter span {
  letter-spacing: .02em;
}
.dep-top-filter input,
.dep-top-filter select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
}
.dep-top-filter input:focus,
.dep-top-filter select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}
.dep-top-filter input[readonly] {
  cursor: default;
  color: var(--text-muted);
  background: var(--bg-hover);
}
.dep-top-filter input[readonly]:focus {
  border-color: var(--border);
  box-shadow: none;
}
.dep-top-filter-range {
  margin-top: 12px;
  padding-top: 2px;
}
.dep-top-filter-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dep-top-filter-range-head strong {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dep-top-min-age-value-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dep-top-min-age-input {
  width: 4.2rem;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--accent);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.dep-top-min-age-input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}
.dep-top-min-age-suffix {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-dim);
}
.dep-top-min-age-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.dep-min-age-preset {
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.dep-min-age-preset:hover {
  border-color: rgba(20, 184, 166, 0.35);
  color: var(--text);
}
.dep-min-age-preset.active {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent);
}
.dep-top-range-track {
  --dep-range-thumb: 20px;
  --dep-range-progress: 0%;
  position: relative;
  padding: 14px calc(var(--dep-range-thumb) / 2) 0;
  box-sizing: border-box;
  margin-top: 10px;
}
.dep-top-range-rail {
  position: absolute;
  left: calc(var(--dep-range-thumb) / 2);
  right: calc(var(--dep-range-thumb) / 2);
  top: 23px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  pointer-events: none;
  overflow: hidden;
}
.dep-top-range-fill {
  height: 100%;
  width: var(--dep-range-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.45), var(--accent));
  transition: width .12s ease;
}
.dep-top-filter-range input[type="range"] {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.dep-top-filter-range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
}
.dep-top-filter-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--dep-range-thumb);
  height: var(--dep-range-thumb);
  margin-top: -6px;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  cursor: grab;
}
.dep-top-filter-range input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.06);
}
.dep-top-filter-range input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border: 0;
}
.dep-top-filter-range input[type="range"]::-moz-range-thumb {
  width: var(--dep-range-thumb);
  height: var(--dep-range-thumb);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  cursor: grab;
}
.dep-top-range-ticks {
  position: relative;
  height: 28px;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: .7rem;
}
.dep-top-range-tick {
  position: absolute;
  top: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  cursor: pointer;
}
.dep-top-range-tick::before {
  content: "";
  display: block;
  width: 2px;
  height: 8px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  transition: background .15s ease, height .15s ease;
}
.dep-top-range-tick:hover {
  color: var(--text);
}
.dep-top-range-tick:hover::before {
  background: rgba(20, 184, 166, 0.65);
  height: 10px;
}
.dep-top-range-tick[data-min-age="0"] {
  left: 0;
  transform: none;
}
.dep-top-range-tick[data-min-age="30"] { left: calc(100% * 30 / 365); }
.dep-top-range-tick[data-min-age="90"] { left: calc(100% * 90 / 365); }
.dep-top-range-tick[data-min-age="180"] { left: calc(100% * 180 / 365); }
.dep-top-range-tick[data-min-age="365"] {
  left: 100%;
  transform: translateX(-100%);
}
.dep-top-range-tick.active {
  color: var(--accent);
  font-weight: 700;
}
.dep-top-range-tick.active::before {
  background: var(--accent);
  height: 10px;
}
.dep-top-projects-count {
  margin: 0;
  font-size: .78rem;
  color: var(--text-dim);
}
.dep-top-projects-filters-foot {
  margin-top: 10px;
}
.dep-top-projects-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.35);
}
.dep-top-projects-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.dep-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.96) 0%, rgba(10, 15, 28, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 6px 18px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.dep-project-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dep-project-head-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dep-project-rank {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.dep-project-title {
  margin: 0;
  min-width: 0;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.25;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dep-project-pl {
  margin: 0;
  min-width: 0;
  font-size: .74rem;
  line-height: 1.3;
  color: rgba(203, 213, 225, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dep-project-pl-label {
  margin-right: 5px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
}
.dep-project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 11px 14px 14px;
}
.dep-project-chart {
  min-height: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: calc(var(--radius-sm, 8px) - 2px);
  background: rgba(15, 23, 42, 0.55);
}
.dep-project-chart-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 100%;
}
.dep-project-pie-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}
.dep-project-pie-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.dep-project-pie-empty {
  fill: rgba(148, 163, 184, 0.75);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
}
.dep-project-chart-legend {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  justify-self: end;
  align-self: center;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  padding-left: 5px;
  font-size: .8rem;
  color: rgba(148, 163, 184, 0.92);
}
.dep-project-chart-legend-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.dep-project-chart-legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
}
.dep-project-chart-legend-value {
  font-size: .82rem;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.dep-project-chart-legend-empty {
  font-size: .8rem;
  color: rgba(148, 163, 184, 0.65);
  justify-self: end;
}
.dep-project-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dep-project-chart-dot-critical { background: #ef4444; }
.dep-project-chart-dot-high { background: #f97316; }
.dep-project-chart-dot-medium { background: #eab308; }
.dep-project-chart-dot-low { background: #3b82f6; }
.dep-project-meta-wrap {
  min-height: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: calc(var(--radius-sm, 8px) - 2px);
  background: rgba(11, 17, 32, 0.72);
}
.dep-project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0;
}
.dep-project-meta-item dd {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dep-project-meta-days {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.dep-project-meta-days.is-critical {
  color: #fecaca;
}
.dep-project-meta-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.22);
  color: #ef4444;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.dep-project-meta-item { min-width: 0; }
.dep-project-meta-item dt {
  margin: 0 0 2px;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.78);
}
.dep-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dep-trend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 12px;
  align-items: stretch;
}
.dep-evolution-row .dep-evolution-card {
  margin: 0;
  min-width: 0;
}
.dep-trend-card {
  padding: 14px 16px;
  margin: 0;
}
.dep-trend-card .card-head {
  margin-bottom: 8px;
  gap: 8px;
}
.dep-trend-card .chart-sub {
  margin: 2px 0 0;
}
.dep-content > .grid-2,
.dep-content > .card {
  margin-top: 0;
}

/* Cards & Grid */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Charts */
.chart-sub { color: var(--text-dim); font-size: .78rem; margin: -8px 0 16px; }
.line-chart { height: 180px; position: relative; }
.line-chart svg { width: 100%; height: 100%; }
.line-chart .chart-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: .72rem; color: var(--text-dim); }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut-ring { width: 120px; height: 120px; border-radius: 50%; position: relative; }
.donut-ring::after { content: ""; position: absolute; inset: 22px; background: var(--bg-card); border-radius: 50%; }
.sg-donut-ring { position: relative; }
.sg-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.sg-donut-center strong { font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1; }
.sg-donut-center small { font-size: .68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.donut-legend { width: 100%; display: grid; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.donut-legend-item strong { margin-left: auto; }
.donut-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding-top: 20px; }
.chart-bar { flex: 1; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 6px 6px 0 0; min-height: 20px; position: relative; }
.chart-bar span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--text-dim); }
.risk-donut { display: grid; gap: 10px; }
.risk-row-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.risk-dot { width: 10px; height: 10px; border-radius: 999px; }
.risk-bar { flex: 1; height: 8px; background: var(--bg-hover); border-radius: 999px; overflow: hidden; }
.risk-bar div { height: 100%; border-radius: 999px; }

/* Feed & Shortcuts */
.feed .feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .85rem; align-items: flex-start; }
.feed-item .feed-ico { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: .9rem; flex-shrink: 0; background: var(--bg-hover); }
.feed-item .dot { width: 8px; height: 8px; border-radius: 999px; margin-top: 6px; flex-shrink: 0; }
.feed-item strong { display: block; font-weight: 600; }
.feed-item small { color: var(--text-dim); }
.feed-item .feed-time { margin-left: auto; color: var(--text-dim); font-size: .75rem; white-space: nowrap; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.shortcut { background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: left; color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.shortcut-ico { font-size: 1rem; }
.shortcut:hover { border-color: var(--accent); color: var(--accent); }
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 999px; border: 2px solid var(--bg-card); }
.next-delivery { padding: 14px; background: var(--bg-hover); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.next-delivery p { margin: 4px 0; font-size: .9rem; }
.next-delivery small { color: var(--text-dim); }

/* Tables */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table-scroll .data-table { min-width: 1600px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.data-table th { background: var(--bg-hover); color: var(--text-muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.projects-table td.ok { background: rgba(34,197,94,.15); color: var(--success); }
.projects-table td.warn { background: rgba(245,158,11,.15); color: var(--warn); }
.projects-table td.risk { background: rgba(239,68,68,.2); color: var(--danger); font-weight: 700; text-align: center; }
.projects-table td.muted { background: var(--bg-hover); color: var(--text-dim); }

/* Projects — card view */
.projects-page { display: grid; gap: 16px; }
.projects-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.projects-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.projects-sub { margin: 4px 0 0; color: var(--text-muted); font-size: .88rem; }
.projects-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 14px 16px; }
.projects-toolbar input { flex: 1; min-width: 220px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; background: var(--input-bg); color: var(--text); }
.projects-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.proj-filter {
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: .15s ease;
}
.proj-filter:hover { border-color: var(--accent); color: var(--text); }
.proj-filter.active { border-color: var(--accent); background: rgba(20,184,166,.12); color: var(--accent); }
.projects-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.projects-summary .kpi { padding: 14px 16px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.project-card:hover { border-color: rgba(20,184,166,.35); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.project-card.open { border-color: rgba(20,184,166,.4); }
.project-card-toggle {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  position: relative;
}
.project-card-toggle:hover .project-name { color: var(--accent); }
.project-expand-hint {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 600;
}
.project-chevron { font-size: .85rem; transition: color .15s ease; }
.project-card.open .project-expand-hint { color: var(--accent); }
.project-card-body {
  display: none;
  grid-template-rows: auto;
  gap: 14px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed var(--border);
}
.project-card.open .project-card-body { display: grid; }
.project-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-client {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  text-decoration: none;
}
.project-client:hover { text-decoration: underline; }
.project-client.no-link { color: var(--text-muted); pointer-events: none; }
.project-name { margin: 6px 0 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; word-break: break-word; }
.project-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.project-status.setup { background: rgba(59,130,246,.15); color: var(--info); }
.project-status.dev { background: rgba(34,197,94,.15); color: var(--success); }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.project-assign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.project-field { display: grid; gap: 4px; }
.project-field label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.project-field select,
.project-field input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: .82rem;
}
.project-field select:disabled,
.project-field input:disabled { opacity: .75; cursor: default; }
.project-security { display: grid; gap: 8px; }
.project-security-head { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--text-dim); }
.project-security-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.proj-sec-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  text-align: center;
}
.proj-sec-label {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--text-dim);
  line-height: 1.2;
}
.proj-sec-value { font-size: .78rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.proj-sec-cell.ok { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.35); }
.proj-sec-cell.ok .proj-sec-value { color: var(--success); }
.proj-sec-cell.warn { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35); }
.proj-sec-cell.warn .proj-sec-value { color: var(--warn); }
.proj-sec-cell.risk { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.4); }
.proj-sec-cell.risk .proj-sec-value { color: var(--danger); }
.proj-sec-cell.muted { background: var(--bg-hover); border-color: var(--border); }
.proj-sec-cell.muted .proj-sec-value { color: var(--text-dim); font-weight: 600; }
.proj-sec-chip {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.proj-sec-chip.ok { background: rgba(34,197,94,.12); color: var(--success); }
.proj-sec-chip.warn { background: rgba(245,158,11,.12); color: var(--warn); }
.proj-sec-chip.risk { background: rgba(239,68,68,.15); color: var(--danger); }
.proj-sec-chip.muted { background: var(--bg-hover); color: var(--text-dim); }
.project-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; color: var(--text-dim); }
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.projects-empty h3 { margin: 0 0 8px; color: var(--text); }

/* Pills */
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.pill.ok { background: rgba(34,197,94,.15); color: var(--success); }
.pill.warn { background: rgba(245,158,11,.15); color: var(--warn); }
.pill.info { background: rgba(59,130,246,.15); color: var(--info); }
.pill.risk { background: rgba(239,68,68,.15); color: var(--danger); }
.pills { display: flex; gap: 8px; }
.warn-pill { color: var(--warn); font-weight: 600; }

/* Toolbar & Lists */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input, .toolbar select { height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar label { display: grid; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--text-muted); margin: 0; }
.data-list .row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; font-size: .85rem; }
.data-list .row.head { color: var(--text-dim); font-size: .72rem; text-transform: uppercase; font-weight: 600; }
.risk-row { background: rgba(239,68,68,.06); }
.cost-total { text-align: right; margin-top: 16px; font-size: 1.1rem; }
.cost-filters-panel { margin-bottom: 16px; }
.cost-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cost-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.cost-filters-grid label { display: grid; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.cost-filters-grid input[type="search"] {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--text);
}
.cost-service-chips { margin-top: 12px; }
.cost-service-chip i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}
.cost-explorer-card { margin-bottom: 16px; overflow: hidden; }
.cost-explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}
.cost-explorer-main { min-width: 0; }
.cost-explorer-subtitle { margin-top: 20px; margin-bottom: 8px; font-size: 1rem; }
.cost-explorer-chart {
  min-height: 380px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  padding: 8px;
}
.cost-explorer-chart svg { display: block; width: 100%; min-width: 760px; height: auto; }
.cost-explorer-bars {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
}
.cost-service-total-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 2fr) auto;
  gap: 12px;
  align-items: center;
}
.cost-service-total-label { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-service-total-track {
  height: 14px;
  background: rgba(148,163,184,.15);
  border-radius: 999px;
  overflow: hidden;
}
.cost-service-total-fill { height: 100%; border-radius: 999px; min-width: 2px; }
.cost-service-total-value { font-size: .82rem; white-space: nowrap; }
.cost-explorer-aside {
  border-left: 1px solid var(--border);
  padding-left: 16px;
  max-height: 760px;
  overflow-y: auto;
}
.cost-explorer-legend-block + .cost-explorer-legend-block { margin-top: 18px; }
.cost-explorer-legend-block h4 {
  margin: 0 0 10px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.cost-interactive-legend { display: grid; gap: 6px; }
.cost-legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.cost-legend-item:hover { background: rgba(148,163,184,.08); border-color: var(--border); }
.cost-legend-item.active { background: rgba(20,184,166,.08); border-color: rgba(20,184,166,.25); }
.cost-legend-item.muted { opacity: .45; }
.cost-legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.cost-legend-item span {
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cost-legend-item strong { font-size: .74rem; color: var(--text-muted); }
.cost-axis-title { fill: var(--text-dim); font-size: 11px; }
.cost-account-card { margin-bottom: 16px; }
.cost-daily-card { margin-bottom: 16px; }
.external-cost-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.8fr .7fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.external-cost-grid > span:first-child { display: grid; gap: 2px; }
.external-cost-grid small { color: var(--text-dim); font-size: .72rem; }
#externalCostList { overflow-x: auto; }
.external-cost-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
}
.external-cost-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 600;
}
.external-cost-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.external-cost-chart { min-height: 360px; overflow-x: auto; }
.external-cost-chart svg { display: block; width: 100%; min-width: 720px; }
.external-cost-grid-lines line { stroke: var(--border); stroke-width: 1; }
.external-cost-grid-lines text,
.external-cost-axis-labels text {
  fill: var(--text-dim);
  font-family: Inter, sans-serif;
  font-size: 11px;
}
.external-cost-chart circle { stroke: var(--bg-card); stroke-width: 1.5; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .84rem; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.doc-panel { display: none; }
.doc-panel.active { display: block; }

/* Trilha de Sec */
.trilha-progress { margin-bottom: 16px; }
.trilha-progress-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.trilha-progress-head h3 { margin: 0; font-size: 1rem; }
.trilha-progress-head p { margin: 4px 0 0; color: var(--text-muted); font-size: .85rem; }
.trilha-pct { font-size: 1.5rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.trilha-bar { height: 8px; background: var(--bg-hover); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.trilha-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.trilha-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.trilha-legend-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); }
.trilha-legend-item strong { color: var(--text); }
.trilha-tracks { display: grid; gap: 12px; }
.track-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.track-header { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; cursor: pointer; }
.track-header:hover { background: var(--bg-hover); }
.track-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--bg-hover); display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.track-info { flex: 1; min-width: 0; }
.track-info h4 { margin: 0 0 4px; font-size: .95rem; font-weight: 600; }
.track-info p { margin: 0; color: var(--text-muted); font-size: .82rem; }
.track-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.track-tag { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.track-tag.level { background: var(--bg-hover); color: var(--text-muted); }
.track-tag.cert { background: rgba(59,130,246,.15); color: var(--info); }
.track-tag.cert.green { background: rgba(34,197,94,.15); color: var(--success); }
.track-progress { width: 120px; text-align: right; flex-shrink: 0; }
.track-progress small { color: var(--text-dim); font-size: .75rem; }
.track-progress-bar { height: 6px; background: var(--bg-hover); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.track-progress-bar div { height: 100%; border-radius: 999px; }
.track-chevron { color: var(--text-dim); transition: .2s; }
.track-card.open .track-chevron { transform: rotate(180deg); }
.track-body { display: none; border-top: 1px solid var(--border); padding: 8px 20px 16px; }
.track-card.open .track-body { display: block; }
.module-card { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 10px; overflow: hidden; }
.module-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; background: var(--bg-hover); font-weight: 600; font-size: .85rem; }
.module-header:hover { background: var(--border); }
.module-count { margin-left: auto; color: var(--text-dim); font-size: .78rem; font-weight: 500; }
.module-body { display: none; padding: 4px 0; }
.module-card.open .module-body { display: block; }
.trilha-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .84rem; }
.trilha-item:last-child { border-bottom: 0; }
.trilha-item-ico { width: 28px; height: 28px; border-radius: 6px; background: var(--bg-hover); display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; }
.trilha-item-info { flex: 1; min-width: 0; }
.trilha-item-info strong { display: block; font-weight: 500; }
.trilha-item-meta { color: var(--text-dim); font-size: .75rem; }
.trilha-item-status { font-size: .75rem; font-weight: 600; color: var(--success); white-space: nowrap; }
.trilha-item-status.pending { color: var(--text-dim); }

/* Documentacao */
.docs-search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 14px; height: 44px;
  margin-bottom: 20px; color: var(--text-dim);
}
.docs-search-wrap input { flex: 1; border: 0; background: transparent; color: var(--text); outline: none; height: 100%; }
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.docs-categories { display: grid; gap: 4px; align-content: start; }
.docs-cat { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; color: var(--text-muted); border: 1px solid transparent; }
.docs-cat:hover { background: var(--bg-hover); color: var(--text); }
.docs-cat.active { background: rgba(20,184,166,.1); color: var(--accent); border-color: rgba(20,184,166,.3); font-weight: 600; }
.docs-cat-count { font-size: .75rem; color: var(--text-dim); }
.docs-cat.active .docs-cat-count { color: var(--accent); }
.docs-list h4 { margin: 0 0 12px; font-size: .9rem; color: var(--text-muted); }
.doc-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; transition: .15s; }
.doc-card:hover { border-color: var(--accent); }
.doc-card-ico { font-size: 1.2rem; }
.doc-card-info { flex: 1; }
.doc-card-info strong { display: block; font-size: .9rem; font-weight: 600; }
.doc-card-info small { color: var(--text-dim); font-size: .78rem; }
.doc-card-arrow { color: var(--text-dim); }

/* Team grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.team-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.team-avatar { width: 56px; height: 56px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; margin: 0 auto 12px; }
.team-card strong { display: block; font-size: .92rem; }
.team-card small { color: var(--text-dim); font-size: .78rem; }
.team-card .team-role { color: var(--text-muted); font-size: .82rem; margin-top: 4px; }

/* Profile */
.profile-card label { display: grid; gap: 6px; margin-bottom: 12px; font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.profile-card input { height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.profile-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 999px; object-fit: cover; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }

/* Repo/SG/S3 grids */
.repo-grid, .sg-grid, .s3-grid, .users-grid, .routine-grid {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
  align-items: center;
}
.repo-grid { grid-template-columns: 1.5fr .7fr .7fr .5fr; }
.repo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.repo-toolbar input[type="search"],
.repo-toolbar select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: .85rem;
}
.repo-toolbar input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.repo-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .82rem;
  white-space: nowrap;
}
.repo-result-count {
  margin-left: auto;
  color: var(--text-dim);
  font-size: .8rem;
}
.repo-table .center-cell { text-align: center; }
.repo-table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.repo-table .repo-cell a { color: var(--accent); text-decoration: none; }
.repo-table .repo-cell a:hover { text-decoration: underline; }
.repo-table tr.archived-row { opacity: .72; }
.bool-yes { color: var(--accent); font-weight: 700; }
.bool-no { color: var(--text-dim); }
.sg-grid { grid-template-columns: 1.2fr .6fr .8fr .5fr .7fr; }
.sg-grid-ext {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
  align-items: center;
  grid-template-columns: 1.1fr .55fr 1fr .55fr .65fr .6fr 1.2fr;
}
.sg-grid-ext small { display: block; color: var(--text-dim); font-size: .72rem; font-weight: 400; }
.sg-page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sg-page-intro .sg-export-wrap { flex-shrink: 0; }
.sg-page-title { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.sg-page-desc { margin: 0; color: var(--text-muted); font-size: .86rem; max-width: 680px; line-height: 1.5; }
.access-sync-status { margin-bottom: 14px; }
.s3-sync-status { margin-bottom: 10px; font-size: .8rem; }

.sg-filters-panel { margin-bottom: 16px; padding: 18px 20px; }
.sg-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.sg-filters-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sg-filters-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}
.sg-filters-toggle .ico { width: 16px; height: 16px; fill: currentColor; opacity: .7; }
.sg-filters-chevron { display: inline-block; transition: transform .2s ease; color: var(--text-dim); }
.sg-filters-toggle[aria-expanded="false"] .sg-filters-chevron { transform: rotate(-90deg); }
.sg-filters-active {
  margin: 10px 0 0;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
}
.sg-filters-body.collapsed { display: none; }
.sg-filters-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.sg-filters-grid label {
  display: grid;
  gap: 6px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sg-filters-icon { color: var(--text-dim); flex-shrink: 0; }
.sg-filters-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sg-filters-body { display: grid; gap: 14px; }
.sg-filter-row-top {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(140px, .85fr);
  gap: 14px;
  align-items: end;
}
.sg-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.sg-filter-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 14px;
}
.sg-filter-row-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sg-filter-search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: var(--input-bg);
  color: var(--text);
  font-size: .84rem;
}
.sg-filter-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .15);
}
.sg-account-select,
.sg-region-select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
  font-size: .84rem;
  cursor: pointer;
}
.sg-account-select:focus,
.sg-region-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .15);
}
.sg-export-wrap { position: relative; }
.sg-export-caret { font-size: .72rem; opacity: .85; margin-left: 2px; }
.sg-export-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  z-index: 30;
}
.sg-export-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.sg-export-option:hover { background: var(--bg-hover); color: var(--accent); }
.sg-evo-card { margin-bottom: 16px; }
.sg-evo-chart { height: auto; min-height: 220px; position: relative; }
.sg-evo-plot { position: relative; min-width: 0; }
.sg-evo-svg-wrap {
  height: 190px;
  width: 100%;
  margin-top: 4px;
}
.sg-evo-svg-wrap svg {
  width: 100%;
  height: 190px;
  display: block;
  overflow: visible;
}
.sg-evo-chart-x {
  position: relative;
  height: 22px;
  margin-top: 6px;
  font-size: .72rem;
  color: var(--text-dim);
}
.sg-evo-chart-x span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.sg-evo-hit { cursor: help; pointer-events: all; }
.sg-evo-legend {
  display: flex;
  gap: 16px;
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.sg-evo-legend span { display: flex; align-items: center; gap: 6px; }
.sg-evo-account-legend {
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.sg-evo-svg-wrap { min-height: 220px; }
.sg-evo-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.access-evo-grid {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 8px;
  row-gap: 6px;
}
.access-evo-yaxis {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  height: 180px;
}
.access-evo-yaxis span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: .68rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.access-evo-plot { grid-column: 2; grid-row: 1; height: 180px; }
.access-evo-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.access-evo-gridline { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.access-evo-xaxis {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-dim);
}
.access-evo-legend-bottom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: .78rem;
  color: var(--text-muted);
}
.access-evo-legend-bottom span { display: flex; align-items: center; gap: 6px; }
.sg-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 12px; }
.sg-accounts-strip {
  padding: 14px 16px;
  margin-bottom: 12px;
  display: grid;
  gap: 12px;
}
.sg-accounts-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 28px;
}
.sg-accounts-label {
  display: block;
  color: var(--text-dim);
  font-size: .68rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.sg-accounts-top strong { font-size: 1.5rem; font-weight: 700; margin-right: 6px; }
.sg-accounts-sub { color: var(--text-muted); font-size: .82rem; }
.sg-accounts-active strong { color: var(--accent); }
.sg-accounts-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.s3-accounts-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.s3-accounts-selector-label {
  color: var(--text-dim);
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .04em;
}
.s3-accounts-selector {
  min-width: 280px;
  max-width: 480px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
}
.s3-combo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.s3-combo-field {
  position: relative;
  min-width: 280px;
  max-width: 480px;
}
.s3-combo-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 34px 0 12px;
  background: var(--input-bg);
  color: var(--text);
}
.s3-combo-input:focus {
  outline: none;
  border-color: var(--accent);
}
.s3-combo-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}
.s3-combo-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  background: var(--card-bg, var(--input-bg));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  padding: 4px;
}
.s3-combo[data-open="true"] .s3-combo-panel { display: block; }
.s3-combo-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.s3-combo-option:hover { background: var(--hover-bg, rgba(255, 255, 255, .06)); }
.s3-combo-option.selected {
  background: var(--accent-soft, rgba(45, 212, 191, .14));
  color: var(--accent);
}
.s3-combo-count {
  min-width: 22px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft, rgba(45, 212, 191, .16));
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
}
.s3-combo-empty {
  padding: 10px;
  color: var(--text-muted);
  font-size: .85rem;
}
.sg-account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: .15s ease;
}
.sg-account-pill:hover { border-color: var(--accent); color: var(--text); }
.sg-account-pill.has-alerts {
  border-color: rgba(20,184,166,.35);
  color: var(--text);
}
.sg-account-pill.selected {
  border-color: var(--accent);
  background: rgba(20,184,166,.15);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(20,184,166,.25);
}
.sg-account-pill-all { border-style: dashed; }
.sg-account-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.sg-account-pill.has-alerts .sg-account-dot { background: var(--accent); }
.sg-pill-count {
  margin-left: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(20,184,166,.2);
  font-size: .68rem;
  font-weight: 700;
}
.sg-bar-row.clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 0 -8px;
  padding: 4px 8px;
  transition: background .15s ease;
}
.sg-bar-row.clickable:hover { background: var(--bg-hover); }
.sg-bar-row.selected { background: rgba(20,184,166,.12); outline: 1px solid rgba(20,184,166,.35); }
.sg-severity-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-hover);
}
.sg-severity-seg { height: 100%; transition: width .35s ease; min-width: 0; }
.sg-sev-critical { background: var(--danger); }
.sg-sev-high { background: #f97316; }
.sg-sev-medium { background: var(--warn); }
.s3-sevbar-high { background: #ef4444; }
.s3-sevbar-medium { background: #eab308; }
.access-sevbar-high { background: #ef4444; }
.access-sevbar-medium { background: #eab308; }
.access-sevbar-low { background: var(--info); }
.sg-sev-info { background: var(--info); }
.sg-charts-row { margin-bottom: 16px; }
.sg-donut-wrap { padding: 8px 0 4px; }
.sg-bar-chart { display: grid; gap: 14px; min-height: 120px; }
.sg-pies { display: grid; gap: 14px; min-height: 120px; align-content: start; }
.sg-pie-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .74rem; color: var(--text-muted); }
.sg-pie-key span { display: inline-flex; align-items: center; gap: 5px; }
.sg-pie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; align-items: start; }
.sg-pie-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.sg-pie-item:hover { background: var(--bg-hover); }
.sg-pie-item.selected { background: rgba(20,184,166,.12); border-color: rgba(20,184,166,.35); }
.sg-pie-ring { width: 148px; height: 148px; }
.sg-pie-ring::after { inset: 38px; }
.sg-pie-ring .sg-donut-center strong { font-size: 1.55rem; }
.sg-pie-label { font-size: .86rem; font-weight: 600; text-align: center; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-pie-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: .72rem; color: var(--text-muted); }
.sg-pie-leg { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.sg-bar-row { display: grid; grid-template-columns: minmax(100px, 1.2fr) 1fr 36px; gap: 12px; align-items: center; font-size: .84rem; }
.sg-bar-label { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-bar-label small { display: block; color: var(--text-dim); font-size: .7rem; font-weight: 400; }
.sg-bar-track { height: 12px; background: var(--bg-hover); border-radius: 999px; overflow: hidden; }
.sg-bar-fill { height: 100%; border-radius: 999px; transition: width .35s ease; }
.sg-bar-value { text-align: right; font-weight: 700; font-size: .9rem; }
.sg-toolbar { padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 12px; }
.sg-toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sg-toolbar-row input,
.sg-toolbar-row select {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--input-bg);
  color: var(--text);
}
.sg-toolbar-row input::placeholder { color: var(--text-muted); }
.sg-toolbar-row input:focus,
.sg-toolbar-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .18);
}
.sg-search { flex: 1; min-width: 200px; }
.sg-search-account { min-width: 220px; }
.sg-sev-select { min-width: 160px; }
.sg-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sg-chip {
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sg-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sg-chip-dot.critical,
.sg-chip-dot-critical { background: #ef4444; }
.sg-chip-dot.high,
.sg-chip-dot-high { background: #f97316; }
.sg-chip-dot.medium,
.sg-chip-dot-medium { background: #eab308; }
.sg-chip-dot.low,
.sg-chip-dot-low { background: #3b82f6; }
.sg-chip span:last-child {
  opacity: .75;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 2px;
}
.sg-chip:hover { border-color: rgba(148, 163, 184, .45); color: var(--text); }
.sg-chip.active {
  background: rgba(148, 163, 184, .12);
  border-color: rgba(148, 163, 184, .35);
  color: var(--text);
}
.sg-chip-critical.active { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.sg-chip-high.active { background: rgba(249, 115, 22, .12); border-color: rgba(249, 115, 22, .45); color: #fdba74; }
.sg-chip-medium.active { background: rgba(234, 179, 8, .12); border-color: rgba(234, 179, 8, .45); color: #fde047; }
.sg-chip-low.active { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .45); color: #93c5fd; }
.sg-list-panel { padding: 0; overflow: hidden; margin-bottom: 16px; }
.sg-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.sg-list-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.sg-list-toggle h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.sg-list-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  font-size: .72rem;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
  transform: rotate(-90deg);
}
.sg-list-chevron.open {
  transform: rotate(0deg);
  color: var(--accent);
}
.sg-list-body.collapsed { display: none; }
.sg-list-toolbar { padding: 14px 16px 0; }
.sg-list-toolbar input {
  width: 100%;
  max-width: 420px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
}
.sg-list-toolbar input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}
.sg-table-wrap { display: grid; gap: 0; }
.sg-table { overflow: hidden; padding: 0; background: transparent; }
.sg-table-head,
.sg-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(110px, .85fr) minmax(90px, .7fr) minmax(90px, .55fr) minmax(120px, .9fr) minmax(90px, .55fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  font-size: .84rem;
}
.sg-table-head {
  color: var(--text-dim);
  font-size: .68rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, .35);
}
.sg-table-body { display: grid; }
.sg-acc-item {
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  border-left: 3px solid transparent;
  background: transparent;
}
.sg-acc-item:last-child { border-bottom: 0; }
.sg-acc-item:hover { background: rgba(148, 163, 184, .04); }
.sg-acc-item.sev-critical { border-left-color: #ef4444; }
.sg-acc-item.sev-high { border-left-color: #f97316; }
.sg-acc-item.sev-medium { border-left-color: #f59e0b; }
.sg-acc-item.sev-info,
.sg-acc-item.sev-low { border-left-color: #3b82f6; }
.sg-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.sg-row-static { cursor: default; }
.sg-row-id-cell { display: grid; gap: 3px; overflow: hidden; min-width: 0; }
.sg-row-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sg-row-name {
  color: var(--text-dim);
  font-size: .72rem;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sg-row-acct-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem;
  color: var(--text-muted);
}
.sg-row-acct-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-row-region {
  color: var(--text-muted);
  font-size: .8rem;
  white-space: nowrap;
}
.sg-row-ports {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.sg-row-port-line {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sg-row-port-line.critical {
  background: rgba(239, 68, 68, .14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, .28);
}
.sg-row-port-line.high {
  background: rgba(249, 115, 22, .14);
  color: #fdba74;
  border-color: rgba(249, 115, 22, .28);
}
.sg-row-port-line.medium {
  background: rgba(245, 158, 11, .14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, .28);
}
.sg-row-port-line.info {
  background: rgba(59, 130, 246, .14);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, .28);
}
.sg-severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  flex-shrink: 0;
  min-width: 84px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid transparent;
}
.sg-severity-badge.critical {
  background: rgba(239, 68, 68, .16);
  color: #f87171;
  border-color: rgba(239, 68, 68, .3);
}
.sg-severity-badge.high {
  background: rgba(249, 115, 22, .16);
  color: #fb923c;
  border-color: rgba(249, 115, 22, .3);
}
.sg-severity-badge.medium {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .3);
}
.sg-severity-badge.info {
  background: rgba(59, 130, 246, .16);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, .3);
}
.sg-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.sg-empty-icon { font-size: 2rem; margin-bottom: 12px; opacity: .6; }
.sg-empty h4 { margin: 0 0 8px; color: var(--text); font-size: 1rem; }
.sg-empty p { margin: 0; font-size: .86rem; max-width: 420px; margin-inline: auto; }
.pill.risk { background: rgba(239,68,68,.15); color: var(--danger); }
.pill.warn { background: rgba(245,158,11,.15); color: var(--warn); }
.s3-grid { grid-template-columns: 1.4fr .6fr .5fr 1.2fr; }
.users-grid { grid-template-columns: 1fr .8fr 1fr .6fr; }
.routine-grid { grid-template-columns: 2fr .8fr .7fr auto; }
.row.head { color: var(--text-dim); font-size: .72rem; text-transform: uppercase; font-weight: 600; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.risk-pill { color: var(--danger); font-weight: 700; }
.ok-pill { color: var(--success); font-weight: 600; }
.sev-pill { font-weight: 700; }
.data-table .dep-sev-cell { white-space: nowrap; }
.data-table .sev-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  text-transform: uppercase;
}
.data-table .sev-pill.sev-critical {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.38);
}
.data-table .sev-pill.sev-high {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.38);
}
.data-table .sev-pill.sev-medium {
  color: #fef08a;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.34);
}
.data-table .sev-pill.sev-low {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.34);
}
.sev-critical { color: #ef4444; }
.sev-high { color: #f97316; }
.sev-medium { color: #eab308; }
.sev-low { color: #3b82f6; }
.editor-only.hidden, .admin-only.hidden { display: none !important; }

/* S3 publico — dashboard e listagem por conta */
.s3-tabs { margin-top: 4px; margin-bottom: 18px; }
.s3-filter-account-sync {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.s3-toolbar .sg-toolbar-row input,
.s3-toolbar .sg-toolbar-row select,
.s3-history-label select {
  width: 100%;
  min-width: 0;
}
.s3-toolbar-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .9fr) minmax(150px, .9fr) minmax(220px, 1.3fr);
  gap: 10px;
  align-items: center;
}
.s3-field-search { grid-column: 1 / -1; }
.s3-history-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.s3-history-label { min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.s3-history-meta { justify-self: start; max-width: 100%; white-space: normal; text-align: left; }
.s3-main-chart-card { margin-bottom: 14px; }
.s3-info-row { margin-bottom: 14px; align-items: stretch; }
.s3-info-row .s3-secondary-chart-card,
.s3-info-row .s3-sev-help { margin-bottom: 0; }
.s3-proj-pie-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.s3-proj-pie-head-main { min-width: 0; flex: 1 1 220px; }
.s3-proj-pie-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}
.s3-proj-pie-head h3 { margin: 0 0 4px; }
.s3-proj-pie-head .chart-sub { margin-bottom: 0; }
.s3-sev-legend { margin-left: 0; }
.s3-proj-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.s3-proj-filter-label select {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: var(--input-bg);
  color: var(--text);
  min-width: 200px;
}
.s3-proj-filter-label select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .18);
}
.s3-sev-dot-high { background: #ef4444; }
.s3-sev-dot-medium { background: #eab308; }
.access-sev-dot-low { background: var(--info); }
.access-type-dot-desligado { background: var(--danger); }
.access-type-dot-semcadastro { background: #f97316; }
.access-type-dot-semalocacao { background: var(--warn); }
.access-type-dot-projeto { background: var(--info); }

/* Aba Acessos Indevidos */
.access-help-intro { margin: 0 0 10px; font-size: .86rem; color: var(--text-muted); }
.access-group { margin-bottom: 14px; padding: 0; overflow: hidden; }
.access-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.access-group-head h4 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.access-group-ico { font-size: 1rem; }
.access-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(180px, 1.4fr) 90px 110px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  font-size: .84rem;
}
.access-row-person { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.access-row-person strong { font-size: .86rem; }
.access-row-person small { color: var(--text-muted); overflow-wrap: anywhere; }
.access-row-type { color: var(--text-muted); }
.access-row-detail { color: var(--text-muted); overflow-wrap: anywhere; }
.access-row-action { justify-self: end; }
.access-row-resolved { opacity: .55; }
@media (max-width: 900px) {
  .access-row { grid-template-columns: 1fr 90px; }
  .access-row-type, .access-row-detail { grid-column: 1 / -1; }
  .access-row-action { grid-column: 1 / -1; justify-self: start; }
}
.s3-sev-help {
  display: grid;
  align-content: start;
  align-items: start;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.s3-sev-help-title {
  margin: 0 0 2px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--text);
}
.s3-sev-help-inline {
  margin: -4px 0 14px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
}
.s3-sev-help-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}
.s3-sev-help-row p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.s3-sev-help-row strong {
  color: var(--text);
  font-weight: 700;
}
.s3-sev-help-note {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .76rem;
  line-height: 1.45;
}
.s3-proj-pie-grid {
  width: 100%;
}
.s3-proj-pie-grid .sg-pie-key {
  margin-bottom: 14px;
  font-size: .76rem;
  gap: 7px 15px;
}
.s3-proj-pie-grid .sg-pie-item {
  cursor: default;
  gap: 11px;
  padding: 17px 13px;
}
.s3-proj-pie-grid .sg-pie-ring {
  width: 162px;
  height: 162px;
}
.s3-proj-pie-grid .sg-pie-ring::after {
  inset: 42px;
}
.s3-proj-pie-grid .sg-pie-ring .sg-donut-center strong {
  font-size: 1.65rem;
}
.s3-proj-pie-grid .sg-pie-ring .sg-donut-center small {
  font-size: .7rem;
}
.s3-proj-pie-grid .sg-pie-label {
  font-size: .89rem;
}
.s3-proj-pie-grid .sg-pie-legend {
  font-size: .75rem;
  gap: 5px 11px;
}
.s3-proj-pie-grid .sg-pie-item:hover {
  background: transparent;
  border-color: transparent;
}
.s3-proj-pie-grid[data-layout="single"] .sg-pie-grid {
  grid-template-columns: minmax(210px, max-content);
  justify-content: start;
}
.s3-proj-pie-grid[data-layout="pair"] .sg-pie-grid {
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  max-width: 560px;
}
.s3-proj-pie-grid[data-layout="few"] .sg-pie-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.s3-proj-pie-grid[data-layout="many"] .sg-pie-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
@media (min-width: 768px) {
  .s3-proj-pie-grid[data-layout="few"] .sg-pie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .s3-proj-pie-grid[data-layout="many"] .sg-pie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .s3-proj-pie-grid[data-layout="many"] .sg-pie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.s3-proj-pie-card {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  overflow: hidden;
}
.s3-proj-pie-meta {
  display: grid;
  gap: 4px;
  justify-items: center;
  width: 100%;
  min-width: 0;
}
.s3-proj-pie-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.s3-proj-pie-name {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.s3-proj-pie-total {
  margin: 0;
  font-size: .76rem;
  color: var(--text-dim);
}
.s3-proj-pie-total strong { color: var(--text); font-size: .92rem; }
.s3-mini-pie-wrap { width: 100%; display: flex; justify-content: center; padding: 4px 0 2px; }
.access-pie-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  width: 100%;
  margin-top: 2px;
}
.access-pie-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.access-pie-legend-item strong { color: var(--text); }
.access-pie-legend-item .donut-dot { width: 7px; height: 7px; }
.s3-mini-pie {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.s3-mini-pie-empty {
  display: grid;
  place-items: center;
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 700;
}
.s3-mini-pie-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  pointer-events: none;
}
#s3AccountsStrip .s3-combo {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 6px;
}
#s3AccountsStrip .s3-combo-field {
  min-width: 0;
  max-width: none;
  width: 100%;
}
.s3-project { margin-bottom: 14px; padding: 16px; }
.s3-project-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.s3-account-head { display: grid; gap: 2px; min-width: 0; }
.s3-account-head h4 { margin: 0; font-size: 1rem; font-weight: 700; min-width: 0; }
.s3-account-head .s3-account-id { color: var(--text-dim); font-size: .72rem; font-family: ui-monospace, monospace; }
.s3-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.s3-table { display: flex; flex-direction: column; min-width: 760px; }
.s3-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr .95fr .65fr .6fr 1.25fr;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
}
.s3-cell { min-width: 0; }
.s3-account-id {
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  font-size: .78rem;
}
.s3-row:last-child { border-bottom: none; }
.s3-row.head { color: var(--text-dim); font-size: .72rem; text-transform: uppercase; font-weight: 600; }
.s3-row.risk-row { background: rgba(239,68,68,.04); }
.s3-row.risk-row .s3-cell[data-label="Bucket"] strong { color: var(--danger); }
.s3-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.s3-reason { color: var(--text-muted); font-size: .78rem; line-height: 1.35; }

/* Dependabot dashboard */
.sync-status { color: var(--text-dim); font-size: .72rem; white-space: nowrap; }
.unmatched-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border: 1px solid rgba(245,158,11,.35); border-radius: var(--radius-sm); background: rgba(245,158,11,.1); color: var(--warn); font-size: .82rem; }
.unmatched-banner span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.section-card { margin-top: 16px; }
.dep-content .section-card { margin-top: 0; }
.dep-alerts-head { align-items: flex-start; gap: 12px; margin-bottom: 0; }
.dep-alerts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.dep-alerts-toggle:hover .dep-alerts-title { color: var(--accent); }
.dep-alerts-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.dep-alerts-chevron {
  display: inline-block;
  color: var(--text-dim);
  transition: transform .2s ease;
}
.dep-alerts-toggle[aria-expanded="false"] .dep-alerts-chevron { transform: rotate(-90deg); }
.dep-alerts-body { margin-top: 16px; }
.dep-alerts-body.collapsed { display: none; }
#depAlertsCard.dep-alerts-collapsed .dep-col-toggles { display: none; }
#depAlertsCard.dep-alerts-collapsed .dep-alerts-head { margin-bottom: 0; }
.dep-col-toggles {
  justify-content: flex-end;
  max-width: min(100%, 620px);
  margin-left: auto;
}
.result-count { color: var(--text-dim); font-size: .78rem; margin: 0 0 12px; }
.dep-alerts-toolbar {
  margin-bottom: 10px;
}
.dep-alerts-toolbar input {
  width: 100%;
  max-width: 420px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
}
.dep-alerts-toolbar input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}
.dep-table-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
}
.data-table .project-cell {
  min-width: 130px;
  font-weight: 600;
  color: #e2e8f0;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-spinner { width: 13px; height: 13px; margin-right: 6px; display: inline-block; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dep-spin .7s linear infinite; }
@keyframes dep-spin { to { transform: rotate(360deg); } }
.kpi-soft { border-top-width: 1px; }
.kpi-soft::after { content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.kpi-soft.kpi-red::after { background: var(--danger); }
.kpi-soft.kpi-blue::after { background: var(--info); }
.kpi-soft.kpi-purple::after { background: #a855f7; }
.kpi-soft.kpi-warn::after { background: var(--warn); }
.kpi-soft.kpi-medium::after { background: #eab308; }

.file-btn { display: inline-flex; align-items: center; cursor: pointer; }

/* Horizontal / stacked chart lists — Dependabot */
.chart-card > .chart-sub { margin: -4px 0 14px; }
.chart-empty { margin: 0; color: var(--text-dim); font-size: .78rem; }
.hbar-list,
.stack-list { display: grid; gap: 10px; }
.hbar-row,
.stack-row { display: grid; grid-template-columns: minmax(110px, 1.4fr) 3fr auto; align-items: center; gap: 10px; font-size: .82rem; }
.hbar-label,
.stack-label { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: .82rem; font-weight: 500; }
.hbar-track,
.stack-track { height: 10px; background: var(--bg-hover); border-radius: 999px; overflow: hidden; min-width: 6px; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); min-width: 6px; }
.hbar-value,
.stack-total { text-align: right; min-width: 24px; font-size: .82rem; }
.stack-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: -4px 0 12px; font-size: .75rem; color: var(--text-muted); }
.stack-legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.stack-track { display: flex; }
.stack-seg { height: 100%; }

/* Column toggles da tabela detalhada */
.col-toggles { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); }
.pill-toggle { min-height: 30px; padding: 3px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); cursor: pointer; font-size: .76rem; }
.pill-toggle.active { border-color: rgba(20,184,166,.5); background: rgba(20,184,166,.12); color: var(--accent); }
.sort-button { display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort-button span { color: var(--text-dim); font-size: .65rem; }
.sort-button.active { color: var(--accent); }
.table-sticky-col th:first-child, .table-sticky-col td:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-card); box-shadow: 1px 0 0 var(--border); }
.table-sticky-col th:first-child { z-index: 4; background: var(--bg-hover); }
.data-table .repo-cell { min-width: 180px; font-weight: 600; }
.data-table .cve-cell { min-width: 145px; max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pagination button { min-width: 32px; min-height: 32px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-hover); color: var(--text); cursor: pointer; }
.pagination button.active { border-color: var(--accent); background: rgba(20,184,166,.12); color: var(--accent); font-weight: 700; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination span { color: var(--text-dim); font-size: .75rem; }
.trend-legend { display: flex; justify-content: flex-end; gap: 8px; margin: 0; color: var(--text-muted); font-size: .75rem; flex-wrap: wrap; }
.trend-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.trend-period { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.trend-period select,
.trend-period input[type="date"] { height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; background: var(--input-bg); color: var(--text); font: inherit; font-size: .78rem; font-weight: 500; }
[data-theme="dark"] .trend-period input[type="date"] { color-scheme: dark; }
[data-theme="light"] .trend-period input[type="date"] { color-scheme: light; }
.trend-custom-range { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trend-custom-range.hidden { display: none; }
.chart-card .card-head { align-items: flex-start; gap: 12px; }
.chart-card .card-head .chart-sub { margin: 4px 0 0; }
.trend-legend-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); cursor: pointer; font: inherit; font-size: .75rem; opacity: .45; transition: .15s ease; }
.trend-legend-btn.active { opacity: 1; border-color: rgba(20,184,166,.4); color: var(--text); background: rgba(20,184,166,.08); }
.trend-legend-btn:hover { opacity: 1; }
.trend-legend i { width: 16px; height: 3px; border-radius: 999px; }
.line-chart-tooltip { height: auto; min-height: 210px; }
.line-chart-tooltip svg { height: 170px; overflow: visible; }
.dep-evolution-card {
  padding: 14px 16px;
  margin: 0;
}
.dep-evolution-card .card-head {
  margin-bottom: 8px;
  gap: 8px;
}
.dep-trend-chart { min-height: 190px; }
.dep-trend-row .line-chart-tooltip { min-height: 180px; }
.dep-trend-row .line-chart-tooltip svg { height: 150px; }
.dep-trend-row .line-chart-tooltip .sg-evo-svg-wrap svg { height: 100%; }
.dep-trend-wrap {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}
.dep-trend-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--text-dim);
  padding: 8px 0 28px;
  text-align: right;
}
.dep-trend-svg-wrap {
  min-height: 160px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 4px 0 0;
}
.dep-trend-svg-wrap svg {
  width: 100%;
  height: 160px;
  display: block;
}
.dep-trend-grid line {
  stroke: var(--border);
  stroke-width: .4;
  vector-effect: non-scaling-stroke;
}
.dep-trend-note {
  margin: 8px 0 0;
  font-size: .72rem;
  color: var(--text-dim);
}
.trend-point { pointer-events: all; cursor: help; stroke: var(--bg-card); stroke-width: .7; vector-effect: non-scaling-stroke; }
.phi-tooltip { position: absolute; transform: translate(-50%, -100%); background: var(--bg-hover); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: .74rem; pointer-events: none; white-space: nowrap; z-index: 10; box-shadow: var(--shadow); }
.phi-tooltip b { font-weight: 700; }

@media (max-width: 1300px) {
  .dep-top-projects-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dep-top-projects-filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dep-trend-row,
  .dep-evolution-row { grid-template-columns: 1fr; }
}

/* Rotinas do Time */
.routine-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.routine-overview::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -120px;
  border-radius: 50%;
  background: rgba(20,184,166,.09);
  pointer-events: none;
}
.routine-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.routine-overview h2 { margin: 0 0 4px; font-size: 1.25rem; }
.routine-overview p { margin: 0; }
.routine-total {
  min-width: 128px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  display: grid;
  position: relative;
  z-index: 1;
}
.routine-total strong { color: var(--accent); font-size: 2rem; line-height: 1; }
.routine-total span { color: var(--text-muted); font-size: .75rem; margin-top: 5px; }
.routine-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.routine-results-head h3 { margin: 0; font-size: 1rem; }
.routine-result-count { color: var(--text-dim); font-size: .78rem; }
.routine-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.routine-card {
  min-height: 238px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--kpi-shadow);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.routine-card-clickable { cursor: pointer; }
.routine-card-clickable:hover,
.routine-card-clickable:focus-visible {
  border-color: rgba(20,184,166,.5);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.routine-card-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.routine-card-expanded {
  grid-column: 1 / -1;
  min-height: 0;
  border-color: rgba(20,184,166,.45);
}
.routine-category {
  color: var(--accent);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.routine-card h3 {
  margin: 5px 0 8px;
  font-size: .94rem;
  line-height: 1.35;
}
.routine-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.55;
}
.routine-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}
.routine-card-meta div {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 3px;
}
.routine-card-meta span {
  color: var(--text-dim);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.routine-card-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: .75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.routine-card-details { gap: 0; }
.routine-card-details .routine-card-meta { width: min(100%, 520px); margin-top: 18px; }
.routine-history {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.routine-history-title {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.routine-history ol {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  counter-reset: routine-review;
}
.routine-history li {
  counter-increment: routine-review;
  padding: 7px 10px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.routine-history li::before {
  content: counter(routine-review) 'ª ';
  color: var(--accent);
}
.routine-history p { margin: 0; font-size: .78rem; }
.routine-details-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.routine-edit-form { display: grid; gap: 18px; width: 100%; }
.routine-edit-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}
.routine-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.routine-edit-grid label { display: grid; gap: 6px; }
.routine-edit-grid label > span {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
}
.routine-edit-description { grid-column: 1 / -1; }
.routine-edit-form input,
.routine-edit-form select,
.routine-edit-form textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.routine-edit-form input,
.routine-edit-form select { height: 42px; }
.routine-edit-form input:focus,
.routine-edit-form select:focus,
.routine-edit-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(20,184,166,.12);
}
.routine-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.routine-dialog::backdrop { background: rgba(2,6,23,.72); backdrop-filter: blur(3px); }
.routine-dialog form { display: grid; gap: 16px; padding: 24px; }
.routine-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.routine-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.routine-dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}
.routine-dialog label { display: grid; gap: 6px; }
.routine-dialog label > span {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}
.routine-dialog input,
.routine-dialog select,
.routine-dialog textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.routine-dialog input,
.routine-dialog select { height: 42px; }
.routine-dialog input:focus,
.routine-dialog select:focus,
.routine-dialog textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(20,184,166,.12);
}
.routine-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 1100px) {
  .kpi-grid, .kpi-grid-5, .grid-2, .grid-2-1, .docs-layout, .sg-summary { grid-template-columns: 1fr 1fr; }
  .dep-global-kpis:not(.dep-top-severity-kpis) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dep-top-severity-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dep-top-projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .routine-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s3-toolbar-row { grid-template-columns: 1fr 1fr; }
  .s3-field-search { grid-column: 1 / -1; }
  .s3-history-row { grid-template-columns: 1fr; align-items: stretch; }
  .sg-filter-row-top { grid-template-columns: 1fr 1fr; }
  .sg-filter-row-top .sg-filter-field:first-child { grid-column: 1 / -1; }
  .sg-filter-row { grid-template-columns: 1fr; }
  .sg-table-head { display: none; }
  .sg-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "id"
      "acctid"
      "acctname"
      "region"
      "ports"
      "sev";
    gap: 4px 8px;
  }
  .sg-row-id-cell { grid-area: id; }
  .sg-row-acct-id { grid-area: acctid; }
  .sg-row-acct-name { grid-area: acctname; }
  .sg-row-region { grid-area: region; }
  .sg-row-region::before { content: '📍 '; }
  .sg-row-ports { grid-area: ports; white-space: normal; }
  .sg-row-ports::before { content: '🔌 '; }
  .sg-severity-badge { grid-area: sev; justify-self: start; }
  .sg-page-intro { flex-direction: column; align-items: stretch; }
  .cost-explorer-layout { grid-template-columns: 1fr; }
  .cost-explorer-aside {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 16px;
    max-height: none;
  }
  .shell { grid-template-columns: 72px 1fr; }
  .sidebar-brand div, .nav-label { display: none; }
  .nav-item span:not(.badge) { font-size: 0; }
  .nav-item .ico { font-size: initial; }
  .s3-proj-pie-grid[data-layout="many"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .s3-proj-pie-grid[data-layout="few"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: none; }
  .content { padding: 14px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 1.4rem; }
  .card { padding: 14px; }
  .card-head { align-items: flex-start; flex-direction: column; }
  .filters-actions { width: 100%; }
  .filters-actions .btn { flex: 1 1 auto; }
  .unmatched-banner { align-items: flex-start; }
  .unmatched-banner span { width: 100%; }
  .sg-filter-row-top { grid-template-columns: 1fr; }
  .sg-filter-row-top .sg-filter-field:first-child { grid-column: auto; }
  .col-toggles { gap: 7px; }
  .trend-controls { width: 100%; justify-content: flex-start; }
  .trend-period { width: 100%; }
  .trend-period select,
  .trend-period input[type="date"] { flex: 1; min-width: 0; }
  .trend-custom-range { width: 100%; }
  .pagination { justify-content: center; }
  .pagination > span:last-child { width: 100%; text-align: center; }
  .table-scroll .data-table { min-width: 1380px; }
  .kpi-grid, .grid-2, .grid-2-1, .sg-summary { grid-template-columns: 1fr; }
  .dep-global-kpis:not(.dep-top-severity-kpis) { grid-template-columns: 1fr 1fr; }
  .dep-top-severity-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .routine-overview { align-items: flex-start; flex-direction: column; }
  .routine-total { width: 100%; padding: 14px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .routine-cards { grid-template-columns: 1fr; }
  .routine-edit-grid { grid-template-columns: 1fr; }
  .routine-edit-description { grid-column: auto; }
  .routine-dialog-actions { flex-direction: column-reverse; }
  .routine-dialog-actions .btn { width: 100%; }
  .routine-details-actions { flex-direction: column-reverse; }
  .routine-details-actions .btn { width: 100%; }
  .routine-results-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .sg-toolbar-row { flex-direction: column; align-items: stretch; }
  .sg-summary { grid-template-columns: 1fr; }
  .sg-filters-actions { width: 100%; }
  .sg-filters-actions .btn { flex: 1; }
  .sg-export-wrap { flex: 1; }
  .sg-export-wrap .btn { width: 100%; }
  .external-cost-grid { min-width: 680px; }
  .s3-toolbar-row { grid-template-columns: 1fr; }
  .s3-table { min-width: 0; }
  .s3-table-scroll { overflow-x: visible; margin: 0; padding: 0; }
  .s3-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--bg-hover);
  }
  .s3-row.head { display: none; }
  .s3-row:last-child { border-bottom: 1px solid var(--border); }
  .s3-cell {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
    align-items: start;
  }
  .s3-cell::before {
    content: attr(data-label);
    color: var(--text-dim);
    font-size: .68rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .03em;
    padding-top: 2px;
  }
  .s3-cell .sg-severity-badge { justify-self: start; }
  .s3-project-head .pill { width: 100%; justify-content: center; }
  .sg-list-head { flex-direction: column; align-items: flex-start; }
  .s3-proj-pie-head { flex-direction: column; align-items: stretch; }
  .s3-proj-pie-head-actions { margin-left: 0; width: 100%; }
  .s3-proj-pie-grid[data-layout="pair"] .sg-pie-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* ---- Politicas ---- */
.pol-kpi-teal { color: var(--accent); }
.pol-kpi-blue { color: var(--info); }
.pol-kpi-warn { color: var(--warn); }
.pol-kpi-red { color: var(--danger); }
.pol-toolbar-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.pol-toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pol-toolbar-row input { flex: 1; min-width: 220px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.pol-toolbar-row select { height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.pol-label { color: var(--text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pol-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pol-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .78rem; }
.pol-chip:hover { border-color: var(--accent); color: var(--text); }
.pol-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pol-dot { width: 8px; height: 8px; border-radius: 999px; }
.pol-dot-ok { background: var(--success); }
.pol-dot-info { background: var(--info); }
.pol-dot-warn { background: var(--warn); }
.pol-dot-risk { background: var(--danger); }
.pol-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.pol-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(20,184,166,.12); }
.pol-ico svg { width: 20px; height: 20px; fill: var(--accent); }
.pol-body { min-width: 0; }
.pol-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pol-meta { color: var(--text-muted); font-size: .78rem; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.pol-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.pol-actions .btn-icon { width: 32px; height: 32px; font-size: .85rem; text-decoration: none; }
.pol-empty { color: var(--text-muted); text-align: center; padding: 32px 0; }
.modal-overlay { position: fixed; inset: 0; background: rgba(2,8,20,.6); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 200; padding: 20px; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 24px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head .btn-icon { width: 32px; height: 32px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.field input, .field select, .field textarea { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--input-bg); color: var(--text); font: inherit; }
.field textarea { min-height: 80px; resize: vertical; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.req { color: var(--danger); }
.pol-label-hint { color: var(--text-muted); font-weight: 400; }
@media (max-width: 640px) { .modal-grid { grid-template-columns: 1fr; } }

/* ---- Teste de Phishing ---- */
.kpi-orange { border-top: 3px solid #f97316; }
.phi-c-blue { color: var(--info); }
.phi-c-purple { color: #a855f7; }
.phi-c-red { color: var(--danger); }
.phi-c-orange { color: #f97316; }
.phi-c-green { color: var(--success); }
.phi-last { color: var(--text-muted); font-size: .8rem; margin: -8px 0 16px; }
.phi-last b { color: var(--text); }
.phi-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.phi-chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.phi-chart-tabs { margin-bottom: 0; }
.phi-chart-tabs .tab { padding: 6px 12px; font-size: .78rem; }
.phi-chart { margin-top: 12px; }
.phi-chart svg { width: 100%; height: 190px; overflow: visible; }
.phi-chart-x { display: flex; justify-content: space-between; padding: 6px 34px 0 34px; font-size: .72rem; color: var(--text-dim); }
.phi-legend { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 14px; font-size: .76rem; font-weight: 600; }
.phi-compare-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.phi-compare-row:last-of-type { border-bottom: 0; }
.phi-compare-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.phi-compare-top .lbl { color: var(--text); font-size: .82rem; font-weight: 600; }
.phi-compare-top .val { font-weight: 700; font-size: .82rem; white-space: nowrap; }
.phi-compare-bar { height: 5px; background: var(--bg-hover); border-radius: 999px; margin: 7px 0 5px; overflow: hidden; }
.phi-compare-bar i { display: block; height: 100%; border-radius: 999px; }
.phi-compare-prev { color: var(--text-dim); font-size: .72rem; }
.phi-compare-foot { margin-top: 12px; font-size: .78rem; color: var(--text-muted); }
.phi-compare-foot b { color: var(--text); }
.phi-statusrow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.phi-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.phi-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.phi-ico svg { width: 20px; height: 20px; }
.phi-ico.concluida { background: rgba(34,197,94,.12); }
.phi-ico.concluida svg { fill: var(--success); }
.phi-ico.andamento { background: rgba(59,130,246,.12); }
.phi-ico.andamento svg { fill: var(--info); }
.phi-ico.planejada { background: rgba(245,158,11,.12); }
.phi-ico.planejada svg { fill: var(--warn); }
.phi-tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border); }
.phi-results { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: .78rem; font-weight: 700; font-family: ui-monospace, monospace; }
.phi-sent { color: var(--text); font-weight: 700; }
.modal-head-title { display: flex; align-items: center; gap: 10px; }
.phi-modal-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: rgba(20,184,166,.12); }
.phi-modal-ico svg { width: 18px; height: 18px; fill: var(--accent); }
.modal-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.modal-grid-3 .field.span-2 { grid-column: span 2; }
.phi-results-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.phi-results-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.phi-results-grid input { width: 100%; }
.phi-modal-wide { width: min(680px, 100%); }
@media (max-width: 900px) { .phi-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .modal-grid-3 { grid-template-columns: 1fr; } .modal-grid-3 .field.span-2 { grid-column: auto; } .phi-results-grid { grid-template-columns: repeat(2, 1fr); } }

/* tooltip do grafico de phishing */
.phi-chart { position: relative; }
.phi-chart svg [data-tip-series] { cursor: pointer; }
.phi-tooltip { position: absolute; transform: translate(-50%, -100%); background: var(--bg-hover); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: .74rem; pointer-events: none; white-space: nowrap; z-index: 10; box-shadow: var(--shadow); }
.phi-tooltip b { font-weight: 700; }

/* ---- Pilulas de Conscientizacao ---- */
.awa-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.awa-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.awa-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.awa-stat b { display: block; font-size: 2rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -.02em; }
.awa-stat span { color: var(--text-muted); font-size: .82rem; }
.awa-toolbar-card { margin-bottom: 16px; }
.awa-toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.awa-toolbar-row select { height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); color: var(--text); }
.awa-count { margin-left: auto; color: var(--text-dim); font-size: .78rem; }
.awa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.awa-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 16px 18px; }
.awa-card-head { display: flex; align-items: flex-start; gap: 12px; }
.awa-card-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; }
.awa-card-title-wrap { min-width: 0; flex: 1; }
.awa-card-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.awa-card-title { font-weight: 700; font-size: .92rem; }
.awa-card-actions { flex: none; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.awa-card:hover .awa-card-actions { opacity: 1; }
.awa-card-actions .btn-icon { width: 28px; height: 28px; font-size: .78rem; }
.awa-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.awa-desc { color: var(--text-muted); font-size: .8rem; line-height: 1.55; margin-top: 10px; }
.awa-desc.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.awa-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .74rem; }
.awa-foot-date { color: var(--text-dim); display: flex; align-items: center; gap: 5px; }
.awa-foot-link { background: none; border: none; padding: 0; font-weight: 700; font-size: .74rem; cursor: pointer; }
.pill.muted { background: var(--bg-hover); color: var(--text-muted); }
.pol-dot-muted { background: var(--text-dim); }
.awa-side { display: flex; flex-direction: column; gap: 16px; }
.awa-side-card { padding: 18px; }
.awa-side-title { margin: 0 0 12px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.awa-side-upcoming { color: var(--warn); }
.awa-side-drafts { color: var(--text-muted); }
.awa-side-published { color: var(--accent); }
.awa-side-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.awa-side-item:last-child { border-bottom: 0; padding-bottom: 0; }
.awa-side-item:first-child { padding-top: 0; }
.awa-side-dot { flex: none; width: 7px; height: 7px; border-radius: 999px; margin-top: 6px; }
.awa-side-item strong { display: block; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.awa-side-item small { color: var(--text-dim); font-size: .7rem; }
.awa-side-empty { color: var(--text-dim); font-size: .78rem; }
@media (max-width: 1100px) { .awa-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .awa-grid { grid-template-columns: 1fr; } .awa-stats { grid-template-columns: 1fr; } }

.awa-modal-ico { font-size: 1.1rem; }
.awa-field-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.awa-emoji-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.awa-emoji-btn { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 1.05rem; background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.awa-emoji-btn:hover { border-color: var(--accent); }
.awa-emoji-btn.selected { border-color: var(--accent); background: rgba(20,184,166,.15); box-shadow: 0 0 0 1px var(--accent); }

.awa-image-preview-wrap { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.awa-image-preview { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.awa-card-media { margin-top: 10px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.awa-card-media img { width: 100%; max-height: 160px; object-fit: cover; display: block; }
.awa-video-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .76rem; font-weight: 600; color: var(--info); text-decoration: none; }
.awa-video-link:hover { text-decoration: underline; }
