/* StepUp on Frappe — black & white operations chrome */
:root {
  --stepup-ink: #171717;
  --stepup-muted: #6c7680;
  --stepup-border: #d1d8dd;
  --stepup-surface: #ffffff;
  --stepup-bg: #f4f5f6;
  --stepup-accent: #171717;
}

body.stepup-hub-body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--stepup-bg);
  color: var(--stepup-ink);
}

.stepup-hub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.stepup-hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--stepup-border);
}

.stepup-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--stepup-ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.stepup-hub-brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stepup-hub-brand p {
  margin: 4px 0 0;
  color: var(--stepup-muted);
  font-size: 13px;
}

.stepup-hub-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--stepup-border);
  border-radius: 6px;
  background: var(--stepup-surface);
  color: var(--stepup-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.stepup-hub-actions a.primary {
  background: var(--stepup-ink);
  border-color: var(--stepup-ink);
  color: #fff;
}

.stepup-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stepup-stat {
  background: var(--stepup-surface);
  border: 1px solid var(--stepup-border);
  border-radius: 8px;
  padding: 16px;
}

.stepup-stat span {
  display: block;
  font-size: 12px;
  color: var(--stepup-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stepup-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 600;
}

.stepup-section {
  margin-bottom: 28px;
}

.stepup-section h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stepup-muted);
}

.stepup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.stepup-card {
  display: block;
  background: var(--stepup-surface);
  border: 1px solid var(--stepup-border);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stepup-card:hover {
  border-color: #99a1a9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.stepup-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stepup-muted);
  margin-bottom: 8px;
}

.stepup-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.stepup-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--stepup-muted);
  line-height: 1.45;
}

.stepup-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--stepup-border);
  font-size: 12px;
  color: var(--stepup-muted);
}

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

.stepup-chart-panel {
  background: var(--stepup-surface);
  border: 1px solid var(--stepup-border);
  border-radius: 8px;
  padding: 16px;
}

.stepup-chart-panel.wide {
  grid-column: 1 / -1;
}

.stepup-chart-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.stepup-chart-panel header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.stepup-chart-panel header span {
  font-size: 11px;
  color: var(--stepup-muted);
}

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

.stepup-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.stepup-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--stepup-ink);
}

.stepup-bar-track {
  height: 8px;
  background: #eceff1;
  border-radius: 4px;
  overflow: hidden;
}

.stepup-bar-fill {
  height: 100%;
  background: var(--stepup-ink);
  border-radius: 4px;
  min-width: 2px;
}

.stepup-bar-fill.waiter {
  background: #4a4a4a;
}

.stepup-bar-value {
  text-align: right;
  color: var(--stepup-muted);
  font-variant-numeric: tabular-nums;
}

.stepup-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 140px;
  padding-top: 8px;
}

.stepup-spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stepup-spark-bar {
  width: 100%;
  max-width: 28px;
  background: var(--stepup-ink);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}

.stepup-spark-col span {
  font-size: 9px;
  color: var(--stepup-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 48px;
}

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

/* Frappe desk white-label touches */
.navbar-brand .app-logo-title,
.app-switcher-dropdown .app-title {
  font-weight: 600;
}

@media (max-width: 900px) {
  .stepup-charts {
    grid-template-columns: 1fr;
  }

  .stepup-bar-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stepup-bar-value {
    text-align: left;
  }
}