/* Dashboard layout */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
@media (max-width: 1100px) {
  .dash-two-col { grid-template-columns: 1fr; }
}

/* Activity table — used in dashboard preview and full activity log */
.activity-table {
  width: 100%;
  border-collapse: collapse;
}
.activity-row { border-top: 1px solid #f1f3f5; }
.activity-row:first-child { border-top: 0; }
.activity-row td { padding: 10px 14px; vertical-align: middle; }
.activity-row:hover { background: #fafbfc; }

.activity-row__time {
  font-size: 12px;
  color: #6b7480;
  white-space: nowrap;
  width: 90px;
  font-variant-numeric: tabular-nums;
}
.activity-row__subject { min-width: 240px; }
.activity-row__subject-line {
  font-size: 13.5px;
  line-height: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.activity-row__sender {
  font-size: 11.5px;
  color: #6b7480;
  margin-top: 2px;
}
.activity-row__action { width: 1%; white-space: nowrap; }
.activity-row__rule { width: 1%; white-space: nowrap; }
.activity-row__cta { width: 1%; white-space: nowrap; text-align: right; }

/* Rule count pill row */
.rule-counts {
  display: flex;
  align-items: center;
  gap: 18px;
}
.rule-counts__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rule-counts__num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  line-height: 30px;
  color: #0c1116;
  letter-spacing: -0.01em;
}
.rule-counts__label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-heading);
}
.rule-counts__divider { width: 1px; height: 28px; background: #eceef1; }

/* Bar list */
.rule-bars { display: flex; flex-direction: column; gap: 8px; }
.rule-bar {
  display: grid;
  grid-template-columns: 1fr 70px 36px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.rule-bar__name {
  color: #1a1d21;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  cursor: pointer;
}
.rule-bar__name:hover { color: var(--accent-color, var(--assh-teal)); }
.rule-bar__track {
  height: 6px;
  background: #f0f2f5;
  border-radius: 999px;
  overflow: hidden;
}
.rule-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color, var(--assh-teal)), color-mix(in oklab, var(--accent-color, var(--assh-teal)) 70%, #fff));
  border-radius: 999px;
  transition: width var(--dur-base) var(--ease-std);
}
.rule-bar__num {
  font-size: 12px;
  color: #475260;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Run now progress overlay */
.run-now {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 33, 0.20);
  z-index: 80;
  overflow: hidden;
  animation: run-now-in 220ms var(--ease-std);
}
@keyframes run-now-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.run-now__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eceef1;
}
.run-now__icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--assh-teal-c);
  color: var(--assh-teal-dark);
  display: flex; align-items: center; justify-content: center;
}
.run-now__title {
  flex: 1;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  color: #0c1116;
}
.run-now__title small {
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  color: #6b7480;
}
.run-now__body { padding: 12px 14px; }
.run-now__progress {
  height: 6px;
  background: #f0f2f5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.run-now__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--assh-teal), var(--assh-green));
  transition: width 0.4s var(--ease-std);
}
.run-now__stats {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #6b7480;
}
.run-now__log {
  max-height: 140px;
  overflow: auto;
  margin: 10px -14px -12px;
  padding: 6px 14px 12px;
  border-top: 1px solid #eceef1;
  background: #fafbfc;
  font-size: 11.5px;
  color: #475260;
  display: flex; flex-direction: column; gap: 4px;
}
.run-now__log-item { display: flex; gap: 6px; align-items: flex-start; line-height: 16px; }
.run-now__log-item .dot { margin-top: 5px; }
