.instruction-list {
  display: grid;
  gap: 12px;
}

.instruction-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
}

.instruction-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #252b44;
  color: #ffd34e;
  font-size: 20px;
  font-weight: 700;
}

.instruction-card h2 {
  margin: 7px 0 9px;
  font-size: 18px;
}

.instruction-card p {
  margin: 8px 0;
  line-height: 1.45;
}

.instruction-card ol,
.instruction-card ul {
  margin: 7px 0;
  padding-left: 21px;
  color: #d9dceb;
  line-height: 1.5;
}

.instruction-card li + li {
  margin-top: 5px;
}

.sla-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.sla {
  padding: 6px 9px;
  border-radius: 14px;
  font-size: 11px;
}

.sla.normal { background: #173c31; color: #58dda5; }
.sla.high { background: #41391c; color: #ffd75a; }
.sla.urgent { background: #47212b; color: #ff7182; }
.help-card { border-color: #4c5270; }

.control .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(120px, auto));
  align-items: center;
  gap: 10px;
}

.control .section-head > div:first-child {
  min-width: 0;
}

.control .section-head > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  white-space: nowrap;
  font-weight: 600;
}

#export-leads {
  border-color: #3e62a8;
  background: #202b47;
  color: #c7d7ff;
}

#toggle-overdue {
  border-color: #654536;
  background: #32241f;
  color: #ffc09a;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metrics-period {
  display: block;
  margin: 2px 2px 9px;
  color: #858da7;
  font-size: 11px;
  text-align: right;
}

.daily-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 12px;
  padding: 14px 16px;
  border: 1px solid #35548b;
  border-radius: 16px;
  background: linear-gradient(135deg, #182640, #1a2035);
  box-shadow: inset 4px 0 #5897ff;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 14px;
}

.summary-row .daily-summary,
.summary-row .hero-card {
  min-height: 150px;
  margin: 0;
}

.summary-row .daily-summary {
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.summary-row #daily-details {
  text-align: left;
}

.summary-row .hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.summary-row .hero-card > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.summary-row .hero-card > b {
  margin: 6px 0;
  font-size: 38px;
}

.summary-row .hero-card > small {
  font-size: 11px;
}

.daily-summary > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.daily-summary span {
  color: #9db9ed;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.daily-summary b {
  font-size: 23px;
}

#daily-details {
  color: #bdc8dd;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.daily-summary.has-alert {
  border-color: #6c3f4a;
  box-shadow: inset 4px 0 #e5586c;
}

.kpi-grid article {
  position: relative;
  min-height: 116px;
  padding: 13px 15px;
  overflow: hidden;
  border-color: #343a52;
  background: linear-gradient(145deg, #191c2c, #151827);
}

.kpi-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #5897ff;
}

.kpi-grid .kpi-time::before { background: #54d796; }
.kpi-grid .kpi-overdue::before { background: #e5586c; }
.kpi-grid .kpi-conversion::before { background: #b28cff; }

.kpi-grid article > span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.kpi-grid article > b {
  margin: 10px 0 7px;
  font-size: 29px;
  line-height: 1;
}

.kpi-grid article > small {
  color: #aeb4c8;
  line-height: 1.35;
}

.hero-card {
  background: linear-gradient(135deg, #d96831, #ed9656);
  box-shadow: 0 12px 32px #d9683126;
}

.hero-card.quality-warning {
  background: linear-gradient(135deg, #b94055, #e36a68);
}

.hero-card .progress {
  height: 9px;
  margin: 4px 0 8px;
}

.hero-card .progress i {
  transition: width .35s ease;
}

@media (max-width: 560px) {
  .daily-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  #daily-details {
    text-align: left;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid article,
  .kpi-grid article:last-child {
    grid-column: auto;
    min-height: 112px;
  }

  .control .section-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control .section-head > div:first-child {
    grid-column: 1 / -1;
  }

  .control .section-head > button {
    width: 100%;
    min-height: 50px;
    padding: 10px 8px;
  }

  #bottom-nav button {
    min-width: 16.666%;
    padding: 8px 2px;
  }

  #bottom-nav button span {
    font-size: 10px;
  }
}

@media (max-width: 410px) {
  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-row .daily-summary,
  .summary-row .hero-card {
    min-height: 132px;
  }
}
