:root {
  --bg: #0f1723;
  --bg-soft: #182334;
  --card: rgba(17, 26, 41, 0.72);
  --line: rgba(175, 201, 255, 0.24);
  --text: #ebf4ff;
  --muted: #a4b8d8;
  --accent: #2dd4bf;
  --accent-2: #f97316;
  --danger: #ef4444;
  --shadow: 0 16px 48px rgba(5, 14, 32, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, #213752 0%, #0f1723 45%),
    radial-gradient(circle at 88% 5%, #462126 0%, transparent 45%),
    #0f1723;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(94, 124, 180, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 124, 180, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 10%, transparent 70%);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(65px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: #16a34a;
  left: -90px;
  top: 40%;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #fb923c;
  right: -120px;
  top: 8%;
}

.topbar,
.layout {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 1rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.73rem;
  color: #90a9ce;
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin-top: 0.35rem;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.pill {
  border: 1px solid rgba(64, 255, 215, 0.35);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #70f3df;
  font-size: 0.85rem;
}

.layout {
  padding: 0 1rem 2rem;
  display: grid;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  padding: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.8rem;
  color: #97b0d6;
}

input,
select,
button {
  border-radius: 10px;
  border: 1px solid rgba(145, 174, 226, 0.27);
  background: rgba(5, 12, 24, 0.5);
  color: var(--text);
  height: 40px;
  padding: 0 0.65rem;
  font-family: inherit;
}

.search-field {
  min-width: 230px;
}

.btn {
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(22, 163, 116, 0.3);
}

.btn.primary {
  background: linear-gradient(110deg, #0ea5a3, #15c18e);
  border-color: transparent;
  color: #05221f;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.kpi {
  padding: 1rem;
}

.kpi p {
  margin: 0;
  color: #a5bddf;
  font-size: 0.86rem;
}

.kpi h3 {
  margin: 0.5rem 0 0;
  font-size: 1.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}

.chart-panel {
  padding: 1rem;
}

.chart-panel h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.table-panel {
  padding: 1rem;
}

.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 950px;
}

th,
td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid rgba(153, 180, 228, 0.16);
  font-size: 0.85rem;
}

th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8ea6cb;
}

.status-chip {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.status-Submitted {
  background: rgba(34, 197, 94, 0.2);
  color: #7ff0b1;
}

.status-Failed {
  background: rgba(239, 68, 68, 0.2);
  color: #ffadad;
}

.status-Queued,
.status-RetryQueued,
.status-Processing {
  background: rgba(14, 165, 233, 0.2);
  color: #9dd9ff;
}

.link-btn {
  color: #80f3da;
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .controls {
    grid-template-columns: 1fr;
  }
}
