:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-hover: #171722;
  --bg-soft: #0f1016;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text: #f3f4f6;
  --muted: #8b93a7;
  --muted-strong: #a8afc1;
  --blue: #3b82f6;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --neutral: #64748b;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-width: 216px;
  --sidebar-collapsed: 64px;
  --border: 1px solid var(--line);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a {
  color: var(--blue);
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.shell-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: var(--border);
  background: #090910;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shell-mark {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--bg-elevated);
}

.shell-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shell-link {
  min-height: 40px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted-strong);
  border: 1px solid transparent;
}

.shell-link:hover {
  background: var(--bg-elevated);
  border-color: var(--line);
  color: var(--text);
}

.shell-link.is-active {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  color: var(--text);
}

.shell-link-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.shell-link-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.shell-link-label {
  font-size: 13px;
  font-weight: 600;
}

.shell-link-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: rgba(239, 68, 68, 0.12);
  color: #fda4af;
  font-size: 11px;
  font-weight: 700;
}

.shell-frame {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 10, 15, 0.96);
  border-bottom: var(--border);
  padding: 18px 24px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.shell-header-main {
  display: grid;
  gap: 6px;
}

.shell-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shell-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.shell-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-updated {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.period-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius);
  border: var(--border);
  background: var(--bg-soft);
}

.period-filter-button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.period-filter-button.is-active {
  background: var(--bg-hover);
  color: var(--text);
}

.shell-main {
  padding: 20px 24px 28px;
  display: grid;
  gap: 16px;
}

.panel,
.metric-card,
.analytic-panel,
.insight-card,
.status-card,
.flow-card,
.module-card,
.summary-card,
.portfolio-card,
.attention-card,
.preview-card {
  background: var(--bg-elevated);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.section-block {
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.module-meta-links {
  display: flex;
  gap: 12px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.metric-row,
.grid-4,
.summary-grid,
.executive-band,
.analytic-grid,
.split-grid,
.status-grid,
.flow-grid,
.portfolio-grid-cards,
.attention-grid,
.preview-grid,
.module-grid,
.two-col,
.cols {
  display: grid;
  gap: 12px;
}

.metric-row,
.grid-4,
.summary-grid,
.executive-band,
.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-row-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analytic-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.split-grid,
.two-col,
.cols {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-grid.compact {
  grid-template-columns: 1fr;
}

.flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-grid-cards,
.attention-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 12px;
}

.metric-card,
.analytic-panel,
.insight-card,
.status-card,
.flow-card,
.module-card,
.summary-card,
.portfolio-card,
.attention-card {
  padding: 16px;
}

.metric-label,
.kpi .k,
.module-kicker,
.executive-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value,
.analytic-value,
.metric,
.kpi .v,
.summary-card strong {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.metric-meta,
.analytic-subvalue,
.executive-note,
.subtitle,
.meta,
.muted,
.module-card p,
.summary-card p,
.portfolio-card p,
.attention-card p,
.insight-card p,
.status-card p,
.flow-card p {
  color: var(--muted);
  font-size: 12px;
}

.empty-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}

.empty-line svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted-strong);
  font-size: 12px;
}

.inline-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.inline-stat strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.metric-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.metric-delta.positive { color: var(--green); }
.metric-delta.negative { color: var(--red); }
.metric-delta.neutral { color: var(--muted); }

.metric-delta-arrow {
  font-size: 11px;
  line-height: 1;
}

.module-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 16px;
}

.side-rail {
  display: grid;
  gap: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.status-dot.is-healthy { background: var(--green); }
.status-dot.is-watch { background: var(--yellow); }
.status-dot.is-critical { background: var(--red); }
.status-dot.is-configured { background: var(--neutral); }

.analytic-panel h3,
.insight-card h3,
.status-card h3,
.flow-card h3,
.module-card h3,
.summary-card h3,
.portfolio-card h3,
.attention-card h3,
.feed-item h3,
.timeline-item h3 {
  margin: 8px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.analytic-panel.primary,
.insight-card.primary {
  border-color: rgba(59, 130, 246, 0.28);
}

.hero,
.hero-main,
.hero-side {
  display: none !important;
}

.pill,
.health-pill,
.status-pill,
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill,
.health-pill,
.status-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pill.healthy,
.health-pill.healthy,
.status-pill.healthy,
.tone-healthy,
.status-card.healthy {
  color: var(--green);
}

.pill.watch,
.pill.atencao,
.health-pill.watch,
.status-pill.watch,
.tone-watch,
.status-card.watch {
  color: var(--yellow);
}

.pill.critical,
.pill.bloqueado,
.health-pill.critical,
.status-pill.critical,
.tone-critical,
.status-card.critical {
  color: var(--red);
}

.pill.configured,
.status-pill.configured,
.tone-configured,
.status-card.configured {
  color: var(--muted-strong);
}

.tag,
.badge,
.attention-metrics span {
  background: var(--bg-soft);
  border: var(--border);
  color: var(--muted-strong);
  text-transform: none;
  letter-spacing: 0;
  padding: 4px 8px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.button.primary,
.button.is-active,
.button.active,
[data-panel-toggle].is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.portfolio-head,
.attention-top,
.status-top,
.feed-top,
.analytic-list-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.portfolio-sub {
  color: var(--muted);
  font-size: 12px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.portfolio-grid > div,
.portfolio-grid > span {
  min-width: 0;
  background: var(--bg-soft);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 4px;
  color: var(--muted-strong);
  font-size: 12px;
}

.portfolio-grid strong {
  color: var(--text);
  font-size: 13px;
}

.feed-list,
.timeline-feed,
.exception-list,
.analytic-list,
.queue-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.feed-item,
.timeline-item,
.exception-item,
.analytic-list-item {
  padding: 12px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.feed-item p,
.exception-item p,
.timeline-body p,
.analytic-list-item p {
  margin: 6px 0 0;
}

.feed-meta,
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-list-item {
  display: grid;
  gap: 8px;
}

.bar-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bar-list-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.bar-list-value {
  color: var(--muted-strong);
  font-size: 12px;
}

.bar-list-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.bar-list-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.segmented-bar-wrap {
  display: grid;
  gap: 12px;
}

.segmented-bar {
  height: 12px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-soft);
  border: var(--border);
}

.segmented-bar-part.tone-healthy,
.legend-dot.tone-healthy,
.dot.tone-healthy {
  background: var(--green);
}

.segmented-bar-part.tone-watch,
.legend-dot.tone-watch,
.dot.tone-watch {
  background: var(--yellow);
}

.segmented-bar-part.tone-critical,
.legend-dot.tone-critical,
.dot.tone-critical {
  background: var(--red);
}

.segmented-bar-part.tone-blue,
.legend-dot.tone-blue,
.dot.tone-blue {
  background: var(--blue);
}

.segmented-bar-part.tone-neutral,
.legend-dot.tone-neutral,
.dot.tone-neutral {
  background: var(--neutral);
}

.segmented-bar-legend,
.area-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
}

.legend-dot,
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dot-grid-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-soft);
  color: var(--muted-strong);
  font-size: 12px;
}

.dot-grid-label {
  color: var(--text);
  font-weight: 600;
}

.dot-grid-meta {
  color: var(--muted);
  font-size: 11px;
}

.heatmap {
  display: grid;
  gap: 8px;
}

.heatmap-head,
.heatmap-row {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  gap: 6px;
  align-items: center;
}

.heatmap-head {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.heatmap-label {
  color: var(--muted-strong);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.heatmap-cell {
  width: 100%;
  height: 16px;
  border-radius: 4px;
  background: #0b0d13;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.heatmap-cell.level-1 { background: rgba(59, 130, 246, 0.18); }
.heatmap-cell.level-2 { background: rgba(59, 130, 246, 0.32); }
.heatmap-cell.level-3 { background: rgba(59, 130, 246, 0.48); }
.heatmap-cell.level-4 { background: rgba(59, 130, 246, 0.7); }

.sparkline {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  overflow: visible;
}

.sparkline-line {
  fill: none;
  stroke-width: 2;
}

.sparkline-dot {
  fill: currentColor;
  color: inherit;
}

.sparkline-ring {
  fill: transparent;
  stroke: currentColor;
  stroke-opacity: 0.18;
}

.sparkline-blue,
.sparkline-cyan {
  color: var(--blue);
}

.sparkline-dark {
  color: var(--muted-strong);
}

.sparkline-dark .sparkline-line,
.sparkline-dark .sparkline-dot,
.sparkline-dark .sparkline-ring {
  stroke: var(--muted-strong);
  fill: var(--muted-strong);
}

.sparkline-watch .sparkline-line { stroke: var(--yellow); }
.sparkline-watch .sparkline-dot,
.sparkline-watch .sparkline-ring { fill: var(--yellow); stroke: var(--yellow); }

.sparkline-healthy .sparkline-line { stroke: var(--green); }
.sparkline-healthy .sparkline-dot,
.sparkline-healthy .sparkline-ring { fill: var(--green); stroke: var(--green); }

.sparkline-critical .sparkline-line { stroke: var(--red); }
.sparkline-critical .sparkline-dot,
.sparkline-critical .sparkline-ring { fill: var(--red); stroke: var(--red); }

.area-chart-wrap {
  display: grid;
  gap: 10px;
}

.area-chart {
  width: 100%;
  height: auto;
}

.area-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.area-series-fill {
  fill-opacity: 0.12;
}

.area-series-line {
  fill: none;
  stroke-width: 2;
}

.area-series-line.tone-blue { stroke: var(--blue); }
.area-series-fill.tone-blue { fill: var(--blue); }
.area-series-line.tone-healthy { stroke: var(--green); }
.area-series-fill.tone-healthy { fill: var(--green); }
.area-series-line.tone-watch { stroke: var(--yellow); }
.area-series-fill.tone-watch { fill: var(--yellow); }
.area-series-line.tone-critical { stroke: var(--red); }
.area-series-fill.tone-critical { fill: var(--red); }
.area-series-line.tone-neutral { stroke: var(--neutral); }
.area-series-fill.tone-neutral { fill: var(--neutral); }

.area-axis-label {
  fill: var(--muted);
  font-size: 10px;
}

.area-axis-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.area-empty-label {
  fill: #6b7280;
  font-size: 12px;
}

.chart-empty {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  background: #0d0f16;
}

.donut-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.mini-donut {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 10;
}

.donut-track {
  stroke: rgba(255, 255, 255, 0.06);
}

.donut-segment.tone-healthy { stroke: var(--green); }
.donut-segment.tone-watch { stroke: var(--yellow); }
.donut-segment.tone-critical { stroke: var(--red); }
.donut-segment.tone-neutral { stroke: var(--neutral); }

.donut-total {
  margin-top: -88px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.preview-card {
  overflow: hidden;
  display: block;
  color: var(--text);
}

.preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #090910;
}

.preview-card.drive {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.preview-meta {
  padding: 10px 12px 12px;
  display: grid;
  gap: 4px;
}

.preview-meta strong {
  font-size: 13px;
  color: var(--text);
}

.preview-drive {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 0 10px 10px;
  border-bottom: var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody td {
  padding: 12px 10px;
  border-bottom: var(--border);
  vertical-align: top;
  color: var(--muted-strong);
  font-size: 13px;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

tbody td strong {
  color: var(--text);
}

.table-wrap {
  padding: 16px;
}

.ops-layout,
.client360-layout,
.traffic-layout {
  display: grid;
  gap: 12px;
}

.ops-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

.traffic-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
}

.client360-layout {
  grid-template-columns: 320px minmax(0, 1fr) 360px;
}

.queue-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-soft);
  align-items: flex-start;
}

.queue-item p {
  margin: 6px 0 0;
}

.queue-age {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.compact-table table {
  width: 100%;
}

.compact-table tbody td,
.compact-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
}

.compact-table tbody tr {
  height: 44px;
}

.compact-table td:last-child,
.compact-table th:last-child {
  text-align: right;
}

.compact-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.compact-actions .button,
.compact-actions a.button {
  height: 30px;
  padding: 0 10px;
}

.tracker-strip {
  display: grid;
  gap: 12px;
}

.tracker-dots {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.tracker-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: var(--neutral);
}

.tracker-dot.is-healthy { background: var(--green); }
.tracker-dot.is-critical { background: var(--red); }
.tracker-dot.is-watch { background: var(--yellow); }
.tracker-dot.is-configured { background: #4b5563; }

.blocked-list {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
}

.blocked-list strong {
  color: var(--text);
  font-size: 12px;
}

.queue-actions {
  display: flex;
  gap: 6px;
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tracker-tile {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-soft);
}

.tracker-tile .dot {
  width: 12px;
  height: 12px;
}

.empty-inline {
  color: var(--muted);
  font-size: 12px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kanban-column {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.kanban-column-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.kanban-column h3 {
  margin: 0;
  font-size: 13px;
}

.kanban-count {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.kanban-card {
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.kanban-card strong {
  color: var(--text);
  font-size: 12px;
}

.kanban-card span {
  color: var(--muted);
  font-size: 11px;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.thumbnail-card {
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  display: grid;
  min-width: 0;
}

.thumbnail-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #07070a;
}

.thumbnail-card-body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 4px;
}

.thumbnail-card-body strong {
  font-size: 12px;
  color: var(--text);
}

.thumbnail-card-body span {
  font-size: 11px;
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 8px;
}

.review-row {
  display: grid;
  grid-template-columns: 48px minmax(160px, 0.9fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: var(--border);
}

.review-row:last-child {
  border-bottom: 0;
}

.review-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: var(--border);
  background: var(--bg-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-main {
  min-width: 0;
}

.review-main strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.review-main span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.timeline-toolbar select {
  min-width: 140px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-soft);
  color: var(--text);
}

.timeline-rows {
  display: grid;
  gap: 10px;
}

.timeline-group-block {
  display: grid;
  gap: 8px;
}

.timeline-group-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-row {
  display: grid;
  grid-template-columns: 56px 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: var(--border);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-row-time {
  color: var(--muted);
  font-size: 12px;
}

.timeline-row-icon {
  width: 18px;
  height: 18px;
  color: var(--muted-strong);
}

.timeline-row-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.timeline-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.timeline-row-main strong {
  color: var(--text);
  font-size: 13px;
}

.timeline-row-main span {
  color: var(--muted);
  font-size: 12px;
}

.footer-summary {
  color: var(--muted);
  font-size: 12px;
}

.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.timeline-group {
  display: grid;
  gap: 12px;
}

.timeline-day-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px 18px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.timeline-time {
  color: var(--muted);
  font-size: 12px;
}

.timeline-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: var(--border);
  position: relative;
  top: 2px;
}

.timeline-body {
  min-width: 0;
}

.timeline-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .module-split,
  .metric-row,
  .grid-4,
  .summary-grid,
  .executive-band,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytic-grid,
  .split-grid,
  .ops-layout,
  .traffic-layout,
  .client360-layout {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-grid-cards,
  .attention-grid,
  .status-grid,
  .kanban-board,
  .thumbnail-grid,
  .kpi-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-dots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
  }

  .shell-link {
    grid-template-columns: 18px;
    justify-content: center;
    padding: 10px 0;
  }

  .shell-link-label,
  .shell-link-badge {
    display: none;
  }

  .shell-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .shell-main {
    padding: 16px;
  }

  .metric-row,
  .grid-4,
  .summary-grid,
  .executive-band,
  .module-grid,
  .status-grid,
  .portfolio-grid-cards,
  .attention-grid,
  .preview-grid,
  .kanban-board,
  .dot-grid,
  .thumbnail-grid,
  .kpi-grid-5 {
    grid-template-columns: 1fr;
  }

  .review-row,
  .timeline-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .tracker-dots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .heatmap-head,
  .heatmap-row {
    grid-template-columns: 56px repeat(7, 1fr);
  }
}
