:root {
  --navy: #0b1f3a;
  --navy-2: #12345b;
  --blue: #175cd3;
  --red: #c62828;
  --bg: #f4f7fb;
  --white: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #e4e7ec;
  --success: #067647;
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.topbar {
  background: var(--navy);
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
}

.topbar p {
  margin: 5px 0 0;
  opacity: 0.8;
  font-size: 13px;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
  min-height: 65vh;
}

.card,
.welcome-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.card {
  max-width: 560px;
  margin: 0 auto;
}

#viewDashboard .card {
  max-width: none;
}

.center {
  text-align: center;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.welcome-card h2 {
  margin: 5px 0 8px;
}

.section-heading p,
.welcome-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--red);
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 18px;
}

input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: white;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.1);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: white;
}

.btn-primary:hover {
  background: var(--navy-2);
}

.btn-secondary {
  background: #eef4ff;
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: white;
}

.btn-link {
  background: transparent;
  color: var(--blue);
  width: 100%;
  margin-top: 12px;
}

.btn-full {
  width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin: 20px 0;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}

.notice {
  background: #fffaeb;
  border: 1px solid #fedf89;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
}

.welcome-card {
  max-width: none;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.role-badge {
  background: #ecfdf3;
  color: var(--success);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
  color: var(--navy);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.list-header h3 {
  margin: 5px 0 0;
}

.search {
  max-width: 300px;
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #f9fafb;
  font-size: 12px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 15px;
  border: 4px solid #e4e7ec;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 380px;
  padding: 14px 18px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
  font-size: 14px;
}

.toast.error {
  background: #b42318;
}

.toast.success {
  background: #067647;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding: 28px 16px 35px;
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 20px, 1100px);
    margin-top: 18px;
  }

  .card,
  .welcome-card {
    padding: 20px;
    border-radius: 13px;
  }

  .welcome-card,
  .list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search {
    max-width: none;
  }

  .topbar {
    padding: 15px 16px;
  }

  .topbar h1 {
    font-size: 17px;
  }
}

.form-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

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

.assessment-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #f9fafb;
}

.assessment-item label {
  margin-bottom: 8px;
  color: var(--navy);
}

.assessment-select,
.assessment-input,
.assessment-textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  background: white;
}

.assessment-select:focus,
.assessment-input:focus,
.assessment-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.1);
}

.assessment-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.assessment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

#viewAssessment .card {
  max-width: none;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .assessment-grid {
    grid-template-columns: 1fr;
  }

  .assessment-actions {
    flex-direction: column;
  }

  .assessment-actions .btn {
    width: 100%;
  }
}

.assessment-item select {
  width: 100%;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.btn-secondary:disabled {
  background: #eef4ff;
  color: #0b2545;
  border-color: transparent;
}
/* ============================================================
   DASHBOARD ADMIN - KPI
   ============================================================ */

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

.admin-kpi-card {
  padding: 20px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #f8fafc;
}

.admin-kpi-label {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.admin-kpi-value {
  display: block;
  color: #0b2748;
  font-size: 30px;
  line-height: 1;
}

@media (max-width: 900px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   ADMIN - NAVIGASI MODUL
========================================================= */

.admin-module-nav {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  padding: 8px;

  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 16px;

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-nav-btn {
  flex: 1 0 auto;

  min-height: 44px;
  padding: 10px 18px;

  border: 0;
  border-radius: 11px;

  background: transparent;
  color: #64748b;

  font: inherit;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.admin-nav-btn:hover {
  background: #f1f5f9;
  color: #0b2948;
}

.admin-nav-btn.active {
  background: #0b2948;
  color: #ffffff;
}

.admin-nav-btn:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .admin-module-nav {
    gap: 6px;
  }

  .admin-nav-btn {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 14px;
  }
}