:root {
    --blue-950: #061a35;
    --blue-900: #082247;
    --blue-800: #0b356d;
    --blue-700: #0e4d9a;
    --blue-600: #1469c9;
    --blue-100: #e9f2ff;
    --line: #cfdced;
    --soft: #eef5ff;
}

/* HR mobile FAB bubble menu. Scoped to HR so it can be removed without touching desktop nav. */
.hr-mobile-fab,
.hr-mobile-fab-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .hr-mobile-fab-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1038;
        display: block;
        background: rgba(6, 26, 53, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .24s ease;
    }

    .hr-mobile-fab-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .hr-mobile-fab {
        --hr-fab-size: 58px;
        --hr-bubble-size: 48px;
        position: fixed;
        right: 18px;
        bottom: calc(20px + env(safe-area-inset-bottom));
        z-index: 1042;
        display: block;
    }

    .hr-mobile-fab.is-compact {
        --hr-bubble-size: 40px;
    }

    .hr-mobile-fab.is-compact .hr-mobile-fab-label {
        padding: 4px 9px;
        font-size: .7rem;
    }

    .hr-mobile-fab.is-compact .hr-mobile-fab-bubble i {
        font-size: 1rem;
    }

    .hr-mobile-fab-main,
    .hr-mobile-fab-bubble {
        border: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        line-height: 1;
    }

    .hr-mobile-fab-main {
        position: relative;
        z-index: 2;
        width: var(--hr-fab-size);
        height: var(--hr-fab-size);
        background: #1469c9;
        color: #fff;
        box-shadow: 0 12px 26px rgba(20, 105, 201, .38);
        transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), background-color .2s ease;
    }

    .hr-mobile-fab-main i {
        font-size: 1.35rem;
        transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
    }

    .hr-mobile-fab.open .hr-mobile-fab-main {
        background: #d04444;
    }

    .hr-mobile-fab.open .hr-mobile-fab-main i {
        transform: scale(.9);
    }

    .hr-mobile-fab-menu {
        position: absolute;
        right: calc((var(--hr-fab-size) - var(--hr-bubble-size)) / 2);
        bottom: calc(var(--hr-fab-size) / 2);
        width: var(--hr-bubble-size);
        height: 0;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .hr-mobile-fab-item {
        position: absolute;
        right: 0;
        bottom: 0;
        transform: translateY(0) scale(.2);
        opacity: 0;
        pointer-events: none;
        transition: transform .36s cubic-bezier(.34, 1.7, .5, 1), opacity .2s ease;
    }

    .hr-mobile-fab.open .hr-mobile-fab-item {
        transform: translateY(var(--hr-fab-y)) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    .hr-mobile-fab-item.sub-open {
        z-index: 4;
    }

    .hr-mobile-fab-row {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 9px;
    }

    .hr-mobile-fab-row form {
        margin: 0;
    }

    .hr-mobile-fab-bubble {
        position: relative;
        width: var(--hr-bubble-size);
        height: var(--hr-bubble-size);
        background: #fff;
        color: #0f172a;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
        transition: transform .15s ease, background-color .18s ease, color .18s ease;
    }

    .hr-mobile-fab-bubble i {
        font-size: 1.15rem;
    }

    .hr-mobile-fab-bubble:hover,
    .hr-mobile-fab-bubble:focus {
        color: #1469c9;
        transform: scale(1.06);
    }

    .hr-mobile-fab-item.active .hr-mobile-fab-bubble {
        background: #e9f2ff;
        color: #0e4d9a;
    }

    .hr-mobile-fab-item.danger .hr-mobile-fab-bubble {
        color: #b42318;
    }

    .hr-mobile-fab-item.has-sub .hr-mobile-fab-bubble::after {
        content: "";
        position: absolute;
        top: 4px;
        right: 4px;
        width: 9px;
        height: 9px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: #f59e0b;
    }

    .hr-mobile-fab-item.sub-open .hr-mobile-fab-bubble {
        background: #061a35;
        color: #fff;
    }

    .hr-mobile-fab-item.sub-open .hr-mobile-fab-bubble::after {
        background: #22c55e;
    }

    .hr-mobile-fab-label {
        max-width: 54vw;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(6, 26, 53, .88);
        color: #fff;
        font-size: .76rem;
        font-weight: 750;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity .16s ease;
    }

    .hr-mobile-fab.any-sub-open .hr-mobile-fab-label {
        opacity: 0;
    }

    .hr-mobile-fab-submenu {
        position: absolute;
        right: calc(var(--hr-bubble-size) + 12px);
        bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        width: max-content;
        max-width: min(72vw, 286px);
        max-height: min(
            72vh,
            calc(100vh - 67px - env(safe-area-inset-top) - env(safe-area-inset-bottom) + var(--hr-fab-y))
        );
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        margin: 0;
        list-style: none;
        pointer-events: none;
    }

    .hr-mobile-fab-item.sub-open > .hr-mobile-fab-submenu {
        padding: 2px 0;
        pointer-events: auto;
    }

    .hr-mobile-fab-subitem {
        max-width: 100%;
        transform: translateX(22px) scale(.48);
        transform-origin: right center;
        opacity: 0;
        transition: transform .3s cubic-bezier(.34, 1.7, .5, 1), opacity .18s ease;
    }

    .hr-mobile-fab-item.sub-open .hr-mobile-fab-subitem {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    .hr-mobile-fab-pill {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        max-width: 100%;
        min-height: 42px;
        padding: 8px 11px;
        border-radius: 999px;
        background: #fff;
        color: #172033;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
        text-decoration: none;
        font-size: .78rem;
        font-weight: 750;
        line-height: 1.2;
        text-align: right;
        transition: transform .15s ease, background-color .18s ease, color .18s ease;
    }

    .hr-mobile-fab-pill:hover,
    .hr-mobile-fab-pill:focus,
    .hr-mobile-fab-subitem.active .hr-mobile-fab-pill {
        background: #e9f2ff;
        color: #0e4d9a;
        transform: translateX(-2px);
    }

    .hr-mobile-fab-pill-text {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .hr-mobile-fab-pill i {
        flex: 0 0 auto;
        color: #1469c9;
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hr-mobile-fab-backdrop,
    .hr-mobile-fab-main,
    .hr-mobile-fab-main i,
    .hr-mobile-fab-item,
    .hr-mobile-fab-bubble,
    .hr-mobile-fab-label,
    .hr-mobile-fab-subitem,
    .hr-mobile-fab-pill {
        transition-duration: .01s !important;
    }
}

.hr-map-picker {
    width: 100%;
    min-height: 280px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    overflow: hidden;
}

.hr-map-picker-message {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 76px;
    border: 1px dashed rgba(15, 23, 42, .24);
    border-radius: 8px;
    padding: 1rem;
    color: #64748b;
    background: #f8fafc;
}

.hr-map-fallback-note {
    padding: .55rem .75rem;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, .12);
    font-size: .86rem;
}

.hr-map-fallback-canvas {
    min-height: 238px;
}

.hr-attendance-map {
    width: 100%;
    min-height: 280px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    overflow: hidden;
    background: #eef5ff;
}

.hr-attendance-map-canvas {
    min-height: 238px;
}

.hr-camera-preview {
    width: 100%;
    max-height: 320px;
    background: #111827;
    border-radius: 8px;
    object-fit: cover;
}

body {
    background: var(--soft);
    color: #172033;
    overflow-x: hidden;
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
.h4,
.h5 {
    color: #061a35;
    letter-spacing: 0;
}

.app-main {
    padding: 24px;
    min-width: 0;
}

.app-main.is-loading {
    cursor: progress;
    opacity: .72;
    pointer-events: none;
    transition: opacity .16s ease;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    background: linear-gradient(180deg, var(--blue-950), var(--blue-900));
    color: #fff;
    z-index: 1030;
}

.sidebar-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 264px;
    background: linear-gradient(180deg, var(--blue-950), var(--blue-900));
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.09);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.brand-mark img,
.mobile-app-logo img,
.login-splash-mark img,
.login-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-brand small,
.sidebar-user small {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 12px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.sidebar-link,
.sidebar-submenu a {
    display: block;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-submenu a:hover {
    background: rgba(255,255,255,.11);
    color: #fff;
}

.sidebar-link.active,
.sidebar-submenu a.active {
    background: linear-gradient(90deg, rgba(45,140,255,.38), rgba(123,184,255,.16));
    color: #fff;
    box-shadow: inset 3px 0 0 #8fc5ff;
}

.sidebar-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.88);
    padding: 11px 12px;
    border-radius: 6px;
    font-weight: 700;
    text-align: left;
}

.sidebar-group:hover,
.sidebar-group:not(.collapsed) {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar-group::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.sidebar-group:not(.collapsed)::after {
    transform: rotate(225deg);
}

.sidebar-submenu {
    padding: 4px 0 8px 10px;
}

.sidebar-submenu a {
    color: rgba(255,255,255,.68);
    font-size: 14px;
    padding-left: 18px;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.sidebar-user > div {
    min-width: 0;
}

.mobile-setting-button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.mobile-icon-shell {
    padding: 18px 8px 12px;
    background: #f3f6fa;
}

.mobile-appbar {
    margin: 0 0 16px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.mobile-appbrand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
    text-decoration: none;
}

.mobile-app-logo {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .12);
}

.mobile-appbrand > span:last-child {
    min-width: 0;
}

.mobile-appbrand strong,
.mobile-appbrand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-appbrand strong {
    font-size: 15px;
    line-height: 1.2;
}

.mobile-appbrand small {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.mobile-icon-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.mobile-menu-tile {
    min-width: 0;
    aspect-ratio: 1 / .84;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #edf1f6;
    border-radius: 14px;
    background: #fff;
    color: #111827;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    text-decoration: none;
    text-align: center;
}

.mobile-menu-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #0485bd;
    color: #fff;
    box-shadow: 0 8px 16px rgba(4, 133, 189, .25);
}

.mobile-menu-icon i {
    font-size: 25px;
    line-height: 1;
}

.mobile-menu-tile > span:last-child {
    width: 100%;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.mobile-menu-tile.active,
.mobile-menu-tile:focus,
.mobile-menu-tile:hover {
    border-color: #bfe5f6;
    color: #045d86;
    box-shadow: 0 10px 26px rgba(4, 133, 189, .18);
}

.mobile-menu-tile.active .mobile-menu-icon,
.mobile-menu-tile:focus .mobile-menu-icon,
.mobile-menu-tile:hover .mobile-menu-icon {
    background: #0477aa;
}

.mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 64px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .12);
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: #6b7280;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
}

.mobile-bottom-nav form {
    display: contents;
}

.mobile-bottom-nav i {
    font-size: 21px;
    line-height: 1;
}

.mobile-bottom-nav span {
    width: 100%;
    font-size: 11px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-nav .active {
    color: #0485bd;
}

.mobile-menu-modal .modal-content {
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-menu-modal .modal-header {
    background: var(--blue-900);
    color: #fff;
    border: 0;
}

.mobile-menu-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-modal .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: .9;
}

.mobile-popup-list {
    display: grid;
    gap: 8px;
}

.mobile-popup-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #172033;
    background: #f8fbff;
    text-decoration: none;
    font-weight: 700;
}

.mobile-popup-list a.active {
    border-color: var(--blue-700);
    background: var(--blue-100);
    color: var(--blue-900);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--soft);
}

.login-splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(160deg, rgba(6, 26, 53, .96), rgba(11, 53, 109, .94)),
        var(--blue-950);
    color: #fff;
    transition: opacity .35s ease, visibility .35s ease;
}

.login-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-splash-content {
    width: min(100%, 520px);
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.login-splash-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #fff;
    color: #111827;
    font-size: 28px;
    font-weight: 850;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.login-splash h1 {
    max-width: 390px;
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 2.6vw, 30px);
    font-weight: 850;
    line-height: 1.15;
}

.login-splash-progress {
    width: min(100%, 420px);
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.login-splash-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7bb8ff, #2d8cff, #22a884);
    transition: width .08s linear;
}

.login-splash-percent {
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    font-weight: 800;
}

.login-panel-delayed {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease;
}

.login-panel-delayed.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.login-panel {
    width: min(100%, 920px);
    min-height: 540px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(31, 41, 55, .08);
}

.login-brand-panel {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 42px;
    background:
        linear-gradient(150deg, rgba(6, 26, 53, .97), rgba(11, 53, 109, .94)),
        var(--blue-950);
    color: #fff;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -95px;
    width: 240px;
    height: 240px;
    border: 38px solid rgba(123, 184, 255, .18);
    border-radius: 50%;
}

.login-brand-mark {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-size: 25px;
    font-weight: 850;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.login-brand-panel > div {
    position: relative;
    z-index: 1;
}

.login-brand-kicker {
    display: block;
    margin-bottom: 10px;
    color: #9ed0ff;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.login-brand-panel h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 850;
    line-height: 1.05;
}

.login-brand-panel p {
    max-width: 390px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .74);
    line-height: 1.55;
}

.login-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 750;
}

.login-form-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
}

.login-form-heading {
    margin-bottom: 28px;
}

.login-form-heading h2 {
    margin: 0 0 6px;
    color: var(--blue-950);
    font-size: 28px;
    font-weight: 850;
}

.login-form-heading p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8ca5;
    font-size: 17px;
    pointer-events: none;
}

.login-input-wrap .form-control {
    min-height: 46px;
    padding-left: 42px;
    border-color: #cbd9ec;
    border-radius: 8px;
    background: #f9fbff;
}

.login-input-wrap .form-control:focus {
    background: #fff;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 .2rem rgba(20, 105, 201, .14);
}

.login-submit {
    min-height: 46px;
    border-radius: 8px;
    font-weight: 800;
}

.login-help-text {
    margin: 18px 0 0;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.login-secondary-action {
    margin-top: 14px;
    text-align: center;
}

.login-secondary-action a {
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.login-secondary-action a:hover {
    color: var(--blue-900);
    text-decoration: underline;
}

.login-app-switcher {
    margin-top: 18px;
}

.login-app-switcher a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    color: var(--blue-900);
    text-decoration: none;
    border: 1px solid #cbd9ec;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #edf6ff 100%);
    box-shadow: 0 12px 28px rgba(15, 50, 86, .08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.login-app-switcher a:hover,
.login-app-switcher a:focus {
    color: var(--blue-900);
    border-color: var(--blue-600);
    box-shadow: 0 16px 34px rgba(20, 105, 201, .16);
    transform: translateY(-1px);
}

.login-app-switcher-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 8px;
    background: var(--blue-700);
    box-shadow: 0 10px 20px rgba(20, 105, 201, .2);
}

.login-app-switcher strong,
.login-app-switcher small {
    display: block;
    line-height: 1.25;
}

.login-app-switcher strong {
    font-size: 14px;
    font-weight: 800;
}

.login-app-switcher small {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.login-app-switcher-arrow {
    margin-left: auto;
    color: var(--blue-700);
    font-size: 24px;
    transition: transform .18s ease;
}

.login-app-switcher a:hover .login-app-switcher-arrow,
.login-app-switcher a:focus .login-app-switcher-arrow {
    transform: translateX(3px);
}

.app-toast-container {
    z-index: 1085;
}

.app-toast {
    width: min(380px, calc(100vw - 24px));
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 50px rgba(15, 50, 86, .16);
    backdrop-filter: blur(10px);
}

.app-toast + .app-toast {
    margin-top: 10px;
}

.app-toast-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 8px;
    font-size: 20px;
}

.app-toast-success .app-toast-icon {
    background: #16875a;
}

.app-toast-error .app-toast-icon {
    background: #d04444;
}

.app-toast-body {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.app-toast-body strong {
    color: var(--blue-900);
    font-size: 14px;
    font-weight: 800;
}

.app-toast-body span {
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.app-toast .btn-close {
    align-self: start;
    margin-top: 2px;
}

.app-confirm-modal .modal-content {
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 50, 86, .2);
}

.brand-strip {
    height: 8px;
    background: linear-gradient(90deg, var(--blue-900), var(--blue-600), #8fc5ff);
}

.branch-access-picker {
    display: grid;
    gap: 12px;
    padding: 10px;
    border: 1px solid #cbd9ec;
    border-radius: 8px;
    background: #f8fbff;
}

.branch-access-group {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #fff;
}

.branch-access-company {
    color: var(--blue-900);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.branch-access-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.branch-access-option {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #f8fbff;
    color: #24324a;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.branch-access-option:hover {
    border-color: #9fc3ef;
    background: #f3f8ff;
}

.branch-access-option:has(input:checked) {
    border-color: var(--blue-600);
    background: #eaf3ff;
    box-shadow: inset 3px 0 0 var(--blue-600);
}

.branch-access-option .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.branch-access-option span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.metric-card,
.work-panel,
.table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.app-main > .d-flex.justify-content-between,
.app-main > .d-flex.flex-wrap.justify-content-between {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(207, 220, 237, .75);
}

.app-main > .d-flex.justify-content-between h1,
.app-main > .d-flex.flex-wrap.justify-content-between h1 {
    color: #061a35;
    font-weight: 750;
}

.app-main > .d-flex.justify-content-between .text-secondary,
.app-main > .d-flex.flex-wrap.justify-content-between .text-secondary {
    margin-top: 3px;
    color: #64748b !important;
}

.app-main > .d-flex.justify-content-between > div:last-child,
.app-main > .d-flex.flex-wrap.justify-content-between > div:last-child {
    align-self: center;
}

.dashboard-page {
    max-width: 1480px;
    margin: 0 auto;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(207, 220, 237, .75);
}

.dashboard-hero-copy {
    min-width: 0;
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-branch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #cddcf0;
    border-radius: 8px;
    background: #fff;
    color: var(--blue-900);
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.dashboard-hero-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-health {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.dashboard-health.is-ok {
    background: #edfdf5;
    border-color: #b9efd0;
    color: #166534;
}

.dashboard-mode-toggle {
    width: 42px;
    min-width: 42px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-metric {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-metric-head {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #52627a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.dashboard-metric-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eaf3ff;
    color: var(--blue-700);
    font-size: 17px;
}

.metric-value {
    font-size: clamp(18px, 1.35vw, 25px);
    font-weight: 800;
    color: var(--blue-900);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.metric-value-currency {
    font-size: clamp(17px, 1.15vw, 22px);
    white-space: nowrap;
}

.dashboard-metric-note {
    color: #7b8798;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-panel-title > span {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-panel-title .btn {
    flex: 0 0 auto;
}

.status-row,
.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #e4edf7;
}

.status-row > div,
.dashboard-list-item > div {
    min-width: 0;
}

.status-row span {
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.status-row strong,
.dashboard-list-item > span {
    flex: 0 0 auto;
}

.status-row strong {
    min-width: 34px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 4px 9px;
    border-radius: 8px;
    background: #f3f8ff;
    color: var(--blue-900);
    font-size: 14px;
}

.status-row:last-child,
.dashboard-list-item:last-child {
    border-bottom: 0;
}

.status-progress {
    width: min(190px, 44vw);
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf0f7;
}

.status-progress span {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-700), #22a884);
}

.dashboard-list-item strong {
    display: block;
    color: var(--blue-900);
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.dashboard-list-item small {
    display: block;
    color: #6b7280;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-list-item > span {
    font-weight: 800;
    color: var(--blue-800);
    white-space: nowrap;
}

.dashboard-empty {
    padding: 14px;
    border-radius: 8px;
    background: #f5f9ff;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.mini-chart {
    height: 204px;
    display: flex;
    align-items: end;
    gap: 8px;
    padding-top: 8px;
}

.chart-bar-wrap {
    flex: 1;
    min-width: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    gap: 6px;
}

.chart-bar {
    width: 100%;
    max-width: 22px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, #2d8cff, var(--blue-800));
}

.chart-bar-wrap small {
    color: #6b7280;
    font-size: 11px;
}

.dashboard-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.budget-ring-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}

.budget-ring {
    --budget-percent: 0%;
    width: 112px;
    height: 112px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--sia-primary) var(--budget-percent), #e7eef5 0);
    position: relative;
}

.budget-ring::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    background: #fff;
}

.budget-ring span {
    position: relative;
    z-index: 1;
    color: var(--sia-primary);
    font-weight: 900;
    font-size: 22px;
}

.budget-ring-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.budget-ring-copy strong {
    color: var(--blue-900);
    font-size: 20px;
    font-weight: 850;
}

.budget-ring-copy small {
    color: var(--sia-muted);
    font-weight: 700;
}

.dashboard-rank-list,
.branch-cash-list {
    display: grid;
    gap: 13px;
}

.dashboard-rank-item {
    display: grid;
    gap: 7px;
}

.dashboard-rank-item strong,
.branch-cash-head strong {
    display: block;
    color: var(--blue-900);
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-rank-item small,
.branch-cash-head small {
    color: var(--sia-muted);
    font-size: 12px;
    font-weight: 750;
}

.dashboard-rank-bar,
.branch-cash-bars {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9f0f7;
}

.dashboard-rank-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sia-primary), #28a8a0);
}

.branch-cash-item {
    display: grid;
    gap: 8px;
}

.branch-cash-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.branch-cash-bars {
    display: flex;
    gap: 3px;
    background: transparent;
}

.branch-cash-bars span {
    display: block;
    min-width: 4px;
    height: 8px;
    border-radius: 999px;
}

.branch-cash-bars .is-in {
    background: #22a884;
}

.branch-cash-bars .is-out {
    background: #f59f00;
}

.dashboard-donut-layout {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.dashboard-donut {
    --seg-a: 0%;
    --seg-b: 0%;
    --seg-c: 0%;
    --color-a: var(--sia-primary);
    --color-b: #f59f00;
    --color-c: #ef4444;
    width: 154px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--color-a) 0 var(--seg-a),
            var(--color-b) var(--seg-a) 100%
        );
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.dashboard-donut-three {
    background:
        conic-gradient(
            var(--color-a) 0 var(--seg-a),
            var(--color-b) var(--seg-a) calc(var(--seg-a) + var(--seg-b)),
            var(--color-c) calc(var(--seg-a) + var(--seg-b)) 100%
        );
}

.dashboard-donut::after {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: inherit;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(219, 228, 239, 0.8);
}

.dashboard-donut > div {
    position: relative;
    z-index: 1;
    max-width: 96px;
    display: grid;
    justify-items: center;
    gap: 3px;
    text-align: center;
}

.dashboard-donut strong {
    color: var(--blue-900);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.dashboard-donut small {
    color: var(--sia-muted);
    font-size: 11px;
    font-weight: 800;
}

.dashboard-donut-legend {
    display: grid;
    gap: 10px;
}

.dashboard-donut-legend > div {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e4edf7;
}

.dashboard-donut-legend > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dashboard-donut-legend span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dashboard-donut-legend strong {
    min-width: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}

.dashboard-donut-legend em {
    color: var(--blue-900);
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .app-main {
        margin-left: 264px;
        padding: 28px;
    }

}

@media (max-width: 1399.98px) {
    .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-main {
        padding: 14px 14px 92px;
    }

    .auth-shell {
        padding: 16px;
    }

    .login-panel {
        width: min(100%, 520px);
        min-height: auto;
        grid-template-columns: minmax(0, 1fr);
    }

    .login-brand-panel {
        gap: 16px;
        padding: 24px;
    }

    .login-brand-panel::after {
        right: -120px;
        bottom: -130px;
    }

    .login-brand-panel h1 {
        font-size: 26px;
    }

    .login-brand-panel p {
        max-width: none;
        margin-top: 8px;
        font-size: 13px;
    }

    .login-feature-list {
        gap: 8px;
    }

    .login-feature-list span {
        min-height: 32px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .login-form-panel {
        padding: 24px;
    }

    .login-form-heading {
        margin-bottom: 20px;
    }

    .login-form-heading h2 {
        font-size: 24px;
    }

    .metric-card,
    .work-panel,
    .table-wrap {
        padding: 14px;
    }

    .table-wrap {
        border-radius: 6px;
    }

    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero-stats {
        justify-content: flex-start;
    }

    .budget-ring-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-donut-layout {
        grid-template-columns: 128px minmax(0, 1fr);
        gap: 14px;
    }

    .dashboard-donut {
        width: 128px;
    }

    .dashboard-metric {
        min-height: 118px;
    }

    .dashboard-hero {
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .mini-chart {
        height: 180px;
    }

    .app-main > .d-flex.justify-content-between,
    .app-main > .d-flex.flex-wrap.justify-content-between {
        margin-bottom: 14px !important;
    }

    .d-flex.justify-content-between,
    .d-flex.flex-wrap.justify-content-between {
        align-items: flex-start !important;
    }

    .btn {
        white-space: nowrap;
    }

    .sidebar-inner {
        width: 286px;
    }

    .sidebar-user {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .branch-access-picker {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .branch-access-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-page {
        margin-inline: -2px;
    }

    .dashboard-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding-bottom: 12px;
    }

    .dashboard-branch {
        justify-content: center;
        width: 100%;
        min-height: 40px;
    }

    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric {
        min-height: 112px;
        gap: 8px;
    }

    .dashboard-metric-head {
        align-items: flex-start;
        gap: 8px;
        font-size: 12px;
    }

    .dashboard-metric-icon {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .metric-value {
        font-size: 18px;
    }

    .metric-value-currency {
        font-size: 17px;
        white-space: normal;
    }

    .dashboard-metric-note,
    .dashboard-panel-title > span {
        font-size: 11px;
    }

    .dashboard-panel-title {
        align-items: flex-start;
        margin-bottom: 10px;
    }

    .status-row,
    .dashboard-list-item {
        align-items: flex-start;
        gap: 10px;
    }

    .dashboard-list-item {
        padding: 12px 0;
    }

    .dashboard-list-item > span:not(.badge) {
        max-width: 42%;
        white-space: normal;
        text-align: right;
    }

    .status-progress {
        width: min(150px, 52vw);
    }

    .mini-chart {
        height: 150px;
        gap: 5px;
    }

    .chart-bar {
        max-width: 18px;
    }
}

@media (max-width: 424.98px) {
    .dashboard-metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-metric {
        min-height: auto;
    }

    .dashboard-metric-head {
        align-items: center;
    }
}

@media (max-width: 374.98px) {
    .mobile-icon-shell {
        padding-inline: 6px;
    }

    .mobile-appbar {
        border-radius: 12px;
        padding: 10px;
    }

    .mobile-app-logo {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .mobile-icon-menu {
        gap: 12px;
    }

    .mobile-menu-tile {
        border-radius: 12px;
        gap: 9px;
    }

    .mobile-menu-icon {
        width: 48px;
        height: 48px;
    }

    .mobile-menu-tile > span:last-child {
        font-size: 12px;
    }
}

.flow-box {
    min-height: 92px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue-600);
    border-radius: 6px;
    padding: 16px;
    background: #f8fbff;
    font-weight: 600;
}

.table-wrap {
    padding: 12px;
    overflow-x: auto;
}

.table {
    --bs-table-striped-bg: #f8fbff;
    --bs-table-hover-bg: #eef5ff;
}

.table thead th {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: #f3f8ff;
    border-bottom-color: var(--line);
}

.table tbody td {
    color: #172033;
}

.table tbody tr:hover td {
    background: #f8fbff;
}

.table td .btn,
.table td form .btn {
    margin-block: 2px;
}

.table-wrap .table {
    width: 100% !important;
}

.table-wrap .table th,
.table-wrap .table td {
    white-space: nowrap;
}

.table-wrap .table td {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-wrap .table td:last-child {
    overflow: visible;
}

.dataTables_wrapper,
.dt-container {
    width: 100%;
}

.table-filter-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.server-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.server-table-toolbar .form-select {
    width: auto;
    min-width: 82px;
}

.server-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
}

.server-pagination-info {
    flex: 1 1 auto;
    min-width: 180px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.server-pagination .pagination {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.server-pagination .page-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.server-row-number {
    width: 1%;
    min-width: 48px;
    text-align: center !important;
    white-space: nowrap;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    .table-wrap table.server-table,
    .table-wrap table.server-table thead,
    .table-wrap table.server-table tbody,
    .table-wrap table.server-table th,
    .table-wrap table.server-table td,
    .table-wrap table.server-table tr {
        display: block;
    }

    .table-wrap table.server-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .table-wrap table.server-table tbody tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
    }

    .table-wrap table.server-table tbody td {
        max-width: none;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        white-space: normal;
        text-align: right;
    }

    .table-wrap table.server-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
    }

    .table-wrap table.server-table tbody td:last-child {
        justify-content: flex-end;
    }

    .table-wrap table.server-table tbody td:last-child::before {
        display: none;
    }

    .server-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

.dataTables_filter,
.dt-search {
    flex: 1 1 360px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.table-branch-filter {
    flex: 0 1 320px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: min(100%, 320px);
}

.table-branch-filter .form-select {
    min-width: 0;
}

.dataTables_filter label,
.dt-search label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: min(100%, 360px);
}

.dataTables_filter input,
.dt-search input {
    min-width: 0;
}

.dataTables_length label,
.dt-length label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.dataTables_paginate,
.dt-paging {
    overflow-x: auto;
}

.transaction-lines th,
.transaction-lines td {
    vertical-align: middle;
}

.transaction-lines {
    min-width: 560px;
}

.transaction-lines .form-select,
.transaction-lines .form-control {
    min-width: 110px;
}

.transaction-lines .form-select {
    min-width: 240px;
}

.sale-modal-dialog {
    max-width: min(1280px, calc(100vw - 48px));
}

.sale-total-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: #f8fbff;
}

.sale-total-panel span {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
}

.sale-total-panel strong {
    min-width: 180px;
    color: #0f172a;
    font-size: 1.18rem;
    text-align: right;
}

.line-action {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.detail-lines {
    display: grid;
    gap: 8px;
}

.detail-line {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fbff;
}

.modal-content {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.modal-header {
    background: #f8fbff;
    border-bottom-color: var(--line);
}

.modal-title {
    color: #061a35;
    font-weight: 750;
}

.modal-footer {
    background: #fff;
    border-top-color: var(--line);
}

.form-label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.form-control,
.form-select {
    border-color: #cfdced;
    border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 .2rem rgba(20, 105, 201, .12);
}

.badge {
    border-radius: 6px;
    font-weight: 750;
}

.money-input {
    font-variant-numeric: tabular-nums;
}

input[name="amount"],
input[name="price"],
input[name="cost"],
input[name="sale_price"],
input[name$="[price]"],
input[name$="[cost]"] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.simple-combobox {
    position: relative;
}

.simple-combobox-control {
    position: relative;
    display: flex;
    align-items: center;
}

.simple-combobox-input {
    width: 100%;
    min-height: 40px;
    padding: .375rem 2.2rem .375rem .75rem;
    border: 1px solid #cfdced;
    border-radius: 7px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.simple-combobox-input:focus {
    border-color: var(--blue-600);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(20, 105, 201, .12);
}

.simple-combobox-clear {
    position: absolute;
    right: 8px;
    width: 26px;
    height: 26px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
}

.simple-combobox-clear.is-visible {
    display: grid;
}

.simple-combobox-clear:hover {
    background: #eef5ff;
    color: var(--blue-800);
}

.simple-combobox-dropdown {
    position: absolute;
    z-index: 2055;
    display: none;
    overflow-y: auto;
    border: 1px solid #cfdced;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.simple-combobox-dropdown.is-open {
    display: block;
}

.simple-combobox-option,
.simple-combobox-empty {
    width: 100%;
    min-height: 38px;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    color: #172033;
    text-align: left;
}

.simple-combobox-option:hover,
.simple-combobox-option:focus {
    background: #eef5ff;
    color: var(--blue-900);
    outline: 0;
}

.simple-combobox-option.is-create-option {
    color: var(--blue-800);
    font-weight: 800;
    background: #f3f8ff;
}

.simple-combobox-empty {
    color: #64748b;
}

.simple-combobox-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-control.is-warning {
    border-color: #f59f00;
    box-shadow: 0 0 0 0.2rem rgba(245, 159, 0, 0.15);
}

.transaction-lines .simple-combobox {
    min-width: 240px;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: rgba(246, 248, 251, .94);
    border-top: 1px solid var(--line);
    padding: 14px 0;
    backdrop-filter: blur(8px);
}

.permission-grid {
    display: grid;
    gap: 8px;
}

.permission-module-list {
    display: grid;
    gap: 14px;
}

.permission-module-header,
.permission-submodule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.permission-module-header {
    padding-bottom: 14px;
    border-bottom: 1px solid #e4edf7;
}

.permission-submodule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 14px;
}

.permission-submodule {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #fbfdff;
}

.permission-submodule-header {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf2f7;
}

.permission-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    overflow-wrap: anywhere;
}

.permission-item small {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

@media (max-width: 1199.98px) {
    .permission-submodule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .permission-module-header,
    .permission-submodule-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-module-header > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .permission-submodule-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.crop-stage {
    min-height: 420px;
    display: grid;
    place-items: center;
    background: #eef5ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.crop-stage img {
    display: block;
    max-width: 100%;
    max-height: 68vh;
}

.crop-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crop-preview-item {
    position: relative;
    display: inline-flex;
}

.crop-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.crop-preview-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

.item-image-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fbff;
}

.item-image-existing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
}

.item-image-card {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.item-image-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.item-image-card .form-check {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    margin: 0;
    padding: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.item-image-card .form-check-input {
    margin: 0;
}

.estimation-header,
.estimation-detail-header {
    align-items: flex-start;
}

.estimation-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.estimation-actions form,
.estimation-actions .btn {
    flex: 0 0 auto;
}

.estimation-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.estimation-info-item {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e5edf8;
    border-radius: 6px;
    background: #f8fbff;
    overflow-wrap: anywhere;
}

.estimation-info-wide {
    grid-column: span 1;
}

.estimation-info-full {
    grid-column: 1 / -1;
}

.estimation-photo-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.estimation-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.estimation-tabs {
    gap: 6px;
    border-bottom: 1px solid var(--line);
}

.estimation-tabs .nav-link {
    min-height: 42px;
    border-radius: 8px 8px 0 0;
    color: #475569;
    font-weight: 700;
}

.estimation-tabs .nav-link.active {
    color: var(--blue-900);
    border-color: var(--line) var(--line) #fff;
}

.estimation-tabs .badge {
    margin-left: 4px;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.estimation-tab-content > .tab-pane > .work-panel,
.estimation-tab-content > .tab-pane > .table-wrap {
    border-top-left-radius: 0;
}

.estimation-detail-page {
    max-width: 1440px;
}

.estimation-detail-header {
    padding: 4px 0 12px;
    border-bottom: 1px solid rgba(207, 220, 237, .7);
}

.estimation-detail-header h1 {
    color: #061a35;
    font-weight: 750;
    letter-spacing: 0;
}

.estimation-detail-header .text-secondary {
    margin-top: 4px;
}

.estimation-actions {
    align-items: center;
}

.estimation-actions .btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.estimation-page [data-estimation-mode-toggle],
.estimation-page [data-estimation-filter] .btn[type="submit"],
.estimation-page [data-estimation-filter] .btn-light {
    min-width: 44px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding-inline: 10px;
}

.list-filter [data-list-filter-mode-toggle],
.list-filter .btn[type="submit"],
.list-filter .btn-light {
    min-width: 44px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding-inline: 10px;
}

.transaction-mobile-label {
    display: none;
}

.estimation-info-panel {
    padding: 18px;
}

.estimation-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.estimation-info-item {
    min-height: 76px;
}

.estimation-info-wide {
    grid-column: span 2;
}

.estimation-info-full {
    grid-column: 1 / -1;
}

.estimation-info-item .small {
    margin-bottom: 4px;
    font-weight: 700;
}

.btn-primary {
    --bs-btn-bg: var(--blue-700);
    --bs-btn-border-color: var(--blue-700);
    --bs-btn-hover-bg: var(--blue-800);
    --bs-btn-hover-border-color: var(--blue-800);
    --bs-btn-active-bg: var(--blue-900);
    --bs-btn-active-border-color: var(--blue-900);
}

.btn {
    border-radius: 7px;
    font-weight: 650;
}

.btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #cfdced;
    --bs-btn-hover-bg: #f3f8ff;
    --bs-btn-hover-border-color: #b8cbe3;
}

.btn-outline-primary {
    --bs-btn-color: var(--blue-700);
    --bs-btn-border-color: #9dc4ef;
    --bs-btn-hover-bg: var(--blue-700);
    --bs-btn-hover-border-color: var(--blue-700);
}

@media (max-width: 767.98px) {
    h1,
    .h1 {
        font-size: 1.45rem;
    }

    h2,
    .h2 {
        font-size: 1.2rem;
    }

    .d-flex.justify-content-between,
    .d-flex.flex-wrap.justify-content-between {
        flex-direction: column;
        gap: 12px !important;
    }

    .app-main > .d-flex.justify-content-between,
    .app-main > .d-flex.flex-wrap.justify-content-between {
        padding-bottom: 12px;
    }

    .app-main > .d-flex.justify-content-between > div:first-child,
    .app-main > .d-flex.flex-wrap.justify-content-between > div:first-child {
        width: 100%;
    }

    .d-flex.justify-content-between > .btn,
    .d-flex.justify-content-between > form,
    .d-flex.justify-content-between > div:last-child,
    .d-flex.flex-wrap.justify-content-between > .btn,
    .d-flex.flex-wrap.justify-content-between > form,
    .d-flex.flex-wrap.justify-content-between > div:last-child {
        width: 100%;
    }

    .d-flex.justify-content-between > .btn,
    .d-flex.flex-wrap.justify-content-between > .btn {
        display: inline-flex;
        justify-content: center;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }

    .modal-dialog {
        margin: 10px;
    }

    .modal-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .table-wrap {
        padding: 10px;
        overflow: visible;
    }

    .dataTables_filter,
    .dt-search,
    .table-filter-toolbar,
    .dataTables_filter label,
    .dt-search label,
    .table-branch-filter,
    .dataTables_length label,
    .dt-length label {
        width: 100%;
        justify-content: flex-start;
    }

    .dataTables_length select,
    .dt-length select {
        width: auto;
    }

    .dataTables_info,
    .dt-info,
    .dataTables_paginate,
    .dt-paging {
        text-align: left !important;
    }

    .dataTables_paginate .pagination,
    .dt-paging .pagination {
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 4px;
    }

    .table-wrap table.data-table,
    .table-wrap table.data-table thead,
    .table-wrap table.data-table tbody,
    .table-wrap table.data-table th,
    .table-wrap table.data-table td,
    .table-wrap table.data-table tr {
        display: block;
        width: 100% !important;
    }

    .table-wrap table.data-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-wrap table.data-table thead {
        position: absolute;
        width: 1px !important;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .table-wrap table.data-table tbody tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
        overflow: hidden;
    }

    .table-wrap table.data-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .table-wrap table.data-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        gap: 12px;
        max-width: none;
        min-height: 44px;
        padding: 10px 12px;
        border-bottom: 1px solid #edf2f7;
        white-space: normal;
        overflow: visible;
        text-align: left !important;
    }

    .table-wrap table.data-table tbody td:first-child {
        color: var(--blue-900);
        font-weight: 750;
    }

    .table-wrap table.data-table tbody td:last-child {
        border-bottom: 0;
    }

    .table-wrap table.data-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .02em;
    }

    .table-wrap table.data-table tbody td .btn,
    .table-wrap table.data-table tbody td form {
        margin: 2px 0;
    }

    .table-wrap table.data-table tbody td:last-child .btn {
        min-height: 38px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-inline: 14px;
    }

    .modal-title {
        font-size: 1rem;
    }

    .form-label {
        margin-bottom: 5px;
    }

    .table-wrap table.data-table tbody td form {
        display: inline-block;
    }

    .transaction-lines {
        min-width: 0;
    }

    .transaction-lines thead {
        display: none;
    }

    .transaction-lines,
    .transaction-lines tbody,
    .transaction-lines tr,
    .transaction-lines td {
        display: block;
        width: 100%;
    }

    .transaction-lines tr[data-line-row] {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }

    .transaction-lines tr[data-line-row]:last-child {
        margin-bottom: 0;
    }

    .transaction-lines td {
        padding: 0 0 10px;
        border: 0;
    }

    .transaction-lines td:last-child {
        padding-bottom: 0;
        text-align: left !important;
    }

    .transaction-mobile-label {
        display: block;
        margin-bottom: 5px;
        color: #475569;
        font-size: 12px;
        font-weight: 800;
    }

    .transaction-lines .form-control,
    .transaction-lines .form-select {
        min-height: 44px;
        font-size: 15px;
    }

    .transaction-lines .line-action {
        width: 100%;
        min-height: 42px;
        display: inline-grid;
        place-items: center;
    }

    .estimation-header,
    .estimation-detail-header {
        gap: 10px !important;
    }

    .estimation-header h1,
    .estimation-detail-header h1 {
        font-size: 1.35rem;
    }

    .estimation-header .btn,
    .estimation-detail-header .btn {
        min-height: 44px;
    }

    .estimation-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }

    .estimation-actions > .btn,
    .estimation-actions > form,
    .estimation-actions > form > .btn {
        width: 100%;
    }

    .estimation-actions > .btn,
    .estimation-actions > form > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding-inline: 10px;
    }

    .estimation-info-panel {
        padding: 10px;
    }

    .estimation-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .estimation-info-item {
        padding: 9px;
        font-size: 14px;
    }

    .estimation-info-item .small {
        font-size: 11px;
    }

    .estimation-info-wide,
    .estimation-info-full {
        grid-column: 1 / -1;
    }

    .estimation-table-wrap {
        background: transparent;
        border: 0;
        padding: 0;
    }

    .estimation-table-wrap table.data-table tbody tr {
        border-radius: 8px;
    }

    .estimation-table-wrap table.data-table tbody td:first-child {
        display: block;
        padding: 13px 12px 4px;
        min-height: auto;
        border-bottom: 0;
        color: var(--blue-900);
        font-size: 16px;
    }

    .estimation-table-wrap table.data-table tbody td:first-child::before {
        display: block;
        margin-bottom: 2px;
    }

    .estimation-table-wrap table.data-table tbody td[data-label="Cabang"],
    .estimation-table-wrap table.data-table tbody td[data-label="Advisor"],
    .estimation-table-wrap table.data-table tbody td[data-label="Mulai"] {
        display: none;
    }

    .estimation-table-wrap table.data-table tbody td[data-label="Aksi"] {
        display: block;
        padding: 10px 12px 12px;
    }

    .estimation-table-wrap table.data-table tbody td[data-label="Aksi"]::before {
        display: none;
    }

    .estimation-table-wrap table.data-table tbody td[data-label="Aksi"] .btn {
        width: 100%;
        min-height: 42px;
    }

    .crop-preview-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .crop-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .estimation-photo-item {
        margin-bottom: 12px !important;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }
}

@media print {
    .navbar,
    .app-sidebar,
    .no-print,
    script {
        display: none !important;
    }

    body,
    .container-fluid {
        background: #fff !important;
    }

    .print-page {
        color: #000;
    }
}

.estimation-mobile-list,
.estimation-fab,
.estimation-mobile-summary {
    display: none;
}

@media (max-width: 767.98px) {
    .estimation-page {
        margin-inline: -2px;
    }

    .estimation-header .text-secondary,
    .estimation-detail-header .text-secondary {
        font-size: 13px;
        line-height: 1.35;
    }

    .estimation-desktop-cta,
    .estimation-desktop-table {
        display: none !important;
    }

    .estimation-mobile-list {
        display: grid;
        gap: 10px;
    }

    .estimation-card {
        display: block;
        padding: 12px;
        border: 1px solid #dbe8f6;
        border-radius: 8px;
        background: #fff;
        color: #172033;
        text-decoration: none;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

    .estimation-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .estimation-card-top > div {
        min-width: 0;
    }

    .estimation-card-top strong,
    .estimation-card-top span:not(.badge) {
        display: block;
    }

    .estimation-card-top strong {
        color: var(--blue-900);
        font-size: 15px;
        line-height: 1.2;
    }

    .estimation-card-top span:not(.badge) {
        margin-top: 3px;
        color: #64748b;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .estimation-card-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }

    .estimation-card-meta span {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px;
        border-radius: 6px;
        background: #f3f8ff;
        color: #334155;
        font-size: 12px;
    }

    .estimation-card-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #edf2f7;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .estimation-card-foot span:last-child {
        color: var(--blue-700);
    }

    .estimation-fab {
        position: fixed;
        right: 14px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        z-index: 1045;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 48px;
        padding-inline: 16px;
        border-radius: 999px;
        box-shadow: 0 12px 28px rgba(14, 77, 154, .32);
    }

    .estimation-mobile-summary {
        display: block;
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid #dbe8f6;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

    .estimation-mobile-summary-main {
        display: grid;
        gap: 4px;
        padding-bottom: 10px;
        border-bottom: 1px solid #edf2f7;
    }

    .estimation-mobile-summary-main .badge {
        width: max-content;
        margin-bottom: 2px;
    }

    .estimation-mobile-summary-main strong {
        color: var(--blue-900);
        font-size: 16px;
        line-height: 1.2;
    }

    .estimation-mobile-summary-main span:not(.badge) {
        color: #64748b;
        font-size: 13px;
    }

    .estimation-mobile-summary-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
    }

    .estimation-mobile-summary-grid div {
        min-width: 0;
        padding: 8px;
        border-radius: 6px;
        background: #f3f8ff;
    }

    .estimation-mobile-summary-grid small,
    .estimation-mobile-summary-grid span {
        display: block;
    }

    .estimation-mobile-summary-grid small {
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .estimation-mobile-summary-grid span {
        margin-top: 2px;
        color: #172033;
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .estimation-info-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .estimation-tabs {
        position: sticky;
        top: 0;
        z-index: 20;
        margin-inline: -14px;
        padding: 8px 14px 0;
        background: var(--soft);
        border-bottom: 1px solid var(--line);
        gap: 4px;
    }

    .estimation-tabs .nav-link {
        min-height: 42px;
        padding: 9px 12px;
        font-weight: 700;
        font-size: 13px;
    }

    .estimation-tab-content {
        margin-top: 8px;
    }

    .estimation-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .estimation-photo-item {
        margin-bottom: 0 !important;
    }

    .estimation-detail-page {
        padding-bottom: 0;
    }
}
/* SIA accounting shell */
:root {
    --sia-bg: #f4f6f8;
    --sia-surface: #ffffff;
    --sia-border: #dce4ea;
    --sia-text: #172026;
    --sia-muted: #667782;
    --sia-primary: #176b87;
    --sia-primary-strong: #0f4f63;
    --sia-accent: #e2a93b;
    --sia-sidebar: #122832;
    --sia-sidebar-soft: #1d3c48;
}

body {
    background: var(--sia-bg);
    color: var(--sia-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    background: var(--sia-sidebar);
    color: #eaf3f6;
    z-index: 1030;
    box-shadow: 12px 0 30px rgba(15, 36, 46, 0.14);
}

.sidebar-inner {
    display: flex;
    min-height: 100vh;
    width: 100%;
    flex-direction: column;
    padding: 0;
}

.sidebar-brand {
    display: flex;
    height: 76px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    padding: 0 20px;
}

.sidebar-brand:hover {
    color: #fff;
}

.brand-mark,
.mobile-app-logo {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.brand-mark img,
.mobile-app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand strong,
.mobile-appbrand strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.sidebar-brand small,
.mobile-appbrand small {
    display: block;
    color: rgba(234, 243, 246, 0.72);
    font-size: 0.76rem;
    margin-top: 3px;
}

.sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-link,
.sidebar-group {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    padding: 11px 12px;
    background: transparent;
    color: rgba(234, 243, 246, 0.82);
    font-weight: 700;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
}

.sidebar-link {
    justify-content: flex-start;
}

.sidebar-link span,
.sidebar-group span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-link i,
.sidebar-group i {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.09);
    color: #dce9ed;
    font-size: 12px;
}

.sidebar-link:hover,
.sidebar-group:hover,
.sidebar-link.active,
.sidebar-group:not(.collapsed) {
    background: var(--sia-sidebar-soft);
    color: #fff;
}

.sidebar-group::after {
    content: "\f282";
    font-family: "bootstrap-icons";
    width: auto;
    height: auto;
    border: 0;
    font-size: 0.75rem;
    line-height: 1;
    transition: transform 0.18s ease;
}

.sidebar-group:not(.collapsed)::after {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding: 4px 0 8px 44px;
}

.sidebar-submenu a {
    display: block;
    border-left: 2px solid rgba(226, 169, 59, 0.3);
    color: rgba(234, 243, 246, 0.72);
    font-size: 13px;
    font-weight: 650;
    padding: 8px 10px;
    text-decoration: none;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    border-color: var(--sia-accent);
    color: #fff;
}

.sidebar-user {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    padding: 16px 20px 20px;
}

.sidebar-user .btn {
    width: 100%;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
}

.sidebar-user small {
    color: rgba(234, 243, 246, 0.72);
    margin-bottom: 8px;
}

.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 264px;
    z-index: 1020;
    height: 76px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sia-border);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    padding: 0 28px;
}

.topbar-title h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-title span {
    display: block;
    color: var(--sia-muted);
    margin-top: 4px;
}

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

.app-main {
    margin-left: 264px;
    /* padding: 100px 28px 34px; */
}

.work-panel,
.metric-card,
.dashboard-hero {
    border: 1px solid var(--sia-border);
    border-radius: 8px;
    background: var(--sia-surface);
    box-shadow: 0 16px 34px rgba(15, 36, 46, 0.07);
}

.work-panel {
    padding: 16px;
}

.dashboard-hero,
.sia-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.dashboard-hero {
    padding: 16px;
}

.sia-page-header h1,
.dashboard-hero h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.sia-page-header p {
    margin: 6px 0 0;
    color: var(--sia-muted);
}

.sia-eyebrow,
.dashboard-eyebrow {
    color: var(--sia-primary);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    padding: 16px;
}

.dashboard-metric-head,
.dashboard-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--sia-muted);
    font-size: 14px;
    font-weight: 750;
}

.dashboard-metric-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #edf7fa;
    color: var(--sia-primary);
}

.metric-value {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 850;
    line-height: 1.1;
}

.dashboard-metric-note {
    color: var(--sia-muted);
    font-size: 12px;
    margin-top: 8px;
}

.table-wrap {
    border: 1px solid var(--sia-border);
    border-radius: 8px;
    overflow: hidden;
}

.table-wrap .table > :not(caption) > * > * {
    padding: 10px 12px;
    font-size: 14px;
}

.table-wrap thead th {
    background: #edf3f6;
    color: #4d5f69;
    font-size: 12px;
    text-transform: uppercase;
}

.btn,
.form-control,
.form-select {
    border-radius: 8px;
    font-size: 14px;
}

.btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.journal-lines-wrap {
    overflow: visible;
}

.journal-lines-table .journal-line-action {
    width: 54px;
}

.journal-lines-table select {
    min-width: 260px;
}

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

.report-card-link {
    color: var(--sia-text);
    text-decoration: none;
}

.report-card-link i {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: #edf7fa;
    color: var(--sia-primary);
    margin-bottom: 12px;
}

.report-card-link h2 {
    font-size: 16px;
    margin: 0 0 6px;
}

.report-card-link p {
    color: var(--sia-muted);
    margin: 0;
}

.journal-balance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--sia-border);
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.journal-balance-summary div {
    min-width: 0;
}

.journal-balance-summary span:not(.badge) {
    display: block;
    color: var(--sia-muted);
    font-size: 12px;
    font-weight: 800;
}

.journal-balance-summary strong {
    display: block;
    margin-top: 2px;
    font-size: 15px;
}

.btn-primary {
    --bs-btn-bg: var(--sia-primary);
    --bs-btn-border-color: var(--sia-primary);
    --bs-btn-hover-bg: var(--sia-primary-strong);
    --bs-btn-hover-border-color: var(--sia-primary-strong);
}

.btn-outline-primary {
    --bs-btn-color: var(--sia-primary);
    --bs-btn-border-color: var(--sia-primary);
    --bs-btn-hover-bg: var(--sia-primary);
    --bs-btn-hover-border-color: var(--sia-primary);
}

.mobile-icon-shell {
    padding: 12px 12px 0;
    background: var(--sia-bg);
}

.mobile-appbar,
.mobile-icon-menu {
    border: 1px solid var(--sia-border);
    border-radius: 8px;
    background: #fff;
}

.mobile-appbar {
    box-shadow: 0 10px 24px rgba(15, 36, 46, 0.08);
}

.mobile-appbrand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sia-text);
    text-decoration: none;
}

.mobile-appbrand small {
    color: var(--sia-muted);
}

.mobile-icon-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
}

.mobile-menu-tile {
    display: flex;
    min-height: 68px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f7fafb;
    color: var(--sia-text);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.mobile-menu-tile.active {
    border-color: var(--sia-primary);
    color: var(--sia-primary);
}

.mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 76px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    border: 1px solid rgba(220, 228, 234, 0.94);
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -14px 34px rgba(15, 36, 46, 0.16);
    backdrop-filter: blur(14px);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-bottom-nav::-webkit-scrollbar {
    display: none;
}

.mobile-bottom-nav .mobile-menu-tile {
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    min-height: 60px;
    padding: 8px 7px;
    gap: 5px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667782;
    box-shadow: none;
    appearance: none;
    scroll-snap-align: start;
}

.mobile-bottom-nav .mobile-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    color: currentColor;
    box-shadow: none;
}

.mobile-bottom-nav .mobile-menu-icon i {
    font-size: 20px;
}

.mobile-bottom-nav .mobile-menu-tile > span:last-child {
    padding: 0;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-bottom-nav .mobile-menu-tile.active,
.mobile-bottom-nav .mobile-menu-tile:hover,
.mobile-bottom-nav .mobile-menu-tile:focus {
    background: #edf7fa;
    color: var(--sia-primary);
    box-shadow: none;
}

.mobile-bottom-nav .mobile-menu-tile:hover .mobile-menu-icon,
.mobile-bottom-nav .mobile-menu-tile:focus .mobile-menu-icon {
    background: transparent;
    color: currentColor;
}

.mobile-bottom-nav .mobile-menu-tile.active .mobile-menu-icon {
    background: var(--sia-primary);
    color: #fff;
}

.mobile-bottom-nav .mobile-menu-logout {
    color: #b42318;
}

.mobile-bottom-nav .mobile-menu-logout:hover,
.mobile-bottom-nav .mobile-menu-logout:focus {
    background: #fff1f0;
    color: #b42318;
}

@media (max-width: 991.98px) {
    .app-main {
        margin-left: 0;
        padding: 14px 12px calc(132px + env(safe-area-inset-bottom));
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .sia-page-header {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .dashboard-metric-grid,
    .mobile-icon-menu {
        grid-template-columns: 1fr 1fr;
    }

    .sia-page-header h1,
    .dashboard-hero h1 {
        font-size: 1.5rem;
    }

    .journal-lines-wrap {
        border: 0;
        overflow: visible;
    }

    .journal-lines-table,
    .journal-lines-table tbody,
    .journal-lines-table tr,
    .journal-lines-table td {
        display: block;
        width: 100%;
    }

    .journal-lines-table thead {
        display: none;
    }

    .journal-lines-table tr {
        border: 1px solid var(--sia-border);
        border-radius: 8px;
        background: #fff;
        padding: 12px;
        margin-bottom: 12px;
    }

    .journal-lines-table td {
        border: 0;
        padding: 0 0 10px !important;
    }

    .journal-lines-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--sia-muted);
        font-size: 12px;
        font-weight: 800;
        margin-bottom: 5px;
    }

    .journal-lines-table .journal-line-action {
        padding-bottom: 0 !important;
        text-align: right;
    }

    .journal-lines-table .journal-line-action::before {
        display: none;
    }

    .journal-lines-table select {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    #journalModal .modal-body {
        padding: 14px;
    }

    #journalModal .modal-footer {
        padding: 12px 14px;
    }

    .journal-balance-summary {
        grid-template-columns: 1fr 1fr;
    }

    .journal-balance-summary .badge {
        justify-self: start;
    }

    .journal-lines-wrap {
        border: 0;
        overflow: visible;
    }

    .journal-lines-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .journal-lines-table thead {
        display: none;
    }

    .journal-lines-table,
    .journal-lines-table tbody {
        display: block;
        width: 100%;
    }

    .journal-lines-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        border: 1px solid var(--sia-border);
        border-radius: 8px;
        background: #fff;
        padding: 12px;
        margin-bottom: 12px;
    }

    .journal-lines-table td {
        display: block;
        width: 100%;
        border: 0;
        padding: 0 !important;
    }

    .journal-lines-table td[data-label="Akun"],
    .journal-lines-table td[data-label="Keterangan"],
    .journal-lines-table .journal-line-action {
        grid-column: 1 / -1;
    }

    .journal-lines-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--sia-muted);
        font-size: 12px;
        font-weight: 800;
        margin-bottom: 5px;
    }

    .journal-lines-table .journal-line-action {
        display: flex;
        justify-content: flex-end;
        padding-top: 2px !important;
    }

    .journal-lines-table .journal-line-action::before {
        display: none;
    }

    .journal-lines-table .form-control,
    .journal-lines-table .form-select {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    #journalModal .journal-lines-table > tbody > tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 12px 14px !important;
        align-items: end;
    }

    #journalModal .journal-lines-table > tbody > tr > td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    #journalModal .journal-cell-account,
    #journalModal .journal-cell-description,
    #journalModal .journal-line-action {
        grid-column: 1 / -1 !important;
    }

    #journalModal .journal-cell-debit {
        grid-column: 1 / 2 !important;
    }

    #journalModal .journal-cell-credit {
        grid-column: 2 / 3 !important;
    }

    #journalModal .journal-line-action {
        justify-self: end;
        width: auto !important;
        padding-top: 2px !important;
    }

    #journalModal .journal-line-action .btn {
        width: 38px;
        min-height: 38px;
        padding: 0;
    }
}

@media (max-width: 420px) {
    #journalModal .journal-lines-table > tbody > tr {
        grid-template-columns: 1fr !important;
    }

    #journalModal .journal-cell-debit,
    #journalModal .journal-cell-credit {
        grid-column: 1 / -1 !important;
    }
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #dbe4ef;
    border-radius: 0.5rem;
    background: #fbfdff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 0.75rem;
    padding-right: 2rem;
    color: #263448;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #8a9aaf;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #9bbce8;
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(64, 123, 191, 0.12);
}

.select2-dropdown {
    overflow: hidden;
    border-color: #dbe4ef;
    border-radius: 0.65rem;
    box-shadow: 0 16px 36px rgba(31, 45, 61, 0.12);
    z-index: 2000;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px;
    background: #f8fbff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    min-height: 36px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #dbe4ef;
    border-radius: 0.5rem;
    color: #263448;
    outline: 0;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #9bbce8;
    box-shadow: 0 0 0 0.18rem rgba(64, 123, 191, 0.11);
}

.select2-container--default .select2-results__option {
    padding: 0.55rem 0.75rem;
    color: #263448;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #edf5ff;
    color: #1d4f8f;
}

.select2-container--default .select2-results__option--selected {
    background: #f1f6fb;
    color: #1f3f64;
}

@media (max-width: 767.98px) {
    .table-responsive.table-wrap,
    .table-wrap .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap:not(.journal-lines-wrap) table,
    .table-wrap:not(.journal-lines-wrap) table.server-table,
    .table-wrap:not(.journal-lines-wrap) table.data-table,
    .table-wrap:not(.journal-lines-wrap) table.responsive-table {
        display: table !important;
        width: max-content !important;
        min-width: 860px;
        border-collapse: collapse;
    }

    .table-wrap:not(.journal-lines-wrap) table thead,
    .table-wrap:not(.journal-lines-wrap) table tbody,
    .table-wrap:not(.journal-lines-wrap) table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.server-table thead,
    .table-wrap:not(.journal-lines-wrap) table.server-table tbody,
    .table-wrap:not(.journal-lines-wrap) table.server-table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.data-table thead,
    .table-wrap:not(.journal-lines-wrap) table.data-table tbody,
    .table-wrap:not(.journal-lines-wrap) table.data-table tfoot {
        display: table-row-group !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
    }

    .table-wrap:not(.journal-lines-wrap) table thead,
    .table-wrap:not(.journal-lines-wrap) table.server-table thead,
    .table-wrap:not(.journal-lines-wrap) table.data-table thead {
        display: table-header-group !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.server-table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.data-table tfoot {
        display: table-footer-group !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tr,
    .table-wrap:not(.journal-lines-wrap) table.server-table tr,
    .table-wrap:not(.journal-lines-wrap) table.data-table tr {
        display: table-row !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .table-wrap:not(.journal-lines-wrap) table th,
    .table-wrap:not(.journal-lines-wrap) table td,
    .table-wrap:not(.journal-lines-wrap) table.server-table th,
    .table-wrap:not(.journal-lines-wrap) table.server-table td,
    .table-wrap:not(.journal-lines-wrap) table.data-table th,
    .table-wrap:not(.journal-lines-wrap) table.data-table td {
        display: table-cell !important;
        width: auto !important;
        min-height: 0 !important;
        padding: 0.75rem !important;
        white-space: nowrap !important;
        text-align: left;
    }

    .table-wrap:not(.journal-lines-wrap) table td.text-end,
    .table-wrap:not(.journal-lines-wrap) table th.text-end {
        text-align: right !important;
    }

    .table-wrap:not(.journal-lines-wrap) table td::before,
    .table-wrap:not(.journal-lines-wrap) table.server-table td::before,
    .table-wrap:not(.journal-lines-wrap) table.data-table td::before {
        display: none !important;
        content: none !important;
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-main {
        width: 100%;
        max-width: 100%;
        padding: 12px 10px calc(132px + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .row {
        min-width: 0;
    }

    .sia-page-header,
    .dashboard-hero,
    .dashboard-panel-title,
    .journal-balance-summary,
    .server-pagination {
        min-width: 0;
        flex-wrap: wrap;
    }

    .sia-page-header > *,
    .dashboard-hero > *,
    .dashboard-panel-title > *,
    .journal-balance-summary > *,
    .server-pagination > * {
        min-width: 0;
        max-width: 100%;
    }

    .work-panel,
    .metric-card,
    .table-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 12px;
        overflow: visible;
    }

    .table-responsive,
    .table-responsive.table-wrap,
    .table-wrap .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    .table-wrap:not(.journal-lines-wrap) table,
    .table-wrap:not(.journal-lines-wrap) table.server-table,
    .table-wrap:not(.journal-lines-wrap) table.data-table,
    .table-wrap:not(.journal-lines-wrap) table.responsive-table,
    .work-panel > .table-responsive > table,
    .work-panel > .table-responsive > table.table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-wrap:not(.journal-lines-wrap) table thead,
    .table-wrap:not(.journal-lines-wrap) table.server-table thead,
    .table-wrap:not(.journal-lines-wrap) table.data-table thead,
    .table-wrap:not(.journal-lines-wrap) table.responsive-table thead,
    .work-panel > .table-responsive > table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody,
    .table-wrap:not(.journal-lines-wrap) table tfoot,
    .table-wrap:not(.journal-lines-wrap) table tr,
    .table-wrap:not(.journal-lines-wrap) table th,
    .table-wrap:not(.journal-lines-wrap) table td,
    .table-wrap:not(.journal-lines-wrap) table.server-table tbody,
    .table-wrap:not(.journal-lines-wrap) table.server-table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.server-table tr,
    .table-wrap:not(.journal-lines-wrap) table.server-table th,
    .table-wrap:not(.journal-lines-wrap) table.server-table td,
    .table-wrap:not(.journal-lines-wrap) table.data-table tbody,
    .table-wrap:not(.journal-lines-wrap) table.data-table tfoot,
    .table-wrap:not(.journal-lines-wrap) table.data-table tr,
    .table-wrap:not(.journal-lines-wrap) table.data-table th,
    .table-wrap:not(.journal-lines-wrap) table.data-table td,
    .work-panel > .table-responsive > table tbody,
    .work-panel > .table-responsive > table tfoot,
    .work-panel > .table-responsive > table tr,
    .work-panel > .table-responsive > table th,
    .work-panel > .table-responsive > table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody tr,
    .table-wrap:not(.journal-lines-wrap) table.server-table tbody tr,
    .table-wrap:not(.journal-lines-wrap) table.data-table tbody tr,
    .work-panel > .table-responsive > table tbody tr {
        margin-bottom: 12px !important;
        border: 1px solid var(--line) !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .05) !important;
        overflow: hidden !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td,
    .table-wrap:not(.journal-lines-wrap) table.server-table tbody td,
    .table-wrap:not(.journal-lines-wrap) table.data-table tbody td,
    .work-panel > .table-responsive > table tbody td,
    .table-wrap:not(.journal-lines-wrap) table tbody th,
    .work-panel > .table-responsive > table tbody th {
        display: grid !important;
        grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        min-height: 40px !important;
        padding: 10px 12px !important;
        border-bottom: 1px solid #edf2f7 !important;
        text-align: left !important;
        overflow-wrap: anywhere;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td:last-child,
    .work-panel > .table-responsive > table tbody td:last-child {
        border-bottom: 0 !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td::before,
    .table-wrap:not(.journal-lines-wrap) table.server-table tbody td::before,
    .table-wrap:not(.journal-lines-wrap) table.data-table tbody td::before,
    .work-panel > .table-responsive > table tbody td::before,
    .table-wrap:not(.journal-lines-wrap) table tbody th::before,
    .work-panel > .table-responsive > table tbody th::before {
        content: attr(data-label);
        display: block !important;
        min-width: 0;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.3;
        text-align: left;
        text-transform: none;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td:empty::after,
    .work-panel > .table-responsive > table tbody td:empty::after {
        content: "-";
        color: #94a3b8;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td.text-end,
    .table-wrap:not(.journal-lines-wrap) table tbody th.text-end,
    .work-panel > .table-responsive > table tbody td.text-end,
    .work-panel > .table-responsive > table tbody th.text-end {
        text-align: left !important;
    }

    .table-wrap:not(.journal-lines-wrap) table tbody td .btn,
    .table-wrap:not(.journal-lines-wrap) table tbody td form,
    .work-panel > .table-responsive > table tbody td .btn,
    .work-panel > .table-responsive > table tbody td form {
        max-width: 100%;
        margin: 2px 0;
        white-space: normal;
    }

    .modal-dialog {
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        margin-right: auto;
        margin-left: auto;
    }

    .modal-content,
    .modal-body,
    .modal-header,
    .modal-footer {
        max-width: 100%;
        min-width: 0;
    }

    .modal-body {
        overflow-x: hidden;
    }

    .select2-container {
        max-width: 100%;
    }
}

.cash-modal-dialog {
    max-width: min(1180px, calc(100% - 32px));
}

.cash-list-table .cash-code {
    color: #0f172a;
    font-weight: 800;
}

.cash-list-table .cash-list-amount strong {
    color: #047857;
    font-size: 1.02rem;
}

.cash-detail-modal .journal-balance-summary strong {
    font-size: 1rem;
}

.cash-detail-modal table td[data-label="COA"] .badge {
    vertical-align: middle;
}

.budget-month-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: hidden;
    border-bottom-color: var(--line);
}

.budget-month-tabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
}

.budget-month-tabs .nav-link {
    width: 100%;
    white-space: nowrap;
    color: #475569;
    border-color: transparent;
    font-weight: 800;
    padding-left: .35rem;
    padding-right: .35rem;
    cursor: default;
}

.budget-month-tabs .nav-link:hover {
    color: #0f172a;
    border-color: #e2e8f0 #e2e8f0 var(--line);
    background: #f8fafc;
}

.budget-month-tabs .nav-link.active {
    color: #0f172a;
    background: #fff;
    border-color: var(--line) var(--line) #fff;
}

.budget-month-tabs .nav-link.is-saved {
    color: #166534;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.budget-month-tabs .nav-link.is-saved.active {
    color: #14532d;
    background: #dcfce7;
    border-color: #86efac #86efac #dcfce7;
}

.terms-modal .modal-content,
.terms-modal .modal-body,
.terms-modal .table-wrap,
.terms-modal .table-responsive {
    max-width: 100%;
    overflow: visible;
}

.terms-modal .modal-dialog {
    max-width: min(920px, calc(100vw - 1rem));
    margin-left: auto;
    margin-right: auto;
}

.terms-modal p,
.terms-modal td,
.terms-modal th,
.terms-modal .btn,
.terms-modal .badge {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip;
}

.terms-modal .table-wrap table,
.terms-modal .table-wrap .table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.terms-modal .table-wrap th,
.terms-modal .table-wrap td {
    vertical-align: top;
}

.terms-list {
    display: grid;
    gap: .75rem;
    max-width: 100%;
}

.terms-list > div {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    max-width: 100%;
    min-width: 0;
}

.terms-list strong,
.terms-list span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.terms-list span {
    color: #475569;
}

@media (max-width: 767.98px) {
    .terms-modal .table-responsive.table-wrap,
    .terms-modal .table-wrap .table-responsive {
        overflow-x: hidden;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.responsive-table,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table thead,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table thead,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table thead {
        display: none !important;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table tbody,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table tbody,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table tbody {
        display: grid !important;
        gap: .75rem;
        width: 100% !important;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table tr,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table tr,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table tr {
        display: block !important;
        width: 100% !important;
        padding: .75rem;
        border: 1px solid var(--line) !important;
        border-radius: 8px;
        background: #fff;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table th,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table td,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table th,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.server-table td,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table th,
    .terms-modal .table-wrap:not(.journal-lines-wrap) table.data-table td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .terms-modal .table-wrap:not(.journal-lines-wrap) table td + td {
        margin-top: .35rem;
        color: #475569;
    }

    .terms-list > div {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}

@media (max-width: 575.98px) {
    .budget-month-tabs .nav-link {
        font-size: .78rem;
        padding-left: .18rem;
        padding-right: .18rem;
    }
}

#cashModal [data-cash-opponent-lines] select,
#cashModal [data-cash-opponent-lines] input {
    min-width: 0;
}

@media (min-width: 768px) {
    #cashModal [data-cash-opponent-lines] td:nth-child(1) {
        width: 32%;
    }

    #cashModal [data-cash-opponent-lines] td:nth-child(2) {
        width: 24%;
    }

    #cashModal [data-cash-opponent-lines] td:nth-child(3) {
        width: 26%;
    }

    #cashModal [data-cash-opponent-lines] td:nth-child(4) {
        width: 14%;
    }

    #cashModal [data-cash-opponent-lines] td:nth-child(5) {
        width: 4%;
    }
}

@media (max-width: 767.98px) {
    .cash-transaction-list {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .cash-transaction-list .server-table-toolbar {
        padding: 0 2px;
        margin-bottom: 10px;
    }

    .cash-transaction-list .table-responsive.table-wrap {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .cash-transaction-list table.cash-list-table tbody tr {
        position: relative;
        padding: 10px 10px 12px;
        border: 1px solid #dbeafe !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .07) !important;
    }

    .cash-transaction-list table.cash-list-table tbody td {
        display: flex !important;
        width: 100% !important;
        min-height: 0 !important;
        padding: 4px 0 !important;
        border: 0 !important;
        gap: 8px !important;
        align-items: flex-start;
        justify-content: space-between;
        font-size: 12.5px;
    }

    .cash-transaction-list table.cash-list-table .server-row-number {
        display: none !important;
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Tanggal"],
    .cash-transaction-list table.cash-list-table tbody td[data-label="Cabang"],
    .cash-transaction-list table.cash-list-table tbody td[data-label="Subjek"],
    .cash-transaction-list table.cash-list-table tbody td[data-label="Keterangan"] {
        display: grid !important;
        grid-template-columns: 86px minmax(0, 1fr);
        justify-content: initial;
    }

    .cash-transaction-list table.cash-list-table tbody td::before {
        flex: 0 0 82px;
        color: #64748b;
        font-size: 11px !important;
        font-weight: 800;
        line-height: 1.35;
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Kode"] {
        padding-right: 92px !important;
        font-size: 14px;
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Kode"]::before {
        content: "No Transaksi :";
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Tanggal"]::before {
        content: "Tanggal :";
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Cabang"]::before {
        content: "Cabang :";
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Subjek"]::before {
        content: "Subyek :";
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Keterangan"]::before {
        content: "Keterangan :";
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Status"] {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto !important;
        padding: 0 !important;
    }

    .cash-transaction-list table.cash-list-table tbody td[data-label="Status"]::before {
        display: none !important;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-amount {
        display: block !important;
        margin: 6px 0 4px;
        padding: 8px 10px !important;
        border-radius: 8px;
        background: #ecfdf5;
        text-align: right !important;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-amount::before {
        content: "Nominal :";
        display: block !important;
        margin-bottom: 3px;
        color: #047857;
        text-align: left;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-amount strong {
        display: block;
        color: #047857;
        font-size: 18px;
        line-height: 1.2;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-action {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 8px !important;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-action::before {
        display: none !important;
    }

    .cash-transaction-list table.cash-list-table tbody td.cash-list-action .btn {
        width: 100%;
        justify-content: center;
        min-height: 36px;
        margin: 0;
    }

    .cash-detail-modal .modal-body {
        padding: 12px;
    }

    .cash-detail-modal .journal-balance-summary {
        gap: 6px;
    }

    .cash-detail-modal .journal-balance-summary > * {
        padding: 8px 10px;
    }

    .cash-detail-modal .row.g-3 {
        --bs-gutter-y: .65rem;
    }

    .cash-detail-modal .row.g-3 strong {
        display: block;
        font-size: 13px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .cash-detail-modal table tbody tr {
        margin-bottom: 8px !important;
        border-color: #e2e8f0 !important;
        box-shadow: none !important;
    }

    .cash-detail-modal table tbody td {
        grid-template-columns: 72px minmax(0, 1fr) !important;
        min-height: 34px !important;
        padding: 7px 9px !important;
        gap: 8px !important;
        font-size: 12.5px;
    }

    .cash-detail-modal table tbody td::before {
        font-size: 11px !important;
    }

    .cash-detail-modal table tbody td[data-label="COA"] {
        display: block !important;
    }

    .cash-detail-modal table tbody td[data-label="COA"]::before {
        display: block !important;
        margin-bottom: 5px;
    }

    #cashModal .modal-body {
        padding: 12px;
    }

    #cashModal .row {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    #cashModal .journal-balance-summary {
        gap: 6px;
        margin-bottom: 10px !important;
    }

    #cashModal .journal-balance-summary > * {
        padding: 8px 10px;
    }

    #cashModal [data-cash-opponent-lines] tr {
        margin-bottom: 8px !important;
    }

    #cashModal [data-cash-opponent-lines] td {
        grid-template-columns: 74px minmax(0, 1fr) !important;
        min-height: 34px !important;
        padding: 7px 8px !important;
        gap: 8px !important;
    }

    #cashModal [data-cash-opponent-lines] td::before {
        font-size: 11px !important;
    }

    #cashModal [data-cash-opponent-lines] .form-select,
    #cashModal [data-cash-opponent-lines] .form-control {
        min-height: 34px;
        padding-top: 5px;
        padding-bottom: 5px;
        font-size: 13px;
    }

    #cashModal [data-cash-opponent-lines] td[data-label="Aksi"] {
        display: flex !important;
        justify-content: flex-end;
        min-height: 32px !important;
    }

    #cashModal [data-cash-opponent-lines] td[data-label="Aksi"]::before {
        display: none !important;
    }
}
