.batch-dashboard-page {
  display: grid;
  gap: 18px;
}

#batch-dashboard-content {
  display: grid;
  gap: 30px;
}

.batch-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.batch-dashboard-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.batch-dashboard-head p {
  margin: 0;
  color: #506180;
}

.batch-dashboard-head-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.batch-dashboard-filters {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.batch-dashboard-filters label {
  display: grid;
  gap: 6px;
  position: relative;
}

.batch-dashboard-filters span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f607d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.batch-dashboard-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.batch-dashboard-select {
  position: relative;
}

.batch-dashboard-select .app-select-button {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d3ddec;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #1b2740;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s ease;
}

.batch-dashboard-select .app-select-button:hover {
  border-color: #c0cee4;
  background: #f8fbff;
}

.batch-dashboard-select .app-select-button.open {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.batch-dashboard-select .app-select-button svg {
  width: 16px;
  height: 16px;
  color: #60708a;
  transition: transform .18s ease;
}

.batch-dashboard-select .app-select-button.open svg {
  transform: rotate(180deg);
}

.batch-dashboard-select .app-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-dashboard-select .app-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transform-origin: top center;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.batch-dashboard-select .app-select-menu.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.batch-dashboard-select .app-select-item {
  width: 100%;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #273651;
  text-align: left;
  cursor: pointer;
  padding: 9px 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.batch-dashboard-select .app-select-item:hover {
  background: #f3f7ff;
}

.batch-dashboard-select .app-select-item.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(14, 165, 233, 0.12));
  color: #2a4bbf;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2ddec;
  background: #ffffff;
  color: #273651;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-link:hover {
  border-color: #bacbe6;
  background: #f8fbff;
}

.batch-dashboard-page h2 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

#batch-dashboard-content .shell-panel {
  scroll-margin-top: 110px;
}

.batch-status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.batch-status-pill.queued,
.batch-status-pill.processing {
  background: #eef4ff;
  color: #2a4bbf;
}

.batch-status-pill.complete {
  background: rgba(209, 250, 229, 0.84);
  color: #166534;
}

.batch-status-pill.partial {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.batch-status-pill.error {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.batch-title-cell {
  display: grid;
  gap: 4px;
}

.batch-title-cell strong {
  color: #162138;
  font-size: 0.9rem;
}

.batch-title-cell span {
  color: #62738f;
  font-size: 0.78rem;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e8edf3;
  padding: 8px 6px;
  font-size: 0.84rem;
  vertical-align: top;
}

th {
  color: #5f6f88;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-empty {
  color: #60708a;
}

.batch-dashboard-auth-gate {
  text-align: center;
}

.batch-dashboard-auth-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px 20px;
  border: 1px dashed #c9d7eb;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(42, 75, 191, 0.05), rgba(20, 85, 150, 0.08));
}

.batch-dashboard-auth-eyebrow {
  margin: 0;
  color: #49617f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.batch-dashboard-auth-card h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #162138;
}

.batch-dashboard-auth-card p {
  margin: 0;
  max-width: 560px;
  color: #536985;
}

.batch-dashboard-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-link.primary {
  background: #1f4acc;
  border-color: #1f4acc;
  color: #fff;
}

.btn-link.primary:hover {
  background: #183da9;
  border-color: #183da9;
}

.batch-cards {
  display: none;
}

.batch-card {
  border: 1px solid #dde6f2;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(18, 39, 77, 0.05);
}

.batch-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.batch-card-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #162138;
}

.batch-card-head p {
  margin: 6px 0 0;
  color: #60708a;
  font-size: 0.82rem;
  line-height: 1.45;
}

.batch-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.batch-card-meta span {
  display: grid;
  gap: 2px;
  font-size: 0.82rem;
  color: #44556f;
}

.batch-card-meta strong {
  color: #6a7b95;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.batch-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.batch-card-empty {
  border: 1px dashed #d7e2f0;
  border-radius: 14px;
  padding: 14px;
  color: #60708a;
  background: #fbfdff;
}

@media (max-width: 800px) {
  .batch-dashboard-filters {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    display: none;
  }

  .batch-cards {
    display: grid;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .batch-dashboard-auth-actions {
    display: grid;
    width: 100%;
  }

  .batch-dashboard-auth-actions .btn-link,
  .batch-card-actions .btn-link {
    width: 100%;
  }

  .batch-card-meta {
    grid-template-columns: 1fr;
  }
}
