.custom-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.custom-nav a {
  color: var(--body-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.25);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin: 24px 0;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 22px;
  grid-column: span 2;
}

.card {
  background: linear-gradient(180deg, rgba(23, 27, 38, 0.94), rgba(15, 18, 27, 0.98));
  border: 1px solid rgba(144, 158, 184, 0.18);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.form-card {
  max-width: 820px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stats div {
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 18px;
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 34px;
  line-height: 1.1;
  color: #f4f7ff;
}

.stats span {
  color: #b7c0d9;
  font-size: 15px;
}

.button {
  display: inline-block;
  background: linear-gradient(135deg, #7c5cff, #2dd4bf);
  color: #0d1018;
  border-radius: 999px;
  padding: 12px 20px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 12px 30px rgba(69, 211, 196, 0.18);
}

.button.secondary {
  background: linear-gradient(135deg, #1d2636, #273247);
  color: #e9eeff;
  box-shadow: none;
}

.button:disabled,
.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.batch-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.batch-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: #b7c0d9;
  margin-top: 10px;
}

.batch-progress {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.batch-progress-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(144, 158, 184, 0.16);
  border: 1px solid rgba(144, 158, 184, 0.18);
}

.batch-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #2dd4bf);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.28);
  transition: width 0.35s ease;
}

.batch-progress-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #d6def4;
  font-size: 14px;
}

.batch-progress-stats strong {
  color: #f4f7ff;
}

.batch-llm-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: #cbd6f0;
  font-size: 14px;
}

.batch-llm-stats strong {
  color: #f4f7ff;
}

.batch-progress-static .batch-progress-bar span {
  background: linear-gradient(90deg, #5d718c, #8aa4c1);
  box-shadow: none;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(144, 158, 184, 0.14);
  text-align: left;
  padding: 12px 10px;
  vertical-align: top;
}

.table th {
  color: #f4f7ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table td {
  color: #d6def4;
}

.review-table .phrase-cell {
  min-width: 320px;
  max-width: 520px;
  line-height: 1.55;
}

.table-link {
  color: #8ae6da;
  font-weight: 700;
  text-decoration: none;
}

.table-link:hover {
  color: #b6fff6;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-found {
  color: #75f0b0;
  background: rgba(54, 179, 126, 0.14);
  border: 1px solid rgba(54, 179, 126, 0.28);
}

.status-running {
  color: #7fdcff;
  background: rgba(87, 194, 255, 0.14);
  border: 1px solid rgba(87, 194, 255, 0.28);
}

.status-missing {
  color: #ff7f7f;
  background: rgba(222, 86, 86, 0.14);
  border: 1px solid rgba(222, 86, 86, 0.28);
}

.status-captcha {
  color: #ffc14d;
  background: rgba(255, 173, 51, 0.16);
  border: 1px solid rgba(255, 173, 51, 0.34);
}

.status-manual_review,
.status-removed,
.status-scheduled,
.status-imported,
.status-needs_refresh,
.status-challenge_open {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.12);
  border: 1px solid rgba(255, 179, 71, 0.26);
}

.status-error {
  color: #ff8d8d;
  background: rgba(222, 86, 86, 0.14);
  border: 1px solid rgba(222, 86, 86, 0.28);
}

.status-active {
  color: #75f0b0;
  background: rgba(54, 179, 126, 0.14);
  border: 1px solid rgba(54, 179, 126, 0.28);
}

.status-completed {
  color: #75f0b0;
  background: rgba(54, 179, 126, 0.14);
  border: 1px solid rgba(54, 179, 126, 0.28);
}

.status-canceled,
.status-failed {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.12);
  border: 1px solid rgba(255, 179, 71, 0.26);
}

.status-disabled {
  color: #90a0b8;
  background: rgba(144, 160, 184, 0.12);
  border: 1px solid rgba(144, 160, 184, 0.22);
}

.status-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-form select,
.session-form select,
.session-form input[type="text"],
.session-form input[type="url"],
.session-form textarea {
  min-width: 210px;
  border-radius: 12px;
  border: 1px solid rgba(144, 158, 184, 0.25);
  background: rgba(17, 21, 31, 0.95);
  color: #f4f7ff;
  padding: 10px 12px;
}

.session-form {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(160px, 200px) minmax(240px, 1fr);
  gap: 10px;
  align-items: start;
}

.session-form textarea {
  min-width: 0;
  resize: vertical;
}

.session-form .button {
  justify-self: start;
}

.session-form-new {
  margin-top: 8px;
}

.session-table td {
  vertical-align: top;
}

.challenge-actions {
  display: grid;
  gap: 8px;
}

.challenge-note,
.muted {
  color: #b7c0d9;
  font-size: 13px;
  line-height: 1.4;
}

.button.small {
  padding: 10px 14px;
  font-size: 14px;
}

.card h1,
.card h2 {
  color: #f8fbff;
  margin-top: 0;
}

.card p,
.card li,
.card label {
  color: #ccd5eb;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .dashboard-summary {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }

  .review-table .phrase-cell {
    min-width: 0;
    max-width: none;
  }

  .status-form {
    flex-direction: column;
    align-items: stretch;
  }

  .session-form {
    grid-template-columns: 1fr;
  }
}
