/* ============ Tokens ============ */
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f0f1f8;
  --text: #171a2c;
  --muted: #6b7088;
  --border: #e4e6f0;
  --primary: #5b5bd6;
  --primary-2: #7c5cf0;
  --primary-soft: #ececfd;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc3a4f;
  --sidebar-bg: #14152b;
  --sidebar-text: #b9bbd6;
  --sidebar-active: #ffffff;
  --bubble-user: linear-gradient(135deg, #5b5bd6, #7c5cf0);
  --bubble-ai: #f0f1f8;
  --shadow-sm: 0 1px 2px rgba(20, 20, 50, 0.06);
  --shadow: 0 1px 2px rgba(20, 20, 50, 0.05), 0 8px 24px rgba(20, 20, 50, 0.06);
  --radius: 14px;
  --sidebar-w: 248px;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1020;
    --surface: #181a2e;
    --surface-2: #20223a;
    --text: #e8e9f5;
    --muted: #9497b3;
    --border: #2a2d48;
    --primary-soft: #26264d;
    --sidebar-bg: #0b0c18;
    --bubble-ai: #22243d;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1020;
  --surface: #181a2e;
  --surface-2: #20223a;
  --text: #e8e9f5;
  --muted: #9497b3;
  --border: #2a2d48;
  --primary-soft: #26264d;
  --sidebar-bg: #0b0c18;
  --bubble-ai: #22243d;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font: inherit; }
.hidden { display: none !important; }

/* ============ Layout ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: #fff; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, var(--primary), #c04ff0);
}
.brand img.logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #171624; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.brand b { display: block; font-size: 16px; }
.brand small { color: var(--sidebar-text); font-size: 12px; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav .section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 16px 12px 6px; opacity: .6; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--sidebar-text);
  font-weight: 500; transition: background .15s, color .15s;
}
.nav a .ico { width: 22px; text-align: center; font-size: 17px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(124, 92, 240, .22); color: var(--sidebar-active); box-shadow: inset 3px 0 0 #9d86ff; }
.nav a .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 99px; }
/* grup menu (master) yang bisa dilipat */
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 4px;
  border-radius: 10px; color: var(--sidebar-text); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .ico { width: 22px; text-align: center; font-size: 15px; }
.nav-group > summary::after { content: '▸'; margin-left: auto; transition: transform .15s; opacity: .7; }
.nav-group[open] > summary::after { transform: rotate(90deg); }
.nav-group > summary:hover { background: rgba(255,255,255,.06); color: #fff; opacity: 1; }
.nav-group > summary .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 99px; text-transform: none; letter-spacing: 0; }
.nav-group > summary .count:empty { display: none; }
.nav-group[open] > summary .count { display: none; }
.nav-group > a { padding-left: 22px; }
.nav-group.has-active > summary { color: #fff; opacity: 1; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.status-row { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.bad { background: #ef4444; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer; font-size: 18px; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.menu-btn { display: none; }
.pill { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }

.profile { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.profile-btn .avatar-mini {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #c04ff0);
}
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.15); padding: 8px; opacity: 0; transform: translateY(-6px);
  pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50;
}
.profile:hover .profile-menu, .profile.open .profile-menu { opacity: 1; transform: none; pointer-events: auto; }
.profile-menu .head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.profile-menu .head b { display: block; }
.profile-menu .head small { color: var(--muted); }
.profile-menu a, .profile-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface-2); }
.profile-menu .danger { color: var(--danger); }

.content { padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-intro { color: var(--muted); margin: 0 0 20px; }
.backdrop { position: fixed; inset: 0; background: rgba(10,10,25,.45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.show { opacity: 1; pointer-events: auto; }

/* ============ Components ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid > .card + .card { margin-top: 0; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border: 1px solid transparent;
  border-radius: 10px; padding: 10px 16px; background: var(--primary); color: #fff; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: var(--danger); }
.btn.ghost.danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

input, textarea, select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.video { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
.badge.api { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge.sub { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge.warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
:root[data-theme='dark'] .badge.warn { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .badge.warn { background: rgba(245,158,11,.15); color: #fbbf24; border-color: rgba(245,158,11,.35); } }
:root[data-theme='dark'] .badge.video, :root[data-theme='dark'] .badge.api, :root[data-theme='dark'] .badge.sub { background: var(--surface-2); border-color: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .badge.video, :root:not([data-theme='light']) .badge.api, :root:not([data-theme='light']) .badge.sub { background: var(--surface-2); border-color: var(--border); } }

.avatar {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; margin: 0 auto;
  overflow: hidden; color: #fff; font-weight: 700; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 38px; height: 38px; font-size: 19px; margin: 0; box-shadow: none; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
/* Toast: kartu kecil berikon (hijau = berhasil, merah = gagal, kuning = perhatian, ungu = info) */
.toast {
  --tc: var(--primary);
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px) scale(.96); z-index: 120;
  display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: min(460px, calc(100vw - 32px));
  padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--tc);
  box-shadow: 0 18px 50px rgba(15, 16, 40, .22), 0 2px 6px rgba(15, 16, 40, .08);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .28s cubic-bezier(.2, .9, .3, 1.25); font-weight: 500; line-height: 1.4;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.toast[data-type='success'] { --tc: var(--success); }
.toast[data-type='error'] { --tc: var(--danger); }
.toast[data-type='warning'] { --tc: var(--warning); }
.toast-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #fff; font-weight: 800; font-size: 14px; }
.toast[data-type='success'] .toast-ic { animation: toast-pop .4s cubic-bezier(.2, .9, .3, 1.5); }
.toast-msg { flex: 1; font-size: 14px; }
.toast-x { flex: none; background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.toast-x:hover { background: var(--surface-2); color: var(--text); }
@keyframes toast-pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }

/* Dialog konfirmasi (pengganti confirm() bawaan browser) */
.dlg-wrap { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 25, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.dlg-wrap.show { opacity: 1; }
.dlg { width: min(420px, 100%); background: var(--surface); color: var(--text); border-radius: 20px; padding: 26px 24px 20px; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); transform: translateY(12px) scale(.96); transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); }
.dlg-wrap.show .dlg { transform: none; }
.dlg-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--primary-soft); }
.dlg-wrap.danger .dlg-ic { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.dlg h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.dlg p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.dlg-acts { display: flex; gap: 10px; margin-top: 22px; }
.dlg-acts .btn { flex: 1; justify-content: center; padding: 11px 14px; }

/* ============ Kantor (2D) ============ */
.office { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.desk {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 16px 16px;
  text-align: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; overflow: hidden;
}
.desk::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 64px; background: var(--desk-color, var(--primary)); opacity: .14; }
.desk:hover { transform: translateY(-3px); border-color: var(--desk-color, var(--primary)); }
.desk.active { border-color: var(--desk-color, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--desk-color, var(--primary)) 25%, transparent); }
.desk > * { position: relative; }
.desk h3 { margin: 12px 0 2px; font-size: 16px; }
.desk .role { color: var(--muted); font-size: 13px; min-height: 18px; }
.desk .badges { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.desk .state { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.desk .state .dot { background: #22c55e; }
.desk .busy-task { font-size: 11px; color: var(--warning); margin: 4px auto 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk.busy .state .dot { background: var(--warning); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.desk.add { display: grid; place-items: center; border-style: dashed; color: var(--muted); min-height: 220px; }
.desk.add::before { display: none; }
.desk.add .plus { font-size: 38px; display: block; }

/* ============ Kantor 3D ============ */
.stage3d { position: relative; height: calc(100vh - var(--header-h) - 120px); min-height: 420px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #1b1d33; }
.stage3d canvas { display: block; width: 100%; height: 100%; }
.label3d {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap; text-align: center; will-change: transform;
  background: rgba(15,16,32,.78); color: #fff; padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.label3d small { display: block; font-weight: 500; opacity: .75; font-size: 10px; }
.label3d.busy::after { content: ' ⏳'; }
.bubble3d {
  position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; will-change: transform;
  background: #fff; color: #111; padding: 6px 11px; border-radius: 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: pop .25s ease;
}
.bubble3d::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
@keyframes pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
.hud3d { position: absolute; left: 14px; bottom: 14px; color: #c9cbe6; font-size: 12px; background: rgba(15,16,32,.6); padding: 8px 12px; border-radius: 10px; }
/* daftar karyawan di samping kantor 3D */
.office3d-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.o3-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 120px); min-height: 420px; overflow: hidden; }
.o3-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 4px; }
.o3-head .btn { padding: 5px 9px; font-size: 12px; }
.o3-hint { color: var(--muted); font-size: 12px; padding: 0 14px 10px; border-bottom: 1px solid var(--border); }
.o3-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.o3-item { display: flex; align-items: center; gap: 6px; border-radius: 12px; padding: 2px 4px 2px 2px; border: 1px solid transparent; }
.o3-item:hover { background: var(--surface-2); }
.o3-item.following { border-color: var(--primary); background: var(--primary-soft); }
.o3-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px; text-align: left; color: inherit; cursor: pointer; font: inherit; }
.o3-main .avatar.sm { flex: none; width: 36px; height: 36px; font-size: 18px; }
.o3-txt { min-width: 0; display: flex; flex-direction: column; }
.o3-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o3-txt small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o3-txt .o3-status { color: var(--text); opacity: .8; }
.o3-item.busy .o3-status { color: var(--warning); opacity: 1; font-weight: 600; }
.o3-div { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.o3-follow { flex: none; }
@media (max-width: 1000px) {
  .office3d-layout { grid-template-columns: 1fr; }
  .o3-panel { height: auto; min-height: 0; order: -1; }
  .o3-hint { display: none; }
  .o3-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .o3-item { flex: none; width: 230px; border-color: var(--border); }
}
.tooltip3d { position: absolute; pointer-events: none; background: #fff; color: #111; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; transform: translate(12px, 12px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* ============ Chat drawer ============ */
.chat {
  position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(600px, 100vw); background: var(--surface);
  border-left: 1px solid var(--border); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease;
  z-index: 60; visibility: hidden;
}
.chat.open { transform: none; visibility: visible; box-shadow: -12px 0 40px rgba(0,0,0,.12); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .who small { color: var(--muted); }
/* meteran konteks di bawah kepala chat */
.chat-ctx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.chat-ctx b { color: var(--text); }
.chat-ctx .ctx-bar { flex: 1; min-width: 60px; max-width: 160px; height: 6px; border-radius: 99px; background: rgba(127,127,127,.2); overflow: hidden; }
.chat-ctx .ctx-bar i { display: block; height: 100%; border-radius: 99px; background: #22c55e; }
.chat-ctx.ctx-mid .ctx-bar i { background: #f59e0b; }
.chat-ctx.ctx-high .ctx-bar i { background: #ef4444; }
.chat-ctx.ctx-mid .ctx-lbl { color: #f59e0b; }
.chat-ctx.ctx-high .ctx-lbl { color: #ef4444; font-weight: 600; }
.ctx-pill { display: inline-block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ctx-pill.ctx-mid { color: #f59e0b; }
.ctx-pill.ctx-high { color: #ef4444; font-weight: 600; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--bubble-user); color: #fff; border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.error { align-self: center; background: transparent; color: var(--danger); font-size: 13px; padding: 4px; }
.msg .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; opacity: .65; margin-top: 8px; }
.msg .meta .copy { cursor: pointer; text-decoration: underline; }
/* garis "konteks baru" setelah konteks karyawan dibersihkan */
.msg.ctx-start, .msg.ctx-end { position: relative; }
.msg.ctx-start { margin-top: 30px; }
.msg.ctx-end { margin-bottom: 30px; }
.msg.ctx-start::before, .msg.ctx-end::after { content: "🧽 konteks baru: yang di atas tidak diingat lagi"; position: absolute; left: 0; white-space: nowrap; font-size: 11px; color: var(--muted); padding: 2px 10px; border: 1px dashed var(--border); border-radius: 999px; background: var(--bg); }
.msg.ctx-start::before { top: -28px; }
.msg.ctx-end::after { bottom: -28px; }
.msg.user.ctx-start::before, .msg.user.ctx-end::after { left: auto; right: 0; }
.msg code { background: rgba(127,127,127,.15); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.msg video { width: 100%; max-width: 320px; border-radius: 12px; display: block; margin-top: 10px; background: #000; }
.msg img.att { max-width: 220px; border-radius: 10px; display: block; margin-top: 8px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.18); margin: 6px 6px 0 0; }
.msg.assistant .attach-chip { background: var(--surface-2); }
.dl { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }
#chatStatus { display: contents; } /* status (mengetik…) tetap jadi anak flex dari chat-log */
.actions-slot:empty { display: none; }
.typing { align-self: flex-start; color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.typing .dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin: 0 1px; animation: blink 1.2s infinite; }
.typing .dots span:nth-child(2) { animation-delay: .2s; } .typing .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.chat-pending { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; }
.chat-pending .chip { font-size: 12px; background: var(--primary-soft); color: var(--primary); padding: 4px 6px 4px 10px; border-radius: 99px; display: flex; align-items: center; gap: 4px; }
.chat-pending .chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 14px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 180px; }
.empty-chat { color: var(--muted); text-align: center; margin: auto; padding: 24px; }

/* ============ Usage ============ */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--primary); }
.chart .bar:hover { fill: var(--primary-2); }
.chart text { fill: var(--muted); font-size: 13px; }
.chart .grid-line { stroke: var(--border); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 99px; }
.note { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; line-height: 1.5; }

/* ============ Settings ============ */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-opt { border: 2px solid var(--border); border-radius: 14px; padding: 16px; cursor: pointer; display: block; background: var(--surface); }
.mode-opt.selected { border-color: var(--primary); background: var(--primary-soft); }
.mode-opt b { display: block; margin-bottom: 4px; }
.mode-opt small { color: var(--muted); }
.check { font-size: 13px; margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.check.ok { color: var(--success); }
.check.bad { color: var(--danger); }

/* ============ Modal ============ */
.modal-wrap { position: fixed; inset: 0; background: rgba(10,10,25,.5); z-index: 70; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.modal-wrap.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border-radius: 18px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal h2 { margin: 0 0 16px; }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind-pick label { border: 2px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; }
.kind-pick input { display: none; }
.kind-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.kind-pick small { display: block; color: var(--muted); margin-top: 2px; font-weight: 400; }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .content { padding: 16px; }
  .profile-btn .name, .topbar .pill { display: none; }
  .grid.cols-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 20px; }
  .modes, .kind-pick { grid-template-columns: 1fr; }
  .office { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .desk { padding: 18px 10px 12px; }
  .desk .avatar { width: 56px; height: 56px; font-size: 26px; }
  .msg { max-width: 94%; }
  .table .hide-sm { display: none; }
  .stage3d { height: calc(100vh - var(--header-h) - 90px); }
}

/* ============ Proyek & koordinator ============ */
.msg .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg.user.from-coord { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border); }
.badge.coord { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
:root[data-theme='dark'] .badge.coord { background: var(--surface-2); border-color: var(--border); }
.stages { display: flex; gap: 4px; flex-wrap: wrap; }
.stage-chip { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.stage-chip.done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.stage-chip.now { background: var(--primary); color: #fff; border-color: var(--primary); }
.stage-chip.wait { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.stage-chip.skip { opacity: .45; text-decoration: line-through; }
:root[data-theme='dark'] .stage-chip.done, :root[data-theme='dark'] .stage-chip.wait { background: var(--surface-2); }
.proj-list { display: grid; gap: 12px; }
.proj { display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.proj:hover { border-color: var(--primary); }
.proj .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.proj .top b { font-size: 16px; flex: 1; min-width: 160px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.output { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.55; max-height: 420px; overflow: auto; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.timeline li { display: flex; gap: 10px; align-items: baseline; }
.timeline time { color: var(--muted); font-size: 12px; min-width: 44px; }
.idea { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.idea.chosen { border-color: var(--success); box-shadow: 0 0 0 2px #bbf7d0; }

.nav a .count:empty { display: none; }

.chat-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(10,10,25,.28); opacity: 0; pointer-events: none; transition: opacity .2s; }
.chat-backdrop.show { opacity: 1; pointer-events: auto; cursor: pointer; }

/* ============ Galeri video ============ */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card.vid { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; margin: 0; }
.card.vid:hover { border-color: var(--primary); }
.vid-thumb { position: relative; aspect-ratio: 9 / 16; background: #000; }
.vid-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.vid-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); opacity: .85; }
.vid-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vid-title { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-badges { gap: 4px; }
.vid-meta { font-size: 12px; color: var(--muted); }
.vid-actions { margin-top: auto; gap: 6px; }
.vid-actions .btn { flex: 1; }
.vid-detail { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-bottom: 4px; }
.vid-player { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; background: #000; }
.vid-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text); }
.vid-check input { width: auto; }
.vid-actions .btn.danger { flex: 0 0 auto; }
.vid-drive { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; font-size: 38px; background: var(--surface-2); color: var(--muted); }
.vid-drive span { font-size: 12px; line-height: 1.4; }
.vid-player.vid-drive { position: static; aspect-ratio: 9 / 16; font-size: 44px; }
.vid-tick { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.card.vid.selected { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.card.vid.selected .vid-tick { background: var(--danger); border-color: var(--danger); }
.sel-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; position: sticky; top: 8px; z-index: 5; }
.badge.warn { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.post-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.post-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 6px 0; font-size: 13px; font-weight: 400; color: var(--text); border-bottom: 1px dashed var(--border); }
.post-main { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.post-opt { width: auto; max-width: 240px; padding: 4px 8px; font-size: 12px; }
.post-state:empty { display: none; }
.post-row:last-child { border-bottom: 0; }
.post-row input { width: auto; margin-top: 2px; }
.post-row b { min-width: 80px; }
.post-state { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; color: var(--muted); padding-left: 26px; }
.post-err { color: var(--danger); }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-side { display: flex; flex-direction: column; gap: 10px; }
.cover-box { border: 1px dashed var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; font-size: 12px; color: var(--muted); }
.cover-img { width: 96px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #000; }
.cover-empty { padding: 4px 0; }
.ai-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.ai-row input { flex: 1; min-width: 200px; }
.pkg { margin: 0 0 14px; font-size: 13px; }
.pkg summary { cursor: pointer; color: var(--muted); }
.pkg pre { white-space: pre-wrap; font-family: inherit; background: var(--surface-2); border-radius: 10px; padding: 10px; max-height: 220px; overflow: auto; }
.cover-ed { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; overflow: auto; }
.cover-ed-box { background: var(--surface); color: var(--text); border-radius: 16px; padding: 20px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.cover-ed-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; }
.cover-previews { display: grid; grid-template-columns: 1fr 1.07fr; gap: 10px; align-items: start; }
.cover-previews figure, .cover-pair figure { margin: 0; text-align: center; }
.cover-previews figcaption, .cover-pair figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.cover-frame { position: relative; }
.cover-guide { position: absolute; left: 0; right: 0; top: 12.5%; height: 75%; border: 2px dashed rgba(255,255,255,.75); border-radius: 4px; pointer-events: none; }
.cover-canvas { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; background: #000; display: block; }
.cover-canvas.tt { aspect-ratio: 3 / 4; }
.cover-pair { display: flex; gap: 8px; justify-content: center; align-items: flex-start; }
.cover-img.tt { aspect-ratio: 3 / 4; }
.cover-ed-form .seg button { flex: 1; }
@media (max-width: 640px) {
  .cover-ed-grid { grid-template-columns: 1fr; }
  .cover-previews { max-width: 360px; margin: 0 auto; }
}
.social-grid { display: grid; gap: 12px; }
.social-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.social-item h3 { margin: 0 0 6px; font-size: 15px; }
.social-item .row { gap: 8px; }
.social-item code { font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .vid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vid-detail { grid-template-columns: 1fr; }
  .vid-player { max-height: 60vh; width: auto; margin: 0 auto; }
  #vidSearch { max-width: none !important; }
  #filters { flex-wrap: wrap; }
}

/* ============ Kalender & antrean ============ */
.q-opts { display: grid; grid-template-columns: 1fr 0.8fr 1fr 1.4fr; gap: 12px; }
.q-item { margin-bottom: 10px; }
.q-item.selesai, .q-item.batal, .q-item.gagal { opacity: .75; }
.q-item.berjalan { border-color: var(--primary); }
.q-item.sel { border-color: var(--primary); opacity: 1; }
.q-pick { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.q-hist-head { align-items: center; gap: 10px; flex-wrap: wrap; }
.q-badges { gap: 4px; margin-top: 8px; }
.q-progress { font-size: 13px; color: var(--muted); margin-top: 8px; }
.q-actions { margin-top: 10px; gap: 6px; }
.q-when { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.q-when input { padding: 6px 8px; width: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { min-height: 96px; background: var(--surface-2); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.other { opacity: .45; }
.cal-day.today { outline: 2px solid var(--primary); }
.cal-num { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-wd { display: none; }
.cal-item { font-size: 11px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; text-decoration: none; color: var(--text); background: var(--surface); border-left: 3px solid var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-item.v-siap { border-left-color: var(--success); }
.cal-item.v-diposting { border-left-color: var(--primary); }
.cal-item.plan { border-left-color: var(--warning); border-style: dashed; border-top: 0; border-right: 0; border-bottom: 0; opacity: .85; }
.cal-legend { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; background: var(--muted); }
.cal-legend i.v-siap { background: var(--success); }
.cal-legend i.v-diposting { background: var(--primary); }
.cal-legend i.plan { background: var(--warning); }
.cal-unsched { padding: 8px 0; border-top: 1px solid var(--border); }
.cal-unsched video { width: 40px; height: 72px; object-fit: cover; border-radius: 6px; background: #000; }
@media (max-width: 900px) { .q-opts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-head, .cal-day:not(.has) { display: none; }
  .cal-day { min-height: 0; }
  .cal-wd { display: inline; }
  .cal-item { white-space: normal; font-size: 13px; }
  .q-when input { width: 100%; }
}

/* ============ Bank ide ============ */
.idea-top .card { margin: 0; }
.idea-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 8px; }
.idea-row.sel { border-color: var(--primary); background: var(--primary-soft); }
.idea-pick input { width: 18px; height: 18px; margin-top: 2px; }
.idea-star { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
.idea-star.on { color: var(--warning); }
.idea-main { flex: 1; min-width: 0; }
.idea-text { font-weight: 600; line-height: 1.4; }
.idea-notes { font-size: 13px; color: var(--muted); margin-top: 4px; }
.idea-badges { gap: 4px; margin-top: 8px; }
.idea-badges a.badge { text-decoration: none; }
.idea-date { font-size: 12px; color: var(--muted); }
.idea-acts { display: flex; gap: 4px; flex: none; }
.idea-bar { position: sticky; bottom: 12px; display: none; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--primary); border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); margin-top: 12px; }
.idea-bar.show { display: flex; }
.q-post { margin-bottom: 14px; }
.q-post .row { gap: 14px; flex-wrap: wrap; }
.idea-tools { margin: 0 0 8px; padding: 0 4px; }
.btn.danger-text { color: var(--danger); }
@media (max-width: 640px) {
  .idea-row { flex-wrap: wrap; }
  .idea-main { flex-basis: calc(100% - 70px); }
  .idea-acts { width: 100%; justify-content: flex-end; }
  #i_search { max-width: none !important; }
  #i_filters { flex-wrap: wrap; }
}

/* ---------- Sisa kuota langganan ---------- */
.quota-bar { height: 6px; border-radius: 99px; background: rgba(127,127,127,.22); overflow: hidden; }
.quota-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--success); transition: width .4s; }
.quota-bar.big { height: 10px; background: var(--surface-2); }
.warn > .quota-bar > i { background: var(--warning); }
.bad > .quota-bar > i { background: var(--danger); }
.quota-side { display: flex; flex-direction: column; gap: 8px; }
.quota-side:empty { display: none; }
.quota-mini-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.quota-mini.warn b { color: var(--warning); }
.quota-mini.bad b { color: var(--danger); }
.quota-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
.quota-item { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.quota-item-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.quota-item-head b { font-size: 18px; }
.quota-item.warn .quota-item-head b { color: var(--warning); }
.quota-item.bad .quota-item-head b { color: var(--danger); }
.quota-item-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* pengaturan antrean */
.q-control .q-ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: 14px; }
.q-control .q-ctl-row input[type='time'] { width: auto; padding: 4px 6px; }
.q-control .q-ctl-row input[type='number'] { width: 64px; padding: 4px 6px; }
.q-control .q-ctl-row .vid-check { margin: 0; }
.dur-custom { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.dur-custom input { width: 0; flex: 1; min-width: 56px; padding-left: 8px; padding-right: 4px; }
.dur-custom span { color: var(--muted); font-size: 13px; }

/* ---------- Ringkasan harian ---------- */
.digest-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 10px; }
.digest-opts { gap: 10px 18px; font-size: 13px; color: var(--muted); }
.digest-opts label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.digest-opts input[type=time], .digest-opts select { width: auto; padding: 6px 8px; }
.digest-pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.55; background: var(--surface-2); border-radius: 10px; padding: 14px; max-height: 60vh; overflow: auto; margin: 0; }
label.check > input[type=checkbox] { width: auto; flex: none; }

/* ---------- Laporan Performa ---------- */
.perf-status { padding: 14px 18px; }
.perf-notes { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.perf-notes li { margin: 3px 0; }
.perf-insight ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.perf-table td { vertical-align: top; }
.perf-rank { color: var(--muted); font-weight: 700; width: 28px; }
.perf-vid { display: flex; gap: 10px; align-items: flex-start; min-width: 220px; }
.perf-vid img, .perf-noimg { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); display: grid; place-items: center; }
.perf-vid b { display: block; line-height: 1.3; }
.perf-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.perf-vid a.badge { text-decoration: none; }
.perf-bars { display: flex; flex-direction: column; gap: 10px; }
.perf-bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; flex-wrap: wrap; }
.perf-bar-head small { color: var(--muted); }
.vid-views { color: inherit; text-decoration: none; font-weight: 600; }
.post-link { margin: 6px 0 2px; font-size: 13px; }
.post-link summary { cursor: pointer; color: var(--muted); }
.post-link select { width: auto; }
@media (max-width: 640px) {
  .perf-vid { min-width: 0; }
  .perf-vid img, .perf-vid .perf-noimg { display: none; }
  .perf-table td, .perf-table th { padding-left: 6px; padding-right: 6px; }
}

/* Radar Tren (Bank Ide) */
.radar h2 { margin: 0 0 2px; }
.radar-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.radar-head > div { flex: 1; min-width: 220px; }
.radar-head .sub { margin: 0; }
.badge.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.radar-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 12px 0; font-size: 13px; color: var(--muted); }
.radar-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.radar .note.warn { margin-bottom: 12px; }
.radar-sub { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.radar-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.radar-idea { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.radar-idea.done { opacity: .6; }
.radar-idea-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.radar-trend { font-size: 12px; font-weight: 700; color: var(--primary); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.radar-trend a { color: inherit; text-decoration: none; }
.radar-trend a:hover { text-decoration: underline; }
.radar-idea .idea-notes { margin-top: 0; }
.radar-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.radar-acts .btn.on { color: var(--warning); }
.radar-empty { background: var(--surface-2); border-radius: 12px; padding: 14px; font-size: 14px; color: var(--muted); }
.radar-steps { list-style: none; counter-reset: rs; padding: 0; margin: 14px 0 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.radar-steps li { counter-increment: rs; background: var(--surface-2); border-radius: 12px; padding: 12px 12px 12px 44px; position: relative; font-size: 13px; color: var(--muted); }
.radar-steps li::before { content: counter(rs); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.radar-steps b { display: block; color: var(--text); margin-bottom: 2px; }
.radar-more { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.radar-more summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.radar-hint { margin: 6px 0 10px; }
.radar-seg { flex-wrap: wrap; max-width: 100%; margin-bottom: 6px; }
.radar-signals { margin-top: 4px; }
.radar-sig { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.radar-sig:first-child { border-top: 0; }
.radar-sig-t { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.radar-sig-t a { color: inherit; }
.radar-sig .idea-notes { margin-top: 2px; font-size: 12px; }
.radar-toggle { margin-top: 6px; }
.radar-cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 10px; align-items: start; }
.radar-cfg .field { margin: 0; }
.switch-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.switch-row input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.switch-row .sub { font-size: 12px; }
.radar-src { gap: 6px 14px; }
@media (max-width: 640px) {
  .radar-head .btn { width: 100%; white-space: normal; text-align: center; justify-content: center; }
  .radar-ideas { grid-template-columns: 1fr; }
  .radar-cfg { grid-template-columns: 1fr; }
  .radar-sig { flex-wrap: wrap; }
  .radar-sig .btn { margin-left: auto; }
}

/* PWA: banner pasang aplikasi & mode aplikasi terpasang */
.pwa-banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; box-shadow: 0 12px 34px rgba(0,0,0,.28); max-width: 520px; margin: 0 auto; animation: pwa-in .25s ease-out; }
.pwa-banner img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pwa-banner-t { flex: 1; min-width: 0; line-height: 1.3; }
.pwa-banner-t small { display: block; color: var(--muted); font-size: 12px; }
.pwa-banner .btn { flex: none; }
@keyframes pwa-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.pwa-steps { padding-left: 20px; line-height: 1.7; margin: 8px 0 12px; }
.pwa-ico { display: inline-block; padding: 0 4px; border-radius: 6px; background: var(--surface-2); }
.profile-menu [hidden] { display: none; }
html.pwa .content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Mode Afiliasi */
.prod-badge { text-decoration: none; background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.aff-guide summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; list-style: none; }
.aff-guide summary::-webkit-details-marker { display: none; }
.aff-guide summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.aff-guide[open] summary::before { transform: rotate(90deg); }
.aff-steps { list-style: none; counter-reset: as; padding: 0; margin: 14px 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.aff-steps li { counter-increment: as; background: var(--surface-2); border-radius: 12px; padding: 12px 12px 12px 44px; position: relative; font-size: 13px; color: var(--muted); }
.aff-steps li::before { content: counter(as); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--warning); color: #1a1300; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.aff-steps b { display: block; color: var(--text); margin-bottom: 2px; }
.aff-rules ul { margin: 6px 0 0; padding-left: 18px; }
.aff-rules li { margin: 3px 0; }
.aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.aff-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.aff-card.off { opacity: .6; }
.aff-head { display: flex; gap: 12px; align-items: flex-start; }
.aff-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--warning) 16%, transparent); }
.aff-title { flex: 1; min-width: 0; }
.aff-title b { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.aff-meta { gap: 4px; margin-top: 6px; }
.aff-meta a.badge { text-decoration: none; }
.aff-points { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; max-height: 96px; overflow: auto; line-height: 1.5; }
.aff-points.muted, .aff-stats.muted { font-style: italic; }
.aff-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.aff-stats a { color: inherit; text-decoration: none; }
.aff-stats a:hover { color: var(--primary); }
.aff-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.aff-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; text-align: center; }
.aff-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) {
  .aff-grid { grid-template-columns: 1fr; }
  .aff-acts .btn { flex: 1; }
}

/* 🏠 Warga Negeri Taugasih.Seru */
.wg-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)) 2fr; gap: 10px; margin-top: 16px; }
.wg-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.wg-stat b { font-size: 22px; }
.wg-stat.wide b { font-size: 15px; }
.wg-stat span { color: var(--muted); font-size: 13px; }
.wg-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.wg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wg-table th, .wg-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.wg-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.wg-table.small { margin-top: 10px; font-size: 13px; }
.wg-table small { color: var(--muted); }
.wg-table tr.wg-off { opacity: .6; }
.wg-act { white-space: nowrap; }
.wg-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25); vertical-align: -2px; margin: 0 3px 0 1px; }
.wg-pinned { white-space: pre-wrap; background: rgba(234,179,8,.12); border: 1px dashed #eab308; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.wg-log { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.wg-log small { color: var(--muted); }
.wg-card { position: relative; max-width: 380px; margin: 8px auto 12px; border-radius: 18px; overflow: hidden; color: #1f1a17;
  background: linear-gradient(135deg, #fde68a, #fef9c3 55%, #fcd34d); border: 3px solid #2a2230; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.wg-card-top { display: flex; justify-content: space-between; align-items: center; background: #2a2230; color: #fde047; padding: 8px 14px; font-size: 12px; letter-spacing: .5px; }
.wg-card-top b { font-size: 15px; }
.wg-card-body { display: flex; gap: 14px; padding: 14px; font-size: 14px; line-height: 1.5; }
.wg-face { width: 86px; height: 104px; border-radius: 12px; border: 3px solid #2a2230; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 900; color: #fff; flex: none; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.wg-name { font-size: 20px; font-weight: 900; }
.wg-gelar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; font-size: 12px; }
.wg-gelar span { background: #2a2230; color: #fde68a; border-radius: 20px; padding: 2px 10px; }
.wg-caps { position: relative; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; font-size: 11.5px; }
.wg-caps span { background: rgba(0,0,0,.28); color: #fff; border: 1px dashed rgba(255,255,255,.55); border-radius: 8px; padding: 2px 8px; transform: rotate(-2deg); }
.wg-caps span:nth-child(even) { transform: rotate(2deg); }
.wg-hadiah { display: grid; gap: 8px; margin: 4px 0 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; line-height: 1.5; }
.wg-hadiah small { color: var(--muted); }
.wg-toko { margin-bottom: 16px; }
.wg-toko:empty { display: none; }
.wg-toko h2 small { font-weight: 500; margin-left: 6px; }
.wg-toko-i { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.wg-toko-i small { color: var(--muted); }
.wg-toko-isi { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; line-height: 1.45; }
.wg-toko-act { display: flex; gap: 6px; flex: none; }
.wg-toko-st { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.wg-toko-riw summary { cursor: pointer; padding: 8px 0; color: var(--muted); font-size: 14px; }
.wg-badge { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, #eab308 18%, transparent); font-size: 13px; }
.wg-badge.off { background: transparent; border: 1px dashed var(--border); color: var(--muted); }
.wg-png { margin-bottom: 12px; text-align: center; }
.wg-png img { width: min(360px, 100%); border-radius: 14px; box-shadow: var(--shadow); }
.wg-card.pending { filter: grayscale(.6); }
.wg-stamp { position: absolute; right: 12px; bottom: 16px; transform: rotate(-12deg); border: 3px solid #dc2626; color: #dc2626; font-weight: 900; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
/* Kartu Warga per tingkat (sama dengan video): makin tinggi pangkat makin mewah */
.wg-card { --ink: #1e293b; --head: #1e3a8a; --headtx: #bfdbfe; --title: #fff; --chipbg: #1e3a8a; --chipfg: #e0f2fe; --orn: #93c5fd; }
.wg-card .wg-card-body, .wg-card .wg-name { color: var(--ink); position: relative; }
.wg-card .wg-card-top { background: var(--head); color: var(--headtx); }
.wg-card .wg-card-top b { color: var(--title); }
.wg-card .wg-gelar span { background: var(--chipbg); color: var(--chipfg); }
.wg-card .wg-face { position: relative; border-color: var(--orn); }
.wg-face { position: relative; }
.wg-face .wg-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; border-radius: 9px; background: linear-gradient(#fff7d6, #fde68a); }
.wg-face .wg-lambang { z-index: 1; }
.wg-pita { position: absolute; right: 12px; top: 40px; background: var(--chipbg); color: var(--chipfg); font-size: 10px; font-weight: 900; letter-spacing: 1px; padding: 2px 10px; border-radius: 6px; border: 2px solid var(--orn); z-index: 2; }
.wg-resmi { position: absolute; right: 16px; top: 46%; width: 56px; height: 56px; border-radius: 50%; border: 4px double var(--orn); color: var(--orn); transform: rotate(-14deg); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; opacity: .9; }
.wg-resmi small { font-size: 6px; font-weight: 800; }
.wg-lambang { position: absolute; left: -10px; top: -12px; font-size: 22px; transform: rotate(-12deg); }
.wg-orn { position: absolute; width: 22px; height: 22px; border: 3px solid var(--orn); pointer-events: none; }
.wg-orn.tl { left: 6px; top: 40px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.wg-orn.tr { right: 6px; top: 40px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.wg-orn.bl { left: 6px; bottom: 6px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.wg-orn.br { right: 6px; bottom: 6px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.wg-star { position: absolute; color: #fffbe6; font-style: normal; font-size: 13px; pointer-events: none; animation: wg-twinkle 1.6s ease-in-out infinite; text-shadow: 0 0 6px #fff; }
@keyframes wg-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.1); } }
/* 🪪 Warga: biru polos */
.wg-card.bk-biru { background: linear-gradient(135deg, #e0f2fe, #f8fafc 55%, #bae6fd); border-color: #2563eb; }
/* 🏘️ Ketua RT: perunggu disikat + paku keling */
.wg-card.bk-perunggu { --ink: #3b2212; --head: linear-gradient(90deg, #4a2a12, #6b3d1c); --headtx: #f3c79b; --title: #fde6cc; --chipbg: #5a3418; --chipfg: #f8d9b5; --orn: #e0a872;
  background: radial-gradient(circle at 12px calc(100% - 9px), #7c4a21 4px, transparent 5px) 0 0 / 40px 100% repeat-x, repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 2px, transparent 2px 12px), linear-gradient(135deg, #f6dcc0, #e7b98c 55%, #c98a52);
  border: 4px solid #6b3d1c; }
/* 🏡 Ketua RW: perak bergaris + siku */
.wg-card.bk-perak { --ink: #0f172a; --head: linear-gradient(90deg, #1e293b, #475569); --headtx: #cbd5e1; --chipbg: #334155; --chipfg: #f1f5f9; --orn: #64748b;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.45) 0 6px, transparent 6px 26px), linear-gradient(135deg, #fff, #e2e8f0 55%, #94a3b8);
  border: 4px solid #94a3b8; box-shadow: 0 0 0 2px #f8fafc inset, 0 6px 18px rgba(0,0,0,.18); }
/* 🏛️ Lurah: emas + motif kawung + stempel */
.wg-card.bk-emas { --ink: #422006; --head: linear-gradient(90deg, #0c0a09, #292524); --headtx: #fcd34d; --title: #fde68a; --chipbg: #1c1917; --chipfg: #fcd34d; --orn: #92400e;
  background: radial-gradient(ellipse 5px 9px at 50% 30%, rgba(66,32,6,.16) 98%, transparent) 0 0 / 34px 34px, radial-gradient(ellipse 9px 5px at 30% 50%, rgba(66,32,6,.16) 98%, transparent) 0 0 / 34px 34px, linear-gradient(135deg, #fef3c7, #fcd34d 55%, #d97706);
  border: 5px solid #b45309; box-shadow: 0 0 0 2px #fde68a inset, 0 6px 18px rgba(0,0,0,.2); }
/* 🏢 Camat: emas bersinar + sinar + bintang */
.wg-card.bk-emas-kilau { --ink: #3b1d06; --head: linear-gradient(90deg, #000, #3f2a05, #000); --headtx: #fde047; --title: #fff7cc; --chipbg: #000; --chipfg: #fde047; --orn: #78350f;
  background: repeating-conic-gradient(from 0deg at 20% 55%, rgba(255,255,255,.28) 0 6deg, transparent 6deg 20deg), linear-gradient(135deg, #fffbeb, #fbbf24 55%, #b45309);
  border: 6px double #b45309; box-shadow: 0 0 0 2px #fff7cc inset, 0 0 16px rgba(251,191,36,.6), 0 6px 18px rgba(0,0,0,.2); }
/* 🏙️ Bupati: hologram pelangi gelap + mahkota */
.wg-card.bk-hologram { --ink: #f8fafc; --head: linear-gradient(90deg, #0f0c29, #302b63, #0f0c29); --headtx: #a5f3fc; --chipbg: #f0abfc; --chipfg: #1e1b4b; --orn: #22d3ee;
  border: 5px solid transparent;
  background: linear-gradient(115deg, rgba(236,72,153,.28), rgba(34,211,238,.28), rgba(163,230,53,.28), rgba(245,158,11,.28), rgba(236,72,153,.28)) padding-box, linear-gradient(135deg, #1e1b4b, #312e81 55%, #0f172a) padding-box, linear-gradient(90deg, #ec4899, #22d3ee, #a3e635, #f59e0b, #ec4899) border-box;
  background-size: 300% 100%, 100% 100%, 300% 100%; animation: wg-holo 5s linear infinite; box-shadow: 0 0 18px rgba(124,58,237,.55), 0 6px 18px rgba(0,0,0,.25); }
.bk-hologram .wg-card-body { text-shadow: 0 1px 2px rgba(0,0,0,.5); }
/* 🎖️ Menteri: ungu kerajaan + filigri emas */
.wg-card.bk-menteri { --ink: #fef3c7; --head: linear-gradient(90deg, #b45309, #fde047, #b45309); --headtx: #3b0764; --title: #3b0764; --chipbg: #fde047; --chipfg: #3b0764; --orn: #fde047;
  background: radial-gradient(circle, rgba(253,224,71,.14) 2px, transparent 3px) 0 0 / 28px 28px, linear-gradient(135deg, #3b0764, #581c87 55%, #1e1b4b);
  border: 6px solid #b45309; box-shadow: 0 0 0 2px #fde047 inset, 0 0 0 3px #fde047, 0 0 20px rgba(253,224,71,.45), 0 6px 18px rgba(0,0,0,.25); }
.bk-menteri .wg-card-body { text-shadow: 0 1px 2px rgba(0,0,0,.4); }
/* 👑 Presiden (RI-1): emas berkilau + aksen merah-putih, pita panjang, stempel KEPALA NEGARA, mahkota di foto */
.wg-card.bk-presiden { --ink: #3b0a0a; --head: linear-gradient(90deg, #7f1d1d, #dc2626 50%, #7f1d1d); --headtx: #fde68a; --title: #fff; --chipbg: #b91c1c; --chipfg: #fff7cc; --orn: #b91c1c;
  background: linear-gradient(180deg, transparent 52px, rgba(220,38,38,.9) 52px 57px, rgba(255,255,255,.95) 57px 62px, transparent 62px), repeating-conic-gradient(from 0deg at 20% 58%, rgba(255,255,255,.3) 0 6deg, transparent 6deg 18deg), linear-gradient(135deg, #fffbeb, #fcd34d 50%, #d97706);
  border: 6px solid #b91c1c; box-shadow: 0 0 0 2px #fde68a inset, 0 0 0 3px #fde68a, 0 0 0 6px #fff, 0 0 22px rgba(220,38,38,.55), 0 6px 18px rgba(0,0,0,.25); }
.bk-presiden .wg-pita { font-size: 8px; letter-spacing: .5px; padding: 2px 8px; }
.bk-presiden .wg-face .wg-lambang { font-size: 26px; left: 50%; top: -18px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.wg-resmi.panjang { font-size: 7px; line-height: 1.1; text-align: center; }
.bk-presiden .wg-star { color: #fff7cc; }
/* 🕶️ Paspampres: jas hitam + emas, kaca hitam */
.wg-card.bk-staf-paspampres { --ink: #f9fafb; --head: linear-gradient(90deg, #000, #1f2937, #000); --headtx: #fde68a; --title: #fff; --chipbg: #fde68a; --chipfg: #111827; --orn: #d4af37;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 4px, transparent 4px 12px), linear-gradient(135deg, #374151, #111827 55%, #000);
  border: 5px solid #d4af37; box-shadow: 0 0 0 2px #111 inset, 0 0 14px rgba(212,175,55,.45), 0 6px 18px rgba(0,0,0,.3); }
.bk-staf-paspampres .wg-card-body { text-shadow: 0 1px 2px rgba(0,0,0,.5); }
/* 🛡️ Penjaga Istana: hijau loreng + perisai */
.wg-card.bk-staf-penjaga { --ink: #1a2e05; --head: linear-gradient(90deg, #365314, #4d7c0f, #365314); --headtx: #ecfccb; --title: #fff; --chipbg: #365314; --chipfg: #ecfccb; --orn: #4d7c0f;
  background: radial-gradient(ellipse 18px 10px at 20% 30%, rgba(54,83,20,.18) 98%, transparent) 0 0 / 46px 38px, radial-gradient(ellipse 12px 16px at 70% 70%, rgba(77,124,15,.16) 98%, transparent) 0 0 / 52px 44px, linear-gradient(135deg, #ecfccb, #bef264 55%, #84cc16);
  border: 5px solid #365314; box-shadow: 0 0 0 2px #ecfccb inset, 0 6px 18px rgba(0,0,0,.2); }
/* 📋 Sekretaris Presiden: biru dinas + garis kertas */
.wg-card.bk-staf-sekretaris { --ink: #1e1b4b; --head: linear-gradient(90deg, #1e3a8a, #312e81, #1e3a8a); --headtx: #c7d2fe; --title: #fff; --chipbg: #312e81; --chipfg: #e0e7ff; --orn: #4338ca;
  background: repeating-linear-gradient(0deg, rgba(67,56,202,.08) 0 1px, transparent 1px 16px), linear-gradient(135deg, #f8fafc, #e0e7ff 55%, #c7d2fe);
  border: 5px solid #312e81; box-shadow: 0 0 0 2px #fff inset, 0 6px 18px rgba(0,0,0,.18); }
.bk-staf-sekretaris .wg-pita, .bk-staf-penjaga .wg-pita { font-size: 9px; }
.bk-emas-kilau::after, .bk-hologram::after, .bk-menteri::after, .bk-presiden::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.45) 50%, transparent 60%); background-size: 250% 100%; animation: wg-shine 3s ease-in-out infinite; pointer-events: none; }
@keyframes wg-shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes wg-holo { to { background-position: 300% 0, 0 0, 300% 0; } }
@media (prefers-reduced-motion: reduce) { .wg-card, .wg-card::after, .wg-star { animation: none !important; } }
.wg-soon { display: inline-block; background: rgba(124,58,237,.14); color: #7c3aed; border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 700; }
@media (max-width: 760px) { .wg-stats { grid-template-columns: 1fr 1fr; } .wg-stat.wide { grid-column: 1 / -1; } }
