:root {
  --bg: #eef1f4;
  --card: #ffffff;
  --ink: #1e3a5f;          /* navy — judul & angka */
  --ink-soft: #33445c;
  --muted: #8a96a3;
  --line: #e6eaef;
  --line-soft: #eef2f6;

  --navy: #1e3a5f;
  --navy-dark: #16304f;
  --blue: #2f6fb0;
  --blue-bright: #4aa3d9;
  --blue-tile: #e5eff8;
  --gold: #e0a94a;

  --ok: #1a7f37;
  --ok-bg: #e6f4ea;
  --prog: #9a6700;
  --prog-bg: #fdf1d6;
  --block: #b42318;
  --block-bg: #fbe9e7;

  --add-bg: #e6ffec;
  --del-bg: #ffebe9;
  --hunk-bg: #eef2f6;

  --radius: 14px;
  --shadow: 0 6px 20px rgba(30, 58, 95, 0.08);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* pengaman: ikon inline SVG tanpa dimensi jangan sampai melar */
svg:not(.bg-deco) { max-width: 100%; }
.stat-label svg, .btn .ico, .tile svg, .foot-ico svg, .logo svg { flex: none; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- ornamen background ---------- */
.bg-deco {
  position: fixed;
  bottom: 0;
  width: 340px;
  height: 340px;
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}
.bg-deco-left { left: 0; }
.bg-deco-right { right: 0; }

/* ---------- header ---------- */
.site-header {
  position: relative;
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%, #21456e 100%);
  color: #fff;
  overflow: hidden;
}
.header-shapes { position: absolute; inset: 0; pointer-events: none; }
.header-shapes .shape {
  position: absolute;
  top: -40px;
  height: 200px;
  width: 120px;
  transform: skewX(-24deg);
  opacity: 0.18;
  background: #fff;
}
.header-shapes .s1 { right: 180px; }
.header-shapes .s2 { right: 90px; opacity: 0.1; }
.header-shapes .s3 { right: 30px; width: 60px; }
.header-shapes .gold { background: var(--gold); opacity: 0.9; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; }
.logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.logo svg { width: 30px; height: 30px; }
.brand-divider { width: 1px; height: 30px; background: rgba(255, 255, 255, 0.35); }
.brand-title { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.2px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn:hover { background: #f2f6fb; }
.btn .ico { width: 16px; height: 16px; }

/* ---------- breadcrumb / chip ---------- */
.breadcrumb {
  position: relative;
  z-index: 1;
  padding: 22px 32px 4px;
  font-size: 0.82rem;
}
.breadcrumb .chip,
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #dcebf8;
  color: var(--blue);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  vertical-align: middle;
}
.breadcrumb .chip svg,
.breadcrumb a svg { width: 15px; height: 15px; flex: none; }
.breadcrumb a:hover { background: #cfe3f5; }
.crumb-sep { margin: 0 8px; color: #b7c3d0; }
.crumb-current {
  color: var(--muted);
  font-weight: 600;
  padding: 6px 4px;
}

/* ---------- main ---------- */
main.wrap { position: relative; z-index: 1; padding-top: 8px; padding-bottom: 56px; }

.page-head { margin: 6px 0 26px; }
.page-title { font-size: 2.1rem; font-weight: 800; color: var(--navy); margin: 4px 0 6px; letter-spacing: -0.5px; }
.page-sub { color: var(--muted); font-size: 0.95rem; margin: 0; }

h2 { font-size: 1.3rem; color: var(--navy); font-weight: 700; margin: 8px 0 16px; }
h3 { font-size: 1rem; color: var(--navy); font-weight: 700; margin: 26px 0 12px; }

.muted { color: var(--muted); }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.85em; }

/* ---------- kartu ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 58, 95, 0.16);
  border-color: #a9cbe8;
  outline: none;
}
.card:hover::before,
.card:focus-visible::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(var(--blue), var(--blue-bright));
}

/* ornamen sudut kanan bawah kartu */
.corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46px;
  height: 46px;
  background:
    linear-gradient(135deg, transparent 50%, var(--gold) 50%) top right / 46px 46px no-repeat,
    linear-gradient(135deg, transparent 58%, var(--navy) 58%) bottom right / 46px 46px no-repeat;
  opacity: 0.9;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--navy); flex: 1; }
.tile {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--blue-tile);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}
.tile svg { width: 22px; height: 22px; }
.pct-pill {
  background: var(--line-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 13px;
  border-radius: 999px;
  flex: none;
}

/* progress bar */
.bar {
  height: 10px;
  background: #e9edf1;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* baris statistik dalam kartu */
.stat-row { display: flex; }
.stat {
  flex: 1;
  padding: 2px 14px;
  min-width: 0;
}
.stat + .stat { border-left: 1px solid var(--line-soft); }
.stat:first-child { padding-left: 0; }
.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.stat-label svg { width: 14px; height: 14px; color: var(--blue); flex: none; }
.stat-val {
  display: block;
  margin-top: 5px;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.98rem;
}

/* strip ringkasan di halaman tim / mahasiswa */
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.summary .s-label { color: var(--muted); font-size: 0.78rem; font-weight: 500; display: block; }
.summary .s-val { color: var(--navy); font-weight: 700; font-size: 1.05rem; }

/* ---------- tabel ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; min-width: 620px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th {
  background: #f5f8fb;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #eef0f3;
  color: var(--muted);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.prog { background: var(--prog-bg); color: var(--prog); }
.badge.block { background: var(--block-bg); color: var(--block); }
.badge.info { background: var(--blue-tile); color: var(--blue); }

/* ---------- commit list ---------- */
.commit-list { list-style: none; padding: 0; margin: 0; }
.commit-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.commit-item a { text-decoration: none; color: var(--ink); }
.commit-item a:hover .commit-msg { text-decoration: underline; }
.sha {
  background: var(--blue-tile);
  color: var(--blue);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.commit-msg { font-weight: 600; color: var(--navy); }
.commit-sub { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 0.82rem; }
.commit-sub .ai { color: var(--blue); }

.commit-meta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.commit-meta p { margin: 7px 0; }
.commit-meta a { color: var(--blue); }

/* ---------- diff ---------- */
.diff {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  padding: 10px 0;
  box-shadow: var(--shadow);
}
.diff > div { padding: 0 14px; white-space: pre; }
.d-add { background: var(--add-bg); }
.d-del { background: var(--del-bg); }
.d-hunk { color: #57606a; background: var(--hunk-bg); }
.d-file { color: var(--muted); font-weight: 600; }

/* ---------- notice ---------- */
.notice {
  background: #e9f1f9;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 0.9rem;
}
.notice.error { background: var(--block-bg); border-left-color: var(--block); }
.notice a { color: var(--blue); }

/* ---------- alerts ---------- */
.alert-list { display: grid; gap: 12px; }
.alert-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--prog);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.alert-item:has(.badge.block) { border-left-color: var(--block); }
.alert-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alert-reason { margin: 10px 0 6px; color: var(--ink-soft); }
.alert-context { margin: 0 0 8px; font-weight: 600; }
.alert-context a { color: var(--blue); }
.alert-observation { color: var(--muted); font-size: 0.84rem; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 32px 48px;
  font-size: 0.85rem;
}
.foot-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue-tile);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}
.foot-ico svg { width: 18px; height: 18px; }
#generatedAt { color: var(--muted); }
#generatedAt strong { color: var(--navy); }

/* ---------- responsif ---------- */
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .header-inner, .site-footer { padding-left: 18px; padding-right: 18px; }
  .breadcrumb { padding-left: 18px; padding-right: 18px; }
  .page-title { font-size: 1.6rem; }
  .grid { grid-template-columns: 1fr; }
}
