:root {
    --p-color: #157d4c;
    --p-color-hover: #27a068;
    --p-color-active: #55ca93;
    --p-color-shadow-focus: #79dfaf;

    --gap: 5px;
}

@import url("/assets/fonts/Nexa Light.otf");
@import url("/assets/fonts/Nexa Bold.otf");

/* add nexa */
body {
    font-family: "nexa", sans-serif;
}

/* custom classes  */
.w-fit {
    width: fit-content;
}

.table thead th {
    background-color: var(--p-color);
    color: white;
}

.table-actions {
    display: flex;
    justify-content: center;
    gap: 5px;
}

/* forms */
.form-group {
    padding-top: 10px;
}

/* Labels - responsive */
label {
    text-wrap: wrap;
}

@media (min-width: 768px) {
    label {
        text-wrap: nowrap;
    }
}

label.required:after {
    content: " *";
    color: red;
}

/* ── Toast Notifications — Premium Edition ── */
.alert {
    position: fixed;
    top: 24px;
    right: -520px;
    z-index: 9999999;
    width: 360px;
    padding: 16px 18px;
    border-radius: 12px;
    border: none;
    border-left: 5px solid;
    background: #ffffff;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    transition: right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
}

.alert.show {
    right: 24px;
    transition: right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Icon badge */
.alert .alert-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Text area */
.alert .alert-content {
    flex: 1;
    min-width: 0;
}

.alert .alert-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 2px;
    letter-spacing: 0.01em;
}

.alert .alert-body {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
    white-space: normal;
}

/* Close button */
.alert .btn-close {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.4;
    font-size: 0.65rem;
}

.alert .btn-close:hover {
    opacity: 0.9;
}

/* ── Success variant ── */
.alert-success {
    border-left-color: #157d4c;
    background: #f0faf5;
}

.alert-success .alert-icon {
    background: rgba(21, 125, 76, 0.12);
    color: #157d4c;
}

.alert-success .alert-title {
    color: #0e5233;
}

.alert-success .alert-body {
    color: #2d7a58;
}

/* ── Danger / Error variant ── */
.alert-danger {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.alert-danger .alert-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.alert-danger .alert-title {
    color: #9b1c2b;
}

.alert-danger .alert-body {
    color: #b94050;
}

/* ── Warning variant ── */
.alert-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.alert-warning .alert-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.alert-warning .alert-title {
    color: #92400e;
}

.alert-warning .alert-body {
    color: #b45309;
}

/* ── Info variant ── */
.alert-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.alert-info .alert-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.alert-info .alert-title {
    color: #1e3a8a;
}

.alert-info .alert-body {
    color: #2563eb;
}

/* Progress bar auto-close */
.alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    background: currentColor;
    width: 100%;
    transform-origin: left;
    animation: toast-progress 4s linear forwards;
}

.alert-success::after {
    background: #157d4c;
}

.alert-danger::after {
    background: #dc3545;
}

.alert-warning::after {
    background: #f59e0b;
}

.alert-info::after {
    background: #3b82f6;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* filters */
.filters {
    display: flex;
    gap: var(--gap);
    flex-wrap: wrap;
    justify-content: start;
    align-items: center;
    padding-bottom: 5px;
}

/* Mobile: 100% width */
.filters input {
    width: 100%;
}

.filters select {
    width: 100%;
}

.filters select#department {
    width: 100%;
}

/* Desktop: original widths */
@media (min-width: 768px) {
    .filters input {
        width: 25%;
    }

    .filters select {
        width: 17.5%;
    }

    .filters select#department {
        width: 38%;
    }
}



/* *******************************************************************

customize the bootstrap badge class

******************************************************************* */
.badge {
    padding-inline: 10px;
    padding-block: 5px;
    border-radius: 0px;
    font-size: 0.7rem;
    font-family: sans-serif;
    min-width: 50px;
}


/* ################################################################ */
/*                                                                  */
/*                         form customisation                       */
/*                                                                  */
/* ################################################################ */


.form-title {
    text-decoration: underline;
}

table.form-table-elements {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
}

table.form-table-elements th {
    background: rgb(239, 239, 239);
}

table.form-table-elements th,
table.form-table-elements td {
    padding: 5px;
    text-align: center;
}

/* ################################################################ */
/*                                                                  */
/*                         role badge                               */
/*                                                                  */
/* ################################################################ */

.role-badge {
    padding-inline: 10px;
    padding-block: 5px;
    border-radius: 5px;
    color: var(--p-color);
    background-color: #b4ffa8;
    box-shadow: 1px 1px 5px -3px #dfdfdf;
    font-weight: 500;
}



/* ################################################################ */
/*                                                                  */
/*                         table-inactivity                         */
/*                                                                  */
/* ################################################################ */
.table-inactivity tr.inactive td {
    background: rgba(0, 0, 0, 0.075);

}


/* ################################################################ */
/*                                                                  */
/*                         btn-add                                  */
/*                                                                  */
/* ################################################################ */


@media only screen and (max-width: 667px) {
    .btn-add {
        display: none;
    }

}


i.bx {
    margin-inline-end: 0px;
}

/* ################################################################ */
/*                                                                  */
/*                         drop down                                */
/*                                                                  */
/* ################################################################ */

.table-responsive>table .dropdown {
    position: inherit;
}

.table-responsive>table .dropdown>.dropdown-menu {
    position: absolute;
    z-index: 999999;
}

.table-responsive {
    overflow-y: visible !important;
}

.dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #ccc;
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.dropdown-menu .dropdown-item i {
    font-size: 1.1rem;
}

.dropdown-menu .dropdown-item:disabled,
.dropdown-menu .dropdown-item.disabled,
.dropdown-menu .dropdown-item:-moz-user-disabled {
    cursor: not-allowed !important;
}






/* ################################################################ */
/*                                                                  */
/*                         profile icon                             */
/*                                                                  */
/* ################################################################ */

.profile-icon {
    font-size: 30px;
    color: white;
    border-radius: 50px;
    border: 2px solid white;
    height: 45px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}







/* ################################################################ */
/*                                                                  */
/*          colorize the line that has btn more opened              */
/*                                                                  */
/* ################################################################ */
table.table tr:has(button.show) td {
    background-color: rgb(201, 201, 201) !important;
}


/* ################################################################ */
/*                                                                  */
/*              colorize the line that has checked                  */
/*                                                                  */
/* ################################################################ */
table.table tr:has(.row-check:checked) td {
    background-color: hsla(152, 71%, 29%, 0.20) !important;
}

table.table tr:last-child(th) {
    width: fit-content;
}

/* ################################################################ */
/*                                                                  */
/*                  add border to the datatable                     */
/*                                                                  */
/* ################################################################ */



table.table tbody td,
table.table thead th {
    border-color: #777;
}

table.table {
    border-bottom: #777;
    border-top: transparent !important;
}


table.table thead td {
    border-color: transparent !important;
}


/* ################################################################ */
/*                                                                  */
/*                 checkbox/radio  accent color                     */
/*                                                                  */
/* ################################################################ */


input[type=checkbox],
input[type=radio] {
    accent-color: var(--p-color);
}



/* ################################################################ */
/*                                                                  */
/*                                 Otp                              */
/*                                                                  */
/* ################################################################ */
/* ################################################################ */
/*                                                                  */
/*                                 Otp                              */
/*                                                                  */
/* ################################################################ */


/* otp sent success message animation */

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        display: block;
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

.fadeIn {
    animation: fadeIn 0.5s forwards;
}

.fadeOut {
    animation: fadeOut 0.5s forwards;
}


/* ================================================================ */
/*               Loading Spinner — Bars Wave Edition                */
/* ================================================================ */

/* Overlay backdrop */
.loading-div-son {
    position: fixed;
    inset: 0;
    left: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@media screen and (max-width: 1200px) {
    .loading-div-son {
        left: 0;
    }
}

/*
   .loader renders 4 bars via box-shadow trick on a single element.
   Each bar = different delay to create a wave effect.
*/
.loader {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    width: 40px;
    height: 40px;
}

.loader,
.loader::before,
.loader::after,
.loader span {
    display: revert;
    /* reset the "none" from previous style */
}

/* Use pseudo-elements + span for 4 bars */
.loader-bar {
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(to top, #157d4c, #55ca93);
    animation: bar-wave 1s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(21, 125, 76, 0.4);
}

.loader-bar:nth-child(1) {
    animation-delay: 0.0s;
}

.loader-bar:nth-child(2) {
    animation-delay: 0.15s;
}

.loader-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.loader-bar:nth-child(4) {
    animation-delay: 0.45s;
}

@keyframes bar-wave {

    0%,
    100% {
        height: 10px;
        opacity: 0.6;
    }

    50% {
        height: 36px;
        opacity: 1;
    }
}

@keyframes conic-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes l15 {
    100% {
        transform: rotate(1turn);
    }
}



.required_star {
    color: red;
    font-size: 1rem;
}

/* Override breadcrumb divider */
.breadcrumb-item+.breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/") !important;
}

/* ################################################################ */
/*                                                                  */
/*             Override Success Color with Brand Green              */
/*                                                                  */
/* ################################################################ */
.btn-success {
    background-color: var(--p-color) !important;
    border-color: var(--p-color) !important;
    color: white !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: var(--p-color-hover) !important;
    border-color: var(--p-color-hover) !important;
    color: white !important;
}

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

.bg-success {
    background-color: var(--p-color) !important;
}

.btn-outline-success {
    color: var(--p-color) !important;
    border-color: var(--p-color) !important;
}

.btn-outline-success:hover {
    background-color: var(--p-color) !important;
    color: white !important;
}



.required_star {
    color: red;
    font-size: 1rem;
}

/* Override breadcrumb divider */
.breadcrumb-item+.breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/") !important;
}

/* ################################################################ */
/*                                                                  */
/*             Override Success Color with Brand Green              */
/*                                                                  */
/* ################################################################ */
.btn-success {
    background-color: var(--p-color) !important;
    border-color: var(--p-color) !important;
    color: white !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: var(--p-color-hover) !important;
    border-color: var(--p-color-hover) !important;
    color: white !important;
}

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

.bg-success {
    background-color: var(--p-color) !important;
}

.btn-outline-success {
    color: var(--p-color) !important;
    border-color: var(--p-color) !important;
}

.btn-outline-success:hover {
    background-color: var(--p-color) !important;
    color: white !important;
}