/* Miles brand color override - forces brand blues to orange.
   Loaded last so it wins the cascade. Remove the <link> to revert. */

:root {
    --miles-orange: #FA7315;
    --miles-orange-hover: #EA580B;
}

/* Primary buttons */
.btn-primary,
.btn-info {
    background-color: #FA7315 !important;
    border-color: #FA7315 !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: #EA580B !important;
    border-color: #EA580B !important;
    color: #fff !important;
}

/* Outline primary buttons */
.btn-outline-primary {
    color: #FA7315 !important;
    border-color: #FA7315 !important;
}
.btn-outline-primary:hover {
    background-color: #FA7315 !important;
    color: #fff !important;
}

/* Links */
a { color: #FA7315; }
a:hover { color: #EA580B; }

/* Text / bg / badge / border primary utilities */
.text-primary { color: #FA7315 !important; }
.bg-primary { background-color: #FA7315 !important; }
.badge-primary { background-color: #FA7315 !important; }
.border-primary { border-color: #FA7315 !important; }

/* Specific brand blues used across the app */
[style*="#3490dc"], [style*="#009ee2"], [style*="#008dff"], [style*="#225784"] {
    color: #FA7315 !important;
}

/* Active nav / pagination / tabs */
.nav-pills .nav-link.active,
.page-item.active .page-link {
    background-color: #FA7315 !important;
    border-color: #FA7315 !important;
}
.page-link { color: #FA7315; }

/* Form focus ring */
.form-control:focus {
    border-color: #FA7315 !important;
    box-shadow: 0 0 0 0.2rem rgba(250, 115, 21, 0.25) !important;
}

/* Checkbox / radio checked */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #FA7315 !important;
    border-color: #FA7315 !important;
}

/* ---- Broad sweep: brand-blue family -> orange ---- */

/* Sidebar module icons + labels */
.sidebar a, .sidebar i, .sidebar svg,
.side-menu a, .side-menu i,
.nav-icon, .menu-icon {
    color: #FA7315 !important;
    fill: #FA7315 !important;
}
.sidebar a:hover, .side-menu a:hover { color: #EA580B !important; }

/* SVG icons using the brand blue */
svg [fill="#3490dc"], svg [fill="#009ee2"], svg [fill="#008dff"],
[fill="#3490dc"], [fill="#009ee2"], [fill="#008dff"] {
    fill: #FA7315 !important;
}

/* The + add buttons and Insert / Next / action buttons */
.btn-add, .add-btn, .btn-insert,
button.btn-primary, .btn.btn-primary,
.wizard .btn-primary, .actions .btn {
    background-color: #FA7315 !important;
    border-color: #FA7315 !important;
    color: #fff !important;
}

/* Wizard step tabs - active step */
.wizard .nav-tabs .active,
.wizard-steps .active,
.nav-wizard li.active a,
.step.active, .active-step,
li.active > a {
    background-color: #FA7315 !important;
    border-color: #FA7315 !important;
    color: #fff !important;
}

/* removed overly-broad inline-blue rule (was painting select2 orange) */

/* ---- Sidebar nav pills (the module icons + labels) ---- */
.custom-nav-pills,
.custom-nav-pills:link,
.custom-nav-pills:visited,
a.custom-nav-pills,
.nav-pills .custom-nav-pills {
    color: #FA7315 !important;
}
.custom-nav-pills:hover,
.custom-nav-pills.active,
.custom-nav-pills:focus {
    color: #EA580B !important;
}
.custom-nav-pills i,
.custom-nav-pills svg,
.custom-nav-pills .fa,
.custom-nav-pills .fas {
    color: #FA7315 !important;
    fill: #FA7315 !important;
}

/* Catch the exact sidebar blue hex wherever it is used */
[style*="#1061a5"] { color: #FA7315 !important; }

/* ---- Item insert / + buttons ---- */
.item-insert-button {
    background: #FA7315 !important;
    background-color: #FA7315 !important;
    color: #fff !important;
}
.item-insert-button:hover { background: #EA580B !important; }

/* ---- jQuery Steps wizard ---- */
.wizard > .steps .current a,
.wizard > .steps .current a:hover,
.wizard > .steps .current a:active {
    background: #FA7315 !important;
    color: #fff !important;
}
.wizard > .actions a,
.wizard > .actions a:hover,
.wizard > .actions a:active {
    background: #FA7315 !important;
    color: #fff !important;
}
.wizard > .actions a:hover { background: #EA580B !important; }

/* Catch the exact wizard blues wherever used */
[style*="#2184be"], [style*="#1061a5"] {
    background: #FA7315 !important;
    background-color: #FA7315 !important;
}

/* ---- Active sidebar tile: white icon + text on orange ---- */
.custom-nav-pills.active,
.custom-nav-pills.active i,
.custom-nav-pills.active svg,
.custom-nav-pills.active .fa,
.custom-nav-pills.active .fas,
.nav-pills .nav-link.active,
.nav-pills .nav-link.active i,
.nav-pills .nav-link.active svg,
li.active .custom-nav-pills,
li.active .custom-nav-pills i,
.active > .custom-nav-pills,
.active > .custom-nav-pills i {
    color: #fff !important;
    fill: #fff !important;
}

/* ---- Bookings table: hide "#" (col 2) and "Master" (col 28) ---- */
#bookings thead th:nth-child(2),
#bookings tbody td:nth-child(2),
#bookings tfoot th:nth-child(2),
#bookings thead th:nth-child(28),
#bookings tbody td:nth-child(28),
#bookings tfoot th:nth-child(28) {
    display: none !important;
}

/* ---- Autocomplete / select dropdown highlighted item -> orange ---- */
.ui-menu .ui-menu-item .ui-state-active,
.ui-menu .ui-menu-item .ui-state-focus,
.ui-menu .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete .ui-menu-item .ui-state-active {
    background: #FA7315 !important;
    border-color: #FA7315 !important;
    color: #fff !important;
}

/* select2 highlighted option */
.select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #FA7315 !important;
    color: #fff !important;
}

/* ---- Field labels with inline brand-blue text -> orange (color only) ---- */
label[style*="rgb(52, 144, 220)"],
label[style*="#3490dc"],
.custom-label[style*="rgb(52, 144, 220)"],
.custom-label[style*="#3490dc"],
span[style*="rgb(52, 144, 220)"],
span[style*="#3490dc"] {
    color: #FA7315 !important;
}
