.slot-query-card {
  margin-bottom: 20px;
  padding: 22px;
  border-color: #cfe0f4;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.slot-query-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.slot-query-heading .eyebrow {
  margin: 0 0 4px;
  color: #3873ab;
  font-size: 12px;
}

.slot-query-heading h2 { margin: 0 0 5px; }
.slot-query-heading p { margin: 0; color: #66758a; }

.slot-safe-note {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #217645;
  font-size: 13px;
  font-weight: 700;
}

.slot-query-form {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(150px, .8fr) minmax(260px, 1.8fr) auto;
  align-items: end;
  gap: 12px;
}

.slot-query-form label {
  display: grid;
  gap: 6px;
  color: #21496e;
  font-weight: 700;
}

.slot-query-form input,
.slot-query-form select {
  width: 100%;
  min-height: 43px;
  box-sizing: border-box;
}

.slot-query-form button { min-height: 43px; }

.slot-message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
}

.slot-message.error { background: #fff0f0; color: #b42318; }
.slot-message.empty { background: #f2f6fb; color: #52647a; }
.slot-results { display: grid; gap: 12px; margin-top: 18px; }

.slot-result {
  overflow: hidden;
  border: 1px solid #d8e4f1;
  border-radius: 13px;
  background: #fff;
}

.slot-result > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4edf7;
  background: linear-gradient(135deg, #eef6ff, #f8fbff);
}

.slot-result h3 { margin: 0 0 3px; }
.slot-result header p { margin: 0; color: #6b7b90; }

.slot-totals {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.slot-total {
  display: grid;
  min-width: 92px;
  padding: 9px 13px;
  border: 1px solid #cbdff3;
  border-radius: 11px;
  background: #fff;
  text-align: center;
}

.slot-total b { color: #1765a7; font-size: 23px; line-height: 1.05; }
.slot-total span { margin-top: 4px; color: #567089; font-size: 12px; }
.slot-total.invalid { border-color: #efcfab; background: #fff9f1; }
.slot-total.invalid b { color: #b45f19; }

.slot-groups { display: grid; gap: 14px; padding: 16px; background: #fff; }
.slot-group { overflow: hidden; border: 1px solid #dbe7f3; border-radius: 11px; background: #fbfdff; }
.slot-group.invalid { border-color: #ead7c3; background: #fffaf5; }
.slot-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #e4edf7;
  color: #245f91;
  font-size: 13px;
}
.slot-group.invalid .slot-group-title { border-color: #f0dfcf; color: #9a581e; }
.slot-group-title span { color: #718298; font-size: 12px; }
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; }

.slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #82b9ea;
  border-radius: 9px;
  background: #eaf5ff;
  color: #155c99;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(39, 107, 166, .08);
}

.slot-pill.outside { border-color: #ccd3dc; background: #f1f3f5; color: #66717f; }
.slot-pill small { padding: 2px 5px; border-radius: 5px; background: #fff; font-size: 11px; font-weight: 500; }

@media (max-width: 760px) {
  .slot-query-card { padding: 16px; }
  .slot-query-heading { flex-direction: column; }
  .slot-query-form { grid-template-columns: 1fr 1fr; }
  .slot-query-input, .slot-query-form button { grid-column: 1 / -1; }
  .slot-result > header { align-items: flex-start; flex-direction: column; }
  .slot-totals { width: 100%; }
  .slot-total { flex: 1; }
}

@media (max-width: 460px) {
  .slot-query-form { grid-template-columns: 1fr; }
  .slot-query-input, .slot-query-form button { grid-column: auto; }
  .slot-groups { padding: 12px; }
  .slot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-pill { justify-content: center; padding-inline: 7px; font-size: 13px; }
}
