/* =========================================================
   SIPECA — Sistem Pelaporan dan Monitoring Capaian Kinerja Triwulanan
   Tema: Biru (Blue Theme)
   ========================================================= */

:root {
  --primary-950: #061a35;
  --primary-900: #0b2c5c;
  --primary-800: #0d3a75;
  --primary-700: #10498f;
  --primary-600: #1358b0;
  --primary-500: #1a67c9;
  --primary-400: #3b82e8;
  --primary-300: #7fabf1;
  --primary-200: #bcd6f8;
  --primary-100: #dfebfc;
  --primary-50:  #f2f7fe;

  --accent: #00b0ff;
  --success: #17a672;
  --success-bg: #e4f8f0;
  --danger: #e2483d;
  --danger-bg: #fdeceb;
  --warning: #f5a524;
  --warning-bg: #fef3e0;
  --info: #1a67c9;

  --text-dark: #0f2947;
  --text-body: #3c5570;
  --text-muted: #7b93ad;
  --border-color: #e1eaf6;
  --bg-page: #eff4fb;
  --bg-card: #ffffff;

  --sidebar-width: 268px;
  --topbar-height: 72px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(11, 44, 92, 0.06);
  --shadow-md: 0 6px 20px rgba(11, 44, 92, 0.08);
  --shadow-lg: 0 14px 36px rgba(11, 44, 92, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--text-dark); font-weight: 700; margin: 0; }
a { text-decoration: none; color: var(--primary-600); }

/* ---------------------------------------------------------
   LAYOUT
--------------------------------------------------------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(190deg, var(--primary-900) 0%, var(--primary-950) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1030;
  transition: transform 0.25s ease;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 26, 53, 0.55);
  z-index: 1025;
}

/* ---------------------------------------------------------
   SIDEBAR BRAND
--------------------------------------------------------- */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--primary-500));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,176,255,0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.brand-title { font-size: 16.5px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.brand-sub { font-size: 10.5px; color: var(--primary-200); line-height: 1.25; }

/* ---------------------------------------------------------
   SIDEBAR NAV
--------------------------------------------------------- */
.sidebar-nav {
  flex: 1;
  padding: 18px 14px;
  overflow-y: auto;
}
.nav-section-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-300);
  font-weight: 700;
  padding: 8px 12px 10px;
}
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--primary-100);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 4px;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav .nav-link i { font-size: 15.5px; width: 20px; text-align: center; opacity: 0.9; }
.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, var(--accent), var(--primary-500));
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,176,255,0.28);
}
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

/* Submenu (grup menu yang bisa dibuka) */
.nav-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.nav-caret {
  margin-left: auto;
  font-size: 12px !important;
  transition: transform 0.15s ease;
}
.nav-group.open > .nav-group-toggle .nav-caret { transform: rotate(180deg); }
.nav-submenu {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px 30px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.14);
}
.nav-group.open > .nav-submenu { display: flex; }
.nav-sublink {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--primary-100);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-sublink:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-sublink.active {
  background: linear-gradient(135deg, var(--accent), var(--primary-500));
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,176,255,0.28);
}

/* ---------------------------------------------------------
   SIDEBAR FOOTER / LOGOUT
--------------------------------------------------------- */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  background: rgba(226, 72, 61, 0.15);
  color: #ff9c94;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-logout:hover { background: var(--danger); color: #fff; }

/* ---------------------------------------------------------
   TOPBAR
--------------------------------------------------------- */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1010;
}
.btn-burger {
  display: none;
  background: var(--primary-50);
  border: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--primary-700);
  font-size: 20px;
  cursor: pointer;
}
.page-title { font-size: 18.5px; font-weight: 800; color: var(--text-dark); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-notif {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.topbar-notif .notif-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
}
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px; border-left: 1px solid var(--border-color);
}
.btn-user-toggle {
  background: none; border: none; padding: 6px 8px 6px 14px;
  border-radius: 12px; cursor: pointer;
  transition: background 0.15s ease;
}
.btn-user-toggle:hover { background: var(--primary-50); }
.btn-user-toggle::after { display: none; } /* sembunyikan caret bawaan bootstrap */
.dropdown-caret { font-size: 11px; color: var(--text-muted); margin-left: 2px; }
.user-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  object-fit: cover;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-name { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* Dropdown profil */
.user-dropdown-menu {
  min-width: 300px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  margin-top: 12px !important;
}
.user-dropdown-header { display: flex; gap: 14px; align-items: flex-start; }
.user-avatar-lg {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px;
  object-fit: cover;
  flex-shrink: 0;
}
.udh-info { min-width: 0; }
.udh-name { font-size: 14px; font-weight: 800; color: var(--text-dark); margin-bottom: 3px; }
.udh-detail { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.user-dropdown-menu .dropdown-divider { margin: 16px 0 10px; }
.user-dropdown-menu .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--text-body);
}
.user-dropdown-menu .dropdown-item:hover { background: var(--primary-50); color: var(--primary-700); }
.user-dropdown-menu .dropdown-item.text-danger:hover { background: var(--danger-bg); color: var(--danger) !important; }
.user-dropdown-menu form { margin: 0; }

/* Halaman Profil */
.profile-photo-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 6px; }
.profile-photo-current {
  width: 92px; height: 92px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 32px; object-fit: cover; flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.file-input-name { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; display: block; }
.profile-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; flex-wrap: wrap; }
.profile-tabs .nav-link {
  border: none; background: none; padding: 10px 15px; font-weight: 600; font-size: 13px;
  color: var(--text-muted); border-bottom: 2.5px solid transparent; border-radius: 0;
}
.profile-tabs .nav-link.active { color: var(--primary-700); border-bottom-color: var(--primary-600); }

/* ---------------------------------------------------------
   PAGE CONTENT
--------------------------------------------------------- */
.page-content { padding: 26px 28px 10px; flex: 1; }
.page-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 18px 28px 24px;
}

.sipeca-alert {
  border: none;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.alert-success.sipeca-alert { background: var(--success-bg); color: #0a7a54; }
.alert-danger.sipeca-alert { background: var(--danger-bg); color: #b8342a; }
.alert-warning.sipeca-alert { background: var(--warning-bg); color: #99680d; }
.alert-info.sipeca-alert { background: var(--primary-50); color: var(--primary-700); }

/* ---------------------------------------------------------
   CARDS
--------------------------------------------------------- */
.card-sipeca {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 22px;
}
.card-sipeca-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.card-sipeca-header h5 { font-size: 14.5px; font-weight: 700; }
.card-sipeca-header p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991px) { .stat-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .stat-grid-3 { grid-template-columns: 1fr; } }

/* Rencana Kinerja (Tujuan > Sasaran > IKU) */
.rk-tujuan { border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.rk-tujuan-head {
  background: var(--primary-900); color: #fff;
  padding: 12px 16px; font-weight: 700; font-size: 14px;
}
.rk-tujuan-head span { color: var(--primary-200); font-weight: 800; }
.rk-sasaran { padding: 12px 16px; border-top: 1px solid var(--border-color); }
.rk-sasaran:first-of-type { border-top: none; }
.rk-sasaran-head { font-weight: 700; font-size: 13.5px; color: var(--text-dark); margin-bottom: 10px; }
.rk-sasaran-head span { color: var(--primary-600); }
.rk-sasaran-head i, .rk-tujuan-head i { margin-right: 4px; }
.rk-iku-table { margin: 0; }
.rk-iku-table th { background: var(--primary-50); }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.stat-card:hover { color: inherit; text-decoration: none; }
a.stat-card { cursor: pointer; }
a.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-300); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.stat-icon.blue { background: linear-gradient(135deg, var(--primary-600), var(--accent)); }
.stat-icon.navy { background: linear-gradient(135deg, var(--primary-900), var(--primary-700)); }
.stat-icon.green { background: linear-gradient(135deg, #0f9d68, #34d399); }
.stat-icon.amber { background: linear-gradient(135deg, #e08e0b, #f7c04a); }
.stat-icon.red { background: linear-gradient(135deg, #c0392b, #ef6a5d); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 21px; font-weight: 800; color: var(--text-dark); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ---------------------------------------------------------
   BUTTONS
--------------------------------------------------------- */
.btn-sipeca {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 10px;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-sipeca:hover { filter: brightness(1.08); color: #fff; }
.btn-sipeca:active { transform: scale(0.98); }
.btn-outline-sipeca {
  background: #fff;
  border: 1.5px solid var(--primary-300);
  color: var(--primary-700);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 10px;
}
.btn-outline-sipeca:hover { background: var(--primary-50); color: var(--primary-800); }
.btn-icon-sm {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: none;
  font-size: 14px;
}
.btn-icon-sm.edit { background: var(--primary-100); color: var(--primary-700); }
.btn-icon-sm.edit:hover { background: var(--primary-600); color: #fff; }
.btn-icon-sm.delete { background: var(--danger-bg); color: var(--danger); }
.btn-icon-sm.delete:hover { background: var(--danger); color: #fff; }
.btn-icon-sm.view { background: var(--primary-50); color: var(--primary-600); }
.btn-icon-sm.view:hover { background: var(--primary-500); color: #fff; }

/* ---------------------------------------------------------
   TABLES
--------------------------------------------------------- */
.table-sipeca-wrap { overflow-x: auto; }
.table-sipeca {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-sipeca thead th {
  background: var(--primary-50);
  color: var(--primary-800);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  padding: 11px 16px;
  border-bottom: 2px solid var(--primary-100);
  white-space: nowrap;
}
.table-sipeca thead th:first-child { border-top-left-radius: 10px; }
.table-sipeca thead th:last-child { border-top-right-radius: 10px; }
.table-sipeca tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-body);
  vertical-align: middle;
}
.table-sipeca tbody tr:hover { background: var(--primary-50); }
.table-sipeca tbody tr:last-child td { border-bottom: none; }
.table-sipeca tbody tr.row-ditolak td { background: var(--danger-bg); }
.table-sipeca tbody tr.row-ditolak:hover td { background: #fbdad7; }
.table-sipeca td.cell-truncate { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }

/* Badges */
.badge { font-weight: 600; font-size: 11px; padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: #a9740f; }
.badge-blue { background: var(--primary-100); color: var(--primary-700); }

/* ---------------------------------------------------------
   FORMS
--------------------------------------------------------- */
.form-label { font-weight: 600; font-size: 12.5px; color: var(--text-dark); margin-bottom: 6px; }
.form-control, .form-select {
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 13px;
  color: var(--text-dark);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-100);
}
.filter-bar {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
}
.filter-bar .filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.filter-bar label { font-size: 11.5px; font-weight: 700; color: var(--primary-800); }

/* ---------------------------------------------------------
   LOGIN PAGE
--------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--primary-950);
}

.login-form-side {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-page--single {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,176,255,0.10), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(26,103,201,0.14), transparent 50%),
    var(--primary-950);
  padding: 24px;
}
.login-page--single .login-form-side {
  flex: none;
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.login-box { width: 100%; max-width: 380px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .lb-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--primary-500));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  box-shadow: 0 8px 22px rgba(0,176,255,0.35);
  flex-shrink: 0;
}
.login-brand .lb-name { font-size: 17px; font-weight: 800; color: var(--text-dark); letter-spacing: 0.5px; line-height: 1.1; }
.login-brand .lb-sub { font-size: 11px; color: var(--text-muted); }
.login-box .login-title { font-size: 21px; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; }
.login-box .login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 30px; }
.login-box .form-control { padding: 12px 14px 12px 42px; }
.input-icon-wrap { position: relative; margin-bottom: 18px; }
.input-icon-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 16px; }
.btn-login {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  margin-top: 6px;
  box-shadow: 0 10px 24px rgba(19,88,176,0.28);
}
.btn-login:hover { filter: brightness(1.06); color: #fff; }
.login-demo-box {
  margin-top: 26px;
  background: var(--primary-50);
  border: 1px dashed var(--primary-200);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: var(--primary-800);
}
.login-demo-box b { color: var(--primary-900); }

/* ---------------------------------------------------------
   MODAL polish
--------------------------------------------------------- */
.modal-content { border-radius: var(--radius); border: none; }
.modal-header { border-bottom: 1px solid var(--border-color); }
.modal-footer { border-top: 1px solid var(--border-color); }
.modal-title { font-weight: 800; font-size: 16px; color: var(--text-dark); }

/* Baris detail (mis. modal Detail Bukti Dukung) dengan garis pembatas antar isian */
.detail-row { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--border-color); font-size: 12.5px; }
.detail-row:first-child { padding-top: 0; }

/* Progress bar */
.progress-sipeca { height: 9px; border-radius: 20px; background: var(--primary-100); overflow: hidden; }
.progress-sipeca .bar { height: 100%; background: linear-gradient(90deg, var(--primary-500), var(--accent)); border-radius: 20px; }

/* Master-detail layout (mis. Kelola Sasaran per Tujuan) */
.master-detail { display: flex; gap: 20px; align-items: flex-start; }
.master-list {
  width: 320px; flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.master-list-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700; font-size: 11.5px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px;
}
.master-list-body { max-height: 640px; overflow-y: auto; }
.master-list-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-body); font-size: 13.5px; font-weight: 500;
  transition: background .15s ease;
}
.master-list-item:last-child { border-bottom: none; }
.master-list-item:hover { background: var(--primary-50); }
.master-list-item.active { background: linear-gradient(135deg, var(--primary-600), var(--accent)); color: #fff; }
.master-list-item.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.master-list-num { flex-shrink: 0; font-weight: 700; opacity: .6; }
.master-list-text { flex: 1; min-width: 0; }
.master-list-item .badge { flex-shrink: 0; margin-top: 1px; }
.master-detail-content { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .master-detail { flex-direction: column; }
  .master-list { width: 100%; }
  .master-list-body { max-height: 260px; }
}

/* Dropdown pilih Tujuan (Kelola Sasaran) - support teks panjang yang wrap */
.tujuan-picker { position: relative; }
.tujuan-picker-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  text-align: left; white-space: normal; line-height: 1.4;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  font-weight: 600; font-size: 14px; color: var(--text-dark);
  cursor: pointer;
}
.tujuan-picker-btn:hover { border-color: var(--primary-300); }
.tujuan-picker-btn i { flex-shrink: 0; color: var(--text-muted); }
.tujuan-picker-menu {
  width: 100%;
  max-height: 380px; overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.tujuan-picker-menu .dropdown-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  white-space: normal; line-height: 1.4;
  padding: 10px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-body);
  margin-bottom: 2px;
}
.tujuan-picker-menu .dropdown-item:hover { background: var(--primary-50); }
.tujuan-picker-menu .dropdown-item.active {
  background: linear-gradient(135deg, var(--primary-600), var(--accent));
  color: #fff;
}
.tujuan-picker-menu .dropdown-item.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.tujuan-picker-menu .dropdown-header {
  display: flex; align-items: center; gap: 8px;
  white-space: normal; line-height: 1.4;
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 700; font-size: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  margin: 6px 0 6px;
  position: sticky;
  top: -8px;
  z-index: 2;
}
.tujuan-picker-menu li:first-child .dropdown-header { margin-top: 0; }
.tujuan-picker-menu .dropdown-header i { color: var(--primary-600); font-size: 13px; }

/* Empty state */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { font-size: 42px; color: var(--primary-200); margin-bottom: 14px; display: block; }

/* Timeline (notifikasi) */
.notif-item { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--border-color); }
.notif-item .btn-outline-sipeca { flex-shrink: 0; font-size: 12px; padding: 6px 12px; }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-50); color: var(--primary-600); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-item.unread { background: var(--primary-50); border-radius: 10px; }
.notif-text { font-size: 12px; color: var(--text-dark); font-weight: 500; }
.notif-time { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0; }
  .btn-burger { display: flex; align-items: center; justify-content: center; }
  .sidebar-overlay.show { display: block; }
}
@media (max-width: 576px) {
  .page-content { padding: 18px 14px 6px; }
  .topbar { padding: 0 14px; }
  .user-info { display: none; }
}
