
/* CSS : THEME */
:root {
    --background: #ffffff;
    --text: #5e6064;
    --text-gray: #727477;

    --gray: #ececec;
    --red: #c95151;
    --green: #65c951;
    --white: #5e6064;
    --realwhite: #ffffff;
}

.dark-mode {
    --background: #131414;
    --text: #ffffff;
    --text-gray: #727477;
    
    --gray: #212224;
    --red: #c95151;
    --green: #65c951;
    --white: #ffffff;
    --realwhite: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: block !important;
    justify-content: center;
    align-items: center;
    
    min-height: 100vh;
    padding: 0;
    margin: 0;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;

    background-color: var(--background);
    color: var(--text);
    color-scheme: light;
}

body.dark-mode { color-scheme: dark; }

/* CSS : BLOCK */

html, body {
  height: 100%;
}

.dashboard-container,
.dashboard-body,
.dashboard-content,
.dashboard-table {
  min-height: 0;
}

.dashboard-container {
    /* border: 1px solid #00aeff !important; */

    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    align-items: stretch;

    width: 100%;
    height: 100vh;
    min-height: 0;

    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    
    border-radius: 8px;
}

.dashboard-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--gray);
    transition: transform 0.2s ease;
}

.dashboard-image:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.dashboard-header {
    /* border: 1px solid #ff00c8 !important;	 */
    
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 20px;
}

.dashboard-body {
    /* border: 1px solid #ff00c8 !important;	 */
    display: flex;
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 0;

    overflow: hidden;
}

.dashboard-nav {
    /* border: 1px solid #00ff40 !important; */
    display: flex;
    flex: 1;
    flex-basis: 30vh;
    width: 30vh;
    margin-right: 20px;
    border-right: 1px solid var(--gray);
    padding-right: 20px;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
}

.dashboard-nav-inner{
    /* border: 1px solid #f6fa00 !important; */
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 768px) {
    .dashboard-nav {
        position: fixed !important;
        inset: 0;
        width: 100vw !important;
        height: 100vh !important;
        overflow-x: auto;
        overflow-y: auto;
        margin: 0;
        padding: 20px;
        flex-basis: auto;
        border-right: none;
        background-color: var(--background);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .dashboard-nav:not(.hidden) {
        transform: translateX(0);
    }
}

.dashboard-content {
    /* border: 1px solid #00ff40 !important; */
    
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 0;
    
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-title {
    padding-bottom: 20px;
}

.dashboard-table {
    /* border: 1px solid #ff0000 !important; */

    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 0;

    /* overflow: hidden; */
}

.dashboard-table-content {
    /* border: 1px solid #0004ff !important; */

    display: flex;
    flex-direction: column;

    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;

    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-flex {
    /* border: 1px solid #9583fc !important; */
    display: flex;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .dashboard-flex {
        flex-direction: column;
    }
}

.dashboard-flex-left {
    /* border: 1px solid #fc83f6 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex: 1 1 0;
    min-width: 0;
    left: 0;
}


.dashboard-flex-right {
    /* border: 1px solid #5fdd46 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 1 1 0;
    min-width: 0;
    right: 0;
}

.dashboard-login-left {
    /* border: 1px solid #fc83f6 !important; */
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex: 1 1 0;
    min-width: 0;
    left: 0;

    background: url("../../assets/images/login_background.jpg");
    background-color: var(--background);
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
}

@media (max-width: 1024px) {
    .dashboard-login-left {
        display: none !important;
    }
}

/* CSS : TABLE */

.task-table {
    /* border: 1px solid #f6fa00 !important; */

    width: 100%;
    min-width: 0;
    min-height: 0;

    border-collapse: collapse;
}

.task-table th,
.task-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}
  
.task-table th {
    color: var(--text-gray);
    font-size: 15px;
}

/* CSS : SELECT / INPUT / BUTTON / TEXTAREA */

textarea {    
    resize: none;
    width: auto;
    height: auto;
    min-height: 100px;
}

input, button, select, .select-dropdown, textarea {
    appearance: none;
    line-height: 1.2;
    margin: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    background-color: var(--gray);
    color: var(--white);
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    transition: color 0.2s ease !important;
    min-width: 0;    
}

@media (max-width: 768px) {
    input, button, select, .select-dropdown, textarea {
        padding: 12px 16px;
        font-size: 16px !important;
        line-height: 1.4;
    }
}

button {
    text-align: center;
}

.sp-qty-btn{
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.sp-qty-btn:disabled{
    opacity: .4;
    cursor: not-allowed;
}

select option,
.select-dropdown option {
    background-color: var(--gray);
    border-radius: 8px;
    color: var(--white);
}
  
select option:hover,
.select-dropdown option:hover {
    color: var(--white);
    background-color: var(--background);
}
  
.select-dropdown {
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.select-item {
    padding: 8px 12px; 
    cursor:pointer; 
    border-radius:8px;
}

select:focus,
.select-item:focus,
select:hover,
.select-item:hover {
    color: var(--white);
    background-color: var(--gray);
    outline: none;
} 

button:hover {
    background-color: var(--white) !important;
    color: var(--background) !important;
}

button.active {
    color: var(--background) !important;
    background-color: var(--white) !important;
}

input:focus {
    outline: none;
    border: none;
}

input::placeholder {
    color: var(--text-gray);
}

textarea::placeholder {
    color: var(--text-gray);
}

input[disabled],select[disabled],button[disabled] {
    cursor: not-allowed !important;
    opacity: 0.5;
}

input[disabled]:hover, select[disabled]:hover,button[disabled]:hover {
    background-color: var(--gray) !important;
    color: var(--white) !important;
    cursor: not-allowed !important;
}

input[type="file"] {
    display: none;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
  
input[type="checkbox"]:checked {
    background-color: var(--white);
}
  
input[type="checkbox"]:checked::after {
    content: '✔';
    font-size: 10px;
    font-weight: bold;
    color: var(--background);
    position: absolute;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    background-color: var(--gray) !important;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--background) inset !important;
}

.table-searchbar, .select-search {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

/* CSS : PREFAB */

.bold {
    font-weight: bold;
}

.block {
    display: block;
}

.hidden {
    display: none !important;
}

.force-hidden {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.back_red:hover {
    background-color: var(--red) !important;
    color: var(--background) !important;
}

.txt_red:hover {
    color: var(--red) !important;
}

.back_green:hover {
    background-color: var(--green) !important;
    color: var(--background) !important;
}

.txt_green:hover {
    color: var(--green) !important;
}

.flex-column {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
}

.flex-no-column {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: row !important;
}

.flex-left {
    display: flex;
    justify-content: flex-start;
    left: 0;
}

.flex-right {
    justify-content: flex-end;
    right: 0;
}

.flex-center {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.flex-large { 
    flex: 2 1 0;
    min-width: 0;
}

.flex-space-bottom {
    padding-bottom: 20px;
}

/* CSS : KIT */

a {
  color: inherit;
  text-decoration: none;
}

a:visited {
  color: inherit;
}

a[disabled] {
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* CSS : MENU NAVIGATEUR */

.dashboard-nav-item {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
    color: var(--white);
    cursor: pointer;
    border-radius: 8px;
    padding: 10px;
    margin: 5px;
    width: 100%;
}

.dashboard-nav-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    right: 0;
}

@media (max-width: 768px) {
    .dashboard-nav-title {
        font-weight: bold;
    }
}

.dashboard-nav-item i {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    left: 0;
    width: 10%;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .dashboard-nav-item i {
        width: 100%;
        font-size: 1.8rem;
    }
}

.dashboard-nav-item.active i {
    color: var(--white);
}
  
.dashboard-nav-item:hover {
    background-color: var(--gray);
}
  
.dashboard-nav-item.active {
    background-color: var(--gray);
}
  
.dashboard-nav-item.open {
    background-color: var(--background);
}

.dashboard-nav-item.open.active {
    background-color: var(--background);
}

.dashboard-nav-list-submenu {
    display: flex;
    flex-direction: column;
}

.dashboard-nav-list-submenu.open {
    border-radius: 8px;
    border: 1px solid var(--gray);
}


.dashboard-nav-list-submenu > span {
    display: flex;
    align-items: center;
     justify-content: flex-start;
    width: 100%;
    gap: 8px;
}

.dashboard-nav-list-submenu .dashboard-nav-item-submenu {
    flex-direction: column;
}

.dashboard-nav-list-submenu.open .dashboard-nav-item-submenu {
    display: flex;
}
  
.dashboard-nav-item-submenu {
    display: none;
    list-style: none;
    flex-direction: column;
    width: 100%;
} 

.dashboard-nav-item-submenu i {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    left: 0;
}
.dashboard-nav-item-submenu > span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    right: 0;
}
  
.dashboard-nav-item-submenu li {
    background: var(--background);
}
  
.dashboard-nav-item-submenu li:hover {
    background: var(--gray);
}

.dashboard-nav-version {
    list-style: none;
    right: 0;
    color: var(--text-gray);
    font-size: 10px;
    text-decoration: none;
}