/* ==========================================================================
   PURBAJAGA — Design System v2
   Modern, smooth & responsive (mobile-first) di atas Bootstrap 5.3
   ========================================================================== */

:root {
    --pj-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --pj-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --pj-primary: #4f46e5;
    --pj-primary-rgb: 79, 70, 229;
    --pj-primary-600: #4338ca;
    --pj-accent: #06b6d4;
    --pj-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);
    --pj-gradient-soft: linear-gradient(135deg, rgba(79,70,229,.10) 0%, rgba(6,182,212,.10) 100%);

    --pj-success: #10b981; --pj-success-rgb: 16, 185, 129;
    --pj-warning: #f59e0b; --pj-warning-rgb: 245, 158, 11;
    --pj-danger:  #ef4444; --pj-danger-rgb: 239, 68, 68;
    --pj-info:    #0ea5e9; --pj-info-rgb: 14, 165, 233;
    --pj-violet:  #8b5cf6; --pj-pink: #ec4899;

    --pj-bg: #f4f6fb;
    --pj-surface: #ffffff;
    --pj-surface-2: #f8f9fd;
    --pj-surface-3: #eef1f8;
    --pj-border: #e6e9f2;
    --pj-text: #0f172a;
    --pj-text-2: #475569;
    --pj-muted: #64748b;

    --pj-radius-sm: 10px;
    --pj-radius: 16px;
    --pj-radius-lg: 22px;
    --pj-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --pj-shadow: 0 4px 24px -6px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .04);
    --pj-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .22);
    --pj-ring: 0 0 0 4px rgba(var(--pj-primary-rgb), .15);

    --pj-sidebar-w: 268px;
    --pj-topbar-h: 68px;
    --pj-bottomnav-h: 68px;
    --pj-ease: cubic-bezier(.22, 1, .36, 1);
    --pj-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Jembatan ke variabel Bootstrap */
    --bs-font-sans-serif: var(--pj-font);
    --bs-body-font-family: var(--pj-font);
    --bs-font-monospace: var(--pj-mono);
    --bs-primary: var(--pj-primary);
    --bs-primary-rgb: var(--pj-primary-rgb);
    --bs-success-rgb: var(--pj-success-rgb);
    --bs-warning-rgb: var(--pj-warning-rgb);
    --bs-danger-rgb: var(--pj-danger-rgb);
    --bs-info-rgb: var(--pj-info-rgb);
    --bs-body-bg: var(--pj-bg);
    --bs-body-color: var(--pj-text);
    --bs-border-color: var(--pj-border);
    --bs-secondary-color: var(--pj-muted);
    --bs-tertiary-bg: var(--pj-surface-2);
    --bs-link-color: var(--pj-primary);
    --bs-link-color-rgb: var(--pj-primary-rgb);
    --bs-link-hover-color: var(--pj-primary-600);
    --bs-border-radius: var(--pj-radius-sm);
    --bs-border-radius-lg: var(--pj-radius);
    --bs-card-bg: var(--pj-surface);
}

[data-bs-theme="dark"] {
    --pj-bg: #0a0f1e;
    --pj-surface: #111830;
    --pj-surface-2: #151d38;
    --pj-surface-3: #1b2545;
    --pj-border: #222c4b;
    --pj-text: #e6e9f5;
    --pj-text-2: #b4bcd6;
    --pj-muted: #8792b3;
    --pj-primary: #818cf8;
    --pj-primary-rgb: 129, 140, 248;
    --pj-primary-600: #a5b4fc;
    --pj-shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --pj-shadow: 0 8px 28px -8px rgba(0,0,0,.55);
    --pj-shadow-lg: 0 28px 56px -12px rgba(0,0,0,.7);
    --pj-gradient-soft: linear-gradient(135deg, rgba(129,140,248,.14) 0%, rgba(6,182,212,.10) 100%);

    --bs-body-bg: var(--pj-bg);
    --bs-body-color: var(--pj-text);
    --bs-border-color: var(--pj-border);
    --bs-secondary-color: var(--pj-muted);
    --bs-tertiary-bg: var(--pj-surface-2);
    --bs-primary: var(--pj-primary);
    --bs-primary-rgb: var(--pj-primary-rgb);
    --bs-emphasis-color: #fff;
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--pj-font);
    background: var(--pj-bg);
    color: var(--pj-text);
    font-size: .9375rem;
    line-height: 1.55;
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color .35s var(--pj-ease), color .35s var(--pj-ease);
}
h1, h2, h3, h4, h5, h6, .fw-bold { letter-spacing: -.02em; }
h1, h2, h3, h4, h5, h6 { color: var(--pj-text); font-weight: 700; }
.text-muted, .text-body-secondary { color: var(--pj-muted) !important; }
.text-primary { color: var(--pj-primary) !important; }
.bg-primary { background-color: var(--pj-primary) !important; }
.font-monospace, code { font-family: var(--pj-mono) !important; font-size: .85em; }
a { text-decoration: none; transition: color .2s; }
::selection { background: rgba(var(--pj-primary-rgb), .2); }
img { max-width: 100%; }
.small, small { font-size: .8125rem; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.28); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(100,116,139,.45); }

/* ---------- App Shell ---------- */
.pj-sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--pj-sidebar-w);
    background: var(--pj-surface);
    border-right: 1px solid var(--pj-border);
    display: flex; flex-direction: column;
    z-index: 1045;
    transition: transform .4s var(--pj-ease), background-color .35s;
}
.pj-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 22px; height: var(--pj-topbar-h);
    color: var(--pj-text);
}
.pj-brand-logo {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--pj-gradient); color: #fff;
    box-shadow: 0 8px 20px -6px rgba(79,70,229,.6);
    font-size: 1.05rem; flex-shrink: 0;
}
.pj-brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; line-height: 1.1; }
.pj-brand-tag { font-size: .68rem; color: var(--pj-muted); font-weight: 500; letter-spacing: 0; }

.pj-nav { flex: 1; overflow-y: auto; padding: 8px 14px 20px; }
.pj-nav-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
    color: var(--pj-muted); padding: 18px 12px 8px; opacity: .8;
}
.pj-nav-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 2px;
    border-radius: 12px;
    color: var(--pj-text-2); font-weight: 600; font-size: .9rem;
    transition: background-color .2s, color .2s, transform .2s var(--pj-ease);
}
.pj-nav-link i { width: 20px; text-align: center; font-size: 1rem; opacity: .85; }
.pj-nav-link:hover { background: var(--pj-surface-3); color: var(--pj-text); }
.pj-nav-link:active { transform: scale(.98); }
.pj-nav-link.active {
    background: var(--pj-gradient-soft);
    color: var(--pj-primary);
}
.pj-nav-link.active::before {
    content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px;
    border-radius: 0 4px 4px 0; background: var(--pj-gradient);
}
.pj-nav-link .pj-nav-badge {
    margin-left: auto; font-size: .7rem; font-weight: 700;
    background: var(--pj-surface-3); color: var(--pj-muted);
    padding: 2px 8px; border-radius: 99px;
}

.pj-sidebar-footer { padding: 14px; border-top: 1px solid var(--pj-border); }
.pj-user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 14px; background: var(--pj-surface-2);
    color: var(--pj-text);
}
.pj-user-card:hover { background: var(--pj-surface-3); color: var(--pj-text); }

.pj-avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    object-fit: cover; display: grid; place-items: center;
    background: var(--pj-gradient); color: #fff; font-weight: 700;
}
.pj-avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .8rem; }
.pj-avatar-xl { width: 96px; height: 96px; border-radius: 28px; font-size: 2.2rem; }

.pj-main {
    margin-left: var(--pj-sidebar-w);
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
}

.pj-topbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--pj-topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 28px;
    background: rgba(244, 246, 251, .78);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s, background-color .35s, box-shadow .25s;
}
[data-bs-theme="dark"] .pj-topbar { background: rgba(10, 15, 30, .75); }
.pj-topbar.scrolled { border-bottom-color: var(--pj-border); box-shadow: var(--pj-shadow-sm); }
.pj-topbar-title { font-size: 1.15rem; font-weight: 750; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-topbar-sub { font-size: .75rem; color: var(--pj-muted); margin: 0; line-height: 1; }

.pj-icon-btn {
    width: 42px; height: 42px; border-radius: 12px;
    display: inline-grid; place-items: center; flex-shrink: 0;
    background: var(--pj-surface); color: var(--pj-text-2);
    border: 1px solid var(--pj-border);
    transition: all .2s var(--pj-ease); cursor: pointer;
}
.pj-icon-btn:hover { color: var(--pj-primary); border-color: rgba(var(--pj-primary-rgb), .35); transform: translateY(-1px); }
.pj-icon-btn:active { transform: scale(.94); }

.pj-search {
    position: relative; width: min(360px, 34vw);
}
.pj-search input {
    width: 100%; height: 42px; border-radius: 12px;
    border: 1px solid var(--pj-border); background: var(--pj-surface);
    padding: 0 14px 0 40px; color: var(--pj-text); font-size: .875rem;
    transition: box-shadow .2s, border-color .2s;
}
.pj-search input:focus { outline: none; border-color: var(--pj-primary); box-shadow: var(--pj-ring); }
.pj-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pj-muted); }
.pj-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: var(--pj-surface-3); color: var(--pj-muted); font-size: .7rem; padding: 2px 6px; border-radius: 6px;
    font-family: var(--pj-font); box-shadow: none;
}

.pj-content {
    flex: 1;
    padding: 24px 28px 40px;
    width: 100%; max-width: 1440px; margin: 0 auto;
    animation: pjFadeUp .5s var(--pj-ease) both;
}

@keyframes pjFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pjPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pjPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.pj-stagger > * { animation: pjFadeUp .55s var(--pj-ease) both; }
.pj-stagger > *:nth-child(2) { animation-delay: .04s; }
.pj-stagger > *:nth-child(3) { animation-delay: .08s; }
.pj-stagger > *:nth-child(4) { animation-delay: .12s; }
.pj-stagger > *:nth-child(5) { animation-delay: .16s; }
.pj-stagger > *:nth-child(6) { animation-delay: .20s; }
.pj-stagger > *:nth-child(n+7) { animation-delay: .24s; }

/* Backdrop mobile */
.pj-backdrop {
    position: fixed; inset: 0; z-index: 1040;
    background: rgba(2, 6, 23, .5);
    backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.pj-backdrop.show { opacity: 1; visibility: visible; }

/* Bottom nav (mobile) */
.pj-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
    display: none;
    height: calc(var(--pj-bottomnav-h) + var(--pj-safe-bottom));
    padding: 6px 10px calc(6px + var(--pj-safe-bottom));
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--pj-border);
    box-shadow: 0 -8px 30px -12px rgba(15, 23, 42, .15);
}
[data-bs-theme="dark"] .pj-bottomnav { background: rgba(17, 24, 48, .88); }
.pj-bottomnav-inner { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 100%; max-width: 520px; margin: 0 auto; }
.pj-bn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--pj-muted); font-size: .68rem; font-weight: 650;
    height: 100%; border-radius: 14px;
    transition: color .2s, transform .2s var(--pj-ease);
}
.pj-bn-item i { font-size: 1.15rem; transition: transform .3s var(--pj-ease); }
.pj-bn-item.active { color: var(--pj-primary); }
.pj-bn-item.active i { transform: translateY(-2px); }
.pj-bn-item:active { transform: scale(.92); }
.pj-bn-fab {
    width: 56px; height: 56px; margin: -26px auto 0;
    border-radius: 18px; border: 0;
    display: grid; place-items: center;
    background: var(--pj-gradient); color: #fff; font-size: 1.3rem;
    box-shadow: 0 12px 24px -6px rgba(79, 70, 229, .6), 0 0 0 5px var(--pj-bg);
    transition: transform .25s var(--pj-ease);
}
.pj-bn-fab:active { transform: scale(.9) rotate(90deg); }

/* ---------- Page header ---------- */
.pj-page-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 22px;
}
.pj-page-head h1, .pj-page-head h2, .pj-page-head h3 { margin: 0; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); font-weight: 800; }
.pj-page-head p { margin: 4px 0 0; color: var(--pj-muted); }
.pj-back {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .8125rem; font-weight: 600; color: var(--pj-muted); margin-bottom: 8px;
}
.pj-back:hover { color: var(--pj-primary); }
.pj-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards ---------- */
.card {
    --bs-card-bg: var(--pj-surface);
    --bs-card-border-color: var(--pj-border);
    --bs-card-border-radius: var(--pj-radius);
    --bs-card-inner-border-radius: calc(var(--pj-radius) - 1px);
    --bs-card-cap-bg: transparent;
    border: 1px solid var(--pj-border) !important;
    border-radius: var(--pj-radius) !important;
    background: var(--pj-surface);
    box-shadow: var(--pj-shadow-sm);
    transition: box-shadow .3s var(--pj-ease), transform .3s var(--pj-ease), border-color .3s, background-color .35s;
    margin-bottom: 0;
}
.card + .card { margin-top: 20px; }
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--pj-border) !important;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--pj-text) !important;
}
.card-body { padding: 20px; }
.card-footer { background: transparent; border-top: 1px solid var(--pj-border); padding: 14px 20px; }
.pj-card-title { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1rem; margin: 0; }
.pj-card-title .pj-ico { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--pj-shadow); border-color: rgba(var(--pj-primary-rgb), .3) !important; }

.pj-ico {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    display: inline-grid; place-items: center; font-size: 1.1rem;
    background: rgba(var(--pj-primary-rgb), .1); color: var(--pj-primary);
}
.pj-ico.success { background: rgba(var(--pj-success-rgb), .12); color: var(--pj-success); }
.pj-ico.warning { background: rgba(var(--pj-warning-rgb), .14); color: #d97706; }
.pj-ico.danger { background: rgba(var(--pj-danger-rgb), .12); color: var(--pj-danger); }
.pj-ico.info { background: rgba(var(--pj-info-rgb), .12); color: var(--pj-info); }
.pj-ico.violet { background: rgba(139, 92, 246, .12); color: var(--pj-violet); }
.pj-ico.pink { background: rgba(236, 72, 153, .12); color: var(--pj-pink); }
.pj-ico.muted { background: var(--pj-surface-3); color: var(--pj-muted); }

/* Hero */
.pj-hero {
    position: relative; overflow: hidden;
    border-radius: var(--pj-radius-lg);
    padding: 26px;
    background: var(--pj-gradient);
    color: #fff;
    box-shadow: 0 20px 40px -18px rgba(79, 70, 229, .55);
}
.pj-hero::before, .pj-hero::after {
    content: ''; position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.pj-hero::before { width: 280px; height: 280px; right: -80px; top: -120px; }
.pj-hero::after { width: 180px; height: 180px; right: 120px; bottom: -110px; background: rgba(255,255,255,.08); }
.pj-hero > * { position: relative; z-index: 1; }
.pj-hero h1, .pj-hero h2, .pj-hero h3 { color: #fff; }
.pj-hero .text-white-75 { color: rgba(255,255,255,.8); }
.pj-hero .btn-light { color: var(--pj-primary-600); font-weight: 700; }

/* Stat card */
.stat-card { padding: 18px; height: 100%; }
.stat-card .stat-value { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.stat-card .stat-label { font-size: .78rem; font-weight: 600; color: var(--pj-muted); }
.stat-card .stat-foot { font-size: .75rem; color: var(--pj-muted); margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-font-weight: 650;
    --bs-btn-padding-y: .6rem;
    --bs-btn-padding-x: 1.05rem;
    --bs-btn-font-size: .875rem;
    --bs-btn-border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    transition: transform .18s var(--pj-ease), box-shadow .2s, background-color .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn i { font-size: .95em; }
.btn .me-1, .btn .me-2 { margin-right: 0 !important; }
.btn-sm { --bs-btn-padding-y: .4rem; --bs-btn-padding-x: .75rem; --bs-btn-font-size: .8125rem; --bs-btn-border-radius: 10px; }
.btn-lg { --bs-btn-padding-y: .8rem; --bs-btn-padding-x: 1.4rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 14px; }
.btn-primary {
    --bs-btn-bg: var(--pj-primary); --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--pj-primary-600); --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: var(--pj-primary-600); --bs-btn-disabled-bg: var(--pj-primary); --bs-btn-disabled-border-color: transparent;
    background-image: var(--pj-gradient); background-size: 150% 100%; background-position: 0 0;
    box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7);
    color: #fff;
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 24px -8px rgba(79, 70, 229, .75); color: #fff; }
.btn-success { --bs-btn-bg: var(--pj-success); --bs-btn-border-color: var(--pj-success); --bs-btn-hover-bg: #059669; --bs-btn-hover-border-color: #059669; box-shadow: 0 8px 18px -8px rgba(16,185,129,.6); }
.btn-danger { --bs-btn-bg: var(--pj-danger); --bs-btn-border-color: var(--pj-danger); --bs-btn-hover-bg: #dc2626; --bs-btn-hover-border-color: #dc2626; }
.btn-info { --bs-btn-bg: var(--pj-info); --bs-btn-border-color: var(--pj-info); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0284c7; }
.btn-light, .btn-soft {
    --bs-btn-bg: var(--pj-surface); --bs-btn-color: var(--pj-text-2); --bs-btn-border-color: var(--pj-border);
    --bs-btn-hover-bg: var(--pj-surface-3); --bs-btn-hover-color: var(--pj-text); --bs-btn-hover-border-color: var(--pj-border);
    --bs-btn-active-bg: var(--pj-surface-3); --bs-btn-active-color: var(--pj-text); --bs-btn-active-border-color: var(--pj-border);
    border-width: 1px !important;
}
.btn-soft-primary { --bs-btn-bg: rgba(var(--pj-primary-rgb), .1); --bs-btn-color: var(--pj-primary); --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(var(--pj-primary-rgb), .18); --bs-btn-hover-color: var(--pj-primary); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: rgba(var(--pj-primary-rgb), .22); --bs-btn-active-color: var(--pj-primary); }
.btn-soft-success { --bs-btn-bg: rgba(var(--pj-success-rgb), .12); --bs-btn-color: #059669; --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(var(--pj-success-rgb), .2); --bs-btn-hover-color: #047857; --bs-btn-hover-border-color: transparent; }
.btn-soft-danger { --bs-btn-bg: rgba(var(--pj-danger-rgb), .1); --bs-btn-color: var(--pj-danger); --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(var(--pj-danger-rgb), .18); --bs-btn-hover-color: #dc2626; --bs-btn-hover-border-color: transparent; }
.btn-soft-warning { --bs-btn-bg: rgba(var(--pj-warning-rgb), .14); --bs-btn-color: #b45309; --bs-btn-border-color: transparent; --bs-btn-hover-bg: rgba(var(--pj-warning-rgb), .22); --bs-btn-hover-color: #92400e; --bs-btn-hover-border-color: transparent; }
.btn-ai {
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent;
    background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 8px 18px -8px rgba(139, 92, 246, .7);
}
.btn-ai:hover { filter: brightness(1.07); box-shadow: 0 12px 24px -8px rgba(139, 92, 246, .8); }
[data-bs-theme="dark"] .btn-soft-success { --bs-btn-color: #34d399; }
[data-bs-theme="dark"] .btn-soft-warning { --bs-btn-color: #fbbf24; }
.btn-outline-primary { --bs-btn-color: var(--pj-primary); --bs-btn-border-color: rgba(var(--pj-primary-rgb), .4); --bs-btn-hover-bg: var(--pj-primary); --bs-btn-hover-border-color: var(--pj-primary); --bs-btn-active-bg: var(--pj-primary); }
.btn-outline-secondary { --bs-btn-color: var(--pj-text-2); --bs-btn-border-color: var(--pj-border); --bs-btn-hover-bg: var(--pj-surface-3); --bs-btn-hover-color: var(--pj-text); --bs-btn-hover-border-color: var(--pj-border); }
.btn-icon { width: 38px; height: 38px; padding: 0 !important; }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
    content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.btn-light.is-loading::after, .btn-soft.is-loading::after { border-color: rgba(100,116,139,.3); border-top-color: var(--pj-primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form-label { font-weight: 650; font-size: .8125rem; color: var(--pj-text-2) !important; margin-bottom: 6px; }
.form-control, .form-select {
    min-height: 46px;
    border-radius: 12px !important;
    border: 1.5px solid var(--pj-border) !important;
    background-color: var(--pj-surface);
    color: var(--pj-text);
    font-size: 16px; /* cegah auto-zoom di iOS */
    padding: .6rem .9rem;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
@media (min-width: 768px) { .form-control, .form-select { font-size: .9rem; } }
textarea.form-control { min-height: 110px; }
.form-control:hover, .form-select:hover { border-color: #cfd5e4 !important; }
[data-bs-theme="dark"] .form-control:hover, [data-bs-theme="dark"] .form-select:hover { border-color: #33406a !important; }
.form-control:focus, .form-select:focus { border-color: var(--pj-primary) !important; box-shadow: var(--pj-ring) !important; background-color: var(--pj-surface); color: var(--pj-text); }
.form-control::placeholder { color: var(--pj-muted); opacity: .7; }
.form-control[readonly], .form-control:disabled { background-color: var(--pj-surface-2) !important; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--pj-danger) !important; }
.form-text { color: var(--pj-muted); font-size: .78rem; }
.invalid-feedback { font-size: .78rem; font-weight: 600; }
.input-group-text {
    background: var(--pj-surface-2) !important; border: 1.5px solid var(--pj-border) !important;
    color: var(--pj-muted) !important; border-radius: 12px;
}
.input-group > .input-group-text + .form-control { border-left: 0 !important; }
.input-group:focus-within .input-group-text { border-color: var(--pj-primary) !important; color: var(--pj-primary) !important; }
.form-check-input { width: 1.15em; height: 1.15em; border: 1.5px solid #cbd2e1; }
.form-check-input:checked { background-color: var(--pj-primary); border-color: var(--pj-primary); }
.form-check-input:focus { box-shadow: var(--pj-ring); border-color: var(--pj-primary); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }

.pj-input-icon { position: relative; }
.pj-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pj-muted); pointer-events: none; transition: color .2s; }
.pj-input-icon > .form-control, .pj-input-icon > .form-select { padding-left: 2.6rem; }
.pj-input-icon:focus-within > i { color: var(--pj-primary); }

.pj-form-section { padding: 20px; }
.pj-form-section + .pj-form-section { border-top: 1px dashed var(--pj-border); }
.pj-form-section-title { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: .95rem; margin-bottom: 16px; }
.pj-form-section-title .pj-step {
    width: 26px; height: 26px; border-radius: 8px; font-size: .75rem; display: grid; place-items: center;
    background: rgba(var(--pj-primary-rgb), .12); color: var(--pj-primary); font-weight: 800;
}

.pj-segment { display: flex; gap: 6px; padding: 4px; background: var(--pj-surface-2); border: 1px solid var(--pj-border); border-radius: 14px; }
.pj-segment input { display: none; }
.pj-segment label {
    flex: 1; text-align: center; padding: 9px 8px; border-radius: 10px; cursor: pointer;
    font-weight: 650; font-size: .82rem; color: var(--pj-muted); transition: all .2s var(--pj-ease);
}
.pj-segment input:checked + label { background: var(--pj-surface); color: var(--pj-text); box-shadow: var(--pj-shadow-sm); }
.pj-segment input[value="draft"]:checked + label { color: #b45309; }
.pj-segment input[value="active"]:checked + label { color: var(--pj-info); }
.pj-segment input[value="completed"]:checked + label { color: var(--pj-success); }

.pj-sticky-actions {
    position: sticky; bottom: 0; z-index: 5;
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 14px 20px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pj-border);
    border-radius: 0 0 var(--pj-radius) var(--pj-radius);
}
[data-bs-theme="dark"] .pj-sticky-actions { background: rgba(17, 24, 48, .9); }

/* Dropzone */
.pj-dropzone {
    position: relative;
    border: 2px dashed #cbd3e6; border-radius: var(--pj-radius);
    background: var(--pj-surface-2);
    padding: 28px 18px; text-align: center;
    transition: border-color .25s, background-color .25s, transform .25s var(--pj-ease);
    cursor: pointer;
}
[data-bs-theme="dark"] .pj-dropzone { border-color: #2c3960; }
.pj-dropzone:hover, .pj-dropzone.dragover { border-color: var(--pj-primary); background: rgba(var(--pj-primary-rgb), .05); }
.pj-dropzone.dragover { transform: scale(1.01); }
.pj-dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pj-dropzone .pj-dz-icon {
    width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px;
    display: grid; place-items: center; font-size: 1.5rem;
    background: var(--pj-gradient); color: #fff;
    box-shadow: 0 12px 24px -10px rgba(79,70,229,.7);
}
.pj-dz-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 2; }
.pj-file-list { display: grid; gap: 8px; margin-top: 12px; }
.pj-file-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px;
    background: var(--pj-surface); border: 1px solid var(--pj-border);
    animation: pjPop .3s var(--pj-ease) both;
}
.pj-file-item .pj-file-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.pj-file-item .pj-file-name { font-weight: 650; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-file-item .pj-file-meta { font-size: .72rem; color: var(--pj-muted); }
.pj-file-item.is-too-big { border-color: var(--pj-danger); background: rgba(var(--pj-danger-rgb), .05); }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--pj-text);
    --bs-table-hover-bg: var(--pj-surface-2);
    --bs-table-hover-color: var(--pj-text);
    --bs-table-border-color: var(--pj-border);
    margin-bottom: 0;
    font-size: .875rem;
}
.table > thead > tr > th, .table thead.table-light th {
    background: var(--pj-surface-2) !important;
    color: var(--pj-muted) !important;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid var(--pj-border) !important;
    padding: 12px 16px; white-space: nowrap;
}
.table > tbody > tr > td { padding: 14px 16px; border-color: var(--pj-border); vertical-align: middle; }
.table > tbody > tr { transition: background-color .15s; }
.table.border { border-radius: var(--pj-radius-sm); overflow: hidden; }
.table-responsive { border-radius: 0 0 var(--pj-radius) var(--pj-radius); }

/* Tabel → kartu di layar HP */
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr {
        position: relative;
        padding: 14px 16px; border-bottom: 1px solid var(--pj-border);
    }
    .table-stack > tbody > tr > td {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        padding: 5px 0 !important; border: 0 !important; text-align: right !important;
    }
    .table-stack > tbody > tr > td::before {
        content: attr(data-label);
        font-size: .72rem; font-weight: 700; color: var(--pj-muted);
        text-transform: uppercase; letter-spacing: .05em; text-align: left; flex-shrink: 0;
    }
    .table-stack > tbody > tr > td[data-label=""]::before, .table-stack > tbody > tr > td:not([data-label])::before { display: none; }
    .table-stack > tbody > tr > td.td-title { display: block; text-align: left !important; font-size: .95rem; padding-bottom: 8px !important; }
    .table-stack > tbody > tr > td.td-actions { justify-content: flex-end; padding-top: 10px !important; }
    .table-stack > tbody > tr > td[colspan] { display: block; text-align: center !important; }
}

/* ---------- Badges / Pills ---------- */
.badge { font-weight: 650; border-radius: 8px; padding: .38em .65em; letter-spacing: .01em; }
.pj-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 99px;
    font-size: .74rem; font-weight: 700; line-height: 1.4;
    background: var(--pj-surface-3); color: var(--pj-text-2); white-space: nowrap;
}
.pj-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pj-pill.draft { background: rgba(var(--pj-warning-rgb), .14); color: #b45309; }
.pj-pill.active { background: rgba(var(--pj-info-rgb), .13); color: #0284c7; }
.pj-pill.active .dot { animation: pjPulse 1.6s infinite; }
.pj-pill.completed { background: rgba(var(--pj-success-rgb), .14); color: #059669; }
.pj-pill.danger { background: rgba(var(--pj-danger-rgb), .12); color: #dc2626; }
.pj-pill.primary { background: rgba(var(--pj-primary-rgb), .12); color: var(--pj-primary); }
.pj-pill.violet { background: rgba(139, 92, 246, .12); color: #7c3aed; }
[data-bs-theme="dark"] .pj-pill.draft { color: #fbbf24; }
[data-bs-theme="dark"] .pj-pill.active { color: #38bdf8; }
[data-bs-theme="dark"] .pj-pill.completed { color: #34d399; }
[data-bs-theme="dark"] .pj-pill.danger { color: #f87171; }
[data-bs-theme="dark"] .pj-pill.violet { color: #a78bfa; }
.pj-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600;
    background: var(--pj-surface-2); border: 1px solid var(--pj-border); color: var(--pj-text-2);
}
.pj-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--pj-muted); font-size: .8125rem; }
.pj-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- List item (mobile-friendly) ---------- */
.pj-list { display: flex; flex-direction: column; }
.pj-list-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; color: var(--pj-text);
    border-bottom: 1px solid var(--pj-border);
    transition: background-color .15s;
}
.pj-list-item:last-child { border-bottom: 0; }
a.pj-list-item:hover { background: var(--pj-surface-2); color: var(--pj-text); }
.pj-list-item .pj-li-body { flex: 1; min-width: 0; }
.pj-list-item .pj-li-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-list-item .pj-li-sub { font-size: .78rem; color: var(--pj-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.pj-list-item .pj-li-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pj-list-item .pj-chev { color: var(--pj-muted); opacity: .5; transition: transform .2s; }
a.pj-list-item:hover .pj-chev { transform: translateX(3px); opacity: 1; color: var(--pj-primary); }

.pj-date-box {
    width: 52px; flex-shrink: 0; text-align: center;
    border-radius: 14px; overflow: hidden;
    background: var(--pj-surface-2); border: 1px solid var(--pj-border);
}
.pj-date-box .m { font-size: .62rem; font-weight: 800; text-transform: uppercase; background: var(--pj-gradient); color: #fff; padding: 3px 0; letter-spacing: .06em; }
.pj-date-box .d { font-size: 1.15rem; font-weight: 800; padding: 3px 0 4px; line-height: 1.2; }

/* ---------- Evidence grid ---------- */
.pj-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
@media (max-width: 575.98px) { .pj-evidence-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pj-ev-card {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--pj-radius); overflow: hidden;
    background: var(--pj-surface); border: 1px solid var(--pj-border);
    color: var(--pj-text);
    transition: transform .3s var(--pj-ease), box-shadow .3s var(--pj-ease), border-color .3s;
}
.pj-ev-card:hover { transform: translateY(-4px); box-shadow: var(--pj-shadow); border-color: rgba(var(--pj-primary-rgb), .35); color: var(--pj-text); }
.pj-ev-thumb {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    display: grid; place-items: center;
    background: var(--pj-surface-2);
}
.pj-ev-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--pj-ease); }
.pj-ev-card:hover .pj-ev-thumb img { transform: scale(1.06); }
.pj-ev-thumb .pj-ev-type-icon { font-size: 2.2rem; opacity: .85; }
.pj-ev-thumb.t-photo { background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(79,70,229,.08)); color: var(--pj-info); }
.pj-ev-thumb.t-video { background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(236,72,153,.08)); color: var(--pj-danger); }
.pj-ev-thumb.t-audio { background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(236,72,153,.06)); color: #d97706; }
.pj-ev-thumb.t-document { background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(79,70,229,.08)); color: var(--pj-violet); }
.pj-ev-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; }
.pj-ev-badges .b {
    font-size: .64rem; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 7px;
    background: rgba(15, 23, 42, .65); color: #fff; backdrop-filter: blur(6px);
}
.pj-ev-badges .b.ok { background: rgba(16, 185, 129, .9); }
.pj-ev-body { padding: 10px 12px 12px; }
.pj-ev-title { font-weight: 700; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-ev-meta { font-size: .72rem; color: var(--pj-muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }

/* ---------- Workflow stepper ---------- */
.pj-stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.pj-step-item { position: relative; text-align: center; padding: 0 4px; }
.pj-step-item::before {
    content: ''; position: absolute; top: 20px; left: -50%; width: 100%; height: 3px;
    background: var(--pj-border); z-index: 0;
}
.pj-step-item:first-child::before { display: none; }
.pj-step-item.done::before, .pj-step-item.current::before { background: var(--pj-gradient); }
.pj-step-dot {
    position: relative; z-index: 1;
    width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 14px;
    display: grid; place-items: center; font-size: .95rem;
    background: var(--pj-surface); border: 2px solid var(--pj-border); color: var(--pj-muted);
    transition: all .3s var(--pj-ease);
}
.pj-step-item.done .pj-step-dot { background: var(--pj-gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -8px rgba(79,70,229,.7); }
.pj-step-item.current .pj-step-dot { border-color: var(--pj-primary); color: var(--pj-primary); box-shadow: var(--pj-ring); }
.pj-step-label { font-size: .74rem; font-weight: 700; color: var(--pj-muted); line-height: 1.25; }
.pj-step-item.done .pj-step-label, .pj-step-item.current .pj-step-label { color: var(--pj-text); }
@media (max-width: 575.98px) {
    .pj-step-dot { width: 36px; height: 36px; border-radius: 12px; font-size: .82rem; }
    .pj-step-item::before { top: 17px; }
    .pj-step-label { font-size: .64rem; }
}
.pj-progress { height: 8px; border-radius: 99px; background: var(--pj-surface-3); overflow: hidden; }
.pj-progress > span { display: block; height: 100%; border-radius: 99px; background: var(--pj-gradient); transition: width 1s var(--pj-ease); }

/* ---------- Tabs (pill, scrollable) ---------- */
.pj-tabs {
    display: flex; gap: 6px; padding: 5px; overflow-x: auto; scrollbar-width: none;
    background: var(--pj-surface); border: 1px solid var(--pj-border); border-radius: 16px;
    box-shadow: var(--pj-shadow-sm);
}
.pj-tabs::-webkit-scrollbar { display: none; }
.pj-tabs .nav-link, .pj-tabs a.pj-tab {
    flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 12px; border: 0;
    font-weight: 700; font-size: .85rem; color: var(--pj-muted); background: transparent;
    white-space: nowrap; transition: all .25s var(--pj-ease);
}
.pj-tabs .nav-link:hover, .pj-tabs a.pj-tab:hover { color: var(--pj-text); background: var(--pj-surface-2); }
.pj-tabs .nav-link.active { background: var(--pj-gradient); color: #fff; box-shadow: 0 8px 16px -8px rgba(79,70,229,.7); }
.pj-tabs .count { font-size: .7rem; padding: 1px 7px; border-radius: 99px; background: rgba(100,116,139,.15); }
.pj-tabs .nav-link.active .count { background: rgba(255,255,255,.25); }
.tab-pane.fade { transition: opacity .3s var(--pj-ease); }

/* Info rows */
.pj-info-list { display: grid; gap: 0; }
.pj-info-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--pj-border); }
.pj-info-row:last-child { border-bottom: 0; }
.pj-info-row .pj-ico { width: 36px; height: 36px; border-radius: 10px; font-size: .85rem; }
.pj-info-row .k { font-size: .72rem; font-weight: 700; color: var(--pj-muted); text-transform: uppercase; letter-spacing: .05em; }
.pj-info-row .v { font-weight: 650; font-size: .9rem; word-break: break-word; }

/* ---------- Timeline ---------- */
.pj-timeline { position: relative; padding-left: 8px; }
.pj-tl-day {
    position: sticky; top: calc(var(--pj-topbar-h) + 8px); z-index: 3;
    display: inline-flex; align-items: center; gap: 8px;
    margin: 6px 0 14px 44px; padding: 6px 14px; border-radius: 99px;
    background: var(--pj-surface); border: 1px solid var(--pj-border); box-shadow: var(--pj-shadow-sm);
    font-weight: 750; font-size: .8rem;
}
.pj-tl-item { position: relative; display: flex; gap: 16px; padding-bottom: 18px; }
.pj-tl-item::before {
    content: ''; position: absolute; left: 19px; top: 44px; bottom: 0; width: 2px;
    background: linear-gradient(var(--pj-border), var(--pj-border));
}
.pj-tl-item:last-child::before { display: none; }
.pj-tl-icon {
    position: relative; z-index: 1;
    width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
    display: grid; place-items: center; font-size: .9rem;
    background: var(--pj-surface); border: 2px solid var(--pj-border); color: var(--pj-muted);
}
.pj-tl-item.t-evidence .pj-tl-icon { border-color: rgba(var(--pj-success-rgb), .5); color: var(--pj-success); background: rgba(var(--pj-success-rgb), .08); }
.pj-tl-item.t-activity_start .pj-tl-icon, .pj-tl-item.t-activity_end .pj-tl-icon { background: var(--pj-gradient); border-color: transparent; color: #fff; }
.pj-tl-item.t-ocr_extracted .pj-tl-icon { border-color: rgba(var(--pj-warning-rgb), .6); color: #d97706; background: rgba(var(--pj-warning-rgb), .08); }
.pj-tl-item.t-activity_created .pj-tl-icon { border-style: dashed; }
.pj-tl-card {
    flex: 1; min-width: 0;
    background: var(--pj-surface); border: 1px solid var(--pj-border); border-radius: var(--pj-radius);
    padding: 14px 16px; box-shadow: var(--pj-shadow-sm);
    transition: box-shadow .3s var(--pj-ease), transform .3s var(--pj-ease);
}
.pj-tl-card:hover { box-shadow: var(--pj-shadow); }
.pj-tl-time { font-family: var(--pj-mono); font-weight: 700; font-size: .8rem; color: var(--pj-primary); }
.pj-tl-card .pj-tl-media { display: flex; gap: 12px; margin-top: 10px; align-items: center; }
.pj-tl-card .pj-tl-media img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }

/* ---------- Empty state ---------- */
.pj-empty { text-align: center; padding: 44px 20px; }
.pj-empty-ico {
    width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 16px;
    display: grid; place-items: center; font-size: 1.8rem;
    background: var(--pj-gradient-soft); color: var(--pj-primary);
}
.pj-empty h5, .pj-empty h6 { font-weight: 750; margin-bottom: 6px; }
.pj-empty p { color: var(--pj-muted); max-width: 380px; margin: 0 auto 16px; font-size: .875rem; }

/* ---------- Alerts / Callouts ---------- */
.alert { border-radius: var(--pj-radius-sm); border-width: 1px !important; font-size: .875rem; }
.pj-callout {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--pj-radius);
    background: var(--pj-gradient-soft); border: 1px solid rgba(var(--pj-primary-rgb), .18);
    font-size: .85rem; color: var(--pj-text-2);
}
.pj-callout.warning { background: rgba(var(--pj-warning-rgb), .08); border-color: rgba(var(--pj-warning-rgb), .3); }
.pj-callout.success { background: rgba(var(--pj-success-rgb), .07); border-color: rgba(var(--pj-success-rgb), .28); }
.pj-callout.danger { background: rgba(var(--pj-danger-rgb), .06); border-color: rgba(var(--pj-danger-rgb), .25); }
.pj-callout strong { color: var(--pj-text); }

.pj-hash {
    font-family: var(--pj-mono); font-size: .75rem; word-break: break-all; line-height: 1.6;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(var(--pj-success-rgb), .07); border: 1px solid rgba(var(--pj-success-rgb), .25);
    color: #047857;
}
[data-bs-theme="dark"] .pj-hash { color: #6ee7b7; }
.pj-code-block {
    font-family: var(--pj-mono); font-size: .8rem; white-space: pre-wrap; line-height: 1.7;
    padding: 16px; border-radius: 12px; max-height: 420px; overflow: auto;
    background: var(--pj-surface-2); border: 1px solid var(--pj-border); color: var(--pj-text-2);
}
.pj-narrative {
    font-size: .95rem; line-height: 1.85; text-align: justify; color: var(--pj-text);
    padding: 20px 22px; border-radius: var(--pj-radius);
    background: var(--pj-surface-2); border: 1px solid var(--pj-border);
    position: relative;
}
.pj-narrative::before {
    content: '\201C'; position: absolute; top: -8px; left: 14px;
    font-size: 4rem; line-height: 1; color: rgba(var(--pj-primary-rgb), .18); font-family: Georgia, serif;
}

/* ---------- Dropdown / Modal / Pagination ---------- */
.dropdown-menu {
    --bs-dropdown-bg: var(--pj-surface); --bs-dropdown-border-color: var(--pj-border);
    --bs-dropdown-link-color: var(--pj-text-2); --bs-dropdown-link-hover-bg: var(--pj-surface-2);
    --bs-dropdown-link-hover-color: var(--pj-text); --bs-dropdown-link-active-bg: rgba(var(--pj-primary-rgb), .1);
    --bs-dropdown-link-active-color: var(--pj-primary);
    border-radius: 16px; padding: 8px; box-shadow: var(--pj-shadow-lg); border: 1px solid var(--pj-border);
    animation: pjPop .2s var(--pj-ease);
    min-width: 230px;
}
.dropdown-item { border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: .875rem; display: flex; align-items: center; gap: 10px; }
.dropdown-item i { width: 18px; text-align: center; opacity: .8; }
.dropdown-divider { border-color: var(--pj-border); margin: 6px 0; }
.dropdown-toggle::after { display: none; }

.modal-content { background: var(--pj-surface); border: 1px solid var(--pj-border) !important; border-radius: var(--pj-radius-lg); box-shadow: var(--pj-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--pj-border) !important; }
.modal-backdrop.show { opacity: .5; backdrop-filter: blur(3px); }
@media (max-width: 575.98px) {
    .modal-sheet .modal-dialog { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; max-width: none; transform: translateY(100%) !important; transition: transform .35s var(--pj-ease) !important; }
    .modal-sheet.show .modal-dialog { transform: none !important; }
    .modal-sheet .modal-content { border-radius: 26px 26px 0 0; padding-bottom: var(--pj-safe-bottom); }
    .modal-sheet .modal-content::before { content: ''; width: 42px; height: 5px; border-radius: 9px; background: var(--pj-border); margin: 10px auto 0; }
}
.pj-action-tile {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; border-radius: 16px; color: var(--pj-text);
    border: 1px solid var(--pj-border); background: var(--pj-surface);
    transition: all .2s var(--pj-ease);
}
.pj-action-tile:hover { border-color: rgba(var(--pj-primary-rgb), .4); background: var(--pj-surface-2); color: var(--pj-text); transform: translateY(-2px); }

.pagination { --bs-pagination-bg: var(--pj-surface); --bs-pagination-border-color: var(--pj-border); --bs-pagination-color: var(--pj-text-2); --bs-pagination-hover-bg: var(--pj-surface-2); --bs-pagination-hover-color: var(--pj-primary); --bs-pagination-hover-border-color: var(--pj-border); --bs-pagination-active-bg: var(--pj-primary); --bs-pagination-active-border-color: var(--pj-primary); --bs-pagination-disabled-bg: var(--pj-surface); --bs-pagination-disabled-border-color: var(--pj-border); --bs-pagination-focus-box-shadow: var(--pj-ring); gap: 4px; flex-wrap: wrap; margin: 0; }
.page-link { border-radius: 10px !important; font-weight: 650; font-size: .85rem; min-width: 38px; text-align: center; }
nav[role=navigation] .small.text-muted, nav .small.text-muted { font-size: .8rem; }
.pj-pagination { padding: 14px 20px; border-top: 1px solid var(--pj-border); }
.pj-pagination nav > div.d-sm-none { display: none !important; }
.pj-pagination nav > div.d-none { display: flex !important; flex-direction: column; gap: 10px; align-items: center; }
@media (min-width: 576px) { .pj-pagination nav > div.d-none { flex-direction: row; justify-content: space-between; } }
.pj-pagination p { margin: 0; }

/* Filters bar */
.pj-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pj-filter-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pj-filter-chips::-webkit-scrollbar { display: none; }
.pj-filter-chip {
    padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: .8rem; white-space: nowrap;
    background: var(--pj-surface); border: 1px solid var(--pj-border); color: var(--pj-muted);
    transition: all .2s var(--pj-ease);
}
.pj-filter-chip:hover { color: var(--pj-text); border-color: #cfd5e4; }
.pj-filter-chip.active { background: var(--pj-text); color: var(--pj-surface); border-color: var(--pj-text); }

/* Lightbox */
.pj-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(2,6,23,.92); display: none; align-items: center; justify-content: center; padding: 20px; animation: pjPop .25s var(--pj-ease); }
.pj-lightbox.show { display: flex; }
.pj-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; box-shadow: var(--pj-shadow-lg); }
.pj-lightbox .pj-lb-close { position: absolute; top: 16px; right: 16px; }

/* Upload progress overlay */
.pj-upload-overlay {
    position: fixed; inset: 0; z-index: 2100; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(2, 6, 23, .55); backdrop-filter: blur(6px);
}
.pj-upload-overlay.show { display: flex; animation: pjPop .25s var(--pj-ease); }
.pj-upload-box { width: min(420px, 100%); background: var(--pj-surface); border-radius: var(--pj-radius-lg); padding: 26px; text-align: center; box-shadow: var(--pj-shadow-lg); }
.pj-upload-box .pj-progress { height: 10px; margin: 16px 0 8px; }

/* ---------- Auth ---------- */
.pj-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--pj-bg); }
.pj-auth-visual {
    position: relative; overflow: hidden; color: #fff; padding: 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(1200px 600px at -10% -10%, #6366f1 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #06b6d4 0%, transparent 55%), #1e1b4b;
}
.pj-auth-visual .grid-bg {
    position: absolute; inset: 0; opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.pj-auth-visual > * { position: relative; }
.pj-auth-feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.pj-auth-feature .pj-ico { background: rgba(255,255,255,.14); color: #fff; }
.pj-auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.pj-auth-card { width: 100%; max-width: 420px; animation: pjFadeUp .6s var(--pj-ease) both; }
@media (max-width: 991.98px) {
    .pj-auth { grid-template-columns: 1fr; }
    .pj-auth-visual { display: none; }
    .pj-auth-form { background: radial-gradient(700px 400px at 0% 0%, rgba(99,102,241,.18), transparent 60%), radial-gradient(600px 400px at 100% 100%, rgba(6,182,212,.14), transparent 60%); align-items: flex-start; padding-top: max(48px, 10vh); }
}

/* ---------- Responsive shell ---------- */
@media (max-width: 991.98px) {
    .pj-sidebar { transform: translateX(-102%); box-shadow: var(--pj-shadow-lg); width: min(300px, 86vw); }
    .pj-sidebar.show { transform: none; }
    .pj-main { margin-left: 0; }
    .pj-topbar { padding: 0 16px; }
    .pj-content { padding: 18px 16px calc(var(--pj-bottomnav-h) + 36px + var(--pj-safe-bottom)); }
    .pj-bottomnav { display: block; }
    .pj-search { display: none; }
}
@media (min-width: 992px) { .pj-only-mobile { display: none !important; } }
@media (max-width: 991.98px) { .pj-only-desktop { display: none !important; } }
@media (max-width: 575.98px) {
    .card-body { padding: 16px; }
    .card-header { padding: 14px 16px; }
    .pj-list-item { padding: 12px 16px; }
    .pj-hero { padding: 20px; border-radius: 20px; }
    .pj-page-head { margin-bottom: 16px; }
    .pj-actions { width: 100%; }
    .pj-actions > .btn, .pj-actions > form { flex: 1 1 auto; }
    .pj-actions > form > .btn { width: 100%; }
    .pj-sticky-actions { padding: 12px 16px; bottom: calc(var(--pj-bottomnav-h) + var(--pj-safe-bottom)); border-radius: 0; margin: 0 -1px; }
    .pj-sticky-actions .btn { flex: 1; }
    .pj-form-section { padding: 16px; }
    .row.g-4 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
}

/* ---------- Print ---------- */
@media print {
    .pj-sidebar, .pj-topbar, .pj-bottomnav, .pj-backdrop, .no-print, .pj-actions, .pj-tabs { display: none !important; }
    .pj-main { margin: 0 !important; }
    .pj-content { padding: 0 !important; max-width: none; animation: none; }
    .card, .pj-tl-card { box-shadow: none !important; break-inside: avoid; }
    .pj-tl-day { position: static; }
    body { background: #fff !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Normalisasi header kartu lama (pt-*/pb-* utilitas) */
.card-header[class*="pt-"], .card-header[class*="pb-"] { padding: 16px 20px !important; }
.card-header h5.text-primary, .card-header h6.text-primary { color: var(--pj-text) !important; font-size: 1rem; }
.card-header h5 > i, .card-header h6 > i { color: var(--pj-primary); }

/* ---------- PJ Dialog & Toast (pengganti SweetAlert2) ---------- */
.pj-dialog-backdrop {
    position: fixed; inset: 0; z-index: 2200; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(2, 6, 23, .5); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s;
}
.pj-dialog-backdrop.show { opacity: 1; }
.pj-dialog {
    width: min(440px, 100%); background: var(--pj-surface); color: var(--pj-text);
    border: 1px solid var(--pj-border); border-radius: 24px; padding: 28px 24px 20px; text-align: center;
    box-shadow: var(--pj-shadow-lg); transform: translateY(12px) scale(.97); transition: transform .3s var(--pj-ease);
}
.pj-dialog-backdrop.show .pj-dialog { transform: none; }
.pj-dialog-icon { width: 64px; height: 64px; border-radius: 20px; font-size: 1.7rem; margin: 0 auto 14px; }
.pj-dialog-loading { font-size: 2.2rem; color: var(--pj-primary); margin-bottom: 12px; }
.pj-dialog-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; }
.pj-dialog-body { color: var(--pj-text-2); font-size: .9rem; margin-bottom: 20px; word-break: break-word; }
.pj-dialog-actions { display: flex; gap: 10px; }
.pj-dialog-actions .btn { flex: 1; }
body.pj-dialog-open { overflow: hidden; }
@media (max-width: 575.98px) {
    .pj-dialog-backdrop { align-items: flex-end; padding: 0; }
    .pj-dialog { width: 100%; border-radius: 26px 26px 0 0; padding-bottom: calc(20px + var(--pj-safe-bottom)); transform: translateY(100%); }
}

.pj-toast-root {
    position: fixed; top: 16px; right: 16px; z-index: 2300; display: flex; flex-direction: column; gap: 10px;
    width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
@media (max-width: 767.98px) { .pj-toast-root { left: 50%; right: auto; transform: translateX(-50%); top: calc(10px + env(safe-area-inset-top, 0px)); } }
.pj-toast {
    position: relative; overflow: hidden; pointer-events: auto;
    display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px;
    background: var(--pj-surface); color: var(--pj-text); border: 1px solid var(--pj-border);
    border-radius: 16px; box-shadow: var(--pj-shadow-lg);
    animation: pjToastIn .35s var(--pj-ease) both;
}
.pj-toast.out { animation: pjToastOut .25s ease both; }
.pj-toast .pj-ico { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
.pj-toast-text { flex: 1; font-weight: 650; font-size: .86rem; line-height: 1.4; }
.pj-toast-x { border: 0; background: transparent; color: var(--pj-muted); padding: 4px 6px; border-radius: 8px; }
.pj-toast-x:hover { background: var(--pj-surface-3); }
.pj-toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--pj-gradient); transform-origin: left; animation: pjToastBar linear forwards; }
@keyframes pjToastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pjToastOut { to { opacity: 0; transform: translateY(-8px) scale(.96); } }
@keyframes pjToastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.pj-tabs { flex-wrap: nowrap; }
.pj-tabs .nav-item { flex: 1 0 auto; }
@media (max-width: 575.98px) {
    .pj-tabs .nav-link, .pj-tabs a.pj-tab { padding: 9px 12px; font-size: .8rem; gap: 6px; }
    .pj-callout.flex-wrap > .flex-grow-1 { flex-basis: calc(100% - 40px); }
}
#pjPhoto { transition: opacity .25s; }

/* ---------- Status switch (ubah status dari daftar) ---------- */
.pj-list-item.is-link { position: relative; transition: background-color .15s; }
.pj-list-item.is-link:hover { background: var(--pj-surface-2); }
.pj-list-item.is-link:hover .pj-chev { transform: translateX(3px); opacity: 1; color: var(--pj-primary); }
.pj-li-actions { position: relative; z-index: 2; }
.pj-status-btn { border: 0; cursor: pointer; transition: filter .2s, transform .15s var(--pj-ease), box-shadow .2s; }
.pj-status-btn:hover { filter: brightness(.96); box-shadow: 0 0 0 3px rgba(var(--pj-primary-rgb), .12); }
.pj-status-btn:active { transform: scale(.95); }
.pj-status-btn .fa-chevron-down { font-size: .6rem; opacity: .7; margin-left: 2px; transition: transform .2s; }
.pj-status-btn[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.pj-status-switch .dropdown-menu { min-width: 270px; }
.pj-status-switch .dropdown-item { align-items: center; white-space: normal; }
.pj-status-switch .dropdown-item.active, .pj-status-switch .dropdown-item:disabled { background: var(--pj-surface-2); color: var(--pj-text); opacity: 1; }
.pj-status-ico { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: inline-grid; place-items: center; font-size: .8rem; }
.pj-status-ico.draft { background: rgba(var(--pj-warning-rgb), .14); color: #b45309; }
.pj-status-ico.active { background: rgba(var(--pj-info-rgb), .13); color: #0284c7; }
.pj-status-ico.completed { background: rgba(var(--pj-success-rgb), .14); color: #059669; }
.pj-status-switch .dropdown-header { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
@media (max-width: 575.98px) { .pj-status-switch .dropdown-menu { min-width: 250px; } }
.pj-li-actions.is-open, .pj-li-actions:has(.dropdown-menu.show) { z-index: 30; }
.pj-list-item.is-link:has(.dropdown-menu.show) { z-index: 30; }

/* ---------- Ketik dengan suara (tombol mikrofon di textarea) ---------- */
.pj-voice-wrap { position: relative; border-radius: 12px; }
.pj-voice-wrap > textarea.form-control { padding-bottom: 3.1rem; }
.pj-voice-bar {
    position: absolute; left: 10px; right: 10px; bottom: 8px;
    display: flex; align-items: center; justify-content: flex-end; gap: 10px; pointer-events: none;
}
.pj-voice-preview {
    flex: 1; min-width: 0; font-size: .78rem; color: var(--pj-muted); font-style: italic;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.pj-voice-btn {
    pointer-events: auto; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 14px 0 12px; border-radius: 99px; border: 0;
    background: rgba(var(--pj-primary-rgb), .1); color: var(--pj-primary);
    font-weight: 700; font-size: .8rem; font-family: inherit;
    transition: background-color .2s, color .2s, transform .15s var(--pj-ease), box-shadow .2s;
}
.pj-voice-btn:hover { background: rgba(var(--pj-primary-rgb), .18); }
.pj-voice-btn:active { transform: scale(.94); }
.pj-voice-btn.is-listening {
    background: var(--pj-danger); color: #fff;
    animation: pjVoicePulse 1.4s ease-out infinite;
}
.pj-voice-btn.is-unsupported { opacity: .55; }
.pj-voice-wrap.is-listening > textarea.form-control { border-color: var(--pj-danger) !important; box-shadow: 0 0 0 4px rgba(var(--pj-danger-rgb), .12) !important; }
@keyframes pjVoicePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@media (max-width: 575.98px) {
    .pj-voice-btn { height: 38px; padding: 0 16px 0 14px; font-size: .85rem; }
}
