/* PDDIKTI Undip — tema biru korporat Undip */

:root {
  --navy-900: #07224b;
  --navy-800: #0a2e63;
  --blue-700: #0e4a8a;
  --blue-600: #11579e;
  --blue-050: #eef4fb;
  --gold: #f3b31b;
  --gold-soft: #fdf3d6;
  --bg: #f2f6fb;
  --surface: #ffffff;
  --border: #dce5f0;
  --border-strong: #c8d6e6;
  --ink: #10233d;
  --muted: #5b6e88;
  --ok: #16794a;
  --ok-bg: #e7f6ee;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 10px 26px rgba(10, 46, 99, 0.07);
  --shadow-sm: 0 2px 8px rgba(10, 46, 99, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; color: var(--navy-900); letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--blue-700); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------- top navigation ----------------------------- */

.topbar {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 48%, var(--blue-700) 100%);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.brand-mark-lg { width: 54px; height: 54px; border-radius: 14px; font-size: 18px; }

/* logo institusi di kiri top navigasi (PNG putih transparan dari Direktorat Akademik) */
.brand-logo {
  display: block;
  height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em; }
.brand-text small { font-size: 11px; color: rgba(255, 255, 255, 0.68); letter-spacing: 0.02em; }

.mainnav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.dropdown { position: relative; }
.dropdown.open .caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 198px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(10, 46, 99, 0.16);
  padding: 6px;
  display: none;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}

.dropdown-menu a:hover { background: var(--blue-050); color: var(--blue-700); }
.dropdown-menu a.is-active { background: var(--blue-050); color: var(--blue-700); font-weight: 600; }

.userbox {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.user-meta strong { color: #fff; font-size: 13px; font-weight: 600; }
.user-meta small { color: var(--gold); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.logout-form { margin: 0; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 17px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.nav-toggle span:not(.sr-only) + span:not(.sr-only) { margin-top: 4px; }

/* ----------------------------- layout ----------------------------- */

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-600);
  margin-bottom: 6px;
}
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.page-footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card-title { font-size: 15.5px; font-weight: 700; color: var(--navy-900); }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ----------------------------- rekap pelaporan (dashboard) ----------------------------- */

.rekap-table { min-width: 760px; }
.rekap-table thead th.num-head { text-align: center; width: 88px; }

.rekap-table tbody td { text-align: center; }
.rekap-table tbody td.num,
.rekap-table tbody td:first-child { text-align: left; }
.rekap-table td:nth-child(2) { text-align: left; }

.rekap-label { font-weight: 600; color: var(--navy-900); text-decoration: none; }
a.rekap-label:hover { color: var(--blue-700); text-decoration: underline; }

.rekap-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* total prodi jenjang (kiri) */
.rekap-total-num { font-weight: 600; color: var(--navy-800); }

/* jumlah yang sudah dikirim (kanan): hijau bila ada, merah bila masih 0 */
.rekap-sudah { font-weight: 700; }
.rekap-sudah.is-on { color: var(--ok); }
.rekap-sudah.is-empty { color: var(--danger); }
.rekap-sep { color: #c2cddb; margin: 0 5px; }

.rekap-legend {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.rekap-legend-demo {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f4f7fc;
  border: 1px solid var(--border);
  margin: 0 2px;
}
.rekap-legend .rekap-sudah,
.rekap-legend .rekap-total-num { padding: 0 4px; border-radius: 4px; background: #f4f7fc; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-050);
  border: 1px solid var(--border);
  color: var(--blue-700);
  font-size: 11.5px;
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: minmax(300px, 330px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.split > .card:first-child .card-title { margin-bottom: 18px; }

/* ----------------------------- stats ----------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--navy-800); line-height: 1.1; }
.stat-note { font-size: 12.5px; color: var(--muted); }
.stat-wide { justify-content: center; gap: 10px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* rincian jumlah prodi per jenjang di kartu dashboard */
.jenjang-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.jenjang-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-050);
  border: 1px solid #c9d9f0;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.jenjang-pill b { color: var(--blue-700); font-weight: 700; }
.jenjang-pill span { color: var(--navy-800); font-weight: 600; }

/* ----------------------------- forms ----------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--navy-800); }
.field small { font-size: 11.5px; color: var(--muted); }

input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='tel'],
input[type='url'],
select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: #9aa9bd; }

input:focus,
select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(17, 87, 158, 0.14);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%235b6e88' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* checkbox group (mis. Semester: Gasal / Genap) */

.check-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.check-group > legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-800);
}

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

.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.check:hover { border-color: var(--blue-600); background: #f8fbff; }

.check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue-700);
  cursor: pointer;
}

.check:has(input[type='checkbox']:checked) {
  border-color: var(--blue-600);
  background: var(--blue-050);
  color: var(--blue-700);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--blue-600);
}

.check:has(input[type='checkbox']:focus-visible) {
  box-shadow: 0 0 0 3px rgba(17, 87, 158, 0.14);
}

/* ----------------------------- buttons ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
  border-color: var(--blue-700);
}
.btn-primary:hover { background: var(--navy-800); border-color: var(--navy-800); }

.btn-outline {
  background: #fff;
  color: var(--blue-700);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--blue-050); border-color: var(--blue-600); }

.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #f1c9c4;
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }

.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; padding: 11px 16px; }

/* ----------------------------- alerts ----------------------------- */

.alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert-error { background: var(--danger-bg); border-color: #f4c7c2; color: #8c1c14; }
.alert-ok { background: var(--ok-bg); border-color: #bfe6d1; color: #0f5c39; }

/* ----------------------------- search bar ----------------------------- */

.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.searchbar input[type='search'] { flex: 1 1 220px; min-width: 0; }

/* ----------------------------- filter & form inline ----------------------------- */

.filterbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fbff;
}

.field-inline { min-width: 220px; }

.form-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

/* select semester + tombol Set Prodi berdampingan (hemat tempat) */
.field-pair {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.field-pair > .field {
  flex: 0 1 300px;
  min-width: 200px;
  gap: 6px;
}

.field-pair > .field span { display: block; }

.btn-set { flex: 0 0 auto; height: 43px; }

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.inline-form { margin: 0; }

/* ----------------------------- tables ----------------------------- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow-x: auto;
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.data-table thead th {
  background: #eef3fa;
  color: var(--navy-800);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f8;
  vertical-align: middle;
  color: var(--ink);
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fbff; }

.data-table .num { width: 52px; text-align: left; color: var(--muted); }
.data-table .mono { font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.cell-strong { font-weight: 600; color: var(--navy-900); }
.cell-sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.data-table .empty { padding: 26px 14px; text-align: center; color: var(--muted); }

.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.row-actions form { margin: 0; }

/* ----------------------------- perintah / copy / status kirim ----------------------------- */

.data-table-wide { min-width: 900px; }

.cmd {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 7px;
  background: #f4f7fc;
  border: 1px solid var(--border);
  color: var(--navy-800);
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.btn-kirim {
  min-width: 82px;
  font-weight: 600;
  box-shadow: none;
}

/* Belum = merah */
.btn-kirim.tone-merah {
  background: var(--danger-bg);
  border-color: #f4c7c2;
  color: var(--danger);
}
.btn-kirim.tone-merah:hover { background: #fbdcd8; border-color: #eeb0a9; }

/* Kirim (klik pertama) = netral */
.btn-kirim.tone-netral {
  background: #f2f4f7;
  border-color: #dfe4ec;
  color: #545f70;
}
.btn-kirim.tone-netral:hover { background: #e8ecf3; border-color: #c9d2de; }

/* Kirim 1 = hijau */
.btn-kirim.tone-hijau {
  background: var(--ok-bg);
  border-color: #bfe6d1;
  color: var(--ok);
}
.btn-kirim.tone-hijau:hover { background: #d9f0e4; border-color: #a5dcc0; }

/* Kirim 2 = biru */
.btn-kirim.tone-biru {
  background: #e8effb;
  border-color: #c9d9f0;
  color: var(--blue-700);
}
.btn-kirim.tone-biru:hover { background: #d8e5f8; border-color: #adc6e8; }

/* Kirim 3 dan seterusnya = ungu */
.btn-kirim.tone-ungu {
  background: #f1e9fd;
  border-color: #d9c9f5;
  color: #6b3fa0;
}
.btn-kirim.tone-ungu:hover { background: #e7dbfb; border-color: #c9b2ef; }

.btn-copied {
  background: var(--ok-bg) !important;
  border-color: #bfe6d1 !important;
  color: var(--ok) !important;
}

/* ----------------------------- badges ----------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe6d1; }
.badge-off { background: #f2f4f7; color: #545f70; border-color: #dfe4ec; }
.badge-soft { background: var(--gold-soft); color: #8a6205; border-color: #f2dfa9; margin-left: 8px; }

.badge-level { text-transform: capitalize; }
.badge-admin { background: #e8effb; color: var(--blue-700); border-color: #c9d9f0; }
.badge-operator { background: var(--gold-soft); color: #8a6205; border-color: #f2dfa9; }
.badge-mhs { background: #eaf5f1; color: #0f5c39; border-color: #c3e4d5; }
.badge-jenjang { background: var(--blue-050); color: var(--blue-700); border-color: #c9d9f0; font-weight: 700; }

/* ----------------------------- login ----------------------------- */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(243, 179, 27, 0.18), transparent 60%),
    radial-gradient(760px 460px at 88% 92%, rgba(17, 87, 158, 0.42), transparent 62%),
    linear-gradient(150deg, #07224b 0%, #0a2e63 55%, #0e4a8a 100%);
}

.login-wrap { width: 100%; max-width: 412px; display: flex; flex-direction: column; gap: 18px; }

.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 34px 30px 26px;
  box-shadow: 0 26px 60px rgba(3, 18, 42, 0.4);
  border-top: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.login-head h1 { font-size: 21px; margin-top: 4px; }
.login-head p { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }

.login-foot { text-align: center; font-size: 12px; color: var(--muted); }
.login-back { text-align: center; font-size: 12.5px; margin: 0; }
.login-back a { color: var(--blue-700); font-weight: 600; text-decoration: none; }
.login-back a:hover { text-decoration: underline; }
.login-copy { text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, 0.68); margin: 0; }

/* ----------------------------- pengajuan layanan (mahasiswa) ----------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }

textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: none;
  resize: vertical;
  min-height: 96px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea::placeholder { color: #9aa9bd; }
textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(17, 87, 158, 0.14); }

.count-hint {
  align-self: flex-end;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

input[type='file'] {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  cursor: pointer;
}

input[type='file']:hover { border-color: var(--blue-600); }

input[type='file']::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-700);
  background: var(--blue-050);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  cursor: pointer;
}

.check-col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.check-col .check { justify-content: flex-start; }

.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }

.doc-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fbff;
}

.doc-item.is-hidden { display: none; }
.doc-item.has-file { background: #fff; border-color: #c9d9f0; }
.doc-item small { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.doc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
}

.doc-req {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c9d9f0;
  color: var(--blue-700);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.doc-existing { font-size: 12px; }
.doc-existing a { font-weight: 600; }

.mhs-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.mhs-hero-text { display: flex; flex-direction: column; gap: 4px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-badge-lg { font-size: 13px; padding: 6px 14px; }
/* warna badge mengikuti jenjang status (1 -> 5) */
.status-proses { background: var(--gold-soft); color: #8a6205; border-color: #f2dfa9; }
.status-diproses { background: #e8effb; color: var(--blue-700); border-color: #c1d5f0; }
.status-surat { background: #f1e9fd; color: #6b3fa0; border-color: #d9c9f5; }
.status-submit { background: #e7ecfa; color: #2b3d9b; border-color: #c3cdf1; }
.status-diterima { background: var(--ok-bg); color: var(--ok); border-color: #bfe6d1; }
.status-ditolak { background: var(--danger-bg); color: var(--danger); border-color: #f4c7c2; }

/* kartu status: garis kiri mengikuti tahap */
.status-card-proses { border-left-color: var(--gold); }
.status-card-diproses { border-left-color: var(--blue-700); }
.status-card-surat { border-left-color: #8b5cf6; }
.status-card-submit { border-left-color: #2b3d9b; }
.status-card-diterima { border-left-color: var(--ok); }
.status-card-ditolak { border-left-color: var(--danger); }

/* ----------------------------- tombol aksi berjenjang (admin) ----------------------------- */

.status-step {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 2px;
  text-align: right;
}
.status-step b { color: var(--navy-900); }

.status-final { font-size: 12.5px; color: var(--muted); text-align: right; max-width: 260px; }

.status-actions-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.status-action { margin: 0; }

.btn-step {
  font-weight: 700;
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
  padding: 10px 18px;
}

/* warna tombol berbeda tiap langkah */
.btn-step.tone-biru { background: var(--blue-700); }
.btn-step.tone-biru:hover { background: var(--navy-800); }

.btn-step.tone-ungu { background: #7c3aed; }
.btn-step.tone-ungu:hover { background: #6b28d9; }

.btn-step.tone-indigo { background: #2b3d9b; }
.btn-step.tone-indigo:hover { background: #22307c; }

.btn-step.tone-hijau { background: var(--ok); }
.btn-step.tone-hijau:hover { background: #0f5c39; }

.btn-step.tone-merah { background: var(--danger); }
.btn-step.tone-merah:hover { background: #8c1c14; }

.btn-step.tone-gold { background: var(--gold); color: var(--navy-900); }
.btn-step.tone-gold:hover { background: #ffc53d; }

/* Verifikasi Ditolak: tombol merah membuka form catatan */
.reject-box { display: inline-block; max-width: 100%; }

.reject-box[open] { width: 420px; max-width: 100%; }

.reject-box > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.reject-box > summary::-webkit-details-marker { display: none; }
.reject-box[open] > summary { background: #8c1c14; }

.reject-form {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #f4c7c2;
  border-radius: 11px;
  background: #fff8f7;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, 100%);
  text-align: left;
}
.reject-form .field > span { color: var(--danger); }
.reject-form textarea { min-height: 92px; }
.reject-form .form-actions { justify-content: flex-end; margin-top: 0; }

.note-box { display: flex; flex-direction: column; gap: 4px; line-height: 1.6; }
.note-box .pre { white-space: pre-wrap; }

/* keterangan tahapan pada daftar pengajuan admin — 3 kolom agar tidak memanjang ke bawah */
.tahap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tahap-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fbff;
  min-width: 0;
}

.tahap-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tahap-label { font-size: 12.5px; font-weight: 600; color: var(--navy-900); line-height: 1.3; }
.tahap-oleh { font-size: 11px; color: var(--muted); }

/* kartu ringkasan per tahap pada daftar pengajuan admin */
.stat-grid-tahap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-grid-tahap .stat { padding: 16px 18px; gap: 2px; }
.stat-grid-tahap .stat-value { font-size: 26px; }
.stat-grid-tahap .stat-label { font-size: 11px; letter-spacing: 0.05em; }
.stat-grid-tahap .stat-note { font-size: 11.5px; }

/* garis atas berwarna sesuai tahap */
.stat-grid-tahap .stat { border-top: 3px solid var(--border-strong); }
.stat-grid-tahap .stat-total { border-top-color: var(--navy-800); }
.stat-grid-tahap .stat-proses { border-top-color: var(--gold); }
.stat-grid-tahap .stat-diproses { border-top-color: var(--blue-700); }
.stat-grid-tahap .stat-surat { border-top-color: #7c3aed; }
.stat-grid-tahap .stat-submit { border-top-color: #2b3d9b; }
.stat-grid-tahap .stat-diterima { border-top-color: var(--ok); }
.stat-grid-tahap .stat-ditolak { border-top-color: var(--danger); }

.stat-grid-tahap .stat-diterima .stat-value { color: var(--ok); }
.stat-grid-tahap .stat-ditolak .stat-value { color: var(--danger); }

/* kartu ringkasan bisa diklik -> langsung membuka tabel terfilter sesuai tahap */
.stat-link {
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-link:hover,
.stat-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(10, 46, 99, 0.14);
  border-color: var(--blue-600);
  outline: none;
}

.stat-link .stat-go {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-700);
  opacity: 0.75;
}

.stat-link:hover .stat-go { opacity: 1; text-decoration: underline; }

/* tahap yang sedang difilter ditandai */
.stat-link.is-active {
  border-color: var(--blue-600);
  box-shadow: inset 0 0 0 1px var(--blue-600), var(--shadow);
}

/* scroll ke tabel tidak tertutup topbar sticky */
#data-pengajuan { scroll-margin-top: 84px; }

/* filter bar pada daftar pengajuan admin */
.filterbar-pengajuan { align-items: flex-end; }
.filterbar-pengajuan .field-inline { flex: 1 1 190px; min-width: 160px; }
.filterbar-pengajuan .field-inline > span { font-size: 12px; }
.filterbar-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* navigasi halaman tabel */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pager-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pager-num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--blue-700);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.pager-num:hover { background: var(--blue-050); border-color: var(--blue-600); }
.pager-num.is-active {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #fff;
  cursor: default;
}

.pager .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

/* peringatan merah di kolom Status: Surat Pernyataan belum diunggah */
.warn-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--danger-bg);
  border: 1px solid #f4c7c2;
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  max-width: 210px;
}

.warn-note:hover { background: #fbdcd8; border-color: var(--danger); color: var(--danger); }

.warn-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.status-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-left: 4px solid var(--border-strong);
}

.status-card-proses { border-left-color: var(--gold); }
.status-card-ditolak { border-left-color: var(--danger); }
.status-card-text { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.status-card-title { margin: 2px 0 4px; }
.status-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.jenis-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  margin: 1px 0;
  border-radius: 999px;
  background: var(--blue-050);
  border: 1px solid #c9d9f0;
  color: var(--blue-700);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.detail-list { margin: 0; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.detail-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); border-bottom: 1px solid #eef2f8; }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { padding: 12px 14px; background: #f8fbff; font-size: 12.5px; font-weight: 600; color: var(--navy-800); }
.detail-row dd { margin: 0; padding: 12px 14px; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.detail-row dd .pre { white-space: pre-wrap; }
.detail-row dd .cell-sub { margin-top: 3px; }

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

.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.doc-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbff;
}
.doc-list-label { min-width: 150px; font-size: 12.5px; font-weight: 700; color: var(--navy-800); }
.doc-list-name { flex: 1 1 160px; min-width: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ----------------------------- daftar akun mahasiswa ----------------------------- */

.login-wrap-wide { max-width: 470px; }

.login-alt { text-align: center; font-size: 12.5px; color: var(--muted); margin: 0; }
.login-alt a { color: var(--blue-700); font-weight: 600; text-decoration: none; }
.login-alt a:hover { text-decoration: underline; }

.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { flex: 1 1 auto; min-width: 0; }
.captcha-q {
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 9px;
  background: var(--blue-050);
  border: 1px solid var(--border-strong);
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ----------------------------- cetak surat permohonan ----------------------------- */

.cetak-body { background: #eef2f8; }

.cetak-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cetak-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* panel peringatan / status Surat Pernyataan (tidak ikut tercetak) */
.surat-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.surat-panel-text { display: flex; flex-direction: column; gap: 3px; max-width: 460px; }
.surat-panel-text strong { font-size: 13.5px; color: var(--navy-900); }
.surat-panel-text span { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.surat-panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.surat-panel-warn { border-left: 4px solid var(--gold); background: #fffdf5; border-color: #f2dfa9; }
.surat-panel-ok { border-left: 4px solid var(--ok); background: #f6fdf9; border-color: #bfe6d1; }

.surat-upload { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.surat-upload input[type='file'] { max-width: 230px; padding: 6px 8px; font-size: 11.5px; }

/* lembar surat — mengikuti format dokumen resmi (Arial, spasi 1.5, rata kiri-kanan) */
.surat {
  background: #fff;
  padding: 56px 60px 64px;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(10, 46, 99, 0.14);
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 12.5px;
  line-height: 1.65;
  color: #111;
}

.surat-title {
  margin: 0 0 26px;
  text-align: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #111;
}

.surat-p { margin: 0 0 10px; }
.surat-just { text-align: justify; }

.surat-identitas { border-collapse: collapse; margin: 4px 0 18px; width: 100%; }
.surat-identitas td { padding: 3px 0; vertical-align: top; }
.surat-key { width: 132px; }
.surat-colon { width: 14px; }
.surat-val { font-weight: 400; }

.surat-jenis { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 6px 0 20px; }

.surat-check { display: inline-flex; align-items: center; gap: 8px; }

.surat-box {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid #333;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.surat-label { margin: 18px 0 4px; font-weight: 700; }
.surat-isi { margin: 0 0 4px; text-align: justify; white-space: pre-wrap; }

.surat-ttd { margin-top: 34px; }
.surat-ruang { height: 74px; }
.surat-nama { font-weight: 700; text-decoration: underline; }

.doc-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue-050);
  border: 1px solid #c9d9f0;
  color: var(--blue-700);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alert-warn {
  background: #fffdf5;
  border-color: #f2dfa9;
  color: #7a5604;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .surat { padding: 32px 24px 40px; font-size: 12px; }
  .surat-key { width: 104px; }
  .surat-panel-actions { width: 100%; }
  .surat-upload { width: 100%; }
  .surat-upload input[type='file'] { flex: 1 1 100%; max-width: none; }
  .brand-logo { height: 40px; }
}

@media (max-width: 560px) {
  .brand-logo { height: 34px; }
}

@media print {
  @page { size: A4; margin: 20mm 22mm; }

  .no-print { display: none !important; }

  html, body { background: #fff !important; }

  .cetak-wrap { max-width: none; margin: 0; padding: 0; gap: 0; }

  .surat {
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }

  .surat-title { font-size: 13pt; letter-spacing: 0; }
  .surat-box { border-color: #000; }
  .surat-ttd { page-break-inside: avoid; }
}

/* ----------------------------- bagan tahapan (horizontal) ----------------------------- */

.stepper-wrap { overflow-x: auto; padding-bottom: 4px; }

/* daftar bagan: satu bagan per pengajuan */
.stepper-list { display: flex; flex-direction: column; gap: 20px; }

.stepper-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px 8px;
  background: #f8fbff;
}

.stepper-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.stepper-title { font-size: 13px; font-weight: 700; color: var(--navy-900); }
.stepper-meta { font-size: 11.5px; color: var(--muted); }

.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 720px;
}

.stepper .step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 12px 0;
}

/* garis penghubung antar tahap */
.stepper .step::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 32px;
  right: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--border);
}
.stepper .step:last-child::before { display: none; }

.stepper .step-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-strong);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.stepper .step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.stepper .step-label { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.35; }
/* tanggal status tercapai (tanpa jam) */
.stepper .step-date {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stepper .step.is-current .step-date { color: var(--navy-800); font-weight: 600; }

/* tahap yang sudah dilalui */
.stepper .step.is-done::before { background: #b9d8c6; }
.stepper .step.is-done .step-dot {
  background: var(--ok-bg);
  border-color: #bfe6d1;
  color: var(--ok);
}
.stepper .step.is-done .step-label { color: var(--navy-900); }

/* tahap yang sedang berjalan — warna berbeda tiap tahap */
.stepper .step.is-current .step-dot { color: #fff; border-color: transparent; }
.stepper .step.is-current .step-label { color: var(--navy-900); font-weight: 700; }
.stepper .step.is-current.tone-gold .step-dot { background: var(--gold); color: var(--navy-900); }
.stepper .step.is-current.tone-biru .step-dot { background: var(--blue-700); }
.stepper .step.is-current.tone-ungu .step-dot { background: #7c3aed; }
.stepper .step.is-current.tone-indigo .step-dot { background: #2b3d9b; }
.stepper .step.is-current.tone-hijau .step-dot { background: var(--ok); }
.stepper .step.is-current.tone-merah .step-dot { background: var(--danger); }
.stepper .step.is-current .step-label::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.25;
}

/* tahap yang belum dicapai */
.stepper .step.is-todo .step-label { color: #90a0b5; }

.stepper-ringkas .step { padding-top: 8px; padding-bottom: 8px; }

@media (max-width: 860px) {
  .stepper { min-width: 640px; }
  .stepper .step-label { font-size: 12px; }
}

/* ----------------------------- riwayat / log status ----------------------------- */

.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.log-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 16px 0;
}
.log-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.log-item:last-child { padding-bottom: 0; }
.log-item:last-child::before { display: none; }

.log-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border-strong);
}
.log-proses .log-dot { border-color: var(--gold); }
.log-diproses .log-dot { border-color: var(--blue-700); }
.log-surat .log-dot { border-color: #7c3aed; }
.log-submit .log-dot { border-color: #2b3d9b; }
.log-diterima .log-dot { border-color: var(--ok); }
.log-ditolak .log-dot { border-color: var(--danger); }

.log-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.log-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-time { font-size: 12px; font-weight: 600; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.log-now {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue-050);
  border: 1px solid #c9d9f0;
  color: var(--blue-700);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.log-oleh { font-size: 11.5px; color: var(--muted); }
.log-note {
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f4c7c2;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 2px;
}

.log-sub { display: block; margin-top: 4px; }
.log-col { white-space: nowrap; font-size: 12px; color: var(--muted); }

/* ----------------------------- rekap data pengajuan (dashboard admin) ----------------------------- */

.rekap-pengajuan-table { min-width: 720px; }
.rekap-pengajuan-table thead th.num-head { text-align: center; }
.rekap-pengajuan-table tbody td.num-cell,
.rekap-pengajuan-table tfoot td.num-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--navy-800);
}
.rekap-pengajuan-table tbody td.num-cell.muted { color: #b6c1cf; font-weight: 400; }
.rekap-pengajuan-table tbody td:first-child { text-align: left; }
.rekap-pengajuan-table tbody td:nth-child(2) { text-align: left; min-width: 190px; }
.rekap-pengajuan-table thead th:nth-child(2) { white-space: nowrap; }
.rekap-pengajuan-table td .rekap-label { font-weight: 600; color: var(--navy-900); text-decoration: none; }
.rekap-pengajuan-table td .rekap-label:hover { color: var(--blue-700); text-decoration: underline; }

.rekap-total-row td {
  background: #eef3fa;
  border-top: 2px solid var(--border-strong);
  font-weight: 700;
  color: var(--navy-900);
}
.rekap-total-row td:last-child { font-weight: 700; }

.badge-tipe { background: var(--blue-050); color: var(--blue-700); border-color: #c9d9f0; font-weight: 700; }

/* radio pada form Buka Periode memakai gaya kartu yang sama dengan checkbox */
.check input[type='radio'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue-700);
  cursor: pointer;
}
.check:has(input[type='radio']:checked) {
  border-color: var(--blue-600);
  background: var(--blue-050);
  color: var(--blue-700);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--blue-600);
}

/* ----------------------------- responsive ----------------------------- */

@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-wide { grid-column: 1 / -1; }
  .stat-grid-tahap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tahap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 12px 18px; gap: 12px; }
  .nav-toggle { display: block; }
  .mainnav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }
  .mainnav.open { display: flex; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    margin-top: 4px;
  }
  .dropdown-menu a { color: rgba(255, 255, 255, 0.9); }
  .dropdown-menu a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
  .dropdown-menu a.is-active { background: rgba(255, 255, 255, 0.18); color: #fff; }
  .userbox { order: 3; gap: 10px; }
  .user-meta strong { font-size: 12.5px; }
  .page { padding: 22px 16px 40px; gap: 20px; }
  .card { padding: 18px; }
  h1 { font-size: 21px; }
  .form-grid,
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-row { grid-template-columns: 170px minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid-tahap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tahap-grid { grid-template-columns: minmax(0, 1fr); }
  .filterbar-pengajuan .field-inline { flex: 1 1 100%; }
  .filterbar-actions { width: 100%; }
  .filterbar-actions .btn { flex: 1 1 auto; }
  .pager { justify-content: center; }
  .pager .btn { flex: 1 1 100%; }
  .brand-text small { display: none; }
  .user-meta { display: none; }
  .table-wrap { border-radius: 10px; }

  /* di layar sempit: select + tombol jadi satu kolom, tombol selebar form */
  .field-pair > .field { flex: 1 1 100%; }
  .btn-set { width: 100%; }

  .detail-row { grid-template-columns: minmax(0, 1fr); }
  .detail-row dt { padding-bottom: 4px; }
  .status-card-actions { align-items: stretch; width: 100%; }
  .status-step,
  .status-final { text-align: left; max-width: none; }
  .status-actions-row { justify-content: stretch; }
  .status-action,
  .reject-box,
  .reject-box > summary,
  .status-action .btn,
  .btn-step { width: 100%; }
  .reject-form { width: 100%; }
  .doc-list-label { min-width: 0; }
  .mhs-hero .btn { width: 100%; }
}
