:root {
    --bg: #c9c6d8;
    --ink: #1c1830;
    --muted: #8d89a3;
    --line: rgba(120, 110, 160, 0.12);
    --shadow: 0 18px 50px rgba(55, 40, 90, 0.08);
    --radius: 24px;
    color-scheme: light;

    --glass: rgba(255, 255, 255, 0.36);
    --glass-strong: rgba(255, 255, 255, 0.56);
    --glass-border: rgba(255, 255, 255, 0.72);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 34px 90px rgba(55, 40, 90, 0.18);
    --sheen: linear-gradient(120deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0.2));

    /* Auth glass card */
    --auth-glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.26));
    --auth-glass-spec: radial-gradient(120% 70% at 18% 0%, rgba(255, 255, 255, 0.6), transparent 60%);
    --auth-glass-edge: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 0.1) 58%, rgba(255, 255, 255, 0.65));
    --auth-glass-shadow: 0 40px 90px -30px rgba(55, 40, 90, 0.45), 0 12px 30px -12px rgba(55, 40, 90, 0.18);
    --auth-noise: 0.05;
    --auth-input-bg: rgba(255, 255, 255, 0.66);
    --auth-input-top: rgba(255, 255, 255, 0.7);
    --auth-input-border: rgba(120, 110, 160, 0.26);
    --auth-input-border-hover: rgba(120, 110, 160, 0.42);
    --auth-btn-bg: linear-gradient(180deg, #2c2937, #1a1822);
    --auth-btn-shadow: 0 16px 30px -12px rgba(26, 24, 34, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --divider: rgba(120, 110, 160, 0.18);
    --sticky-bg: #f8f7fc;

    --surface: rgba(255, 255, 255, 0.5);
    --surface-border: rgba(255, 255, 255, 0.85);
    --surface-2: rgba(255, 255, 255, 0.72);
    --surface-3: rgba(255, 255, 255, 0.94);
    --hover: rgba(255, 255, 255, 0.6);
    --pop-bg: rgba(255, 255, 255, 0.88);
    --track: rgba(120, 110, 160, 0.14);
    --badge: rgba(120, 110, 160, 0.12);

    --label: #4e4968;
    --body-soft: #5c5674;
    --soft-ink: #3a3552;
    --link: #4d4670;
    --icon: #6f6a86;
    --nav-idle: #9a96ad;
    --nav-hover: #4e4966;
    --placeholder: #b0acc0;

    --input-bg: rgba(255, 255, 255, 0.64);
    --input-border: rgba(140, 130, 170, 0.22);
    --input-focus: rgba(125, 106, 216, 0.26);
    --accent: #7d6ad8;
    --accent-dot: #7c5cff;
    --primary-bg: #1c1a24;
    --primary-ink: #ffffff;
    --error: #c43b6e;
    --up: #1f9d62;
    --down: #d4538b;

    --tone-lavender: rgba(226, 221, 248, 0.82);
    --tone-blue: rgba(214, 229, 251, 0.82);
    --tone-pink: rgba(246, 224, 242, 0.82);
    --tone-mint: rgba(215, 244, 233, 0.82);
    --tone-lilac: rgba(234, 229, 251, 0.82);
    --cell-lavender: rgba(222, 216, 248, 0.9);
    --cell-blue: rgba(210, 227, 251, 0.9);
    --cell-pink: rgba(248, 220, 238, 0.9);
    --cell-mint: rgba(212, 245, 232, 0.9);
    --cell-lilac: rgba(232, 226, 251, 0.9);
    --tone-border: rgba(255, 255, 255, 0.75);

    --orb-1: #b9a7ff;
    --orb-2: #9fd3ff;
    --orb-3: #ffb6dc;
    --orb-4: #a9c4ff;
    --orb-opacity: 0.85;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0e0c18;
    --ink: #f3f1fb;
    --muted: #9d98b8;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

    --glass: rgba(22, 19, 38, 0.52);
    --glass-strong: rgba(30, 26, 50, 0.66);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
    --sheen: linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0.05));

    --auth-glass-bg: linear-gradient(160deg, rgba(38, 33, 62, 0.74), rgba(20, 17, 34, 0.56));
    --auth-glass-spec: radial-gradient(120% 70% at 18% 0%, rgba(255, 255, 255, 0.1), transparent 60%);
    --auth-glass-edge: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.03) 58%, rgba(255, 255, 255, 0.18));
    --auth-glass-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75), 0 12px 30px -12px rgba(0, 0, 0, 0.4);
    --auth-noise: 0.07;
    --auth-input-bg: rgba(255, 255, 255, 0.06);
    --auth-input-top: rgba(255, 255, 255, 0.06);
    --auth-input-border: rgba(255, 255, 255, 0.14);
    --auth-input-border-hover: rgba(255, 255, 255, 0.26);
    --auth-btn-bg: linear-gradient(180deg, #fbfaff, #e4e0f3);
    --auth-btn-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.65), inset 0 1px 0 #fff;
    --divider: rgba(255, 255, 255, 0.1);
    --sticky-bg: #1c1930;

    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --surface-2: rgba(255, 255, 255, 0.08);
    --surface-3: rgba(255, 255, 255, 0.14);
    --hover: rgba(255, 255, 255, 0.09);
    --pop-bg: rgba(30, 26, 50, 0.92);
    --track: rgba(255, 255, 255, 0.12);
    --badge: rgba(255, 255, 255, 0.1);

    --label: #c9c4e2;
    --body-soft: #b3aed0;
    --soft-ink: #d9d5ee;
    --link: #c3b8ff;
    --icon: #b3aed0;
    --nav-idle: #8b86a8;
    --nav-hover: #e6e2f7;
    --placeholder: #7c779a;

    --input-bg: rgba(255, 255, 255, 0.07);
    --input-border: rgba(255, 255, 255, 0.14);
    --input-focus: rgba(160, 140, 255, 0.32);
    --accent: #a897ff;
    --accent-dot: #a897ff;
    --primary-bg: #f3f1fb;
    --primary-ink: #14121c;
    --error: #ff8fb4;
    --up: #4fd38f;
    --down: #ff7fb0;

    --tone-lavender: rgba(124, 104, 226, 0.2);
    --tone-blue: rgba(66, 140, 230, 0.18);
    --tone-pink: rgba(226, 104, 176, 0.18);
    --tone-mint: rgba(52, 190, 140, 0.18);
    --tone-lilac: rgba(150, 130, 240, 0.18);
    --cell-lavender: rgba(124, 104, 226, 0.3);
    --cell-blue: rgba(66, 140, 230, 0.28);
    --cell-pink: rgba(226, 104, 176, 0.28);
    --cell-mint: rgba(52, 190, 140, 0.28);
    --cell-lilac: rgba(150, 130, 240, 0.28);
    --tone-border: rgba(255, 255, 255, 0.1);

    --orb-1: #6a5ae6;
    --orb-2: #2c9fd8;
    --orb-3: #d4559a;
    --orb-4: #4f63e0;
    --orb-opacity: 0.55;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 480px at 8% -10%, rgba(255, 255, 255, 0.45), transparent 55%),
        radial-gradient(700px 420px at 100% 100%, rgba(186, 170, 220, 0.35), transparent 50%),
        var(--bg);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(900px 480px at 8% -10%, rgba(120, 100, 220, 0.18), transparent 55%),
        radial-gradient(700px 420px at 100% 100%, rgba(60, 130, 220, 0.16), transparent 50%),
        var(--bg);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.icon { width: 18px; height: 18px; display: block; }

/* ---------- Background orbs & theme toggle ---------- */

.orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.orbs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: var(--orb-opacity);
    will-change: transform;
    animation: orb-drift 18s ease-in-out infinite alternate;
}
.orbs span:nth-child(1) { width: 540px; height: 540px; left: -160px; top: -180px; background: var(--orb-1); }
.orbs span:nth-child(2) { width: 480px; height: 480px; right: -140px; top: 10%; background: var(--orb-2); animation-delay: -6s; }
.orbs span:nth-child(3) { width: 440px; height: 440px; left: 32%; bottom: -220px; background: var(--orb-3); animation-delay: -12s; }

/* The fourth orb only lives on guest pages (below); inside the app three slow orbs are enough behind many glass panels. */
.orbs span:nth-child(4) { display: none; }

/*
 * Guest pages (masuk, daftar, error): a moving aurora. Four soft, slightly oval blobs each travel their own loop
 * (22–34 s, so the picture never visibly repeats), turning and stretching as they go, and keep passing behind the card
 * so its glass refracts moving colour. Only `transform` is animated: the blur is drawn once and the motion stays on
 * the compositor.
 */
.auth-body .orbs span { filter: blur(72px); animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: normal; }
.auth-body .orbs span:nth-child(1) {
    width: 600px; height: 460px; left: calc(50% - 620px); top: -160px;
    background: var(--orb-1);
    animation-name: aurora-1; animation-duration: 26s;
}
.auth-body .orbs span:nth-child(2) {
    width: 520px; height: 420px; left: calc(50% + 60px); right: auto; top: calc(50% - 460px);
    background: var(--orb-2);
    animation-name: aurora-2; animation-duration: 32s; animation-delay: -8s;
}
.auth-body .orbs span:nth-child(3) {
    width: 500px; height: 400px; left: calc(50% - 160px); top: calc(50% + 120px); bottom: auto;
    background: var(--orb-3);
    animation-name: aurora-3; animation-duration: 22s; animation-delay: -4s;
}
.auth-body .orbs span:nth-child(4) {
    display: block;
    width: 380px; height: 320px; left: calc(50% + 260px); top: calc(50% + 40px);
    background: var(--orb-4);
    opacity: calc(var(--orb-opacity) * 0.85);
    animation-name: aurora-4; animation-duration: 34s; animation-delay: -15s;
}

@keyframes aurora-1 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
    25% { transform: translate3d(24vw, 18vh, 0) rotate(45deg) scale(1.15, 0.9); }
    50% { transform: translate3d(36vw, 46vh, 0) rotate(100deg) scale(0.9, 1.12); }
    75% { transform: translate3d(8vw, 32vh, 0) rotate(150deg) scale(1.1, 1); }
}
@keyframes aurora-2 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
    30% { transform: translate3d(-30vw, 22vh, 0) rotate(-60deg) scale(1.2, 0.95); }
    60% { transform: translate3d(-12vw, 52vh, 0) rotate(-110deg) scale(0.92, 1.1); }
    80% { transform: translate3d(6vw, 26vh, 0) rotate(-160deg) scale(1.05, 1.05); }
}
@keyframes aurora-3 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
    35% { transform: translate3d(22vw, -34vh, 0) rotate(70deg) scale(1.12, 0.9); }
    65% { transform: translate3d(-24vw, -22vh, 0) rotate(130deg) scale(0.95, 1.15); }
}
@keyframes aurora-4 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1); }
    25% { transform: translate3d(-42vw, -10vh, 0) rotate(-40deg) scale(1.25, 1); }
    50% { transform: translate3d(-58vw, -46vh, 0) rotate(-90deg) scale(1, 1.2); }
    75% { transform: translate3d(-18vw, -38vh, 0) rotate(-140deg) scale(1.15, 0.9); }
}

@keyframes orb-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(42px, 30px, 0) scale(1.08); }
}

.theme-toggle { color: var(--ink); }
.theme-toggle.floating {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-strong);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    transition: transform 0.15s ease;
}
.theme-toggle.floating:hover { transform: scale(1.05); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ---------- App shell ---------- */

.stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 18px;
}

.shell {
    min-height: calc(100vh - 36px);
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
}

.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 0 16px;
    border-right: 1px solid var(--glass-border);
}

.brand-mark {
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
}

.brand-mark img, .brand-mark svg { width: 42px; height: auto; color: var(--ink); }

.side-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--nav-idle);
    position: relative;
    background: transparent;
    border: 0;
}

.nav-btn:hover { color: var(--nav-hover); background: var(--hover); }

.nav-btn.active {
    background: var(--primary-bg);
    color: var(--primary-ink);
    box-shadow: 0 10px 18px rgba(20, 16, 40, 0.18);
}

.nav-btn::after {
    content: attr(data-label);
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-bg);
    color: var(--primary-ink);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;
}

.nav-btn:hover::after,
.nav-btn:focus-visible::after { opacity: 1; }

.nav-spacer { flex: 1; }

.workspace {
    min-width: 0;
    padding: 22px 22px 22px 8px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.topbar-copy { flex: 1; min-width: 0; padding-right: 12px; }

.topbar h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.045em;
    font-weight: 700;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.4;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    padding: 8px 8px 8px 14px;
    min-width: 280px;
    box-shadow: 0 8px 24px rgba(70, 60, 110, 0.05), inset 0 1px 0 var(--glass-highlight);
    color: var(--muted);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.search input {
    border: 0;
    outline: 0;
    background: transparent;
    flex: 1;
    min-width: 0;
    color: var(--ink);
}

.search input::placeholder { color: var(--placeholder); }

.mic, .icon-btn, .profile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    color: var(--icon);
    position: relative;
}

.icon-btn {
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    box-shadow: 0 8px 20px rgba(70, 60, 110, 0.05), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.bell .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-dot);
    box-shadow: 0 0 0 2px var(--surface-3);
}

.profile {
    width: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 2px;
    background: transparent;
    box-shadow: none;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--av, #e4dff6);
    color: #2a2640;
    font-size: 12px;
    font-weight: 700;
}

.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar.xl { width: 96px; height: 96px; font-size: 30px; }
img.avatar { object-fit: cover; display: block; background: var(--surface-3); }
.profile img.avatar { width: 36px; height: 36px; }

/* Profile page */
.profile-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.photo-row { display: flex; align-items: center; gap: 18px; }
.photo-preview { flex: none; }
.photo-preview .avatar.xl { box-shadow: 0 12px 28px -14px rgba(55, 40, 90, 0.45), inset 0 0 0 1px var(--surface-border); }
.photo-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.photo-actions .hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.file-btn { cursor: pointer; align-self: flex-start; }
.file-btn .icon { width: 16px; height: 16px; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-error { color: var(--error); font-size: 12px; }
.readonly-value {
    margin: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--body-soft);
    font-size: 14px;
}
.readonly-hint { margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.pop a.pop-link { flex-direction: row; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); }
.pop-link .icon { width: 16px; height: 16px; }
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .photo-row { flex-direction: column; align-items: flex-start; }
}

.menu-anchor { position: relative; }

.pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 250px;
    background: var(--pop-bg);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    z-index: 30;
}

.pop[hidden] { display: none !important; }

.pop a, .pop-item, .pop-logout {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 12px;
    background: transparent;
    border: 0;
    font-size: 13px;
}

.pop a:hover, .pop-logout:hover { background: var(--hover); }
.pop a strong, .pop-item strong { font-size: 13px; }
.pop a small, .pop-item small, .pop-user small { color: var(--muted); font-size: 12px; }
.pop-title, .pop-user { padding: 8px 10px 6px; }
.pop-wide { min-width: 300px; max-width: min(360px, calc(100vw - 32px)); }
.pop-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.pop a.pop-action { position: relative; padding-right: 100px; }
.pop-action strong, .pop-action small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-action em {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-style: normal;
    font-size: 12px;
    font-weight: 750;
    color: var(--accent);
    white-space: nowrap;
}
.count-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-dot);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface-3);
}

/* Dashboard: "Menunggu tanda tangan Anda" action panel */
.action-panel {
    margin-bottom: 14px;
    border-color: color-mix(in srgb, var(--accent) 45%, var(--surface-border));
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), inset 4px 0 0 var(--accent);
}
.action-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px 16px; }
.action-panel h2 { display: inline-flex; align-items: center; gap: 10px; }
.action-panel .hint { color: var(--body-soft); font-size: 13px; }
.action-ico {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: var(--primary-bg);
    color: var(--primary-ink);
}
.action-ico .icon { width: 16px; height: 16px; }
.count-chip {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
}
.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
}
.action-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.action-copy .num { font-size: 15px; }
.action-title { font-weight: 650; color: var(--soft-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-copy small { color: var(--muted); font-size: 12px; }
.action-row .btn-dark { flex: none; }
.sign-grid { scroll-margin-top: 24px; }
.sign-grid:target .sign-pad { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 14px; }
@media (max-width: 860px) {
    .action-row { flex-direction: column; align-items: stretch; }
    .action-title { white-space: normal; }
    .action-row .btn-dark { width: 100%; }
}
.pop-user strong { display: block; }
.pop-logout { flex-direction: row; align-items: center; gap: 8px; font-weight: 650; }

.help-pop {
    left: 54px;
    right: auto;
    bottom: 0;
    top: auto;
    width: 240px;
}

.help-pop p { margin: 6px 10px 8px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.help-pop strong { display: block; padding: 8px 10px 0; }

.toast {
    margin: 0 0 14px;
    background: var(--primary-bg);
    color: var(--primary-ink);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13.5px;
}

.toast.error { background: #8d3d5c; color: #fff; }

/* ---------- Dashboard ---------- */

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}

.page-main, .page-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.stat-row, .role-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.role-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 14px; }

.stat-card, .role-card {
    border-radius: 22px;
    padding: 16px 16px 14px;
    min-height: 214px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tone-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.stat-card:hover, a.stat-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 var(--glass-highlight), 0 18px 34px -18px rgba(55, 40, 90, 0.35);
}
a.stat-card:active { transform: translateY(0); }
a.stat-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-card .bars span { transition: opacity 0.15s ease; }
.stat-card .bars:hover span:not(:hover) { opacity: 0.55; }
.stat-card .bars span.zero { opacity: 0.45; }
.stat-card .bars:hover span.zero:hover { opacity: 0.7; }

.tone-lavender { background: var(--tone-lavender); }
.tone-blue { background: var(--tone-blue); }
.tone-pink { background: var(--tone-pink); }
.tone-mint { background: var(--tone-mint); }
.tone-lilac { background: var(--tone-lilac); }

.label-row, .panel-head, .insight-top, .detail-top, .toolbar, .form-actions, .progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.label-row { color: var(--body-soft); font-size: 14px; font-weight: 650; }

.bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--hover);
    color: var(--soft-ink);
}

.value {
    margin: 12px 0 6px;
    font-size: 42px;
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-weight: 800;
}

.value-sm { font-size: 32px; letter-spacing: -0.04em; }

.delta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
}

.delta .icon { width: 14px; height: 14px; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta span { color: var(--muted); font-weight: 500; }

.bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 92px;
    margin-top: auto;
    padding-top: 12px;
}

.bars span {
    flex: 1;
    display: block;
    border-radius: 10px 10px 6px 6px;
    min-height: 10px;
}

.pattern-stack .bars span:nth-child(odd) {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 1px, transparent 1.3px),
        linear-gradient(180deg, #5c5678, #1d1a2e);
    background-size: 7px 7px, auto;
}

.pattern-stack .bars span:nth-child(even) {
    background: repeating-linear-gradient(135deg, #2c2744 0 2px, #8d87a8 2px 4px);
}

.pattern-solid .bars span {
    background: linear-gradient(180deg, #c5d4ea 0%, #2c3348 100%);
}

.pattern-stripe .bars span {
    background: repeating-linear-gradient(135deg, #5a3b56 0 3px, #d7b4cf 3px 6px);
}

html[data-theme="dark"] .pattern-stack .bars span:nth-child(odd) {
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1.3px),
        linear-gradient(180deg, #b3a8f0, #6a5ae6);
    background-size: 7px 7px, auto;
}
html[data-theme="dark"] .pattern-stack .bars span:nth-child(even) {
    background: repeating-linear-gradient(135deg, #6a5ae6 0 2px, #cfc7ff 2px 4px);
}
html[data-theme="dark"] .pattern-solid .bars span {
    background: linear-gradient(180deg, #9ccbff 0%, #3f74c9 100%);
}
html[data-theme="dark"] .pattern-stripe .bars span {
    background: repeating-linear-gradient(135deg, #b85c9a 0 3px, #ffc4e4 3px 6px);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.panel h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.panel-head { margin-bottom: 12px; }

.pipe-scroll { overflow-x: auto; }

.pipe.pipe-approval {
    grid-template-columns: 160px repeat(4, minmax(72px, 1fr));
    min-width: 640px;
}

.pipe {
    display: grid;
    grid-template-columns: 148px repeat(6, minmax(72px, 1fr));
    gap: 10px 8px;
    align-items: center;
    min-width: 760px;
}

.pipe-stage {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.pipe-label { font-size: 13.5px; font-weight: 650; }

.pipe-cell { min-height: 48px; }

.cell {
    min-height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--tone-border);
}

.cell.tone-lavender { background: var(--cell-lavender); }
.cell.tone-blue { background: var(--cell-blue); }
.cell.tone-pink { background: var(--cell-pink); }
.cell.tone-mint { background: var(--cell-mint); }
.cell.tone-lilac { background: var(--cell-lilac); }
.cell:hover { filter: saturate(1.1) brightness(0.98); }
a.cell { transition: transform 0.15s ease, filter 0.15s ease; }
a.cell:hover { transform: translateY(-1px); }
a.cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cell-empty { display: grid; place-items: center; min-height: 48px; color: var(--track); font-weight: 800; user-select: none; }

.pill-select {
    border: 1px solid var(--surface-border);
    background: var(--surface-2);
    color: var(--ink);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 4px 14px rgba(70, 60, 110, 0.05);
    max-width: 100%;
}

.insight { display: flex; flex-direction: column; gap: 14px; }
.insight-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.insight-row.slim { grid-template-columns: 1fr; }
.insight-ico {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--primary-bg);
    color: var(--primary-ink);
    display: grid;
    place-items: center;
}
.insight-top { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.insight-top b { color: var(--body-soft); }
.track { height: 5px; background: var(--track); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--primary-bg); border-radius: 99px; }
.insight-row:first-child .track { height: 6px; }
.full { min-width: 0; }

.person {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.person:first-of-type { border-top: 0; padding-top: 0; }
.person strong, .who strong { display: block; font-size: 14px; }
.person small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; }
.person-actions { display: flex; gap: 6px; }
.job-chip {
    display: inline-flex;
    margin-top: 6px;
    background: var(--primary-bg);
    color: var(--primary-ink);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}

.load-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

/* ---------- Toolbar, chips, buttons ---------- */

.toolbar { align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-end, .filters, .chips, .badge-row, .detail-links, .legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { flex: 1; }

.chip, .page, .btn-soft, .btn-danger {
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--body-soft);
    font-size: 13px;
    font-weight: 700;
}

.chip.active, .btn-dark {
    background: var(--primary-bg);
    color: var(--primary-ink);
    border-color: transparent;
}

.btn-dark, .btn-soft, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 14px;
    padding: 10px 14px;
    /* All three follow the surrounding text, so buttons side by side share one font size. */
    font-size: inherit;
    font-weight: 700;
}

.btn-dark { border: 0; }
.btn-dark.full { width: 100%; min-height: 48px; }
.btn-danger { background: #f8e4ec; color: #a33b5c; border-color: transparent; }
/* The soft and danger buttons have a 1px border the dark one lacks: take it out of their padding so all three are as tall. */
.btn-soft, .btn-danger { padding: 9px 14px; }

/* Shared interaction states: every clickable surface answers hover, focus, press, and busy */
.chip, .page, .subnav a, .btn-dark, .btn-soft, .btn-danger, .icon-btn, .nav-btn, .num, .row-actions a, .pop a {
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.chip:not(.active):hover, .page:not(.disabled):hover, .subnav a:not(.active):hover { background: var(--surface-3); color: var(--ink); }
.btn-dark:not(:disabled):hover { filter: brightness(1.12); }
.btn-danger:not(:disabled):hover { background: #f3d3e0; }
.btn-dark:not(:disabled):active, .btn-soft:not(:disabled):active, .btn-danger:not(:disabled):active, .chip:active { transform: translateY(1px); }
.num:hover, .row-actions a:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-dark:disabled, .btn-soft:disabled, .btn-danger:disabled { opacity: 0.6; cursor: progress; }
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    color: var(--primary-ink);
    animation: wolin-spin 0.7s linear infinite;
}
.btn-soft.is-busy::after, .btn-danger.is-busy::after, .chip.is-busy::after { color: var(--ink); }
@keyframes wolin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .is-busy::after { animation-duration: 1.6s; }
}
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; }

table.data, table.matrix { width: 100%; border-collapse: collapse; min-width: 720px; }
table.matrix { min-width: 680px; }

.data th, .matrix th {
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 10px 14px 12px;
}

.data td, .matrix td {
    padding: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
}
.data input, .data select { min-height: 40px; font-size: 13.5px; font-weight: 600; }
.users input, .users select, .roles input { width: 100%; min-width: 140px; }
.form-actions { flex-wrap: wrap; gap: 12px 16px; }
.form-actions .hint { margin: 0; flex: 1 1 240px; }
.stack { display: grid; gap: 16px; }
.stack > * { min-width: 0; }
.stack > .role-row { margin-bottom: 0; }

.data tbody tr:hover td { background: var(--hover); }
.num { font-weight: 800; letter-spacing: -0.03em; }
.row-title { display: block; font-weight: 700; }
.data small, .matrix small, .hint { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.row-actions { white-space: nowrap; }
.row-actions a { font-weight: 700; font-size: 13px; margin-left: 8px; color: var(--link); }
.late { color: var(--down); font-weight: 750; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px !important; }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    background: var(--badge);
}

.status-submitted { background: #efeafc; color: #5b4d86; }
.status-scheduled { background: #e5effc; color: #35548a; }
.status-assigned { background: #e7f6ee; color: #1e7a52; }
.status-in_progress { background: #e7f0ff; color: #2457b5; }
.status-qc { background: #fff4df; color: #9a6412; }
.status-completed { background: #e5f8ef; color: #157a45; }
.status-cancelled { background: #f8e8ee; color: #a33b5c; }
.priority-critical { background: #fde8ee; color: #a33b5c; }
.priority-high { background: #fdecdc; color: #a15a16; }
.priority-medium { background: #eef0fb; color: #3d4678; }
.priority-low { background: #eef6f2; color: #1e7a52; }
.late-badge { background: #fde8ee; color: #a33b5c; }

html[data-theme="dark"] .status-submitted { background: rgba(142, 120, 220, 0.22); color: #d3c8ff; }
html[data-theme="dark"] .status-scheduled { background: rgba(80, 130, 220, 0.22); color: #bcd4ff; }
html[data-theme="dark"] .status-assigned,
html[data-theme="dark"] .priority-low { background: rgba(50, 180, 120, 0.2); color: #a3ebc9; }
html[data-theme="dark"] .status-in_progress { background: rgba(70, 120, 230, 0.22); color: #bcceff; }
html[data-theme="dark"] .status-qc { background: rgba(230, 170, 60, 0.2); color: #ffd99f; }
html[data-theme="dark"] .status-completed { background: rgba(40, 180, 110, 0.2); color: #9fecc7; }
html[data-theme="dark"] .status-cancelled,
html[data-theme="dark"] .priority-critical,
html[data-theme="dark"] .late-badge,
html[data-theme="dark"] .btn-danger { background: rgba(220, 80, 130, 0.2); color: #ffb4cf; }
html[data-theme="dark"] .priority-high { background: rgba(230, 130, 50, 0.2); color: #ffcaa0; }
html[data-theme="dark"] .priority-medium { background: rgba(120, 130, 220, 0.2); color: #c8ceff; }
html[data-theme="dark"] .toast.error { background: rgba(220, 80, 130, 0.3); color: #ffd3e2; }

.pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
}

.page.disabled { opacity: 0.45; }
.page-meta { color: var(--muted); font-size: 13px; font-weight: 650; }

/* ---------- Forms ---------- */

.form-panel { max-width: 860px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide, .field.grow { grid-column: 1 / -1; }
.field span { font-size: 13px; font-weight: 700; color: var(--label); }
.field input, .field select, .field textarea {
    width: 100%;
    border: 0;
    background: var(--input-bg);
    color: var(--ink);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: inset 0 0 0 1px var(--input-border), inset 0 1px 0 var(--glass-highlight);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.15s ease, background 0.15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field select:focus, .field textarea:focus {
    box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--input-focus);
}
.field textarea { resize: vertical; min-height: 110px; }
.field small { color: var(--error); font-size: 12px; }
.form-actions { margin-top: 16px; justify-content: flex-end; }
.hint { margin: 0; }

.detail-card .description { line-height: 1.6; color: var(--soft-ink); }
.progress { height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.progress span { display: block; height: 100%; background: var(--primary-bg); border-radius: 99px; }
.progress-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 10px;
}
.meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 0;
}
.meta div { background: var(--surface-2); border: 1px solid var(--surface-border); border-radius: 14px; padding: 10px 12px; }
.meta dt { color: var(--muted); font-size: 12px; }
.meta dd { margin: 3px 0 0; font-weight: 750; }
.status-form { display: flex; gap: 12px; align-items: flex-end; }
.status-form .field { flex: 0 0 220px; }
.status-form .grow { flex: 1; }
.status-form .btn-dark { margin-bottom: 1px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline strong { display: block; font-size: 14px; }
.timeline em, .timeline small { color: var(--muted); font-size: 12px; font-style: normal; }
.timeline p { margin: 4px 0; font-size: 13px; }
.timeline a { font-weight: 800; }

.trend { display: flex; align-items: flex-end; gap: 8px; height: 180px; }
.trend-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.trend-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.trend-bars span { width: 7px; border-radius: 99px; display: block; }
.trend-bars .created { background: var(--primary-bg); }
.trend-bars .done { background: #b9a7e6; }
.trend-col small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.swatch { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.swatch.created { background: var(--primary-bg); }
.swatch.done { background: #b9a7e6; }
.legend { color: var(--muted); font-size: 12px; font-weight: 700; }
.text-link { font-size: 13px; font-weight: 750; color: var(--link); }

.role-card { min-height: 150px; }
.role-card span { font-weight: 700; color: var(--body-soft); }
.role-card strong { display: block; margin: 8px 0; font-size: 36px; letter-spacing: -0.05em; }
.role-card p { margin: auto 0 0; color: var(--body-soft); font-size: 13px; line-height: 1.45; }

/* Permission matrix: sticky first column, whole-cell click targets, breathing room */
table.matrix { border-collapse: separate; border-spacing: 0; }
.matrix th:first-child, .matrix td:first-child { min-width: 260px; position: sticky; left: 0; z-index: 1; background: var(--sticky-bg); }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; min-width: 110px; }
.matrix th:not(:first-child) { padding-left: 8px; padding-right: 8px; }
.matrix td:not(:first-child) { padding: 6px; }
.matrix td:first-child strong { display: block; font-size: 14px; }
.matrix td:first-child small { margin-top: 3px; line-height: 1.4; }
.matrix-cell {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 52px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.matrix-cell:hover { background: var(--hover); }
.matrix-cell.is-locked { cursor: not-allowed; opacity: 0.6; }
.matrix input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: inherit; }
.matrix tbody tr:not(.matrix-group):hover td { background: var(--hover); }
.matrix tbody tr:not(.matrix-group):hover td:first-child { background: var(--sticky-bg); }
@media (max-width: 640px) {
    .matrix th:first-child, .matrix td:first-child { min-width: 168px; max-width: 200px; }
    .matrix td:first-child small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .matrix th:not(:first-child), .matrix td:not(:first-child) { min-width: 84px; }
}
.matrix-group td {
    position: static;
    padding: 22px 14px 8px;
    border-top: 0;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
}
.matrix-group:first-child td { padding-top: 6px; }
.matrix-group td span { position: sticky; left: 14px; display: inline-block; }

/* Users table */
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-copy { display: flex; flex-direction: column; min-width: 0; }
.who-copy strong { font-size: 14px; }
.who-copy small { margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-copy .who-title { color: var(--body-soft); font-weight: 600; }
table.users { min-width: 760px; }
.users input, .users select { min-width: 120px; }
.users .user-cell { min-width: 220px; }
.users td[data-label="Department"] { width: 16%; }
.users td[data-label="Perusahaan"] { width: 22%; }
.users td[data-label="Peran"] { width: 16%; }
.users .row-actions { width: 1%; }
.users .row-actions form { justify-content: flex-end; }

/* ≤860px: each user row becomes a card; labels come from data-label */
@media (max-width: 860px) {
    .users-scroll { overflow: visible; }
    table.users { min-width: 0; display: block; }
    table.users thead { display: none; }
    table.users tbody { display: grid; gap: 12px; }
    table.users tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 12px;
        padding: 14px;
        border-radius: 16px;
        background: var(--surface-2);
        border: 1px solid var(--surface-border);
    }
    table.users td { display: block; padding: 0; border-top: 0; }
    table.users .user-cell { grid-column: 1 / -1; min-width: 0; }
    table.users td[data-label] { width: auto; }
    table.users td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 700;
        color: var(--label);
    }
    table.users .row-actions { grid-column: 1 / -1; width: auto; }
    table.users .row-actions form { display: flex; justify-content: stretch; margin: 0; }
    table.users .row-actions .btn-dark { width: 100%; min-height: 40px; }
    .users input, .users select { min-width: 0; }
    table.users tbody tr:hover td { background: transparent; }
}
@media (max-width: 480px) {
    table.users tr { grid-template-columns: 1fr; }
}

/* ---------- Auth pages ---------- */

.auth-stage { display: grid; place-items: center; padding: 28px 16px; }

/* Glass shell: layered background (specular + gradient), light-edge border, frosted noise */
.auth-wrap {
    position: relative;
    isolation: isolate;
    width: min(420px, 100%);
    border-radius: 28px;
    overflow: hidden;
    background: var(--auth-glass-spec), var(--auth-glass-bg);
    box-shadow: var(--auth-glass-shadow);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    animation: auth-card-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.auth-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: var(--auth-glass-edge);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.auth-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--auth-noise);
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@supports not (backdrop-filter: blur(1px)) {
    .auth-wrap { background: var(--surface-3); }
}
@keyframes auth-card-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: none; }
}
.auth-wrap.wide { width: min(640px, 100%); }

/* Card footer: version + copyright (inside the card, below the primary content) */
.auth-foot { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.auth-card:not(.auth-hero) .auth-foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--divider); }
.version-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--body-soft);
    font-family: "Space Grotesk", "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.auth-copy {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 5px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.45;
}
.auth-copy span { white-space: nowrap; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-lockup .logo { width: auto; height: 26px; }
.brand-name {
    font-family: "Space Grotesk", "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1;
    padding-top: 2px;
}
.lede { color: var(--body-soft); line-height: 1.55; margin: 0; font-size: 14px; }
.auth-card { position: relative; z-index: 3; padding: 40px 40px 32px; display: flex; flex-direction: column; }
.auth-card h1 { margin: 28px 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.1; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.auth-card .form-grid { gap: 12px; }
.auth-card .field { gap: 8px; }
.auth-card .field > label { font-size: 13px; font-weight: 700; color: var(--label); }
.auth-card .field input {
    min-height: 48px;
    border-radius: 14px;
    background: var(--input-bg);
}
.auth-card .btn-dark {
    margin-top: 4px;
    min-height: 50px;
    gap: 8px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.01em;
    background: var(--auth-btn-bg);
    box-shadow: var(--auth-btn-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-card .btn-dark .icon { transition: transform 0.2s ease; }
.auth-card .btn-dark:hover { transform: translateY(-1px); }
.auth-card .btn-dark:hover .icon { transform: translateX(3px); }
.auth-card .btn-dark:active { transform: translateY(0) scale(0.99); }
.auth-card .auth-switch { margin: 18px 0 0; }
.remember { display: flex; align-items: center; gap: 9px; min-height: 20px; font-size: 13px; font-weight: 650; color: var(--body-soft); user-select: none; }
.remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.auth-switch { color: var(--muted); font-size: 14px; }
.auth-switch a { font-weight: 800; color: var(--ink); }

/* Hero variant (login): centered brand mark + "Masuk ke WOLIN" heading */
.auth-hero { padding: 36px 36px 26px; align-items: stretch; }
/* 1.5x the original 26px lockup mark, snapped to the 136:80 viewBox ratio so both sides land on whole pixels */
.auth-mark { display: block; width: 68px; height: 40px; margin: 0 auto; color: var(--ink); }
.auth-hero h1 { margin: 22px 0 6px; font-size: 26px; letter-spacing: -0.04em; line-height: 1.15; text-align: center; }
.auth-hero h1 .brand-word {
    font-family: "Space Grotesk", "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-size: 0.92em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-left: 0.06em;
}
.auth-hero .lede { text-align: center; text-wrap: balance; }
.auth-hero form { margin-top: 26px; }
.auth-hero .field { gap: 7px; }
.auth-hero .auth-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--divider); text-align: center; }

/* Icon-prefixed inputs */
.control { position: relative; display: flex; align-items: center; }
.control > .icon { position: absolute; left: 14px; z-index: 1; color: var(--muted); pointer-events: none; transition: color 0.15s ease; }
.auth-card .control input {
    min-height: 50px;
    padding: 0 14px 0 42px;
    font-size: 14.5px;
    background: var(--auth-input-bg);
    box-shadow: inset 0 0 0 1px var(--auth-input-border), inset 0 1px 0 var(--auth-input-top), 0 1px 2px rgba(55, 40, 90, 0.04);
}
.auth-card .control:hover input:not(:focus) { box-shadow: inset 0 0 0 1px var(--auth-input-border-hover), inset 0 1px 0 var(--auth-input-top); }
.auth-card .control input:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--input-focus); }
.control:focus-within > .icon { color: var(--accent); }
.auth-card .control.field-pass input { padding-right: 48px; }
.control .pass-toggle { top: 50%; transform: translateY(-50%); width: 38px; height: 38px; }

.field-pass { position: relative; }
.pass-toggle {
    position: absolute;
    top: 0;
    right: 6px;
    width: 36px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
}
.pass-toggle:hover { color: var(--ink); background: var(--hover); }
.pass-toggle[aria-pressed="true"] { color: var(--ink); }
.pass-eye {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pass-eye-slash { display: none; }
.pass-toggle[aria-pressed="true"] .pass-eye-slash { display: block; }
.field-pass input { padding-right: 46px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .page-grid { grid-template-columns: 1fr; }
    /* Rail panels sit side by side once the rail drops below the main column. */
    .page-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
}

@media (max-width: 760px) {
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .stat-row { grid-template-columns: 1fr; }
    .stat-card { min-height: 0; }
    .stat-card .bars { height: 72px; }
    .value { font-size: 36px; }
    .role-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .role-card { min-height: 0; padding: 14px; }
    .role-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .role-card strong { font-size: 30px; margin: 6px 0; }
}

@media (max-width: 860px) {
    .stage { padding: 10px; }
    .shell { grid-template-columns: minmax(0, 1fr); border-radius: 22px; min-height: calc(100vh - 20px); }
    .sidebar { flex-direction: row; align-items: center; gap: 8px; min-width: 0; width: 100%; padding: 10px 12px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--glass-border); }
    /* One row: brand · scrollable icon strip · help. Badges need the vertical padding so they aren't clipped. */
    .side-nav { flex: 1; min-width: 0; flex-direction: row; justify-content: flex-start; gap: 6px; overflow-x: auto; padding: 5px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .side-nav::-webkit-scrollbar { display: none; }
    .nav-btn { flex: none; }
    .nav-spacer, .nav-btn::after { display: none; }
    .brand-mark { margin: 0; width: 36px; height: 36px; flex: none; }
    .brand-mark img, .brand-mark svg { width: 36px; }
    .side-help { flex: none; }
    .workspace { padding: 8px 14px 18px; }
    .topbar { flex-wrap: wrap; }
    .topbar h1 { font-size: 24px; }
    .search { min-width: 0; width: 100%; }
    .topbar-actions { width: 100%; }
    .form-grid, .meta, .status-form { grid-template-columns: 1fr; display: grid; }
    .status-form .field, .status-form .grow { flex: none; }
    .help-pop { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); }
    .auth-card { padding: 28px 22px; }
    .revise-panel { padding: 14px; }
    .revise-actions .btn-danger { width: 100%; }
}

@media (max-width: 480px) {
    .auth-stage { padding: 20px 12px; }
    .auth-wrap { border-radius: 24px; }
    .auth-hero { padding: 28px 22px 24px; }
    .auth-hero h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-wrap, .orbs span, .auth-body .orbs span { animation: none; }
    .auth-card .btn-dark, .auth-card .btn-dark .icon, .auth-card .control input, .control > .icon { transition: none; }
}

/* ---------- Sub navigation & period filter ---------- */

.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.subnav a {
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    font-size: 13px;
    font-weight: 750;
    color: var(--body-soft);
}
.subnav a.active { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }

.period-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: flex-end;
    margin-bottom: 14px;
}
.period-presets, .period-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.period-range { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; }
.period-presets .chip { min-height: 40px; display: inline-flex; align-items: center; }
.period-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--body-soft); flex: 1 1 150px; min-width: 0; max-width: 200px; }
.period-bar input[type="date"], .period-bar .date-input { width: 100%; min-width: 0; min-height: 40px; }
.period-bar input[type="date"], .period-bar .date-input, .data input, .data select {
    border: 0;
    background: var(--input-bg);
    color: var(--ink);
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: inset 0 0 0 1px var(--input-border);
}
.period-total { margin-left: auto; font-size: 14px; align-self: center; white-space: nowrap; }
.period-list { margin-bottom: 14px; }
.period-list table.data { min-width: 560px; }

@media (max-width: 520px) {
    .period-presets, .period-range { width: 100%; }
    .period-range { flex-wrap: wrap; }
    .period-bar label { flex: 1 1 calc(50% - 4px); max-width: none; }
    .period-range .btn-dark { width: 100%; }
    .period-total { margin-left: 0; width: 100%; text-align: right; }
}
.row-actions form { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions .btn-dark { color: var(--primary-ink); margin-left: 0; }
.btn-dark.btn-sm, .btn-soft.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.btn-soft.btn-sm { padding: 6px 12px; }

/* Hak Akses: role management */
.role-manage .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 4px 16px; }
.role-manage .panel-head .hint { color: var(--body-soft); font-size: 13px; }
.role-manage-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.role-create {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
}
.role-create h3 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.role-create .field span em { font-style: normal; font-weight: 500; color: var(--muted); }
.role-create .btn-dark { align-self: flex-start; }
.perm-picker { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
.perm-picker legend { grid-column: 1 / -1; padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--label); }
.perm-option {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 7px 9px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    font-size: 12.5px;
    font-weight: 650;
    color: var(--soft-ink);
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.perm-option:hover { background: var(--surface-3); }
.perm-option input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.perm-option small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 1px; }
table.roles { min-width: 600px; }
.roles input { min-width: 130px; }
.roles input[name="description"] { min-width: 180px; width: 100%; }
.roles td:nth-child(3) { width: 34%; }
.roles .row-actions form { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; vertical-align: middle; }
.slug { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; padding: 3px 7px; border-radius: 8px; background: var(--badge); color: var(--body-soft); }
.lock-note { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Master → Data Unit */
.unit-manage .panel-head { display: flex; justify-content: space-between; }
.unit-manage .panel-head .hint { margin: 4px 0 0; }
.unit-search { min-width: 300px; box-shadow: none; }
.unit-search .icon { width: 16px; height: 16px; flex: none; }
.unit-search-clear { font-size: 12.5px; font-weight: 700; color: var(--link); padding: 0 6px; white-space: nowrap; }
.unit-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--body-soft); line-height: 1.45; }
.unit-hint a { color: var(--link); font-weight: 700; }
table.units { min-width: 640px; }
.units input, .units select { width: 100%; min-width: 120px; }
.units td:nth-child(1) { width: 20%; }
.units td:nth-child(2) { width: 24%; }
.units td:nth-child(3) { width: 38%; }
.units td:last-child { width: 1%; }
table.departments { min-width: 520px; }
.departments td:nth-child(1) { width: 60%; }
.departments td:nth-child(2), .departments td:nth-child(3) { width: 10%; }
.units td small.field-error { display: block; margin-top: 4px; white-space: normal; }
.units .row-actions { text-align: right; }
.units .row-actions form { display: inline-flex; align-items: center; margin-left: 6px; vertical-align: middle; }
@media (max-width: 1024px) {
    .role-manage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .unit-search { min-width: 0; width: 100%; }
}
@media (max-width: 480px) {
    .perm-picker { grid-template-columns: 1fr; }
}

/* Hak Akses: email configuration */
.mail-transport {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--body-soft);
    font-size: 13px;
    line-height: 1.5;
}
.mail-transport .icon { flex: none; margin-top: 2px; color: var(--accent); }
.mail-transport strong { color: var(--ink); }
.mail-transport p { margin: 4px 0 0; }
.mail-transport code, .mail-test code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--badge); }
.mail-transport.is-log { border-color: color-mix(in srgb, var(--down) 40%, var(--surface-border)); }
.mail-transport.is-log .icon { color: var(--down); }
.panel .status-form { margin-top: 12px; }
.mail-test {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px dashed var(--input-border);
    display: grid;
    grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.4fr);
    gap: 12px 18px;
    align-items: end;
}
.mail-test-copy strong { display: block; font-size: 14px; }
.mail-test-copy .hint { margin-top: 4px; color: var(--body-soft); font-size: 13px; }
.mail-test .status-form { margin-top: 0; }
.mail-test--stack { grid-template-columns: 1fr; gap: 12px; }
.mail-test--stack .status-form .grow { flex: 1 1 240px; min-width: 0; }
.mail-test > form:not(.status-form) { justify-self: end; }
/* Pengaturan Server Email */
.mail-settings { margin-top: 12px; }
.mail-settings .form-grid { align-items: start; }
.mail-transport strong em { font-style: normal; font-weight: 600; color: var(--body-soft); }
.smtp-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px dashed var(--input-border);
}
.smtp-fields[hidden] { display: none; }
.preset-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--body-soft); }
.preset-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: var(--surface-2);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.preset-btn:hover { background: var(--surface-3); border-color: var(--accent); }
.smtp-note { grid-column: 1 / -1; color: var(--body-soft); font-size: 13px; }
.smtp-note code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--badge); }
.mail-settings .field-pass input { padding-right: 46px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.mail-actions .btn-dark, .mail-actions .btn-soft { min-height: 46px; }
.mail-actions .btn-soft .icon { width: 16px; height: 16px; }
.mail-transport a.inbox-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Modal dialog (glass card in the top layer) */
.wolin-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    width: min(480px, calc(100vw - 32px));
    max-width: none;
    color: var(--ink);
}
.wolin-dialog::backdrop { background: rgba(18, 14, 38, 0.48); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: 0 24px 60px rgba(20, 16, 40, 0.28);
}
.dialog-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.dialog-head .hint { margin-top: 6px; color: var(--body-soft); font-size: 13px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.dialog-actions .btn-dark, .dialog-actions .btn-soft { min-height: 44px; }
.dialog-actions .btn-dark .icon { width: 16px; height: 16px; }
@media (max-width: 520px) {
    .dialog-actions { flex-direction: column-reverse; }
    .dialog-actions .btn-dark, .dialog-actions .btn-soft { width: 100%; }
}
.mail-test .btn-soft { min-height: 44px; }
.mail-test .btn-soft .icon { width: 16px; height: 16px; }
.cc-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    font-size: 13.5px;
    font-weight: 650;
}
.cc-chip .icon { width: 16px; height: 16px; color: var(--muted); }
.cc-chip form { display: inline-flex; margin: 0; }
.cc-chip button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    background: var(--hover);
    color: var(--body-soft);
    font-size: 16px;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.cc-chip button:hover { background: #f3d3e0; color: #a33b5c; }
.cc-empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
@media (max-width: 720px) {
    .mail-test { grid-template-columns: 1fr; }
    .mail-test .status-form { flex-direction: column; align-items: stretch; }
    .mail-test .btn-soft { width: 100%; }
    .smtp-fields { grid-template-columns: 1fr; }
    .mail-actions .btn-dark, .mail-actions .btn-soft { width: 100%; }
}

/* Work Order Monitoring: timed stages. On a phone each row becomes a card with the day count beside the number. */
@media (max-width: 720px) {
    .aging-scroll { overflow: visible; }
    table.aging { min-width: 0; display: block; }
    table.aging thead { display: none; }
    table.aging tbody { display: grid; gap: 10px; }
    table.aging tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--surface-border); }
    table.aging td { display: block; padding: 0; border-top: 0; max-width: none; order: 4; }
    table.aging td.empty { grid-column: 1 / -1; order: 0; }
    table.aging td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: 0.04em; }
    table.aging .num-cell { order: 1; }
    table.aging .age-cell { order: 2; }
    table.aging .title-cell { order: 3; grid-column: 1 / -1; }
    table.aging .status-cell { grid-column: 1 / -1; }
    table.aging tbody tr:hover td { background: transparent; }
}

/* Revisi Work Order inbox */
.age { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.revisions .note-cell { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--body-soft); }
@media (max-width: 720px) {
    /* Each row becomes a card, so the "Unggah ulang" button is in view without scrolling sideways. */
    .revisions-scroll { overflow: visible; }
    table.revisions { min-width: 0; display: block; }
    table.revisions thead { display: none; }
    table.revisions tbody { display: grid; gap: 10px; }
    table.revisions tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--surface-border); }
    table.revisions td { display: block; padding: 0; border-top: 0; max-width: none; order: 4; }
    table.revisions td.empty { grid-column: 1 / -1; order: 0; }
    table.revisions td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: 0.04em; }
    table.revisions .num-cell { order: 1; }
    table.revisions .kind-cell { order: 2; }
    table.revisions .title-cell { order: 3; grid-column: 1 / -1; }
    table.revisions .note-cell { grid-column: 1 / -1; white-space: normal; overflow: visible; }
    table.revisions .row-actions { grid-column: 1 / -1; }
    table.revisions .row-actions .btn-dark { display: flex; justify-content: center; width: 100%; min-height: 40px; margin-left: 0; }
    table.revisions tbody tr:hover td { background: transparent; }
}
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-dot);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--glass-strong);
}
.nav-btn.active .nav-badge { box-shadow: 0 0 0 2px var(--primary-bg); }

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
    .orbs span, .auth-body .orbs span { animation: none; }
}

a.stat-card { color: inherit; text-decoration: none; }
.form-errors { color: var(--error); font-size: 13px; font-weight: 650; margin-bottom: 12px; }
.form-errors p { margin: 0 0 4px; }

/* ---------- Setelah Full Approve (pemenuhan) ---------- */
.fulfill-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.fulfill-head > div { flex: 1 1 280px; min-width: 0; }
.fulfill-head h2 { margin: 0 0 4px; }
.fulfill-head .hint { color: var(--body-soft); font-size: 13px; }
.stage-steps { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.stage-steps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 12px 6px 6px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    font-size: 13px;
    font-weight: 750;
    color: var(--body-soft);
}
.stage-steps .step-index {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-3);
    font-size: 12px;
    color: var(--ink);
}
.stage-steps .step-index .icon { width: 14px; height: 14px; }
.stage-steps li.on { background: var(--primary-bg); color: var(--primary-ink); border-color: transparent; }
.stage-steps li.on .step-index { background: rgba(255, 255, 255, 0.18); color: inherit; }
.stage-steps li.done { color: var(--body-soft); }
.stage-steps li.done .step-index { background: #e6f6e9; color: #1f7a3a; }
.fulfill-grid { display: grid; gap: 14px; }
.fulfill-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    min-width: 0;
}
.fulfill-card + .fulfill-history, .fulfill-grid + .fulfill-history { margin-top: 14px; }
.fulfill-card.is-final { border-color: color-mix(in srgb, #2f9e44 45%, var(--surface-border)); }
.fulfill-card.is-rejected { border-color: color-mix(in srgb, #a33b5c 45%, var(--surface-border)); }
.confirm-inline { display: grid; gap: 10px; margin: 0; max-width: 560px; }
.confirm-inline .pay-actions .btn-soft { flex: 1 1 200px; min-height: 44px; }
.signer-trail { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.signer-trail li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--body-soft); }
.signer-trail li strong { color: var(--ink); font-weight: 700; }
.signer-trail li .icon { width: 14px; height: 14px; color: #1f7a3a; flex: none; }
.signer-trail li small { color: var(--muted); font-size: 12px; }
.fulfill-card-head { margin-bottom: 14px; }
.fulfill-card-head h3 { margin: 0 0 4px; font-size: 16px; }
.fulfill-card .hint, .revision-note, .waiting-note { color: var(--body-soft); font-size: 13px; }
.waiting-note { margin: 0; font-size: 14px; }
.revision-note { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin: 0 0 14px; border-left: 3px solid var(--down); }
.revision-note strong { color: var(--ink); }

/* File batches (pending / accepted) */
.file-batch { margin: 0 0 14px; }
.file-batch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.file-batch-head strong { font-size: 14px; }
.file-batch-head .hint { margin: 0; display: inline; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list .file-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.file-list .file-link:hover { background: var(--surface-3); border-color: var(--accent); }
.file-list .file-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--badge); color: var(--accent); }
.file-list .file-icon .icon { width: 18px; height: 18px; }
.file-list .file-name { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.file-list small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-list .file-action { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750; color: var(--link); white-space: nowrap; }
.file-list .file-action .icon { width: 14px; height: 14px; }

/* Review (terima / revisi) */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.review-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    margin: 0;
}
.review-card h4 { margin: 0; font-size: 14px; }
.review-card .hint { margin: 0; }
.review-card .field { flex: 1; }
.review-card textarea { min-height: 88px; }
.review-card .btn-dark, .review-card .btn-danger { align-self: flex-start; margin-top: auto; }
.review-card .btn-dark .icon { width: 16px; height: 16px; }

/* Upload */
.fulfill-upload { display: grid; gap: 14px; margin: 0; }
.file-picker {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed var(--input-border);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.file-picker:hover, .file-picker:focus-within { border-color: var(--accent); background: var(--surface-3); }
.file-picker.has-files { border-style: solid; border-color: var(--accent); }
.file-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--badge); color: var(--accent); }
.file-picker-icon .icon { width: 20px; height: 20px; }
.file-picker-text { display: grid; gap: 2px; min-width: 0; }
.file-picker-text strong { font-size: 14px; }
.file-picker-text em { font-style: normal; font-size: 12px; color: var(--body-soft); }
.file-picker-count { font-size: 12px; font-weight: 750; color: var(--accent); white-space: nowrap; }
.file-picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-picker-list[hidden] { display: none; }
.file-picker-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; overflow-wrap: anywhere; }
.file-picker-list small { color: var(--muted); white-space: nowrap; }
.fulfill-submit { display: flex; justify-content: flex-end; }
.fulfill-submit .btn-dark .icon { width: 16px; height: 16px; }

/* Riwayat berkas */
table.files { min-width: 640px; }
.files .kind-chip, .revisions .kind-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--badge); font-size: 12px; font-weight: 750; white-space: nowrap; }
.files .file-cell { max-width: 320px; }
.files .file-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--link); text-decoration: none; overflow-wrap: anywhere; }
.files .file-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.files .file-link .icon { width: 16px; height: 16px; flex: none; }
.files .note-cell { max-width: 260px; color: var(--body-soft); }
.doc-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; background: var(--surface-2); color: var(--body-soft); white-space: nowrap; }
.doc-status.is-accepted { background: #e6f6e9; color: #1f7a3a; }
.doc-status.is-rejected { background: #fbe9ef; color: #a33b5c; }
html[data-theme="dark"] .doc-status.is-accepted, html[data-theme="dark"] .stage-steps li.done .step-index { background: rgba(40, 180, 110, 0.2); color: #9fecc7; }
html[data-theme="dark"] .doc-status.is-rejected { background: rgba(220, 80, 130, 0.2); color: #ffb4cf; }

/* BAST per berkas */
.bast-doc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bast-doc:first-of-type { border-top: 0; padding-top: 0; }
.bast-doc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.bast-doc-title .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.space-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.space-meta span { color: var(--body-soft); font-size: 13px; }
.space-state { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 13px; color: var(--body-soft); }
.space-state.is-done { color: #1f7a3a; }
.space-state .icon { width: 14px; height: 14px; }

@media (max-width: 720px) {
    .fulfill-card { padding: 14px; }
    .review-grid { grid-template-columns: 1fr; }
    .review-card .btn-dark, .review-card .btn-danger { align-self: stretch; }
    .file-picker { grid-template-columns: auto minmax(0, 1fr); }
    .file-picker-count { grid-column: 2; }
    .fulfill-submit .btn-dark { width: 100%; }
    .file-list .file-link { grid-template-columns: auto minmax(0, 1fr); }
    .file-list .file-link small, .file-list .file-action { grid-column: 2; }
    .bast-toolbar .btn-soft, .bast-toolbar .btn-dark { flex: 1 1 160px; }
    /* Riwayat berkas: each row becomes a card */
    .files-scroll { overflow: visible; }
    table.files { min-width: 0; display: block; }
    table.files thead { display: none; }
    table.files tbody { display: grid; gap: 10px; }
    table.files tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--surface-border); }
    table.files td { display: block; padding: 0; border-top: 0; max-width: none; }
    table.files td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: 0.04em; }
    table.files .file-cell, table.files .note-cell { grid-column: 1 / -1; }
    table.files tbody tr:hover td { background: transparent; }
}

/* Work order detail: everything above the paper shares the paper's 980px column */
.paper-lead { max-width: 980px; margin: 0 auto 14px; display: grid; gap: 12px; }
.paper-lead .revision-note { margin: 0; }
.revise-panel { display: grid; gap: 12px; padding: 16px 18px; }
.revise-head h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.02em; }
.revise-head .hint { color: var(--body-soft); font-size: 13px; line-height: 1.5; }
.revise-panel .field textarea { min-height: 84px; }
.revise-actions { display: flex; justify-content: flex-end; }
.revise-actions .btn-danger { min-height: 44px; padding: 10px 20px; }
/* ---------- Paid Status ---------- */
.paid-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.paid-stat {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-left-width: 4px;
}
.paid-stat span { font-size: 12px; font-weight: 700; color: var(--body-soft); letter-spacing: 0.02em; }
.paid-stat strong { font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; }
.paid-stat.is-waiting { border-left-color: var(--accent); }
.paid-stat.is-paid { border-left-color: #2f9e44; }
.paid-stat.is-unpaid { border-left-color: #a33b5c; }
.paid-head { align-items: flex-start; flex-wrap: nowrap; gap: 6px 16px; }
.paid-head > div { flex: 1 1 200px; min-width: 0; }
.paid-head .hint { color: var(--body-soft); font-size: 13px; }
.pay-count { flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-ink); font-weight: 800; font-size: 13px; }
.pay-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px 24px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
}
.pay-card + .pay-card { margin-top: 12px; }
.pay-info { display: grid; gap: 6px; min-width: 0; align-content: start; }
.pay-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pay-heading .num { font-size: 16px; color: var(--link); }
.pay-since { font-size: 12px; color: var(--muted); }
.pay-title { font-size: 15px; }
.pay-meta { margin: 0; font-size: 13px; color: var(--body-soft); }
.pay-meta strong { color: var(--ink); font-weight: 700; }
.pay-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pay-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.pay-file:hover { border-color: var(--accent); background: var(--surface-3); }
.pay-file .icon { width: 14px; height: 14px; color: var(--accent); flex: none; }
.pay-file span { white-space: nowrap; }
.pay-file em { font-style: normal; font-weight: 500; color: var(--body-soft); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-form { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--surface-border); margin: 0; }
.pay-form .field span em { font-style: normal; font-weight: 500; color: var(--muted); }
.pay-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-actions .btn-dark, .pay-actions .btn-soft { flex: 1 1 140px; min-height: 44px; }
.pay-actions .btn-danger { min-height: 44px; }
.pay-actions .btn-dark .icon { width: 16px; height: 16px; }
.empty-state { margin: 0; padding: 24px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--input-border); border-radius: 14px; }
table.decisions { min-width: 760px; }
.decisions .title-cell { max-width: 260px; }
.decisions .note-cell { max-width: 240px; color: var(--body-soft); }
.decisions small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pay-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.pay-status.is-paid { background: #e6f6e9; color: #1f7a3a; }
.pay-status.is-unpaid { background: #fbe9ef; color: #a33b5c; }
html[data-theme="dark"] .pay-status.is-paid { background: rgba(40, 180, 110, 0.2); color: #9fecc7; }
html[data-theme="dark"] .pay-status.is-unpaid { background: rgba(220, 80, 130, 0.2); color: #ffb4cf; }
@media (max-width: 860px) {
    .pay-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .pay-card { padding: 14px; }
    .pay-file em { max-width: 160px; }
    /* Sudah diputuskan: rows become cards */
    .decisions-scroll { overflow: visible; }
    table.decisions { min-width: 0; display: block; }
    table.decisions thead { display: none; }
    table.decisions tbody { display: grid; gap: 10px; }
    table.decisions tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--surface-border); }
    table.decisions td { display: block; padding: 0; border-top: 0; max-width: none; }
    table.decisions td.empty { grid-column: 1 / -1; }
    table.decisions td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: 0.04em; }
    table.decisions .title-cell, table.decisions .note-cell { grid-column: 1 / -1; }
    table.decisions tbody tr:hover td { background: transparent; }
}
.space-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.space-list li { padding: 12px; border-radius: 16px; background: var(--surface-2); display: grid; gap: 8px; }
.bast-board { margin-top: 12px; }
.bast-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.bast-toolbar p { margin: 0; color: var(--body-soft); font-size: 13px; }
.bast-page { position: relative; width: fit-content; max-width: 100%; margin-bottom: 12px; }
.bast-page canvas { display: block; max-width: 100%; height: auto; border-radius: 8px; background: white; }
.bast-overlay { position: absolute; inset: 0; }
.bast-box { position: absolute; border: 2px dashed #5b4bdb; background: rgba(91, 75, 219, 0.12); color: #241b63; border-radius: 8px; padding: 4px; overflow: hidden; cursor: grab; display: flex; flex-direction: column; gap: 4px; }
.bast-box span, .bast-box button, .bast-box input { font-size: 11px; }
.bast-box input, .bast-finder { background: white; color: #241b63; border: 0; border-radius: 6px; }
.bast-finder { position: relative; z-index: 2; display: grid; max-height: 90px; overflow: auto; }
.bast-finder[hidden] { display: none; }
.bast-finder button { text-align: left; padding: 4px; }
.bast-box img { max-width: 100%; max-height: 70%; object-fit: contain; }
.bast-resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; z-index: 5; }
.bast-resize::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 6px; height: 6px; border-right: 2px solid #5b4bdb; border-bottom: 2px solid #5b4bdb; opacity: 0.5; }
.bast-box:hover .bast-resize::after { opacity: 1; }

/* Work order unggahan: catatan form, kolom file, ringkasan, dan pratinjau PDF */
.upload-note { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.upload-note strong { color: var(--ink); }
.upload-field { display: grid; gap: 8px; }
.upload-field > span { font-size: 13px; font-weight: 700; color: var(--label); }
.upload-field .hint { overflow-wrap: anywhere; }
/* The file panel and the stages under it share the toolbar's 980px column; the 24px gap is the paper's. */
.wo-detail { max-width: 980px; margin: 0 auto; }
.wo-file { display: grid; gap: 14px; margin: 0 0 24px; }
.wo-file .panel-head { margin-bottom: 0; }
.wo-file-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.wo-file-meta > div { min-width: 0; }
.wo-file-meta .is-wide { grid-column: 1 / -1; }
.wo-file-meta dt { font-size: 12px; color: var(--muted); }
.wo-file-meta dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.wo-file-meta dd small { font-weight: 400; color: var(--muted); }
.wo-preview { display: block; width: 100%; height: clamp(480px, 72vh, 860px); border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface-2); }
.wo-file > .hint { margin: 0; }
.fulfill-head .hint, .fulfill-card-head .hint { text-wrap: pretty; }
@media (max-width: 720px) {
    .wo-file-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Long values (the number, the date with time) get a full row so they never break mid-word. */
    .wo-file-meta .is-wide-sm { grid-column: 1 / -1; }
}

/* Dashboard: tasks, stage list, longest wait */
.action-aside { display: flex; align-items: center; gap: 14px; flex: none; }
.action-aside .btn-dark { flex: none; min-width: 124px; }
.task-count {
    min-width: 36px;
    text-align: right;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}
.stat-note { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.delta.lead { color: var(--soft-ink); font-size: 14px; }
.panel-head > .head-note { margin: 0; flex: none; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.stage-list a.insight-row { color: inherit; text-decoration: none; border-radius: 14px; }
.stage-list a.insight-row:hover .insight-ico, .stage-list a.insight-row:focus-visible .insight-ico { background: var(--accent); color: #fff; }
.stage-list .insight-row .track { height: 6px; }
.longest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.longest li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.longest li:last-child { border-bottom: 0; padding-bottom: 0; }
.longest li > div { min-width: 0; }
.longest small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.longest li.empty { display: block; padding: 8px 0 !important; text-align: left; border-bottom: 0; }
.page-main > .period-bar, .page-main > .period-list, .page-main > .action-panel, .page-main > .toast { margin-bottom: 0; }
@media (max-width: 860px) {
    .action-aside { justify-content: space-between; }
    .action-aside .btn-dark { flex: 1; width: auto; }
    .task-count { text-align: left; }
}

/* ---------- Glass dropdown (public/js/wolin-select.js) ---------- */

/* The native select stays the trigger: same chevron in both themes, muted text while the placeholder is chosen. */
.field select, .data select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b7691' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
    text-overflow: ellipsis;
}
.data select { padding-right: 34px; background-position: right 10px center; }
html[data-theme="dark"] .field select, html[data-theme="dark"] .data select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3aed0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}
.field select.is-open, .data select.is-open {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d6ad8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 14 5-5 5 5'/%3E%3C/svg%3E");
    box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--input-focus);
}
html[data-theme="dark"] .field select.is-open, html[data-theme="dark"] .data select.is-open {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a897ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 14 5-5 5 5'/%3E%3C/svg%3E");
}
.field select:disabled, .data select:disabled { cursor: not-allowed; opacity: 0.6; }
.field select:has(> option[value=""]:checked), .data select:has(> option[value=""]:checked) { color: var(--placeholder); }

/* Native picker fallback (touch devices, data-native): readable options in both themes. */
select option { background-color: #ffffff; color: #1c1830; }
html[data-theme="dark"] select option { background-color: #1e1a32; color: #f3f1fb; }
select option[value=""] { color: #8d89a3; }

.select-pop {
    position: fixed;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    max-height: 320px;
    padding: 6px;
    border-radius: 16px;
    background: var(--pop-bg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    color: var(--ink);
    font-size: 14px;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.select-pop[data-placement="above"] { transform: translateY(4px) scale(0.98); transform-origin: bottom center; }
.select-pop.is-in { opacity: 1; transform: none; }

.select-pop-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--track, rgba(120, 110, 160, 0.3)) transparent;
}
.select-pop-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: none;
    padding: 9px 12px;
    border-radius: 11px;
    font-weight: 600;
    color: var(--soft-ink);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s ease;
}
.select-pop-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-pop-check { width: 16px; height: 16px; flex: none; color: var(--accent); opacity: 0; }
.select-pop-option.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent); }
.select-pop-option[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); font-weight: 750; }
.select-pop-option[aria-selected="true"].is-active { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.select-pop-option[aria-selected="true"] .select-pop-check { opacity: 1; }
.select-pop-option.is-placeholder { color: var(--muted); font-weight: 500; }
.select-pop-option[aria-disabled="true"] { color: var(--muted); opacity: 0.55; cursor: not-allowed; }
.select-pop-option[hidden], .select-pop-group[hidden], .select-pop-empty[hidden] { display: none; }
.select-pop-group {
    flex: none;
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.select-pop-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    margin-bottom: 6px;
    padding: 0 12px;
    border-radius: 11px;
    background: var(--input-bg);
    box-shadow: inset 0 0 0 1px var(--input-border);
    color: var(--muted);
    transition: box-shadow 0.15s ease;
}
.select-pop-search svg { width: 16px; height: 16px; flex: none; }
.select-pop-search:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--input-focus); }
.select-pop-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 9px 0;
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
}
.select-pop-search input::placeholder { color: var(--placeholder); }
.select-pop-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    .select-pop { transition: none; }
}

/* ---------- Glass date picker (public/js/wolin-date.js) ---------- */

/* Visible field: a text input (dd/mm/yyyy) with a calendar button; the native date input sits invisibly behind it. */
.date-field { position: relative; display: block; width: 100%; min-width: 0; }
.date-field .date-input { width: 100%; padding-right: 46px; font-variant-numeric: tabular-nums; }
.date-field > input.date-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.date-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.date-toggle svg { width: 18px; height: 18px; }
.date-toggle:hover, .date-field.is-open .date-toggle { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.date-toggle:disabled { cursor: not-allowed; opacity: 0.5; }
.date-field.is-open .date-input,
.date-field:has(> .date-native:focus) .date-input { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--input-focus); }
.date-field.is-invalid .date-input { box-shadow: inset 0 0 0 1px var(--error), 0 0 0 4px color-mix(in srgb, var(--error) 18%, transparent); }
.period-bar .date-field .date-input { padding-right: 38px; }
.period-bar .date-toggle { width: 28px; height: 28px; right: 6px; }
.period-bar .date-toggle svg { width: 16px; height: 16px; }
.paper .date-toggle { color: #7b7691; }
.paper .date-field.is-open .date-input,
.paper .date-field:has(> .date-native:focus) .date-input { border-color: #2f9e44; box-shadow: 0 0 0 4px rgba(47, 158, 68, 0.16); }
.paper .date-toggle:hover, .paper .date-field.is-open .date-toggle { color: #2f9e44; background: rgba(47, 158, 68, 0.1); }

/* Calendar panel: same glass as the dropdown and the pop menus. */
.date-pop {
    position: fixed;
    z-index: 1000;
    padding: 10px;
    border-radius: 18px;
    background: var(--pop-bg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    color: var(--ink);
    font-size: 13.5px;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.date-pop[data-placement="above"] { transform: translateY(4px) scale(0.98); transform-origin: bottom left; }
.date-pop.is-in { opacity: 1; transform: none; }
:where(.date-pop) button { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; }
:where(.date-pop) button:disabled { cursor: not-allowed; }
.date-pop button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.date-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.date-pop-nav {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--soft-ink);
    transition: background-color 0.15s ease;
}
.date-pop-nav svg { width: 17px; height: 17px; }
.date-pop-nav:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.date-pop-nav:disabled { opacity: 0.3; }
.date-pop-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: background-color 0.15s ease;
}
.date-pop-title svg { width: 15px; height: 15px; color: var(--muted); transition: transform 0.15s ease; }
.date-pop-title:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.date-pop[data-mode="months"] .date-pop-title svg { transform: rotate(180deg); }

.date-pop-weekdays, .date-pop-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.date-pop-weekdays { margin-bottom: 4px; }
.date-pop-weekdays span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.date-pop-weekdays span:last-child { color: color-mix(in srgb, var(--error) 70%, var(--muted)); }
.date-pop-day {
    height: 36px;
    border-radius: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--soft-ink);
    transition: background-color 0.12s ease, color 0.12s ease;
}
.date-pop-day:hover:not(:disabled):not(.is-selected) { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--ink); }
.date-pop-day.is-outside { color: var(--muted); opacity: 0.55; font-weight: 500; }
.date-pop-day.is-today { color: var(--accent); font-weight: 800; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.date-pop-day.is-selected {
    background: var(--primary-bg);
    color: var(--primary-ink);
    font-weight: 800;
    opacity: 1;
    box-shadow: 0 8px 18px -10px rgba(28, 24, 48, 0.6);
}
.date-pop-day:disabled { opacity: 0.25; text-decoration: line-through; }

.date-pop-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 0; }
.date-pop-month { height: 46px; border-radius: 12px; font-weight: 700; color: var(--soft-ink); transition: background-color 0.12s ease; }
.date-pop-month:hover:not(:disabled):not(.is-selected) { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--ink); }
.date-pop-month.is-today { color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.date-pop-month.is-selected { background: var(--primary-bg); color: var(--primary-ink); }
.date-pop-month:disabled { opacity: 0.3; }

.date-pop-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.date-pop-link { padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.date-pop-link:hover { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
.date-pop-today {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--ink);
}
.date-pop-today:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.date-pop-today:disabled { opacity: 0.4; }

@media (prefers-reduced-motion: reduce) {
    .date-pop, .date-pop-title svg { transition: none; }
}

/* ---------- Multiple select: chip field + checkbox panel (public/js/wolin-select.js) ---------- */

.multi-select { position: relative; display: block; width: 100%; min-width: 0; }
.multi-select > select.multi-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}
.multi-select .multi-select-trigger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 46px;
    padding: 7px 42px 7px 8px;
    border-radius: 14px;
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b7691' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    box-shadow: inset 0 0 0 1px var(--input-border), inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--ink);
    cursor: pointer;
    outline: none;
    transition: box-shadow 0.15s ease;
}
html[data-theme="dark"] .multi-select .multi-select-trigger {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3aed0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}
.multi-select .multi-select-trigger:focus-visible,
.multi-select.is-open .multi-select-trigger { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--input-focus); }
.multi-select.is-invalid .multi-select-trigger { box-shadow: inset 0 0 0 1px var(--error), 0 0 0 4px color-mix(in srgb, var(--error) 18%, transparent); }
.multi-select.is-disabled .multi-select-trigger { cursor: not-allowed; opacity: 0.6; }
.multi-select .multi-select-placeholder { padding: 0 6px; font-size: 14px; font-weight: 500; color: var(--placeholder); }
.multi-select .multi-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 4px 4px 4px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
}
.multi-select .multi-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; color: inherit; }
.multi-select .multi-chip-remove {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.multi-select .multi-chip-remove svg { width: 13px; height: 13px; }
.multi-select .multi-chip-remove:hover { background: color-mix(in srgb, var(--error) 16%, transparent); color: var(--error); }

.select-pop.is-multi .select-pop-option { justify-content: flex-start; }
.select-pop.is-multi .select-pop-option[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 700; }
.select-pop.is-multi .select-pop-option[aria-selected="true"].is-active { background: color-mix(in srgb, var(--accent) 17%, transparent); }
.select-pop-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-pop-box {
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 70%, transparent);
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.select-pop-box .select-pop-check { width: 13px; height: 13px; color: #fff; opacity: 0; }
.select-pop-option[aria-selected="true"] .select-pop-box { background: var(--accent); box-shadow: none; }
.select-pop-option[aria-selected="true"] .select-pop-box .select-pop-check { opacity: 1; }
html[data-theme="dark"] .select-pop-box .select-pop-check { color: #14121c; }

/* ---------- Work Order Baru: Tanggal Work Order Bekerja + durasi ---------- */

.work-period-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(170px, 0.8fr);
    gap: 10px;
    align-items: end;
}
.field .work-period-date { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .work-period-date > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.work-period-sep { padding-bottom: 14px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.field .duration-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 46px;
    padding: 6px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.field .duration-tile > span { font-size: 11.5px; font-weight: 700; color: var(--body-soft, var(--muted)); }
.field .duration-tile > strong { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.field .duration-tile.is-empty { background: var(--input-bg); box-shadow: inset 0 0 0 1px var(--input-border); }
.field .duration-tile.is-empty > strong { color: var(--muted); }
.field .duration-tile.is-error { background: color-mix(in srgb, var(--error) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 30%, transparent); }
.field .duration-tile.is-error > strong { color: var(--error); font-size: 14px; }
@media (max-width: 760px) {
    .work-period-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .field .duration-tile { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .work-period-row { grid-template-columns: 1fr; }
    .work-period-sep { display: none; }
}

/* Work order detail and Monitoring: equipment */
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.unit-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 750;
}
.unit-chip small { margin-left: 5px; font-weight: 500; color: var(--muted); }
.equipment-line { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.equipment-line strong { color: var(--soft-ink); font-weight: 700; }

/* ---------- Upload TimeSheet: HM Total ---------- */
.wo-file-meta .is-span-2 { grid-column: span 2; }
.fulfill-upload .hm-field { max-width: 620px; margin-bottom: 12px; }
.fulfill-upload .hm-field .input-suffix { max-width: 280px; }
.field .input-suffix { position: relative; display: block; }
.field .input-suffix input { padding-right: 52px; font-variant-numeric: tabular-nums; }
.field .input-suffix > b {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    pointer-events: none;
}
.hm-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 10px 0 14px;
    padding: 10px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.hm-summary dt { font-size: 12px; color: var(--muted); }
.hm-summary dd { margin: 2px 0 0; font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.hm-summary dd small { font-size: 12px; font-weight: 500; color: var(--muted); }
.hm-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--body-soft); }

/* ---------- Dashboard: Unit Sedang Bekerja ---------- */
.equipment-panel .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 6px 16px; }
.equipment-panel h2 { display: inline-flex; align-items: center; gap: 10px; }
.equipment-panel .panel-head .hint { color: var(--body-soft); font-size: 13px; }
.equipment-empty { margin: 0; padding: 18px 12px !important; }
.equipment-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.type-chips, .state-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.state-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: color-mix(in srgb, var(--state) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state) 28%, transparent);
    color: var(--ink);
}
.state-chips b { min-width: 22px; padding: 3px 8px; border-radius: 999px; background: var(--state); color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.state-chips .is-running, .unit-use.is-running, .state-badge.is-running { --state: var(--accent); }
.state-chips .is-upcoming, .unit-use.is-upcoming, .state-badge.is-upcoming { --state: #3f8fd8; }
.state-chips .is-overdue, .unit-use.is-overdue, .state-badge.is-overdue { --state: var(--error); }
.unit-use-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-width: 0; }
.state-badge {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: color-mix(in srgb, var(--state) 14%, transparent);
    color: var(--state);
}
.unit-use.is-upcoming .track span, .unit-use.is-overdue .track span { background: var(--state); }
.type-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--soft-ink);
}
.type-chips b {
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}
.unit-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 10px;
}
.unit-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    min-width: 0;
}
.unit-card-top { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unit-card-top strong { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.unit-type { font-size: 12px; font-weight: 600; color: var(--body-soft); }
.unit-use { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; border-top: 1px solid var(--line); }
.unit-use .num { font-size: 13px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.unit-use-period { font-size: 12px; color: var(--muted); }
.unit-use .track { height: 6px; }
.unit-use .track span { background: var(--state, var(--accent)); }
.unit-use-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 12px; color: var(--body-soft); }
.unit-use-foot b { font-weight: 750; color: var(--soft-ink); white-space: nowrap; }
.unit-use-foot b.is-ending { color: var(--error); }

/* ---------- Dashboard: Work Order Bekerja per bulan ---------- */
.work-month .panel-head { align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.month-nav { display: inline-flex; align-items: center; gap: 6px; }
.month-step, .month-today {
    display: inline-grid;
    place-items: center;
    height: 34px;
    border-radius: 11px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    color: var(--ink);
    transition: background-color 0.15s ease;
}
.month-step { width: 34px; }
.month-step .icon { width: 17px; height: 17px; transform: rotate(90deg); }
.month-step.is-next .icon { transform: rotate(-90deg); }
.month-today { padding: 0 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.month-step:hover, .month-today:hover { background: var(--surface-3); }
.month-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}
.month-stats > div {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
}
.month-stats dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.month-stats dd { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.month-stats dd small { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--body-soft); }
.month-table { min-width: 720px; }
.month-table td strong { font-weight: 750; white-space: nowrap; }
.month-share { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.month-table .unit-chips { margin-top: 0; }
.month-table td:nth-child(5) { min-width: 220px; }
.month-table td:nth-child(3) { min-width: 150px; }
.unit-chip.is-more { background: var(--surface-3); color: var(--body-soft); cursor: help; }
@media (max-width: 760px) {
    .month-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Select panel: an option's second line (data-note), e.g. a unit in its work period on another work order. */
.select-pop-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.select-pop-note { font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--muted); white-space: normal; }
.select-pop-option[aria-disabled="true"] { opacity: 0.75; }
.select-pop-option[aria-disabled="true"] .select-pop-text { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.select-pop-option[aria-disabled="true"] .select-pop-note { color: var(--error); }
.select-pop-option[aria-disabled="true"] .select-pop-box { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 35%, transparent); background: color-mix(in srgb, var(--muted) 12%, transparent); }

/* ---------- Upload TimeSheet: HM Total per unit ---------- */
.hm-units { border: 0; margin: 0 0 12px; padding: 0; max-width: 620px; }
.hm-units legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--label); }
.hm-unit-list { display: grid; gap: 8px; }
.hm-unit-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, 260px);
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
}
.hm-unit-name { display: flex; flex-direction: column; min-width: 0; }
.hm-unit-name strong { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.hm-unit-name small { font-size: 12px; color: var(--muted); }
.hm-unit-row .field { gap: 4px; }
.hm-units-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.hm-units-total span { font-size: 13px; font-weight: 700; color: var(--body-soft); }
.hm-units-total strong { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.hm-units.is-complete .hm-units-total strong { color: var(--ink); }
.hm-units > .hint { margin-top: 8px; }
.hm-summary .is-total { padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.hm-breakdown { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 520px) {
    .hm-unit-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Konfigurasi Email: Pengingat Durasi Work Order ---------- */
.reminder-panel .panel-head { align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
.reminder-panel .panel-head > div { flex: 1 1 420px; min-width: 0; }
.reminder-panel .panel-head .hint { margin-top: 4px; color: var(--body-soft); font-size: 13px; line-height: 1.5; }
.reminder-state { flex: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.reminder-state.is-on { background: color-mix(in srgb, #2f9e44 16%, transparent); color: #2f9e44; }
.reminder-state.is-off { background: var(--surface-3); color: var(--muted); }
.reminder-form { display: flex; flex-direction: column; gap: 16px; }
.switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    cursor: pointer;
}
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
    position: relative;
    flex: none;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--track);
    box-shadow: inset 0 0 0 1px var(--input-border);
    transition: background-color 0.18s ease;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(20, 18, 40, 0.25);
    transition: transform 0.18s ease;
}
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-copy { display: flex; flex-direction: column; gap: 2px; }
.switch-copy strong { font-size: 14px; }
.switch-copy small { font-size: 12.5px; color: var(--muted); }
.reminder-grid .field em { font-style: normal; font-weight: 500; color: var(--muted); }
.reminder-grid .input-suffix { max-width: 220px; }
.reminder-sub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.reminder-sub-head h3 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.reminder-sub-head .hint { margin-top: 4px; font-size: 13px; color: var(--body-soft); line-height: 1.5; }
.warn-text { color: var(--error); font-weight: 700; }
small.warn-text { display: block; margin-top: 2px; font-size: 12px; }
table.dept-emails { min-width: 520px; }
.dept-emails td:first-child { width: 32%; }
.dept-emails input { width: 100%; }
.reminder-status { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
table.overdue-table { min-width: 760px; }
.overdue-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.reminder-tag {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    background: var(--surface-3);
    color: var(--body-soft);
    white-space: nowrap;
}
.reminder-tag.is-sent { background: color-mix(in srgb, #2f9e44 15%, transparent); color: #2f9e44; }
.reminder-tag.is-due { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.reminder-tag.is-blocked { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.reminder-tag.is-later { background: transparent; box-shadow: inset 0 0 0 1px var(--input-border); }
html[data-theme="dark"] .reminder-tag.is-sent, html[data-theme="dark"] .reminder-state.is-on { color: #7ad99a; }
.fulfill-upload .ba-field { max-width: 420px; margin-bottom: 12px; }

/* ---------- Master → Data Unit: Bulk Data Unit (Excel) ---------- */
.bulk-panel .panel-head .hint { margin-top: 4px; color: var(--body-soft); font-size: 13px; }
.bulk-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bulk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bulk-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.bulk-step-no {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--primary-bg);
    color: var(--primary-ink);
    font-size: 13px;
    font-weight: 800;
}
.bulk-steps strong { display: block; font-size: 14px; }
.bulk-steps p { margin: 2px 0 8px; font-size: 13px; color: var(--body-soft); line-height: 1.5; }
.bulk-steps .btn-soft { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.bulk-upload { display: flex; flex-direction: column; gap: 8px; }
.import-errors {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--error) 10%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 28%, transparent);
    font-size: 13px;
}
.import-errors strong { color: var(--error); }
.import-errors ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.import-errors p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 900px) {
    .bulk-grid { grid-template-columns: 1fr; }
}

/* 2.10.0: delete buttons next to Simpan, and Master → Department → Relokasi Akun */
.units .row-actions .lock-note { margin-left: 6px; vertical-align: middle; }
.units .row-actions > .btn-danger { margin-left: 6px; vertical-align: middle; }
.users .row-actions { white-space: nowrap; }
.users .row-actions form { display: inline-flex; vertical-align: middle; }
.users .row-actions form + form, .users .row-actions form + .lock-note { margin-left: 6px; }
.dialog-actions .btn-danger { min-height: 44px; padding: 9px 16px; }
.count-link { font-weight: 700; color: var(--link); text-decoration: underline; text-decoration-color: var(--input-border); text-underline-offset: 3px; }
.count-link:hover { text-decoration-color: currentColor; }
@media (max-width: 860px) {
    table.users .row-actions { display: flex; gap: 8px; }
    table.users .row-actions form { flex: 1 1 0; }
    table.users .row-actions form + form, table.users .row-actions form + .lock-note { margin-left: 0; }
    table.users .row-actions .btn-danger { width: 100%; min-height: 40px; }
    table.users .row-actions .lock-note { align-self: center; }
}
@media (max-width: 520px) {
    .dialog-actions .btn-danger { width: 100%; }
}

.relocate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 18px; align-items: start; }
.relocate-pick { display: grid; gap: 12px; min-width: 0; }
.relocate-target {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    position: sticky;
    top: 16px;
}
.relocate-target .hint { margin: 0; color: var(--body-soft); font-size: 12.5px; line-height: 1.45; }
.relocate-target .btn-dark { justify-content: center; min-height: 44px; }
.relocate-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.relocate-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--label); cursor: pointer; }
.relocate-count { color: var(--muted); font-weight: 600; }
.relocate-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: grid;
    gap: 4px;
    max-height: 360px;
    overflow-y: auto;
    border-radius: 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
}
.relocate-list li[hidden] { display: none; }
.relocate-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
}
.relocate-item:hover { background: var(--hover); }
.relocate-item:has(input:checked) { background: var(--input-focus); }
.relocate-item input, .relocate-all input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.relocate-who { display: grid; min-width: 0; }
.relocate-who strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relocate-who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relocate-dept { font-size: 12px; font-weight: 700; color: var(--body-soft); padding: 3px 9px; border-radius: 999px; background: var(--badge); white-space: nowrap; }
.relocate-empty { padding: 14px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 860px) {
    .relocate-grid { grid-template-columns: 1fr; }
    .relocate-target { position: static; }
}
@media (max-width: 480px) {
    .relocate-item { grid-template-columns: auto auto minmax(0, 1fr); }
    .relocate-dept { grid-column: 3; justify-self: start; }
}
/* A dialog opened from a table row must not inherit the row's inline, right-aligned, no-wrap layout. */
.row-actions .wolin-dialog { white-space: normal; text-align: left; }
.row-actions .wolin-dialog form.dialog-card { display: grid; gap: 16px; margin: 0; justify-content: stretch; }
.row-actions .wolin-dialog .dialog-actions { justify-content: flex-end; }

/* 2.10.1: Dashboard cards are totals, split into in progress and finished */
.stat-split { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.split-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--soft-ink);
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
}
.split-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.split-chip strong { font-weight: 800; color: var(--ink); }
.split-chip.is-progress::before { background: var(--accent); }
.split-chip.is-done::before { background: var(--up); }
.split-chip.is-rejected::before { background: var(--down); }

/* 2.11.0: Work Order Baru/Ubah → Perlu Pengawas (two glass choice cards) */
fieldset.choice-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-field > legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--label); }
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice-field .choice input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    border: 0;
    box-shadow: none;
    cursor: pointer;
}
.choice-field .choice-body, .choice-field .choice-copy { font-size: inherit; font-weight: inherit; color: inherit; }
.choice-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.choice-body .icon { width: 18px; height: 18px; padding: 8px; box-sizing: content-box; flex: none; border-radius: 12px; color: var(--icon); background: var(--badge); transition: background 0.15s ease, color 0.15s ease; }
.choice-field .choice-copy { display: grid; gap: 2px; min-width: 0; }
.choice-field .choice-copy strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.choice-field .choice-copy small { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.choice:hover .choice-body { background: var(--hover); }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--surface-3); box-shadow: 0 0 0 3px var(--input-focus); }
.choice input:checked + .choice-body .icon { color: #fff; background: var(--accent); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) {
    .choice-group { grid-template-columns: 1fr; }
}

/* 2.12.0 / 2.13.0: Ubah Unit and Ubah Nomor on a running work order (button and last change under the field) */
.wo-file-meta .meta-change-note { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.wo-file-meta .meta-change-open { display: inline-flex; margin-top: 8px; }
.wo-file-meta .meta-change-open .icon { width: 14px; height: 14px; }
.wo-file-meta .wolin-dialog { font-size: 14px; font-weight: 500; }
.dialog-card .field span em { font-style: normal; font-weight: 500; color: var(--muted); }
.dialog-card .field textarea { min-height: 64px; }
.dialog-card .dialog-hint { margin: 0; font-size: 12.5px; color: var(--body-soft); line-height: 1.45; }
.dialog-head .hint strong { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
/* Dialog cards: a denser glass so the page behind does not show through the text. */
.wolin-dialog .dialog-card {
    background: var(--pop-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

/* 2.14.0: Konfirmasi Work Order per department pembuat */
.paid-head .confirm-scope { margin-top: 6px; }
.paid-head .confirm-scope strong { color: var(--ink); font-weight: 700; }

/* ---------- 2.15.0: Upload TimeSheet: Kuantitas Pekerjaan (optional) ---------- */
.qty { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.qty-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 620px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.qty-toggle input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.qty-toggle strong { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.qty-toggle small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--body-soft); }
.qty-toggle:has(input:checked) {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.qty-body { margin-top: 12px; }
.qty-body[hidden] { display: none; }
.qty-table { border: 1px solid var(--surface-border); border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.qty-head, .qty-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1.3fr) minmax(170px, 0.8fr) minmax(0, 1fr) 38px;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
}
.qty-head { font-size: 12px; font-weight: 700; color: var(--label); border-bottom: 1px solid var(--surface-border); }
.qty-head span:first-child { text-align: center; }
.qty-row + .qty-row { border-top: 1px solid var(--surface-border); }
.qty-no { text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.qty-cell { display: block; min-width: 0; margin: 0; }
.qty-label { display: none; }
.qty-row input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 11px;
    padding: 9px 11px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--input-bg);
    box-shadow: inset 0 0 0 1px var(--input-border);
    outline: none;
    transition: box-shadow 0.15s ease;
}
.qty-row input::placeholder { color: var(--placeholder); }
.qty-row input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--input-focus); }
.qty-row input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--error); }
.qty-volume-pair { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 6px; }
.qty-volume-pair input:first-child { text-align: right; font-variant-numeric: tabular-nums; }
.qty-remove { display: flex; justify-content: center; }
.qty-remove .icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; color: var(--muted); cursor: pointer; }
.qty-remove .icon-btn:hover { color: var(--error); }
.qty-remove .icon-btn .icon { width: 16px; height: 16px; }
.qty-remove .icon-btn[disabled] { opacity: 0.35; pointer-events: none; }
.qty-error { grid-column: 2 / -1; display: block; font-size: 12px; font-weight: 600; color: var(--error); }
.qty-body > .qty-error { margin-top: 8px; }
.qty-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.qty-foot .hint { margin: 0; }
.qty-foot .btn-sm .icon { width: 14px; height: 14px; }
.qty-foot .btn-soft[disabled] { opacity: 0.45; pointer-events: none; }
@media (max-width: 900px) {
    .qty-head { display: none; }
    .qty-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; }
    .qty-no { grid-column: 1; text-align: left; }
    .qty-no::before { content: 'Baris '; font-weight: 700; }
    .qty-remove { grid-column: 2; grid-row: 1; justify-content: flex-end; }
    .qty-cell { grid-column: 1 / -1; }
    .qty-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--label); }
    .qty-error { grid-column: 1 / -1; }
}

/* Kuantitas Pekerjaan, read-only (waiting TimeSheet, accepted TimeSheet) */
.qty-view { margin-top: 12px; }
.qty-view h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: var(--ink); }
.qty-data td.qty-data-no, .qty-data th:first-child { width: 48px; text-align: center; }
.qty-data td.qty-data-volume { white-space: nowrap; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fulfill-grid + .fulfill-quantities, .fulfill-quantities + .fulfill-history { margin-top: 14px; }
.fulfill-quantities .qty-view { margin-top: 4px; }

/* 2.15.1: suggestions for free-text inputs (data-suggest), styled like the glass select instead of the browser's datalist */
.suggest-pop[hidden] { display: none; }
.suggest-pop .select-pop-option { padding: 8px 12px; }
