:root {
    --primary: #c85103;
    --primary-light: #b34703; /* optional slightly lighter shade for hover if needed */
    --primary-lighter: #9f4300; /* optional for table hover or other effects */
    --primary: #c85103;          /* main primary color */
    --primary-dark: #a04302;     /* slightly darker for hover/active */
    --primary-darker: #803501;   /* for active/pressed states */
    --primary-focus: rgba(200, 81, 3, 0.5); /* for focus box-shadow */
}

 /* Increase z-index for AdminLTE Toasts */
 .toasts-top-right, .toasts-top-left, .toasts-bottom-right, .toasts-bottom-left, .toasts-top-center, .toasts-bottom-center {
    z-index: 1081 !important; /* higher than Bootstrap modal (1050/1060) */
 }

 .toast {
    z-index: 1082 !important;
 }

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.dark-mode .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.register-box {
    width: 540px;
}

@media (max-width: 576px) {
    .register-box {
        margin-top: .5rem;
        width: 90%;
    }
}

.form-control:focus {
    border-color: var(--primary-lighter);
}

/* tables using primary */
.table-primary,
.table-primary>td,
.table-primary>th {
    background-color: var(--primary-light);
}

.table-primary tbody+tbody,
.table-primary td,
.table-primary th,
.table-primary thead th {
    border-color: #7abaff;
    /* keep as is, or generate a darker/lighter shade if you want dynamic */
}

.table-hover .table-primary:hover {
    background-color: var(--primary-lighter);
}

.table-hover .table-primary:hover>td,
.table-hover .table-primary:hover>th {
    background-color: var(--primary-lighter);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: none;
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-darker);
}

.btn-primary.focus,
.btn-primary:focus {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-darker);
    box-shadow: 0 0 0 0 var(--primary-focus);
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show>.btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--primary-darker);
    border-color: #803501;
    /* match active border */
}

.btn-primary:not(:disabled):not(.disabled).active:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus,
.show>.btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary.focus,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}

.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
    color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show>.btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:not(:disabled):not(.disabled).active:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.show>.btn-outline-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}
/* Badges */
.badge-primary {
    color: #fff;
    background-color: var(--primary);
}

a.badge-primary:focus,
a.badge-primary:hover {
    color: #fff;
    background-color: var(--primary-dark);
}

a.badge-primary.focus,
a.badge-primary:focus {
    outline: 0;
    box-shadow: 0 0 0 0 var(--primary-focus);
}

/* Alerts */
.alert-primary {
    color: var(--primary-darker);
    background-color: var(--primary-lighter);
    border-color: var(--primary-light);
}

.alert-primary hr {
    border-top-color: var(--primary-light);
}

.alert-primary .alert-link {
    color: var(--primary-darker);
}

/* List Group Items */
.list-group-item-primary {
    color: var(--primary-darker);
    background-color: var(--primary-light);
}

.list-group-item-primary.list-group-item-action:focus,
.list-group-item-primary.list-group-item-action:hover {
    color: var(--primary-darker);
    background-color: var(--primary-lighter);
}

.list-group-item-primary.list-group-item-action.active {
    color: #fff;
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
}

/* Utility Classes */
.bg-primary {
    background-color: var(--primary) !important;
}

a.bg-primary:focus,
a.bg-primary:hover,
button.bg-primary:focus,
button.bg-primary:hover {
    background-color: var(--primary-dark) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

a.text-primary:focus,
a.text-primary:hover {
    color: var(--primary-dark) !important;
}

/* dark mode */
.dark-mode :root {
    --primary: #c85103;
    --primary-rgb: 200, 81, 3;

    --primary-light: #b34703;
    --primary-light-rgb: 179, 71, 3;

    --primary-lighter: #9f4300;
    --primary-lighter-rgb: 159, 67, 0;

    --primary-dark: #a04302;
    --primary-dark-rgb: 160, 67, 2;

    --primary-darker: #803501;
    --primary-darker-rgb: 128, 53, 1;

    --primary-focus: rgba(200, 81, 3, 0.5);
}

/* Sidebar Brand Link Overrides */
.sidebar-dark-primary .brand-link:not([class*="navbar"]) {
    background-color: var(--primary) !important;
}

.sidebar-light-primary .brand-link:not([class*="navbar"]) {
    background-color: var(--primary) !important;
}

/* Dark Mode Overrides */
.dark-mode .sidebar-dark-primary .brand-link:not([class*="navbar"]),
.layout-sm-navbar-fixed .dark-mode .sidebar-dark-primary .brand-link:not([class*="navbar"]),
.layout-md-navbar-fixed .dark-mode .sidebar-dark-primary .brand-link:not([class*="navbar"]),
.layout-lg-navbar-fixed .dark-mode .sidebar-dark-primary .brand-link:not([class*="navbar"]),
.layout-xl-navbar-fixed .dark-mode .sidebar-dark-primary .brand-link:not([class*="navbar"]) {
    background-color: var(--primary) !important;
}

.dark-mode .sidebar-light-primary .brand-link:not([class*="navbar"]),
.layout-sm-navbar-fixed .dark-mode .sidebar-light-primary .brand-link:not([class*="navbar"]),
.layout-md-navbar-fixed .dark-mode .sidebar-light-primary .brand-link:not([class*="navbar"]),
.layout-lg-navbar-fixed .dark-mode .sidebar-light-primary .brand-link:not([class*="navbar"]),
.layout-xl-navbar-fixed .dark-mode .sidebar-light-primary .brand-link:not([class*="navbar"]) {
    background-color: var(--primary) !important;
}
/* Sidebar active nav-link */
.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,
.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.sidebar-dark-primary .nav-sidebar.nav-legacy>.nav-item>.nav-link.active,
.sidebar-light-primary .nav-sidebar.nav-legacy>.nav-item>.nav-link.active {
    border-color: var(--primary) !important;
}

/* Dark mode sidebar active nav-link */
.dark-mode .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,
.dark-mode .sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.dark-mode .sidebar-dark-primary .nav-sidebar.nav-legacy>.nav-item>.nav-link.active,
.dark-mode .sidebar-light-primary .nav-sidebar.nav-legacy>.nav-item>.nav-link.active {
    border-color: var(--primary) !important;
}

/* Navbar primary background */
.navbar-primary,
.dark-mode .navbar-primary {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* Navbar light mode placeholders and input background */
.navbar-primary.navbar-light .form-control-navbar,
.navbar-primary.navbar-light .form-control-navbar+.input-group-append>.btn-navbar,
.dark-mode .navbar-primary.navbar-light .form-control-navbar,
.dark-mode .navbar-primary.navbar-light .form-control-navbar+.input-group-append>.btn-navbar {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-dark) !important;
    color: rgba(52, 58, 64, 0.8) !important;
}

/* Navbar focus state for light mode */
.navbar-primary.navbar-light .form-control-navbar:focus,
.navbar-primary.navbar-light .form-control-navbar:focus+.input-group-append .btn-navbar,
.dark-mode .navbar-primary.navbar-light .form-control-navbar:focus,
.dark-mode .navbar-primary.navbar-light .form-control-navbar:focus+.input-group-append .btn-navbar {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-darker) !important;
    color: #343a40 !important;
    box-shadow: 0 0 0 0.2rem var(--primary-focus) !important;
}

/* Navbar dark mode input */
.navbar-primary.navbar-dark .form-control-navbar,
.navbar-primary.navbar-dark .form-control-navbar+.input-group-append>.btn-navbar,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar+.input-group-append>.btn-navbar {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Navbar dark mode focus */
.navbar-primary.navbar-dark .form-control-navbar:focus,
.navbar-primary.navbar-dark .form-control-navbar:focus+.input-group-append .btn-navbar,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar:focus,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar:focus+.input-group-append .btn-navbar {
    background-color: var(--primary-darker) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem var(--primary-focus) !important;
}

/* Placeholder colors for inputs */
.navbar-primary.navbar-light .form-control-navbar::-webkit-input-placeholder,
.navbar-primary.navbar-light .form-control-navbar::-moz-placeholder,
.navbar-primary.navbar-light .form-control-navbar:-ms-input-placeholder,
.navbar-primary.navbar-light .form-control-navbar::-ms-input-placeholder,
.navbar-primary.navbar-light .form-control-navbar::placeholder,
.dark-mode .navbar-primary.navbar-light .form-control-navbar::-webkit-input-placeholder,
.dark-mode .navbar-primary.navbar-light .form-control-navbar::-moz-placeholder,
.dark-mode .navbar-primary.navbar-light .form-control-navbar:-ms-input-placeholder,
.dark-mode .navbar-primary.navbar-light .form-control-navbar::-ms-input-placeholder,
.dark-mode .navbar-primary.navbar-light .form-control-navbar::placeholder {
    color: rgba(52, 58, 64, 0.8) !important;
}

.navbar-primary.navbar-dark .form-control-navbar::-webkit-input-placeholder,
.navbar-primary.navbar-dark .form-control-navbar::-moz-placeholder,
.navbar-primary.navbar-dark .form-control-navbar:-ms-input-placeholder,
.navbar-primary.navbar-dark .form-control-navbar::-ms-input-placeholder,
.navbar-primary.navbar-dark .form-control-navbar::placeholder,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar::-webkit-input-placeholder,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar::-moz-placeholder,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar:-ms-input-placeholder,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar::-ms-input-placeholder,
.dark-mode .navbar-primary.navbar-dark .form-control-navbar::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}
/* Custom Switch - Primary */
.custom-switch.custom-switch-off-primary .custom-control-input~.custom-control-label::before {
    background-color: var(--primary) !important;
    border-color: var(--primary-dark) !important;
}

.custom-switch.custom-switch-off-primary .custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.custom-switch.custom-switch-off-primary .custom-control-input~.custom-control-label::after {
    background-color: var(--primary-darker) !important;
}

.custom-switch.custom-switch-on-primary .custom-control-input:checked~.custom-control-label::before {
    background-color: var(--primary) !important;
    border-color: var(--primary-dark) !important;
}

.custom-switch.custom-switch-on-primary .custom-control-input:checked:focus~.custom-control-label::before {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.custom-switch.custom-switch-on-primary .custom-control-input:checked~.custom-control-label::after {
    background-color: var(--primary-light) !important;
}
/* Custom Range - Primary */
.custom-range.custom-range-primary:focus {
    outline: none;
}

.custom-range.custom-range-primary:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.custom-range.custom-range-primary:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.custom-range.custom-range-primary:focus::-ms-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.custom-range.custom-range-primary::-webkit-slider-thumb {
    background-color: var(--primary) !important;
}

.custom-range.custom-range-primary::-webkit-slider-thumb:active {
    background-color: var(--primary-light) !important;
}

.custom-range.custom-range-primary::-moz-range-thumb {
    background-color: var(--primary) !important;
}

.custom-range.custom-range-primary::-moz-range-thumb:active {
    background-color: var(--primary-light) !important;
}

.custom-range.custom-range-primary::-ms-thumb {
    background-color: var(--primary) !important;
}

.custom-range.custom-range-primary::-ms-thumb:active {
    background-color: var(--primary-light) !important;
}

/* Custom Checkbox/Radio - Primary */
.custom-control-input-primary:checked~.custom-control-label::before {
    border-color: var(--primary) !important;
    background-color: var(--primary) !important;
}

.custom-control-input-primary.custom-control-input-outline:checked[type="checkbox"]~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23c85103' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E") !important;
}

.custom-control-input-primary.custom-control-input-outline:checked[type="radio"]~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23c85103'/%3E%3C/svg%3E") !important;
}

.custom-control-input-primary:focus~.custom-control-label::before {
    box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 0 0 0.2rem var(--primary-focus) !important;
}

.custom-control-input-primary:focus:not(:checked)~.custom-control-label::before {
    border-color: var(--primary-light) !important;
}

.custom-control-input-primary:not(:disabled):active~.custom-control-label::before {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}
/* Dark-mode Custom Range - Primary */
.dark-mode .custom-range.custom-range-primary:focus {
    outline: none;
}

.dark-mode .custom-range.custom-range-primary:focus::-webkit-slider-thumb,
.dark-mode .custom-range.custom-range-primary:focus::-moz-range-thumb,
.dark-mode .custom-range.custom-range-primary:focus::-ms-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.dark-mode .custom-range.custom-range-primary::-webkit-slider-thumb,
.dark-mode .custom-range.custom-range-primary::-moz-range-thumb,
.dark-mode .custom-range.custom-range-primary::-ms-thumb {
    background-color: var(--primary) !important;
}

.dark-mode .custom-range.custom-range-primary::-webkit-slider-thumb:active,
.dark-mode .custom-range.custom-range-primary::-moz-range-thumb:active,
.dark-mode .custom-range.custom-range-primary::-ms-thumb:active {
    background-color: var(--primary-light) !important;
}

/* Dark-mode Custom Switch - Primary */
.dark-mode .custom-switch.custom-switch-off-primary .custom-control-input~.custom-control-label::before,
.dark-mode .custom-switch.custom-switch-on-primary .custom-control-input:checked~.custom-control-label::before {
    background-color: var(--primary) !important;
    border-color: var(--primary-dark) !important;
}

.dark-mode .custom-switch.custom-switch-off-primary .custom-control-input:focus~.custom-control-label::before,
.dark-mode .custom-switch.custom-switch-on-primary .custom-control-input:checked:focus~.custom-control-label::before {
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--primary-focus) !important;
}

.dark-mode .custom-switch.custom-switch-off-primary .custom-control-input~.custom-control-label::after {
    background-color: var(--primary-darker) !important;
}

.dark-mode .custom-switch.custom-switch-on-primary .custom-control-input:checked~.custom-control-label::after {
    background-color: var(--primary-light) !important;
}
/* Dark-mode Custom Controls - Primary */
.dark-mode .custom-control-input-primary:checked~.custom-control-label::before {
    border-color: var(--primary);
    background-color: var(--primary);
}

/* Checkbox (checked) - uses mask so color comes from background-color */
.custom-control-input-primary.custom-control-input-outline:checked[type="checkbox"]~.custom-control-label::after {
    /* fill color is provided by background-color */
    background-color: var(--primary);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    /* WebKit-prefixed mask */
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    /* Standard mask */
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    /* optional sizing tweaks */
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
}

/* Radio (checked) */
.custom-control-input-primary.custom-control-input-outline:checked[type="radio"]~.custom-control-label::after {
    background-color: var(--primary);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3'/></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3'/></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
}

/* Dark-mode variants — color with --primary-dark */
.dark-mode .custom-control-input-primary.custom-control-input-outline:checked[type="checkbox"]~.custom-control-label::after,
.dark-mode .custom-control-input-primary.custom-control-input-outline:checked[type="radio"]~.custom-control-label::after {
    background-color: var(--primary-dark);
}

.dark-mode .custom-control-input-primary:focus~.custom-control-label::before {
    box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 0 0 0.2rem var(--primary-focus);
}

.dark-mode .custom-control-input-primary:focus:not(:checked)~.custom-control-label::before {
    border-color: var(--primary-light);
}

.dark-mode .custom-control-input-primary:not(:disabled):active~.custom-control-label::before {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

/* Card Primary */
.card-primary:not(.card-outline)>.card-header {
    background-color: var(--primary);
    color: #fff;
}

.card-primary:not(.card-outline)>.card-header a {
    color: #fff;
}

.card-primary:not(.card-outline)>.card-header a.active {
    color: #1f2d3d;
    /* leave this as is, it's specific contrast */
}

.card-primary.card-outline {
    border-top: 3px solid var(--primary);
}

.card-primary.card-outline-tabs>.card-header a.active,
.card-primary.card-outline-tabs>.card-header a.active:hover {
    border-top: 3px solid var(--primary);
}

.bg-primary>.card-header .btn-tool,
.bg-gradient-primary>.card-header .btn-tool,
.card-primary:not(.card-outline)>.card-header .btn-tool {
    color: rgba(255, 255, 255, 0.8);
}

.bg-primary>.card-header .btn-tool:hover,
.bg-gradient-primary>.card-header .btn-tool:hover,
.card-primary:not(.card-outline)>.card-header .btn-tool:hover {
    color: #fff;
}

/* Datetimepicker inside primary cards */
.card.bg-primary .bootstrap-datetimepicker-widget table td:hover,
.card.bg-gradient-primary .bootstrap-datetimepicker-widget table td:hover,
.card.bg-primary .bootstrap-datetimepicker-widget table thead tr:first-child th:hover,
.card.bg-gradient-primary .bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

.card.bg-primary .bootstrap-datetimepicker-widget table td.active,
.card.bg-primary .bootstrap-datetimepicker-widget table td.active:hover,
.card.bg-gradient-primary .bootstrap-datetimepicker-widget table td.active,
.card.bg-gradient-primary .bootstrap-datetimepicker-widget table td.active:hover {
    background-color: var(--primary-light);
    color: #fff;
}

.card.bg-primary .bootstrap-datetimepicker-widget table td.today::before,
.card.bg-gradient-primary .bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: #fff;
}
.dark-mode .card-primary:not(.card-outline)>.card-header {
    background-color: var(--primary);
}

.dark-mode .card-primary.card-outline {
    border-top: 3px solid var(--primary);
}

.dark-mode .card-primary.card-outline-tabs>.card-header a.active,
.dark-mode .card-primary.card-outline-tabs>.card-header a.active:hover {
    border-top: 3px solid var(--primary);
}

.dark-mode .card.bg-primary .bootstrap-datetimepicker-widget table td:hover,
.dark-mode .card.bg-gradient-primary .bootstrap-datetimepicker-widget table td:hover {
    background-color: var(--primary-dark);
}

.dark-mode .card.bg-primary .bootstrap-datetimepicker-widget table td.active,
.dark-mode .card.bg-gradient-primary .bootstrap-datetimepicker-widget table td.active {
    background-color: var(--primary-light);
}
.toast.bg-primary {
    background-color: rgba(var(--primary-rgb), 0.9) !important;
}

.toast.bg-primary .toast-header {
    background-color: rgba(var(--primary-rgb), 0.85);
    color: #fff;
}

.dark-mode .toast.bg-primary {
    background-color: rgba(var(--primary-dark-rgb), 0.9) !important;
}

.dark-mode .toast.bg-primary .toast-header {
    background-color: rgba(var(--primary-dark-rgb), 0.85);
    color: #fff;
}

/* ==========================
   INFO BOX
========================== */
.info-box .bg-primary,
.info-box .bg-gradient-primary {
    color: #fff;
    background-color: var(--primary);
}

.info-box .bg-primary .progress-bar,
.info-box .bg-gradient-primary .progress-bar {
    background-color: #fff;
}

/* ==========================
   DIRECT CHAT - PRIMARY
========================== */
.direct-chat-primary .right>.direct-chat-text {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.direct-chat-primary .right>.direct-chat-text::after,
.direct-chat-primary .right>.direct-chat-text::before {
    border-left-color: var(--primary);
}

/* ==========================
   DARK MODE DIRECT CHAT - PRIMARY
========================== */
.dark-mode .direct-chat-primary .right>.direct-chat-text {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.dark-mode .direct-chat-primary .right>.direct-chat-text::after,
.dark-mode .direct-chat-primary .right>.direct-chat-text::before {
    border-left-color: var(--primary-dark);
}

/* ==========================
   SELECT2 - PRIMARY
========================== */

/* Single selection focus */
.select2-primary+.select2-container--default.select2-container--open .select2-selection--single,
.select2-primary+.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-focus);
}

/* Search field focus inside dropdown */
.select2-container--default .select2-primary.select2-dropdown .select2-search__field:focus,
.select2-container--default .select2-primary .select2-dropdown .select2-search__field:focus,
.select2-container--default .select2-primary .select2-search--inline .select2-search__field:focus,
.select2-primary .select2-container--default.select2-dropdown .select2-search__field:focus,
.select2-primary .select2-container--default .select2-dropdown .select2-search__field:focus,
.select2-primary .select2-container--default .select2-search--inline .select2-search__field:focus {
    border: 1px solid var(--primary-focus);
}

/* Highlighted option */
.select2-container--default .select2-primary .select2-results__option--highlighted,
.select2-primary .select2-container--default .select2-results__option--highlighted {
    background-color: var(--primary);
    color: #fff;
}

/* Highlighted & selected option */
.select2-container--default .select2-primary .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-primary .select2-results__option--highlighted[aria-selected]:hover,
.select2-primary .select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-primary .select2-container--default .select2-results__option--highlighted[aria-selected]:hover {
    background-color: var(--primary-dark);
    color: #fff;
}

/* Multiple selection focus */
.select2-container--default .select2-primary .select2-selection--multiple:focus,
.select2-primary .select2-container--default .select2-selection--multiple:focus {
    border-color: var(--primary-focus);
}

/* Multiple selection choice styling */
.select2-container--default .select2-primary .select2-selection--multiple .select2-selection__choice,
.select2-primary .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

/* Choice remove button */
.select2-container--default .select2-primary .select2-selection--multiple .select2-selection__choice__remove,
.select2-primary .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.7);
}

.select2-container--default .select2-primary .select2-selection--multiple .select2-selection__choice__remove:hover,
.select2-primary .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

/* Multiple selection focus border */
.select2-container--default .select2-primary.select2-container--focus .select2-selection--multiple,
.select2-primary .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--primary-focus);
}

/* ==========================
   SLIDER - PRIMARY
========================== */
.slider-primary .slider .slider-selection {
    background: var(--primary);
}

.dark-mode .slider-primary .slider .slider-selection {
    background: var(--primary-dark);
}

/* ==========================
   ICHECK - PRIMARY
========================== */

/* Hover (not checked & not disabled) */
.icheck-primary>input:first-child:not(:checked):not(:disabled):hover+label::before,
.icheck-primary>input:first-child:not(:checked):not(:disabled):hover+input[type="hidden"]+label::before {
    border-color: var(--primary);
}

/* Focus (not checked & not disabled) */
.icheck-primary>input:first-child:not(:checked):not(:disabled):focus+label::before,
.icheck-primary>input:first-child:not(:checked):not(:disabled):focus+input[type="hidden"]+label::before {
    border-color: var(--primary-focus);
}

/* Checked */
.icheck-primary>input:first-child:checked+label::before,
.icheck-primary>input:first-child:checked+input[type="hidden"]+label::before {
    background-color: var(--primary);
    border-color: var(--primary);
}
/* ==========================
   DARK MODE ICHECK - PRIMARY
========================== */
.dark-mode .icheck-primary>input:first-child:not(:checked):not(:disabled):hover+label::before,
.dark-mode .icheck-primary>input:first-child:not(:checked):not(:disabled):hover+input[type="hidden"]+label::before {
    border-color: var(--primary-dark);
}

.dark-mode .icheck-primary>input:first-child:not(:checked):not(:disabled):focus+label::before,
.dark-mode .icheck-primary>input:first-child:not(:checked):not(:disabled):focus+input[type="hidden"]+label::before {
    border-color: var(--primary-focus);
}

.dark-mode .icheck-primary>input:first-child:checked+label::before,
.dark-mode .icheck-primary>input:first-child:checked+input[type="hidden"]+label::before {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ==========================
   PACE LOADERS - PRIMARY
========================== */
.pace-primary .pace .pace-progress {
    background: var(--primary);
}

.pace-barber-shop-primary .pace {
    background: #fff;
}

.pace-barber-shop-primary .pace .pace-progress {
    background: var(--primary);
}

.pace-barber-shop-primary .pace .pace-activity {
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
}

.pace-big-counter-primary .pace .pace-progress::after {
    color: var(--primary-focus);
}

.pace-bounce-primary .pace .pace-activity {
    background: var(--primary);
}

.pace-center-atom-primary .pace-progress {
    height: 100px;
    width: 80px;
}

.pace-center-atom-primary .pace-progress::before {
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    line-height: .7rem;
    padding-top: 17%;
}

.pace-center-atom-primary .pace-activity {
    border-color: var(--primary);
}

.pace-center-atom-primary .pace-activity::after,
.pace-center-atom-primary .pace-activity::before {
    border-color: var(--primary);
}

.pace-center-circle-primary .pace .pace-progress {
    background: rgba(200, 81, 3, 0.8);
    /* primary w/ alpha */
    color: #fff;
}

.pace-center-radar-primary .pace .pace-activity {
    border-color: var(--primary) transparent transparent;
}

.pace-center-radar-primary .pace .pace-activity::before {
    border-color: var(--primary) transparent transparent;
}

.pace-center-simple-primary .pace {
    background: #fff;
    border-color: var(--primary);
}

.pace-center-simple-primary .pace .pace-progress {
    background: var(--primary);
}

.pace-material-primary .pace {
    color: var(--primary);
}

.pace-corner-indicator-primary .pace .pace-activity {
    background: var(--primary);
}

.pace-corner-indicator-primary .pace .pace-activity::after,
.pace-corner-indicator-primary .pace .pace-activity::before {
    border: 5px solid #fff;
}

.pace-corner-indicator-primary .pace .pace-activity::before {
    border-right-color: var(--primary-focus);
    border-left-color: var(--primary-focus);
}

.pace-corner-indicator-primary .pace .pace-activity::after {
    border-top-color: var(--primary-focus);
    border-bottom-color: var(--primary-focus);
}

.pace-fill-left-primary .pace .pace-progress {
    background-color: var(--primary-focus);
}

.pace-flash-primary .pace .pace-progress {
    background: var(--primary);
}

.pace-flash-primary .pace .pace-progress-inner {
    box-shadow: 0 0 10px var(--primary), 0 0 5px var(--primary);
}

.pace-flash-primary .pace .pace-activity {
    border-top-color: var(--primary);
    border-left-color: var(--primary);
}

.pace-loading-bar-primary .pace .pace-progress {
    background: var(--primary);
    color: var(--primary);
    box-shadow: 120px 0 #fff, 240px 0 #fff;
}

.pace-loading-bar-primary .pace .pace-activity {
    box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 7px #fff;
}

.pace-mac-osx-primary .pace .pace-progress {
    background-color: var(--primary);
    box-shadow: inset -1px 0 var(--primary),
        inset 0 -1px var(--primary),
        inset 0 2px rgba(255, 255, 255, 0.5),
        inset 0 6px rgba(255, 255, 255, 0.3);
}

.pace-mac-osx-primary .pace .pace-activity {
    background-image: radial-gradient(rgba(255, 255, 255, 0.65) 0%,
            rgba(255, 255, 255, 0.15) 100%);
    height: 12px;
}

.pace-progress-color-primary .pace-progress {
    color: var(--primary);
}

/* ==========================
   BOOTSTRAP SWITCH - PRIMARY
========================== */
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    background: var(--primary);
    color: #fff;
}

.dark-mode .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.dark-mode .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    background: var(--primary-dark);
    color: #fff;
}

/* ==========================
   BLOCKQUOTE - PRIMARY
========================== */
blockquote.quote-primary {
    border-color: var(--primary);
}

blockquote.quote-primary h1,
blockquote.quote-primary h2,
blockquote.quote-primary h3,
blockquote.quote-primary h4,
blockquote.quote-primary h5,
blockquote.quote-primary h6 {
    color: var(--primary);
}

/* ==========================
   DARK MODE BLOCKQUOTE - PRIMARY
========================== */
.dark-mode blockquote.quote-primary {
    border-color: var(--primary);
}

.dark-mode blockquote.quote-primary h1,
.dark-mode blockquote.quote-primary h2,
.dark-mode blockquote.quote-primary h3,
.dark-mode blockquote.quote-primary h4,
.dark-mode blockquote.quote-primary h5,
.dark-mode blockquote.quote-primary h6 {
    color: var(--primary);
}

/* ==========================
   BACKGROUND PRIMARY
========================== */
.bg-primary {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.bg-primary>a {
    color: #fff !important;
}

/* hover state */
.bg-primary.btn:hover {
    border-color: var(--primary-dark);
    background-color: var(--primary-light);
    color: #ececec;
}

/* active state */
.bg-primary.btn:not(:disabled):not(.disabled):active,
.bg-primary.btn:not(:disabled):not(.disabled).active,
.bg-primary.btn:active,
.bg-primary.btn.active {
    background-color: var(--primary-darker) !important;
    border-color: var(--primary-dark);
    color: #fff;
}

/* focus state (extra polish) */
.bg-primary.btn:focus {
    box-shadow: 0 0 0 0.25rem var(--primary-focus);
}

@media print {

    .table td.bg-primary,
    .table th.bg-primary {
        background-color: var(--primary) !important;
    }

    .table td.bg-primary,
    .table td.bg-primary>a,
    .table th.bg-primary,
    .table th.bg-primary>a {
        color: #fff !important;
    }

    /* hover state */
    .table td.bg-primary.btn:hover,
    .table th.bg-primary.btn:hover {
        border-color: var(--primary-dark);
        background-color: var(--primary-light);
        color: #ececec;
    }

    /* active state */
    .table td.bg-primary.btn:not(:disabled):not(.disabled):active,
    .table td.bg-primary.btn:not(:disabled):not(.disabled).active,
    .table td.bg-primary.btn:active,
    .table td.bg-primary.btn.active,
    .table th.bg-primary.btn:not(:disabled):not(.disabled):active,
    .table th.bg-primary.btn:not(:disabled):not(.disabled).active,
    .table th.bg-primary.btn:active,
    .table th.bg-primary.btn.active {
        background-color: var(--primary-darker) !important;
        border-color: var(--primary-dark);
        color: #fff;
    }
}

.bg-gradient-primary {
    background: var(--primary) linear-gradient(180deg, var(--primary-light), var(--primary)) repeat-x !important;
    color: #fff;
}

.bg-gradient-primary.btn:not(:disabled):not(.disabled):active,
.bg-gradient-primary.btn:not(:disabled):not(.disabled).active,
.show>.bg-gradient-primary.btn.dropdown-toggle {
    background-image: none !important;
}

.bg-gradient-primary.btn:hover {
    background: var(--primary) linear-gradient(180deg, var(--primary-lighter), var(--primary-dark)) repeat-x !important;
    border-color: var(--primary-dark);
    color: #ececec;
}

.bg-gradient-primary.btn:not(:disabled):not(.disabled):active,
.bg-gradient-primary.btn:not(:disabled):not(.disabled).active,
.bg-gradient-primary.btn:active,
.bg-gradient-primary.btn.active {
    background: var(--primary) linear-gradient(180deg, var(--primary-dark), var(--primary-darker)) repeat-x !important;
    border-color: var(--primary-darker);
    color: #fff;
}

.bg-gradient-primary.btn:disabled,
.bg-gradient-primary.btn.disabled {
    background-image: none !important;
    border-color: var(--primary);
    color: #fff;
}

/* ==========================
   ACCENT - PRIMARY
========================== */
.accent-primary .btn-link,
.accent-primary a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.badge):not(.btn),
.accent-primary .nav-tabs .nav-link {
    color: var(--primary);
}

.accent-primary .btn-link:hover,
.accent-primary a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.badge):not(.btn):hover,
.accent-primary .nav-tabs .nav-link:hover {
    color: var(--primary-dark);
}

.accent-primary .dropdown-item:active,
.accent-primary .dropdown-item.active {
    background-color: var(--primary);
    color: #fff;
}

.accent-primary .custom-control-input:checked~.custom-control-label::before {
    background-color: var(--primary);
    border-color: var(--primary-dark);
}

.accent-primary .custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
}

.accent-primary .form-control:focus:not(.is-invalid):not(.is-warning):not(.is-valid),
.accent-primary .custom-select:focus,
.accent-primary .custom-control-input:focus:not(:checked)~.custom-control-label::before,
.accent-primary .custom-file-input:focus~.custom-file-label {
    border-color: var(--primary-focus);
}

.accent-primary .page-item .page-link {
    color: var(--primary);
}

.accent-primary .page-item.active a,
.accent-primary .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.accent-primary .page-item.disabled a,
.accent-primary .page-item.disabled .page-link {
    background-color: #fff;
    border-color: #dee2e6;
    color: #6c757d;
}

.accent-primary [class*="sidebar-dark-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
    color: #c2c7d0;
}

.accent-primary [class*="sidebar-dark-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover {
    color: #fff;
}

.accent-primary [class*="sidebar-light-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
    color: #343a40;
}

.accent-primary [class*="sidebar-light-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover {
    color: #212529;
}

.dark-mode.accent-primary .page-item .page-link:hover,
.dark-mode.accent-primary .page-item .page-link:focus {
    color: var(--primary-light);
}

/* Ensure accent buttons on primary backgrounds stay readable */
[class*="accent-"] a.btn-primary {
    color: #fff;
}

/* ==========================
   DARK MODE - BG PRIMARY
========================== */
.dark-mode.bg-primary {
    background-color: var(--primary) !important;
}

.dark-mode.bg-primary,
.dark-mode.bg-primary>a {
    color: #fff !important;
}

.dark-mode.bg-primary.btn:hover {
    border-color: var(--primary-dark);
    color: #ececec;
}

.dark-mode.bg-primary.btn:not(:disabled):not(.disabled):active,
.dark-mode.bg-primary.btn:not(:disabled):not(.disabled).active,
.dark-mode.bg-primary.btn:active,
.dark-mode.bg-primary.btn.active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-darker);
    color: #fff;
}

/* ==========================
   DARK MODE - BG GRADIENT PRIMARY
========================== */
.dark-mode .bg-gradient-primary {
    background: var(--primary) linear-gradient(180deg,
            var(--primary-light, #ff914d),
            var(--primary)) repeat-x !important;
    color: #fff;
}

.dark-mode .bg-gradient-primary.btn:not(:disabled):not(.disabled):active,
.dark-mode .bg-gradient-primary.btn:not(:disabled):not(.disabled).active,
.show>.dark-mode .bg-gradient-primary.btn.dropdown-toggle {
    background-image: none !important;
}

.dark-mode .bg-gradient-primary.btn:hover {
    background: var(--primary) linear-gradient(180deg,
            var(--primary-dark),
            var(--primary-darker)) repeat-x !important;
    border-color: var(--primary-dark);
    color: #ececec;
}

.dark-mode .bg-gradient-primary.btn:not(:disabled):not(.disabled):active,
.dark-mode .bg-gradient-primary.btn:not(:disabled):not(.disabled).active,
.dark-mode .bg-gradient-primary.btn:active,
.dark-mode .bg-gradient-primary.btn.active {
    background: var(--primary) linear-gradient(180deg,
            var(--primary-dark),
            var(--primary-darker)) repeat-x !important;
    border-color: var(--primary-darker);
    color: #fff;
}

.dark-mode .bg-gradient-primary.btn:disabled,
.dark-mode .bg-gradient-primary.btn.disabled {
    background-image: none !important;
    border-color: var(--primary);
    color: #fff;
}

/* ==========================
   DARK MODE - ACCENT PRIMARY
========================== */
.dark-mode .accent-primary .btn-link,
.dark-mode .accent-primary a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.badge):not(.btn),
.dark-mode .accent-primary .nav-tabs .nav-link {
    color: var(--primary);
}

.dark-mode .accent-primary .btn-link:hover,
.dark-mode .accent-primary a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.badge):not(.btn):hover,
.dark-mode .accent-primary .nav-tabs .nav-link:hover {
    color: var(--primary-dark);
}

.dark-mode .accent-primary .dropdown-item:active,
.dark-mode .accent-primary .dropdown-item.active {
    background-color: var(--primary);
    color: #fff;
}

.dark-mode .accent-primary .custom-control-input:checked~.custom-control-label::before {
    background-color: var(--primary);
    border-color: var(--primary-darker);
}

.dark-mode .accent-primary .custom-control-input:checked~.custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
}

.dark-mode .accent-primary .form-control:focus:not(.is-invalid):not(.is-warning):not(.is-valid),
.dark-mode .accent-primary .custom-select:focus,
.dark-mode .accent-primary .custom-control-input:focus:not(:checked)~.custom-control-label::before,
.dark-mode .accent-primary .custom-file-input:focus~.custom-file-label {
    border-color: var(--primary-light, #ffb380);
}

.dark-mode .accent-primary .page-item .page-link {
    color: var(--primary);
}

.dark-mode .accent-primary .page-item.active a,
.dark-mode .accent-primary .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.dark-mode .accent-primary .page-item.disabled a,
.dark-mode .accent-primary .page-item.disabled .page-link {
    background-color: #fff;
    border-color: #dee2e6;
    color: #6c757d;
}

.dark-mode .accent-primary [class*="sidebar-dark-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
    color: #c2c7d0;
}

.dark-mode .accent-primary [class*="sidebar-dark-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover {
    color: #fff;
}

.dark-mode .accent-primary [class*="sidebar-light-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
    color: #343a40;
}

.dark-mode .accent-primary [class*="sidebar-light-"] .sidebar a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):hover {
    color: #212529;
}

.dark-mode.accent-primary .page-item .page-link:hover,
.dark-mode.accent-primary .page-item .page-link:focus {
    color: var(--primary-dark);
}

/* ================================
   DARK MODE BUTTONS
   ================================ */
body.dark-mode .btn-primary {
    color: #fff;
    background-color: var(--primary-light);
    /* brighten base */
    border-color: var(--primary-light);
    box-shadow: none;
}

body.dark-mode .btn-primary:hover {
    color: #fff;
    background-color: var(--primary);
    /* main shade on hover */
    border-color: var(--primary-dark);
}

body.dark-mode .btn-primary.focus,
body.dark-mode .btn-primary:focus {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0 var(--primary-focus);
}

body.dark-mode .btn-primary.disabled,
body.dark-mode .btn-primary:disabled {
    color: #fff;
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

body.dark-mode .btn-primary:not(:disabled):not(.disabled).active,
body.dark-mode .btn-primary:not(:disabled):not(.disabled):active,
body.dark-mode .show>.btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-darker);
}

body.dark-mode .btn-primary:not(:disabled):not(.disabled).active:focus,
body.dark-mode .btn-primary:not(:disabled):not(.disabled):active:focus,
body.dark-mode .show>.btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}

/* outline variant in dark mode */
body.dark-mode .btn-outline-primary {
    color: var(--primary-light);
    /* lighter stroke for visibility */
    border-color: var(--primary-light);
    background-color: transparent;
}

body.dark-mode .btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

body.dark-mode .btn-outline-primary.focus,
body.dark-mode .btn-outline-primary:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}

body.dark-mode .btn-outline-primary.disabled,
body.dark-mode .btn-outline-primary:disabled {
    color: var(--primary-light);
    background-color: transparent;
}

body.dark-mode .btn-outline-primary:not(:disabled):not(.disabled).active,
body.dark-mode .btn-outline-primary:not(:disabled):not(.disabled):active,
body.dark-mode .show>.btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

body.dark-mode .btn-outline-primary:not(:disabled):not(.disabled).active:focus,
body.dark-mode .btn-outline-primary:not(:disabled):not(.disabled):active:focus,
body.dark-mode .show>.btn-outline-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0 var(--primary-focus);
}

.login-card-body .input-group .form-control:focus~.input-group-prepend .input-group-text,
.login-card-body .input-group .form-control:focus~.input-group-append .input-group-text,
.register-card-body .input-group .form-control:focus~.input-group-prepend .input-group-text,
.register-card-body .input-group .form-control:focus~.input-group-append .input-group-text {
    border-color: var(--primary-dark);
}
/* ==========================================================================
   PREMIUM POLISH - GLOBAL REFINEMENTS
   ========================================================================== */

/* Standardize Border Radius */
.card, .modal-content, .btn, .rounded, .rounded-lg, .analytics-card, .directory-container {
    border-radius: 0.5rem !important;
}

/* Standalone form controls keep rounded corners */
.form-control,
.custom-select {
    border-radius: 0.5rem !important;
}

/* Input groups: joined controls with outer corners only */
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group-prepend > .input-group-text,
.input-group-prepend > .btn {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-append > .input-group-text,
.input-group-append > .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .form-control:first-child,
.input-group-prepend + .form-control,
.input-group-prepend:first-child > .input-group-text,
.input-group-prepend:first-child > .btn {
    border-top-left-radius: 0.5rem !important;
    border-bottom-left-radius: 0.5rem !important;
}

.input-group > .form-control:last-child,
.input-group-append:last-child > .input-group-text,
.input-group-append:last-child > .btn {
    border-top-right-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
}

.input-group .input-group-text {
    display: flex;
    align-items: center;
}

.input-group > .form-control:focus {
    z-index: 3;
}

.input-group > .form-control:focus + .input-group-append .input-group-text,
.input-group > .form-control:focus + .input-group-prepend .input-group-text,
.input-group-prepend + .form-control:focus ~ .input-group-append .input-group-text {
    border-color: var(--primary-lighter);
}

body.dark-mode .input-group .input-group-text {
    background-color: #343a40;
    border-color: #6c757d;
    color: #adb5bd;
}

body.dark-mode .input-group > .form-control:focus + .input-group-append .input-group-text,
body.dark-mode .input-group > .form-control:focus + .input-group-prepend .input-group-text,
body.dark-mode .input-group-prepend + .form-control:focus ~ .input-group-append .input-group-text,
body.dark-mode .login-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text,
body.dark-mode .register-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text {
    border-color: var(--primary-dark);
}

/* Horizontal Rule Dimming (Dark Mode) */
.dark-mode hr {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    opacity: 0.5;
}

/* Modal Dark Mode Refinements */
.dark-mode .modal-header, .dark-mode .modal-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Table Actions & Filters Dark Mode Fix */
.dark-mode .dt-action-btn.btn-light, .dark-mode .btn-light {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

.dark-mode .dt-action-btn.btn-light:hover, .dark-mode .btn-light:hover {
    background-color: #475569 !important;
    color: #fff !important;
}

/* Fix for very bright borders on cards in view modals */
.dark-mode .card.shadow-sm.border {
    border-color: #334155 !important;
}

