/* =========================================================================
   SOP PERUMDAM TIRTA KENCANA — tema aplikasi
   Warna mengikuti logo Perumdam (biru air, toska, hijau bumi).
   ========================================================================= */
:root {
    --app-primary: #2f80ed;
    --app-primary-dark: #1c63c7;
    --app-navy: #0f2a44;
    --app-accent: #22c1a4;
    --app-quick: #f2994a;
    --app-bg: #f3f6fa;
    --app-border: #dfe6ee;
    --app-sidebar: #e9eef4;
    --sidebar-w: 268px;
    --sidebar-w-collapsed: 84px;
    --bs-primary: #2f80ed;
    --bs-primary-rgb: 47, 128, 237;
    --bs-link-color: #1c63c7;
    --bs-link-color-rgb: 28, 99, 199;
    --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

body { background: var(--app-bg); font-size: .925rem; color: #1f2d3d; }

.btn-primary { --bs-btn-bg: var(--app-primary); --bs-btn-border-color: var(--app-primary); --bs-btn-hover-bg: var(--app-primary-dark); --bs-btn-hover-border-color: var(--app-primary-dark); --bs-btn-active-bg: var(--app-primary-dark); --bs-btn-active-border-color: var(--app-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--app-primary); --bs-btn-border-color: var(--app-primary); --bs-btn-hover-bg: var(--app-primary); --bs-btn-hover-border-color: var(--app-primary); --bs-btn-active-bg: var(--app-primary-dark); }
.text-primary { color: var(--app-primary) !important; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--app-primary); }

/* ---------- Kerangka ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--app-sidebar);
    border-right: 1px solid var(--app-border); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; transition: width .2s ease;
}
.app-sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: .7rem 1rem; background: var(--app-navy); min-height: 58px; }
.brand-logo { width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: #fff; display: grid; place-items: center; padding: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.25); overflow: hidden; }
.brand-logo img { width: auto; height: auto; max-width: 24px; max-height: 30px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; white-space: nowrap; }
.brand-name { color: #fff; font-weight: 800; letter-spacing: .02em; font-size: .92rem; }
.brand-sub { color: var(--app-accent); font-weight: 700; font-size: .66rem; letter-spacing: .14em; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: .5rem .75rem 1rem; }
.menu-label {
    width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0;
    padding: .7rem .25rem .45rem; font-size: .8rem; font-weight: 700; color: #33475b;
}
.menu-label .bi { font-size: .7rem; transition: transform .2s; }
.menu-label[aria-expanded="false"] .bi { transform: rotate(-90deg); }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
    position: relative; aspect-ratio: 1 / .92; border-radius: 9px; color: #fff; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.1; padding: 4px;
    box-shadow: 0 2px 4px rgba(15,42,68,.18); transition: transform .12s, box-shadow .12s, filter .12s;
}
.tile i { font-size: 1.35rem; }
.tile:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(15,42,68,.22); filter: brightness(1.06); }
.tile.active { outline: 3px solid #fff; box-shadow: 0 0 0 5px rgba(15,42,68,.35); filter: brightness(.88); }
.tile-blue { background: linear-gradient(145deg, #4da3ff, #2f6fd6); }
.tile-teal { background: linear-gradient(145deg, #2fd0b0, #139a8c); }
.tile-slate { background: linear-gradient(145deg, #5f6f82, #3f4b5a); }
.tile-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--app-quick); color: #fff; font-size: .7rem; display: grid; place-items: center; border: 2px solid var(--app-sidebar); }
.sidebar-toggle { border: 0; border-top: 1px solid var(--app-border); background: transparent; padding: .6rem; color: #4b5b6b; }
.sidebar-toggle:hover { background: #dde5ee; }
.sidebar-backdrop { display: none; }

/* Sidebar ciut (desktop) */
.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-collapsed); }
.sidebar-collapsed .brand-text, .sidebar-collapsed .menu-label span, .sidebar-collapsed .tile span:not(.tile-badge) { display: none; }
.sidebar-collapsed .app-sidebar .brand { justify-content: center; padding: .9rem .4rem; }
.sidebar-collapsed .tile-grid { grid-template-columns: 1fr; }
.sidebar-collapsed .tile { aspect-ratio: 1; }
.sidebar-collapsed .menu-label { justify-content: center; }
.sidebar-collapsed .sidebar-toggle .bi { transform: rotate(180deg); display: inline-block; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { background: #fff; border-bottom: 1px solid var(--app-border); padding: .55rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1010; }
.topbar-crumb { align-items: center; gap: .45rem; font-size: .85rem; color: #1f2d3d; font-weight: 600; }
.topbar-crumb a { color: #6c7a89; text-decoration: none; font-weight: 500; }
.topbar-crumb a:hover { color: var(--app-primary); }
.topbar-crumb .bi-chevron-right { font-size: .65rem; color: #9aa7b4; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.btn-quick { background: var(--app-quick); color: #fff; font-weight: 600; border-radius: 8px; height: 36px; }
.btn-quick:hover, .btn-quick:focus, .btn-quick.show { background: #e0822f; color: #fff; }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--app-quick); color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 4px; }
.notif-menu { width: 330px; max-height: 420px; overflow-y: auto; }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: .55rem; border: 0; padding: .2rem .4rem; }
.avatar { width: 36px; height: 36px; border-radius: 8px; background: #e3ebf5; color: #33475b; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.app-content { padding: 1.25rem 1.5rem; flex: 1; }
.app-footer { padding: .75rem 1.5rem; font-size: .75rem; color: #8a99a8; }

@media (max-width: 991.98px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1045; transform: translateX(-100%); transition: transform .2s; width: var(--sidebar-w) !important; }
    .app-sidebar.show { transform: none; }
    .app-sidebar.show + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,42,68,.4); z-index: 1040; }
    .sidebar-toggle { display: none; }
    .sidebar-collapsed .brand-text, .sidebar-collapsed .menu-label span, .sidebar-collapsed .tile span:not(.tile-badge) { display: initial; }
    .sidebar-collapsed .tile-grid { grid-template-columns: repeat(3, 1fr); }
    .app-content { padding: 1rem; }
    .app-topbar { padding: .5rem 1rem; }
}

/* ---------- Header halaman ---------- */
.page-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head-icon { width: 46px; height: 46px; border-radius: 10px; background: #e6f0fd; color: var(--app-primary); display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.page-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0; color: #172b3e; }
.page-sub { color: #5e6e7e; font-size: .86rem; }
.btn-soft { background: #fff; border: 1px solid var(--app-border); color: #33475b; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.btn-soft:hover { background: #f1f5f9; border-color: #c9d4df; }

/* ---------- Kartu & statistik ---------- */
.card { border: 1px solid var(--app-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,40,60,.04); }
.card-header { background: #fff; font-weight: 600; border-top-left-radius: 12px !important; border-top-right-radius: 12px !important; }
.panel { background: #fff; border: 1px solid var(--app-border); border-radius: 14px; padding: 1rem; }

.stat-tile {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 10px; border: 1.5px solid;
    text-decoration: none; height: 100%; transition: transform .12s, box-shadow .12s;
}
a.stat-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,40,60,.08); }
.stat-tile .stat-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-tile .stat-value { display: block; font-size: 1.85rem; font-weight: 700; line-height: 1.05; }
.stat-tile .stat-label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3b4b5c; }
.stat-tile .stat-hint { display: block; font-size: .75rem; color: #6c7a89; }
.stat-blue { background: #edf4fe; border-color: #3f8cf0; } .stat-blue .stat-icon { background: #d3e5fc; color: #1c63c7; } .stat-blue .stat-value { color: #1c63c7; }
.stat-orange { background: #fdf3ea; border-color: #f0a35e; } .stat-orange .stat-icon { background: #fbe1c8; color: #c96a18; } .stat-orange .stat-value { color: #c96a18; }
.stat-red { background: #fdeeee; border-color: #ec7a7a; } .stat-red .stat-icon { background: #f9d3d3; color: #c53030; } .stat-red .stat-value { color: #c53030; }
.stat-green { background: #ebf8f1; border-color: #54c08a; } .stat-green .stat-icon { background: #ccefdc; color: #1e8a54; } .stat-green .stat-value { color: #1e8a54; }
.stat-teal { background: #e8f8f6; border-color: #3fc4b0; } .stat-teal .stat-icon { background: #c8efe9; color: #148a7c; } .stat-teal .stat-value { color: #148a7c; }
.stat-slate { background: #f1f4f7; border-color: #9aa7b4; } .stat-slate .stat-icon { background: #dde3ea; color: #3f4b5a; } .stat-slate .stat-value { color: #3f4b5a; }

.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7b; background: #f6f9fc; white-space: nowrap; }
.doc-number { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.empty-state { text-align: center; color: #8a99a8; padding: 2.5rem 1rem; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.bar-track { background: #e9eef3; border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { background: var(--app-primary); height: 100%; }

/* ---------- Diagram alur kerja interaktif ---------- */
.wf-section { background: #fff; border: 1.5px solid var(--app-border); border-radius: 14px; margin-bottom: 1rem; overflow: hidden; }
.wf-section.is-open { border-color: #7fb0f3; }
.wf-section-head { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; cursor: pointer; user-select: none; }
.wf-section-head .page-head-icon { width: 42px; height: 42px; font-size: 1.15rem; }
.wf-section-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.wf-records { background: #e8f1fd; color: #1c63c7; border-radius: 20px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.wf-section-head .wf-chevron { transition: transform .2s; color: #5e6e7e; }
.wf-section.is-open .wf-chevron { transform: rotate(180deg); }
.wf-body { padding: 0 1.2rem 1.2rem; }
.wf-roles { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .82rem; margin-bottom: .6rem; }
.wf-roles .label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #5e6e7e; }
.wf-role { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.wf-role .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; }
.wf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .5rem; font-size: .8rem; }
.wf-toolbar .btn { font-size: .78rem; font-weight: 700; padding: .25rem .6rem; }
.wf-zoom { color: #5e6e7e; min-width: 44px; text-align: center; }
.wf-hint { margin-left: auto; color: #5e6e7e; font-size: .78rem; }

.wf-canvas {
    position: relative; height: 430px; border: 1px solid var(--app-border); border-radius: 10px; overflow: hidden; cursor: grab;
    background-color: #fbfcfe; background-image: radial-gradient(#d6dfe9 1px, transparent 1px); background-size: 18px 18px; touch-action: none;
}
.wf-canvas.panning { cursor: grabbing; }
.wf-canvas:fullscreen { height: 100vh; border-radius: 0; }
.wf-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wf-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wf-edge { fill: none; stroke-width: 2; transition: opacity .15s, stroke-width .15s; }
.wf-edge.ok { stroke: #22a861; }
.wf-edge.normal { stroke: #8c9aab; }
.wf-edge.reject { stroke: #e05252; stroke-dasharray: 6 5; }
.wf-edge.return { stroke: #f0a35e; stroke-dasharray: 6 5; }
.wf-flow { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1 16; animation: wf-flow 1.1s linear infinite; opacity: .9; }
.wf-flow.ok { stroke: #22a861; } .wf-flow.normal { stroke: #5c6b7c; } .wf-flow.reject { stroke: #e05252; } .wf-flow.return { stroke: #f0a35e; }
@keyframes wf-flow { to { stroke-dashoffset: -17; } }
.wf-edge-label { font-size: 10px; font-weight: 600; paint-order: stroke; stroke: #fbfcfe; stroke-width: 4px; stroke-linejoin: round; }
.wf-edge-label.ok { fill: #1e8a54; } .wf-edge-label.normal { fill: #5e6e7e; } .wf-edge-label.reject { fill: #c53030; } .wf-edge-label.return { fill: #c96a18; }
.wf-dim .wf-edge:not(.hl), .wf-dim .wf-flow:not(.hl), .wf-dim .wf-edge-label:not(.hl) { opacity: .15; }
.wf-dim .wf-node:not(.hl) { opacity: .45; }
.wf-edge.hl { stroke-width: 3; }

.wf-node {
    position: absolute; width: 132px; min-height: 92px; border-radius: 12px; border: 2px solid; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px 8px;
    cursor: pointer; user-select: none; box-shadow: 0 2px 6px rgba(16,40,60,.08); transition: box-shadow .15s, opacity .15s;
}
.wf-node:hover, .wf-node.hl { box-shadow: 0 8px 22px rgba(16,40,60,.18); }
.wf-node.dragging { cursor: grabbing; box-shadow: 0 14px 30px rgba(16,40,60,.25); z-index: 5; }
.wf-node .wf-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.wf-node .wf-label { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: center; line-height: 1.15; }
.wf-node .wf-count { min-width: 30px; padding: 1px 8px; border-radius: 10px; font-size: .72rem; font-weight: 700; color: #fff; text-align: center; }
.wf-node .wf-role-tag { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); font-size: .58rem; font-weight: 700; background: #fff; border: 1px solid; border-radius: 8px; padding: 0 6px; white-space: nowrap; }
.wf-node .wf-alert { position: absolute; top: -9px; right: -9px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--app-quick); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; animation: wf-pulse 1.6s ease-in-out infinite; }
@keyframes wf-pulse { 50% { box-shadow: 0 0 0 6px rgba(242,153,74,.25); } }
.wf-node.is-empty { opacity: .72; }

.wf-node.decision { width: 48px; min-height: 48px; height: 48px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.wf-node.decision .wf-diamond { width: 34px; height: 34px; transform: rotate(45deg); border: 2px solid #e08a1e; background: #fff3e0; border-radius: 5px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(16,40,60,.12); transition: box-shadow .15s; }
.wf-node.decision:hover .wf-diamond, .wf-node.decision.hl .wf-diamond { box-shadow: 0 6px 16px rgba(224,138,30,.35); }
.wf-node.decision .wf-q { transform: rotate(-45deg); font-weight: 800; color: #c96a18; }
.wf-node.decision .wf-dlabel { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); width: 120px; font-size: .6rem; color: #5e6e7e; font-weight: 600; text-align: center; pointer-events: none; line-height: 1.15; }

.wf-c-slate { border-color: #8c9aab; background: #f4f6f9; } .wf-c-slate .wf-icon, .wf-c-slate .wf-count { background: #5f6f82; } .wf-c-slate .wf-label { color: #3f4b5a; }
.wf-c-purple { border-color: #8b5cf6; background: #f4efff; } .wf-c-purple .wf-icon, .wf-c-purple .wf-count { background: #7c4ddb; } .wf-c-purple .wf-label { color: #5b32b5; }
.wf-c-orange { border-color: #f0a35e; background: #fff4e8; } .wf-c-orange .wf-icon, .wf-c-orange .wf-count { background: #e8862d; } .wf-c-orange .wf-label { color: #b05a12; }
.wf-c-blue { border-color: #4d94f0; background: #eef5fe; } .wf-c-blue .wf-icon, .wf-c-blue .wf-count { background: #2f80ed; } .wf-c-blue .wf-label { color: #1c63c7; }
.wf-c-green { border-color: #54c08a; background: #ecf9f2; } .wf-c-green .wf-icon, .wf-c-green .wf-count { background: #26a465; } .wf-c-green .wf-label { color: #1a7a49; }
.wf-c-teal { border-color: #3fc4b0; background: #e9f9f6; } .wf-c-teal .wf-icon, .wf-c-teal .wf-count { background: #17a894; } .wf-c-teal .wf-label { color: #11806f; }
.wf-c-red { border-color: #ec7a7a; background: #fdefef; } .wf-c-red .wf-icon, .wf-c-red .wf-count { background: #d64545; } .wf-c-red .wf-label { color: #b02a2a; }
.wf-c-amber { border-color: #f2c14e; background: #fff9e8; } .wf-c-amber .wf-icon, .wf-c-amber .wf-count { background: #d9a21b; } .wf-c-amber .wf-label { color: #946b06; }
.wf-c-gray { border-color: #c3ccd6; background: #f6f8fa; } .wf-c-gray .wf-icon, .wf-c-gray .wf-count { background: #9aa7b4; } .wf-c-gray .wf-label { color: #6c7a89; }

/* Kartu unit pada bagan struktur organisasi */
.wf-node.org { width: 228px; min-height: 0; padding: 10px 12px 12px; gap: 1px; align-items: center; text-align: center; border-width: 1.5px; }
.wf-node.org .org-type { font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6c7a89; }
.wf-node.org .org-unit { font-size: .82rem; font-weight: 800; line-height: 1.15; margin: 2px 0; }
.wf-node.org .org-title { font-size: .66rem; font-weight: 600; color: #5e6e7e; text-transform: uppercase; letter-spacing: .02em; }
.wf-node.org .org-name { font-size: .76rem; font-weight: 700; color: #1f2d3d; margin-top: 3px; }
.wf-node.org .org-nip { font-size: .64rem; color: #6c7a89; font-family: ui-monospace, Consolas, monospace; }
.wf-node.org .org-staff { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 6px; }
.wf-node.org .org-staff span { font-size: .58rem; background: rgba(255,255,255,.85); border: 1px solid #d6dee7; border-radius: 6px; padding: 0 5px; color: #4b5b6b; }
.wf-node.org .org-count { position: absolute; top: -9px; right: -9px; font-size: .62rem; font-weight: 700; color: #fff; background: #26a465; border-radius: 9px; padding: 1px 7px; }
.wf-node.org.wf-c-blue .org-unit { color: #1c63c7; } .wf-node.org.wf-c-purple .org-unit { color: #5b32b5; }
.wf-node.org.wf-c-teal .org-unit { color: #11806f; } .wf-node.org.wf-c-orange .org-unit { color: #b05a12; }
.wf-node.org.wf-c-slate .org-unit, .wf-node.org.wf-c-gray .org-unit { color: #3f4b5a; }
.org-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .78rem; }
.org-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--c); background: var(--bg); }

.wf-detail-item { display: block; padding: .6rem .75rem; border: 1px solid var(--app-border); border-radius: 10px; margin-bottom: .5rem; text-decoration: none; color: inherit; }
.wf-detail-item:hover { border-color: #7fb0f3; background: #f6faff; }

/* ---------- Diagram alir SOP (flowchart) ---------- */
@font-face { font-family: "DejaVu Sans"; src: url("../fonts/DejaVuSans.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DejaVu Sans"; src: url("../fonts/DejaVuSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
.fc-root { position: relative; }
.fc-root:fullscreen { background: #fff; padding: 1rem; display: flex; flex-direction: column; }
.fc-root:fullscreen .fc-canvas { flex: 1; max-height: none; }
.fc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .5rem; font-size: .78rem; }
.fc-toolbar .btn { font-size: .75rem; font-weight: 700; padding: .2rem .55rem; }
.fc-zoom { color: #5e6e7e; min-width: 42px; text-align: center; }
.fc-legend { display: inline-flex; flex-wrap: wrap; gap: .7rem; margin-left: .5rem; color: #4b5b6b; }
.fc-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.fc-canvas { border: 1px solid var(--app-border); border-radius: 10px; overflow: hidden; background: #fff; cursor: grab; max-height: 760px; touch-action: none; }
.fc-canvas.panning { cursor: grabbing; }
.fc-svg { display: block; width: 100%; height: auto; max-height: 760px; user-select: none; }
.fc-text { font-family: "DejaVu Sans", Verdana, sans-serif; pointer-events: none; }
.fc-node { cursor: pointer; opacity: 0; animation: fc-in .45s ease forwards; transform-box: fill-box; transform-origin: center; transition: opacity .15s; }
.fc-node.fc-connector, .fc-node.fc-offpage { cursor: default; }
@keyframes fc-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.fc-node:hover > :first-child, .fc-node.hl > :first-child, .fc-node:focus > :first-child { stroke-width: 3; }
.fc-node:focus { outline: none; }
.fc-flow { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1 14; opacity: .55; animation: fc-flow 1.2s linear infinite; }
@keyframes fc-flow { to { stroke-dashoffset: -15; } }
.fc-dim .fc-node:not(.hl) { opacity: .35 !important; }
.fc-dim .fc-edge:not(.hl) { opacity: .15; }
.fc-edge { transition: opacity .15s; }
.fc-edge.hl path:first-child { stroke-width: 2.6; }
.fc-tip { position: absolute; z-index: 5; max-width: 310px; background: #0f2a44; color: #fff; border-radius: 10px; padding: .6rem .75rem; font-size: .78rem; box-shadow: 0 10px 24px rgba(15,42,68,.3); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.fc-tip.show { opacity: 1; transform: none; }
.fc-tip-title { font-weight: 700; margin-bottom: .3rem; line-height: 1.3; }
.fc-tip-no { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #22c1a4; color: #0f2a44; font-size: .68rem; margin-right: .35rem; }
.fc-tip-row { color: #c9d6e3; line-height: 1.35; } .fc-tip-row span { display: inline-block; min-width: 70px; color: #7ff0d9; font-weight: 600; }
tr.fc-row-hl > td { background: #fff3c4 !important; transition: background .3s; }

/* ---------- Formulir SOP ---------- */
.sop-tabs .nav-link { color: #4b5b6b; font-size: .85rem; white-space: nowrap; }
.sop-tabs .nav-link.active { font-weight: 600; color: var(--app-primary); }
.sop-tabs .req-dot { width: 6px; height: 6px; border-radius: 50%; background: #dc3545; display: inline-block; margin-left: 4px; vertical-align: middle; }
.sop-tabs .done-dot { background: #198754; }
.row-table td { vertical-align: top; }
.row-table textarea { min-height: 38px; resize: vertical; }
.row-table .row-no { width: 46px; text-align: center; font-weight: 600; color: #6c7a89; padding-top: .9rem !important; }
.row-table .row-actions { width: 84px; white-space: nowrap; }

/* ---------- Pratinjau isi SOP ---------- */
.sop-doc { background: #fff; border: 1px solid #d5dde5; max-width: 900px; margin: 0 auto; padding: 2rem 2.25rem; }
.sop-doc .doc-kop { border: 1px solid #000; display: grid; grid-template-columns: 96px 1fr 96px; align-items: stretch; }
.sop-doc .doc-kop .logo { display: grid; place-items: center; padding: .5rem; }
.sop-doc .doc-kop .logo:first-child { border-right: 1px solid #000; }
.sop-doc .doc-kop .logo:last-child { border-left: 1px solid #000; }
.sop-doc .doc-kop .logo img { max-height: 72px; max-width: 100%; }
.sop-doc .doc-kop .brand { padding: .6rem; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.sop-doc .doc-meta { border: 1px solid #000; border-top: 0; display: grid; grid-template-columns: 120px 1fr 110px 1fr; font-size: .8rem; }
.sop-doc .doc-meta span { padding: .3rem .5rem; border-right: 1px solid #000; }
.sop-doc .doc-meta span:nth-child(4n) { border-right: 0; }
.sop-doc .doc-meta span:nth-child(-n+4) { border-bottom: 1px solid #000; }
@media (max-width: 575.98px) {
    .sop-doc { padding: 1rem; }
    .sop-doc .doc-kop { grid-template-columns: 56px 1fr 56px; }
    .sop-doc .doc-meta { grid-template-columns: 110px 1fr; }
    .sop-doc .doc-meta span:nth-child(2n) { border-right: 0; }
    .sop-doc .doc-meta span:nth-child(-n+6) { border-bottom: 1px solid #000; }
}
.sop-doc h6 { font-weight: 700; margin-top: 1.4rem; margin-bottom: .5rem; }
.sop-doc table { font-size: .82rem; }
.sop-doc .draft-mark { color: #c00000; font-weight: 700; font-size: .8rem; }
.pre-line { white-space: pre-line; }

/* ---------- Perbandingan ---------- */
.diff-changed { background: #fff8e1; }
.diff-added { background: #e8f5e9; }
.diff-removed { background: #ffebee; text-decoration: line-through; color: #8a3b3b; }

/* ---------- Timeline riwayat ---------- */
.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { position: relative; padding-left: 1.6rem; padding-bottom: 1rem; border-left: 2px solid #dfe6ec; margin-left: .5rem; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--app-primary); }
.timeline li.t-approve::before { border-color: #198754; background: #198754; }
.timeline li.t-return::before { border-color: #0dcaf0; background: #0dcaf0; }
.timeline li.t-reject::before { border-color: #dc3545; background: #dc3545; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
    background: radial-gradient(circle at 80% 20%, rgba(34,193,164,.35), transparent 45%), linear-gradient(150deg, #0f2a44 0%, #1c63c7 62%, #4da3ff 100%);
    color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero .hero-logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 7px; display: grid; place-items: center; }
.login-hero .hero-logo img { max-width: 100%; max-height: 100%; }
.login-panel { display: grid; place-items: center; padding: 2rem; background: #fff; }
.login-card { width: 100%; max-width: 380px; }
.login-mobile-brand { display: none; }
@media (max-width: 767.98px) { .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; } .login-mobile-brand { display: flex; } }
