/* =========================================================
   NAFA POS - GLOBAL CSS
========================================================= */

:root {
    --nafa-green: #198754;
    --nafa-green-dark: #146c43;
    --nafa-green-light: #eaf6ef;

    --nafa-orange: #f59e0b;
    --nafa-orange-light: #fff7e6;

    --nafa-bg: #f5f7f6;

    --nafa-white: #ffffff;

    --nafa-text: #344054;
    --nafa-text-dark: #1d2939;
    --nafa-text-light: #667085;
    --nafa-muted: #98a2b3;

    --nafa-border: #e4e7ec;

    --nafa-sidebar-width: 260px;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--nafa-bg);
    color: var(--nafa-text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 14px;
}


/* =========================================================
   LINKS
========================================================= */

a {
    text-decoration: none;
}


/* =========================================================
   SIDEBAR
========================================================= */

.nafa-sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: var(--nafa-sidebar-width);
    height: 100vh;

    background: var(--nafa-white);

    border-right: 1px solid var(--nafa-border);

    display: flex;
    flex-direction: column;

    z-index: 1050;

    transition: transform 0.25s ease;

    overflow: hidden;
}


/* =========================================================
   LOGO
========================================================= */

.nafa-logo {
    height: 72px;

    padding: 0 20px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid var(--nafa-border);

    flex-shrink: 0;
}


.nafa-logo-link {
    display: flex;
    align-items: center;

    gap: 12px;

    width: 100%;

    color: var(--nafa-text-dark);
}


.nafa-logo-link:hover {
    color: var(--nafa-text-dark);
}


.nafa-logo-icon {
    width: 40px;
    height: 40px;

    border-radius: 10px;

    background: var(--nafa-green-light);

    color: var(--nafa-green);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 19px;
}


.nafa-logo-text {
    font-size: 21px;

    font-weight: 700;

    letter-spacing: -0.5px;

    color: var(--nafa-text-dark);
}


.nafa-logo-text span {
    color: var(--nafa-text-dark);
}


.nafa-logo-text strong {
    color: var(--nafa-green);
}


/* =========================================================
   SIDEBAR CONTENT
========================================================= */

.nafa-sidebar-content {
    flex: 1;

    padding: 24px 14px;

    overflow-y: auto;
}


.nafa-sidebar-content::-webkit-scrollbar {
    width: 5px;
}


.nafa-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}


.nafa-sidebar-content::-webkit-scrollbar-thumb {
    background: #dce5df;

    border-radius: 10px;
}


/* =========================================================
   SECTION TITLE
========================================================= */

.nafa-section-title {
    padding: 0 12px;

    margin-bottom: 10px;

    color: var(--nafa-muted);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.8px;

    text-transform: uppercase;
}


/* =========================================================
   MENU ITEM
========================================================= */

.nafa-menu-item {
    position: relative;

    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    margin-bottom: 4px;

    display: flex;
    align-items: center;

    gap: 11px;

    border-radius: 8px;

    color: var(--nafa-text);

    font-size: 14px;

    font-weight: 500;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


.nafa-menu-item:hover {
    background: #f4f8f5;

    color: var(--nafa-green);
}


/* =========================================================
   MENU ICON
========================================================= */

.nafa-menu-icon {
    width: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: var(--nafa-green);

    font-size: 17px;
}


/* =========================================================
   MENU TEXT
========================================================= */

.nafa-menu-text {
    flex: 1;
}


/* =========================================================
   ACTIVE MENU
========================================================= */

.nafa-menu-item.active {
    background: var(--nafa-green-light);

    color: var(--nafa-green);

    font-weight: 600;
}


.nafa-menu-item.active::before {
    content: "";

    position: absolute;

    left: 0;

    top: 9px;

    width: 3px;

    height: 26px;

    border-radius: 0 4px 4px 0;

    background: var(--nafa-green);
}


/* =========================================================
   MENU ARROW
========================================================= */

.nafa-menu-arrow {
    margin-left: auto;

    color: var(--nafa-muted);

    font-size: 10px;

    transition: transform 0.2s ease;
}


/* =========================================================
   SUBMENU
========================================================= */

.nafa-submenu {
    margin: 2px 0 8px 23px;

    padding: 4px 0 4px 13px;

    border-left: 1px solid #dce8e1;
}


.nafa-submenu-item {
    min-height: 38px;

    padding: 8px 10px;

    margin: 2px 0;

    display: flex;
    align-items: center;

    gap: 9px;

    border-radius: 7px;

    color: var(--nafa-text-light);

    font-size: 13px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


.nafa-submenu-item:hover {
    background: #f4f8f5;

    color: var(--nafa-green);
}


.nafa-submenu-item i {
    width: 16px;

    color: var(--nafa-green);

    font-size: 14px;
}


/* =========================================================
   SIDEBAR BOTTOM
========================================================= */

.nafa-sidebar-bottom {
    padding: 14px;

    border-top: 1px solid var(--nafa-border);

    flex-shrink: 0;
}


.nafa-user-mini {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 9px;

    background: #f8faf9;

    border-radius: 9px;
}


.nafa-user-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: var(--nafa-green-light);

    color: var(--nafa-green);

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 15px;
}


.nafa-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.nafa-user-info strong {
    color: var(--nafa-text);

    font-size: 12px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.nafa-user-info small {
    margin-top: 2px;

    color: var(--nafa-muted);

    font-size: 11px;
}


/* =========================================================
   MAIN WRAPPER
========================================================= */

.nafa-wrapper {
    min-height: 100vh;

    margin-left: var(--nafa-sidebar-width);

    display: flex;

    flex-direction: column;

    transition: margin-left 0.25s ease;
}


/* =========================================================
   NAVBAR
========================================================= */

.nafa-navbar {
    height: 72px;

    padding: 0 25px;

    background: var(--nafa-white);

    border-bottom: 1px solid var(--nafa-border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-shrink: 0;
}


.nafa-navbar-left {
    display: flex;

    align-items: center;

    gap: 15px;
}


/* =========================================================
   SIDEBAR TOGGLE
========================================================= */

.nafa-sidebar-toggle {
    width: 40px;
    height: 40px;

    padding: 0;

    border: 1px solid var(--nafa-border);

    border-radius: 8px;

    background: var(--nafa-white);

    color: var(--nafa-text-light);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 19px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


.nafa-sidebar-toggle:hover {
    background: #f8faf9;

    border-color: #cbd5d0;

    color: var(--nafa-green);
}


/* =========================================================
   PAGE TITLE
========================================================= */

.nafa-page-title {
    color: var(--nafa-text-dark);

    font-size: 18px;

    font-weight: 600;
}


/* =========================================================
   NAVBAR RIGHT
========================================================= */

.nafa-navbar-right {
    display: flex;

    align-items: center;

    gap: 15px;
}


/* =========================================================
   NOTIFICATION
========================================================= */

.nafa-notification {
    position: relative;

    width: 40px;
    height: 40px;

    padding: 0;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--nafa-text-light);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


.nafa-notification:hover {
    background: #f5f7f6;

    color: var(--nafa-green);
}


.nafa-notification-badge {
    position: absolute;

    top: 4px;

    right: 3px;

    min-width: 15px;

    height: 15px;

    padding: 0 3px;

    border-radius: 20px;

    background: var(--nafa-orange);

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 8px;

    font-weight: 700;
}


/* =========================================================
   NAVBAR SEPARATOR
========================================================= */

.nafa-navbar-separator {
    width: 1px;

    height: 30px;

    background: var(--nafa-border);
}


/* =========================================================
   NAVBAR USER
========================================================= */

.nafa-navbar-user {
    display: flex;

    align-items: center;

    gap: 9px;

    border: 0;

    background: transparent;

    padding: 4px 6px;

    cursor: pointer;

    color: inherit;
}


.nafa-navbar-user::after {
    display: none;
}


.nafa-navbar-user:hover {
    background: #f8faf9;

    border-radius: 9px;
}


.nafa-navbar-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--nafa-green-light);

    color: var(--nafa-green);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 15px;
}


.nafa-navbar-user-info {
    display: flex;

    flex-direction: column;
}


.nafa-navbar-user-info strong {
    color: var(--nafa-text);

    font-size: 13px;

    font-weight: 600;
}


.nafa-navbar-user-info small {
    margin-top: 2px;

    color: var(--nafa-muted);

    font-size: 11px;
}


.nafa-user-arrow {
    color: var(--nafa-muted);

    font-size: 10px;

    margin-left: 2px;
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.nafa-content {
    flex: 1;

    padding: 25px;
}


/* =========================================================
   FOOTER
========================================================= */

.nafa-footer {
    min-height: 55px;

    padding: 0 25px;

    background: var(--nafa-white);

    border-top: 1px solid var(--nafa-border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    color: var(--nafa-muted);

    font-size: 12px;
}


.nafa-footer strong {
    color: var(--nafa-green);

    font-weight: 600;
}


/* =========================================================
   ADMIN DROPDOWN
========================================================= */

.nafa-user-dropdown {
    min-width: 230px;

    margin-top: 10px !important;

    padding: 7px;

    border: 1px solid var(--nafa-border);

    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 10px 30px rgba(16, 24, 40, 0.10);
}


.nafa-dropdown-header {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px 9px;
}


.nafa-dropdown-avatar {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--nafa-green-light);

    color: var(--nafa-green);

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}


.nafa-dropdown-header div:last-child {
    display: flex;

    flex-direction: column;
}


.nafa-dropdown-header strong {
    color: var(--nafa-text-dark);

    font-size: 13px;

    font-weight: 600;
}


.nafa-dropdown-header small {
    margin-top: 2px;

    color: var(--nafa-muted);

    font-size: 11px;
}


.nafa-user-dropdown .dropdown-item {
    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 40px;

    padding: 8px 10px;

    border-radius: 7px;

    color: var(--nafa-text);

    font-size: 13px;
}


.nafa-user-dropdown .dropdown-item i {
    width: 18px;

    color: var(--nafa-green);

    font-size: 15px;
}


.nafa-user-dropdown .dropdown-item:hover {
    background: var(--nafa-green-light);

    color: var(--nafa-green);
}


.nafa-user-dropdown .dropdown-item.nafa-logout {
    color: #dc3545;
}


.nafa-user-dropdown .dropdown-item.nafa-logout i {
    color: #dc3545;
}


.nafa-user-dropdown .dropdown-item.nafa-logout:hover {
    background: #fff1f2;

    color: #dc3545;
}


/* =========================================================
   SIDEBAR OVERLAY
========================================================= */

.nafa-sidebar-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.45);

    z-index: 1040;

    opacity: 0;

    transition: opacity 0.25s ease;
}


.nafa-sidebar-overlay.show {
    display: block;

    opacity: 1;
}


body.nafa-sidebar-open {
    overflow: hidden;
}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 992px) {

    /*
    |--------------------------------------------------------------------------
    | Sidebar normal
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar {
        transform: translateX(0);
    }


    /*
    |--------------------------------------------------------------------------
    | Sidebar fermé
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar.nafa-sidebar-hidden {
        transform: translateX(-100%) !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Contenu normal
    |--------------------------------------------------------------------------
    */

    .nafa-wrapper {
        margin-left: var(--nafa-sidebar-width);
    }


    /*
    |--------------------------------------------------------------------------
    | Contenu pleine largeur quand sidebar fermé
    |--------------------------------------------------------------------------
    */

    .nafa-wrapper.nafa-wrapper-expanded {
        margin-left: 0 !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Overlay jamais visible sur desktop
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar-overlay {
        display: none !important;
    }

}


/* =========================================================
   TABLETTE + MOBILE
========================================================= */

@media (max-width: 991px) {

    /*
    |--------------------------------------------------------------------------
    | Sidebar caché par défaut
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar {
        width: var(--nafa-sidebar-width);

        transform: translateX(-100%);

        z-index: 1050;

        transition: transform 0.25s ease;
    }


    /*
    |--------------------------------------------------------------------------
    | Sidebar ouvert
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar.show {
        transform: translateX(0) !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Wrapper pleine largeur
    |--------------------------------------------------------------------------
    */

    .nafa-wrapper {
        margin-left: 0 !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Navbar
    |--------------------------------------------------------------------------
    */

    .nafa-navbar {
        position: relative;

        z-index: 1030;

        padding: 0 18px;
    }


    /*
    |--------------------------------------------------------------------------
    | Overlay
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar-overlay {
        z-index: 1040;
    }


    .nafa-sidebar-overlay.show {
        display: block;

        opacity: 1;
    }


    /*
    |--------------------------------------------------------------------------
    | Informations utilisateur cachées
    |--------------------------------------------------------------------------
    */

    .nafa-navbar-user-info,
    .nafa-user-arrow {
        display: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Empêche le mode desktop de rester actif sur mobile
    |--------------------------------------------------------------------------
    */

    .nafa-sidebar.nafa-sidebar-hidden {
        transform: translateX(-100%) !important;
    }


    .nafa-wrapper.nafa-wrapper-expanded {
        margin-left: 0 !important;
    }

}


/* =========================================================
   PETIT MOBILE
========================================================= */

@media (max-width: 575px) {

    .nafa-navbar {
        padding: 0 14px;
    }


    .nafa-page-title {
        font-size: 16px;
    }


    .nafa-navbar-right {
        gap: 7px;
    }


    .nafa-navbar-separator {
        display: none;
    }


    .nafa-content {
        padding: 15px;
    }


    .nafa-footer {
        min-height: auto;

        padding: 12px 15px;

        flex-direction: column;

        align-items: flex-start;

        gap: 4px;
    }

    .nafa-user-dropdown {
        min-width: 215px;
    }
}

/* =========================================================
   AUTHENTIFICATION
========================================================= */

.nafa-auth-body {
    min-height: 100vh;

    margin: 0;
    padding: 0;

    background:
        linear-gradient(
            135deg,
            #f5f7f6 0%,
            #eef7f1 100%
        );
}


/* =========================================================
   AUTH WRAPPER
========================================================= */

.nafa-auth-wrapper {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px 15px;
}


/* =========================================================
   LOGIN CARD
========================================================= */

.nafa-auth-card {
    width: 100%;

    max-width: 430px;

    background: #ffffff;

    border: 1px solid var(--nafa-border);

    border-radius: 14px;

    box-shadow:
        0 15px 40px rgba(16, 24, 40, 0.08);

    overflow: hidden;
}


/* =========================================================
   AUTH HEADER
========================================================= */

.nafa-auth-header {
    padding: 32px 35px 20px;

    text-align: center;
}


.nafa-auth-logo {
    width: 58px;
    height: 58px;

    margin: 0 auto 15px;

    border-radius: 14px;

    background: var(--nafa-green-light);

    color: var(--nafa-green);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 26px;
}


.nafa-auth-brand {
    margin-bottom: 5px;

    color: var(--nafa-text-dark);

    font-size: 25px;

    font-weight: 700;

    letter-spacing: -0.5px;
}


.nafa-auth-brand span {
    color: var(--nafa-green);
}


.nafa-auth-subtitle {
    margin: 0;

    color: var(--nafa-text-light);

    font-size: 13px;
}


/* =========================================================
   AUTH BODY
========================================================= */

.nafa-auth-body-content {
    padding: 10px 35px 35px;
}


/* =========================================================
   FORM LABEL
========================================================= */

.nafa-auth-label {
    margin-bottom: 7px;

    color: var(--nafa-text-dark);

    font-size: 13px;

    font-weight: 600;
}


/* =========================================================
   FORM INPUT
========================================================= */

.nafa-auth-input {
    min-height: 45px;

    border: 1px solid var(--nafa-border);

    border-radius: 8px;

    color: var(--nafa-text);

    font-size: 14px;

    box-shadow: none !important;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.nafa-auth-input:focus {
    border-color: var(--nafa-green);

    box-shadow:
        0 0 0 3px rgba(25, 135, 84, 0.10) !important;
}


/* =========================================================
   INPUT ICON
========================================================= */

.nafa-auth-input-group {
    position: relative;
}


.nafa-auth-input-group .nafa-auth-input {
    padding-left: 42px;
}


.nafa-auth-input-icon {
    position: absolute;

    top: 50%;
    left: 14px;

    transform: translateY(-50%);

    color: var(--nafa-muted);

    font-size: 16px;

    z-index: 2;
}


/* =========================================================
   REMEMBER / FORGOT
========================================================= */

.nafa-auth-options {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 10px;
}


.nafa-auth-options .form-check {
    margin: 0;
}


.nafa-auth-options .form-check-label {
    color: var(--nafa-text-light);

    font-size: 12px;

    cursor: pointer;
}


.nafa-auth-options .form-check-input {
    cursor: pointer;
}


.nafa-auth-options .form-check-input:checked {
    background-color: var(--nafa-green);

    border-color: var(--nafa-green);
}


.nafa-auth-forgot {
    color: var(--nafa-green);

    font-size: 12px;

    font-weight: 600;
}


.nafa-auth-forgot:hover {
    color: var(--nafa-green-dark);
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.nafa-auth-button {
    width: 100%;

    min-height: 45px;

    margin-top: 22px;

    border: 0;

    border-radius: 8px;

    background: var(--nafa-green);

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.nafa-auth-button:hover {
    background: var(--nafa-green-dark);

    color: #ffffff;
}


.nafa-auth-button:active {
    transform: translateY(1px);
}


/* =========================================================
   AUTH FOOTER
========================================================= */

.nafa-auth-footer {
    padding: 0 35px 30px;

    text-align: center;

    color: var(--nafa-text-light);

    font-size: 12px;
}


.nafa-auth-footer a {
    color: var(--nafa-green);

    font-weight: 600;
}


.nafa-auth-footer a:hover {
    color: var(--nafa-green-dark);
}


/* =========================================================
   VALIDATION
========================================================= */

.nafa-auth-error {
    margin-top: 6px;

    color: #dc3545;

    font-size: 12px;
}


/* =========================================================
   ALERT
========================================================= */

.nafa-auth-alert {
    margin-bottom: 20px;

    padding: 10px 12px;

    border: 1px solid #f5c2c7;

    border-radius: 8px;

    background: #fff1f2;

    color: #b02a37;

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 575px) {

    .nafa-auth-wrapper {
        padding: 20px 15px;
    }

    .nafa-auth-header {
        padding: 28px 25px 18px;
    }

    .nafa-auth-body-content {
        padding: 10px 25px 30px;
    }

    .nafa-auth-footer {
        padding: 0 25px 25px;
    }

    .nafa-auth-card {
        border-radius: 12px;
    }

}

/* =========================================================
   AFFICHER / MASQUER MOT DE PASSE
========================================================= */

.nafa-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    border: 0;
    background: transparent;

    color: var(--nafa-muted);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    cursor: pointer;

    z-index: 3;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.nafa-password-toggle:hover {
    color: var(--nafa-green);
}

.nafa-password-toggle:focus {
    outline: none;
}

.nafa-password-toggle i {
    font-size: 16px;
}

/* =========================================================
   INSCRIPTION
========================================================= */

.nafa-register-card {
    max-width: 650px;
}

.nafa-register-section-title {
    display: flex;
    align-items: center;
    gap: 8px;

    padding-bottom: 10px;

    border-bottom: 1px solid var(--nafa-border);

    color: var(--nafa-text-dark);

    font-size: 14px;
    font-weight: 700;
}

.nafa-register-section-title i {
    color: var(--nafa-green);
    font-size: 17px;
}

.nafa-auth-input-group textarea {
    padding-left: 15px;
}

/* =========================================================
   DOCUMENT SETTINGS
   ========================================================= */

.nafa-document-setting {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid var(--nafa-border);
}

.nafa-document-setting:last-child {
    border-bottom: 0;
}

.nafa-document-setting-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: var(--nafa-green-light);
    color: var(--nafa-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.nafa-document-setting .form-check-input {
    width: 2.5em;
    height: 1.35em;
    cursor: pointer;
}

.nafa-document-setting .form-check-input:checked {
    background-color: var(--nafa-green);
    border-color: var(--nafa-green);
}

.nafa-document-setting .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.12);
    border-color: var(--nafa-green);
}


/* =========================================================
   DOCUMENT PREVIEW
   ========================================================= */

.nafa-document-preview {
    background: #ffffff;
    border: 1px solid #e6e9ec;
    border-radius: 8px;
    padding: 22px;
    color: #343a40;
    font-size: 11px;
    box-shadow: 0 8px 25px rgba(16, 24, 40, 0.05);
}

.nafa-document-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--document-primary);
}

.nafa-document-preview-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.nafa-document-preview-logo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #f1f3f5;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nafa-document-preview-header strong {
    display: block;
    margin-bottom: 4px;
    color: var(--document-primary);
    font-size: 14px;
}

.nafa-document-preview-title {
    margin-top: 18px;
    color: var(--document-primary);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.nafa-document-preview-line {
    width: 45px;
    height: 3px;
    margin: 7px auto 14px;
    border-radius: 5px;
    background: var(--document-secondary);
}

.nafa-document-preview-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    background: #f8f9fa;
}

.nafa-document-preview-table {
    display: grid;
    grid-template-columns: 1fr 45px 80px;
    margin-top: 18px;
    border: 1px solid #e9ecef;
}

.nafa-document-preview-table > div {
    padding: 8px;
    border-right: 1px solid #e9ecef;
    font-weight: 600;
}

.nafa-document-preview-table > div:last-child {
    border-right: 0;
}

.nafa-document-preview-total {
    margin-top: 12px;
    padding: 10px;
    border-radius: 5px;
    background: #f8f9fa;
    text-align: right;
}

.nafa-document-preview-total strong {
    margin-left: 8px;
    color: var(--document-primary);
}

.nafa-document-preview-info {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    line-height: 1.7;
}

.nafa-document-preview-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    text-align: center;
    font-size: 10px;
}

@media (max-width: 575px) {

    .nafa-document-setting {
        align-items: flex-start;
    }

    .nafa-document-setting .form-check {
        padding-top: 3px;
    }

    .nafa-document-preview {
        padding: 15px;
    }

    .nafa-document-preview-header {
        flex-direction: column;
    }

    .nafa-document-preview-meta {
        flex-direction: column;
    }
}

/* =========================================================
   ROLES & PERMISSIONS
   ========================================================= */

.nafa-role-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: var(--nafa-green-light);
    color: var(--nafa-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nafa-role-avatar i {
    line-height: 1;
}

.livewire-pagination {
    margin-bottom: 0;
}

.permission-group-card {
    transition: border-color .2s ease, box-shadow .2s ease;
}

.permission-group-card:hover {
    border-color: var(--nafa-green);
}

/* =========================================================
   ROLES & PERMISSIONS
========================================================= */

.nafa-role-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: var(--nafa-green-light);
    color: var(--nafa-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nafa-role-avatar i {
    line-height: 1;
}

.permission-group-card {
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.permission-group-card:hover {
    border-color: var(--nafa-green);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.permission-group-card .card-header {
    min-height: 70px;
}

.permission-group-card .form-check {
    padding: 7px 10px 7px 30px;
    border-radius: 7px;
    transition: background-color 0.2s ease;
}

.permission-group-card .form-check:hover {
    background: #f6faf7;
}

.permission-group-card .form-check-input {
    cursor: pointer;
}

.permission-group-card .form-check-input:checked {
    background-color: var(--nafa-green);
    border-color: var(--nafa-green);
}

.permission-group-card .form-check-label {
    cursor: pointer;
    width: 100%;
    font-size: 13px;
}

/* =========================================================
   MODAL ROLES & PERMISSIONS
========================================================= */

.nafa-role-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.nafa-role-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.nafa-role-modal-dialog {
    position: relative;
    z-index: 9999;
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 50px);
}

.nafa-role-modal-content {
    max-height: calc(100vh - 50px);
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.28),
        0 8px 25px rgba(0, 0, 0, 0.12);
}

.nafa-role-modal-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

/* Barre de défilement */

.nafa-role-modal-body::-webkit-scrollbar {
    width: 7px;
}

.nafa-role-modal-body::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.nafa-role-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5d1;
    border-radius: 10px;
}

.nafa-role-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--nafa-green);
}


/* Mobile */

@media (max-width: 767px) {

    .nafa-role-modal {
        padding: 12px;
    }

    .nafa-role-modal-dialog {
        max-height: calc(100vh - 24px);
    }

    .nafa-role-modal-content {
        max-height: calc(100vh - 24px);
        border-radius: 12px;
    }

    .nafa-role-modal-body {
        max-height: calc(100vh - 185px);
    }
}

/* =========================================================
   UTILISATEURS
   ========================================================= */

.nafa-user-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--nafa-green-light);
    color: var(--nafa-green);

    font-size: 15px;
    font-weight: 700;
}

.nafa-user-modal {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;

    z-index: 99999 !important;

    box-sizing: border-box !important;
}

.nafa-user-modal-backdrop {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    background: rgba(15, 23, 42, 0.68) !important;

    z-index: 99998 !important;

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.nafa-user-modal-dialog {
    position: relative !important;

    width: min(850px, 100%) !important;

    max-width: 850px !important;

    max-height: calc(100vh - 48px) !important;

    margin: 0 auto !important;

    z-index: 99999 !important;
}

.nafa-user-modal-content {
    width: 100% !important;

    max-height: calc(100vh - 48px) !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    background: #ffffff !important;

    border-radius: 16px !important;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.30),
        0 12px 30px rgba(0, 0, 0, 0.18) !important;

    animation: nafaUserModalShow 0.20s ease-out;
}

.nafa-user-modal-content .modal-header {
    flex-shrink: 0;

    min-height: 82px;

    padding: 16px 24px;

    background: #ffffff;

    border-bottom: 1px solid #edf0ee;
}

.nafa-user-modal-icon {
    width: 44px;
    height: 44px;

    min-width: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--nafa-green-light);
    color: var(--nafa-green);

    font-size: 19px;
}

.nafa-user-modal-body {
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;

    background: #ffffff;
}

.nafa-user-modal-body::-webkit-scrollbar {
    width: 7px;
}

.nafa-user-modal-body::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.nafa-user-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5d1;
    border-radius: 10px;
}

.nafa-user-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--nafa-green);
}

.nafa-user-modal-content .modal-footer {
    flex-shrink: 0;

    min-height: 78px;

    display: flex !important;

    align-items: center !important;

    justify-content: flex-end !important;

    gap: 12px !important;

    padding: 16px 24px !important;

    background: #ffffff;

    border-top: 1px solid #edf0ee;
}

.nafa-user-cancel-btn {
    min-width: 100px;

    height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;
}

.nafa-user-save-btn {
    min-width: 155px;

    height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;
}

@keyframes nafaUserModalShow {

    from {
        opacity: 0;
        transform: scale(0.97) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}

@media (max-width: 767px) {

    .nafa-user-modal {
        padding: 12px !important;
    }

    .nafa-user-modal-dialog {
        max-height: calc(100vh - 24px) !important;
    }

    .nafa-user-modal-content {
        max-height: calc(100vh - 24px) !important;

        border-radius: 12px !important;
    }

    .nafa-user-modal-content .modal-header {
        padding: 14px 16px;
    }

    .nafa-user-modal-body .p-4 {
        padding: 16px !important;
    }

    .nafa-user-modal-content .modal-footer {
        padding: 12px 16px !important;
    }

}

@media (max-width: 480px) {

    .nafa-user-modal {
        padding: 8px !important;
    }

    .nafa-user-modal-content .modal-footer {
        gap: 8px !important;

        padding: 10px 12px !important;
    }

    .nafa-user-cancel-btn {
        min-width: 90px;
    }

    .nafa-user-save-btn {
        min-width: 135px;
    }

}

.nafa-user-action-btn {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 7px;

    transition: all 0.2s ease;
}

.nafa-user-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   MOT DE PASSE - MODAL UTILISATEUR
   ========================================================= */

.nafa-password-field {
    position: relative;
    width: 100%;
}

.nafa-user-password-input {
    height: 44px !important;
    padding-right: 48px !important;
}

.nafa-password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;

    width: 34px !important;
    height: 34px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    background: transparent !important;

    color: #6c757d !important;

    cursor: pointer;
    z-index: 5;

    border-radius: 6px;
}

.nafa-password-toggle:hover {
    color: var(--nafa-green) !important;
    background: rgba(25, 135, 84, 0.08) !important;
}

.nafa-password-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nafa-password-toggle i {
    font-size: 17px;
    line-height: 1;
}

/* =========================================================
   MODAL DETAILS PRODUIT
   ========================================================= */

.product-details-image {
    width: 100%;
    min-height: 320px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8f9fa;

    border: 1px solid #e9ecef;
    border-radius: 14px;

    overflow: hidden;
}

.product-details-image img {
    width: 100%;
    height: 320px;

    object-fit: contain;

    padding: 15px;
}

.product-details-placeholder {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 10px;

    color: #adb5bd;

    font-size: 14px;
}

.product-details-placeholder i {
    font-size: 64px;
}


/* =========================================================
   INFORMATIONS
   ========================================================= */

.product-details-info {
    height: 100%;
}

.product-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 14px 0;

    border-bottom: 1px solid #f0f0f0;
}

.product-detail-item:last-child {
    border-bottom: 0;
}

.product-detail-label {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #6c757d;

    font-size: 14px;
    font-weight: 500;
}

.product-detail-label i {
    width: 20px;

    color: #198754;

    font-size: 16px;
}

.product-detail-value {
    color: #212529;

    font-size: 14px;
    font-weight: 600;

    text-align: right;
}

/* =========================================================
   BADGES
   ========================================================= */

.product-detail-value .badge {
    padding: 7px 10px;

    font-size: 12px;

    font-weight: 600;
}


/* =========================================================
   BOUTON OEIL
   ========================================================= */

.product-table .btn-light {
    transition: all .2s ease;
}

.product-table .btn-light:hover {
    color: #198754;

    border-color: #198754;

    background: #eaf6ef;
}