.home-workspace {
  display: grid;
  gap: 16px;
}

.home-command-bar,
.home-active-card,
.home-next-card {
  border: 1px solid rgba(111, 73, 184, 0.14);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(58, 36, 95, 0.08);
  backdrop-filter: blur(8px);
}

.home-command-bar {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  border-radius: 28px;
}

.home-command-bar h2 {
  margin: 4px 0 2px;
  font-size: clamp(28px, 2.7vw, 39px);
}

.home-command-bar p {
  margin: 0;
  color: #5d4a77;
  font-weight: 850;
}

.home-command-actions,
.home-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.home-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.home-active-card,
.home-next-card {
  min-height: 136px;
  border-radius: 26px;
  padding: 17px 20px;
}

.home-active-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-active-card h3,
.home-next-card h3 {
  margin: 3px 0 7px;
  font-size: 25px;
}

.home-active-card p,
.home-next-card p {
  margin: 4px 0;
  color: #5d4a77;
  font-weight: 820;
  line-height: 1.45;
}

.home-active-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-active-facts > span {
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(111, 73, 184, 0.07);
  color: #5d4a77;
  font-size: 13px;
  font-weight: 850;
}

.home-focus-actions {
  max-width: 330px;
  justify-content: flex-start;
}

.home-active-card .home-focus-actions {
  min-width: 300px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-active-card .home-focus-actions .primary-action {
  grid-column: 1 / -1;
}

.home-next-card button {
  margin-top: 8px;
}

.home-block-title {
  margin: 0 0 9px;
  font-size: 20px;
}

.home-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.home-metric {
  min-width: 0;
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(111, 73, 184, 0.13);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 9px 24px rgba(58, 36, 95, 0.06);
}

.home-metric[role="button"] {
  cursor: pointer;
}

.home-metric[role="button"]:hover,
.home-metric[role="button"]:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(111, 73, 184, 0.3);
  outline: none;
}

.home-metric-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(111, 73, 184, 0.09);
  color: var(--purple);
  font-size: 20px;
  font-weight: 950;
}

.home-metric strong,
.home-metric b,
.home-metric small {
  display: block;
}

.home-metric strong {
  color: #5d4a77;
  font-size: 12px;
}

.home-metric b {
  margin: 2px 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.15;
}

.home-metric small {
  color: #76638f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.home-quick-action {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.76);
}

.home-quick-action span {
  font-size: 20px;
}

@media (max-width: 1180px) {
  .home-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-command-bar,
  .home-active-card {
    align-items: stretch;
    flex-direction: column;
  }

  .home-focus-grid {
    grid-template-columns: 1fr;
  }

  .home-focus-actions {
    max-width: none;
  }
}

@media (max-width: 650px) {
  .home-command-bar {
    padding: 18px;
  }

  .home-command-actions > *,
  .home-focus-actions > * {
    flex: 1 1 140px;
  }

  .home-metrics-grid,
  .home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .home-metrics-grid,
  .home-quick-actions {
    grid-template-columns: 1fr;
  }
}

.home-detail-panel{scroll-margin-top:112px;padding:18px;border:1px solid rgba(111,73,184,.18);border-radius:24px;background:rgba(255,255,255,.86);box-shadow:0 12px 30px rgba(58,36,95,.08)}
.home-detail-head,.home-detail-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.home-detail-head h3{margin:4px 0 0;font-size:23px}
.home-detail-list{display:grid;gap:9px;margin-top:14px}
.home-detail-row{padding:13px 15px;border:1px solid rgba(111,73,184,.12);border-radius:17px;background:rgba(111,73,184,.045)}
.home-detail-row strong,.home-detail-row span,.home-detail-row small{display:block}
.home-detail-row strong{color:var(--ink);font-size:17px}
.home-detail-row span{margin-top:2px;color:#5d4a77;font-weight:850}
.home-detail-row small{margin-top:3px;color:#76638f;font-weight:750}
.home-detail-empty{margin:0;padding:20px;border-radius:17px;background:rgba(111,73,184,.045);color:#5d4a77;font-weight:850;text-align:center}
@media(max-width:650px){.home-detail-head,.home-detail-row{align-items:stretch;flex-direction:column}}

.home-service-clients{gap:12px}
.home-detail-client{padding:15px;border:1px solid rgba(111,73,184,.15);border-radius:19px;background:rgba(111,73,184,.035)}
.home-detail-client-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.home-detail-client-head>strong{color:var(--ink);font-size:18px}
.home-detail-payment{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding:9px 11px;border-radius:14px;background:rgba(182,138,58,.09)}
.home-detail-payment span{color:#5d4a77;font-size:13px;font-weight:850}
.home-detail-payment b{color:#2f1d54}
.home-detail-services{display:grid;gap:7px;margin-top:10px}
.home-detail-service-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(170px,.7fr);gap:12px;align-items:center;padding:9px 11px;border:1px solid rgba(111,73,184,.10);border-radius:13px;background:rgba(255,255,255,.72)}
.home-detail-service-row span{color:#2f1d54;font-weight:900}
.home-detail-service-row small{color:#76638f;font-weight:800}
.home-detail-service-row small b{color:#5d4a77}
@media(max-width:650px){.home-detail-client-head{align-items:stretch;flex-direction:column}.home-detail-service-row{grid-template-columns:1fr}}


.home-service-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(170px, .8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(111, 73, 184, .12);
  border-radius: 17px;
  background: rgba(111, 73, 184, .04);
}

.home-service-tools label {
  display: grid;
  gap: 5px;
}

.home-service-tools label > span {
  color: #5d4a77;
  font-size: 12px;
  font-weight: 900;
}

.home-service-tools input,
.home-service-tools select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(111, 73, 184, .2);
  border-radius: 12px;
  background: #fff;
  color: #2f1d54;
  font: inherit;
  font-weight: 800;
}

.home-service-tools input {
  padding: 8px 12px;
}

.home-service-tools select {
  padding: 8px 10px;
}

.home-service-reset {
  min-height: 42px;
  white-space: nowrap;
}

.home-service-results {
  margin-top: 9px;
  color: #5d4a77;
  font-size: 13px;
  font-weight: 850;
}

.home-detail-client[hidden],
.home-detail-empty[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .home-service-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .home-service-tools {
    grid-template-columns: 1fr;
  }
}
