body,
body :is(p, div) {
    font-family: "Dosis", sans-serif !important;
}

.sidebar-dark-primary,
.dark-bg {
    background-color: #00253d !important;
}

.orange-bg,
.swal-button--confirm {
    background-color: #f5821f !important;
}

.card-header .nav-link.active {
    background-color: #00253d !important;
    border: none;
    outline: none;
}

.card-header .nav-link:hover {
    color: #00253d !important;
}

.card-header .nav-link.active:hover {
    color: #fff !important;
}

/* same treatment as above, for nav-pills used outside a .card-header (e.g. sub-tabs
   nested inside a tab-pane's own content) -- Bootstrap's default pill "active" color
   is blue, which isn't part of this site's palette */
.nav-pills .nav-link.active {
    background-color: #00253d !important;
    color: #fff !important;
}

.nav-pills .nav-link:not(.active):hover {
    color: #00253d;
}

/* "Filter by person" dropdowns on the requisitions-tab cards -- Bootstrap's default
   focus ring is blue, which isn't part of this site's palette */
#proj_exp_type_person:focus,
#proj_milestone_exp_person:focus {
    border-color: #f5821f;
    box-shadow: 0 0 0 .2rem rgba(245, 130, 31, .25);
}

.orange {
    color: #f5821f !important;
}

.dark-text {
    color: #00253d;
}

.btn-default,
.btn-primary,
a.btn-primary,
.dt-buttons > .dt-button {
    background-color: #f5821f !important;
    color: #fff !important;
    border: none !important;
    outline: none;
    text-transform: capitalize !important;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default:visited,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited,
.dt-buttons > .dt-button:hover,
.dt-buttons > .dt-button:focus,
.dt-buttons > .dt-button:active,
.dt-buttons > .dt-button:visited {
    color: #fff !important;
}

/* Defensive override: a single-class ancestor selector like ".card a" or
   ".table a" has HIGHER CSS specificity than a bare ".btn-primary" class
   (the tied class count falls through to element count), so it can silently
   win the text color even though .btn-primary "looks" like it should apply.
   These compound selectors guarantee white text regardless of such rules. */
a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
a.btn.btn-primary:visited,
body a.btn-primary,
body a.btn-primary:hover,
body a.btn-primary:focus,
body a.btn-primary:active,
body a.btn-primary:visited {
    color: #fff !important;
}

/* .btn-primary above is themed orange, but its OUTLINE counterpart was left
   on Bootstrap's own blue - so any outline button sat visibly off-palette
   next to the solid ones (confirmed on "View Journal History" in the Ledger
   Entries drawer). Text-decoration is pinned to none here too: these are
   anchors, and the underline from the generic link styling was showing
   through .btn's own reset. */
.btn-outline-primary,
a.btn-outline-primary,
a.btn.btn-outline-primary {
    background-color: transparent !important;
    color: #f5821f !important;
    border: 1px solid #f5821f !important;
    text-transform: capitalize !important;
    text-decoration: none !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:visited,
a.btn-outline-primary:hover,
a.btn-outline-primary:focus,
a.btn-outline-primary:active,
a.btn-outline-primary:visited,
a.btn.btn-outline-primary:hover,
a.btn.btn-outline-primary:focus,
a.btn.btn-outline-primary:active,
body a.btn-outline-primary:hover,
body a.btn-outline-primary:focus,
body a.btn-outline-primary:active {
    background-color: #f5821f !important;
    color: #fff !important;
    border-color: #f5821f !important;
    text-decoration: none !important;
}

td a {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.card-header h3 {
    text-transform: uppercase;
}

.nav-treeview li {
    padding-left: 15px;
}

/* Sidebar must sit above the top navbar */
.main-sidebar,
.main-sidebar .brand-link {
    z-index: 1040 !important;
}
.main-header {
    z-index: 1035 !important;
}

/*scroll bars*/
/* width */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    /* display: none; */
}

/* Track */
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 0px rgba(155, 155, 155, 0.4);
    border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: rgba(155, 155, 155, 0.4);
    border-radius: 10px;
}

@keyframes flicker {
    0% {
        outline: solid 3px rgb(37, 18, 18);
    }

    10% {
        outline: solid 1px rgb(37, 18, 18);
    }

    22% {
        outline: solid 0.6px rgb(37, 18, 18);
    }

    37% {
        outline: solid 1px rgb(37, 18, 18);
    }

    55% {
        outline: solid 0.6px rgb(37, 18, 18);
    }

    70% {
        outline: solid 0.8px rgb(37, 18, 18);
    }

    82% {
        outline: solid 1px rgb(37, 18, 18);
    }

    100% {
        outline: solid 2px rgb(37, 18, 18);
    }
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(-0.1deg);
    }

    22% {
        transform: rotate(0.25deg);
    }

    37% {
        transform: rotate(-0.125deg);
    }

    55% {
        transform: rotate(o.25deg);
    }

    70% {
        transform: rotate(-0.25deg);
    }

    82% {
        transform: rotate(0.25deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#gantt_chart {
    width: 100%;
    height: 600px;
}

.gantt_add,
.gantt_grid_head_add {
    display: none;
}

.gantt_task_content a {
    color: #fff;
}

.gantt_line_wrapper > div,
.daterangepicker,
.pvtFilterBox {
    box-shadow: 10px 10px 5px lightblue;
}

.gantt_task_content {
    box-shadow: 10px 10px 5px lightblue;
    border: unset !important;
    outline: unset !important;
}

/* completed milestone  */
.completed_milestone {
    background-color: #23964d !important;
}

/* delayed milestone  */
.passed {
    background-color: #e70303 !important;
}

.within {
    background-color: #434c4f !important;
}

/* td a, */
.gantt_tree_content a {
    color: #02aceb !important;
}

/* Red backgrounds  */
.delayed,
.high {
    background: #ff0000 !important;
    box-shadow: 10px 10px 5px lightblue;
    border: unset;
    outline: unset;
}

.delayed,
.passed {
    animation: flicker 2s ease-in-out infinite;
}

/*
.medium {
  background: #FFBF00 !important;
  border: unset;
  outline: unset;
  box-shadow: 10px 10px 5px lightblue;
} */

.low,
.medium,
.high {
    background: #09c !important;
    border: unset;
    outline: unset;
    box-shadow: 10px 10px 5px lightblue;
}

.completed {
    background: #23964d !important;
    border: unset;
    outline: unset;
    box-shadow: 10px 10px 5px lightblue;
}

.completed_milestone .gantt_task_progress,
.within .gantt_task_progress,
.medium .gantt_task_progress,
.high .gantt_task_progress,
.low .gantt_task_progress,
.completed .gantt_task_progress {
    background: #23964d !important;
}

.delayed .gantt_task_progress,
.passed .gantt_task_progress {
    background: #670c0c !important;
}

.gantt_task_content * {
    font-size: 110% !important;
}

.gantt_tree_content a,
.gantt_grid_head_cell {
    font-size: 110% !important;
}

.gantt_scale_cell {
    font-size: 110% !important;
}

.action-buttons {
    background-color: red;
    position: absolute;
    right: 0;
    top: 0;
}

/* Custom CSS for hover dropdown */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu {
    margin-top: 0px !important;
}

.custom_table table tr:nth-child(1) {
    background: #00253d;
    color: #ffffff;
}

.custom_table table tr:nth-child(1) td b {
    text-transform: capitalize !important;
    font-weight: 400;
}

.custom_table table td {
    min-width: 150px !important;
    border: solid 0.25px rgba(155, 155, 155, 0.5);
}

.custom_table table tr:nth-child(even) {
    background: rgba(249, 249, 249, 1);
}
input#sub_menu {
    display: none;
}

@media screen and (max-width: 542px) {
    /* Make the <h4> fill its own line */
    .card-header.dark-bg > h4,
    .card-header.dark-text.text-uppercase > h4 {
        display: block;
        margin-bottom: 10px;
        width: 100% !important;
    }

    .card-header.dark-bg > a,
    .card-header.dark-text.text-uppercase > a {
        margin-bottom: 5px !important;
    }
}

.no_buttons ._tabs-container > div :is(h3, div:first-child) {
    display: none !important;
    background: red;
    padding: 300px;
}

.no_buttons :is(.pvtRendererArea) {
    border: none !important;
}

.hide_totals table.pvtTable > tbody tr:last-child {
    display: none !important;
}

.hide_totals table.pvtTable > tbody > tr > *:last-child,
.hide_totals table.pvtTable > thead > tr:first-child > *:last-child {
    display: none !important;
}

.hide_first_row table.pvtTable > tbody > tr:first-child {
    display: none !important;
}

.expanded_cells table tr :is(td, th) {
    min-width: 130px !important;
}

.stripped table.pvtTable > tbody > tr:nth-child(even) :is(td, th) {
    background-color: #f7f7f7 !important;
}

.underline {
    width: 100%;
    height: 10px;
    background: rgba(0, 37, 61, 0.5);
    margin: 50px auto;
    border-radius: 5px;
}

/* dynamic tabs  */
/* ================================================
   DYNAMIC NAV TABS - STYLED LIKE IMAGE
   ================================================ */

/* The UL container */
.dynamic-navtabs-source {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

/* Tab buttons wrapper */
.tab-buttons-wrapper {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1rem;
    padding: 0;
    background-color: #f5f5f5;
}

/* Individual tab button */
.tab-button {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(155, 155, 155, 0.1);
    cursor: pointer;
    color: inherit;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    outline: none;
}

/* Remove right border from last button */
.tab-button:last-child {
    border-right: none;
}

/* Hover state for inactive tabs */
.tab-button:not(.tab-active):hover {
    background-color: #6a6a6a;
}

/* Active tab button */
.tab-button.tab-active {
    color: #ffffff;
    background-color: #00253d;
    font-weight: 500;
    border-bottom: 2px solid #00253d;
    margin-bottom: -2px;
    z-index: 1;
}

/* Icon styling inside buttons */
.tab-button i,
.tab-button svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Active tab icon color */
.tab-button.tab-active i,
.tab-button.tab-active svg {
    color: #00253d;
}

/* Tab content wrapper */
.tab-content-wrapper {
    position: relative;
}

/* Hide all tab content by default */
.tab-content-wrapper > li {
    display: none;
    list-style: none;
}

/* ---- shared requisition activity table styling ----
   used by requisitions.view_requisition and requisitions.account (accounting page) -- both
   render the same grouped Milestone/Event/Budget Line activity table from
   RequisitionsController::createGroupedReqTable(), so the styling lives here globally
   instead of being duplicated (and drifting) per-page */

/* bring the server-rendered form tables (Travel / Activity) in line
   with the analytics table look - light header, quiet rows */
.custom_table table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.custom_table table td {
    border: none;
    border-bottom: 1px solid #eef2f5;
    padding: .6rem .75rem;
    vertical-align: middle;
    color: #243b4a;
}

/* first row is the header row */
.custom_table table tbody tr:first-child td {
    background: #eef3f7;
    color: #00253d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-size: .8rem;
    border-bottom: 1px solid #dbe4ec;
}

.custom_table table tbody tr:not(:first-child):nth-child(even) td {
    background: #fafbfc;
}

.custom_table table tbody tr:not(:first-child):hover td {
    background: #eef4f8;
}

.custom_table table tbody tr:last-child td {
    border-bottom: none;
}

/* grouped Activity Form: Milestone/Event/Budget Line banner row */
.group-banner-cell {
    background: #f4f7fa !important;
    padding: .6rem .75rem !important;
    border-top: 2px solid #dbe4ec !important;
    border-bottom: 2px solid #dbe4ec !important;
}

.group-banner {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    border-radius: 999px;
    padding: .3rem .8rem;
    box-shadow: 0 1px 2px rgba(0, 37, 61, .1);
    font-size: .82rem;
    color: #243b4a;
}

.group-chip i {
    font-size: .75rem;
}

.group-chip em {
    font-style: normal;
    color: #93a2ac;
    text-transform: uppercase;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.group-chip b {
    font-weight: 700;
}

.group-chip b a {
    color: inherit;
    text-decoration: underline;
}

.group-chip-milestone i {
    color: #00253d;
}

.group-chip-event i {
    color: #f5821f;
}

.group-chip-event b a {
    color: #00253d;
}

.group-chip-budget i {
    color: #1e8e5a;
}

/* Show active tab content */
.tab-content-wrapper > li.tab-active {
    display: block;
}
