/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Roboto', sans-serif;
  background: #f8f9fa;
  color: #202124;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: 256px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 20px;
  font-family: 'Google Sans', sans-serif;
  font-size: 18px;
  color: #202124;
  text-decoration: none;
}

.sidebar-logo svg { flex-shrink: 0; }

.new-run-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 16px 20px;
  background: #c2e7ff;
  border: none;
  border-radius: 16px;
  font-family: 'Google Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #001d35;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}

.new-run-btn:hover {
  background: #a8d8f8;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.new-run-btn .btn-icon { font-size: 20px; }

.nav-section {
  padding: 4px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-radius: 0 24px 24px 0;
  margin-right: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #444746;
  text-decoration: none;
  transition: background .12s;
}

.nav-item:hover { background: #f1f3f4; }

.nav-item.active {
  background: #d3e3fd;
  color: #0b57d0;
  font-weight: 700;
}

.nav-item .nav-icon {
  width: 22px;
  text-align: center;
  font-size: 18px;
  opacity: .8;
}

/* ─── Main content ──────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
}

.page-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 24px;
  color: #202124;
  margin-bottom: 28px;
}

/* ─── Stat cards ────────────────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 24px;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #444746;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

.stat-card .stat-value {
  font-family: 'Google Sans', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #202124;
  line-height: 1.1;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: #0b57d0;
  margin-top: 6px;
}

.stat-card .stat-sub.muted { color: #80868b; }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e0e0e0;
  font-family: 'Google Sans', sans-serif;
  font-size: 16px;
  color: #202124;
}

.card-header a {
  font-size: 13px;
  color: #0b57d0;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
}

.card-body { padding: 20px 24px; }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

th {
  padding: 10px 24px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: #444746;
  text-transform: uppercase;
  letter-spacing: .6px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

td {
  padding: 14px 24px;
  font-size: 14px;
  color: #202124;
  border-bottom: 1px solid #f1f3f4;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f9fa; }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success { background: #e6f4ea; color: #137333; }
.badge-warning { background: #fef7e0; color: #b05e00; }
.badge-error   { background: #fce8e6; color: #c5221f; }
.badge-neutral { background: #f1f3f4; color: #5f6368; }

/* ─── Links & buttons ────────────────────────────────────────────────────────── */
.link {
  color: #0b57d0;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}

.link:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow .15s, background .15s;
}

.btn-primary {
  background: #0b57d0;
  color: #fff;
}

.btn-primary:hover { background: #0842a0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

.btn-outline {
  background: #fff;
  color: #0b57d0;
  border: 1px solid #dadce0;
}

.btn-outline:hover { background: #f8f9fa; }

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #80868b;
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-top: 4px; }

/* ─── Flash messages ─────────────────────────────────────────────────────────── */
.flash {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.flash-info    { background: #e8f0fe; color: #1a73e8; }
.flash-success { background: #e6f4ea; color: #137333; }
.flash-error   { background: #fce8e6; color: #c5221f; }
