:root {
  --sidebar: #2d3748;
  --sidebar-dark: #1e2533;
  --topbar: #1a2744;
  --bg: #f0f2f7;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #1e2533;
  --muted: #7a8190;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --info: #2563eb;
  --accent: #3b82f6;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(15, 25, 60, 0.12);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
[x-cloak], .sr-only { display: none !important; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }

button, input, select, textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  transition: grid-template-columns .18s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 74px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar);
  color: #bfc7d6;
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  overflow-y: auto;
}

.brand {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: #f6f8fc;
  background: #1e2533;
  font-size: 18px;
  font-weight: 800;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav { padding: 16px 12px 32px; }

.section-title {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #7e8a9e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  padding: 14px 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c0c7d4;
  padding: 9px 12px;
  border-radius: var(--radius);
  margin: 3px 0;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s, color .12s;
}

.nav-link svg { width: 17px; height: 17px; flex: 0 0 auto; color: #9aa4b5; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #e8ecf3; }
.nav-link:hover svg { color: #c0c7d4; }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-link.active svg { color: #fff; }

.sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .brand span,
.sidebar-collapsed .section-title,
.sidebar-collapsed .nav-link span {
  display: none;
}

.sidebar-collapsed .nav-link {
  justify-content: center;
  padding: 10px;
}

.main { min-width: 0; }

.topbar {
  height: 64px;
  background: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: #e8eeff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.icon-btn:hover { background: rgba(255,255,255,.14); }
.icon-btn svg { width: 21px; height: 21px; }
.with-badge span {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
}

.user-chip img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid rgba(255,255,255,.75);
}

.user-chip strong, .user-chip small { display: block; color: #fff; }
.user-chip strong { font-size: 14px; }
.user-chip small { font-size: 12px; opacity: .82; }

.breadcrumb {
  height: 50px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  box-shadow: 0 1px 4px rgba(15,25,60,.08);
  font-size: 14px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.breadcrumb svg { width: 15px; height: 15px; color: #9aa5b4; }

.content { padding: 20px; }

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid #cfd5df;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: #f5f7fa;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  font-size: 13px;
}

.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: #334e84; color: #fff; }
.btn-blue { background: var(--info); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-dark { background: #1e2533; color: #fff; }
.btn-outline { background: #fff; border-color: #c4ccda; color: #3a4258; }
.btn-warning { background: var(--amber); color: #fff; }
.btn.full { width: 100%; }
.btn.small { min-height: 30px; padding: 5px 9px; font-size: 12px; }

.btn.icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.btn.icon-action svg {
  width: 17px;
  height: 17px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 13px;
}
th, td {
  border: 1px solid var(--line);
  text-align: left;
  padding: 9px 10px;
  vertical-align: top;
}
th {
  background: #f1f4fa;
  color: #1a2744;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
tbody tr:nth-child(odd) { background: #f8f9fc; }
tbody tr:hover { background: #eef3ff; }
.empty { text-align: center; color: var(--muted); padding: 24px; }

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.page-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-links a,
.page-links span {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d8e2;
  border-radius: var(--radius);
  color: #445063;
  background: #fff;
  font-weight: 700;
}

.page-links span {
  border-color: transparent;
  background: transparent;
  min-width: 20px;
}

.page-links a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-links a.disabled {
  pointer-events: none;
  opacity: .45;
}

.page-links svg {
  width: 16px;
  height: 16px;
}

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

input, select, textarea {
  border: 1px solid #cbd3df;
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  width: 100%;
}

.input-icon {
  position: relative;
  display: block;
}

.input-icon svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: #7b8493;
  pointer-events: none;
}

.input-icon input {
  padding-left: 36px;
}

textarea { min-height: 74px; resize: vertical; }
label { display: grid; gap: 5px; font-weight: 700; color: #3e434b; font-size: 13px; }
.form-stack { display: grid; gap: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-grid .wide { grid-column: 1 / -1; }

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.checkbox-line input {
  width: auto;
}

.compact-modal {
  width: min(460px, 100%);
}

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

.settings-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.settings-grid h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #b7c1cf;
  border-radius: var(--radius);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.logo-preview img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: var(--radius);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.badge-success { background: var(--green); }
.badge-warning { background: var(--amber); color: #fff; }
.badge-danger { background: var(--red); }
.badge-info { background: var(--info); }
.badge-primary { background: var(--accent); }
.badge-muted { background: #798292; }
.badge-dark { background: #1a2744; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  min-height: 88px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: 0 6px 24px rgba(15,25,60,.14); }
.stat-icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9;
}
.stat-icon svg { width: 24px; height: 24px; color: #64748b; }
.stat-card.success .stat-icon { background: #dcfce7; }
.stat-card.success .stat-icon svg { color: var(--green); }
.stat-card.warning .stat-icon { background: #fef9c3; }
.stat-card.warning .stat-icon svg { color: var(--amber); }
.stat-card.info    .stat-icon { background: #dbeafe; }
.stat-card.info    .stat-icon svg { color: var(--info); }
.stat-card.danger  .stat-icon { background: #fee2e2; }
.stat-card.danger  .stat-icon svg { color: var(--red); }
.stat-body span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-body strong { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--text); }

/* ── Dashboard activity list ───────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  transition: background .1s;
  border-radius: 6px;
}
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: #f3f6ff; }
.activity-cat {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.activity-cat svg { width: 18px; height: 18px; }
.activity-cat-pendidikan { background: #dbeafe; color: #2563eb; }
.activity-cat-penelitian  { background: #ede9fe; color: #7c3aed; }
.activity-cat-pengabdian  { background: #fce7f3; color: #db2777; }
.activity-info { flex: 1; min-width: 0; }
.activity-info strong { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-info span { font-size: 12px; color: var(--muted); }
.activity-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.activity-meta small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ── Approval card ─────────────────────────────── */
.approval-card {
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px;
  border: 1px solid var(--line); overflow: hidden;
}
.approval-card-header {
  background: linear-gradient(135deg, #1a2744 0%, #2d3748 100%);
  color: #fff; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.approval-phase-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  width: fit-content;
}
.approval-phase-badge svg { width: 13px; height: 13px; }
.phase-surat  { background: rgba(251,191,36,.2); color: #fbbf24; border: 1px solid rgba(251,191,36,.35); }
.phase-laporan{ background: rgba(99,179,237,.2);  color: #63b3ed; border: 1px solid rgba(99,179,237,.35); }
.approval-card-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; font-size: 12px; opacity: .8;
}
.approval-card-title {
  font-size: 17px; font-weight: 700; color: #fff;
  text-decoration: none; line-height: 1.3;
}
.approval-card-title:hover { text-decoration: underline; color: #bfdbfe; }
.approval-prev-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #fca5a5;
  background: rgba(239,68,68,.15); border-radius: 6px;
  padding: 6px 10px; margin-top: 4px;
}
.approval-prev-note svg { width: 13px; height: 13px; flex: 0 0 auto; }

.approval-card-body {
  display: grid; grid-template-columns: 1fr 4px 1fr; gap: 0;
}
.approval-action-form {
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.approval-action-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
}
.approval-action-label svg { width: 16px; height: 16px; }
.approve-label { color: var(--green); }
.reject-label  { color: var(--red); }
.approval-divider { background: var(--line); width: 1px; }

/* ── Monitoring ────────────────────────────────── */
.late-list { display: flex; flex-direction: column; gap: 2px; }
.late-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 4px; border-radius: 6px;
  text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.late-row:last-child { border-bottom: 0; }
.late-row:hover { background: #fff5f5; }
.late-icon {
  width: 36px; height: 36px; flex: 0 0 36px;
  background: #fee2e2; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
}
.late-icon svg { width: 17px; height: 17px; }
.late-info { flex: 1; min-width: 0; }
.late-info strong { display: block; font-size: 13.5px; font-weight: 700; }
.late-info span { font-size: 12px; color: var(--muted); }
.late-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.late-meta small { font-size: 11.5px; }

.cat-pill {
  display: inline-flex; padding: 3px 8px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.cat-pendidikan { background: #dbeafe; color: #1d4ed8; }
.cat-penelitian  { background: #ede9fe; color: #6d28d9; }
.cat-pengabdian  { background: #fce7f3; color: #be185d; }

.count-pill {
  display: inline-flex; width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px; font-weight: 700;
}
.count-ok    { background: #dcfce7; color: #15803d; }
.count-empty { background: #f1f5f9; color: #94a3b8; }

/* ── Check-in card ─────────────────────────────── */
.checkin-card {
  background: var(--panel); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px;
  border: 1px solid var(--line); overflow: hidden;
}
.checkin-card-header {
  background: linear-gradient(135deg, #1a2744 0%, #2d3748 100%);
  color: #fff; padding: 14px 20px;
  display: flex; flex-direction: column; gap: 5px;
}
.checkin-card-body {
  display: grid; grid-template-columns: 1fr 280px; gap: 0;
}
.checkin-form-col {
  padding: 18px 20px; border-right: 1px solid var(--line);
}
.checkin-history-col {
  padding: 16px; background: #f8f9fc;
}
.checkin-form-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.checkin-form-title svg { width: 13px; height: 13px; }
.checkin-form { display: flex; flex-direction: column; gap: 10px; }
.checkin-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.checkin-history-list { display: flex; flex-direction: column; gap: 0; padding-left: 8px; border-left: 2px solid var(--line); }
.checkin-history-item { position: relative; padding: 0 0 14px 16px; }
.checkin-history-item:last-child { padding-bottom: 0; }
.checkin-history-dot {
  position: absolute; left: -6px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.checkin-history-content strong { display: block; font-size: 13px; font-weight: 700; }
.checkin-history-content span { font-size: 11.5px; color: var(--muted); font-family: monospace; }
.checkin-history-content p { margin: 4px 0 0; font-size: 12.5px; color: var(--text); }

@media (max-width: 900px) {
  .checkin-card-body { grid-template-columns: 1fr; }
  .checkin-form-col  { border-right: 0; border-bottom: 1px solid var(--line); }
  .approval-card-body { grid-template-columns: 1fr; }
  .approval-divider { display: none; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 33, .48);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  width: min(780px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  padding: 18px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-lg { width: min(960px, 100%); }
.form-section-title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}
.full-width { grid-column: 1 / -1; }
.dosen-detail-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.dosen-detail-photo img {
  width: 120px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.dosen-detail-grid { flex: 1; min-width: 0; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 16px;
}
.info-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.info-list dt { font-weight: 800; color: #505967; }
.info-list dd { margin: 0; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dde6f8 0%, #f0f4ff 100%);
  padding: 18px;
}
.login-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.login-card img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}
.login-card h1, .login-card p { text-align: center; }
.login-card h1 { margin: 0; font-size: 23px; }
.login-subtitle { margin: 4px 0 20px; color: var(--muted); font-size: 13px; }

/* SSO button */
.btn-sso {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #c4d4f0;
  border-radius: var(--radius);
  background: #f0f5ff;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  margin-bottom: 4px;
}
.btn-sso:hover {
  border-color: var(--accent);
  background: #e8f0ff;
  box-shadow: 0 2px 10px rgba(59,130,246,.15);
  color: var(--text);
}
.btn-sso img {
  width: 40px; height: 40px;
  object-fit: contain;
  flex: 0 0 40px;
  margin: 0;
  border-radius: 6px;
}
.btn-sso span { flex: 1; }
.btn-sso strong { display: block; font-size: 14px; font-weight: 700; color: var(--accent); }
.btn-sso small  { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.btn-sso svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.login-help {
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius);
  background: #eef6ff;
  color: #344150;
  font-size: 13px;
}

.verify-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #e8eef8;
  padding: 18px;
}

.verify-card {
  width: min(920px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.verify-head {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.verify-head img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.verify-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

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

.verify-status {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid #d1d8e2;
}

.verify-status svg {
  width: 34px;
  height: 34px;
}

.verify-status strong,
.verify-status span {
  display: block;
}

.verify-status.success {
  color: #12630a;
  background: #effbea;
  border-color: #9ee48b;
}

.verify-status.danger {
  color: #8d0024;
  background: #fff0f4;
  border-color: #ff9db6;
}

.verify-list {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.verify-list dt {
  color: #515b6a;
  font-weight: 800;
}

.verify-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.verify-list code {
  font-size: 12px;
  background: #f2f5f8;
  padding: 2px 5px;
  border-radius: 4px;
}

.file-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f2f5;
}

.muted { color: var(--muted); }
.mini-row {
  padding: 7px 0;
  border-bottom: 1px solid #e5e9ef;
}
.mini-row:last-child { border-bottom: 0; }
.approval-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
}
.approval-form {
  display: grid;
  gap: 8px;
}
.approval-form textarea, .compact textarea {
  min-height: 60px;
}

/* ── RAB / Anggaran ──────────────────────────── */
.rab-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.rab-summary-item {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 20px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rab-summary-item span { font-size: 12px; color: #6b7280; }
.rab-summary-item strong { font-size: 17px; }
.rab-table { min-width: 1000px; }
.rab-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.rab-input:focus { border-color: var(--blue); background: #fff; }
.rab-total { font-size: 13px; font-weight: 600; }
.text-right { text-align: right !important; }
.text-success { color: var(--green); }

/* ── Permission Matrix ────────────────────────── */
.perm-wrap { overflow-x: auto; }
.perm-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  min-width: 700px;
}
.perm-table th, .perm-table td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: center;
  vertical-align: middle;
}
.perm-menu-col { width: 140px; text-align: left !important; }
.perm-action-col { width: 90px; }
.perm-role-col { min-width: 110px; }
.perm-menu-cell {
  text-align: left !important;
  background: #f8f9fb;
  font-weight: 600;
  border-right: 2px solid var(--line);
}
.perm-row-first td { border-top: 2px solid #d0d7e2; }
.perm-action-cell { background: #fafafa; }
.perm-check-cell { background: #fff; }
.perm-check-cell input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--accent); }
.perm-role-name { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.btn-toggle-all {
  background: none; border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px; color: inherit; cursor: pointer;
  padding: 2px 6px; font-size: 11px; display: inline-flex; align-items: center; gap: 3px;
}
.btn-toggle-all:hover { background: rgba(255,255,255,.15); }
.btn-toggle-all svg { width: 13px; height: 13px; }
.action-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; text-transform: capitalize;
}
.action-view   { background: #e8f4fd; color: #1a73e8; }
.action-create { background: #e6f9f0; color: #1a8a4a; }
.action-edit   { background: #fff8e1; color: #c07d00; }
.action-delete { background: #fde8e8; color: #c0392b; }

/* ── Laporan card layout ─────────────────────────────────── */
.laporan-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.laporan-card-header {
  background: linear-gradient(135deg, #1a2744 0%, #2d3748 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.laporan-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  opacity: .85;
}

.laporan-kode { font-weight: 700; font-family: monospace; font-size: 12px; }
.laporan-sep  { opacity: .5; }
.laporan-tanggal { display: flex; align-items: center; gap: 4px; }

.laporan-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  line-height: 1.3;
}
.laporan-title:hover { text-decoration: underline; color: #bfdbfe; }

.laporan-card-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  opacity: .78;
}
.laporan-card-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.laporan-card-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
}

.laporan-form-col {
  padding: 20px;
  border-right: 1px solid var(--line);
}

.laporan-side-col {
  padding: 16px;
  background: #f8f9fc;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.laporan-side-section {}

.laporan-side-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.laporan-side-title svg { width: 13px; height: 13px; }

.laporan-bukti-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.laporan-bukti-list .file-chip { max-width: 100%; }

.laporan-empty-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* Laporan form */
.laporan-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sah / waiting state */
.laporan-sah-state,
.laporan-waiting-state {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.laporan-sah-state {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #14532d;
}
.laporan-waiting-state {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}
.laporan-sah-state svg,
.laporan-waiting-state svg {
  width: 28px; height: 28px; flex: 0 0 auto; margin-top: 2px;
}
.laporan-sah-state strong,
.laporan-waiting-state strong { display: block; font-size: 15px; }
.laporan-sah-state p,
.laporan-waiting-state p { margin: 4px 0 0; font-size: 13px; opacity: .85; }

.laporan-preview {
  background: #f8f9fc;
  border-radius: var(--radius);
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.laporan-preview p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.laporan-preview p:last-child { margin-bottom: 0; }
.laporan-preview-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* File drop area */
.file-drop-area {
  border: 2px dashed #c4d0e8;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  background: #f6f8ff;
  cursor: pointer;
  position: relative;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.file-drop-area:hover { border-color: var(--accent); }
.file-drop-area svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 2px; }
.file-drop-area span { font-size: 13.5px; font-weight: 600; color: var(--text); }
.file-drop-area small { font-size: 12px; color: var(--muted); }
.file-drop-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .laporan-card-body { grid-template-columns: 1fr; }
  .laporan-form-col  { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ── File chip — card-style file display ─────────────────── */
.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dde3ef;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 160px;
  max-width: 240px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .12s, border-color .12s;
}
.file-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(59,130,246,.15);
  color: var(--accent);
}
.file-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-icon svg { width: 18px; height: 18px; }
.file-icon-pdf  { background: #fee2e2; color: #dc2626; }
.file-icon-xlsx { background: #dcfce7; color: #16a34a; }
.file-icon-docx { background: #dbeafe; color: #2563eb; }
.file-icon-img  { background: #fef9c3; color: #ca8a04; }
.file-icon-other{ background: #f1f5f9; color: #64748b; }
.file-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

/* Upload dokumen form */
.upload-dokumen-form {
  background: #f6f8ff;
  border: 1px dashed #b8c7e8;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 4px;
}

/* Alert banners */
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.5;
}
.alert-danger  { background: #fde8e8; color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-warning { background: #fffbeb; color: #78350f; border: 1px solid #fcd34d; }
.alert-success { background: #f0fdf4; color: #14532d; border: 1px solid #86efac; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .approval-actions { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .app-shell:not(.sidebar-collapsed) .sidebar { transform: translateX(0); }
  .sidebar-collapsed .brand span,
  .sidebar-collapsed .nav-link span {
    display: inline;
  }
  .sidebar-collapsed .section-title { display: block; }
  .sidebar-collapsed .brand { justify-content: flex-start; padding: 0 18px; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; padding: 10px 12px; }
  .topbar { height: 58px; padding: 0 12px; }
  .breadcrumb { height: auto; min-height: 48px; padding: 12px 16px; font-size: 14px; }
  .content { padding: 14px; }
  .panel { padding: 14px; }
  .panel-header { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .user-chip { display: none; }
  .search-form { width: 100%; }
  .search-form input, .search-form select { min-width: 0; }
  table { min-width: 680px; }
  .info-list { grid-template-columns: 1fr; }
  .pagination-bar,
  .pagination-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .page-links {
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 520px) {
  body { font-size: 13px; }
  .topbar-actions { gap: 4px; }
  .actions, .toolbar, .search-form { align-items: stretch; }
  .actions .btn, .toolbar .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 84px; }
  .modal-backdrop { padding: 10px; }
  .modal { padding: 14px; }
  .verify-card { padding: 16px; }
  .verify-head { align-items: flex-start; }
  .verify-list { grid-template-columns: 1fr; }
}
