:root {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #11151b;
  --panel: #171b22;
  --panel-2: #1d232c;
  --panel-3: #121821;
  --border: #313944;
  --text: #f2f5f7;
  --muted: #a8b2bc;
  --soft: #d4dde4;
  --blue: #8db9ff;
  --green: #8fd9aa;
  --yellow: #f2c86b;
  --red: #ff8f8f;
  --violet: #bca8ff;
  --teal: #7fd8c8;
  --orange: #ffb071;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #12151b 0%, var(--bg) 260px, #0b0e13 100%);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

.dashboard-quick-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 16, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.dashboard-quick-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1920px;
  margin: 0 auto;
}

.dashboard-quick-nav strong {
  color: var(--text);
  white-space: nowrap;
  font-size: 13px;
}

.dashboard-quick-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.dashboard-quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-quick-nav a:hover {
  border-color: rgba(127, 216, 200, 0.4);
  color: var(--teal);
  background: rgba(127, 216, 200, 0.08);
}

.page-top-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(127, 216, 200, 0.32);
  border-radius: 50%;
  color: var(--text);
  background: rgba(13, 18, 24, 0.88);
  box-shadow: var(--shadow-soft);
  font: 900 20px/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.page-top-button:hover {
  transform: translateY(-2px);
  border-color: rgba(127, 216, 200, 0.7);
  background: rgba(127, 216, 200, 0.16);
}

.dashboard-section-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-section-label span {
  display: inline-flex;
  margin-bottom: 2px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-section-label h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.dashboard-section-label p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.top-priority-zone {
  display: grid;
  gap: 0;
  background: #090b0f;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 17, 23, 0.94);
  backdrop-filter: blur(10px);
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  max-width: 900px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.redtrack-finance-strip {
  padding: 10px 16px 0;
  background: transparent;
}

.public-address-strip {
  padding: 0;
}

.public-address-card,
.current-chat-panel {
  border: 1px solid rgba(127, 216, 200, 0.22);
  border-radius: 8px;
  background: #101820;
}

.public-address-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.public-address-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-address-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-address-card strong,
.public-address-card a {
  color: var(--teal);
  font-size: 16px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.public-address-card p {
  margin: 0;
  color: var(--soft);
}

.public-address-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-address-meta span {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  text-transform: none;
}

.public-address-card.online {
  border-color: rgba(143, 217, 170, 0.36);
  background: #0d1714;
}

.current-chat-panel {
  padding: 0;
}

.current-chat-mirror {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.chat-mirror-hero,
.chat-mirror-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 12px;
}

.chat-mirror-hero h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.chat-mirror-hero p,
.chat-mirror-next,
.chat-mirror-item p,
.chat-mirror-item small {
  color: var(--soft);
}

.chat-mirror-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chat-mirror-next,
.chat-mirror-item {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-mirror-grid section {
  display: grid;
  gap: 8px;
}

.chat-mirror-grid h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.chat-mirror-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-mirror-item.high,
.chat-mirror-item.critical {
  border-color: rgba(255, 143, 143, 0.35);
}

.redtrack-finance-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(71, 221, 156, 0.38);
  border-radius: 8px;
  background: #0d1714;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.redtrack-finance-card.waiting_access,
.redtrack-finance-card.empty {
  border-color: rgba(255, 204, 102, 0.42);
  background: #1b1710;
}

.redtrack-finance-card.stale {
  border-color: rgba(255, 149, 85, 0.45);
  background: #1b1410;
}

.redtrack-finance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.redtrack-finance-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.redtrack-finance-kicker {
  margin-bottom: 4px;
  color: #8be7bb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.redtrack-finance-card.waiting_access .redtrack-finance-kicker,
.redtrack-finance-card.empty .redtrack-finance-kicker,
.redtrack-finance-card.stale .redtrack-finance-kicker {
  color: #ffd37a;
}

.redtrack-finance-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.22;
}

.redtrack-finance-status {
  white-space: nowrap;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #eaf8ef;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.redtrack-finance-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.redtrack-finance-status.good {
  border-color: rgba(143, 217, 170, 0.45);
  color: #102116;
  background: var(--green);
}

.redtrack-finance-status.needs-access,
.redtrack-finance-status.stale {
  border-color: rgba(242, 200, 107, 0.48);
  color: #1e1608;
  background: var(--yellow);
}

.redtrack-finance-status.loss {
  border-color: rgba(255, 143, 143, 0.5);
  color: #270d0d;
  background: var(--red);
}

.redtrack-finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.redtrack-finance-period {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(139, 231, 187, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.redtrack-finance-period b,
.redtrack-finance-period span,
.redtrack-finance-period small {
  display: inline-block;
  margin-right: 6px;
}

.redtrack-finance-period small {
  color: var(--muted);
  font-weight: 700;
}

.finance-period-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.finance-period-switcher button {
  cursor: pointer;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--soft);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.finance-period-switcher button:hover,
.finance-period-switcher button.active {
  border-color: rgba(139, 231, 187, 0.65);
  color: #102116;
  background: #8be7bb;
}

.redtrack-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.redtrack-metric span,
.redtrack-metric strong {
  display: block;
}

.redtrack-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.redtrack-metric strong {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.redtrack-metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.redtrack-metric.revenue strong,
.redtrack-metric.profit strong,
.redtrack-metric.roi strong {
  color: #96f1bd;
}

.redtrack-metric.cost strong {
  color: #ffd37a;
}

.redtrack-metric.loss strong {
  color: #ff9b9b;
}

.redtrack-finance-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px;
}

.redtrack-finance-details span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.14);
  overflow-wrap: anywhere;
}

.redtrack-finance-warning {
  padding: 9px 10px;
  border: 1px solid rgba(255, 204, 102, 0.35);
  border-radius: 7px;
  color: #ffe6a6;
  background: rgba(255, 204, 102, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.redtrack-finance-advice {
  display: grid;
  gap: 4px;
}

.redtrack-finance-advice p {
  margin: 0;
  color: var(--soft);
}

.redtrack-finance-advice small {
  color: var(--muted);
}

.redtrack-critical-note {
  color: #ffb0b0 !important;
  font-weight: 800;
}

.affiliate-ops-board {
  display: grid;
  padding: 14px 16px 0;
  background: #090b0f;
}

.affiliate-ops-panel {
  display: grid;
  gap: 12px;
  border-color: rgba(127, 216, 200, 0.24);
  background: #10181a;
}

.affiliate-ops {
  display: grid;
  gap: 12px;
}

.affiliate-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.2fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(127, 216, 200, 0.32);
  border-radius: 8px;
  background: #0c1718;
}

.affiliate-kicker {
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.affiliate-hero h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.affiliate-hero p,
.affiliate-card p {
  margin: 6px 0 0;
  color: var(--soft);
}

.affiliate-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.affiliate-mini-metric {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.affiliate-mini-metric span,
.affiliate-mini-metric strong,
.affiliate-mini-metric small {
  display: block;
}

.affiliate-mini-metric span,
.affiliate-mini-metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.affiliate-mini-metric strong {
  margin-top: 3px;
  color: var(--green);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.affiliate-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
  align-items: start;
}

.affiliate-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #121b1d;
}

.affiliate-card-wide {
  grid-column: 1 / -1;
}

.affiliate-card h3 {
  margin: 0 0 9px;
  font-size: 14px;
}

.arbitrage-agent-card {
  border-color: rgba(125, 232, 178, 0.28);
  background: #101b17;
}

.arbitrage-header,
.arbitrage-grid,
.arbitrage-columns {
  display: grid;
  gap: 10px;
}

.arbitrage-header {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  align-items: start;
}

.arbitrage-header h3,
.arbitrage-panel h4,
.arbitrage-columns h4 {
  margin: 0;
}

.arbitrage-now,
.arbitrage-panel,
.arbitrage-list article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.arbitrage-now strong,
.arbitrage-now span,
.arbitrage-list strong,
.arbitrage-list small {
  display: block;
}

.arbitrage-now strong {
  color: var(--green);
}

.arbitrage-now span,
.arbitrage-list small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.arbitrage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.arbitrage-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.arbitrage-columns.compact {
  align-items: start;
}

.arbitrage-drill {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(127, 216, 200, 0.2);
  border-radius: 8px;
  background: rgba(10, 24, 22, 0.72);
}

.arbitrage-drill h4,
.arbitrage-drill p {
  margin: 0;
}

.arbitrage-drill p {
  margin-top: 6px;
  color: var(--soft);
}

.arbitrage-drill small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.arbitrage-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.arbitrage-list.compact {
  gap: 6px;
}

.arbitrage-list p {
  margin: 5px 0 0;
  color: var(--soft);
}

.affiliate-network-grid,
.affiliate-reconcile-grid,
.affiliate-automation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.affiliate-network-grid article,
.affiliate-reconcile,
.affiliate-automation-grid article,
.affiliate-row,
.affiliate-empty {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.affiliate-network-grid article strong,
.affiliate-automation-grid article strong,
.affiliate-row strong,
.affiliate-reconcile strong {
  display: block;
  color: var(--text);
}

.affiliate-network-grid article p,
.affiliate-automation-grid article p,
.affiliate-row p,
.affiliate-reconcile p {
  margin: 5px 0;
  color: var(--soft);
}

.affiliate-network-grid article small,
.affiliate-automation-grid article small,
.affiliate-row small,
.affiliate-reconcile small {
  color: var(--muted);
}

.affiliate-reconcile.ok {
  border-color: rgba(143, 217, 170, 0.24);
}

.affiliate-reconcile.risk {
  border-color: rgba(255, 143, 143, 0.35);
}

.affiliate-reconcile.partial {
  border-color: rgba(242, 200, 107, 0.34);
}

.affiliate-reconcile div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  margin-top: 6px;
}

.affiliate-reconcile span {
  color: var(--muted);
}

.affiliate-reconcile b {
  overflow-wrap: anywhere;
}

.affiliate-list {
  display: grid;
  gap: 7px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.affiliate-list.compact {
  margin-top: 8px;
  max-height: 260px;
}

.affiliate-row {
  display: grid;
  gap: 6px;
}

.affiliate-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.affiliate-row-meta span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.045);
}

.affiliate-table-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(720px, 100%), 1fr));
  gap: 12px;
  align-items: start;
}

.affiliate-table-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(127, 216, 200, 0.22);
  border-radius: 8px;
  background: #10191c;
  box-shadow: var(--shadow-soft);
}

.affiliate-table-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(127, 216, 200, 0.07), rgba(255, 255, 255, 0.02));
}

.affiliate-table-headline h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.affiliate-table-headline p {
  margin: 5px 0 0;
  max-width: 980px;
  color: var(--muted);
  font-size: 12px;
}

.affiliate-table-headline > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  background: rgba(127, 216, 200, 0.08);
}

.affiliate-table-wrap {
  max-height: 560px;
  overflow: auto;
}

.affiliate-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.affiliate-table th,
.affiliate-table td {
  padding: 8px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
}

.affiliate-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--soft);
  background: #172225;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.affiliate-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

.affiliate-table tr:hover td {
  background: rgba(127, 216, 200, 0.055);
}

.affiliate-table td.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.affiliate-table td.money,
.affiliate-table td.positive {
  color: var(--green);
  font-weight: 900;
}

.affiliate-table td.negative {
  color: var(--red);
  font-weight: 900;
}

@media (max-width: 980px) {
  .affiliate-hero {
    grid-template-columns: 1fr;
  }

  .affiliate-status-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .arbitrage-header,
  .arbitrage-grid,
  .arbitrage-columns,
  .arbitrage-drill {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-nav-inner,
  .dashboard-section-label {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-quick-nav-links {
    justify-content: flex-start;
  }

  .dashboard-section-label p {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .dashboard-quick-nav-inner {
    gap: 8px;
  }

  .dashboard-quick-nav-links {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .dashboard-quick-nav-links a {
    flex: 0 0 auto;
  }

  .page-top-button {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
  }

  .topbar > div,
  .topbar p,
  .status-strip,
  .status {
    min-width: 0;
    max-width: 100%;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .status {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .affiliate-sections,
  .affiliate-network-grid,
  .affiliate-reconcile-grid,
  .affiliate-automation-grid,
  .affiliate-status-grid,
  .arbitrage-header,
  .arbitrage-grid,
  .arbitrage-columns,
  .arbitrage-drill {
    grid-template-columns: 1fr;
  }

  .affiliate-table {
    min-width: 760px;
  }

}

.global-critical-banner {
  padding: 14px 16px 0;
  background: #090b0f;
}

.global-critical-banner[hidden] {
  display: none;
}

.critical-alert-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 120, 120, 0.7);
  border-radius: 8px;
  background: #251012;
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.critical-alert-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.critical-alert-kicker {
  margin-bottom: 5px;
  color: #ffc1c1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.critical-alert-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.22;
}

.critical-alert-card p {
  margin: 7px 0 0;
  max-width: 1080px;
  color: var(--soft);
}

.critical-alert-score {
  min-width: 92px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
}

.critical-alert-score strong,
.critical-alert-score span {
  display: block;
}

.critical-alert-score strong {
  color: #ffb0b0;
  font-size: 28px;
  line-height: 1;
}

.critical-alert-score span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.critical-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
}

.critical-alert-grid span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  overflow-wrap: anywhere;
}

.critical-alert-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 8px;
}

.critical-alert-body .copy-line {
  margin: 0;
  padding: 10px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.14);
}

.latest-report-board {
  padding: 16px 16px 0;
}

.agent-command-board {
  display: grid;
  padding: 16px 16px 0;
}

.agent-command-center {
  display: grid;
  gap: 14px;
  padding: 12px;
}

.agent-command-summary,
.architecture-layers,
.agent-command-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px;
}

.agent-command-summary article,
.architecture-layers article,
.agent-command-bottom article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.agent-command-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.agent-command-summary strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.agent-command-summary p,
.architecture-layers p,
.agent-command-bottom li {
  color: var(--soft);
}

.architecture-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.architecture-pipeline b {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(141, 185, 255, 0.2);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(141, 185, 255, 0.08);
}

.agent-command-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.agent-command-section h3,
.agent-command-bottom h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.agent-command-table {
  display: grid;
  gap: 1px;
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.agent-table {
  grid-template-columns: minmax(180px, 0.8fr) minmax(90px, 0.35fr) minmax(105px, 0.45fr) minmax(190px, 1fr) minmax(260px, 1.25fr) minmax(260px, 1.2fr);
}

.automation-table {
  grid-template-columns: minmax(190px, 0.8fr) minmax(100px, 0.35fr) minmax(250px, 1.3fr) minmax(120px, 0.45fr) minmax(220px, 1fr);
  max-height: 360px;
}

.agent-command-table > div {
  min-width: 0;
  padding: 8px 9px;
  color: var(--soft);
  background: var(--panel-2);
  overflow-wrap: anywhere;
}

.agent-command-table strong {
  color: var(--text);
}

.agent-command-table .agent-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--panel-3);
}

.agent-command-bottom ul,
.agent-command-bottom ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.latest-report-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(122, 183, 255, 0.45);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.latest-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.latest-report-head h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.latest-report-head p,
.latest-report-meaning,
.latest-report-deep p {
  margin: 0;
  color: var(--soft);
}

.latest-report-meta,
.latest-report-actions ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.latest-report-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.latest-report-section {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.latest-report-section span,
.latest-report-deep h3,
.latest-report-actions h3 {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.latest-report-section p {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.latest-report-deep {
  display: grid;
  gap: 8px;
}

.latest-report-deep p,
.latest-report-actions li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.latest-report-actions ol {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.latest-report-actions li {
  flex: 1 1 260px;
  color: var(--soft);
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--soft);
  background: var(--panel);
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(440px, 1.6fr) minmax(260px, 0.95fr);
  gap: 16px;
  padding: 16px;
}

.profile-board,
.personal-board,
.director-board {
  display: grid;
  gap: 16px;
  padding: 16px 16px 0;
}

.profile-board {
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.4fr) minmax(260px, 1fr) minmax(260px, 1fr);
}

.director-board {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.personal-board {
  grid-template-columns: minmax(520px, 1.25fr) minmax(420px, 0.95fr);
}

.personal-assessment,
.daily-timeline {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.personal-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(127, 183, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(127, 183, 255, 0.08), rgba(120, 220, 207, 0.05));
}

.personal-summary strong {
  color: var(--text);
}

.personal-summary span,
.personal-summary small {
  color: var(--muted);
}

.trait-table {
  display: grid;
  gap: 8px;
}

.trait-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.38fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

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

.trait-main strong,
.trait-main span,
.trait-main small {
  display: block;
}

.trait-main strong {
  margin-bottom: 4px;
  color: var(--text);
}

.trait-main span {
  color: var(--soft);
}

.trait-main small {
  margin-top: 5px;
  color: var(--muted);
}

.trait-score {
  display: grid;
  gap: 7px;
}

.trait-score b {
  justify-self: end;
  font-size: 24px;
  line-height: 1;
}

.score-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 154, 154, 0.45), rgba(255, 255, 255, 0.12) 50%, rgba(130, 217, 165, 0.58));
  overflow: hidden;
}

.score-track::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.38);
}

.score-track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.28);
}

.trait-row.high-positive .trait-score b,
.trait-row.positive .trait-score b {
  color: var(--green);
}

.trait-row.neutral .trait-score b {
  color: var(--yellow);
}

.trait-row.negative .trait-score b,
.trait-row.low-negative .trait-score b {
  color: var(--red);
}

.day-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.day-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-card-head strong {
  color: var(--teal);
  font-size: 15px;
}

.day-card-head span {
  color: var(--muted);
  font-size: 12px;
}

.day-card p {
  margin: 0;
  color: var(--soft);
}

.day-card small {
  color: var(--muted);
}

.day-list {
  display: grid;
  gap: 4px;
  padding-top: 4px;
}

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

.day-list span {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
}

.day-list.risk span {
  border-left: 3px solid var(--yellow);
}

.day-list.ui span {
  border-left: 3px solid var(--violet);
}

.time-board {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(420px, 1.35fr) minmax(300px, 0.9fr);
  gap: 16px;
  padding: 16px 16px 0;
}

.time-detail-board {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  gap: 16px;
  padding: 16px 16px 0;
}

.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
}

.time-hero {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid rgba(122, 183, 255, 0.28);
  border-radius: 8px;
  background: #101a24;
}

.time-hero h3,
.time-health-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.time-hero p,
.time-health-card p {
  margin: 0;
  color: var(--soft);
}

.time-hero small,
.time-metric small,
.time-health-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.time-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.time-metric strong,
.time-metric span {
  display: block;
}

.time-metric span {
  margin-top: 4px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}

.time-table {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.time-table-head,
.time-table-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) 76px 58px minmax(180px, 1.2fr);
  gap: 10px;
  align-items: start;
}

.time-table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.time-table-row {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.time-table-row span,
.time-table-row small,
.session-row span {
  color: var(--muted);
}

.time-health {
  padding: 12px;
}

.time-health-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.time-health-card.due {
  border-color: rgba(232, 201, 108, 0.55);
  background: #201b10;
}

.time-health-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.time-health-meta span {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
}

.time-health-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--soft);
}

.hour-grid,
.session-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.hour-row {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.hour-bar {
  position: relative;
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 6px;
  background: #0b0f15;
}

.hour-bar i {
  display: block;
  height: 100%;
}

.hour-bar .work {
  background: var(--blue);
}

.hour-bar .personal {
  background: var(--green);
}

.hour-bar .unknown {
  background: var(--yellow);
}

.session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.session-row strong,
.session-row span {
  display: block;
}

.empty-note {
  color: var(--muted);
}

.project-board {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.9fr);
  gap: 16px;
  padding: 16px 16px 0;
}

.github-board {
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(280px, 0.75fr);
  gap: 16px;
  padding: 16px 16px 0;
}

.github-grid,
.github-naming {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.github-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.github-repo-card p {
  margin-top: 8px;
}

.adaptive-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  gap: 16px;
  padding: 16px 16px 0;
}

.portfolio-strip {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #0f151d;
}

.portfolio-strip p {
  margin: 0;
  color: var(--soft);
}

.portfolio-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.project-grid,
.research-grid,
.communication-grid,
.current-advice-grid,
.ux-lab {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.project-card,
.project-overview,
.research-overview,
.research-area {
  min-width: 0;
}

.project-card h3,
.project-overview h3 {
  align-items: flex-start;
}

.project-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.project-fields span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 22px;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #07110d;
  background: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.state.seen,
.state.watch {
  background: var(--yellow);
}

.state.quiet,
.state.waiting {
  background: var(--muted);
}

.research-cadence-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.research-cadence {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.communication-card p,
.research-area p,
.project-card p {
  margin-top: 8px;
}

.ux-findings {
  display: grid;
  gap: 8px;
}

.experiment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.experiment-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: var(--panel-2);
}

.experiment-row small {
  color: var(--blue);
  font-weight: 700;
}

button.agent {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.agent:hover {
  background: rgba(122, 183, 255, 0.08);
}

.agent-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
  z-index: 50;
}

.agent-modal.open {
  display: grid;
}

.agent-modal-card {
  width: min(760px, 96vw);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.agent-modal-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.agent-modal-card h2 {
  margin: 12px 14px 4px;
  font-size: 24px;
}

.agent-modal-card header p {
  margin: 0 14px 14px;
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.agent-modal-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.agent-modal-body section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
}

.agent-modal-body h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.agent-modal-body p,
.agent-modal-body li {
  color: var(--soft);
}

.panel:has(#projects-legacy) {
  display: none;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.profile-card p {
  margin: 0;
  padding: 14px;
  color: var(--soft);
  font-size: 15px;
}

.main-profile p {
  font-size: 16px;
  line-height: 1.5;
}

.next-step-card {
  border-color: rgba(122, 183, 255, 0.45);
  background: #101a24;
}

.next-step-card p {
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.roadmap {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.project-task-timelines {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.task-timeline-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.task-timeline-summary article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.task-timeline-summary span,
.task-timeline-summary small {
  color: var(--muted);
}

.task-timeline-summary strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

.task-timeline-summary p {
  margin: 0;
  color: var(--soft);
}

.task-timeline-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 10px;
  align-items: start;
}

.task-timeline-columns section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.task-timeline-columns h3 {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
}

.task-timeline-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.task-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.task-timeline-row.attention .task-timeline-dot { background: var(--red); }
.task-timeline-row.active .task-timeline-dot { background: var(--blue); }
.task-timeline-row.done .task-timeline-dot { background: var(--green); }
.task-timeline-row.planned .task-timeline-dot { background: var(--yellow); }

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

.task-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.task-timeline-head strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.task-timeline-head span,
.task-timeline-row small {
  color: var(--muted);
  font-size: 12px;
}

.task-timeline-row p {
  margin: 5px 0 3px;
  color: var(--soft);
}

.task-timeline-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-2);
}

.roadmap-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.roadmap-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--blue);
  color: #06111d;
  font-weight: 800;
}

.roadmap-step strong {
  display: block;
  margin-bottom: 3px;
}

.roadmap-step span {
  color: var(--muted);
}

.left-column,
.center-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collapsible-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.collapsible-title.generated {
  margin: -2px 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

.collapse-toggle {
  flex: 0 0 auto;
  min-width: 86px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.055);
  font: 700 11px/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.collapse-toggle:hover {
  border-color: rgba(127, 183, 255, 0.44);
  color: var(--text);
  background: rgba(127, 183, 255, 0.12);
}

.collapse-toggle.inner {
  min-width: 68px;
  padding: 4px 8px;
  font-size: 10px;
}

.inner-collapsible-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inner-collapsible-title.generated {
  margin: 0 0 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
}

.inner-collapsible-block {
  min-width: 0;
  cursor: grab;
}

.inner-collapsible-block.is-collapsed {
  min-height: 38px;
}

.inner-collapsible-block.is-collapsed > :not(.inner-collapsible-title) {
  display: none !important;
}

.inner-collapsible-block.is-collapsed .inner-collapsible-title {
  margin-bottom: 0;
}

.dashboard-block {
  min-width: 0;
  align-self: start;
  cursor: grab;
}

.dashboard-block.is-collapsed {
  min-height: 0;
}

.dashboard-block.is-collapsed > :not(.panel-title):not(.collapsible-title) {
  display: none !important;
}

.dashboard-block.is-collapsed .panel-title {
  border-bottom: 0;
}

.stack,
.timeline,
.agent-grid,
.tag-list,
.mini-list {
  padding: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compact {
  gap: 8px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 15px;
}

.item p {
  margin: 0;
  color: var(--soft);
}

.item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.level {
  min-width: 34px;
  text-align: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  color: #080b10;
  background: var(--green);
}

.level.p0 {
  background: var(--red);
}

.level.p1 {
  background: var(--yellow);
}

.intent-panel {
  padding-bottom: 12px;
}

.intent-panel h2 {
  margin: 18px 18px 8px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.intent-panel p {
  margin: 0 18px 14px;
  color: var(--soft);
}

.inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 18px;
}

.screen-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.75fr);
  gap: 12px;
  padding: 12px;
}

#latest-screenshot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #050608;
}

.screen-analysis {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  color: var(--soft);
  min-height: 180px;
}

.screen-analysis h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.direct-text {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  color: var(--soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.direct-text strong {
  color: var(--text);
}

.timeline {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.timeline-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.time {
  color: var(--blue);
  font-weight: 700;
}

.agent-grid {
  display: grid;
  gap: 8px;
}

.agent {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.agent:last-child {
  border-bottom: 1px solid var(--line);
}

.agent strong {
  font-size: 13px;
}

.agent span,
.agent small {
  display: block;
}

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

.agent small {
  margin-top: 5px;
  color: var(--soft);
  font-size: 12px;
}

.agent:hover {
  border-color: rgba(127, 183, 255, 0.34);
  background: rgba(127, 183, 255, 0.075);
}

.agent .state {
  border-radius: 5px;
  padding: 2px 7px;
  color: #08100c;
  background: var(--green);
  font-size: 12px;
}

.agent .state.attention,
.agent .state.down {
  background: var(--red);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.copy-button {
  display: none !important;
}

.copyable-card,
.copy-line {
  cursor: copy;
}

.copyable-card.copied,
.copy-line.copied {
  outline: 2px solid rgba(118, 214, 154, 0.65);
  outline-offset: 2px;
}

.drop-zone {
  grid-auto-flow: dense;
  align-items: start;
}

.drop-zone.drag-over {
  outline: 1px dashed rgba(127, 183, 255, 0.55);
  outline-offset: -4px;
}

.dashboard-drag-active {
  user-select: none;
}

.dashboard-drag-placeholder {
  min-width: 0;
  align-self: stretch;
  border: 1px dashed rgba(127, 183, 255, 0.55);
  border-radius: 8px;
  background: rgba(127, 183, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.inner-drop-zone.inner-drag-over {
  outline: 1px dashed rgba(127, 183, 255, 0.45);
  outline-offset: -3px;
}

.inner-drag-placeholder {
  min-width: 0;
  align-self: stretch;
  border: 1px dashed rgba(127, 183, 255, 0.5);
  border-radius: 7px;
  background: rgba(127, 183, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.dashboard-block.dragging {
  cursor: grabbing;
  opacity: 0.62;
  transform: scale(0.99);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.inner-collapsible-block.inner-dragging {
  cursor: grabbing;
  opacity: 0.66;
  transform: scale(0.99);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.done-button {
  margin-top: 12px;
  border: 1px solid rgba(118, 214, 154, 0.45);
  border-radius: 6px;
  background: #102017;
  color: var(--green);
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
}

.done-button:hover {
  background: #15301f;
}

.time-charts {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.time-chart-card {
  display: grid;
  gap: 12px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
}

.time-donut {
  display: grid;
  place-items: center;
  width: 148px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-2) 0 52%, transparent 53%),
    conic-gradient(
      var(--green) 0 calc(var(--work) * 1%),
      var(--blue) calc(var(--work) * 1%) calc((var(--work) + var(--personal)) * 1%),
      var(--yellow) calc((var(--work) + var(--personal)) * 1%) 100%
    );
  border: 1px solid var(--line);
}

.time-donut span {
  font-size: 19px;
  font-weight: 800;
}

.donut-legend {
  display: grid;
  gap: 7px;
  color: var(--soft);
}

.donut-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 99px;
}

.work-dot { background: var(--green); }
.personal-dot { background: var(--blue); }
.unknown-dot { background: var(--yellow); }

.project-bars,
.rhythm-bars {
  display: grid;
  gap: 8px;
}

.project-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) 52px;
  gap: 10px;
  align-items: center;
}

.project-bar-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-bar-row .project-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.project-bar-row .project-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.project-bar {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.4fr) 52px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  display: block;
  height: 100%;
  width: var(--pct);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.project-bar-row .project-bar {
  display: block;
  grid-template-columns: none;
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 1081px) {
  .layout,
  .profile-board,
  .director-board,
  .time-board,
  .time-detail-board,
  .project-memory-board,
  .project-board,
  .github-board,
  .adaptive-board {
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    grid-auto-flow: row dense;
    align-items: start;
  }

  .personal-board {
    grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
    grid-auto-flow: row dense;
    align-items: start;
  }

  .latest-report-card {
    grid-column: span 2;
  }

  .dashboard-block.is-collapsed {
    grid-column: span 1 !important;
  }
}

.rhythm-bars {
  grid-template-columns: repeat(12, minmax(16px, 1fr));
  align-items: end;
  min-height: 84px;
}

.rhythm-column {
  display: grid;
  align-items: end;
  gap: 4px;
  min-height: 78px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.rhythm-column i {
  display: block;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  background: var(--blue);
}

.rhythm-bar {
  display: grid;
  align-items: end;
  gap: 4px;
  min-height: 78px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.rhythm-bar i {
  display: block;
  min-height: 3px;
  height: calc(var(--h) * 1%);
  border-radius: 5px 5px 0 0;
  background: var(--blue);
}

.project-memory-board {
  display: grid;
  grid-template-columns: minmax(520px, 1.4fr) minmax(300px, 0.8fr);
  gap: 16px;
  padding: 16px 16px 0;
}

.project-memory-grid,
.resume-state,
.gmail-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.project-memory-card {
  border-color: rgba(122, 183, 255, 0.22);
}

.resume-grid {
  display: grid;
  gap: 8px;
}

.resume-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
}

.resume-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.gmail-card {
  border-color: rgba(232, 201, 108, 0.22);
}

.gmail-card.pinned-mail {
  border-color: rgba(255, 120, 120, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.14);
}

.gmail-card.low-attention {
  opacity: 0.72;
}

.mail-attention-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.mail-attention-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.ux-subtitle {
  margin: 12px 12px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ux-rank-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 8px;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .profile-board,
  .personal-board,
  .director-board,
  .time-board,
  .time-detail-board,
  .project-board,
  .github-board,
  .adaptive-board,
  .project-memory-board,
  .redtrack-finance-period,
  .redtrack-finance-metrics,
  .redtrack-finance-details,
  .latest-report-sections,
  .critical-alert-grid,
  .critical-alert-body,
  .project-grid,
  .github-grid {
    grid-template-columns: 1fr;
  }

  .critical-alert-main {
    flex-direction: column;
  }

  .redtrack-finance-head {
    flex-direction: column;
  }

  .redtrack-finance-status {
    width: 100%;
    text-align: center;
  }

  .finance-period-switcher {
    justify-content: flex-start;
  }

  .critical-alert-score {
    width: 100%;
  }

  .trait-row {
    grid-template-columns: 1fr;
  }

  .trait-score b {
    justify-self: start;
  }

  .latest-report-head {
    flex-direction: column;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .time-table-head {
    display: none;
  }

  .time-table-row {
    grid-template-columns: 1fr;
  }

  .screen-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Professional polish layer: keeps blocks dense, readable and less empty after dragging/collapsing. */
.top-priority-zone,
.latest-report-board,
.profile-board,
.personal-board,
.director-board,
.time-board,
.time-detail-board,
.project-memory-board,
.project-board,
.github-board,
.adaptive-board,
.layout {
  width: min(100%, 1920px);
  margin-inline: auto;
}

.top-priority-zone {
  gap: 10px;
  padding: 12px 16px 0;
  background: linear-gradient(180deg, rgba(18, 21, 27, 0.98), rgba(14, 17, 22, 0.92));
}

.redtrack-finance-strip,
.global-critical-banner {
  padding: 0;
}

.topbar {
  width: min(100%, 1920px);
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-inline: 0;
  background: rgba(17, 21, 27, 0.96);
}

.topbar h1,
h2,
h3 {
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(22px, 1.7vw, 30px);
}

.latest-report-board,
.profile-board,
.personal-board,
.director-board,
.time-board,
.time-detail-board,
.project-memory-board,
.project-board,
.github-board,
.adaptive-board,
.layout {
  gap: 14px;
  padding: 14px 16px 0;
}

.layout,
.profile-board,
.personal-board,
.director-board,
.time-board,
.time-detail-board,
.project-memory-board,
.project-board,
.github-board,
.adaptive-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  grid-auto-flow: row dense;
  align-items: start;
}

.left-column,
.center-column,
.right-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel,
.latest-report-card,
.profile-card,
.redtrack-finance-card,
.critical-alert-card,
.item,
.day-card,
.resume-row,
.screen-analysis,
.time-health-card {
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background-color: var(--panel);
  box-shadow: var(--shadow-soft);
}

.panel:hover,
.latest-report-card:hover,
.profile-card:hover,
.redtrack-finance-card:hover,
.critical-alert-card:hover,
.item:hover {
  border-color: rgba(141, 185, 255, 0.22);
}

.panel-title,
.collapsible-title.generated {
  min-height: 42px;
  color: #b8c2cc;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.collapse-toggle,
.done-button {
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.collapse-toggle:hover,
.done-button:hover {
  transform: translateY(-1px);
}

.status,
.pill {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.redtrack-finance-metrics,
.redtrack-finance-details,
.critical-alert-grid,
.critical-alert-body,
.latest-report-sections,
.project-grid,
.research-grid,
.communication-grid,
.current-advice-grid,
.gmail-grid,
.agent-grid,
.project-memory-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  grid-auto-flow: row dense;
}

.redtrack-finance-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}

.redtrack-finance-card {
  background:
    linear-gradient(135deg, rgba(143, 217, 170, 0.12), rgba(17, 21, 27, 0.2) 38%),
    #101914;
}

.redtrack-finance-card.waiting_access,
.redtrack-finance-card.empty,
.redtrack-finance-card.stale {
  background:
    linear-gradient(135deg, rgba(242, 200, 107, 0.14), rgba(17, 21, 27, 0.2) 42%),
    #1a1711;
}

.redtrack-metric {
  min-height: 94px;
  background: rgba(255, 255, 255, 0.05);
}

.redtrack-metric strong {
  font-size: clamp(18px, 1.5vw, 25px);
}

.critical-alert-card {
  background:
    linear-gradient(135deg, rgba(255, 143, 143, 0.16), rgba(37, 16, 18, 0.78) 44%),
    #1e1114;
}

.dashboard-block.is-collapsed {
  min-height: 44px;
}

.dashboard-block.is-collapsed .panel-title,
.dashboard-block.is-collapsed .collapsible-title {
  border-bottom: 0;
}

.screen-panel {
  display: none !important;
}

@media (min-width: 1200px) {
  .latest-report-card,
  .personal-assessment-panel,
  .daily-timeline-panel,
  .project-task-timeline-panel,
  .project-intelligence-panel,
  .research-panel,
  .time-charts-panel {
    grid-column: span 2;
  }

  .redtrack-finance-card,
  .critical-alert-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1640px) {
  .layout,
  .profile-board,
  .director-board,
  .time-board,
  .time-detail-board,
  .project-board,
  .github-board,
  .adaptive-board {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  }
}

@media (max-width: 620px) {
  .page-top-button {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
  }

  .topbar > div,
  .topbar p,
  .status-strip,
  .status {
    min-width: 0;
    max-width: 100%;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .status {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
