/* =====================================================================
 * SIMRES STPL Bekasi (v2027) — Mobile-First Design System (Zero CDN)
 * ===================================================================== */

:root {
  --color-primary: #0f4c81;
  --color-primary-hover: #0b3b66;
  --color-primary-soft: #e6f0fa;
  --color-accent: #0284c7;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-success: #15803d;
  --color-success-soft: #dcfce7;
  --color-warning: #b45309;
  --color-warning-soft: #fef3c7;
  --color-danger: #b91c1c;
  --color-danger-soft: #fee2e2;
  --color-info-soft: #eff6ff;
  --radius-sm: 0.55rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.1rem;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --sidebar-width: 264px;
  --topbar-height: 62px;
  --bottomnav-height: 68px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* --- App Shell Layout (Mobile-First) --- */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1rem;
  gap: 0.75rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--color-primary);
  font-size: 1.02rem;
}

.brand-mark img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.22);
}

.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Sidebar tersembunyi di HP, muncul di Desktop >= 960px */
.app-sidebar {
  display: none;
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 1.15rem 0.85rem;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.25rem 0.85rem 0.45rem;
}

.ui-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.62rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #475569;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--color-text);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--color-primary-soft) 0%, #f0f7ff 100%);
  color: var(--color-primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #cfe3f8;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--color-primary);
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1rem calc(var(--bottomnav-height) + 1.5rem);
}

/* Bottom Navigation Bar (Mobile-First, target sentuh >= 44px) */
.app-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: var(--bottomnav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.05);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 0.3rem 0.35rem env(safe-area-inset-bottom, 0.3rem);
  gap: 0.2rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-height: 44px;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.bottom-nav-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
}

@media (min-width: 960px) {
  .app-sidebar {
    display: flex;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100dvh - var(--topbar-height));
    overflow-y: auto;
    align-self: flex-start;
  }
  .app-bottom-nav { display: none; }
  .app-main { padding: 1.5rem 2rem; }
}

/* --- Komponen Kartu, Tombol, Form, Badge --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.875rem; }

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #155e9f 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #0f4c81 100%);
  box-shadow: 0 4px 10px rgba(15, 76, 129, 0.28);
}

.btn-outline {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-outline:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, var(--color-danger) 100%);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(185, 28, 28, 0.2);
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(0.95);
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.78rem;
  font-size: 0.84rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-neutral { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* --- Toast Notifikasi Non-Blocking --- */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bottomnav-height) + 0.75rem);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
}

@media (min-width: 960px) {
  .toast-container { bottom: 1.25rem; }
}

.toast {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: fadeSlideUp 0.2s ease-out;
}

.toast-info    { background: #0f172a; }
.toast-success { background: var(--color-success); }
.toast-warning { background: var(--color-warning); }
.toast-error   { background: var(--color-danger); }

/* --- Modal Dinamis Tunggal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
}

.modal-panel {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* --- Skeleton Loading & Spinner --- */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
  border-radius: var(--radius-sm);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Mode Cetak PDF Resmi (A4 / F4) --- */
@media print {
  @page {
    size: A4 portrait;
    margin: 14mm;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .app-topbar,
  .app-sidebar,
  .app-bottom-nav,
  .toast-container,
  .modal-backdrop,
  .no-print {
    display: none !important;
  }

  .app-main {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .card {
    border: 1px solid #cbd5e1;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* =====================================================================
 * Fase 2 UI Extensions — Auth, Tabs, Responsive Tables, Stepper, Print Kop
 * ===================================================================== */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.flex-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-md { display: flex; flex-direction: column; gap: 0.9rem; }

.auth-wrapper {
  min-height: calc(100dvh - var(--topbar-height) - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0;
  background: radial-gradient(circle at top center, rgba(15, 76, 129, 0.08), transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--color-primary);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kpi-grid > .card {
  border-top: 3px solid var(--color-primary-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-grid > .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-primary);
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}

/* Modern Pill-Segment Tabs Horizontal Scrollable di Mobile */
.tabs-bar {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.35rem;
  margin-bottom: 1.1rem;
  background: #e2e8f0;
  border-radius: var(--radius-md);
  scrollbar-width: thin;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0.48rem 0.92rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-md) - 3px);
  background: transparent;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text);
}

.tab-btn.active {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: rgba(15, 76, 129, 0.14);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

.tab-btn .ui-icon {
  opacity: 0.78;
}

.tab-btn.active .ui-icon {
  opacity: 1;
  color: var(--color-primary);
}

/* Filter Bar */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .filter-bar { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Tabel Desktop vs Card View Mobile */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.data-table th {
  background: #f8fafc;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.data-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, color 0.14s ease;
}

.data-table th.sortable-th:hover {
  background: #e2e8f0;
  color: var(--color-primary);
}

.data-table th.sortable-th::after {
  content: ' \21C5';
  font-size: 0.72rem;
  opacity: 0.42;
  margin-left: 0.25rem;
}

.data-table th.sortable-th.sort-asc {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.data-table th.sortable-th.sort-asc::after {
  content: ' \25B2';
  opacity: 1;
}

.data-table th.sortable-th.sort-desc {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.data-table th.sortable-th.sort-desc::after {
  content: ' \25BC';
  opacity: 1;
}

@media print {
  .data-table th.sortable-th::after {
    content: '' !important;
  }
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: #f8fafc;
}

.desktop-only { display: none; }
.mobile-only { display: block; }

@media (min-width: 820px) {
  .desktop-only { display: block; }
  .mobile-only { display: none; }
}

/* Checkbox Grid untuk Multi-Role / Klaster / Vokasional */
.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 520px) {
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--color-surface);
  font-size: 0.875rem;
}

/* Stepper Form Asesmen */
.stepper-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.step-pill:hover:not(.active) {
  background: #f8fafc;
  color: var(--color-text);
}

.step-pill.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, #155e9f 100%);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.25);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.qr-box {
  display: inline-flex;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  background: #f1f5f9;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  word-break: break-all;
}

.avatar-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
}

/* Dokumen Cetak Resmi Kop Surat STPL Bekasi */
.print-only {
  display: none;
}

.print-sheet {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.kop-surat {
  text-align: center;
  margin-bottom: 1.15rem;
}

.kop-surat-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.kop-surat-subtitle {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.01em;
}

.print-sign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
  break-inside: avoid;
}

@media print {
  .print-only   { display: block !important; }
  .print-sheet  { border: none; padding: 0; box-shadow: none; }
  .desktop-only { display: block !important; }
  .mobile-only  { display: none !important; }
  .kinerja-banner {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
    box-shadow: none !important;
    padding: 0.75rem 1rem !important;
  }
  .kinerja-banner p { color: #334155 !important; }
  .kop-surat-img {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =====================================================================
 * Modern PM Detail Hero, Info Grid, & Vertical Timeline Linimasa
 * ===================================================================== */

.pm-hero {
  background: linear-gradient(135deg, #0f4c81 0%, #0369a1 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.pm-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.pm-hero-avatar {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  cursor: pointer;
}

.pm-hero-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.pm-hero-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
}

.pm-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.pm-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .pm-meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pm-meta-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}

.pm-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

.pm-meta-val {
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 0.15rem;
  word-break: break-word;
}

.detail-kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .detail-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.detail-kv {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
}

.detail-kv-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.detail-kv-val {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-top: 0.2rem;
  white-space: pre-line;
}

/* Modern Vertical Timeline (Linimasa Jurnal) */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -1.35rem;
  top: 0.95rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #93c5fd;
}

.timeline-dot.nakes { background: #0d9488; box-shadow: 0 0 0 2px #99f6e4; }
.timeline-dot.cc    { background: #4f46e5; box-shadow: 0 0 0 2px #c7d2fe; }
.timeline-dot.pim   { background: #b45309; box-shadow: 0 0 0 2px #fde68a; }

.timeline-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  box-shadow: var(--shadow-sm);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px dashed var(--color-border);
}

.timeline-section {
  margin-top: 0.4rem;
  font-size: 0.89rem;
}

.timeline-section strong {
  color: var(--color-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: block;
}

.pager-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* =====================================================================
 * Executive Kinerja Pegawai & Ranking Podium Styles
 * ===================================================================== */

.kinerja-banner {
  background: linear-gradient(135deg, #065f46 0%, #0f766e 60%, #0e7490 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.podium-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .podium-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.podium-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.podium-1 { background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%); border-color: #fcd34d; }
.podium-2 { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); border-color: #cbd5e1; }
.podium-3 { background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%); border-color: #fdba74; }

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-1 { background: #f59e0b; color: #ffffff; }
.rank-2 { background: #64748b; color: #ffffff; }
.rank-3 { background: #c2410c; color: #ffffff; }
.rank-n { background: var(--color-primary-soft); color: var(--color-primary); }

/* =====================================================================
 * Executive Statistik PPKS, Stacked Bar, Sector Cards & Caregiver Grid
 * ===================================================================== */

.stats-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.stats-grand-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 150px;
}

.stats-grand-num {
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1.1;
  color: #22d3ee;
  margin-top: 0.15rem;
}

.stacked-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  display: flex;
  margin-top: 0.45rem;
}

.stacked-seg { height: 100%; transition: width 0.45s ease; }
.seg-cyan   { background: #06b6d4; }
.seg-purple { background: #a855f7; }
.seg-teal   { background: #14b8a6; }

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sector-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
}

.sector-box {
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.6rem;
  text-align: center;
  border: 1px solid var(--color-border);
  background: #f8fafc;
}

.sector-box-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
}

.sector-box-val {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
}

.bar-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.klaster-grid-5 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .klaster-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .klaster-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.tab-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--color-danger);
  color: #ffffff;
}

.cg-banner {
  background: linear-gradient(135deg, #0f766e 0%, #059669 55%, #115e59 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-md);
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ccfbf1;
  color: #115e59;
  font-weight: 800;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media print {
  .stats-hero, .cg-banner {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
    box-shadow: none !important;
  }
  .stats-grand-num { color: #0f4c81 !important; }
  .stats-hero p, .stats-hero span { color: #334155 !important; }
}
