/* ============================================================
   TRACK B — PORTAL ADMIN PAN EXPRESS
   Alat kerja internal: polos, netral, rapat, mudah dibaca.
   TANPA animasi, TANPA background cerita. Warna brand hanya di
   topbar, tombol aksi utama, dan badge status.
   Status: FONDASI TAMPILAN SAJA — belum ada autentikasi/DB nyata.
   ============================================================ */

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

html { background: #F4F5F7; }

body {
  margin: 0;
  font-family: var(--font-system);
  font-size: 13.5px;
  line-height: 1.55;
  color: #26293C;
}

h1, h2, h3 { margin: 0; color: #1C1F33; }
p { margin: 0; }

a { color: var(--pan-navy); text-decoration: none; }
a:hover { color: var(--pan-red); }

.mono { font-family: var(--font-mono); }
.muted { color: #6B7086; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  padding-inline: 16px;
  background: var(--pan-navy);
  color: #FFFFFF;
}
.tb-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}
.tb-brand:hover { color: #FFFFFF; }
.tb-brand .tb-pan { color: #FFB4B4; }
.tb-brand .tb-pan b { color: #FFFFFF; }
.tb-divider { width: 1px; height: 20px; background: rgba(160, 180, 220, 0.4); }
.tb-app { font-size: 12.5px; color: var(--pan-blue-2); letter-spacing: 0.03em; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.tb-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #DDE3F2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(160, 180, 220, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
}
.tb-user::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7BC79A;
}
.tb-logout { font-size: 12.5px; color: #C9D2EA; font-weight: 600; }
.tb-logout:hover { color: #FFFFFF; }

/* ---------- Kerangka ---------- */
.portal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
}

.sidebar {
  background: #FFFFFF;
  border-right: 1px solid #E1E4EA;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
}
.sb-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #9AA0B4;
  padding: 0 10px 6px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #3D4157;
}
.sb-item:hover { background: #F4F5F9; color: #1C1F33; }
.sb-item[aria-current="page"] {
  background: #EEF1F8;
  color: var(--pan-navy);
  font-weight: 700;
}
.sb-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.sb-foot {
  margin-top: auto;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #9AA0B4;
  border-top: 1px solid #EDEFF4;
}

.content { padding: 24px 28px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.page-head h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.crumb { font-size: 12px; color: #8A90A6; }
.crumb a { color: #8A90A6; }
.crumb a:hover { color: var(--pan-navy); }
.page-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Kartu ---------- */
.pcard {
  background: #FFFFFF;
  border: 1px solid #E1E4EA;
  border-radius: 6px;
}
.pcard-pad { padding: 20px; }
.pcard-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #EDEFF4;
  font-size: 13px;
  font-weight: 700;
  color: #1C1F33;
}
.pcard-head .muted { font-weight: 400; }

/* ---------- Tombol ---------- */
.pbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--pan-navy);
  border-radius: 5px;
  background: var(--pan-navy);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pbtn:hover { background: var(--pan-navy-deep); color: #FFFFFF; }
.pbtn--ghost { background: #FFFFFF; color: #3D4157; border-color: #CBD0DC; }
.pbtn--ghost:hover { background: #F4F5F9; color: #1C1F33; border-color: #B4BACA; }
.pbtn--sm { padding: 6px 12px; font-size: 12.5px; }
.pbtn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.field { display: grid; gap: 6px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: #4A4E66;
  letter-spacing: 0.02em;
}
.field .req { color: var(--pan-red); }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: #26293C;
  padding: 8px 10px;
  border: 1px solid #CBD0DC;
  border-radius: 4px;
  background: #FFFFFF;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--pan-blue-1);
  outline-offset: -1px;
  border-color: var(--pan-blue-1);
}
.field .hint { font-size: 11.5px; color: #8A90A6; }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #CBD0DC;
  border-radius: 5px;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.radio-chip:hover { border-color: var(--pan-blue-1); }
.radio-chip input { accent-color: var(--pan-navy); margin: 0; }
.radio-chip:has(input:checked) {
  border-color: var(--pan-navy);
  background: #EEF1F8;
  color: var(--pan-navy);
  font-weight: 600;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #EDEFF4;
}
.form-note { font-family: var(--font-mono); font-size: 11px; color: #9AA0B4; margin-left: auto; }

/* ---------- Statistik ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card { padding: 14px 16px; display: grid; gap: 4px; }
.stat-card .sc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8A90A6;
  text-transform: uppercase;
}
.stat-card .sc-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--pan-navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-card .sc-sub { font-size: 11.5px; color: #8A90A6; }

/* ---------- Filter bar ---------- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.filterbar .field { min-width: 150px; gap: 4px; }
.filterbar .field label { font-size: 11px; }
.filterbar .field input,
.filterbar .field select { padding: 6px 8px; font-size: 12.5px; }
.filterbar .fb-actions { display: flex; gap: 8px; padding-bottom: 1px; }

/* ---------- Tabel ---------- */
.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B7086;
  background: #F8F9FB;
  padding: 9px 12px;
  border-bottom: 1px solid #E1E4EA;
  white-space: nowrap;
}
.ptable td {
  padding: 10px 12px;
  border-bottom: 1px solid #EDEFF4;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.ptable tbody tr:hover { background: #FAFBFD; }
.ptable .td-num { color: #9AA0B4; }
.ptable .td-strong { font-weight: 600; color: #1C1F33; }
.ptable .td-right { text-align: right; }
.ptable-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 12px;
  color: #8A90A6;
}
.ptable-foot .pager { margin-left: auto; display: flex; gap: 6px; }

/* ---------- Badge status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--diproses { background: #EEF1F8; color: var(--pan-navy); }
.badge--jalan { background: #FDEAEA; color: var(--pan-red-dark); }
.badge--tiba { background: #E9F0F7; color: var(--pan-blue-1); }
.badge--terkirim { background: #E8F2EC; color: #1F7A4D; }

/* ---------- Rangka kosong (skeleton) ---------- */
.empty-frame {
  display: grid;
  place-items: center;
  min-height: 340px;
  border: 1.5px dashed #CBD0DC;
  border-radius: 6px;
  background: #FBFBFD;
}
.empty-frame p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #9AA0B4;
  text-align: center;
  line-height: 2;
  padding: 20px;
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #F4F5F7;
}
.login-card {
  width: 100%;
  max-width: 372px;
  background: #FFFFFF;
  border: 1px solid #E1E4EA;
  border-radius: 8px;
  padding: 34px 32px 28px;
  display: grid;
  gap: 20px;
}
.login-brand { display: grid; justify-items: center; gap: 4px; text-align: center; }
.login-brand .lb-logo { height: 72px; width: auto; }
.login-brand .lb-legal { margin-top: 8px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #6B7086; }
.login-card h1 { font-size: 15px; font-weight: 700; text-align: center; }
.login-card .login-note { font-size: 12px; color: #8A90A6; text-align: center; margin-top: -12px; }
.login-form { display: grid; gap: 14px; }
.login-foot { display: grid; gap: 6px; justify-items: center; font-size: 12px; color: #8A90A6; text-align: center; }

@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #E1E4EA; }
  .sb-label, .sb-foot { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
