@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #0f1724;
  --panel: rgba(18, 27, 40, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f4f2ee;
  --muted: #a8b2c0;
  --accent: #f4b860;
  --accent-2: #45c3b8;
  --danger: #f97316;
  --success: #4ade80;
  --shadow: 0 18px 50px rgba(10, 12, 22, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Work Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1b2a3e, #0b111c 55%, #060a12);
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  background: radial-gradient(circle, rgba(244, 184, 96, 0.55), transparent 70%);
  top: -160px;
  left: -120px;
}

.orb-b {
  background: radial-gradient(circle, rgba(69, 195, 184, 0.45), transparent 70%);
  bottom: -160px;
  right: -120px;
  animation-delay: 4s;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  background: rgba(7, 11, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1d1c1a;
  font-weight: 700;
}

.brand-text {
  font-size: 1.05rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(244, 184, 96, 0.18);
}

.logout button {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout button:hover {
  color: var(--text);
  border-color: rgba(244, 184, 96, 0.4);
}

.content {
  position: relative;
  z-index: 1;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  margin: 0 0 8px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-pill {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 160px;
  text-align: right;
}

.hero-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-pill strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s ease both;
}

.panel h2 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-row:last-child {
  border-bottom: none;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeUp 0.4s ease both;
}

.table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeUp 0.4s ease both;
}

.table.four-col .table-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table.seven-col .table-row {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.table.nine-col .table-row {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.table.twelve-col .table-row {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.table.six-col .table-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.table-head {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  border: none;
  animation: none;
}

.table-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-row a {
  color: var(--accent-2);
  text-decoration: none;
}

.table-row a:hover {
  text-decoration: underline;
}

.mono {
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
}

.status {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.status.succeeded,
.status.open {
  color: var(--success);
}

.status.running,
.status.queued {
  color: var(--accent);
}

.status.closed {
  color: var(--muted);
}

.status.failed,
.status.canceled {
  color: var(--danger);
}

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

input,
select,
button,
textarea {
  font-family: "Work Sans", sans-serif;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 36, 0.85);
  color: var(--text);
  padding: 8px 12px;
}

textarea {
  width: 100%;
  margin-top: 12px;
  resize: vertical;
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b1a17;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.artifact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.artifact-list a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  position: relative;
  z-index: 1;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 420px;
  width: 100%;
  text-align: left;
  animation: fadeUp 0.6s ease both;
}

.login-card h1 {
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
}

.login-card p {
  margin-top: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.login-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

.alert {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  padding: 10px 12px;
  border-radius: 12px;
  margin-top: 12px;
}

.login-hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(20px);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .content {
    padding: 24px 18px;
  }

  .table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
