/* ============================================================
   SPMI — app.css
   Design: Refined Professional with subtle depth & motion
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
    --primary:        #2563eb;
    --primary-dark:   #1d4ed8;
    --primary-light:  #eff6ff;
    --primary-glow:   rgba(37,99,235,0.18);
    --secondary:      #64748b;
    --success:        #16a34a;
    --warning:        #d97706;
    --danger:         #dc2626;
    --info:           #0891b2;
    --purple:         #7c3aed;

    --bg:             #f8fafc;
    --bg-card:        #ffffff;
    --bg-sidebar:     #0f172a;
    --sidebar-width:  260px;
    --topbar-h:       60px;

    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;

    --radius:         12px;
    --radius-lg:      18px;
    --radius-xl:      24px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow:         0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 40px rgba(0,0,0,.12);
    --shadow-primary: 0 6px 24px rgba(37,99,235,.35);

    --font-body:      'Plus Jakarta Sans', sans-serif;
    --font-display:   'Instrument Serif', serif;

    --transition:     all 0.22s cubic-bezier(.4,0,.2,1);
    --transition-lg:  all 0.38s cubic-bezier(.4,0,.2,1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

em { font-family: var(--font-display); font-style: italic; color: var(--primary); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
@keyframes pulse-glow {
    0%,100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50%      { box-shadow: 0 0 0 12px transparent; }
}
@keyframes barGrow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}
@keyframes spinIn {
    from { transform: rotate(-90deg) scale(.5); opacity: 0; }
    to   { transform: rotate(0) scale(1);   opacity: 1; }
}

.animate-fade-up {
    animation: fadeUp .6s ease both;
    animation-delay: var(--delay, 0s);
}
.animate-fade-left {
    animation: fadeLeft .7s ease both;
    animation-delay: var(--delay, 0s);
}

/* ---------- BRAND ICON ---------- */
.brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
}
.brand-icon-sm { width: 30px; height: 30px; font-size: 0.9rem; border-radius: 8px; }
.brand-icon-lg { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; }

.brand-text { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.brand-sup  { font-size: .55em; vertical-align: super; font-weight: 400; color: var(--text-muted); }

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* --- Navbar --- */
.landing-nav {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 0;
    transition: var(--transition);
}
.landing-nav.scrolled {
    box-shadow: var(--shadow);
}
.landing-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: .4rem .85rem;
    border-radius: 8px;
    transition: var(--transition);
}
.landing-nav .nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    padding-top: var(--topbar-h);
    background: linear-gradient(135deg, #f0f7ff 0%, #fafbff 40%, #f5f3ff 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .45;
}
.shape-1 { width: 500px; height: 500px; background: rgba(37,99,235,.12); top:-100px; right:-100px; }
.shape-2 { width: 350px; height: 350px; background: rgba(124,58,237,.1);  bottom:0; left:-80px; }
.shape-3 { width: 200px; height: 200px; background: rgba(14,165,233,.12); top:40%;  left:30%; }
.shape-4 { width: 150px; height: 150px; background: rgba(245,158,11,.1);  top:20%;  right:30%; }

.hero-badge {
    display: inline-flex; align-items: center;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(37,99,235,.2);
    padding: .35rem .9rem;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.5rem; }

.shadow-primary { box-shadow: var(--shadow-primary) !important; }

.hero-stats {
    display: flex; align-items: center; gap: 1.5rem;
}
.stat-item { text-align: center; }
.stat-number {
    display: block; font-size: 1.8rem; font-weight: 800;
    color: var(--primary); line-height: 1;
}
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* --- Dashboard Preview Card --- */
.dashboard-preview {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: float 5s ease-in-out infinite;
    max-width: 480px;
    margin: auto;
    border: 1px solid var(--border);
}
.preview-header {
    background: var(--bg-sidebar);
    padding: .75rem 1rem;
    display: flex; align-items: center; gap: .75rem;
}
.preview-dots { display: flex; gap: .35rem; }
.preview-dots span {
    width: 10px; height: 10px; border-radius: 50%;
    background: #374151;
}
.preview-dots span:nth-child(1){ background: #ef4444; }
.preview-dots span:nth-child(2){ background: #f59e0b; }
.preview-dots span:nth-child(3){ background: #22c55e; }
.preview-title { color: #9ca3af; font-size: .78rem; font-weight: 500; }

.preview-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

.preview-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.preview-card {
    border-radius: var(--radius);
    padding: .875rem 1rem;
    display: flex; align-items: center; gap: .75rem;
}
.preview-card.green { background: #f0fdf4; }
.preview-card.blue  { background: #eff6ff; }
.prev-icon { font-size: 1.4rem; }
.preview-card.green .prev-icon { color: var(--success); }
.preview-card.blue  .prev-icon { color: var(--primary); }
.prev-num  { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.prev-lbl  { font-size: .72rem; color: var(--text-muted); }

.preview-chart-area {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem;
}
.chart-bars {
    display: flex; align-items: flex-end; gap: .5rem; height: 80px;
    margin-bottom: .5rem;
}
.bar {
    flex: 1; background: linear-gradient(to top, var(--primary), #60a5fa);
    border-radius: 5px 5px 0 0;
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 4px;
    transform-origin: bottom;
    animation: barGrow .9s ease both;
}
.bar:nth-child(2){ animation-delay: .1s; }
.bar:nth-child(3){ animation-delay: .2s; background: linear-gradient(to top,#059669,#34d399); }
.bar:nth-child(4){ animation-delay: .3s; }
.bar:nth-child(5){ animation-delay: .4s; background: linear-gradient(to top,#7c3aed,#a78bfa); }
.bar span { font-size: .65rem; font-weight: 700; color: #fff; }
.chart-label { font-size: .72rem; color: var(--text-muted); text-align: center; }

.preview-list { display: flex; flex-direction: column; gap: .5rem; }
.prev-list-item {
    font-size: .78rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: .5rem;
    padding: .4rem .6rem;
    background: var(--bg);
    border-radius: 8px;
}

/* --- Features Section --- */
.features-section { background: #fff; }

.section-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: .3rem .9rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    transition: var(--transition-lg);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    background: #fff;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.feature-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.feature-desc { font-size: .875rem; color: var(--text-secondary); margin: 0; }

.text-purple { color: var(--purple) !important; }

/* --- PPEPP Section --- */
.ppepp-section { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); color: #fff; }
.ppepp-section .section-tag { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.ppepp-section .section-title { color: #fff; }
.ppepp-section em { color: #60a5fa; }

.ppepp-timeline {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .5rem;
}
.ppepp-item {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    gap: 1rem;
    padding: 1.5rem 1rem;
}
.ppepp-letter {
    width: 60px; height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 900;
    box-shadow: 0 0 0 6px rgba(37,99,235,.25);
    flex-shrink: 0;
    font-family: var(--font-display);
    font-style: italic;
}
.ppepp-name { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .25rem; }
.ppepp-desc { font-size: .8rem; color: rgba(255,255,255,.6); line-height: 1.5; margin: 0; }
.ppepp-arrow {
    position: absolute; right: -12px; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.3); font-size: 1.2rem;
    z-index: 2;
}

/* --- Footer --- */
.landing-footer {
    background: #fff;
    border-top: 1px solid var(--border);
}

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.login-modal-content {
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.login-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
}
@media (max-width: 768px) {
    .login-layout { grid-template-columns: 1fr; }
}

.login-panel-left {
    background: linear-gradient(145deg, #1e40af 0%, #1d4ed8 40%, #7c3aed 100%);
    padding: 2.5rem 2rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 380px;
}
.login-brand { position: relative; z-index: 2; }
.login-panel-left h3 { font-weight: 800; font-size: 1.6rem; }

.login-decor-shapes { position: absolute; inset: 0; pointer-events: none; }
.decor-circle {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.decor-circle.c1 { width: 200px; height: 200px; bottom: -50px; right: -50px; }
.decor-circle.c2 { width: 120px; height: 120px; top: -30px; left: -30px; }
.decor-circle.c3 { width: 80px; height: 80px; top: 40%; right: 20%; }

.login-panel-right {
    padding: 2.5rem;
    position: relative;
    background: #fff;
}
.login-title    { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: .35rem; }
.login-subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.75rem; }

.input-group-modern .input-group-text {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-muted);
    border-right: none;
}
.input-group-modern .form-control {
    border-left: none;
    border-color: var(--border);
    background: var(--bg);
    padding: .6rem .9rem;
    transition: var(--transition);
}
.input-group-modern .form-control:focus {
    border-color: var(--primary);
    box-shadow: none;
    background: #fff;
}
.input-group-modern .form-control:focus + * {
    border-color: var(--primary);
}
.input-group-modern:focus-within .input-group-text {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-login {
    font-weight: 600;
    letter-spacing: .02em;
    transition: var(--transition);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: var(--shadow-primary); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
    height: 100vh;
    overflow: hidden;
}

/* --- Sidebar --- */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition-lg);
    z-index: 1040;
    position: absolute;
    height: 100vh;
}

.sidebar-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-header .brand-icon { box-shadow: 0 4px 12px rgba(37,99,235,.5); }

.sidebar-user {
    padding: 1.1rem 1.25rem;
    display: flex; align-items: center; gap: .875rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; color: #fff;
    flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: rgba(255,255,255,.45); text-transform: capitalize; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: .75rem .75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* Menu items (dibangun dinamis via JS) */
.nav-group-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    padding: .75rem .5rem .35rem;
    font-weight: 600;
}
.sidebar-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .875rem;
    border-radius: 10px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
}
.sidebar-link i { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.sidebar-link.active {
    background: rgba(37,99,235,.35);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--primary);
}

/* Skeleton loader */
.nav-skeleton { padding: .5rem; }
.skeleton-line {
    height: 36px;
    background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: .5rem;
    width: 100%;
}
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }

.sidebar-footer {
    padding: 1rem .75rem;
    border-top: 1px solid rgba(255,255,255,.07);
}
.btn-sidebar-logout {
    color: rgba(255,255,255,.5);
    font-size: .875rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: .55rem 1rem;
    transition: var(--transition);
    text-align: left;
}
.btn-sidebar-logout:hover {
    background: rgba(220,38,38,.15);
    border-color: rgba(220,38,38,.3);
    color: #fca5a5;
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1039;
    backdrop-filter: blur(2px);
}

/* --- Main Area --- */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    margin-left: 255px;
    height: 100vh;           /* Penting */
}

/* --- Topbar --- */
.app-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
    flex-shrink: 0;
    position: sticky; top: 0; z-index: 100;
}
.topbar-left, .topbar-right {
    display: flex; align-items: center; gap: .5rem;
}

.btn-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }

.topbar-user {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .3rem .65rem;
    height: auto;
    width: auto;
    background: transparent;
    color: var(--text-primary);
    transition: var(--transition);
}
.topbar-user:hover { background: var(--bg); border-color: var(--primary); }

.topbar-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff; font-size: .75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.notif-badge {
    position: absolute; top: 4px; right: 4px;
    width: 16px; height: 16px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: .6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

.notif-dropdown {
    width: 320px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.notif-header { background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.notif-list { max-height: 340px; overflow-y: auto; }

.notif-item {
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex; gap: .75rem;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-item:last-child { border-bottom: none; }
.notif-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0; margin-top: 5px;
}
.notif-item.unread .notif-dot { animation: pulse-glow 2s infinite; }
.notif-item-title { font-size: .83rem; font-weight: 600; margin-bottom: 2px; }
.notif-item-msg   { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.notif-item-time  { font-size: .72rem; color: var(--text-muted); }

/* --- App Content --- */
.app-content {
    /*flex: 1;overflow-y: auto;position: absolute;margin-top: 60px;*/
    padding: 1.75rem;
    background: var(--bg);
    flex: 1 1 auto;          /* Mengambil sisa ruang */
    overflow-y: auto !important;
    overflow-x: hidden;
    min-height: 0;
}
/* Scrollbar yang lebih bersih (opsional, modern look) */
.app-content::-webkit-scrollbar {
    width: 6px;
}
.app-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}
.app-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* ============================================================
   DASHBOARD COMPONENTS — Responsive Bootstrap 12-col Grid
   ============================================================ */

/* ── Page Header ─────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-title  {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800; letter-spacing: -.03em; margin-bottom: .2rem;
}
.page-subtitle { color: var(--text-muted); font-size: .88rem; }

/* ── Content Card (shared) ───────────────────────────────── */
.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);max-width: 100%;
    overflow: hidden;
    animation: fadeUp .45s ease both;
    animation-delay: var(--delay, 0s);
    transition: var(--transition-lg);
}
.content-card:hover { box-shadow: var(--shadow); }

.card-header-custom {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: #fff;
    gap: .5rem;
}
.card-title-custom { font-size: .95rem; font-weight: 700; margin: 0; }
.card-body-custom  { padding: 1.25rem; }

/* Dot dekorasi header kartu */
.ch-dot {
    width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0;
}

/* ── Ghost button ────────────────────────────────────────── */
.btn-ghost-primary {
    color: var(--primary);
    background: transparent;
    border: 1px solid transparent;
    font-weight: 600; font-size: .8rem;
    transition: var(--transition);
}
.btn-ghost-primary:hover {
    background: var(--primary-light);
    border-color: rgba(37,99,235,.15);
    color: var(--primary-dark);
}

/* ── Audit Table ─────────────────────────────────────────── */
.audit-table { font-size: .845rem; }
.audit-table th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-muted); font-weight: 700;
    background: var(--bg);
    border-bottom: 1px solid var(--border) !important;
    padding: .6rem 1rem; white-space: nowrap;
}
.audit-table td {
    padding: .7rem 1rem; vertical-align: middle;
    border-color: var(--border-light);
}
.audit-table tbody tr:last-child td { border-bottom: none; }
.audit-row { transition: var(--transition); }
.audit-row:hover td { background: var(--bg); }

/* Ikon jenis audit */
.audit-jenis-dot {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; flex-shrink: 0;
}

/* Mini avatar auditor */
.mini-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Badge status */
.badge-status {
    display: inline-flex; align-items: center;
    font-size: .7rem; font-weight: 700;
    padding: .28rem .65rem;
    border-radius: 50px; letter-spacing: .02em;
    white-space: nowrap;
}
.badge-dijadwalkan { background: #eff6ff; color: var(--primary); }
.badge-berlangsung { background: #fef9c3; color: #854d0e; }
.badge-selesai     { background: #f0fdf4; color: var(--success); }
.badge-ditangguhkan{ background: #fef2f2; color: var(--danger); }

/* ── Welcome Banner ──────────────────────────────────────── */
.welcome-card {
    background: linear-gradient(130deg, #1e3a8a 0%, #1d4ed8 45%, #6d28d9 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    position: relative; overflow: hidden;
    border: none;
    animation: fadeUp .45s ease both;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    min-height: 110px;
}

.welcome-body    { position: relative; z-index: 2; min-width: 0; flex: 1; }
.welcome-greeting{ font-size: .85rem; opacity: .75; font-weight: 500; }
.welcome-name    {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 800; letter-spacing: -.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.welcome-role-badge {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: .75rem; font-weight: 700;
    padding: .2rem .75rem; border-radius: 50px;
    letter-spacing: .04em; backdrop-filter: blur(4px);
}
.welcome-side { position: relative; z-index: 2; flex-shrink: 0; }

.welcome-date-box .wd-day  {
    font-size: .75rem; opacity: .65; text-align: right;
    font-weight: 600; letter-spacing: .03em;
}
.welcome-date-box .wd-date {
    font-size: .88rem; font-weight: 700; text-align: right;
    white-space: nowrap;
}

/* Dekorasi lingkaran */
.welcome-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.wd-circle {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.wd-c1 { width: 220px; height: 220px; right: -60px; top: -70px; }
.wd-c2 { width: 130px; height: 130px; right: 120px; bottom: -60px; }
.wd-c3 { width:  70px; height:  70px; left: 40%; top: -20px; }

/* ── Stat Cards v2 ───────────────────────────────────────── */
.stat-card-v2 {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.15rem 1rem;
    position: relative; overflow: hidden;
    cursor: pointer;
    transition: var(--transition-lg);
    animation: fadeUp .45s ease both;
    animation-delay: var(--delay, 0s);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.stat-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.stat-card-v2:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Icon */
.sc-icon {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
    transition: var(--transition);
}
.sc-blue   { background: var(--primary-light); color: var(--primary); }
.sc-amber  { background: #fffbeb; color: var(--warning); }
.sc-green  { background: #f0fdf4; color: var(--success); }
.sc-red    { background: #fef2f2; color: var(--danger); }
.stat-card-v2:hover .sc-icon { transform: scale(1.1); }

/* Arrow */
.sc-arrow {
    color: var(--text-muted);
    font-size: .85rem;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: var(--transition);
}
.stat-card-v2:hover .sc-arrow {
    opacity: 1; transform: translate(0,0);
}

/* Nilai */
.sc-value {
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 900; line-height: 1; letter-spacing: -.04em;
    margin-top: .6rem; margin-bottom: .2rem;
    color: var(--text-primary);
}

/* Label */
.sc-label {
    font-size: .78rem; font-weight: 600;
    color: var(--text-secondary); line-height: 1.3;
}

/* Trend */
.sc-trend {
    font-size: .72rem; color: var(--text-muted);
    margin-top: .25rem;
}

/* Aksen bawah (garis warna per card) */
.sc-accent {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0; transition: var(--transition);
}
.stat-card-v2:hover .sc-accent { opacity: 1; }
.sc-accent-blue   { background: var(--primary); }
.sc-accent-amber  { background: var(--warning); }
.sc-accent-green  { background: var(--success); }
.sc-accent-red    { background: var(--danger);  }

/* ── PPEPP Progress Rows ─────────────────────────────────── */
.ppepp-row {
    display: flex; align-items: center; gap: .75rem;
    animation: fadeUp .4s ease both;
    animation-delay: var(--delay, 0s);
}
.ppepp-row-badge {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-style: italic;
    font-size: 1rem; font-weight: 700;
    flex-shrink: 0;
}

/* ── Quick Action Cards ──────────────────────────────────── */
.qa-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .6rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem .75rem;
    cursor: pointer;
    transition: var(--transition-lg);
    text-align: center;
    animation: fadeUp .4s ease both;
    animation-delay: var(--delay, 0s);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.qa-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.qa-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.qa-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    transition: var(--transition);
}
.qa-card:hover .qa-icon { transform: scale(1.12); }

.qa-label {
    font-size: .75rem; font-weight: 700;
    color: var(--text-secondary); line-height: 1.3;
}

/* Quick action icon colors */
.qa-primary   { background: var(--primary-light); color: var(--primary);  }
.qa-success   { background: #f0fdf4; color: var(--success); }
.qa-warning   { background: #fffbeb; color: var(--warning); }
.qa-info      { background: #ecfeff; color: var(--info);    }
.qa-purple    { background: #f5f3ff; color: var(--purple);  }
.qa-secondary { background: #f8fafc; color: var(--secondary);}

/* ── Siklus Card (pages-mutu.js) ─────────────────────────── */
.siklus-card { transition: var(--transition-lg); }
.siklus-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }

.ppepp-mini {
    display: flex; gap: 2px;
}
.ppepp-mini-item {
    flex: 1; text-align: center;
    padding: .35rem .2rem;
    border-radius: 6px;
    background: var(--bg);
    transition: var(--transition);
}
.ppepp-mini-item.done {
    background: var(--primary-light);
}
.ppepp-mini-letter {
    font-family: var(--font-display); font-style: italic;
    font-size: .85rem; font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
}
.ppepp-mini-item.done .ppepp-mini-letter { color: var(--primary); }
.ppepp-mini-name {
    font-size: .58rem; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Info group (profil) ─────────────────────────────────── */
.info-group { background: var(--bg); border-radius: 10px; padding: .75rem 1rem; }
.info-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.info-value { font-weight: 600; font-size: .9rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-overlay.active { display: block; }
    .app-main{margin-left: 0px;}
}

@media (max-width: 767.98px) {
    /* Welcome card stack di mobile */
    .welcome-card { flex-direction: column; align-items: flex-start; min-height: auto; }
    .welcome-side { width: 100%; }
    .welcome-date-box .wd-day,
    .welcome-date-box .wd-date { text-align: left; }

    /* Padding lebih kecil di tablet */
    .app-content        { padding: 1.25rem; }
    .card-header-custom { padding: .875rem 1rem; }
    .card-body-custom   { padding: 1rem; }
    .audit-table th,
    .audit-table td     { padding: .6rem .75rem; }
    .app-main{margin-left: 0px;}
}

@media (max-width: 575.98px) {
    /* xs: padding minimal */
    .app-content   { padding: .875rem; }
    .welcome-card  { padding: 1.1rem 1.25rem; }
    .stat-card-v2  { padding: .9rem 1rem .85rem; }
    .sc-value      { font-size: 1.5rem; }
    .qa-card       { padding: .875rem .5rem; }
    .qa-icon       { width: 38px; height: 38px; font-size: 1rem; }
    .qa-label      { font-size: .7rem; }

    /* Sembunyikan kolom tanggal di xs */
    .d-none-xs     { display: none !important; }

    /* Landing */
    .hero-stats  { gap: 1rem; }
    .stat-number { font-size: 1.4rem; }
    .app-main{margin-left: 0px;}
}