.prof-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.prof-card {
  min-height: 108px; background: var(--surface); border-radius: 16px;
  padding: 16px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer; position: relative; text-align: center; border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.prof-card.active { border-color: var(--sec-color); background: var(--sec-bg-tint); }
.prof-card .prof-icon { font-size: 36px; }
.prof-card .prof-title { font-size: var(--font-base); font-weight: 700; color: var(--text); }
.prof-check { position: absolute; top: 8px; right: 8px; font-size: 14px; color: var(--sec-color); font-weight: 800; display: none; }
.prof-card.active .prof-check { display: block; }
.direction-card {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: var(--surface); border-radius: 14px; border: 1px solid var(--border); cursor: pointer;
  box-shadow: var(--card-shadow);
}
.direction-card.selected { border-color: var(--sec-color); background: var(--sec-bg-tint); }
.direction-card.already { opacity: 0.55; cursor: default; }
.dir-check-box { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.direction-card.selected .dir-check-box { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-on); }

.sticky-onboarding-bar {
  position: sticky;
  top: -14px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -14px -16px 14px -16px;
  padding: 12px 16px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(var(--panel-blur));
  -webkit-backdrop-filter: blur(var(--panel-blur));
}
.onboarding-sticky-title { font-size: var(--font-base); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: center; color: var(--text); }

.history-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.history-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.history-search-input {
  width: 100%;
  min-height: 50px;
  height: 50px;
  padding: 0 14px 0 42px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
}
.history-search-input:focus {
  border: 1.5px solid var(--sec-color);
}

.history-filter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}
.btn-filter {
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  box-shadow: none;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}
.btn-filter.active {
  background: transparent;
  border-bottom-color: var(--copper, var(--accent-fill));
  color: var(--text);
  font-weight: 800;
}

.history-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--btn2-shadow);
  padding: 14px 16px;
  margin-bottom: 0;
}
.history-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.history-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-sub {
  font-size: 17px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-row-3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.history-row-4 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 2px;
}
.history-total {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.history-date {
  font-size: 17px;
  color: var(--text-muted);
  white-space: nowrap;
}
.missing-mat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 15px;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.history-viewed-inline {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 500;
}
.btn-history-more {
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.history-sec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.sec-chip { background: var(--surface-2); font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); }

.empty-state-card { text-align: center; padding: 36px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty-state-card p { font-size: 16px; color: var(--text-muted); max-width: 320px; margin: 0 auto; }
.actions-subrow { display: flex; gap: 10px; }
/* Кнопка «Новая смета» над списком смет */
.history-new { width: 100%; margin-bottom: 14px; }
