:root {
  --bg: #fbf6ed;
  --panel: rgba(255, 255, 255, 0.82);
  --ink: #1d2433;
  --muted: #5a6478;
  --accent: #d96f32;
  --accent-2: #1f6e78;
  --danger: #a83434;
  --border: rgba(29, 36, 51, 0.1);
  --shadow: 0 24px 80px rgba(34, 26, 12, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 111, 50, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(31, 110, 120, 0.18), transparent 35%),
    linear-gradient(135deg, #f8f2e8, #eef7f6);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  padding: 24px;
  background: rgba(15, 21, 32, 0.92);
  color: #eef3ff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar h1, .hero h2, .panel h2, .panel h3 { margin: 0; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.muted { color: var(--muted); }
.menu { display: grid; gap: 10px; }
.menu a {
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 14px;
}

.content { padding: 28px; display: grid; gap: 24px; }
.hero, .panel, .worker-card, .login-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero, .panel { padding: 24px; }
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.metric {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}
.metric span { display: block; color: var(--muted); font-size: 0.9rem; }
.metric strong { font-size: 1.3rem; }

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

.worker-card { padding: 18px; display: grid; gap: 16px; }
.worker-top, .actions, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.job-form, .stack, .grid-2 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: grid; gap: 8px; font-weight: 600; }
input, select, button {
  font: inherit;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 12px 14px;
}
button {
  background: linear-gradient(135deg, var(--accent), #e6a148);
  color: white;
  border: none;
  cursor: pointer;
}
button.ghost, a.ghost {
  background: rgba(31, 110, 120, 0.08);
  color: var(--accent-2);
  text-decoration: none;
}
button.danger { background: linear-gradient(135deg, var(--danger), #d95c5c); color: white; }
.wide { width: 100%; }

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(29, 36, 51, 0.08);
}
.status-running { background: rgba(45, 140, 87, 0.14); color: #1f7d4e; }
.status-idle { background: rgba(29, 36, 51, 0.08); }
.status-error, .status-manual_verification_required { background: rgba(168, 52, 52, 0.12); color: var(--danger); }
.status-completed { background: rgba(31, 110, 120, 0.12); color: var(--accent-2); }
.status-waiting_resources { background: rgba(217, 111, 50, 0.12); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: right; }
dl { margin: 0; display: grid; gap: 10px; }
dl div { display: flex; justify-content: space-between; gap: 10px; }
dt { color: var(--muted); }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { width: min(100%, 460px); padding: 30px; }
.console {
  background: #101622;
  color: #d7e6ff;
  padding: 18px;
  border-radius: 20px;
  overflow: auto;
}
.counter { font-size: 5rem; font-weight: 800; text-align: center; }
.test-target { text-align: center; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-radius: 0 0 24px 24px; }
  .content { padding: 18px; }
}

