/* dashboard.css — sales KPI dashboard layout (uses intièra tokens from styles.css) */

.dash {
  min-height: 100vh;
  background: var(--ivory);
}

/* Top bar */
.dash-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.dash-top .logo { font-size: 22px; }
.dash-divider { width: 1px; height: 24px; background: var(--line); }
.dash-title { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }

.seg {
  display: inline-flex;
  background: var(--bone);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  transition: all 0.15s;
}
.seg button.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(31,27,23,0.08); }

.dash-body { padding: 32px 40px 80px; max-width: 1480px; margin: 0 auto; }

/* Section heading */
.dash-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 40px 0 18px;
}
.dash-section-head:first-child { margin-top: 8px; }
.dash-section-head h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-style: italic;
  font-weight: 500;
  margin: 0;
}
.dash-section-head .rule { flex: 1; height: 1px; background: var(--line); }
.dash-section-head .meta { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; }

/* KPI grid */
.kpi-grid { display: grid; gap: 16px; }
.kpi-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.c2 { grid-template-columns: repeat(2, 1fr); }

.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kpi-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kpi-label .tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--cream);
  color: var(--ochre-deep);
  padding: 2px 6px;
  border-radius: 3px;
}
.kpi-value {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.kpi-value .unit { font-size: 22px; color: var(--ink-mute); font-style: italic; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 999px;
}
.delta.up { background: #E5E8DC; color: var(--sage); }
.delta.down { background: #F3E0D8; color: var(--clay); }
.delta.flat { background: var(--bone); color: var(--ink-mute); }
.delta-base { font-size: 11px; color: var(--ink-mute); }

/* Big feature card */
.kpi-feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.kpi-feature .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }

/* Table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.dash-table th {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bone);
  white-space: nowrap;
}
.dash-table th:first-child, .dash-table td:first-child { text-align: left; }
.dash-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  text-align: right;
  font-family: var(--mono);
}
.dash-table td:first-child { font-family: var(--sans); }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr { cursor: pointer; transition: background 0.12s; }
.dash-table tbody tr:hover { background: var(--bone); }
.dash-table tr.selected { background: var(--cream); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream); color: var(--ochre-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; margin-right: 10px; vertical-align: middle;
  flex-shrink: 0;
}
.avatar.off { background: var(--bone); color: var(--ink-mute); }

.cell-name { display: flex; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.status-dot.on { background: var(--sage); }
.status-dot.off { background: var(--line); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px;
  background: var(--bone); color: var(--ink-soft); font-weight: 500;
}

/* Insight callout */
.callout {
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: 24px 28px;
  display: flex;
  gap: 24px;
  align-items: center;
}
.callout .big { font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1; }
.callout .big .pos { color: #B9C7A0; }

@media (max-width: 1200px) {
  .kpi-grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.c3 { grid-template-columns: repeat(2, 1fr); }
}
