:root {
    color-scheme: light;
    --green-900: #14532d;
    --green-800: #166534;
    --green-700: #15803d;
    --green-50: #f0fdf4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a, button { -webkit-tap-highlight-color: transparent; }
.app-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(22, 101, 52, .18);
    flex: none;
}
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 18rem;
    flex-direction: column;
    background: rgba(255,255,255,.96);
    border-right: 1px solid #e2e8f0;
    backdrop-filter: blur(14px);
    z-index: 40;
}
.nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 1rem;
    padding: .65rem .85rem;
    font-size: .92rem;
    font-weight: 700;
    transition: all .15s ease;
}
.nav-icon {
    width: 1.35rem;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1;
}
.nav-disabled {
    color: #94a3b8;
    cursor: not-allowed;
}
.nav-badge {
    margin-left: auto;
    font-size: .65rem;
    line-height: 1;
    padding: .25rem .45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}
.card-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.kpi-label { font-size: .875rem; color: #64748b; font-weight: 700; }
.kpi-value { font-size: 2rem; line-height: 1.1; font-weight: 900; margin-top: .5rem; color: var(--green-900); }
.page-wrap { max-width: 80rem; margin: 0 auto; padding: 1.25rem 1rem 6.5rem; }
.page-title { font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.2; font-weight: 900; color: #0f172a; }
.soft-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.action-tile {
    min-height: 5.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.action-tile strong { display:block; font-size: 1rem; color:#0f172a; }
.action-tile small { display:block; margin-top:.15rem; color:#64748b; }
.action-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1.1rem;
    display:grid;
    place-items:center;
    background: var(--green-50);
    color: var(--green-800);
    font-weight: 900;
    font-size: 1.25rem;
    flex:none;
}
.connection-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .45rem .7rem;
    font-size: .78rem;
    font-weight: 800;
    border: 1px solid transparent;
}
.connection-badge::before {
    content: '';
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: currentColor;
}
.connection-badge.online { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.connection-badge.offline { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.bottom-nav {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0,1fr));
    gap: .25rem;
    background: rgba(255,255,255,.96);
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: .45rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
    backdrop-filter: blur(14px);
}
.bottom-nav-item {
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .15rem;
    border-radius: 1rem;
    font-weight: 800;
}
.bottom-nav-item span { font-size: 1.15rem; line-height: 1; }
.bottom-nav-item small { font-size: .68rem; }
.scan-frame {
    aspect-ratio: 1 / 1;
    max-height: 52vh;
    border-radius: 2rem;
    background: radial-gradient(circle at center, rgba(255,255,255,.18), rgba(15,23,42,.92)), #0f172a;
    position: relative;
    overflow: hidden;
}
.scan-frame::after {
    content:'';
    position:absolute;
    inset: 18%;
    border: 3px solid rgba(34,197,94,.9);
    border-radius: 1.25rem;
    box-shadow: 0 0 0 999px rgba(15,23,42,.35);
}
.scan-frame::before {
    content:'';
    position:absolute;
    left: 18%; right: 18%; top: 50%;
    height: 2px;
    background: #22c55e;
    box-shadow: 0 0 16px #22c55e;
    z-index: 2;
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
@media (max-width: 640px) {
    input, select, textarea, button, a { min-height: 44px; }
    .page-wrap { padding-left: .85rem; padding-right: .85rem; }
    .card-kpi { padding: 1rem; border-radius: 1.25rem; }
    .kpi-value { font-size: 1.65rem; }
}
.form-label {
    display: block;
    margin-bottom: .45rem;
    font-size: .78rem;
    font-weight: 900;
    color: #475569;
}
.form-input {
    width: 100%;
    min-height: 46px;
    border-radius: 1rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: .7rem .9rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.btn-primary {
    min-height: 48px;
    border-radius: 1rem;
    background: #166534;
    color: #fff;
    font-weight: 900;
    padding: .75rem 1rem;
    box-shadow: 0 12px 26px rgba(22, 101, 52, .18);
}
.btn-primary:hover { background: #14532d; }
.btn-primary:disabled { opacity: .65; cursor: wait; }
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.app-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}
.app-table th {
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    background: #f8fafc;
    padding: .8rem .9rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.app-table td {
    padding: .9rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}
.app-table tbody tr:hover { background: #f8fafc; }
.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .35rem .65rem;
    font-size: .72rem;
    font-weight: 900;
    border: 1px solid transparent;
}
.status-pill.active { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status-pill.done { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }
.status-pill.draft { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.btn-mini {
    min-height: 36px;
    border-radius: .8rem;
    padding: .45rem .7rem;
    background: #f1f5f9;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
}
.btn-mini:hover { background: #e2e8f0; }
.btn-mini.danger { background: #fee2e2; color: #991b1b; }
.btn-mini.danger:hover { background: #fecaca; }
.status-pill.success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
@media print {
    .app-sidebar, .bottom-nav, header, #btnPrint, #btnSaveSnapshot, #btnReload, #btnClearSnapshot { display: none !important; }
    .lg\:pl-72 { padding-left: 0 !important; }
    .page-wrap { max-width: none; padding: 0 !important; }
    .soft-card, .card-kpi { box-shadow: none !important; break-inside: avoid; }
    body { background: #fff !important; }
}

/* Scanner Penukaran Kupon */
.scan-camera-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 58vh;
    background: #0f172a;
    overflow: hidden;
}
.scan-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.scan-frame-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.scan-frame-overlay::after {
    content: '';
    position: absolute;
    inset: 17%;
    border: 3px solid rgba(34,197,94,.95);
    border-radius: 1.35rem;
    box-shadow: 0 0 0 999px rgba(15,23,42,.38);
}
.scan-frame-overlay::before {
    content: '';
    position: absolute;
    left: 17%;
    right: 17%;
    top: 50%;
    height: 2px;
    background: #22c55e;
    box-shadow: 0 0 18px #22c55e;
    z-index: 2;
}

/* Mobile final polish */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
body {
    background:
        radial-gradient(circle at top left, rgba(22, 163, 74, .08), transparent 34rem),
        #f8fafc;
}
.app-shell,
.page-wrap,
.page-wrap > *,
.soft-card,
.card-kpi,
.action-tile,
.table-wrap,
header,
main,
section,
article,
form {
    min-width: 0;
    max-width: 100%;
}
.soft-card,
.card-kpi,
.action-tile {
    overflow-wrap: anywhere;
}
img, video, canvas, svg {
    max-width: 100%;
}
.form-input,
.btn-primary,
.btn-mini,
button,
select,
textarea,
input {
    max-width: 100%;
}
.page-wrap {
    width: 100%;
}
.page-title {
    letter-spacing: -.025em;
}
.soft-card {
    border-radius: 1.35rem;
}
.action-tile > div:last-child,
.card-kpi > div,
.kpi-label,
.kpi-value {
    min-width: 0;
}
.action-tile strong,
.action-tile small,
.kpi-label,
.kpi-value {
    overflow-wrap: anywhere;
}
.kpi-value {
    font-variant-numeric: tabular-nums;
}
.table-wrap {
    border-radius: 1.25rem;
}
.table-wrap > .app-table {
    max-width: none;
}
.status-pill,
.connection-badge,
.btn-mini,
.btn-primary {
    white-space: nowrap;
}
@media (max-width: 640px) {
    header .px-4 {
        padding-left: .85rem;
        padding-right: .85rem;
    }
    .page-wrap {
        padding: 1rem .75rem 6.25rem;
    }
    .page-wrap > .flex:first-child,
    .page-wrap > .mb-5:first-child,
    .soft-card > .flex,
    .soft-card > .p-4.flex,
    .soft-card > .p-5.flex {
        min-width: 0;
    }
    .page-title {
        font-size: 1.45rem;
    }
    .card-kpi {
        padding: .9rem;
        border-radius: 1.15rem;
    }
    .kpi-label {
        font-size: .72rem;
        line-height: 1.15;
    }
    .kpi-value,
    .kpi-value.text-2xl,
    .kpi-value.text-xl {
        font-size: 1.35rem !important;
        line-height: 1.1;
    }
    .soft-card {
        border-radius: 1.15rem;
    }
    .soft-card.p-5,
    .soft-card .p-5 {
        padding: 1rem;
    }
    .soft-card .p-4 {
        padding: .9rem;
    }
    .action-tile {
        border-radius: 1.15rem;
        padding: .85rem;
        gap: .75rem;
    }
    .action-icon {
        width: 2.55rem;
        height: 2.55rem;
        border-radius: .95rem;
    }
    .bottom-nav {
        left: .5rem;
        right: .5rem;
        bottom: .5rem;
        border-radius: 1.25rem;
    }
    .bottom-nav-item small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .table-wrap {
        margin-left: -.05rem;
        margin-right: -.05rem;
        border-radius: 1rem;
    }
    .app-table {
        min-width: 640px;
    }
    .app-table th,
    .app-table td {
        padding: .7rem .75rem;
        font-size: .82rem;
    }
    .form-input {
        border-radius: .9rem;
        padding-left: .78rem;
        padding-right: .78rem;
    }
    .btn-primary,
    .btn-mini {
        border-radius: .9rem;
    }
    .grid.grid-cols-2,
    .grid.grid-cols-3 {
        gap: .65rem;
    }
    .scan-camera-wrap,
    .scan-frame {
        max-height: 48vh;
        border-radius: 1.25rem;
    }
}
@media (max-width: 390px) {
    .page-wrap {
        padding-left: .6rem;
        padding-right: .6rem;
    }
    .kpi-value,
    .kpi-value.text-2xl,
    .kpi-value.text-xl {
        font-size: 1.18rem !important;
    }
    .bottom-nav-item small {
        font-size: .62rem;
    }
}

@media (max-width: 640px) {
    .coupon-grid {
        grid-template-columns: 1fr !important;
    }
    .coupon-card {
        grid-template-columns: 74px minmax(0, 1fr) !important;
        gap: .75rem !important;
        padding: .8rem !important;
        border-radius: 1rem !important;
    }
    .coupon-card img {
        width: 74px !important;
        height: 74px !important;
    }
    .coupon-code,
    .coupon-name,
    .coupon-meta {
        overflow-wrap: anywhere;
    }
    .hour-line {
        grid-template-columns: 48px minmax(0, 1fr) 44px !important;
        gap: .5rem !important;
    }
    #manualScanForm {
        flex-direction: column;
    }
}

/* Admin mobile navigation */
.admin-mobile-dock {
    position: fixed;
    left: .65rem;
    right: .65rem;
    bottom: .65rem;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .28rem;
    padding: .45rem;
    border-radius: 1.45rem;
    border: 1px solid rgba(226, 232, 240, .95);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .16);
    backdrop-filter: blur(18px);
}
.admin-mobile-nav-item {
    min-width: 0;
    min-height: 54px;
    border-radius: 1.05rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    color: #64748b;
    font-weight: 900;
    transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.admin-mobile-nav-item span {
    font-size: 1.2rem;
    line-height: 1;
}
.admin-mobile-nav-item small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .64rem;
    line-height: 1;
}
.admin-mobile-nav-item.active,
.admin-mobile-menu-trigger {
    color: #166534;
    background: #dcfce7;
}
.admin-mobile-menu-trigger {
    border: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}
.admin-mobile-nav-item:active {
    transform: scale(.96);
}
.admin-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}
.admin-mobile-menu.open {
    pointer-events: auto;
    opacity: 1;
}
.admin-mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(5px);
}
.admin-mobile-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    border-radius: 1.7rem 1.7rem 0 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 -18px 60px rgba(15, 23, 42, .25);
    transform: translateY(100%);
    transition: transform .24s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
}
.admin-mobile-menu.open .admin-mobile-menu-panel {
    transform: translateY(0);
}
.admin-mobile-menu-handle {
    width: 3.2rem;
    height: .32rem;
    border-radius: 999px;
    background: #cbd5e1;
    margin: .65rem auto .2rem;
    flex: none;
}
.admin-mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .78);
}
.admin-mobile-menu-close {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    border: 0;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}
.admin-mobile-menu-body {
    overflow-y: auto;
    padding: .9rem .9rem 6rem;
}
.admin-mobile-menu-section + .admin-mobile-menu-section {
    margin-top: 1rem;
}
.admin-mobile-menu-title {
    margin: 0 0 .5rem .15rem;
    font-size: .72rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.admin-mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}
.admin-mobile-menu-grid.one {
    grid-template-columns: 1fr;
}
.admin-mobile-menu-link {
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: .86rem;
    font-weight: 900;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.admin-mobile-menu-link span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-mobile-menu-link.active {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}
.admin-mobile-menu-link.danger {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}
.admin-mobile-menu-link:active {
    transform: scale(.98);
}
.admin-mobile-menu-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .9rem;
    display: grid;
    place-items: center;
    flex: none;
    background: #f1f5f9;
    color: inherit;
    font-size: 1rem;
}
.admin-mobile-menu-link.active .admin-mobile-menu-icon {
    background: #bbf7d0;
}
.admin-mobile-menu-link.danger .admin-mobile-menu-icon {
    background: #ffe4e6;
}
body.admin-mobile-menu-open {
    overflow: hidden;
}
@media (max-width: 640px) {
    .admin-mobile-dock {
        left: .5rem;
        right: .5rem;
        bottom: .5rem;
        border-radius: 1.25rem;
    }
    .admin-mobile-nav-item {
        min-height: 52px;
        border-radius: .95rem;
    }
    .admin-mobile-menu-body {
        padding-left: .75rem;
        padding-right: .75rem;
    }
    .admin-mobile-menu-grid {
        gap: .48rem;
    }
    .admin-mobile-menu-link {
        min-height: 56px;
        border-radius: 1rem;
        padding: .68rem;
    }
}
@media (max-width: 370px) {
    .admin-mobile-nav-item small {
        font-size: .58rem;
    }
    .admin-mobile-menu-link {
        font-size: .8rem;
        gap: .55rem;
    }
    .admin-mobile-menu-icon {
        width: 2.05rem;
        height: 2.05rem;
    }
}

/* Data table compatibility and Lokasi mobile cards */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}
.data-table th {
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    background: #f8fafc;
    padding: .8rem .9rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.data-table td {
    padding: .9rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td:first-child { white-space: normal; min-width: 190px; }
.data-table td:last-child { white-space: nowrap; }

@media (max-width: 640px) {
    .lokasi-mobile-wrap {
        overflow: visible;
        border-radius: 0;
    }
    .lokasi-mobile-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 .75rem;
    }
    .lokasi-mobile-table thead {
        display: none;
    }
    .lokasi-mobile-table tbody,
    .lokasi-mobile-table tr,
    .lokasi-mobile-table td {
        display: block;
        width: 100%;
    }
    .lokasi-mobile-table tr {
        padding: .85rem;
        border: 1px solid #e2e8f0;
        border-radius: 1.15rem;
        background: #fff;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    }
    .lokasi-mobile-table tbody tr:hover {
        background: #fff;
    }
    .lokasi-mobile-table td {
        padding: .48rem 0;
        border-bottom: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .lokasi-mobile-table td:not(.lokasi-main-cell):not(.lokasi-action-cell) {
        display: grid;
        grid-template-columns: 7.2rem minmax(0, 1fr);
        align-items: center;
        gap: .7rem;
        font-size: .88rem;
        font-weight: 800;
        color: #0f172a;
    }
    .lokasi-mobile-table td:not(.lokasi-main-cell):not(.lokasi-action-cell)::before {
        content: attr(data-label);
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .lokasi-main-cell {
        padding-bottom: .72rem !important;
        margin-bottom: .35rem;
        border-bottom: 1px dashed #e2e8f0 !important;
    }
    .lokasi-main-cell b {
        display: block;
        font-size: 1rem;
        line-height: 1.25;
        color: #0f172a;
    }
    .lokasi-action-cell {
        display: flex !important;
        flex-wrap: wrap;
        gap: .45rem;
        padding-top: .75rem !important;
        margin-top: .35rem;
        border-top: 1px dashed #e2e8f0 !important;
    }
    .lokasi-action-cell::before {
        content: attr(data-label);
        width: 100%;
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .lokasi-action-cell .btn-mini {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
        min-height: 38px;
        padding-left: .75rem;
        padding-right: .75rem;
    }
}

/* Finalisasi input anggaran */
.anggaran-form-card .form-input {
    font-weight: 800;
}
.anggaran-form-card .form-input::placeholder {
    color: #94a3b8;
    font-weight: 700;
}
.money-input {
    font-size: 1.08rem;
    letter-spacing: .01em;
}
.anggaran-section-title {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 .85rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.total-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-radius: 1.25rem;
    padding: .85rem 1rem;
}
.total-preview span {
    color: #64748b;
    font-size: .82rem;
    font-weight: 850;
}
.total-preview strong {
    color: #047857;
    font-size: 1.08rem;
    font-weight: 1000;
    white-space: nowrap;
}
.total-preview.realization {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
}
.total-preview.realization strong {
    color: #0369a1;
}
.anggaran-table td,
.anggaran-table th {
    white-space: nowrap;
}
.anggaran-table td:nth-child(2),
.anggaran-table th:nth-child(2) {
    min-width: 220px;
    white-space: normal;
}
@media (max-width: 640px) {
    .anggaran-table-wrap {
        overflow: visible;
    }
    .anggaran-table,
    .anggaran-table thead,
    .anggaran-table tbody,
    .anggaran-table tr,
    .anggaran-table td {
        display: block;
        width: 100%;
    }
    .anggaran-table thead {
        display: none;
    }
    .anggaran-table tr {
        margin: .85rem;
        padding: .9rem;
        border: 1px solid #e2e8f0;
        border-radius: 1.25rem;
        background: #fff;
        box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
    }
    .anggaran-table td {
        border: 0 !important;
        padding: .45rem 0 !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .anggaran-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .15rem;
        color: #94a3b8;
        font-size: .7rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .anggaran-table td[data-label="Aksi"] {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
        padding-top: .75rem !important;
    }
    .anggaran-table td[data-label="Aksi"]::before {
        width: 100%;
    }
    .total-preview {
        align-items: flex-start;
        flex-direction: column;
        gap: .2rem;
    }
    .total-preview strong {
        font-size: 1.2rem;
    }
}

/* Revisi anggaran: rencana dan realisasi dipisah */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border-radius: 1rem;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 900;
    padding: .8rem 1rem;
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #e2e8f0; }
.btn-mini.active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.realisasi-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 1.25rem;
}
.anggaran-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-start;
}
@media (max-width: 640px) {
    .anggaran-actions { justify-content: flex-end; }
    .anggaran-form-card .grid.grid-cols-2 { grid-template-columns: 1fr; }
    .realisasi-panel { padding: .75rem; }
}
