:root {
  --ink: #1F1B3A;
  --muted: #635F82;
  --line: rgba(31, 27, 58, .09);
  --indigo: #4F46E5;
  --violet: #8B5CF6;
  --grad: linear-gradient(135deg, #4F46E5, #8B5CF6);
  --card: rgba(255, 255, 255, .68);
  --radius: 16px;
  --shadow: 0 18px 40px -22px rgba(41, 27, 96, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #F3F0FF;
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(139, 92, 246, .30), transparent 62%),
    radial-gradient(760px 480px at 92% 4%, rgba(56, 189, 248, .22), transparent 60%),
    radial-gradient(700px 520px at 60% 110%, rgba(244, 114, 182, .18), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 21px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: 252px;
  flex: 0 0 252px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, .55);
  border-right: 1px solid rgba(255, 255, 255, .7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 4px 6px 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--grad);
  color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center;
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .9);
  letter-spacing: -.02em;
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  color: #46426A; font-weight: 500; font-size: 13.6px;
  transition: background .16s ease, color .16s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, .75); color: var(--ink); }
.nav-grup {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #8B87A8;
  padding: 12px 12px 4px;
}
.nav-link { padding: 8px 12px; }
.nav-link.active {
  background: var(--grad); color: #fff; font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(79, 70, 229, .95);
}
.nav-icon { width: 18px; text-align: center; opacity: .9; font-size: 13px; }
.nav-count {
  margin-left: auto; background: rgba(255, 255, 255, .28); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
}
.nav-count.warn { background: #EF4444; color: #fff; }
.nav-link:not(.active) .nav-count { background: #FDE68A; color: #92400E; }
.nav-link:not(.active) .nav-count.warn { background: #FEE2E2; color: #B91C1C; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .65); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: rgba(79, 70, 229, .12); color: var(--indigo); font-weight: 700; display: grid; place-items: center; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11.5px; color: var(--muted); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 32px 6px;
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.topbar-date { margin-left: auto; font-size: 12.5px; color: var(--muted); background: rgba(255, 255, 255, .6); padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .8); }

/* Jam hidup WIB (Asia/Jakarta) di topbar — lihat layout.php + assets/app.js */
.topbar-clock {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 4px 12px -8px rgba(41, 27, 96, .5);
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.topbar-clock::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
  flex: 0 0 auto;
}
.topbar-clock .topbar-jam {
  font-weight: 800; font-size: 13px; color: #1F1B3A;
  letter-spacing: .01em;
}
.topbar-clock .topbar-tgl { color: #4B4670; white-space: nowrap; }
.topbar-clock .topbar-hari { margin-right: 4px; }
.topbar-clock .topbar-zona {
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 999px;
  color: #3730A3; background: rgba(79, 70, 229, .12);
}

.content { padding: 18px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1280px; width: 100%; min-width: 0; }

.icon-btn {
  display: none; border: 1px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .7);
  width: 38px; height: 38px; border-radius: 11px; font-size: 15px; color: var(--ink); cursor: pointer;
}

/* ---------- Cards ---------- */
.card {
  min-width: 0;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 22px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { margin: 3px 0 0; }
.card-tight { padding: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; min-width: 0; }
.stats > * { min-width: 0; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(79, 70, 229, .1); color: var(--indigo); font-size: 15px; margin-bottom: 2px; }
.stat.accent { background: var(--grad); border: none; color: #fff; }
.stat.accent .stat-label, .stat.accent .stat-sub { color: rgba(255, 255, 255, .82); }
.stat.accent .stat-icon { background: rgba(255, 255, 255, .2); color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; min-width: 0; }
.grid-2 > *, .split > * { min-width: 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

/* ---------- Typography helpers ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h2 { font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--grad); color: #fff !important;
  border: none; border-radius: 11px; padding: 10px 16px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 12px 22px -14px rgba(79, 70, 229, .95);
  transition: transform .12s ease, opacity .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: .95; }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255, 255, 255, .75); color: var(--ink) !important;
  border: 1px solid var(--line); box-shadow: none;
}
.btn-outline { background: transparent; color: var(--indigo) !important; border: 1px solid rgba(79, 70, 229, .35); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); box-shadow: none; }
.btn-soft-danger { background: #FEE2E2; color: #B91C1C !important; box-shadow: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; max-width: 100%; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 12px; border-bottom: 1px solid rgba(31, 27, 58, .06); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .5); }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.cell-strong { font-weight: 600; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: #EEE9FB; color: #4C3F8F; white-space: nowrap;
}
.badge.success { background: #DCFCE7; color: #15803D; }
.badge.warning { background: #FEF3C7; color: #B45309; }
.badge.danger { background: #FEE2E2; color: #B91C1C; }
.badge.info { background: #DBEAFE; color: #1D4ED8; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
label { font-size: 12.5px; font-weight: 600; color: #3B3760; }
input[type=text], input[type=number], input[type=date], input[type=month], input[type=password], input[type=search], select, textarea {
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(31, 27, 58, .13);
  border-radius: 10px; padding: 10px 12px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(79, 70, 229, .6);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}
textarea { resize: vertical; min-height: 76px; }
.hint { font-size: 11.5px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Signature ---------- */
.sig-wrap { border: 1px dashed rgba(79, 70, 229, .45); border-radius: 12px; background: #fff; padding: 6px; }
.sig-pad { width: 100%; height: 150px; display: block; touch-action: none; cursor: crosshair; border-radius: 8px; background: #fff; }
.sig-tools { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.sig-preview { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.sig-preview img { max-height: 110px; display: block; }

/* ---------- Flash ---------- */
.flash {
  border-radius: 12px; padding: 12px 16px; font-size: 13.5px; font-weight: 500;
  background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0;
}
.flash.error { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.flash.info { background: #EEF2FF; color: #3730A3; border-color: #C7D2FE; }

.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px; background: rgba(255, 255, 255, .45); border-radius: 12px; }

.list-plain { display: flex; flex-direction: column; gap: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(31, 27, 58, .07); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 13.5px; }
.list-row .meta { font-size: 12px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=search] { width: 220px; }

.pill-tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .6); padding: 4px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .8); }
.pill-tabs a { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pill-tabs a.active { background: #fff; color: var(--indigo); box-shadow: 0 6px 14px -10px rgba(41, 27, 96, .7); }

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.login-card {
  width: 100%; max-width: 420px; background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 22px;
  padding: 32px; box-shadow: 0 30px 60px -34px rgba(41, 27, 96, .55);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
}
.login-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.login-head .brand-mark { width: 48px; height: 48px; border-radius: 15px; margin-bottom: 8px; font-size: 17px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }
.cred-hint { margin-top: 16px; font-size: 12px; color: var(--muted); background: rgba(79, 70, 229, .07); border: 1px dashed rgba(79, 70, 229, .25); border-radius: 12px; padding: 10px 12px; line-height: 1.6; }

/* ---------- Invoice print ---------- */
.inv-doc { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 28px; }
.inv-doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid #EDE9FE; padding-bottom: 16px; margin-bottom: 18px; }
.inv-doc h2 { font-size: 18px; }
.inv-total { display: flex; justify-content: flex-end; margin-top: 14px; }
.inv-total table { width: auto; min-width: 260px; }
.inv-total td { border: none; padding: 6px 12px; }
.inv-total .grand { font-size: 16px; font-weight: 800; }

/* ---------- Daftar tunggakan tagihan ---------- */
.tunggakan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tunggakan-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid rgba(245, 158, 11, .28);
  background: rgba(254, 243, 199, .35);
}
.tunggakan-item .grow { min-width: 0; }
@media (max-width: 560px) {
  .tunggakan-grid { grid-template-columns: 1fr; }
  .tunggakan-item { flex-direction: column; align-items: stretch; }
  .tunggakan-item .text-right { text-align: left; }
}

/* ---------- Invoice line items editor ---------- */
.items-editor { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: grid; grid-template-columns: 2.2fr .8fr 1.2fr 1.2fr auto; gap: 10px; align-items: end; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.item-row .field label { font-size: 11.5px; }
.remove-row { background: #FEE2E2; color: #B91C1C; border: none; border-radius: 9px; width: 38px; height: 38px; cursor: pointer; font-size: 15px; }
.total-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(79, 70, 229, .08); font-weight: 700; }
.total-strip .val { font-size: 18px; }

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

@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 40; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 60px rgba(31, 27, 58, .25);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(31, 27, 58, .32); z-index: 30; }
  .icon-btn { display: inline-grid; place-items: center; }
  .topbar { padding: 16px 18px 4px; }
  .content { padding: 14px 18px 40px; gap: 18px; }
  .topbar-date { display: none; }
  /* Jam WIB tetap tampil di HP — hari disembunyikan supaya tetap 1 baris. */
  .topbar-clock { padding: 5px 9px; gap: 6px; font-size: 11px; }
  .topbar-clock .topbar-hari { display: none; }
  .topbar-clock .topbar-jam { font-size: 12px; }
  .topbar-clock .topbar-tgl { font-size: 10.5px; }
  .topbar-clock .topbar-zona { font-size: 9px; padding: 1px 5px; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .remove-row { width: 100%; }
  .field.span-2 { grid-column: span 1; }
}


/* Layar sangat sempit (≤420px): jam WIB dirapatkan agar tetap 1 baris. */
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .topbar-clock { padding: 4px 7px; gap: 5px; }
  .topbar-clock .topbar-jam { font-size: 11.5px; }
  .topbar-clock .topbar-tgl { font-size: 9.5px; }
  .topbar-clock .topbar-zona { font-size: 8.5px; padding: 0 4px; }
  .topbar-title h1 { font-size: 15px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .flash, .no-print { display: none !important; }
  .content { padding: 0; }
  .card, .inv-doc { box-shadow: none; border: none; background: #fff; padding: 0; backdrop-filter: none; }
}

/* ---------- Peta ---------- */
.map-canvas {
  width: 100%;
  height: 300px;
  border-radius: 14px;
  border: 1px solid rgba(31, 27, 58, .1);
  overflow: hidden;
  background: #E7E3F7;
  z-index: 0;
}
.map-canvas-lg { height: 460px; }
.map-canvas .leaflet-container { border-radius: 14px; }

.map-status {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 10px;
  padding: 9px 12px;
}
.map-status.ok { color: #166534; background: rgba(220, 252, 231, .7); border-color: #BBF7D0; }
.map-status.warn { color: #B45309; background: rgba(254, 243, 199, .75); border-color: #FDE68A; }
.map-status a { font-weight: 600; }

.map-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.map-result {
  text-align: left;
  font-family: inherit;
  font-size: 12.8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
  line-height: 1.4;
}
.map-result:hover { background: #fff; border-color: rgba(79, 70, 229, .45); }

.foto-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}
input[type=file] {
  font-family: inherit;
  font-size: 13px;
  background: rgba(255, 255, 255, .85);
  border: 1px dashed rgba(79, 70, 229, .4);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  color: var(--ink);
}

/* ---------- Pill lokasi teknisi ---------- */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-right .topbar-date { margin-left: 0; }

.geo-pill {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.geo-pill::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  opacity: .85;
}
.geo-pill.ok { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.geo-pill.warn { background: #FEF3C7; color: #B45309; border-color: #FDE68A; }
.geo-pill.danger { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.geo-pill.wait::before { animation: geo-pulse 1.2s ease-in-out infinite; }
@keyframes geo-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* ---------- Pin peta lacak teknisi ---------- */
.tracker-pin { background: none; border: none; }
.tracker-pin-dot {
  display: block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(31, 27, 58, .45);
}
.tracker-pin-label {
  position: absolute;
  left: 18px; top: -4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1F1B3A;
  background: rgba(255, 255, 255, .92);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(31, 27, 58, .18);
}

.leaflet-container { font-family: inherit; }
.leaflet-popup-content { font-size: 12.5px; }

@media (max-width: 860px) {
  .map-canvas { height: 260px; }
  .map-canvas-lg { height: 320px; }
  .topbar-right .topbar-date { display: none; }
  .geo-pill { font-size: 11px; padding: 6px 10px; }
}

/* ---------- Google Drive & arsip ---------- */
.steps { margin: 0 0 16px 18px; padding: 0; font-size: 13px; color: #3B3760; line-height: 1.75; }
.steps li { margin-bottom: 4px; }
.steps code, .code-block { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.steps code { background: rgba(79, 70, 229, .1); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

.code-details { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .6); padding: 10px 14px; }
.code-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--indigo); }
.code-block {
  margin: 12px 0;
  max-height: 320px;
  overflow: auto;
  font-size: 11.5px;
  line-height: 1.55;
  background: #1F1B3A;
  color: #E8E4FF;
  border-radius: 10px;
  padding: 14px;
  white-space: pre;
}

.drive-note {
  font-size: 12.5px;
  color: #166534;
  background: rgba(220, 252, 231, .75);
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 10px 12px;
}

/* ---------- Bagikan ke WhatsApp ---------- */
.wa-card { border-left: 3px solid #22C55E; }
.wa-status {
  margin-top: 12px;
  font-size: 12.5px;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(79, 70, 229, .08);
  color: #3730A3;
  border: 1px solid rgba(79, 70, 229, .16);
}
.wa-status.ok { background: rgba(220, 252, 231, .8); color: #166534; border-color: #BBF7D0; }
.wa-status.warn { background: rgba(254, 243, 199, .8); color: #B45309; border-color: #FDE68A; }
.wa-preview {
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.8px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  color: #3B3760;
}

/* ---------- ODP & Google Earth ---------- */
.odp-pin { background: none; border: none; }
.odp-pin-dot {
  position: absolute; left: 0; top: 0;
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(31, 27, 58, .5);
  box-sizing: content-box;
}
.odp-pin-label {
  position: absolute; left: 20px; top: -3px;
  font-size: 11.5px; font-weight: 700; color: #1F1B3A;
  background: rgba(255, 255, 255, .95);
  padding: 2px 7px; border-radius: 6px;
  border-left: 3px solid #15803D;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(31, 27, 58, .2);
}

.earth-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: #3730A3;
  background: rgba(238, 242, 255, .85);
  border: 1px solid #C7D2FE;
  border-radius: 11px;
  padding: 11px 13px;
  margin-bottom: 14px;
}

.layer-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.layer-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.3px; font-weight: 500; color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  cursor: pointer;
  user-select: none;
}
.layer-chip.on { color: var(--ink); background: #fff; border-color: rgba(79, 70, 229, .3); }
.layer-chip input { margin: 0; accent-color: var(--indigo); width: 14px; height: 14px; }
.layer-chip::before {
  content: '';
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--c, var(--indigo));
}
.layer-count {
  font-size: 10.5px; font-weight: 700;
  background: rgba(79, 70, 229, .1); color: var(--indigo);
  border-radius: 999px; padding: 1px 6px;
}
.layer-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 3px;
  margin-right: 6px; vertical-align: middle;
}
.leaflet-popup-content { font-size: 12.5px; line-height: 1.55; }
.leaflet-popup-content a { font-weight: 600; }

/* ---------- Unggah bertahap (Google Earth) ---------- */
.unggah-progress { margin-top: 4px; }
.unggah-bar {
  height: 9px; border-radius: 999px; overflow: hidden;
  background: rgba(79, 70, 229, .13);
}
.unggah-bar span {
  display: block; height: 100%; width: 0;
  background: var(--grad);
  border-radius: 999px;
  transition: width .25s ease;
}
.unggah-progress .hint { margin-top: 6px; display: block; }
.tip-kmz {
  margin-top: 14px;
  font-size: 12.5px; line-height: 1.6; color: #92400E;
  background: rgba(254, 243, 199, .8);
  border: 1px solid #FDE68A;
  border-radius: 11px;
  padding: 10px 12px;
}

/* ---------- Live Google Earth ---------- */
.earth-live-card { padding-bottom: 18px; }
.le-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.le-toolbar input[type=search] { flex: 1 1 240px; max-width: 460px; }
.le-zoom {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 3px 6px;
  font-size: 13px; font-weight: 600;
}
.le-zbtn {
  width: 28px; height: 28px; border-radius: 8px;
  border: none; background: rgba(79, 70, 229, .1); color: var(--indigo);
  font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer;
}
.le-zbtn:hover { background: rgba(79, 70, 229, .2); }
#le-zoom-teks { min-width: 22px; text-align: center; color: var(--muted); }

.le-frame-wrap {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(31, 27, 58, .12);
  background: #DDE3EA;
}
.le-frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.le-map-layer { position: absolute; inset: 0; }

.le-foot {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
}
.le-koor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.le-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.le-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.le-chip {
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: 9px; padding: 7px 11px; cursor: pointer;
  display: inline-flex; flex-direction: column; gap: 1px; text-align: left;
}
.le-chip:hover { background: #fff; }
.le-chip span { font-size: 10.5px; font-weight: 500; color: var(--muted); }

@media (max-width: 860px) {
  .le-frame-wrap { height: 380px; }
  .le-toolbar input[type=search] { max-width: none; }
}

/* ---------- Pengumuman (papan) ---------- */
.papan-list { display: flex; flex-direction: column; gap: 14px; }
.papan-card {
  border: 1px solid rgba(31, 27, 58, .09);
  border-left: 3px solid var(--indigo);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  padding: 16px 18px;
}
.papan-card.penting { border-left-color: #DC2626; background: rgba(254, 242, 242, .7); }
.papan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.papan-head h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.papan-isi { font-size: 13.3px; line-height: 1.65; color: #3B3760; }
.papan-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 12px; font-size: 11.5px; color: var(--muted);
}
.papan-aksi { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ---------- Absensi ---------- */
.absensi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.absensi-slot {
  display: flex; flex-direction: column; gap: 5px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.absensi-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.absensi-jam { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.absensi-foto { width: 100%; max-width: 120px; border-radius: 9px; margin-top: 4px; border: 1px solid var(--line); }

.selfie-wrap {
  position: relative;
  width: 100%; max-width: 320px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #EDEAFB;
  border: 1px dashed rgba(79, 70, 229, .4);
  display: grid; place-items: center;
}
.selfie-video, .selfie-hasil { width: 100%; height: 100%; object-fit: cover; display: block; }
.selfie-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; padding: 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.geo-status {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.geo-status.ok { color: #15803D; background: #DCFCE7; border-color: #BBF7D0; }
.geo-status.danger { color: #B91C1C; background: #FEE2E2; border-color: #FECACA; }
.geo-status.wait { color: #B45309; background: #FEF3C7; border-color: #FDE68A; }

.foto-tautan img {
  width: 30px; height: 30px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--line);
  margin-left: 6px; vertical-align: middle;
}

/* ---------- Modal ---------- */
.modal-back[hidden] { display: none; }
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(31, 27, 58, .42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 18px;
}
.modal-card {
  width: 100%; max-width: 440px;
  background: rgba(255, 255, 255, .96);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 30px 60px -30px rgba(41, 27, 96, .6);
}
.modal-card .card-head { margin-bottom: 14px; }
.modal-card .icon-btn { display: inline-grid; }

/* ---------- ODP Maps (gabungan) ---------- */
.odpmap-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  align-items: start;
}
.odpmap-side {
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(31, 27, 58, .09);
  border-radius: 13px;
  padding: 12px;
}
.odpmap-side-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; margin-bottom: 10px;
}
.odpmap-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.odpmap-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  font-family: inherit; font-size: 12.6px; color: var(--ink);
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px; cursor: pointer;
}
.odpmap-item:hover { background: #fff; border-color: rgba(79, 70, 229, .35); }
.odpmap-item.aktif { background: #EEF2FF; border-color: rgba(79, 70, 229, .5); }
.odpmap-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.odpmap-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.odpmap-info strong { font-size: 12.6px; }
.odpmap-info span {
  font-size: 11.3px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.odpmap-port {
  font-size: 11.3px; font-weight: 700; color: #15803D;
  background: #DCFCE7; border-radius: 999px; padding: 2px 8px;
}
.odpmap-port.menipis { color: #B45309; background: #FEF3C7; }
.odpmap-port.penuh { color: #B91C1C; background: #FEE2E2; }

@media (max-width: 1020px) {
  .odpmap-grid { grid-template-columns: 1fr; }
  .odpmap-list { max-height: 240px; }
}

/* ---------- Pengambilan barang ---------- */
.ambil-row {
  display: grid;
  grid-template-columns: 2.4fr .8fr auto;
  gap: 10px;
  align-items: end;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.ambil-row .field label { font-size: 11.5px; }
.ambil-editor-wrap {
  background: rgba(79, 70, 229, .04);
  border: 1px solid rgba(79, 70, 229, .14);
  border-radius: 13px;
  padding: 14px;
}

@media (max-width: 860px) {
  .ambil-row { grid-template-columns: 1fr 1fr; }
  .ambil-row .remove-row { width: 100%; }
}

/* ---------- Kartu ACC pengambilan ---------- */
.acc-card { border-left: 3px solid #D97706; }
.acc-list { display: flex; flex-direction: column; gap: 12px; }
.acc-item {
  border: 1px solid rgba(217, 119, 6, .28);
  background: rgba(254, 243, 199, .42);
  border-radius: 12px;
  padding: 13px 15px;
}
.acc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acc-head .title { font-size: 13.5px; }
.acc-head .meta { font-size: 11.8px; color: var(--muted); margin-top: 2px; }
.acc-items { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.acc-item-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #3B3760;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 999px;
  padding: 4px 10px;
}
.acc-chip em { font-style: normal; font-size: 10px; color: var(--muted); }
.acc-stok { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Label kecil sisa rekap teknisi & stok gudang */
.stok-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.8px; color: #4B4670;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.stok-tag strong { font-weight: 700; }
.stok-tag em { font-style: normal; font-size: 10px; color: var(--muted); }
.stok-tag.kurang { color: #B91C1C; background: #FEE2E2; border-color: rgba(185, 28, 28, .28); }
.stok-tag.kurang em { color: #B91C1C; }
.stok-tag.kosong { color: #7A7595; background: rgba(255, 255, 255, .55); border-style: dashed; }
.acc-aksi { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Baris rincian barang di tabel riwayat pengambilan */
.ambil-item-line { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ambil-item-meta { display: flex; gap: 5px; flex-wrap: wrap; margin: 1px 0 6px; }

/* ---------- Keterangan menu sidebar ---------- */
.nav-desc {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.35;
  color: #8B87A8;
  margin-top: 1px;
}
.nav-link.active .nav-desc { color: rgba(255, 255, 255, .82); }
.nav-text { display: flex; flex-direction: column; min-width: 0; }
.nav-link { align-items: flex-start; }
.nav-link .nav-icon { margin-top: 1px; }

/* ---------- Gaji ---------- */
.gaji-periode {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(79, 70, 229, .06);
  border: 1px solid rgba(79, 70, 229, .16);
  border-radius: 11px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.gaji-ringkas { display: flex; flex-direction: column; gap: 2px; }
.gaji-baris {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid rgba(31, 27, 58, .07);
  font-size: 13.2px;
}
.gaji-baris:last-child { border-bottom: none; }
.gaji-baris > span:first-child { color: var(--muted); }
.gaji-input { display: inline-flex; align-items: center; gap: 8px; }
.gaji-input em { font-style: normal; font-size: 11px; color: var(--muted); }
.gaji-input input { padding: 6px 9px; font-size: 13px; }
.gaji-slip {
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
}
.gaji-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid rgba(79, 70, 229, .2);
  border-bottom: none;
  font-size: 15px;
}
.gaji-total strong { color: #15803D; }
.gaji-doc .inv-doc-head { border-bottom-color: #EDE9FE; }

@media (max-width: 860px) {
  .gaji-baris { flex-wrap: wrap; }
  .gaji-input em { display: none; }
}

@media print {
  .gaji-doc .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Kas: menu atas + chip kategori berwarna ---------- */
.kas-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kas-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink) !important;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  min-width: 0;
}
.kas-menu-item:hover { transform: translateY(-2px); }
.kas-menu-item.aktif {
  border-color: var(--c);
  box-shadow: 0 0 0 2px var(--c) inset, var(--shadow);
}
.kas-menu-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  color: var(--c);
  background: var(--bg);
  line-height: 1;
}
.kas-menu-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.kas-menu-text strong { font-size: 13.6px; font-weight: 700; }
.kas-menu-text em {
  font-style: normal; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kas-menu-nom {
  font-size: 13px; font-weight: 800;
  color: var(--c);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.kas-menu-item.aktif .kas-menu-icon { color: #fff; background: var(--c); }

.kas-kategori-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 4px 2px 0;
}
.kas-kategori-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.kas-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.3px; font-weight: 600;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  transition: transform .12s ease;
}
.kas-chip:hover { transform: translateY(-1px); background: #fff; }
.kas-chip.aktif {
  background: var(--bg);
  border-color: var(--c);
  color: var(--c) !important;
  box-shadow: 0 0 0 1px var(--c) inset;
}
.kas-chip-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg);
  font-size: 11.5px; line-height: 1;
  color: var(--c);
}
.kas-chip.aktif .kas-chip-icon { background: #fff; }

.kat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--c);
  background: var(--bg);
  border-radius: 999px;
  padding: 3px 10px 3px 5px;
  white-space: nowrap;
}
.kat-chip-icon {
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  font-size: 10.5px; line-height: 1;
}

@media (max-width: 1020px) {
  .kas-menu { grid-template-columns: 1fr; gap: 10px; }
  .kas-menu-item { padding: 12px 14px; }
}

/* ---------- Role pengguna ---------- */
.info-level {
  margin-top: 18px;
  font-size: 12.6px;
  line-height: 1.6;
  color: #3B3760;
  background: rgba(238, 242, 255, .8);
  border: 1px solid #C7D2FE;
  border-radius: 12px;
  padding: 12px 14px;
}
.info-level .steps li { margin-bottom: 5px; }
.badge-peran-admin { background: #DBEAFE; color: #1D4ED8; }
/* Badge level Kustom (hak akses menu dipilih admin) */
.badge-peran-kustom { background: #EDE9FE; color: #6D28D9; border: 1px solid #DDD6FE; }

/* Ceklis hak akses menu per role (peran.php) */
.menu-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.menu-mode-opsi {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(79, 70, 229, .18);
}
.menu-mode-opsi:has(input:checked) {
  background: rgba(238, 242, 255, .95);
  border-color: #4F46E5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, .12);
}
.menu-mode-opsi input { margin-top: 2px; flex: 0 0 auto; }
.menu-mode-opsi strong { display: block; font-size: 12.6px; }
.menu-mode-opsi em { display: block; font-style: normal; font-size: 11.4px; color: #635F82; line-height: 1.4; }

.menu-cek-wrap {
  border: 1px solid rgba(31, 27, 58, .1); border-radius: 14px;
  padding: 12px; background: rgba(255, 255, 255, .6);
  max-height: 420px; overflow: auto;
}
.menu-cek-wrap[data-mode="bawaan"] .menu-cek { opacity: .55; }
.menu-cek-aksi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.menu-cek-aksi .hint { margin-left: auto; }
.menu-cek-grup {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #7C78A0; margin: 12px 0 6px;
}
.menu-cek-grup:first-of-type { margin-top: 0; }
.menu-cek-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 9px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.menu-cek-item:hover { background: rgba(238, 242, 255, .8); }
.menu-cek-item:has(input:checked) {
  background: rgba(238, 242, 255, .95);
  border-color: rgba(79, 70, 229, .28);
}
.menu-cek-item.mati .menu-cek-teks { opacity: .62; }
.menu-cek-item.selalu { background: rgba(220, 252, 231, .45); }
/* Menu yang halamannya wajib admin: tidak bisa diberikan ke role level kustom */
.menu-cek-item.admin-saja .menu-cek-ikon { color: #94A3B8; }
.menu-cek-item.admin-saja.mati .menu-cek-teks { opacity: .45; }
.menu-cek-wrap[data-level="kustom"] .menu-cek-item.admin-saja { background: rgba(241, 245, 249, .7); }
.menu-cek-wrap[data-level="kustom"] .menu-cek-item.admin-saja .menu-cek-teks strong::after {
  content: ' 🔒'; font-size: 10px;
}
.menu-cek-item input { margin-top: 3px; flex: 0 0 auto; }
.menu-cek-ikon {
  flex: 0 0 auto; width: 20px; text-align: center;
  font-size: 13px; color: #4F46E5; line-height: 1.5;
}
.menu-cek-teks { min-width: 0; }
.menu-cek-teks strong { display: block; font-size: 12.6px; line-height: 1.35; }
.menu-cek-teks em { display: block; font-style: normal; font-size: 11px; color: #635F82; line-height: 1.35; }
@media (max-width: 700px) {
  .menu-mode { grid-template-columns: 1fr; }
  .menu-cek-wrap { max-height: 340px; }
  .menu-cek-aksi .hint { margin-left: 0; width: 100%; }
}

/* ---------- Foto profil akun ---------- */
.avatar-img {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 10px -4px rgba(41, 27, 96, .5);
  background: #fff;
}
.foto-akun-wrap { display: flex; gap: 14px; align-items: flex-start; }
.foto-akun {
  width: 74px; height: 74px; flex: 0 0 auto;
  border-radius: 16px; object-fit: cover;
  border: 2px solid rgba(79, 70, 229, .22);
  background: #fff;
  box-shadow: 0 6px 16px -10px rgba(41, 27, 96, .5);
}
.foto-akun.kosong,
.avatar-foto.kosong {
  display: grid; place-items: center;
  background: rgba(79, 70, 229, .12);
  color: var(--indigo);
  font-weight: 800;
  font-size: 26px;
}
.akun-cell { display: inline-flex; align-items: center; gap: 9px; }
.avatar-foto {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}
.avatar-foto.kosong { font-size: 14px; border: none; }

@media (max-width: 860px) {
  .foto-akun-wrap { flex-direction: column; }
}

/* ---------- Halaman profil ---------- */
.user-chip-link { text-decoration: none; color: inherit; transition: background .15s ease; }
.user-chip-link:hover { background: rgba(255, 255, 255, .92); }
.profil-head { display: flex; gap: 16px; align-items: flex-start; }
.foto-akun-besar { width: 96px; height: 96px; border-radius: 20px; font-size: 34px; }
.profil-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.profil-info h3 { font-size: 17px; font-weight: 800; }
.arsip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.arsip-item {
  display: flex; flex-direction: column; gap: 5px;
  border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  color: var(--muted) !important;
  font-size: 11px;
  padding-bottom: 6px;
  transition: transform .12s ease;
}
.arsip-item:hover { transform: translateY(-2px); }
.arsip-item img { width: 100%; height: 84px; object-fit: cover; display: block; }
.arsip-item span { padding: 0 8px; font-weight: 600; }

@media (max-width: 860px) {
  .profil-head { flex-direction: row; }
  .foto-akun-besar { width: 76px; height: 76px; border-radius: 16px; font-size: 28px; }
}

/* ---------- Status (mirip Status WhatsApp) ---------- */
.status-form { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(31,27,58,.08); }
.status-form-row { display: flex; gap: 12px; align-items: flex-start; }
.status-form-avatar {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%;
  overflow: hidden; display: grid; place-items: center;
  background: rgba(79,70,229,.12); color: var(--indigo);
  font-weight: 800; font-size: 17px;
}
.status-form-avatar img { width: 100%; height: 100%; object-fit: cover; }
.status-form-input { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.status-form-input textarea { min-height: 56px; }
.status-form-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-foto-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,.85); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; color: var(--indigo);
}
.status-foto-btn input { display: none; }
.status-durasi { width: auto !important; padding: 6px 10px !important; font-size: 12.5px !important; }
.status-permanen {
  margin-top: 12px; font-size: 12.5px;
  background: rgba(238,242,255,.7); border: 1px solid #C7D2FE;
  border-radius: 11px; padding: 10px 13px;
}
.status-permanen summary { cursor: pointer; font-weight: 600; color: var(--indigo); }

.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 13px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  color: var(--ink) !important;
  transition: transform .12s ease, background .12s ease;
  min-width: 0;
}
.status-card:hover { transform: translateY(-1px); background: #fff; }
.status-card.baru { border-color: rgba(79,70,229,.45); background: rgba(238,242,255,.75); }
.status-ring {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%;
  padding: 2px; background: linear-gradient(135deg,#4F46E5,#8B5CF6);
  overflow: hidden; display: grid; place-items: center;
}
.status-ring.dibaca { background: #D9D6E8; }
.status-ring img, .status-ring > span {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: #fff; color: var(--indigo); font-weight: 800; font-size: 16px;
}
.status-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.status-nama { font-size: 13.2px; font-weight: 700; }
.status-nama em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 500; }
.status-isi {
  font-size: 12.6px; color: #3B3760;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-ikon { margin-right: 4px; }
.status-meta { font-size: 11px; color: var(--muted); }
.status-thumb {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--line);
}
.status-thumb img { width: 100%; height: 100%; object-fit: cover; }

.papan-foto { margin: 10px 0; border-radius: 11px; overflow: hidden; max-width: 420px; }
.papan-foto img { width: 100%; display: block; }

/* Halaman lihat status */
.status-view {
  max-width: 520px; margin: 0 auto;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow);
}
.status-view-media {
  border-radius: 14px; overflow: hidden; background: #1F1B3A;
  display: grid; place-items: center; min-height: 180px;
}
.status-view-media img { width: 100%; display: block; }
.status-view-teks-besar {
  padding: 34px 24px; color: #fff; font-size: 17px; line-height: 1.6;
  text-align: center; width: 100%;
}
.status-view-caption { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: #3B3760; }
.status-view-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(31,27,58,.08); }

.avatar-pembaca {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  overflow: hidden; display: grid; place-items: center;
  background: rgba(79,70,229,.12); color: var(--indigo);
  font-weight: 700; font-size: 12px;
}
.avatar-pembaca img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .status-thumb { display: none; }
  .status-view { border-radius: 14px; padding: 10px; }
  .status-view-teks-besar { font-size: 15px; padding: 24px 16px; }
}

/* ---------- Pemberitahuan (lonceng sidebar) ---------- */
.notif-btn {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 11px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .15s ease;
}
.notif-btn:hover, .notif-btn.aktif { background: #fff; border-color: rgba(79, 70, 229, .35); }
.notif-ikon { font-size: 15px; line-height: 1; }
.notif-label { flex: 1; text-align: left; }
.notif-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: #EF4444; border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
  animation: notif-denyut 2s ease-in-out infinite;
}
@keyframes notif-denyut {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.notif-panel {
  position: fixed;
  left: 12px;
  width: 232px;
  top: 132px;
  z-index: 45;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 14px;
  box-shadow: 0 24px 48px -24px rgba(41, 27, 96, .55);
  padding: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(31, 27, 58, .08);
  margin-bottom: 6px;
}
.notif-head-aksi { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.notif-tutup {
  border: none; background: rgba(31, 27, 58, .06); color: var(--muted);
  width: 22px; height: 22px; border-radius: 7px; cursor: pointer; font-size: 11px;
}
.notif-tandai {
  border: none; background: rgba(79, 70, 229, .1); color: #4F46E5;
  font-size: 10.5px; font-weight: 700; font-family: inherit;
  padding: 4px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.notif-tandai:hover { background: rgba(79, 70, 229, .18); }
.notif-kosong { font-size: 12.3px; color: var(--muted); padding: 12px 6px; text-align: center; }
.notif-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 8px; border-radius: 10px;
  color: var(--ink) !important;
  text-decoration: none;
  transition: opacity .18s ease, transform .18s ease;
}
.notif-item:hover { background: rgba(79, 70, 229, .07); }
/* Baris yang baru diklik: mengecil lalu dihapus oleh JS. */
.notif-item.dibaca { opacity: 0; transform: translateX(8px); pointer-events: none; }
.notif-titik {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--muted);
}
.notif-titik.warning { background: #D97706; }
.notif-titik.danger { background: #DC2626; }
.notif-titik.info { background: #4F46E5; }
.notif-teks { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.notif-teks strong { font-size: 12.4px; font-weight: 600; }
.notif-teks em {
  font-style: normal; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-jml {
  font-size: 10.5px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(79, 70, 229, .12); color: #4F46E5;
}
.notif-jml.warning { background: #FEF3C7; color: #B45309; }
.notif-jml.danger { background: #FEE2E2; color: #B91C1C; }

@media (max-width: 860px) {
  .notif-panel { left: 12px; right: 12px; width: auto; top: 76px; max-height: 70vh; }
}

/* Tombol izin notifikasi browser (muncul hanya bila izin belum diberikan) */
.notif-izin {
  border: none; background: rgba(22, 163, 74, .12); color: #15803D;
  font-size: 10.5px; font-weight: 700; font-family: inherit;
  padding: 4px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.notif-izin:hover { background: rgba(22, 163, 74, .2); }
/* Petunjuk saat izin notifikasi sudah diblokir permanen di browser */
.notif-izin-blok {
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  color: #B45309; background: rgba(245, 158, 11, .16);
  padding: 4px 8px; border-radius: 999px; cursor: help;
}

/* Toast "permintaan baru menunggu ACC" (pojok kanan bawah, di atas segalanya) */
.notif-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 330px;
  max-width: calc(100vw - 24px);
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(79, 70, 229, .22);
  border-left: 4px solid #D97706;
  border-radius: 14px;
  box-shadow: 0 22px 44px -22px rgba(41, 27, 96, .55);
  padding: 12px 12px 8px;
  animation: notif-muncul .22s ease-out;
}
@keyframes notif-muncul {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-toast-head {
  display: flex; align-items: flex-start; gap: 8px;
  justify-content: space-between;
  font-size: 12.8px; color: var(--ink);
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(31, 27, 58, .08);
  margin-bottom: 4px;
}
.notif-toast-tutup {
  border: none; background: rgba(31, 27, 58, .06); color: var(--muted);
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px;
  cursor: pointer; font-size: 11px;
}
.notif-toast-baris {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 8px;
  padding: 7px 6px; border-radius: 9px;
  text-decoration: none; color: var(--ink) !important;
}
.notif-toast-baris:hover { background: rgba(79, 70, 229, .07); }
.notif-toast-label { grid-column: 1; font-size: 12.3px; font-weight: 600; }
.notif-toast-sub {
  grid-column: 1;
  font-size: 10.8px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-toast-baris .notif-jml { grid-column: 2; grid-row: 1 / span 2; }
.notif-toast-baris .notif-jml:empty { display: none; }
@media (max-width: 860px) {
  .notif-toast { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* ---------- Tanda persetujuan (ACC) admin ---------- */
.tanda-acc {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.8px; font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px 3px 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tanda-acc .acc-ikon {
  width: 17px; height: 17px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  color: #fff;
}
.tanda-acc .acc-label { font-weight: 700; }
.tanda-acc .acc-oleh {
  font-weight: 500; opacity: .85;
  border-left: 1px solid currentColor;
  padding-left: 6px;
}
.tanda-acc .acc-waktu { font-weight: 500; opacity: .7; font-size: 10.8px; }

/* Disetujui */
.tanda-acc.acc-ok { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.tanda-acc.acc-ok .acc-ikon { background: #16A34A; }

/* Ditolak */
.tanda-acc.acc-no { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.tanda-acc.acc-no .acc-ikon { background: #DC2626; }

/* Menunggu */
.tanda-acc.acc-wait { background: #FEF3C7; color: #B45309; border-color: #FDE68A; }
.tanda-acc.acc-wait .acc-ikon { background: #D97706; }

@media (max-width: 860px) {
  .tanda-acc .acc-waktu { display: none; }
}

/* ---------- Rekap sisa barang harian ---------- */
.rekap-target {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(79, 70, 229, .06);
  border: 1px solid rgba(79, 70, 229, .16);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.rekap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 10px;
}
.rekap-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  cursor: text;
}
.rekap-item:focus-within { border-color: rgba(79, 70, 229, .5); background: #fff; }
.rekap-nama {
  display: flex; flex-direction: column; gap: 1px;
  font-size: 12.6px; font-weight: 600; min-width: 0;
}
.rekap-nama em {
  font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rekap-input { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.rekap-input input {
  width: 64px; padding: 6px 8px; text-align: right;
  font-size: 13px; font-weight: 600;
}
.rekap-input em { font-style: normal; font-size: 10.5px; color: var(--muted); }

.rekap-list { display: flex; flex-direction: column; gap: 10px; }
.rekap-kartu {
  border: 1px solid rgba(31, 27, 58, .09);
  border-left: 3px solid #16A34A;
  border-radius: 12px;
  background: rgba(255, 255, 255, .66);
  padding: 12px 14px;
}
.rekap-kartu.kosong { border-left-color: #D97706; background: rgba(254, 243, 199, .4); }
.rekap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rekap-catatan {
  font-size: 12.3px; color: #3B3760; margin-top: 8px;
  background: rgba(79, 70, 229, .05);
  border-radius: 8px; padding: 6px 9px;
}
.rekap-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rekap-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.8px; color: #3B3760;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.rekap-chip.habis { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.rekap-chip em { font-style: normal; font-size: 9.8px; color: var(--muted); }

@media (max-width: 860px) {
  .rekap-grid { grid-template-columns: 1fr; }
  .rekap-item { padding: 8px 10px; }
}

/* ---------- Laporan & Export ---------- */
.lap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 10px;
}
.lap-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.lap-item:hover { background: #fff; }
.lap-item.aktif { border-color: rgba(79, 70, 229, .5); background: rgba(238, 242, 255, .8); }
.lap-item input { width: 16px; height: 16px; accent-color: var(--indigo); flex: 0 0 auto; }
.lap-teks { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.lap-teks strong { font-size: 12.8px; font-weight: 600; }
.lap-teks em {
  font-style: normal; font-size: 10.6px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lap-jml {
  font-size: 10.8px; font-weight: 800; color: var(--indigo);
  background: rgba(79, 70, 229, .12);
  border-radius: 999px; padding: 2px 8px;
  flex: 0 0 auto;
}
.lap-aksi { display: flex; gap: 12px; margin-top: 14px; align-items: center; flex-wrap: wrap; }

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

/* ---------- Logo perusahaan (ukuran otomatis per tempat) ----------
   Sidebar 42 · Login 48 · Pratinjau 110 (HP 84) · Kop invoice/gaji 58
   Semua memakai object-fit: contain + max-width/max-height supaya logo
   sebesar apa pun tetap muat dan tidak pernah merusak tata letak. */
.brand-mark {
  width: 42px; height: 42px; overflow: hidden; padding: 0;
  box-sizing: border-box; flex: 0 0 auto;
}
.brand-mark img, .brand-mark .logo-inisial {
  width: 100%; height: 100%; max-width: 42px; max-height: 42px;
  object-fit: contain; display: block; box-sizing: border-box;
}
.brand-mark .logo-inisial { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.brand-mark img { background: #fff; padding: 3px; }

.login-head .brand-mark { width: 48px; height: 48px; }
.login-head .brand-mark img { border-radius: 15px; max-width: 48px; max-height: 48px; }

.logo-inisial { display: grid; place-items: center; }

.logo-setting { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.logo-pratinjau {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 0 0 auto;
}
.logo-besar {
  width: 110px; height: 110px; max-width: 110px; max-height: 110px;
  border-radius: 16px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 10px 24px -16px rgba(41, 27, 96, .6);
  object-fit: contain; padding: 8px; box-sizing: border-box;
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800; color: var(--indigo);
}
span.logo-besar { background: rgba(79, 70, 229, .1); }

/* Panduan ukuran logo */
.logo-ukuran {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px;
}
.logo-ukuran-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 10px;
}
.logo-ukuran-kotak {
  display: grid; place-items: center;
  border: 1px dashed rgba(79, 70, 229, .5);
  border-radius: 4px; flex: 0 0 auto;
  background: rgba(79, 70, 229, .06);
  font-size: 10px; font-weight: 700; color: var(--indigo);
}

/* Kop dokumen cetak (invoice & slip gaji) */
.kop-perusahaan { display: flex; align-items: flex-start; gap: 14px; }
.logo-kop {
  width: 58px; height: 58px; max-width: 58px; max-height: 58px;
  box-sizing: border-box; flex: 0 0 auto;
  border-radius: 11px; object-fit: contain;
  background: #fff; border: 1px solid #EDE9FE; padding: 4px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: var(--indigo);
}
span.logo-kop { background: #EEF2FF; }
.kop-perusahaan h2 { font-size: 18px; margin: 0 0 2px; }

@media (max-width: 860px) {
  .logo-setting { flex-direction: column; align-items: stretch; }
  .logo-pratinjau { align-items: flex-start; }
  .logo-besar { width: 84px; height: 84px; max-width: 84px; max-height: 84px; font-size: 26px; }
  .logo-kop { width: 46px; height: 46px; }
}

@media print {
  .kop-perusahaan { gap: 10px; }
  .logo-kop { width: 52px; height: 52px; }
}

/* ---------- Pekerjaan & Poin ---------- */
.kerjapeta-wrap {
  margin-top: 16px;
  padding: 14px;
  background: rgba(79, 70, 229, .04);
  border: 1px solid rgba(79, 70, 229, .14);
  border-radius: 13px;
}

/* Bar aksi massal (ceklis beberapa pekerjaan → ACC / tolak bersamaan) */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(79, 70, 229, .06);
  border: 1px solid rgba(79, 70, 229, .18);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.bulk-bar input[type="number"],
.bulk-bar input[type="text"] { padding: 7px 9px; font-size: 12.4px; }
.bulk-pilih {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.4px; font-weight: 600; cursor: pointer; user-select: none;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(31, 27, 58, .1);
}
.bulk-pilih input { width: 15px; height: 15px; accent-color: var(--indigo); cursor: pointer; }
.bulk-info {
  font-size: 12px; color: var(--muted);
  padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7);
}
.bulk-info.ada { color: var(--indigo); font-weight: 700; background: rgba(79, 70, 229, .12); }
.bulk-bar .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Baris centang dengan teks penjelas (mis. izin potongan menumpuk) */
.check-line {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.4px; line-height: 1.5; color: #3B3760;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(31, 27, 58, .09);
  border-radius: 10px; padding: 9px 12px;
  cursor: pointer;
}
.check-line input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--indigo); flex: 0 0 auto; cursor: pointer; }

/* Ceklis di kiri tiap pekerjaan pending */
.kerja-pilih { display: inline-flex; align-items: center; margin-right: 7px; vertical-align: middle; }
.kerja-cek {
  width: 17px; height: 17px; cursor: pointer;
  accent-color: var(--indigo);
}

.kerja-list { display: flex; flex-direction: column; gap: 10px; }
.kerja-item {
  border: 1px solid rgba(31, 27, 58, .09);
  border-left: 3px solid #16A34A;
  border-radius: 12px;
  background: rgba(255, 255, 255, .66);
  padding: 12px 14px;
}
.kerja-item.pending { border-left-color: #D97706; background: rgba(254, 243, 199, .35); }
.kerja-item.tolak { border-left-color: #DC2626; background: rgba(254, 242, 242, .5); }
.kerja-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kerja-judul { font-size: 13.6px; font-weight: 700; margin-top: 5px; }
.kerja-head .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kerja-detail {
  margin-top: 9px; font-size: 12.6px; line-height: 1.6; color: #3B3760;
  background: rgba(255, 255, 255, .7);
  border-radius: 9px; padding: 8px 11px;
}
.kerja-lokasi {
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 9px; font-size: 12.3px; color: #3B3760;
}
.kerja-lokasi-ikon { font-size: 13px; line-height: 1.4; }
.kerja-catatan {
  margin-top: 8px; font-size: 11.8px; color: #92400E;
  background: rgba(254, 243, 199, .75);
  border: 1px solid #FDE68A;
  border-radius: 8px; padding: 6px 10px;
}
.kerja-foto { display: inline-block; margin-top: 10px; }
.kerja-foto img {
  max-width: 160px; max-height: 120px;
  border-radius: 10px; border: 1px solid var(--line);
  object-fit: cover; display: block;
}

/* Kotak tukar poin */
.tukar-box {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(139, 92, 246, .1));
  border: 1px solid rgba(79, 70, 229, .2);
  border-radius: 14px;
  padding: 18px 20px;
}
.tukar-angka { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--indigo); }
.tukar-uang { font-size: 22px; font-weight: 800; color: #15803D; letter-spacing: -.02em; }
.tukar-box form { margin-left: auto; }

@media (max-width: 860px) {
  .kerja-head { flex-direction: column; }
  .tukar-box { gap: 14px; }
  .tukar-box form { margin-left: 0; width: 100%; }
  .tukar-box form .btn { width: 100%; }
}

/* ---------- Indikator lokasi aktif (wajib untuk input poin) ---------- */
.lokasi-live {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(254, 226, 226, .7);
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: background .2s ease, border-color .2s ease;
}
.lokasi-live-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #DC2626; flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .15);
  animation: lokasi-pulse 1.6s ease-in-out infinite;
}
.lokasi-live-teks { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.lokasi-live-teks strong { font-size: 13px; font-weight: 700; color: #B91C1C; }
.lokasi-live-teks em {
  font-style: normal; font-size: 11.5px; color: #92400E;
  word-break: break-word;
}
.lokasi-live .btn { flex: 0 0 auto; }

.lokasi-live.aktif {
  background: rgba(220, 252, 231, .85);
  border-color: #86EFAC;
}
.lokasi-live.aktif .lokasi-live-dot {
  background: #16A34A;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .18);
  animation: none;
}
.lokasi-live.aktif .lokasi-live-teks strong { color: #15803D; }
.lokasi-live.aktif .lokasi-live-teks em { color: #166534; }

.lokasi-live.manual {
  background: rgba(254, 243, 199, .8);
  border-color: #FDE68A;
}
.lokasi-live.manual .lokasi-live-dot {
  background: #D97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .16);
  animation: none;
}
.lokasi-live.manual .lokasi-live-teks strong { color: #B45309; }
.lokasi-live.manual .lokasi-live-teks em { color: #92400E; }

@keyframes lokasi-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

.btn:disabled, .btn[disabled] {
  opacity: .55; cursor: not-allowed;
  transform: none !important; box-shadow: none;
}

/* ============================================================
   Monitor Server (monitor.php) — dashboard padat ala panel monitoring
   ============================================================ */
.mon-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.mon-judul { font-size: 20px; margin: 0 0 4px; color: var(--ink); }
.mon-sub { margin: 0; font-size: 12px; color: var(--muted); max-width: 640px; line-height: 1.5; }
.mon-head-aksi { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mon-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(79, 70, 229, .1); color: #4338CA;
  border: 1px solid rgba(79, 70, 229, .2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* KPI tiles */
.mon-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.mon-tile {
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(31, 27, 58, .06);
  min-width: 0;
}
.mon-tile-label {
  font-size: 9.8px; text-transform: uppercase; letter-spacing: .7px;
  font-weight: 700; color: #8B87A8; margin-bottom: 5px;
}
.mon-tile-value {
  font-size: 20px; font-weight: 800; color: var(--ink);
  line-height: 1.15; font-variant-numeric: tabular-nums;
  letter-spacing: -.3px; overflow-wrap: anywhere;
}
.mon-tile-sub { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* Grid panel */
.mon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.mon-span2 { grid-column: span 2; }
.mon-panel { min-width: 0; }
@media (max-width: 1100px) {
  .mon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-span2 { grid-column: span 2; }
}
@media (max-width: 720px) {
  .mon-grid { grid-template-columns: 1fr; }
  .mon-span2 { grid-column: span 1; }
  .mon-tile-value { font-size: 18px; }
}

/* Bar kapasitas */
.mon-bar-wrap { margin: 4px 0 14px; }
.mon-bar-label {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap;
}
.mon-bar-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mon-bar {
  height: 9px; border-radius: 999px; overflow: hidden;
  background: rgba(31, 27, 58, .09);
}
.mon-bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4F46E5, #8B5CF6);
}
.mon-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 8px; font-size: 10.8px; color: var(--muted);
}
.mon-legend .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 5px; vertical-align: 1px;
}
.mon-legend .dot.db { background: #4F46E5; }
.mon-legend .dot.sesi { background: #8B5CF6; }
.mon-legend .dot.aset { background: #A78BFA; }
.mon-legend .dot.foto { background: #16A34A; }

/* Kotak hitung kapasitas */
.mon-hitung {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-bottom: 12px;
}
@media (max-width: 720px) { .mon-hitung { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mon-hitung-item {
  background: rgba(79, 70, 229, .06);
  border: 1px solid rgba(79, 70, 229, .14);
  border-radius: 11px; padding: 10px 12px; min-width: 0;
}
.mon-hitung-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: #8B87A8; }
.mon-hitung-value { font-size: 15px; font-weight: 800; color: #3730A3; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.mon-hitung-note { font-size: 10px; color: var(--muted); line-height: 1.35; }

/* Daftar baris rapat */
.mon-list { display: flex; flex-direction: column; }
.mon-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 6px 0;
  border-bottom: 1px dashed rgba(31, 27, 58, .08);
  font-size: 11.8px; color: var(--muted);
}
.mon-row:last-child { border-bottom: 0; }
.mon-row > span { min-width: 0; }
.mon-row > strong {
  font-weight: 700; color: var(--ink); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  font-size: 11.5px;
}
.mon-row > strong.small { white-space: normal; word-break: break-all; font-weight: 600; font-size: 10.5px; }
.mon-row > strong.ok { color: #15803D; }
.mon-row > strong.warn { color: #B45309; }
.mon-row > strong.bad { color: #B91C1C; }

.mon-ekstensi { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mon-chip {
  font-size: 10.2px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(22, 163, 74, .1); color: #15803D; border: 1px solid rgba(22, 163, 74, .22);
}
.mon-chip.bad { background: rgba(185, 28, 28, .1); color: #B91C1C; border-color: rgba(185, 28, 28, .25); }

/* Tabel ala monitoring (nama · bar · angka) */
.mon-tabel { display: flex; flex-direction: column; gap: 5px; }
.mon-tabel-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.15fr) 2fr auto auto;
  gap: 10px; align-items: center;
  font-size: 11.5px;
}
.mon-tabel-nama {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; color: #3B3760;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mon-tabel-bar { height: 7px; border-radius: 999px; background: rgba(31, 27, 58, .07); overflow: hidden; }
.mon-tabel-bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #6366F1, #A78BFA);
}
.mon-tabel-byte { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); white-space: nowrap; }
.mon-tabel-baris { font-size: 10.5px; color: var(--muted); white-space: nowrap; text-align: right; }
.mon-subjudul {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  font-weight: 700; color: #8B87A8; margin: 14px 0 8px;
}
@media (max-width: 620px) {
  .mon-tabel-row { grid-template-columns: minmax(80px, 1.2fr) 1.4fr auto; }
  .mon-tabel-baris { display: none; }
}

/* Grafik aktivitas 14 hari */
.mon-chart {
  display: grid; grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 5px; align-items: end; height: 150px; margin-top: 6px;
}
.mon-col {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 3px; min-width: 0;
}
.mon-col-val { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; height: 11px; }
.mon-col-bar {
  width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #8B5CF6, #4F46E5);
  min-height: 3px;
}
.mon-col-tgl { font-size: 9px; color: #8B87A8; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 620px) {
  .mon-chart { height: 120px; gap: 3px; }
  .mon-col-val { display: none; }
  .mon-col-tgl { font-size: 8px; transform: rotate(-45deg); margin-bottom: 8px; }
}

/* Diagnosa */
.mon-diag { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .mon-diag { grid-template-columns: 1fr; } }
.mon-diag-item {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: 11px; padding: 10px 12px;
  background: rgba(22, 163, 74, .07);
  border: 1px solid rgba(22, 163, 74, .18);
  min-width: 0;
}
.mon-diag-item.warn { background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .22); }
.mon-diag-item.bad { background: rgba(185, 28, 28, .07); border-color: rgba(185, 28, 28, .22); }
.mon-diag-ikon {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: #16A34A; color: #fff; margin-top: 1px;
}
.mon-diag-item.warn .mon-diag-ikon { background: #D97706; }
.mon-diag-item.bad .mon-diag-ikon { background: #B91C1C; }
.mon-diag-judul { font-size: 12px; font-weight: 700; color: var(--ink); }
.mon-diag-pesan { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

.mon-catatan {
  font-size: 11px; color: var(--muted); line-height: 1.55;
  background: rgba(79, 70, 229, .05);
  border-left: 3px solid rgba(79, 70, 229, .35);
  border-radius: 8px; padding: 9px 12px; margin: 12px 0 0;
}
.mon-catatan code {
  font-size: 10.5px; background: rgba(31, 27, 58, .07);
  padding: 1px 5px; border-radius: 4px;
}
.mon-footer {
  text-align: center; font-size: 10.8px; color: #8B87A8;
  margin: 20px 0 8px; line-height: 1.5;
}

/* ============================================================
   Bon / pinjaman teknisi (bon.php) + potongan bon di Bayar Gaji
   ============================================================ */
.bon-mini-bar {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(31, 27, 58, .1);
  margin: 4px 0 3px; width: 100px;
}
.bon-mini-bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #16A34A, #4ADE80);
}

.bon-plafon-bar { margin: 8px 0 10px; }
.bon-plafon-info { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.bon-plafon-info strong { color: #3730A3; font-variant-numeric: tabular-nums; }

.bon-riwayat {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; padding: 4px 0 10px;
}
.bon-riwayat-judul {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  font-weight: 700; color: #8B87A8;
}
.bon-bayar-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-size: 10.8px; color: #3B3760;
  background: rgba(22, 163, 74, .09);
  border: 1px solid rgba(22, 163, 74, .22);
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap;
}
.bon-bayar-chip strong { color: #15803D; font-variant-numeric: tabular-nums; }
.bon-bayar-chip em { font-style: normal; font-size: 10px; color: var(--muted); }

/* Kotak potongan bon di halaman Bayar Gaji */
.bon-potong-box {
  background: rgba(217, 119, 6, .07);
  border: 1px solid rgba(217, 119, 6, .22);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.bon-potong-isi { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.bon-potong-isi[hidden] { display: none; }
.bon-potong-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; }
.bon-potong-baris {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
  font-size: 11.3px; color: var(--muted);
}
.bon-potong-baris strong { color: #92400E; font-variant-numeric: tabular-nums; }
.bon-bayar-form input { min-width: 0; }
@media (max-width: 620px) {
  .bon-bayar-form { justify-content: flex-start !important; }
  .bon-bayar-form input[type="date"] { width: 100% !important; }
}

/* ============================================================
   Jadwal servis (servis.php) & raport (raport_servis.php)
   ============================================================ */
.servis-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
  margin-top: 4px;
}
.servis-card {
  display: flex; flex-direction: column; gap: 9px;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .75);
  border-left: 4px solid #94A3B8;
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 6px 18px rgba(31, 27, 58, .07);
  min-width: 0;
}
.servis-card.merah { border-left-color: #DC2626; background: rgba(254, 226, 226, .42); }
.servis-card.kuning { border-left-color: #D97706; background: rgba(254, 243, 199, .45); }
.servis-card.hijau { border-left-color: #16A34A; background: rgba(220, 252, 231, .34); }
.servis-card.selesai { border-left-color: #6366F1; background: rgba(238, 242, 255, .35); }

.servis-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.servis-card-judul { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.servis-card-meta { font-size: 10.8px; color: var(--muted); margin-top: 2px; }
.servis-card-waktu {
  font-size: 11.4px; font-weight: 600; color: #3B3760;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 8px; padding: 5px 9px;
}
.servis-card.merah .servis-card-waktu { color: #B91C1C; background: rgba(255, 255, 255, .82); }
.servis-card.kuning .servis-card-waktu { color: #B45309; }
.servis-card-baris {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 11.2px; color: var(--muted);
}
.servis-card-baris strong { color: var(--ink); font-size: 11.5px; text-align: right; }

.servis-card-lap {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 10px; padding: 8px 9px;
  min-width: 0;
}
.servis-foto {
  width: 62px; height: 62px; object-fit: cover;
  border-radius: 8px; flex: 0 0 auto;
  border: 1px solid rgba(31, 27, 58, .1);
}
.servis-lap-tgl { font-size: 10.5px; font-weight: 700; color: #15803D; }
.servis-lap-catatan { font-size: 11px; color: #4B4670; line-height: 1.4; margin-top: 2px; overflow-wrap: anywhere; }
.servis-lap-admin { font-size: 10.5px; color: #B45309; margin-top: 3px; }
.servis-card-aksi { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; }

.servis-badge-merah { background: #FEE2E2; color: #B91C1C; }
.servis-badge-kuning { background: #FEF3C7; color: #B45309; }
.servis-badge-hijau { background: #DCFCE7; color: #15803D; }
.servis-badge-selesai { background: #E0E7FF; color: #4338CA; }

.servis-foto-besar {
  display: block; width: 100%; max-width: 520px;
  border-radius: 12px; border: 1px solid var(--line);
  margin: 0 0 14px;
}
.servis-detail { display: flex; flex-direction: column; gap: 8px; }
.servis-detail > div { display: flex; gap: 12px; font-size: 12px; align-items: baseline; }
.servis-detail > div > span { flex: 0 0 96px; color: var(--muted); font-size: 11px; }
.servis-detail > div > strong { color: var(--ink); font-weight: 600; }

/* Skor raport */
.servis-skor {
  display: inline-grid; place-items: center;
  min-width: 38px; height: 26px; border-radius: 8px;
  font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.servis-skor.baik { background: #DCFCE7; color: #15803D; }
.servis-skor.cukup { background: #FEF3C7; color: #B45309; }
.servis-skor.buruk { background: #FEE2E2; color: #B91C1C; }
.servis-skor-bar {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(31, 27, 58, .09); margin-top: 4px; width: 96px;
}
.servis-skor-bar > i { display: block; height: 100%; border-radius: 999px; }
.servis-skor-bar > i.baik { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.servis-skor-bar > i.cukup { background: linear-gradient(90deg, #D97706, #FBBF24); }
.servis-skor-bar > i.buruk { background: linear-gradient(90deg, #DC2626, #F87171); }

@media (max-width: 560px) {
  .servis-board { grid-template-columns: 1fr; gap: 14px; }
  .servis-card-aksi .btn { width: 100%; }
}

/* ============================================================
   Jadwal kerja teknisi (kerja_jadwal.php / kerja_lapor.php)
   Memakai tampilan kartu yang sama dengan jadwal servis.
   ============================================================ */
.servis-card.abu { border-left-color: #94A3B8; background: rgba(241, 245, 249, .55); }

.kerja-alat { display: flex; flex-wrap: wrap; gap: 6px; }
.kerja-alat-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.8px; font-weight: 600; color: #3B3760;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 999px; padding: 3px 9px;
  overflow-wrap: anywhere;
}
.kerja-alat-item b { color: #4F46E5; font-variant-numeric: tabular-nums; }
.kerja-alat-item.manual { border-style: dashed; color: #6B7280; }

.kerja-sop {
  font-size: 11px; color: #4B4670; line-height: 1.45;
  background: rgba(224, 231, 255, .5);
  border: 1px dashed rgba(79, 70, 229, .32);
  border-radius: 9px; padding: 7px 9px;
  white-space: pre-line; overflow-wrap: anywhere;
}

.kerja-ketepatan {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.6px; font-weight: 700; border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.kerja-ketepatan.tepat { background: #DCFCE7; color: #15803D; }
.kerja-ketepatan.terlambat { background: #FEE2E2; color: #B91C1C; }

/* Form baris alat yang dibawa */
.alat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 76px minmax(0, 1fr) 104px 34px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.alat-row input, .alat-row select { min-width: 0; width: 100%; }
/* Kolom ditetapkan eksplisit: input manual & satuan bisa `hidden` (hanya untuk
   baris manual), dan tanpa ini tombol ✕ akan melompat ke kolom lebar. */
.alat-row .alat-sumber { grid-column: 1; }
.alat-row .alat-qty { grid-column: 2; text-align: center; }
.alat-row .alat-manual { grid-column: 3; }
.alat-row .alat-satuan { grid-column: 4; }
.alat-row .alat-hapus { grid-column: 5; padding: 6px 8px; line-height: 1; }

@media (max-width: 720px) {
  .alat-row { grid-template-columns: minmax(0, 1.4fr) 62px 34px; }
  .alat-row .alat-sumber { grid-column: 1; }
  .alat-row .alat-qty { grid-column: 2; }
  .alat-row .alat-hapus { grid-column: 3; }
  .alat-row .alat-manual, .alat-row .alat-satuan { grid-column: 1 / -1; }
}

/* ============================================================
   Catatan kerja & daftar barang mau dibeli (catatan_admin.php)
   ============================================================ */
.catatan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 16px;
  margin-top: 4px;
}
.catatan-card {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .75);
  border-left: 4px solid #6366F1;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(31, 27, 58, .07);
  min-width: 0;
}
.catatan-card.belanja { border-left-color: #D97706; background: rgba(255, 251, 235, .62); }
.catatan-card.due { border-left-color: #DC2626; background: rgba(254, 242, 242, .66); }
.catatan-card.selesai { border-left-color: #16A34A; background: rgba(240, 253, 244, .5); opacity: .92; }
.catatan-card.selesai .catatan-judul { text-decoration: line-through; color: #6B7280; }

.catatan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.catatan-top > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.catatan-chip {
  display: inline-flex; align-items: center;
  font-size: 10.4px; font-weight: 800; letter-spacing: .02em;
  border-radius: 999px; padding: 3px 10px;
}
.catatan-chip.kerja { background: #E0E7FF; color: #4338CA; }
.catatan-chip.belanja { background: #FEF3C7; color: #B45309; }

.catatan-ingat {
  font-size: 10.6px; font-weight: 700; color: #4338CA;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.catatan-ingat.lewat { color: #B91C1C; border-color: rgba(185, 28, 28, .3); background: #FEE2E2; }

.catatan-judul { font-size: 13.6px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.catatan-isi { font-size: 11.6px; color: #4B4670; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }

.catatan-baris {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 11.2px; color: var(--muted);
}
.catatan-baris strong { color: var(--ink); font-size: 11.6px; text-align: right; }

.catatan-meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 10.4px; color: var(--muted);
  border-top: 1px dashed rgba(31, 27, 58, .12);
  padding-top: 7px; margin-top: 2px;
}

.catatan-bagi { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.catatan-bagi-label { font-size: 10.4px; color: var(--muted); }
.catatan-bagi-label.privat { color: #9A3412; font-weight: 600; }
.catatan-orang {
  font-size: 10.4px; font-weight: 600; color: #3730A3;
  background: rgba(224, 231, 255, .9);
  border: 1px solid rgba(99, 102, 241, .28);
  border-radius: 999px; padding: 2px 8px;
}

.catatan-aksi { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; }

/* Pilihan teknisi yang boleh melihat catatan */
.catatan-pilih-orang {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.catatan-pilih-item {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 10px; padding: 8px 10px;
  font-size: 12px; cursor: pointer; min-width: 0;
}
.catatan-pilih-item:has(input:checked) {
  border-color: rgba(79, 70, 229, .55);
  background: rgba(224, 231, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .2);
}
.catatan-pilih-item input { flex: 0 0 auto; }
.catatan-pilih-item > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.catatan-pilih-item em { font-style: normal; font-size: 10px; color: var(--muted); }

@media (max-width: 560px) {
  .catatan-grid { grid-template-columns: 1fr; gap: 14px; }
  .catatan-aksi .btn { width: auto; }
}

/* ============================================================
   Topologi Jaringan (topologi.php)
   ============================================================ */
.topo-peta-card { min-width: 0; margin-bottom: 16px; }
.topo-map { height: 560px; border-radius: 12px; overflow: hidden; }

/* Mode layar penuh: kartu peta menutupi seluruh viewport (bukan Fullscreen API,
   supaya tombol & toolbar tetap terlihat dan berfungsi di HP). */
.topo-peta-card.topo-fs {
  position: fixed; inset: 0; z-index: 9998;
  margin: 0; border-radius: 0;
  display: flex; flex-direction: column;
  background: #F3F0FF;
  padding: 10px 12px 8px;
  overflow: auto;
}
.topo-peta-card.topo-fs .topo-map { flex: 1 1 auto; height: auto; min-height: 240px; border-radius: 10px; }
.topo-peta-card.topo-fs .card-head h2 { font-size: 15px; }
.topo-peta-card.topo-fs .card-head p { display: none; }
body.topo-fs-body { overflow: hidden; }

/* Titik "lokasi saya" */
.topo-user-pin { background: none; border: none; }
.topo-user-dot {
  position: absolute; left: 3px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #2563EB; border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(37, 99, 235, .6);
}
.topo-user-ring {
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(37, 99, 235, .28);
  animation: topo-denyut 1.8s ease-out infinite;
}
@keyframes topo-denyut {
  0% { transform: scale(.7); opacity: .9; }
  100% { transform: scale(2.1); opacity: 0; }
}
.topo-picker { height: 320px; border-radius: 12px; overflow: hidden; }

.topo-legenda {
  display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px;
}
.topo-legenda-item {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 9px; padding: 5px 9px 5px 7px;
  min-width: 0;
}
.topo-legenda-teks { display: flex; flex-direction: column; gap: 0; line-height: 1.15; min-width: 0; }
.topo-legenda-teks strong { font-size: 10.8px; color: var(--ink); }
.topo-legenda-teks em { font-style: normal; font-size: 9.4px; color: var(--muted); }

/* Pin peta */
.topo-pin { background: none; border: none; }

/* Ikon peta: BENTUK + WARNA berbeda tiap tipe (lihat topo_tipe_warna/ikon).
   --c = warna tipe, diberikan inline dari server. */
.topo-ikon, .topo-pin-ikon {
  display: inline-grid; place-items: center;
  background: var(--c, #4F46E5);
  color: #fff;
  font-size: 9px; font-weight: 800; line-height: 1;
  box-shadow: 0 2px 8px rgba(31, 27, 58, .45);
  flex: 0 0 auto;
}

/* Ukuran & bentuk dasar di legenda/tabel */
.topo-ikon { width: 16px; height: 16px; border-radius: 4px; }

/* OLT — perangkat pusat: kotak membulat besar + petir */
.topo-ikon-olt, .topo-pin-ikon.topo-ikon-olt { border-radius: 7px; }
.topo-ikon-olt { width: 18px; height: 18px; font-size: 10px; }

/* ODC — kabinet: persegi tegas */
.topo-ikon-odc, .topo-pin-ikon.topo-ikon-odc { border-radius: 3px; }
.topo-ikon-odc::after, .topo-pin-ikon.topo-ikon-odc::after {
  content: ''; position: absolute; width: 40%; height: 40%;
  border: 1.5px solid rgba(255, 255, 255, .9); border-radius: 1px;
}

/* ODP — titik distribusi: lingkaran hijau dengan titik putih */
.topo-ikon-odp, .topo-pin-ikon.topo-ikon-odp { border-radius: 50%; }
.topo-ikon-odp::after, .topo-pin-ikon.topo-ikon-odp::after {
  content: ''; position: absolute; width: 30%; height: 30%;
  background: #fff; border-radius: 50%;
}

/* Pelanggan / rumah: bentuk atap runcing */
.topo-ikon-pelanggan, .topo-pin-ikon.topo-ikon-pelanggan {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 42%, 100% 100%, 0% 100%, 0% 42%);
  box-shadow: 0 2px 7px rgba(31, 27, 58, .4);
}
.topo-pin-ikon.topo-ikon-pelanggan { background: linear-gradient(180deg, #F59E0B, #D97706); }

/* Tiang / aksesoris: belah ketupat (clip-path, bukan rotate — kalau memakai
   transform, aturan translate(-50%,-50%) milik pin ikut tertimpa sehingga
   ikon meleset dari koordinat) */
.topo-ikon-tiang, .topo-pin-ikon.topo-ikon-tiang {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: var(--c, #64748B);
}
.topo-ikon-tiang::after, .topo-pin-ikon.topo-ikon-tiang::after {
  content: ''; position: absolute; width: 3px; height: 3px;
  background: #fff; border-radius: 50%;
}

/* Di peta: ikon dipusatkan tepat di koordinat, label di kanan */
.topo-pin-ikon {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px;
  transform: translate(-50%, -50%);
  border: 2.5px solid #fff;
  border-radius: 4px;
  font-size: 9.5px;
  box-sizing: content-box;
}
.topo-pin.topo-pin-olt .topo-pin-ikon { width: 19px; height: 19px; font-size: 11px; border-radius: 8px; }
.topo-pin.topo-pin-pelanggan .topo-pin-ikon {
  width: 17px; height: 17px; border: none;
  box-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(31, 27, 58, .45)) drop-shadow(0 0 1.5px #fff);
}
.topo-pin.topo-pin-tiang .topo-pin-ikon { width: 13px; height: 13px; border-width: 2px; }

.topo-pin-label {
  position: absolute; left: 50%; top: 50%;
  margin-left: 16px; transform: translateY(-50%);
  font-size: 10.5px; font-weight: 700; color: #1F1B3A;
  background: rgba(255, 255, 255, .95);
  padding: 2px 7px; border-radius: 6px;
  border-left: 3px solid #4F46E5;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(31, 27, 58, .22);
}
/* =========================================================
   Status ODP di peta (permintaan pemilik)
   1) BELUM DI-ACC ADMIN → ikon & label ORANGE + cincin putus-putus.
   2) ODP PENUH (semua port terpakai) → cincin merah + badge "PENUH",
      jadi teknisi tahu tidak bisa menambah pelanggan lagi.
   ========================================================= */
.topo-pin-ikon.topo-ikon-pending {
  background: #EA580C !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .28), 0 2px 8px rgba(31, 27, 58, .45);
}
.topo-pin-label-pending { background: #FFF7ED; border-left-color: #EA580C !important; }
.topo-pin-label-pending .topo-pin-acc {
  display: inline-block; margin-left: 4px;
  font-size: 8.5px; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: #EA580C; border-radius: 4px; padding: 0 3px;
  vertical-align: 1px;
}
/* Cincin status: elemen sendiri yang dipusatkan di koordinat */
.topo-pin-ring {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; box-sizing: border-box;
}
.topo-pin-ring-pending { border: 1.5px dashed #EA580C; opacity: .9; }
.topo-pin-ring-full {
  border: 2px solid #DC2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .2);
  animation: topo-penuh-denyut 1.9s ease-out infinite;
}
@keyframes topo-penuh-denyut {
  0%   { box-shadow: 0 0 0 2px rgba(220, 38, 38, .35); }
  70%  { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0); }
}

.topo-pin-ikon.topo-ikon-penuh {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .85), 0 2px 9px rgba(31, 27, 58, .5);
}
.topo-pin-label-penuh { background: #FEF2F2; border-left-color: #DC2626 !important; }
.topo-pin-penuh {
  display: inline-block; margin-left: 4px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .03em;
  color: #fff; background: #DC2626; border-radius: 4px; padding: 0 3px;
  vertical-align: 1px;
}
/* Penuh + pending: cincin merah solid (bahaya) menang atas cincin orange */
.topo-pin-full.topo-pin-pending .topo-pin-ring-pending { display: none; }
.topo-penuh-teks { color: #B91C1C; font-size: 11.5px; }
/* Chip kecil "belum ACC" pada kode titik di tabel */
.chip-acc-pending {
  font-size: 8.8px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: #C2410C; background: #FFEDD5; border: 1px solid #FDBA74;
  border-radius: 999px; padding: 0 5px; margin-left: 4px; white-space: nowrap;
}
.topo-kode-pending .topo-ikon { background: #EA580C !important; }
/* Ikon kecil di tabel/legenda saat belum di-ACC */
.topo-ikon.topo-ikon-pending { background: #EA580C !important; }
/* Ikon kecil saat ODP penuh: cincin merah */
.topo-ikon.topo-ikon-penuh { box-shadow: 0 0 0 2px #DC2626; }


.topo-pin:hover .topo-pin-ikon { filter: brightness(1.08); }
.topo-pin:hover .topo-pin-olt .topo-pin-ikon { transform: translate(-50%, -50%) scale(1.12); }
.topo-pin:hover .topo-pin-label { background: #fff; }

/* Tabel: ikon kecil + chip tipe berwarna */
.topo-ikon { position: relative; }
.topo-tipe-chip {
  display: inline-block; font-size: 10.4px; font-weight: 800;
  color: #fff; background: var(--c, #4F46E5);
  border-radius: 999px; padding: 2px 9px;
  letter-spacing: .02em; white-space: nowrap;
}
.topo-pop-tipe {
  display: inline-block; color: #fff; background: var(--c, #4F46E5);
  border-radius: 999px; padding: 1px 8px; font-size: 11px;
}
.topo-line-label { background: none; border: none; }
.topo-line-label span {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 9.5px; font-weight: 700; color: #1F1B3A;
  background: rgba(255, 255, 255, .92);
  padding: 1px 6px; border-radius: 999px;
  border: 1px solid rgba(31, 27, 58, .15);
  border-left-width: 3px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(31, 27, 58, .18);
}
.topo-pop { font-size: 12px; line-height: 1.5; color: #1F1B3A; min-width: 180px; }
.topo-pop-baris { font-size: 11.5px; color: #4B4670; }
/* Status ACC perubahan topologi (non-admin menunggu persetujuan admin) */
.topo-acc-pending { color: #B45309; font-size: 11.5px; }
.topo-acc-pending::before { content: ''; }

/* Menu aksi di bawah popup peta (Ubah / buka detail) */
.topo-pop-aksi {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(31, 27, 58, .1);
}
.topo-pop-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1.2;
  padding: 5px 10px; border-radius: 999px;
  color: #1F1B3A; text-decoration: none;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(79, 70, 229, .28);
  white-space: nowrap;
}
.topo-pop-btn:hover { background: #EEF2FF; border-color: #4F46E5; color: #3730A3; }
.topo-pop-btn.utama {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
}
.topo-pop-btn.utama:hover { background: linear-gradient(135deg, #4338CA, #7C3AED); color: #fff; }

/* Daftar pohon */
/* Chip & penanda nilai */
.topo-kode { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-family: ui-monospace, monospace; font-size: 12px; }
.topo-kode i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.topo-kabel-chip {
  display: inline-block; font-size: 10.6px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  color: #1F1B3A; background: rgba(255, 255, 255, .85);
  border-left: 3px solid var(--kabel, #4F46E5);
  border-top: 1px solid rgba(31, 27, 58, .08);
  border-right: 1px solid rgba(31, 27, 58, .08);
  border-bottom: 1px solid rgba(31, 27, 58, .08);
}
.topo-redaman {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 999px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.topo-redaman.baik { background: #DCFCE7; color: #15803D; }
.topo-redaman.cukup { background: #FEF3C7; color: #B45309; }
.topo-redaman.buruk { background: #FEE2E2; color: #B91C1C; }
.topo-redaman.kosong { background: rgba(31, 27, 58, .07); color: var(--muted); }

.topo-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
}
.topo-detail-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topo-detail-grid span { font-size: 10.6px; color: var(--muted); }
.topo-detail-grid strong { font-size: 12.4px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }

.stat-kecil { font-size: 13px; color: var(--muted); font-weight: 600; }

@media (max-width: 900px) {
  .topo-map { height: 420px; }
  .topo-peta-card.topo-fs { padding: 8px; }
}

@media (max-width: 560px) {
  .topo-peta-card .card-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .topo-peta-card .card-head .btn-row { width: 100%; }
  .topo-peta-card .card-head .btn-row .btn { flex: 1 1 auto; }
}

/* ============================================================
   Chat internal (chat.php)
   ============================================================ */
.chat-wrap {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.chat-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.chat-side-label {
  font-size: 10.4px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 12px 2px 4px;
}
.chat-room {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none; color: inherit; min-width: 0;
}
.chat-room:hover { background: rgba(255, 255, 255, .8); border-color: rgba(31, 27, 58, .08); }
.chat-room.aktif {
  background: rgba(224, 231, 255, .85);
  border-color: rgba(79, 70, 229, .35);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .12);
}
.chat-room-avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  object-fit: cover; overflow: hidden;
}
.chat-room-avatar.foto { background: none; border: 1px solid rgba(31, 27, 58, .1); }
.chat-room-avatar.grup { background: linear-gradient(135deg, #0891B2, #4F46E5); font-size: 15px; }
.chat-room-isi { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.chat-room-nama { font-size: 12.4px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.chat-room-akhir {
  font-size: 10.6px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-badge {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: grid; place-items: center;
  font-size: 10.4px; font-weight: 800; color: #fff;
  background: #DC2626;
}

.chat-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-head { margin-bottom: 0; }
.chat-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 56vh; min-height: 260px; overflow-y: auto;
  padding: 12px 10px;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(31, 27, 58, .07);
  border-radius: 12px;
}
.chat-item { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.chat-item.saya { flex-direction: row-reverse; }
.chat-avatar {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  object-fit: cover; overflow: hidden;
}
.chat-bubble-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: min(78%, 560px); }
.chat-item.saya .chat-bubble-wrap { align-items: flex-end; }
.chat-nama { font-size: 10.8px; font-weight: 700; color: #4338CA; }
.chat-nama em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 5px; font-size: 10px; }
.chat-bubble {
  font-size: 12.8px; line-height: 1.5; color: var(--ink);
  background: #fff;
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 12px 12px 12px 4px;
  padding: 8px 11px;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(31, 27, 58, .05);
}
.chat-item.saya .chat-bubble {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #fff; border-color: transparent;
  border-radius: 12px 12px 4px 12px;
}
.chat-meta { display: flex; align-items: center; gap: 6px; font-size: 9.8px; color: var(--muted); }
.chat-hapus-form { display: inline; margin: 0; }
.chat-hapus {
  border: none; background: none; cursor: pointer;
  color: #B91C1C; font-size: 11px; line-height: 1; padding: 0 2px; opacity: .55;
}
.chat-hapus:hover { opacity: 1; }
.chat-kosong { text-align: center; font-size: 12px; color: var(--muted); padding: 40px 12px; }

.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 140px; resize: vertical; }

/* ---------- Komentar status (teks saja) ---------- */
.komentar-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.komentar-item {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(31, 27, 58, .07);
  border-radius: 11px; padding: 9px 11px;
  min-width: 0;
}
.komentar-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  object-fit: cover; overflow: hidden;
}
.komentar-isi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.komentar-nama { font-size: 11.4px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.komentar-nama em { font-style: normal; font-weight: 500; font-size: 10px; color: var(--muted); margin-left: 5px; }
.komentar-waktu { font-weight: 500; font-size: 9.8px; color: var(--muted); margin-left: 6px; }
.komentar-teks { font-size: 12.4px; line-height: 1.5; color: #3B3760; overflow-wrap: anywhere; }
.komentar-form { display: flex; gap: 8px; align-items: flex-end; }
.komentar-form textarea { flex: 1; min-width: 0; }

@media (max-width: 820px) {
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-side { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .chat-side .card-head, .chat-side-label { display: none; }
  .chat-room { flex: 0 0 auto; max-width: 210px; border: 1px solid rgba(31, 27, 58, .08); background: rgba(255,255,255,.7); }
  .chat-list { max-height: 52vh; }
  .chat-bubble-wrap { max-width: 86%; }
}
@media (max-width: 560px) {
  .chat-form, .komentar-form { flex-direction: column; align-items: stretch; }
  .chat-form .btn, .komentar-form .btn { width: 100%; }
}

/* ============================================================
   Tab halaman gabungan "Chat & Pengumuman" (komunikasi_tabs)
   ============================================================ */
.subtab-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.subtab {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(31, 27, 58, .09);
  min-width: 0;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.subtab:hover { background: rgba(255, 255, 255, .9); border-color: rgba(79, 70, 229, .3); }
.subtab.aktif {
  background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(139, 92, 246, .12));
  border-color: rgba(79, 70, 229, .45);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .18);
}
.subtab-ikon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(31, 27, 58, .08);
}
.subtab.aktif .subtab-ikon {
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  color: #fff; border-color: transparent;
}
.subtab-isi { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.subtab-isi strong { font-size: 12.6px; color: var(--ink); }
.subtab-isi em { font-style: normal; font-size: 10.4px; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .subtab-bar { gap: 8px; }
  .subtab { padding: 9px 10px; gap: 8px; }
  .subtab-isi em { display: none; }
  .subtab-isi strong { font-size: 11.8px; }
}

/* ============================================================
   Pemilih stiker / emoji chat (assets/chat_emoji.js)
   ============================================================ */
.chat-emoji-btn {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(31, 27, 58, .12);
  background: rgba(255, 255, 255, .9);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.chat-emoji-btn:hover { background: #fff; border-color: rgba(79, 70, 229, .4); }
.chat-emoji-btn.aktif {
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
  transform: translateY(-1px);
}

.chat-emoji-panel {
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 10px 30px rgba(31, 27, 58, .13);
  padding: 10px 10px 8px;
  margin-bottom: 8px;
}
.chat-emoji-panel[hidden] { display: none; }

.chat-emoji-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chat-emoji-cats {
  display: flex; gap: 4px; flex: 1; min-width: 0;
  overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin;
}
.chat-emoji-cat {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 17px; line-height: 1;
  cursor: pointer;
  opacity: .62;
  transition: opacity .12s ease, background .12s ease;
}
.chat-emoji-cat:hover { opacity: 1; background: rgba(79, 70, 229, .1); }
.chat-emoji-cat.aktif {
  opacity: 1;
  background: rgba(224, 231, 255, .95);
  border-color: rgba(79, 70, 229, .35);
}
.chat-emoji-tutup {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 8px; border: none; background: transparent;
  color: var(--muted); font-size: 13px; cursor: pointer;
}
.chat-emoji-tutup:hover { background: rgba(31, 27, 58, .07); color: var(--ink); }

.chat-emoji-cari-wrap { margin-bottom: 8px; }
.chat-emoji-cari {
  width: 100%;
  padding: 7px 11px !important;
  font-size: 12.4px !important;
  border-radius: 9px !important;
}

.chat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 2px;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}
.chat-emoji-item {
  border: none; background: transparent;
  font-size: 24px; line-height: 1;
  padding: 5px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background .1s ease, transform .1s ease;
}
.chat-emoji-item:hover { background: rgba(79, 70, 229, .12); transform: scale(1.15); }
.chat-emoji-item:active { transform: scale(.95); }
.chat-emoji-kosong { font-size: 11.6px; color: var(--muted); padding: 14px 4px; text-align: center; }

/* Pesan yang hanya berisi emoji → tampil besar seperti stiker */
.chat-bubble.emoji-only {
  font-size: 38px;
  line-height: 1.15;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 2px;
  color: inherit;
}
.chat-item.saya .chat-bubble.emoji-only { color: inherit; }

@media (max-width: 820px) {
  .chat-emoji-grid { max-height: 178px; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
  .chat-emoji-item { font-size: 26px; }
  .chat-bubble.emoji-only { font-size: 34px; }
}
@media (max-width: 560px) {
  .chat-emoji-btn { width: 100%; height: 38px; order: 3; }
  .chat-emoji-panel { padding: 8px; }
  .chat-emoji-cat { width: 30px; height: 30px; font-size: 16px; }
}

/* ============================================================
   Ceklis massal ACC (.acc-cek) — dipakai Pengambilan, Pengembalian,
   Bon, Kas (kartu acc-item), serta Servis & Jadwal Kerja (kartu servis-card)
   ============================================================ */
/* Teks khusus pembaca layar (visual tersembunyi, tetap diakses) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.acc-cek-label {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  margin-right: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(31, 27, 58, .14);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.acc-cek-label:hover { border-color: rgba(79, 70, 229, .5); background: #fff; }
.acc-cek-label:has(input:checked) {
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .32);
}
.acc-cek-label input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0;
  accent-color: #fff;
  cursor: pointer;
}
.acc-cek-label:has(input:checked) input[type="checkbox"] { accent-color: #4F46E5; }

/* Kartu ACC (acc-item) sudah flex; pastikan centang sejajar di atas */
.acc-item .acc-head { display: flex; align-items: flex-start; gap: 10px; }
.acc-item .acc-head > div { flex: 1; min-width: 0; }

/* Kartu papan servis / jadwal kerja: centang menempel di pojok kiri atas kartu */
.servis-card { position: relative; }
.servis-cek {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  margin: 0;
  box-shadow: 0 2px 8px rgba(31, 27, 58, .12);
}
.servis-card:has(.servis-cek) .servis-card-top { padding-left: 32px; }

@media (max-width: 560px) {
  .acc-cek-label { width: 24px; height: 24px; }
  .bulk-bar { gap: 8px; }
  .bulk-bar .btn { flex: 1 1 auto; }
}

/* ============================================================
   Chat cepat dari daftar menunggu ACC (assets/quickchat.js)
   ============================================================ */
.chat-quick { white-space: nowrap; }
.chat-quick-ikon { font-size: 13px; }

.qc-back {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  background: rgba(31, 27, 58, .5);
  padding: 16px;
}
.qc-back[hidden] { display: none; }

.qc-box {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(31, 27, 58, .34);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.qc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.qc-head strong { display: block; font-size: 14.5px; color: var(--ink); }
.qc-head em { display: block; font-style: normal; font-size: 11.4px; color: var(--muted); margin-top: 2px; }
.qc-tutup {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px;
  border: none; background: rgba(31, 27, 58, .06); color: var(--muted);
  font-size: 13px; cursor: pointer;
}
.qc-tutup:hover { background: rgba(31, 27, 58, .12); color: var(--ink); }

.qc-isi textarea { width: 100%; min-height: 84px; resize: vertical; }

.qc-cepat { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qc-chip {
  font-size: 11px; font-weight: 600; color: #3730A3;
  background: rgba(224, 231, 255, .85);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.qc-chip:hover { background: rgba(199, 210, 254, .95); }

.qc-hasil {
  margin-top: 10px; font-size: 12px; line-height: 1.5;
  border-radius: 9px; padding: 8px 11px;
}
.qc-hasil.ok { background: #DCFCE7; color: #15803D; }
.qc-hasil.salah { background: #FEE2E2; color: #B91C1C; }

.qc-aksi { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .qc-back { padding: 0; place-items: end center; }
  .qc-box { border-radius: 16px 16px 0 0; width: 100%; max-height: 88vh; }
  .qc-aksi { flex-direction: column-reverse; }
  .qc-aksi .btn { width: 100%; text-align: center; }
}

/* ============================================================
   Splitter multi per titik (topologi.php) — 2–4 splitter per ODP/ODC
   ============================================================ */
.splitter-row {
  display: grid;
  grid-template-columns: 34px minmax(96px, .8fr) minmax(96px, .8fr) minmax(0, 1.3fr) minmax(0, 1.3fr) 34px;
  gap: 8px; align-items: end;
  padding: 9px 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(31, 27, 58, .09);
  border-radius: 10px;
}
.splitter-row .field label { font-size: 10.4px; margin-bottom: 3px; }
.splitter-row input, .splitter-row select { min-width: 0; width: 100%; }
.splitter-no {
  font-size: 10.6px; font-weight: 800; color: #4338CA;
  background: rgba(224, 231, 255, .9);
  border-radius: 7px; padding: 4px 0; text-align: center;
  align-self: center;
}
.splitter-hapus { padding: 6px 8px; line-height: 1; }

.splitter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.6px; font-weight: 800; color: #3730A3;
  background: rgba(224, 231, 255, .92);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 999px; padding: 2px 8px;
  white-space: nowrap;
}
.splitter-chip em { font-style: normal; font-size: 9.6px; }
.splitter-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }

@media (max-width: 900px) {
  .splitter-row {
    grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 34px;
  }
  .splitter-row .field:nth-of-type(3),
  .splitter-row .field:nth-of-type(4) { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .splitter-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 30px; gap: 6px; padding: 8px; }
}

/* ============================================================
   Data Titik Jaringan — dikelompokkan per induk (ODC/OLT)
   ============================================================ */
.topo-grup-list { display: flex; flex-direction: column; gap: 12px; }

.topo-grup {
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .62);
  overflow: hidden;
}
.topo-grup[open] { background: rgba(255, 255, 255, .78); }

.topo-grup-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  border-left: 4px solid var(--c, #4F46E5);
  background: rgba(238, 242, 255, .55);
  min-width: 0;
}
.topo-grup-head::-webkit-details-marker { display: none; }
.topo-grup-head::before {
  content: '▸';
  flex: 0 0 auto;
  font-size: 11px; color: var(--muted);
  transition: transform .15s ease;
}
.topo-grup[open] > .topo-grup-head::before { transform: rotate(90deg); }

.topo-grup-ikon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  font-size: 11px;
  border: 2px solid #fff;
  box-sizing: content-box;
}
.topo-grup-teks { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.topo-grup-teks strong { font-size: 12.8px; color: var(--ink); overflow-wrap: anywhere; }
.topo-grup-teks em {
  font-style: normal; font-size: 10.6px; color: var(--muted);
  overflow-wrap: anywhere;
}
.topo-grup-aksi { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.topo-grup-jml {
  min-width: 24px; height: 22px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(79, 70, 229, .12); color: #4338CA;
  font-size: 11px; font-weight: 800;
}
.topo-grup > .table-wrap { border-radius: 0; }

@media (max-width: 720px) {
  .topo-grup-head { flex-wrap: wrap; gap: 8px; }
  .topo-grup-teks { flex-basis: calc(100% - 70px); }
  .topo-grup-aksi { width: 100%; justify-content: flex-start; }
  .topo-grup-aksi .btn { font-size: 11px; padding: 4px 8px; }
}

/* ============================================================
   Box ODP (Besar 4 PLC / Sedang 2 PLC / Kecil 1 PLC) + tiang inchi
   ============================================================ */
.box-odp-chip {
  display: inline-block; font-size: 10.4px; font-weight: 800;
  color: #fff; background: #64748B;
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap; letter-spacing: .01em;
}
.box-odp-chip.ukuran-besar { background: linear-gradient(135deg, #4338CA, #6366F1); }
.box-odp-chip.ukuran-sedang { background: linear-gradient(135deg, #0E7490, #0891B2); }
.box-odp-chip.ukuran-kecil { background: linear-gradient(135deg, #B45309, #D97706); }
.box-odp-chip.ukuran-kustom { background: #64748B; }

.box-odp-baris { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }

.tiang-chip-label {
  display: inline-block; font-size: 10.2px; font-weight: 700;
  color: #3730A3; background: rgba(224, 231, 255, .92);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 999px; padding: 1px 8px;
  white-space: nowrap;
}

/* Pilihan cepat tinggi tiang di form */
.tiang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tiang-chip {
  font-size: 11.4px; font-weight: 700; color: #3730A3;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(99, 102, 241, .28);
  border-radius: 999px; padding: 4px 11px; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.tiang-chip:hover { background: #fff; border-color: rgba(79, 70, 229, .55); }
.tiang-chip.aktif {
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .3);
}

/* Ringkasan box + tiang di form */
.box-odp-ringkas {
  font-size: 12.2px; font-weight: 700; color: var(--ink);
  background: rgba(224, 231, 255, .6);
  border: 1px dashed rgba(79, 70, 229, .35);
  border-radius: 9px; padding: 8px 11px;
}
.box-odp-ringkas.kosong { color: var(--muted); font-weight: 500; border-style: solid; border-color: rgba(31, 27, 58, .1); background: rgba(255, 255, 255, .6); }

/* Di popup peta, chip jangan terlalu lebar */
.topo-pop .box-odp-chip { font-size: 10px; padding: 1px 7px; }

/* ============================================================
   Gerbang WAJIB lokasi (geo_gate.js) — NOC & teknisi
   ============================================================ */
.geo-gate {
  position: fixed; inset: 0; z-index: 10001;
  display: grid; place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 15%, rgba(139, 92, 246, .35), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(56, 189, 248, .3), transparent 55%),
    rgba(31, 27, 58, .78);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  overflow: auto;
}
.geo-gate[hidden] { display: none; }
body.geo-gate-terbuka { overflow: hidden; }

.geo-gate-box {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 10, 45, .5);
  padding: 22px 20px 16px;
  text-align: center;
}
.geo-gate-ikon {
  font-size: 40px; line-height: 1;
  margin-bottom: 6px;
  animation: geo-denyut 1.9s ease-in-out infinite;
}
@keyframes geo-denyut {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.06); }
}
.geo-gate-box h2 {
  font-size: 17px; color: var(--ink); margin: 0 0 8px;
  line-height: 1.3;
}
.geo-gate-teks {
  font-size: 12.6px; line-height: 1.6; color: #4B4670;
  margin: 0 0 14px; text-align: left;
}
.geo-gate-status {
  font-size: 12.2px; line-height: 1.5;
  border-radius: 10px; padding: 9px 12px;
  background: rgba(238, 242, 255, .9);
  border: 1px solid rgba(79, 70, 229, .22);
  color: #3730A3;
  margin-bottom: 12px;
  text-align: left;
  overflow-wrap: anywhere;
}
.geo-gate-status.ok { background: #DCFCE7; border-color: #86EFAC; color: #15803D; }
.geo-gate-status.salah { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }
.geo-gate-status.tunggu { background: #FEF3C7; border-color: #FCD34D; color: #B45309; }

.geo-gate-btn {
  width: 100%;
  font-size: 14px; font-weight: 700;
  padding: 13px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .32);
}
.geo-gate-panduan-tombol {
  margin-top: 10px;
  border: none; background: none; cursor: pointer;
  font-size: 11.4px; font-weight: 600; color: var(--indigo);
  text-decoration: underline; padding: 4px;
}
.geo-gate-panduan {
  margin-top: 10px;
  text-align: left;
  font-size: 11.8px; line-height: 1.6; color: #3B3760;
  background: rgba(255, 251, 235, .95);
  border: 1px solid #FDE68A;
  border-radius: 11px;
  padding: 11px 13px;
}
.geo-gate-panduan[hidden] { display: none; }
.geo-gate-panduan ul { margin: 7px 0 8px; padding-left: 18px; }
.geo-gate-panduan li { margin-bottom: 5px; }
.geo-gate-panduan em { font-style: normal; font-weight: 700; color: #92400E; }

.geo-gate-darurat {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(31, 27, 58, .16);
  text-align: left;
}
.geo-gate-darurat[hidden] { display: none; }
.geo-gate-darurat .hint { margin-bottom: 8px; display: block; }
.geo-gate-darurat .btn { color: #B91C1C; border-color: rgba(185, 28, 28, .35); }

.geo-gate-kaki {
  margin-top: 12px;
  font-size: 10.4px; color: var(--muted);
}

@media (max-width: 480px) {
  .geo-gate { padding: 10px; place-items: start center; }
  .geo-gate-box { padding: 18px 15px 14px; border-radius: 15px; }
  .geo-gate-ikon { font-size: 34px; }
  .geo-gate-box h2 { font-size: 15.5px; }
}

/* Mode darurat lokasi (Lacak Teknisi) */
.meta-darurat { color: #B91C1C; font-weight: 600; }

/* Tab 3 kolom (modul Pekerjaan & Poin) */
.subtab-bar.subtab-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .subtab-bar.subtab-3 { grid-template-columns: 1fr; gap: 8px; }
  .subtab-bar.subtab-3 .subtab-isi em { display: none; }
}

/* ============================================================
   Papan Poin Teknisi & NOC (pekerjaan.php)
   ============================================================ */
.papan-poin { display: flex; flex-direction: column; gap: 8px; }
.papan-poin-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 11px;
  min-width: 0;
}
.papan-poin-item.saya {
  background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(139, 92, 246, .1));
  border-color: rgba(79, 70, 229, .4);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .12);
}
.papan-poin-rank {
  flex: 0 0 30px; text-align: center;
  font-size: 13px; font-weight: 800; color: var(--muted);
}
.papan-poin-item:nth-child(1) .papan-poin-rank { font-size: 18px; }
.papan-poin-item:nth-child(2) .papan-poin-rank,
.papan-poin-item:nth-child(3) .papan-poin-rank { font-size: 16px; }
.papan-poin-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  object-fit: cover; overflow: hidden;
}
.papan-poin-isi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.papan-poin-nama {
  font-size: 12.6px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.papan-poin-nama .sub { font-weight: 500; font-size: 10.2px; color: var(--muted); }
.papan-poin-meta { font-size: 10.8px; color: var(--muted); }
.papan-poin-angka { font-weight: 800; color: #4338CA; font-size: 11.6px; }
.papan-poin-bulan { font-weight: 700; color: var(--ink); }
.papan-poin-pending { color: #B45309; font-weight: 600; }
.papan-poin-uang {
  flex: 0 0 auto; text-align: right;
  font-size: 12px; font-weight: 800; color: #15803D;
  font-variant-numeric: tabular-nums;
}
.papan-poin-uang em { display: block; font-style: normal; font-size: 9.4px; color: var(--muted); font-weight: 500; }

@media (max-width: 560px) {
  .papan-poin-item { flex-wrap: wrap; }
  .papan-poin-isi { flex-basis: calc(100% - 100px); }
  .papan-poin-uang { flex-basis: 100%; text-align: left; padding-left: 40px; }
  .papan-poin-uang em { display: inline; margin-left: 4px; }
}

/* Panel "Pantau semua chat" (admin) di sidebar chat */
.chat-pantau-label {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(31, 27, 58, .16);
  color: #B45309 !important;
}
.chat-room-pantau { border-left: 3px solid rgba(180, 83, 9, .45); }
.chat-room-pantau.aktif {
  background: rgba(254, 243, 199, .8);
  border-color: rgba(180, 83, 9, .5);
}
.chat-room-pantau .chat-room-avatar {
  background: linear-gradient(135deg, #B45309, #F59E0B);
  font-size: 10.5px; letter-spacing: -.02em;
}

/* ============================================================
   Penilaian Kinerja (penilaian.php) — rating & saran naik gaji
   ============================================================ */
.kinerja-list { display: flex; flex-direction: column; gap: 10px; }
.kinerja-item {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 27, 58, .08);
  border-left: 4px solid #94A3B8;
  border-radius: 12px;
  padding: 11px 13px;
  display: flex; flex-direction: column; gap: 7px;
  min-width: 0;
}
.kinerja-item.kelas-baik { border-left-color: #16A34A; background: rgba(240, 253, 244, .62); }
.kinerja-item.kelas-cukup { border-left-color: #D97706; background: rgba(255, 251, 235, .62); }
.kinerja-item.kelas-buruk { border-left-color: #DC2626; background: rgba(254, 242, 242, .62); }
.kinerja-item.saya { box-shadow: inset 0 0 0 1.5px rgba(79, 70, 229, .45); }

.kinerja-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kinerja-rank { flex: 0 0 26px; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.kinerja-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  object-fit: cover; overflow: hidden;
}
.kinerja-nama { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.kinerja-nama strong { font-size: 12.8px; color: var(--ink); overflow-wrap: anywhere; }
.kinerja-nama em { font-style: normal; font-size: 10.6px; color: var(--muted); }

.kinerja-skor-wrap { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.kinerja-skor {
  min-width: 46px; height: 32px; padding: 0 10px;
  display: grid; place-items: center;
  border-radius: 9px; font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: #fff; background: #64748B;
}
.kinerja-skor.baik { background: linear-gradient(135deg, #15803D, #22C55E); }
.kinerja-skor.cukup { background: linear-gradient(135deg, #B45309, #F59E0B); }
.kinerja-skor.buruk { background: linear-gradient(135deg, #B91C1C, #EF4444); }
.kinerja-predikat {
  font-size: 10.2px; font-weight: 800; border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.kinerja-predikat.baik { background: #DCFCE7; color: #15803D; }
.kinerja-predikat.cukup { background: #FEF3C7; color: #B45309; }
.kinerja-predikat.buruk { background: #FEE2E2; color: #B91C1C; }

.kinerja-bar {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(31, 27, 58, .09);
}
.kinerja-bar > i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.kinerja-bar > i.baik { background: linear-gradient(90deg, #15803D, #4ADE80); }
.kinerja-bar > i.cukup { background: linear-gradient(90deg, #B45309, #FBBF24); }
.kinerja-bar > i.buruk { background: linear-gradient(90deg, #B91C1C, #F87171); }

.kinerja-rincian { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.kinerja-chip {
  font-size: 10.2px; font-weight: 600; color: #7F1D1D;
  background: rgba(254, 226, 226, .9);
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 999px; padding: 2px 9px;
}
.kinerja-chip strong { font-weight: 800; }
.kinerja-chip em { font-style: normal; opacity: .8; }
.kinerja-chip.bersih {
  color: #15803D; background: #DCFCE7; border-color: rgba(22, 163, 74, .3);
}
.kinerja-saran {
  font-size: 10.6px; color: #3730A3;
  background: rgba(224, 231, 255, .85);
  border: 1px dashed rgba(99, 102, 241, .35);
  border-radius: 999px; padding: 2px 10px;
}

/* Tab 4 kolom (Pekerjaan/Poin/Potongan/Penilaian) */
.subtab-bar.subtab-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .subtab-bar.subtab-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .subtab-bar.subtab-3 { grid-template-columns: 1fr; }
  .kinerja-head { gap: 8px; }
  .kinerja-skor { min-width: 42px; height: 28px; font-size: 14px; }
  .kinerja-skor-wrap { width: 100%; justify-content: flex-start; padding-left: 36px; }
}

/* ============================================================
   Kabel fiber: jumlah core + warna core (topologi.php)
   ============================================================ */
.kabel-warna-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 6px;
}
.kabel-warna-item {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(31, 27, 58, .1);
  border-radius: 9px; padding: 6px 9px;
  font-size: 11.6px; cursor: pointer; min-width: 0;
  transition: border-color .12s ease, background .12s ease;
}
.kabel-warna-item:has(input:checked) {
  border-color: rgba(79, 70, 229, .5);
  background: rgba(224, 231, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .18);
}
.kabel-warna-item input { flex: 0 0 auto; margin: 0; }
.kabel-warna-dot {
  flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(31, 27, 58, .22);
}
.kabel-ringkas {
  font-size: 12.2px; font-weight: 700; color: var(--ink);
  background: rgba(224, 231, 255, .6);
  border: 1px dashed rgba(79, 70, 229, .35);
  border-radius: 9px; padding: 8px 11px;
}
.kabel-ringkas.kosong {
  color: var(--muted); font-weight: 500;
  border-style: solid; border-color: rgba(31, 27, 58, .1);
  background: rgba(255, 255, 255, .6);
}

/* Chip & titik warna di tabel / detail */
.kabel-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.4px; font-weight: 800; color: #3730A3;
  background: rgba(224, 231, 255, .92);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 999px; padding: 2px 8px;
  white-space: nowrap;
}
.kabel-core-chip {
  display: inline-block; font-size: 10.4px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  border-radius: 999px; padding: 2px 9px;
  margin-right: 6px;
}
.kabel-dots { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; vertical-align: middle; }
.kabel-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--c, #94A3B8);
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(31, 27, 58, .2);
  display: inline-block;
}
.kabel-warna-teks { font-style: normal; font-size: 10.8px; color: var(--muted); }

@media (max-width: 560px) {
  .kabel-warna-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; }
  .kabel-warna-item { font-size: 11px; padding: 5px 7px; }
}

/* ============================================================
   Spesifikasi titik BERNOMOR (detail & popup peta topologi)
   1) kabel core  2) warna core  3) splitter  4) redaman  5) box/PLC
   6) diameter tiang  7) port  8) dikerjakan  9) status
   ============================================================ */
.topo-spek {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  counter-reset: spek;
}
.topo-spek-item {
  display: flex; align-items: baseline; gap: 9px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 27, 58, .08);
  border-radius: 9px;
  padding: 6px 10px;
  min-width: 0;
}
.topo-spek-no {
  flex: 0 0 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 10.4px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
}
.topo-spek-label {
  flex: 0 0 auto; min-width: 96px;
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.topo-spek-nilai {
  flex: 1; min-width: 0;
  font-size: 12.2px; font-weight: 700; color: var(--ink);
  overflow-wrap: anywhere;
}
.topo-spek-nilai.kosong { color: var(--muted); font-weight: 500; font-style: italic; }
.topo-spek-nilai.baik { color: #15803D; }
.topo-spek-nilai.cukup { color: #B45309; }
.topo-spek-nilai.buruk { color: #B91C1C; }

/* Versi ringkas di popup peta */
.topo-spek-pop { margin: 6px 0 2px; gap: 4px; }
.topo-spek-pop .topo-spek-item {
  padding: 3px 7px; gap: 6px;
  background: rgba(248, 250, 252, .9);
  border-radius: 7px;
}
.topo-spek-pop .topo-spek-no { flex: 0 0 16px; height: 16px; font-size: 9px; }
.topo-spek-pop .topo-spek-label { min-width: 72px; font-size: 10px; }
.topo-spek-pop .topo-spek-nilai { font-size: 10.8px; }

@media (max-width: 560px) {
  .topo-spek-item { flex-wrap: wrap; gap: 4px 8px; }
  .topo-spek-label { min-width: 0; flex: 1 1 auto; }
  .topo-spek-nilai { flex-basis: 100%; padding-left: 29px; }
  .topo-spek-pop .topo-spek-nilai { padding-left: 22px; }
}

/* ============================================================
   Tabel Rute per Core (01, 02, 03, 04 …) — topologi.php
   ============================================================ */
.core-table { min-width: 520px; }
.core-table th { font-size: 10.6px; }
.core-table td { vertical-align: middle; padding: 6px 8px; }
.core-table input[type="text"], .core-table select { font-size: 12px; padding: 6px 9px; }
.core-nomor {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 24px; padding: 0 7px;
  border-radius: 8px;
  font-size: 11.4px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  font-variant-numeric: tabular-nums;
}
.core-row .core-rute { min-width: 180px; }
@media (max-width: 720px) {
  .core-table { min-width: 0; }
  .core-table th:nth-child(4), .core-table td:nth-child(4) { display: none; }
}

/* Kolom "Belum disambung" pada tabel rute core */
.core-belum-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: #7F1D1D; font-weight: 600;
  background: rgba(254, 226, 226, .85);
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 8px; padding: 4px 8px;
  cursor: pointer; margin-bottom: 5px;
}
.core-belum-label input { margin: 0; }
.core-table .core-tempat {
  font-size: 11.4px; padding: 5px 8px;
  border-color: rgba(220, 38, 38, .35);
  background: rgba(254, 242, 242, .6);
}
.core-table .core-tempat[hidden] { display: none; }
.core-belum-badge {
  display: inline-block; font-size: 10.2px; font-weight: 800;
  color: #B91C1C; background: #FEE2E2;
  border: 1px solid rgba(185, 28, 28, .28);
  border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}

/* Nomor core manual (input teks) di tabel rute core */
.core-nomor-input {
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  padding: 5px 4px;
  border-radius: 8px;
  border: 1px solid rgba(79, 70, 229, .35);
  background: rgba(224, 231, 255, .55);
  color: #3730A3;
  font-variant-numeric: tabular-nums;
}
.core-nomor-input::placeholder { color: rgba(55, 48, 163, .45); font-weight: 700; }
.core-nomor-input:focus { background: #fff; border-color: rgba(79, 70, 229, .7); }
.th-mini { font-weight: 500; font-size: 9.6px; color: var(--muted); text-transform: none; }

/* Kolom pilihan status sambungan per core */
.core-table .core-status {
  font-size: 11.4px; font-weight: 700; padding: 5px 8px;
  border-radius: 8px; margin-bottom: 5px;
  border: 1px solid rgba(31, 27, 58, .14);
  background: #fff;
}
.core-sambung-badge {
  display: inline-block; font-size: 10.2px; font-weight: 800;
  border-radius: 999px; padding: 1px 9px; white-space: nowrap;
}
.core-sambung-badge.ok { color: #15803D; background: #DCFCE7; border: 1px solid rgba(22, 163, 74, .3); }
.core-sambung-badge.pc { color: #B45309; background: #FEF3C7; border: 1px solid rgba(217, 119, 6, .3); }
.core-sambung-badge.no { color: #B91C1C; background: #FEE2E2; border: 1px solid rgba(185, 28, 28, .28); }
/* warna select sesuai status terpilih */
.core-status:has(option[value="patchcore"]:checked) { border-color: rgba(217, 119, 6, .55); background: #FFFBEB; color: #92400E; }
.core-status:has(option[value="belum"]:checked) { border-color: rgba(185, 28, 28, .5); background: #FEF2F2; color: #B91C1C; }
.core-status:has(option[value="sambung"]:checked) { border-color: rgba(22, 163, 74, .45); background: #F0FDF4; color: #15803D; }

/* ============================================================
   Modul PKL / anak magang (pkl.php, pkl_izin.php, pkl_nilai.php)
   ============================================================ */
.badge-peran-pkl { background: #E0F2FE; color: #0369A1; border: 1px solid #BAE6FD; }

/* Tab modul PKL: 3 bagian */
.subtab-bar.subtab-pkl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .subtab-bar.subtab-pkl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .subtab-bar.subtab-pkl { grid-template-columns: 1fr; }
}

/* Jam kerja PKL di halaman absensi */
.pkl-jam-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(238, 242, 255, .72);
  border: 1px solid rgba(79, 70, 229, .18);
}
.pkl-jam-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pkl-jam-item em { font-style: normal; font-size: 10.8px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pkl-jam-item strong { font-size: 14px; color: var(--ink); }
.absen-tanda { margin-top: 4px; }
.absen-tanda .badge { font-size: 10px; padding: 2px 6px; }

/* Pilih anak PKL (admin) */
.pkl-akun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.pkl-akun-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--line);
  color: inherit;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  min-width: 0;
}
.pkl-akun-card:hover {
  border-color: rgba(79, 70, 229, .35);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -20px rgba(41, 27, 96, .55);
}
.pkl-akun-nama { font-weight: 700; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.pkl-akun-meta { font-size: 11px; color: var(--muted); }
.pkl-akun-baris { display: flex; justify-content: space-between; gap: 8px; font-size: 11.6px; color: var(--muted); }
.pkl-akun-baris strong { color: var(--ink); font-weight: 600; }
.pkl-akun-tanda {
  margin-top: 2px; font-size: 10.6px; font-weight: 600;
  color: #B45309; background: rgba(254, 243, 199, .85);
  border-radius: 8px; padding: 3px 8px; align-self: flex-start;
}
.pkl-akun-buka { margin-top: 4px; font-size: 11.4px; font-weight: 600; color: var(--indigo); }

/* Kartu per minggu */
.pkl-week {
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-left: 4px solid rgba(79, 70, 229, .35);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  min-width: 0;
}
.pkl-week.sekarang { border-left-color: #4F46E5; background: rgba(255, 255, 255, .82); }
.pkl-week-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.pkl-week-judul { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.pkl-week-judul strong { font-size: 14.4px; }
.pkl-week-chip {
  font-size: 10.4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
}
.pkl-week-meta { font-size: 11.6px; color: var(--muted); margin-top: 3px; }
.pkl-skor {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 84px; padding: 8px 12px; border-radius: 13px;
  border: 1px solid rgba(31, 27, 58, .1); background: rgba(255, 255, 255, .9);
}
.pkl-skor strong { font-size: 20px; line-height: 1.1; }
.pkl-skor span { font-size: 10.4px; color: var(--muted); text-align: center; }
.pkl-skor.baik { border-color: #BBF7D0; background: rgba(220, 252, 231, .8); }
.pkl-skor.baik strong { color: #15803D; }
.pkl-skor.cukup { border-color: #FDE68A; background: rgba(254, 243, 199, .8); }
.pkl-skor.cukup strong { color: #B45309; }
.pkl-skor.buruk { border-color: #FECACA; background: rgba(254, 226, 226, .8); }
.pkl-skor.buruk strong { color: #B91C1C; }
.pkl-skor.kosong { opacity: .8; }

.pkl-tabel { font-size: 12.4px; }
.pkl-tabel th { font-size: 10.8px; }
.pkl-blok { margin-top: 16px; }
.pkl-blok h3 {
  font-size: 12.4px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px;
}

.pkl-kegiatan-list { display: flex; flex-direction: column; gap: 10px; }
.pkl-kegiatan {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  min-width: 0;
}
.pkl-kegiatan-isi { flex: 1; min-width: 0; }
.pkl-kegiatan-judul { font-weight: 600; font-size: 13.2px; color: var(--ink); overflow-wrap: anywhere; }
.pkl-kegiatan-meta { font-size: 10.8px; color: var(--muted); }
.pkl-kegiatan-uraian { margin: 6px 0 0; font-size: 12.4px; color: #3F3B5C; overflow-wrap: anywhere; }
.pkl-kegiatan-foto { display: inline-block; margin-top: 8px; }
.pkl-kegiatan-foto img {
  max-width: 190px; max-height: 130px; border-radius: 10px;
  border: 1px solid var(--line); object-fit: contain; background: #fff;
}

.pkl-nilai-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}
.pkl-nilai-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 11px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
}
.pkl-nilai-item span { font-size: 10.6px; color: var(--muted); }
.pkl-nilai-item strong { font-size: 14.4px; color: var(--ink); }
.pkl-nilai-item.total { background: rgba(238, 242, 255, .85); border-color: rgba(79, 70, 229, .25); }
.pkl-nilai-item.total strong { color: var(--indigo); }

/* Form PKL */
.pkl-form { display: flex; flex-direction: column; gap: 14px; }
.pkl-form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pkl-form-row > .field { min-width: 150px; }

.pkl-nilai-info {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.pkl-nilai-info-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 11px;
  background: rgba(238, 242, 255, .7);
  border: 1px solid rgba(79, 70, 229, .16);
}
.pkl-nilai-info-item em { font-style: normal; font-size: 10.6px; color: var(--muted); }
.pkl-nilai-info-item strong { font-size: 13px; color: var(--ink); }

.pkl-aspek-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.pkl-skor-preview {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(238, 242, 255, .8);
  border: 1px solid rgba(79, 70, 229, .2);
}
.pkl-skor-preview span { font-size: 11.6px; color: var(--muted); }
.pkl-skor-preview strong { font-size: 22px; color: var(--indigo); }
.pkl-skor-preview em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink); }

.pkl-skor-chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pkl-skor-chip.baik { background: #DCFCE7; color: #15803D; }
.pkl-skor-chip.cukup { background: #FEF3C7; color: #B45309; }
.pkl-skor-chip.buruk { background: #FEE2E2; color: #B91C1C; }

@media (max-width: 560px) {
  .pkl-week { padding: 14px; }
  .pkl-skor { min-width: 100%; flex-direction: row; gap: 8px; }
  .pkl-form-row { flex-direction: column; }
  .pkl-form-row > .field { min-width: 0; }
}

/* ============================================================
   Sinkron PSB ↔ ODP (psb_form.php, psb_detail.php, psb.php)
   ============================================================ */
.odp-sinkron-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.odp-info {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(238, 242, 255, .72);
  border: 1px solid rgba(79, 70, 229, .2);
  min-width: 0;
}
.odp-info[hidden] { display: none; }
.odp-info-penuh { background: rgba(254, 226, 226, .6); border-color: #FECACA; }
.odp-info-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.odp-kode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 2px 8px;
}
.odp-nama { font-size: 12.4px; color: var(--ink); font-weight: 600; }
.odp-peta { font-size: 11.4px; font-weight: 600; }
.odp-ket { font-size: 11.2px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }

.odp-meter { margin: 8px 0 10px; }
.odp-meter-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(31, 27, 58, .1);
}
.odp-meter-bar > span {
  display: block; height: 100%;
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  border-radius: 999px;
}
.odp-meter.aman .odp-meter-bar > span { background: linear-gradient(135deg, #16A34A, #4ADE80); }
.odp-meter.mepet .odp-meter-bar > span { background: linear-gradient(135deg, #D97706, #FBBF24); }
.odp-meter.penuh .odp-meter-bar > span { background: linear-gradient(135deg, #DC2626, #F87171); }
.odp-meter-teks { display: block; font-size: 11.6px; color: var(--muted); margin-top: 5px; }
.odp-meter-teks strong { color: var(--ink); }

.odp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.odp-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 11px; border-radius: 10px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  min-width: 0;
}
.odp-chip em { font-style: normal; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.odp-chip strong { font-size: 12.4px; color: var(--ink); overflow-wrap: anywhere; }
.odp-chip strong.baik { color: #15803D; }
.odp-chip strong.cukup { color: #B45309; }
.odp-chip strong.buruk { color: #B91C1C; }

.odp-peringatan {
  margin-top: 10px; padding: 9px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.45;
  background: rgba(254, 226, 226, .9);
  border: 1px solid #FCA5A5;
  color: #991B1B;
}
.odp-hint-bahaya { color: #B91C1C; font-weight: 600; }

.odp-jenis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.odp-jenis-item {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 11px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  font-size: 12.4px; color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.odp-jenis-item:hover { border-color: rgba(79, 70, 229, .35); }
.odp-jenis-item.aktif,
.odp-jenis-item:has(input:checked) {
  background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(139, 92, 246, .12));
  border-color: rgba(79, 70, 229, .45);
  font-weight: 600;
}
.odp-jenis-item input { margin: 0; accent-color: var(--indigo); }

/* Chip ringkas di daftar PSB */
.psb-sub-sinkron { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.psb-odp-chip {
  font-size: 10.6px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(238, 242, 255, .95);
  border: 1px solid rgba(79, 70, 229, .22);
  color: #3730A3;
  white-space: nowrap;
}
.psb-odp-chip.kosong {
  background: rgba(255, 255, 255, .8);
  border-color: var(--line);
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 560px) {
  .odp-sinkron-grid { grid-template-columns: 1fr; gap: 12px; }
  .odp-info { padding: 12px; }
  .odp-chips { gap: 6px; }
  .odp-chip { flex: 1 1 45%; }
  .odp-jenis-item { flex: 1 1 100%; }
}
