.dashboard-upload { text-decoration: none; }

.dashboard-shell { padding-bottom: 64px; }

.report-button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--blue-700);
  color: var(--blue-700);
  background: var(--white);
}

.report-button:hover { color: var(--white); background: var(--blue-700); }
.report-button > span { font-size: 18px; line-height: 1; }

.summary-grid {
  display: grid;
  padding: 16px 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.summary-card {
  display: grid;
  min-height: 86px;
  padding: 13px 16px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(11, 31, 51, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.summary-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(11, 31, 51, 0.1); }
.summary-card:focus-visible { outline: 3px solid rgba(24, 103, 255, 0.24); outline-offset: 2px; }
.summary-card[aria-pressed="true"] { border-color: var(--blue-700); box-shadow: 0 0 0 2px rgba(13, 126, 214, 0.15); }
.summary-card__icon { display: grid; width: 34px; height: 34px; grid-row: span 2; place-items: center; border-radius: 9px; font-size: 19px; font-weight: 800; }
.summary-card strong { display: block; color: #173957; font-size: 24px; line-height: 1; }
.summary-card small { display: block; margin-top: 5px; font-size: 13px; font-weight: 700; }
.summary-card i { grid-column: 2; color: var(--muted); font-size: 11px; font-style: normal; }
.summary-card--rejected .summary-card__icon { color: #a7193f; background: #ffe2e8; }
.summary-card--sms .summary-card__icon { color: #8a5900; background: #fff2cd; }
.summary-card--complete .summary-card__icon { color: #087832; background: #eaf7ee; }

.houses {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.houses-toolbar {
  display: grid;
  min-height: 78px;
  padding: 16px 20px;
  grid-template-columns: minmax(120px, auto) minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.houses-toolbar__title { padding-right: 12px; }
.houses-toolbar__title h1 { margin: 0; color: #173957; font-size: 18px; line-height: 1.15; }
.houses-toolbar__title span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dashboard-search { width: 100%; min-width: 0; margin: 0; }
.dashboard-filter select { min-height: 42px; }
.attention-toggle { display: inline-flex; min-height: 42px; padding: 0 14px; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d3a4af; border-radius: 8px; color: #8f2440; background: var(--white); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.attention-toggle > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #a7193f; background: #ffe1e8; font-size: 12px; }
.attention-toggle:hover, .attention-toggle[aria-pressed="true"] { border-color: #c82d53; background: #fff0f3; }
.attention-toggle:focus-visible { outline: 3px solid rgba(200, 45, 83, 0.2); outline-offset: 2px; }

.houses-table-wrap { overflow-x: auto; border-radius: 0; }
.houses-table { width: 100%; min-width: 1240px; border-spacing: 0; table-layout: fixed; }
.houses-table th, .houses-table td { padding: 14px 12px; vertical-align: middle; overflow-wrap: normal; }
.houses-table th {
  height: 48px;
  padding: 10px 12px;
  color: #566677;
  background: #f5f8fa;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.houses-table th:nth-child(1) { width: 260px; }
.houses-table th:nth-child(2) { width: 90px; }
.houses-table th:nth-child(3) { width: 90px; }
.houses-table th:nth-child(4) { width: 90px; }
.houses-table th:nth-child(5) { width: 76px; }
.houses-table th:nth-child(6) { width: 130px; }
.houses-table th:nth-child(7) { width: 150px; }
.houses-table th:nth-child(8) { width: 200px; }
.houses-table th:nth-child(9) { width: 110px; }
.houses-table td { border-top: 1px solid #e4ebf1; color: #33485c; background: var(--white); font-size: 13px; }
.houses-table tbody tr:first-child td { border-top: 0; }
.houses-table tbody tr:hover td { filter: brightness(0.99); }
.houses-table td:first-child { padding-left: 16px; border-left: 4px solid transparent; }
.house-row--rejected td { background: #fff6f8; }
.house-row--rejected td:first-child { border-left-color: #d9385f; }
.house-row--sms td { background: #fffaf0; }
.house-row--sms td:first-child { border-left-color: #e1a528; }
.house-row--waiting td { background: #f7f9fb; }
.house-row--waiting td:first-child { border-left-color: #8091a3; }
.house-row--complete td { background: #f1faf4; }
.house-row--complete td:first-child { border-left-color: #28a45b; }
.house-address { display: block; color: #173957; font-size: 14px; line-height: 1.35; }
.house-address + span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.metric { display: inline-flex; min-width: 30px; min-height: 28px; padding: 0 8px; align-items: center; justify-content: center; border-radius: 8px; font-weight: 750; }
.metric--neutral { color: #31506d; background: #eaf0f5; }
.metric--waiting { color: #4c5967; background: #e9edf1; }
.metric--danger { color: #a7193f; background: #ffe1e8; }
.metric--warning { color: #825400; background: #ffedbd; }
.metric--zero { color: #708090; background: transparent; }
.activity { display: block; color: #30475d; line-height: 1.35; }
.activity small { display: block; color: var(--muted); font-size: 11px; }
.house-state { display: inline-flex; min-height: 30px; padding: 5px 9px; align-items: center; gap: 7px; border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1.2; }
.house-state::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.house-state--rejected { color: #a7193f; background: #ffe1e8; }
.house-state--sms { color: #825400; background: #ffedbd; }
.house-state--waiting { color: #53667a; background: #e9edf1; }
.house-state--complete { color: #087832; background: #dff3e5; }
.open-house { display: inline-flex; min-height: 34px; padding: 0 12px; align-items: center; justify-content: center; border: 1px solid #a8bed4; border-radius: 8px; color: var(--blue-700); background: var(--white); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.open-house:hover { border-color: var(--blue-700); background: #eef6fc; }
.open-house:focus-visible { outline: 3px solid rgba(24, 103, 255, 0.22); outline-offset: 2px; }

.dashboard-empty { display: grid; min-height: 230px; place-content: center; gap: 6px; color: var(--muted); text-align: center; }
.dashboard-empty strong { color: #33485c; font-size: 16px; }
.dashboard-empty[hidden] { display: none; }

.houses-footer {
  display: flex;
  min-height: 64px;
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}
.houses-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.page-size { display: flex; margin-left: auto; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.page-size select { min-width: 72px; }
.pagination { display: flex; align-items: center; gap: 10px; color: #43576b; font-size: 12px; font-weight: 650; }
.pagination button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #c7d1dc; border-radius: 8px; color: var(--blue-700); background: var(--white); font-size: 22px; line-height: 1; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: var(--blue-700); background: #eef6fc; }
.pagination button:disabled { color: #aab4be; background: #f4f6f8; cursor: default; }

@media (max-width: 1120px) {
  .houses-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .houses-toolbar__title, .dashboard-search { grid-column: 1 / -1; }
  .report-button { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .report-button { width: 100%; }
  .summary-grid { padding: 12px; grid-template-columns: 1fr; }
  .summary-card { min-height: 104px; }
  .houses { border: 0; background: transparent; box-shadow: none; }
  .houses-toolbar { padding: 0 0 14px; grid-template-columns: 1fr; border: 0; }
  .houses-toolbar__title, .dashboard-search { grid-row: auto; grid-column: auto; }
  .dashboard-filter select { width: 100%; }
  .attention-toggle { width: 100%; }
  .houses-table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .houses-footer { margin-top: 12px; padding: 12px 0; align-items: stretch; flex-wrap: wrap; }
  .houses-footer p { flex-basis: 100%; }
  .page-size { margin-left: 0; }
  .pagination { margin-left: auto; }
}
