.view-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.view-stat {
  background: #fff;
  border: 1px solid #dce0d4;
  padding: 13px;
  border-radius: 6px;
}
.view-stat:first-child {
  border-top: 2px solid #b6fc34;
}
.view-stat > span {
  font-size: 10px;
  display: block;
  color: #77816f;
  line-height: 1.4;
}
.view-stat > strong {
  font-size: 24px;
  letter-spacing: -0.8px;
  display: block;
  margin: 6px 0;
}
.view-stat small {
  font-size: 9px;
  color: #77816f;
  display: block;
}
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  border: 1px solid #d7dece;
  background: #fcfcfa;
  padding: 3px;
  border-radius: 5px;
  gap: 2px;
}
.segmented button {
  border: 0;
  background: none;
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 10px;
  color: #77816f;
}
.segmented button.selected {
  background: #e3ecd5;
  color: #263024;
  box-shadow: inset 0 -2px #b6fc34;
}
select {
  font:
    10px Inter,
    Arial;
  color: #64705b;
  background: #fff;
  padding: 8px;
  border: 1px solid #d7dece;
  border-radius: 5px;
}
.pipeline-board,
.ticket-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  min-width: 520px;
}
.pipeline-column,
.ticket-column {
  background: #eaf0e2;
  border: 1px solid #dce4d3;
  border-radius: 5px;
  padding: 9px;
  min-height: 260px;
}
.column-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: #617052;
  margin: 0 0 10px;
  gap: 5px;
}
.column-title > span {
  font-size: 9px;
  border-radius: 3px;
  background: #dce7cf;
  padding: 1px 5px;
}
.account-card,
.ticket-card {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #d6dfca;
  border-radius: 5px;
  padding: 11px;
  text-align: left;
  color: #263024;
  margin-bottom: 9px;
  box-shadow: 0 2px 3px #26302403;
}
.account-card:hover,
.ticket-card:hover {
  border-color: #8daa67;
}
.account-card strong,
.ticket-card strong {
  display: block;
  font-size: 11px;
  line-height: 1.5;
}
.account-card > span {
  display: block;
  font-size: 10px;
  color: #77816f;
  margin-top: 8px;
}
.card-bottom {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  margin-top: 12px;
}
.card-bottom small {
  font-size: 9px;
  color: #77816f;
  line-height: 1.45;
}
.health-dot,
.signal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #8daa67;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.health-dot.amber {
  background: #c59e51;
}
.activity-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  margin-top: 18px;
  padding: 12px;
  background: #e7eedd;
  border: 1px solid #d5dfca;
  border-radius: 5px;
}
.activity-strip > span:last-child {
  color: #77816f;
  font-size: 9px;
}
.activity-strip .signal-dot {
  background: #b6fc34;
  margin: 0;
}
.data-table-wrap {
  overflow: auto;
  border: 1px solid #dce0d4;
  border-radius: 6px;
  background: #fff;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  text-align: left;
  font-size: 10px;
}
.data-table th {
  background: #f7f9f2;
  padding: 11px 12px;
  font-size: 9px;
  color: #7a8472;
  white-space: nowrap;
  font-weight: 400;
}
.data-table td {
  border-top: 1px solid #edf0e7;
  padding: 13px 12px;
  line-height: 1.5;
}
.data-table tbody tr {
  cursor: pointer;
}
.data-table tbody tr:hover {
  background: #f7f9f2;
}
.data-table td strong {
  font-weight: 600;
}
.data-table td small {
  display: block;
  font-size: 8px;
  color: #8a9482;
  margin-bottom: 4px;
}
.ticket-table td strong {
  display: block;
  font-size: 10px;
}
.pill {
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #dce4d3;
  border-radius: 4px;
  background: #f3f6ed;
  padding: 3px 7px;
  font-size: 9px;
}
.pill.blue {
  background: #edf2fa;
  color: #637ba4;
  border-color: #dbe4f3;
}
.pill.purple {
  background: #f1edf6;
  color: #8a74a6;
  border-color: #e3daee;
}
.pill.green {
  background: #eaf3df;
  color: #6a864c;
  border-color: #d8e8c7;
}
.health-score {
  color: #6a864c;
  font-size: 10px;
}
.health-score.watch {
  color: #bb9545;
}
.priority {
  font-size: 9px;
  white-space: nowrap;
}
.priority.high {
  color: #bd755d;
}
.priority.medium {
  color: #a3905b;
}
.priority.low {
  color: #7d8b72;
}
.owner-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #e9efdf;
  border: 1px solid #d4ddc8;
  border-radius: 5px;
  font-size: 8px;
  color: #657852;
}
.ticket-card > small {
  font-size: 8px;
  color: #8a9482;
}
.ticket-card strong {
  margin: 6px 0 14px;
}
.ticket-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gantt-scroll {
  overflow: auto;
  background: #fff;
  border: 1px solid #dce0d4;
  border-radius: 6px;
}
.gantt {
  min-width: 590px;
}
.gantt-header {
  display: grid;
  grid-template-columns: 155px repeat(8, minmax(0, 1fr));
  background: #f6f8f0;
  padding: 12px 0;
  font-size: 8px;
  color: #8a9482;
  border-bottom: 1px solid #dce0d4;
}
.gantt-header strong {
  font-size: 9px;
  font-weight: 400;
  padding-left: 12px;
}
.gantt-header > span {
  text-align: center;
}
.gantt-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  border-bottom: 1px solid #edf0e7;
  min-height: 64px;
}
.gantt-name {
  padding: 12px;
}
.gantt-name strong {
  display: block;
  font-size: 10px;
  font-weight: 400;
}
.gantt-name small {
  font-size: 8px;
  color: #8a9482;
}
.gantt-track {
  position: relative;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(12.5% - 1px),
    #edf0e7 calc(12.5% - 1px),
    #edf0e7 12.5%
  );
}
.gantt-bar {
  position: absolute;
  top: 17px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e6eddc;
}
.gantt-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: #8daa67;
  opacity: 0.5;
}
.gantt-bar > b {
  position: relative;
  font-size: 9px;
  font-weight: 400;
  color: #506a39;
}
.gantt-bar.blue {
  background: #dce6f5;
}
.gantt-bar.blue > span {
  background: #8aabd8;
}
.gantt-bar.blue > b {
  color: #587497;
}
.gantt-bar.purple {
  background: #ece2f4;
}
.gantt-bar.purple > span {
  background: #b293cc;
}
.gantt-bar.purple > b {
  color: #86649f;
}
.gantt-bar.amber {
  background: #f4ead0;
}
.gantt-bar.amber > span {
  background: #d5b56a;
}
.gantt-bar.amber > b {
  color: #a0884b;
}
.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 9px;
  color: #7a8472;
  margin: 14px 0;
}
.gantt-legend span,
.spend-key span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.gantt-legend i,
.spend-key i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}
.green {
  background: #8daa67;
}
.blue {
  background: #8aabd8;
}
.purple {
  background: #b293cc;
}
.amber {
  background: #d5b56a;
}
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.chart-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #dce0d4;
  border-radius: 6px;
  padding: 14px;
}
.chart-panel .panel-title {
  font-size: 11px;
}
.chart-panel .period {
  font-size: 8px;
}
.view-chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart-value {
  font:
    9px Inter,
    Arial;
  fill: #7a8472;
}
.chart-month {
  font:
    8px Inter,
    Arial;
  fill: #9aa48f;
}
.mini-legend {
  font-size: 8px;
  display: flex;
  gap: 10px;
  color: #8a9482;
  justify-content: center;
}
.mini-legend span:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: #8daa67;
  margin-right: 4px;
}
.mini-legend span + span:before {
  background: #d6dfc9;
}
.spend-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 12px 0;
}
.spend-donut {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: conic-gradient(
    #8daa67 0 58%,
    #8aabd8 58% 80%,
    #b293cc 80% 92%,
    #d5b56a 92%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.spend-donut > span {
  width: 77px;
  height: 77px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 18px;
}
.spend-donut small {
  font-size: 6px;
  color: #9aa48f;
  margin-top: 3px;
}
.spend-key {
  font-size: 8px;
  display: grid;
  gap: 8px;
  color: #7a8472;
}
.spend-key b {
  font-weight: 400;
  margin-left: auto;
}
.decision-panel {
  background: #fff;
  border: 1px solid #dce0d4;
  border-radius: 6px;
  padding: 16px;
  margin-top: 14px;
}
.decision-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: none;
  border: 0;
  border-top: 1px solid #edf0e7;
  padding: 12px 0;
  text-align: left;
  width: 100%;
  font-size: 10px;
  color: #5f6f50;
}
.decision-panel h2 {
  margin-bottom: 12px;
}
.decision-panel button span {
  font-size: 9px;
  color: #8a9482;
}
#detail-view {
  min-width: 0;
}
#crm-content,
#ticket-content {
  overflow: auto;
}
@media (max-width: 600px) {
  .view-stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .view-stat {
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    align-items: center;
  }
  .view-stat > strong {
    font-size: 23px;
    margin: 0;
    grid-column: 2;
    grid-row: 1/3;
  }
  .view-stat small {
    font-size: 9px;
  }
  .view-stat > span {
    font-size: 10px;
  }
  .finance-grid {
    grid-template-columns: 1fr;
  }
  .view-toolbar {
    display: block;
  }
  .segmented {
    width: max-content;
    margin-bottom: 10px;
  }
  .segmented button {
    padding: 7px 8px;
    font-size: 9px;
  }
  .data-table {
    min-width: 460px;
  }
  .pipeline-board,
  .ticket-board {
    min-width: 500px;
  }
  .activity-strip {
    font-size: 9px;
  }
  .chart-panel {
    padding: 12px;
  }
  .decision-panel button {
    display: block;
  }
  .decision-panel button span {
    display: block;
    margin-top: 5px;
  }
  .spend-layout {
    gap: 12px;
    flex-wrap: wrap;
  }
  .spend-key {
    width: 100%;
    max-width: 140px;
  }
  .spend-donut {
    width: 88px;
    height: 88px;
  }
  .spend-donut > span {
    width: 64px;
    height: 64px;
  }
}
