@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --header-height: 70px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --bs-primary: #7B5CF5;
    --bs-primary-rgb: 123, 92, 245;
    --bs-primary-bg-subtle: #F2EFFD;
    --bs-primary-text-emphasis: #4A3793;
    --bs-primary-border-subtle: #C5B8F7;
    --bs-success: #62DB67;
    --bs-success-rgb: 98, 219, 103;
    --bs-secondary-bg: #EFEDEE;
    --bs-border-color: #78767B;
    --bs-border-color-translucent: rgba(120, 118, 123, 0.16);
    --bs-link-color: var(--bs-primary);
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-link-hover-color: #6A4BD4;
    --bs-link-hover-color-rgb: 106, 75, 212;
}

body {
    background-color: var(--bs-primary);
    --bs-body-color: #000000;
    --bs-body-font-size: 14px;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-wrap: break-word;
}

header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

.ow-break, .col {
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
}

a:hover {
    --bs-link-color-rgb: var(--bs-link-hover-color-rgb);
}

.icon {
    width: 1em;
    height: 1em;
}

.icon-16 {
    width: 16px;
    height: 16px;
}

.icon-24 {
    width: 24px;
    height: 24px;
}

main {
    position: relative;
    overflow-x: hidden;
    padding: 0;
}

main .main-container {
    padding-left: 0;
    padding-right: 0;
}

.card {
    --bs-card-bg: #FFFFFF;
    --bs-card-border-color: var(--bs-border-color-translucent);
    --bs-card-border-width: 1px;
    --bs-card-border-radius: 12px;
    --bs-card-cap-bg: transparent;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
}

.card.main-card {
    --bs-card-border-radius: 0;
    --bs-card-spacer-x: 1rem;
    --bs-card-spacer-y: 1rem;
    --bs-card-cap-padding-y: 1rem;
    --bs-card-cap-padding-x: 1rem;
    min-height: calc(100vh - 60px);
}

.card.main-card .card-header {
    border-color: transparent;
    padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x) 0;
}

.content-card {
    --bs-card-border-radius: 12px;
    --bs-card-spacer-x: 1rem;
    --bs-card-spacer-y: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.content-action-bar {
    margin-top: -1rem;
}

.content-card:first-child {
    margin-top: 0;
}

.card-label {
    font-size: .75em;
    font-weight: 400;
    margin-bottom: 0;
    display: block;
}

.card-text {
    margin-bottom: .75rem;
}

.content-card .card-title {
    font-size: 1rem;
    font-weight: 500;
}

body.login {
    background:
        radial-gradient(
        circle at center,
        rgba(255,255,255,0.12) 0%,
        rgba(123,92,245,0.90) 65%,
        #7B5CF5 100%
        ),
        url("/assets/images/bg-reimbursement.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login main {
    display: flex; min-height: 100vh;
    flex-direction: column;
    justify-content: center;
}

.login .logo {
    margin-bottom: 24px;
    width: fit-content;
    max-width: 100%;
    height: auto;
    max-height: 30px;
}

.login .logo.brand-logo {
    height: 40px;
}

.login .card {
    max-width: 100%;
    width: 312px;
    margin: auto;
    --bs-card-spacer-y: 2rem;
    border-radius: 12px;
}

.login .card-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.login-gap {
    --bs-gutter-y: 10px;
}

header {
    box-shadow: 0px -10px 29px rgba(0, 0, 0, 0.521569);
    height: calc(var(--header-height) + var(--safe-area-top));
    padding-top: var(--safe-area-top);
    transition: all 0.5s ease;
}

header .badge {
    line-height: 1.2;
    font-size: 12px;
    font-weight: normal;
    max-height: 15px;
}

.navbar {
    --bs-navbar-toggler-font-size: .875rem;
    --bs-navbar-toggler-padding-y: .25rem;
    --bs-navbar-toggler-padding-x: .25rem;
    --bs-navbar-brand-margin-end: .875rem;
    --bs-navbar-active-color: var(--bs-primary);
    font-weight: 600;
}

.navbar-toggler {
    aspect-ratio: 1;
    display: flex;
    width: 30px;
    height: 30px;
}

.navbar-toggler-icon {
    top: 58px;
    width: 1em;
    height: 1em;
    margin: auto;
    --bs-navbar-toggler-icon-bg: url('data:image/svg+xml,%3Csvg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cg clip-path="url(%23clip0_1260_10)"%3E%3Crect width="14" height="14" fill="white"/%3E%3Cpath d="M1 1H13M1 7H13M1 13H13" stroke="%2378757C" stroke-width="2" stroke-linecap="round"/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id="clip0_1260_10"%3E%3Crect width="14" height="14" fill="white"/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E');
}
    
.navbar-collapse .navbar-toggler-icon {
    --bs-navbar-toggler-icon-bg: url('data:image/svg+xml,%3Csvg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cg clip-path="url(%23clip0_1260_16)"%3E%3Crect width="14" height="14" fill="white"/%3E%3Cpath d="M1 1L13 13M1 13L13 1" stroke="%2378757C" stroke-width="2" stroke-linecap="round"/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id="clip0_1260_16"%3E%3Crect width="14" height="14" fill="white"/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E');
}

.collapse-header {
    display: none;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    padding: 4px var(--navbar-collapse-padding-x);
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
    height: 58px;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    flex-shrink: 0;
}

.navbar-nav {
    --bs-nav-link-font-size: 0.875rem;
}

.nav-tabs .nav-link, .nav-pills .nav-link {
    --bs-nav-link-font-size: .75rem;
    --bs-nav-link-padding-x: .75rem;
}

.nav-fill .nav-item .nav-link, .nav-justified .nav-item .nav-link {
    height: 100%;
}

.nav-link {
    --bs-nav-link-color: #000000;
    --bs-nav-link-hover-color: var(--bs-primary);
}

.dropdown-menu {
    --bs-dropdown-padding-x: .75rem;
    --bs-dropdown-padding-y: .75rem;
    --bs-dropdown-spacer: 0;
    --bs-dropdown-font-size: inherit;
    --bs-dropdown-link-hover-bg:   var(--bs-primary);
    --bs-dropdown-link-active-bg:  var(--bs-primary);
    --bs-dropdown-link-active-color: #FFFFFF;
    --bs-dropdown-link-hover-color:#FFFFFF;
    --bs-dropdown-border-width: 0;
    box-shadow: var(--bs-dropdown-box-shadow);
    max-height: min(320px, 70dvh);
    overflow-y: auto;
}

.dropdown-menu .dropdown-item {
    display: flex;
    text-wrap: wrap;
    align-items: center;
}

.dropdown-menu .dropdown-item svg {
    margin-right: 8px;
    width: 1.5rem;
}

.dropdown-menu .dropdown-item .icon {
    margin-right: 8px;
    width: 1.5rem;
    height: 1.5rem;
}

.dropdown-toggle::after {
    transition: transform 0.5s ease-in-out;
}

.dropdown-toggle.show::after {
    transform: rotate(-180deg); 
}

.megamenu svg {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.megamenu .icon {
    width: 24px;
    height: 24px;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: scaleY(0.85) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

@media (min-width: 992px) {
    .dropdown-menu.show {
        transform-origin: top center;
        animation: dropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .dropdown-menu.megamenu.show {
        display: flex !important;
        flex-wrap: wrap;
        min-width: 400px;
    }

    .megamenu > .nav-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .megamenu > .nav-item > .dropdown-item {
        height: 100%;
    }
}

.user {
    display: flex;
    gap: 4px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 2rem;
    padding-right: 4px;
    flex-shrink: 0;
}

.user-avatar {
    padding: 5px;
    width: 40px;
    height: 40px;
    color: var(--bs-primary);
    border-radius: 20px;
}

.user-avatar svg {
    width: 30px;
    height: 30px;
}

.user-avatar .icon {
    width: 30px;
    height: 30px;
}

.user-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 6px;
    text-align: start
}

.user-content .user-name {
    font-size: .875rem;
    line-height: 1;
}

.user-content .user-last-login {
    font-size: 0.625rem;
    line-height: 1;
}

.logout {
    width: 1.875rem;
    height: 1.875rem;
    background-color: var(--bs-primary);
    color: #ffffff;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout svg,
.logout .icon {
    width: 20px;
    height: 20px;
}

.border-dashed {
    --bs-border-style: dashed;
}

.page-title {
    font-size: 1rem;
    font-weight: 700;
    min-height: 38px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
}

.page-title .content {
    flex: 1;
}

.content-table-wrapper {
    display: none;
}

.content-card-wrapper {
    display: block;
}

svg, svg ~ span, img, img ~ span, .icon, .icon ~ span {
    vertical-align: middle;
}

/* Icon color inherits from parent <a> including hover */
a .icon {
    background-color: currentColor;
    transition: background-color 0.2s ease;
}

/* data-table */
.dataTable {
    font-size: .875rem;
}

.datatable-length {
    min-width: 80px;
}

table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date {
    text-align: left;
}

.dataTable th .dt-column-title {
    white-space: nowrap;
}
table.dataTable th.dt-type-numeric div.dt-column-header, table.dataTable th.dt-type-numeric div.dt-column-footer, table.dataTable th.dt-type-date div.dt-column-header, table.dataTable th.dt-type-date div.dt-column-footer, table.dataTable td.dt-type-numeric div.dt-column-header, table.dataTable td.dt-type-numeric div.dt-column-footer, table.dataTable td.dt-type-date div.dt-column-header, table.dataTable td.dt-type-date div.dt-column-footer {
    flex-direction: row;
}

.dt-container [role="status"] {
    font-size: .875rem;
}

.pagination {
    --bs-pagination-border-radius: 4rem;
    --bs-pagination-active-bg: var(--bs-primary);
    --bs-pagination-active-border-color: var(--bs-primary);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bs-primary);
}

/* form */

.amounts {
    --bs-bg-opacity: 0.1;
    background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity));
    border-radius: var(--bs-border-radius-pill);
    text-align: center;
}

.form-control[readonly] {
    background-color: var(--bs-secondary-bg);
}

.form-floating > label {
    height:auto;
    padding: 0.765625rem 1rem;
    font-size: .875rem;
    line-height: 1.25;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    column-gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-floating > label span:not(.icon) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--bs-primary);
    outline: 1px solid var(--bs-primary);
    box-shadow: none;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-select:focus ~ label {
    color: var(--bs-primary);
}

.form-floating>.form-control, .form-floating>.form-control-plaintext, .form-floating>.form-select {
    font-size: .875rem;
    line-height: 1.25;
    padding: 0.765625rem 1rem;
    height: calc( 1.09375rem + 1.15625rem + (var(--bs-border-width) * 2));
    min-height: calc( 1.09375rem + 1.15625rem + (var(--bs-border-width) * 2));
    height: auto;
    min-height: auto;
}

.form-floating>.form-control-plaintext:focus, .form-floating>.form-control-plaintext:not(:placeholder-shown), .form-floating>.form-control:focus, .form-floating>.form-control:not(:placeholder-shown) {
    padding: 0.765625rem 1rem;
}

.form-floating>.form-control-plaintext~label, .form-floating>.form-control:focus~label, .form-floating>.form-control:not(:placeholder-shown)~label, .form-floating>.form-select~label {
    padding: 0 0.125rem !important;
    font-size: 0.75rem;
    background-color: #ffffff;
    height: fit-content;
    line-height: 1;
    margin: 0 1rem;
    max-width: calc(100% - 2rem + (var(--bs-border-width) * 2));
    transform: translateY(-.3625rem) translateX(-.125rem);
    border-radius: 0.125rem;
}

.form-select {
    --bs-form-select-bg-img: url('data:image/svg+xml,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.66699 6.66667L7.99932 10L11.3327 6.66667H4.66699Z" fill="%237C7593"/></svg>');
    --bg-img-size: 24px; 
    background-size: var(--bg-img-size) var(--bg-img-size);
    transition: background-image 0.2s ease;
    padding-right: calc(1rem + var(--bg-img-size)) !important;
    background-position: right calc(1rem - var(--bg-img-size) / 3) center !important;
}

.form-control.form-control-search {
    --search-bg-img: url('data:image/svg+xml,<svg id="vector" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill="%237B5CF5" d="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" id="path_0"/></svg>');
    --bg-img-size: 24px; 
    background-size: var(--bg-img-size) var(--bg-img-size);
    background-image: var(--search-bg-img);
    background-repeat: no-repeat;
    transition: background-image 0.2s ease;
    padding-left: calc(1rem + var(--bg-img-size)) !important;
    background-position: left calc(1rem - var(--bg-img-size) / 3) center !important;
}

/*form-floating-sm */
.form-floating.form-floating-sm > label {
    padding: calc(0.765625rem - 0.1875rem) 1rem; /*0.578125rem*/
}

.form-floating.form-floating-sm>.form-control, .form-floating.form-floating-sm>.form-control-plaintext, .form-floating.form-floating-sm>.form-select {
    padding: calc(0.765625rem - 0.1875rem) 1rem;
    height: calc( 1.09375rem + 1.15625rem + (var(--bs-border-width) * 2)); /* 0.578125 * 2 =  1.15625*/
    min-height: calc( 1.09375rem + 1.15625rem + (var(--bs-border-width) * 2));
}

.form-floating.form-floating-sm>.form-control-plaintext:focus, .form-floating.form-floating-sm>.form-control-plaintext:not(:placeholder-shown), .form-floating.form-floating-sm>.form-control:focus, .form-floating.form-floating-sm>.form-control:not(:placeholder-shown) {
    padding: calc(0.765625rem - 0.1875rem) 1rem;
}

/*form-floating-lg */
.form-floating.form-floating-lg > label {
    padding: calc(0.765625rem + 0.25rem) 1rem; /* 1.015625 */
}

.form-floating.form-floating-lg>.form-control, .form-floating.form-floating-lg>.form-control-plaintext, .form-floating.form-floating-lg>.form-select {
    padding: calc(0.765625rem + 0.25rem) 1rem;
    height: calc( 1.09375rem + 2.03125rem + (var(--bs-border-width) * 2));  /* 0.765625 * 2 = 2.03125 */
    min-height: calc( 1.09375rem + 2.03125rem + (var(--bs-border-width) * 2));
}

.form-floating.form-floating-lg>.form-control-plaintext:focus, .form-floating.form-floating-lg>.form-control-plaintext:not(:placeholder-shown), .form-floating.form-floating-lg>.form-control:focus, .form-floating.form-floating-lg>.form-control:not(:placeholder-shown) {
    padding: calc(0.765625rem + 0.25rem) 1rem;
}

/* ── form-floating info/popover icon ── */
.form-floating-info {
    position: relative;
}

.form-floating-info-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    /* own pointer events — independent of the label */
    pointer-events: auto;
}

.form-floating .form-control.form-control-search ~  label {
    padding-left: calc(0.765625rem + 24px);
}

.form-floating > .form-floating-info-icon ~ .form-control, .form-floating > .form-floating-info-icon ~ .form-control-plaintext {
    padding-right: 2rem;
}

.form-floating > .form-floating-info-icon ~ .form-select {
    padding-right: 3rem !important;
    background-position: right calc(2rem - var(--bg-img-size) / 3) center !important;
}

.form-floating.form-floating-sm > .form-floating-info-icon ~ .form-control, .form-floating.form-floating-sm > .form-floating-info-icon ~ .form-control-plaintext {
    padding-right: 2rem;
}

.form-floating.form-floating-sm > .form-floating-info-icon ~ .form-select {
    padding-right: 3rem !important;
    background-position: right calc(2rem - var(--bg-img-size) / 3) center !important;
}

.form-floating.form-floating-lg > .form-floating-info-icon ~ .form-control, .form-floating.form-floating-lg > .form-floating-info-icon ~ .form-control-plaintext {
    padding-right: 2rem;
}

.form-floating.form-floating-sm > .form-floating-info-icon ~ .form-select {
    padding-right: 3rem !important;
    background-position: right calc(2rem - var(--bg-img-size) / 3) center !important;
}

textarea.form-control {
    height: initial !important;
}

.popover {
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
}

.popover-header {
    --bs-popover-header-padding-x: .5rem;
    --bs-popover-header-padding-y: .25rem;
    --bs-popover-header-bg: var(--bs-emphasis-color);
    --bs-popover-header-color: var(--bs-body-bg);
    --bs-popover-header-font-size: var(--bs-body-font-size);
    line-height: 1.25;
}

.popover-body {
    --bs-popover-body-padding-y: .25rem;
    --bs-popover-body-padding-x: .5rem;
}

.form-check {
    font-size: .75rem;
    min-height: 1.125rem;
    padding-left: 1.5rem;
}

.form-check-reverse {
    font-size: .75rem;
    min-height: 1.125rem;
    padding-right: 1.5rem;
    padding-left: 0;
}

.form-check-input {
    font-size: 12px;
    width: 1.5em;
    height: 1.5em;
    margin-top: 0;
    --bs-border-width: 2px;
    --bs-border-color: #48444F;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:checked[type=checkbox] {
    --bs-form-check-bg-image: url('data:image/svg+xml,<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 6L1 7.5L5 11.5L13 3.5L11.5 2L5 8.5L2.5 6Z" fill="%23FFFFFF"/></svg>');
}

.form-check .form-check-input {
    float: left;
    margin-left: -1.5rem;
}
.form-check-reverse .form-check-input {
    float: right;
    margin-right: -1.5rem;
    margin-left: 0;
}

.btn {
    --bs-btn-padding-x: 1rem;
}

.btn > svg:first-child:not(:only-child), .btn > .icon:first-child:not(:only-child) {
    margin-left: -0.5rem;
}

.btn-sm > svg:first-child:not(:only-child), .btn-sm > .icon:first-child:not(:only-child) {
    margin-left: -0.75rem;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #7452ff;
    --bs-btn-hover-border-color: #7452ff;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #7452ff;
    --bs-btn-active-border-color: #7452ff;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #8b6ffc;
    --bs-btn-disabled-border-color: #8b6ffc;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #52C85D;
    --bs-btn-hover-border-color: #52C85D;
    --bs-btn-focus-shadow-rgb: 98, 219, 103;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4AB852;
    --bs-btn-active-border-color: #4AB852;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #8FE695;
    --bs-btn-disabled-border-color: #8FE695;
}

.btn-orange {
    --bs-btn-color: #fff;
    --bs-btn-bg: #F87F15;
    --bs-btn-border-color: #F87F15;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #E06D0A;
    --bs-btn-hover-border-color: #E06D0A;
    --bs-btn-focus-shadow-rgb: 248, 127, 21;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #C85F09;
    --bs-btn-active-border-color: #C85F09;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #FCA866;
    --bs-btn-disabled-border-color: #FCA866;
}

.bg-orange {
    background-color: #F87F15 !important;
}

.text-orange {
    color: #F87F15 !important;
}

/* Page Transition Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

body.page-enter main,
body.page-back-enter main {
    will-change: transform;
}

body.page-enter main {
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-exit main {
    animation: slideOutLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-back-enter main {
    animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-back-exit main {
    animation: slideOutRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 991px) {

    header {
        --header-height: 60px;
    }

    .navbar-collapse {
        --navbar-collapse-padding-x: 1rem;
        --navbar-collapse-padding-y: 1rem;
        position: fixed;
        --bs-bg-opacity: 1;
        background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
        height: 100dvh;
        width: min(280px, calc(100vw - 50px));
        left: calc(min(280px, calc(100vw - 50px)) * -1);
        top: 0;
        transition: left 0.3s ease-in-out;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        align-items: initial;
        justify-content: initial;
    }

    .navbar-collapse::after {
        content: '';
        position: fixed;
        height: 100dvh;
        width: 100vw;
        left: 0;
        top: 0;
        z-index: 1199;
        opacity: 0;
        border-radius: 0;
        background-color: rgba(0, 0, 0, 0.16);
        backdrop-filter: blur(40px);
        box-shadow: inset 10px 0 10px -10px rgba(0,0,0,0.16); 
        transition: all 0.3s ease-in-out;
    }
    
    .navbar-collapse.slide-left.show {
        left: 0;
    }
    
    .navbar-collapse.slide-left.show::after {
        width: max(calc(100vw - 280px), 50px);
        left: min(280px, calc(100vw - 50px));
        opacity: 1;
    }
    
    .collapse-header {
        display: block;
        opacity: 1;
    }

    .user-wrapper {
        flex-shrink: 0;
        margin-top: auto;
        padding: calc(var(--navbar-collapse-padding-y) / 2) var(--navbar-collapse-padding-x) var(--navbar-collapse-padding-y);
    }
    
    .logout {
        margin-left: auto;
    }

    .navbar-nav {
        --bs-nav-link-padding-x: var(--navbar-collapse-padding-x);
        flex-grow: 1;
        overflow-y: auto;
    }

    .navbar-collapse .nav-item {
        border-bottom: 1px solid var(--bs-border-color-translucent);
    }

    .navbar-collapse .nav-link {
        display: flex;
        gap: 8px;
        align-items: center;
        min-height: 40px;
        font-weight: 600;
    }
    
    .navbar-collapse .dropdown-toggle::after {
        margin-left: auto;
    }
    
    .navbar-collapse .dropdown-toggle.show {
        background-color: var(--bs-primary);
        color: #FFFFFF;
    }
    
    .navbar-collapse .dropdown-menu.show {
        transform-origin: top center;
        animation: dropdownIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .navbar-collapse .dropdown-menu {
        margin-bottom: -1px;
        --bs-dropdown-padding-x: 0;
        --bs-dropdown-padding-y: 0;
        --bs-dropdown-spacer: 0;
        --bs-dropdown-font-size: inherit;
        --bs-dropdown-bg: var(--bg-secondary);
        --bs-dropdown-link-active-bg:  var(--bs-primary);
        --bs-dropdown-link-active-color: #FFFFFF;
        --bs-dropdown-box-shadow: none;
        --bs-dropdown-border-width: 0;
        --bs-dropdown-item-padding-x: var(--navbar-collapse-padding-x);
        --bs-dropdown-item-padding-y: var(--bs-nav-link-padding-y);
    }

    .navbar-collapse .dropdown-item {
        font-weight: 500;
    }
}

@media (min-width: 768px) {
    .content-table-wrapper { 
        display: block;
    }

    .content-card-wrapper { 
        display: none;
    }
}

@media (min-width: 576px) {
    main {
        padding: 20px 0;
    }
    .card {
        --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.03);
    }
    .card.main-card {
        --bs-card-border-radius: 12px;
        --bs-card-spacer-x: 1.5rem;
        --bs-card-spacer-y: 1.5rem;
        --bs-card-cap-padding-x: 1.5rem;
        --bs-card-cap-padding-y: 0.75rem;
        min-height: auto;
    }
    .card.main-card .card-header {
        padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);
    }
    .page-title {
        text-align: start;
    }
    .content-action-bar {
        margin-top: 0;
    }
}

/* ── Sliding Profile Panel ── */
.profile-panel {
    --profile-panel-gap: 20px;
    position: fixed;
    top: calc(var(--header-height) + var(--safe-area-top) + var(--profile-panel-gap));
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--profile-panel-gap));
    left: 0;
    display: flex;
    align-items: center;
    z-index: 1201;
    /* slide the whole panel (card + button) left by the card's actual rendered width */
    translate: calc(-1 * var(--_card-w, 300px)) 0;
    transition: translate 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-panel.open {
    translate: 0 0;
}

.profile-card {
    display: flex;
    flex-direction: column;
    /* preferred width, but never wider than viewport minus button width and a small gap */
    width: min(300px, calc(100vw - 44px - 8px));
    background: #fff;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    max-height: 100%;
    overflow: hidden;
}

.profile-panel-btn {
    align-self: center;
    writing-mode: vertical-rl;
    border-radius: 0 8px 8px 0;
    padding: 12px 6px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    border: none;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-panel-btn .icon {
    writing-mode: horizontal-tb;
    background-color: #fff;
    width: 18px;
    height: 18px;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    background: var(--bs-primary);
    color: #fff;
    position: relative;
    flex-shrink: 0;
    border-top-right-radius: 12px;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar .icon {
    width: 26px;
    height: 26px;
    background-color: #fff;
}

.profile-name {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.2;
}

.profile-designation {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8) !important;
    line-height: 1.3;
}

.profile-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}

.profile-close:hover { opacity: 1; }

.profile-card-body {
    padding: 12px 14px 14px;
    flex-grow: 1;
    overflow-y: auto;
}

.profile-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .8125rem;
    line-height: 1.3;
}

.profile-info-list li .icon {
    flex-shrink: 0;
    margin-top: 2px;
    background-color: var(--bs-primary);
}

.profile-reimbursement {
    border-top: 1px solid var(--bs-border-color-translucent);
    padding-top: 10px;
}

.profile-reimb-title {
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--bs-primary);
}

.profile-pie-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-pie-legend {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    font-size: 0.75rem;
    width: 100%;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.legend-pct {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.85;
}

.profile-card-footer {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-light, #f8f9fa);
    flex-shrink: 0;
    border-bottom-right-radius: 12px;
}

.profile-footer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary);
    margin-bottom: 2px;
}

.profile-rm-name {
    font-size: .8125rem;
    font-weight: 600;
}

.profile-rm-meta {
    font-size: 0.72rem;
    color: var(--bs-secondary);
}

/* ── CAPTCHA ── */
.captcha-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-canvas-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#captchaCanvas {
    border-radius: 8px;
    border: 1px solid var(--bs-border-color-translucent);
    flex-shrink: 0;
    display: block;
    user-select: none;
}

.captcha-refresh {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 50%;
    background: none;
    color: var(--bs-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: transform 0.4s ease;
}

.captcha-refresh:hover {
    transform: rotate(180deg);
}

.captcha-refresh svg {
    width: 100%;
    height: 100%;
}

.captcha-error {
    font-size: 0.75rem;
    color: var(--bs-danger, #dc3545);
    min-height: 1rem;
}

.captcha-error:empty {
    display: none;
}

@keyframes captchaShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.captcha-shake {
    animation: captchaShake 0.4s ease;
}

/* ── Toast Notifications ── */
#toastContainer {
    max-width: calc(100vw - 1.5rem);
}

.toast-rpay {
    min-width: min(280px, 100%);
    max-width: min(360px, 100%);
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 1;
    animation: toastIn 0.25s cubic-bezier(0.4,0,0.2,1);
}

.toast-rpay.toast-hiding {
    animation: toastOut 0.25s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* Coloured left-border accent bar */
.toast-rpay-bar {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

.toast-icon {
    font-size: 1rem;
    font-style: normal;
    line-height: 1;
    flex-shrink: 0;
}

/* Auto-dismiss progress bar */
.toast-progress {
    height: 3px;
    background: rgba(0,0,0,0.06);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toastProgress linear forwards;
    opacity: 0.5;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── Material Design Accordion ── */
.accordion {
    --md-accordion-bg:              #fff;
    --md-accordion-border-radius:   4px;
    --md-accordion-shadow:          0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --md-accordion-shadow-expanded: 0 3px 8px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.10);
    --md-accordion-divider:         rgba(0,0,0,0.12);
    --md-accordion-header-padding:  0 1rem;
    --md-accordion-body-padding:    1rem 1rem;
    --md-accordion-transition:      0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Each item is an elevated card */
.accordion-item {
    background: var(--md-accordion-bg);
    border: none !important;
    border-radius: var(--md-accordion-border-radius) !important;
    box-shadow: var(--md-accordion-shadow);
    transition: box-shadow var(--md-accordion-transition),
                margin    var(--md-accordion-transition);
    overflow: hidden;
}

/* Expanded item gets more elevation and breathing room */
.accordion-item:has(.accordion-collapse.show) {
    box-shadow: var(--md-accordion-shadow-expanded);
    margin-top: 0;
    margin-bottom: 0;
}

/* Header button — flat, no background, no border */
.accordion-button {
    background: var(--md-accordion-bg) !important;
    box-shadow: none !important;
    border: none;
    padding: 0.875rem 1rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--bs-body-color) !important;
    gap: 12px;
    transition: background var(--md-accordion-transition);
    border-radius: var(--md-accordion-border-radius) !important;
}

.accordion-button:hover {
    background: rgba(var(--bs-primary-rgb), 0.05) !important;
}

/* Thin primary underline on the active header instead of a filled bg */
.accordion-button:not(.collapsed) {
    color: var(--bs-primary) !important;
    border-bottom: 2px solid var(--bs-primary);
    border-radius: var(--md-accordion-border-radius) var(--md-accordion-border-radius) 0 0 !important;
}

/* Replace Bootstrap's default chevron with a thinner one */
.accordion-button::after {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378767B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--md-accordion-transition);
    margin-left: auto;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B5CF5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    transform: rotate(-180deg);
}

/* Body */
.accordion-body {
    padding: var(--md-accordion-body-padding);
    font-size: 0.875rem;
    color: rgba(0,0,0,0.7);
    border-top: 1px solid var(--md-accordion-divider);
}

/* Optional subtitle inside the header — wrap text in .accordion-subtitle */
.accordion-button .accordion-subtitle {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0,0,0,0.5);
    margin-top: 2px;
    line-height: 1.3;
}

.accordion-button:not(.collapsed) .accordion-subtitle {
    color: rgba(var(--bs-primary-rgb), 0.7);
}

/* ── Material Design Modal ── */

/* Backdrop — darker, no blur (MD uses a plain scrim) */
.modal-backdrop {
    --bs-backdrop-bg: rgba(0, 0, 0, 0.5);
    --bs-backdrop-opacity: 1;
}

/* Dialog — enters from slightly below, like MD elevation animation */
.modal.fade .modal-dialog {
    transform: translateY(24px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity  0.28s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Content — elevated card, no border, rounded corners */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.12);
    overflow: hidden;
}

/* Header — flat, no border, generous padding */
.modal-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem 0.5rem;
    align-items: flex-start;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(0,0,0,0.87);
}

/* Replace Bootstrap's × with a clean MD-style close icon */
.modal-header .btn-close {
    margin: -0.25rem -0.5rem -0.25rem auto;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease, background 0.2s ease;
    border-radius: 50%;
}

.modal-header .btn-close:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.06);
}

/* Body — comfortable padding, secondary text color */
.modal-body {
    padding: 0.75rem 1.5rem 1rem;
    font-size: 0.9375rem;
    color: rgba(0,0,0,0.6);
    line-height: 1.6;
}

/* Footer — no border, right-aligned text buttons */
.modal-footer {
    border-top: none;
    padding: 0.5rem 1rem 1rem;
    gap: 4px;
}

/* MD uses flat/text-style action buttons in modals */
.modal-footer .btn {
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    border-radius: 10rem;
    border: none;
    background: transparent;
    transition: background 0.2s ease;
}

.modal-footer .btn-secondary {
    color: var(--bs-dark);
    background-color: rgba(0,0,0,0.10);
}

.modal-footer .btn-secondary:hover {
    background: rgba(0,0,0,1);
    color: #FFFFFF;
}

.modal-footer .btn-primary {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.10);
}

.modal-footer .btn-primary:hover {
    color: #FFFFFF;
    background: rgba(var(--bs-primary-rgb), 1);
}

.modal-footer .btn-danger {
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.10);
}

.modal-footer .btn-danger:hover {
    color: #FFFFFF;
    background: rgba(var(--bs-danger-rgb), 1);
}

/* ── jQuery UI Autocomplete — Bootstrap 5 style ── */

/* Dropdown container — matches .dropdown-menu */
.ui-autocomplete.ui-menu {
    position: absolute;
    z-index: 9999;
    list-style: none;
    padding: 0.25rem 0.25rem;
    margin: 2px 0 0;
    background-color: #fff;
    border: 0;
    border-radius: var(--bs-border-radius, 0.375rem);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    font-size: var(--bs-body-font-size, 0.875rem);
    font-family: inherit;
    color: var(--bs-body-color, #000);
    min-width: 10rem;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    /* hide jQuery UI's default border */
    outline: none;
}

/* Individual item — matches .dropdown-item */
.ui-autocomplete.ui-menu .ui-menu-item {
    padding: 0;
    border: 0;
    background: none;
}

.ui-autocomplete.ui-menu .ui-menu-item .ui-menu-item-wrapper,
.ui-autocomplete.ui-menu .ui-menu-item > div {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: var(--bs-body-color, #000);
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-radius: 0;
    margin: 0;
}

/* Hover / focused item — matches .dropdown-item:hover */
.ui-autocomplete.ui-menu .ui-menu-item .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete.ui-menu .ui-menu-item .ui-menu-item-wrapper.ui-state-focus,
.ui-autocomplete.ui-menu .ui-menu-item > div:hover {
    background-color: var(--bs-primary);
    color: #fff;
    outline: none;
}

/* Category header — matches .dropdown-header */
.ui-autocomplete.ui-menu .ui-autocomplete-category {
    padding: 0.35rem 0.75rem 0.15rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
    pointer-events: none;
    /* divider line above each category except the first */
    border-top: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.1));
    margin-top: 0.15rem;
}

.ui-autocomplete.ui-menu .ui-autocomplete-category:first-child {
    border-top: none;
    margin-top: 0;
}

/* Remove jQuery UI's default focus outline on the widget itself */
.ui-autocomplete.ui-menu:focus {
    outline: none;
}

/* Scrollbar styling to match the rest of the UI */
.ui-autocomplete.ui-menu::-webkit-scrollbar {
    width: 4px;
}
.ui-autocomplete.ui-menu::-webkit-scrollbar-track {
    background: transparent;
}
.ui-autocomplete.ui-menu::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
