/* --- Reset & global --- */
@import url('https://fonts.googleapis.com/css2?family=TASA+Orbiter:wght@400..800&display=swap');

:root {
    --blue: #465fff;
    
    --shadow-btn: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 0 #000, 0 0 #0000, 0 0 #000, 0 0 #0000, 0 1px 2px 0 rgba(0, 0, 0, .05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05);
    --topbar-height: 64px;
    --sidenav-expanded-width: 260px;
    --sidenav-collapsed-width: 90px;
    --sidenav-width: var(--sidenav-expanded-width);
    --input-border-color: #d0d5dd;
    --input-border: 1px solid var(--input-border-color);
    --input-radius: 8px;
    --input-shadow: var(--shadow-sm);
    --input-color: #1d2939;
    --input-bg: #fff;
    
    --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite;
}

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

body {
    margin: 0;
    font-family: "TASA Orbiter", sans-serif!important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: #f9fafb !important;
    scroll-behavior: smooth;
    color: #464D77;
    padding-left: var(--sidenav-width);
    padding-top: var(--topbar-height);
    transition: padding-left 200ms ease;
}
body.sidenav-collapsed {
    --sidenav-width: var(--sidenav-collapsed-width);
}
body.sidenav-collapsed.sidenav-hover {
    --sidenav-width: var(--sidenav-expanded-width);
}

.btn-primary {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.btn-primary:hover {
    background: #3641f5;
}
.btn-secondary {
    padding: 6px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    background: #f9fafb;
    border: 1px solid #d0d5dd;
}

/* Layout */

/* Topbar */
.app-topbar {
    position: fixed;
    top: 0;
    left: var(--sidenav-width);
    width: calc(100% - var(--sidenav-width));
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e4e7ec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
    transition: left 0.2s ease, width 0.2s ease;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: 0 12px;
    height: 42px;
    box-shadow: var(--shadow-sm);
}
.topbar-breadcrumb a,
.topbar-breadcrumb span {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.topbar-breadcrumb a:hover {
    color: #465fff;
}
.topbar-breadcrumb > *:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: #c2c8d0;
}
.topbar-breadcrumb [aria-current="page"] {
    color: #1d2939;
    font-weight: 500;
}
.topbar-brand {
    display: flex;
    align-items: center;
}
.topbar-logo {
    height: 28px;
    width: auto;
}
.sidenav-collapse {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
}
.sidenav-collapse:hover {
    color: #344054;
    background: #f2f4f7;
}
.topbar-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-actions .display-picture,
.topbar-actions .notif-picture {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    box-shadow: var(--shadow-sm);
}
.topbar-actions .display-picture:hover,
.topbar-actions .notif-picture:hover {
    color: #344054;
    background: #f2f4f7;
}

/* Sidenav */
.sidenav-toggle {
    display: none;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    font-size: 18px;
}
.sidenav-toggle:hover {
    color: #344054;
    background: #f2f4f7;
}
.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidenav-width);
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e4e7ec;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 998;
    transition: width 0.2s ease;
}
.sidenav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
}
.sidenav-logo {
    width: auto;
    height: 30px;
}
.sidenav-logo-icon {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
}
.sidenav-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sidenav-section.menu,
.sidenav-section.stock
{
    margin-top: 28px;
}
.sidenav-section.support {
    margin-top: auto;
}
.sidenav-label {
    color: #98a2b3;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding-left: 10px;
}
.sidenav-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidenav-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}
.sidenav-nav a:hover {
    background: #f2f4f7;
    border: 1px solid #f2f4f7;
}
.sidenav-nav a.active {
    color: var(--blue);
    background: #e8efff;
    border: 1px solid #c7d7fe;
}
.sidenav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    font-size: 18px;
}
.sidenav-nav a:hover .sidenav-icon {
    color: #344054;
}
.sidenav-icon svg {
    width: auto;
    height: 16px;
    display: block;
    fill: currentColor;
}
.sidenav-icon svg * {
    fill: currentColor;
}
.sidenav-nav a:hover svg {
    fill: #344054!important;
}
.sidenav-nav a:hover svg * {
    fill: #344054!important;
}
.sidenav-nav a.active:hover svg {
    fill: currentColor!important;
}
.sidenav-nav a.active:hover svg * {
    fill: currentColor!important;
}
.sidenav-nav a.active .sidenav-icon {
    background: transparent;
    color: var(--blue);
}
body.sidenav-collapsed .sidenav-brand {
    justify-content: center;
}
body.sidenav-collapsed .sidenav-logo {
    display: none;
}
body.sidenav-collapsed .sidenav-logo-icon {
    display: block;
}
body.sidenav-collapsed .sidenav-label,
body.sidenav-collapsed .sidenav-text {
    display: none;
}
body.sidenav-collapsed .sidenav-label {
    display: block;
    font-size: 0;
    text-align: center;
    padding-left: 0;
}
body.sidenav-collapsed .sidenav-label::after {
    content: "…";
    font-size: 16px;
    color: #98a2b3;
    letter-spacing: 0;
}
body.sidenav-collapsed .sidenav-nav {
    align-items: center;
}
body.sidenav-collapsed .sidenav-nav a {
    justify-content: center;
    padding: 0;
    width: 38px;
}
body.sidenav-collapsed .sidenav-icon {
    width: 36px;
    height: 36px;
}
body.sidenav-collapsed.sidenav-hover .sidenav-logo {
    display: block;
}
body.sidenav-collapsed.sidenav-hover .sidenav-logo-icon {
    display: none;
}
body.sidenav-collapsed.sidenav-hover .sidenav-brand {
    justify-content: flex-start;
}
body.sidenav-collapsed.sidenav-hover .sidenav-label,
body.sidenav-collapsed.sidenav-hover .sidenav-text {
    display: inline;
}
body.sidenav-collapsed.sidenav-hover .sidenav-label {
    font-size: 12px;
    text-align: left;
    padding-left: 10px;
}
body.sidenav-collapsed.sidenav-hover .sidenav-label::after {
    content: none;
}
body.sidenav-collapsed.sidenav-hover .sidenav-nav {
    align-items: flex-start!important;
}
body.sidenav-collapsed.sidenav-hover .sidenav-nav a {
    justify-content: flex-start;
    padding: 4px 0;
    width: 100%!important;
}
body.sidenav-collapsed.sidenav-hover .sidenav-icon {
    width: 32px;
    height: 32px;
}
.sidenav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 997;
}
.sidenav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Sidenav user card */
.sidenav-footer {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.sidenav-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    color: #1d2939;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.sidenav-user-card:hover {
    background: #f2f4f7;
}
.sidenav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 78, 216, 0.333);
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}
.sidenav-user-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
    min-width: 0;
}
.sidenav-user-name {
    font-weight: 600;
    font-size: 15px;
    color: #1d2939;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidenav-user-email {
    font-size: 12px;
    color: #667085;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.sidenav-collapsed .sidenav-user-info {
    display: none;
}
body.sidenav-collapsed .sidenav-footer {
    display: flex;
    justify-content: center;
}
body.sidenav-collapsed .sidenav-user-card {
    padding: 0;
    justify-content: center;
    border: none;
}
body.sidenav-collapsed .sidenav-user-card div:last-child {
    display: none;
} 
body.sidenav-collapsed.sidenav-hover .sidenav-user-info {
    display: flex;
}
body.sidenav-collapsed.sidenav-hover .sidenav-footer {
    justify-content: flex-start;
}
body.sidenav-collapsed.sidenav-hover .sidenav-user-card {
    padding: 8px;
    justify-content: flex-start;
    border: 1px solid #e4e7ec;
}
body.sidenav-collapsed.sidenav-hover .sidenav-user-card div:last-child {
    display: flex;
}

.sidenav-account-menu {
    position: absolute;
    bottom: calc(100% - 9px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 998;
}
.sidenav-footer.account-menu-open .sidenav-account-menu {
    border-radius: 12px 12px 0 0;
}
.sidenav-footer.account-menu-open .sidenav-user-card {
    border-radius: 0 0 12px 12px;
}
.sidenav-account-title {
    padding: 4px 8px;
    font-size: 15px;
    color: #344054;
    font-weight: bold;
}
.sidenav-account-menu a {
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #344054;
    font-size: 14px;
}
.sidenav-account-menu a:hover {
    background: #f2f4f7;
}
.sidenav-account-menu a i {
    color: #667085;
    margin-right: 4px;
}
.sidenav-account-menu a:hover i {
    color: #344054;
}
body.sidenav-collapsed .sidenav-account-menu {
    min-width: 200px;
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #E4E7EC;
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 998;
}
.topbar > a {
    display: flex;
}
.topbar .logo {
    width: auto;
    height: 32px;
}
.topbar nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}
.topbar nav .display-picture, .topbar nav .notif-picture {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 38px;
    height: 38px;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    background: #fff;
    color: #667085;
    box-shadow: var(--shadow-sm);
}
.topbar nav .display-picture:hover, .topbar nav .notif-picture:hover {
    color: #344054;
    background: #f2f4f7;
}

.notif-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    display: flex;
    margin: 0;
    top: -4px;
    right: -4px;
}

.notif-dot span:nth-child(1) {
    width: 100%;
    height: 100%;
    background: #F60345;
    border-radius: 300px;
    display: inline-flex;
    position: absolute;
    opacity: .75;
    animation: var(--animate-ping);
}

.notif-dot span:nth-child(2) {
    width: 12px;
    height: 12px;
    background: #F60345;
    border-radius: 300px;
    display: inline-flex;
    position: relative;
}

.animate-ping {
    animation: var(--animate-ping);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.topbar nav a {
    padding: 8px 12px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    border-radius: 6px;
}
.topbar nav a:hover {
    color: #344054;
    background: #f2f4f7;
}
.topbar nav a.active {
    color: var(--blue);
    background: #ecf3ff;
}

.dropdown {
    position: absolute;
    top: calc(var(--topbar-height) - 8px);
    right: 0;
    transition: 0.5s ease;
    z-index: 999;
}

.dropdown ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    position: static;
    padding: 12px;
    list-style: none;
    z-index: 999;
}

.dropdown ul li {
    margin: 2px 0;
    color: #FFF;
    font-size: 14px;
    width: 100%;
    border-radius: 4px;
}
.dropdown ul li h5 {
    padding: 0;
    font-size: 14px;
    color: #344054;
    font-weight: bold;
}
.dropdown ul li a {
    padding: 8px 16px;
}
.dropdown ul li a:hover {
    background: #f2f4f7;
    color: #344054;
}
.dropdown ul li:nth-child(3) {
    margin-top: 0;
}
.dropdown ul li:last-child {
    margin: 0;
}
.dropdown ul li:hover {
    background: #ecf3ff;
}
.dropdown ul .separator {
    margin: 12px 0;
    padding: 0;
    width: 100%;
    border-radius: 0;
}
.dropdown ul li:first-child:hover, .dropdown ul .separator:hover {
    background: transparent;
    pointer-events: none;
}
.dropdown ul li a {
    display: block;
    text-decoration: none;
    color: #464D77;
    font-size: 14px;
    width: 100%;
    margin: 0;
}
.dropdown ul li a div {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.dropdown ul li a span {
    display: flex;
    margin-right: 12px;
    color: #667085;
    font-size: 18px;
}
.dropdown ul li a span img {
    width: 18px;
    height: auto;
}
.dropdown ul li a:hover span {
    color: #344054;
}

/* Nouveautées */
.card-news {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 360px;
    height: 456px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
    position: absolute;
    top: calc(var(--topbar-height) - 8px);
    right: 52px;
    list-style: none;
    z-index: 999;
    transition: 0.5s ease;
}
.card-news h4 {
    align-self: flex-start;
    padding: 0 0 12px;
    margin: 12px 14px 0;
    border-bottom: 1px solid #e4e7ec;
    width: calc(100% - 24px);
    font-weight: bold;
}
.card-news nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
}
.sidebar-news {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 12px 12px;
    height: 100%;
    overflow: auto;
}
.news-item {
    padding: 16px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}
.news-item:hover {
    background: #f9fafb;
}
.news-item h5 {
    margin: 0;
    font-size: 14px;
}
.news-item small {
    font-size: 12px;
}
.news-item p {
    font-size: 14px;
}

.hidden {
    display: none;
}
/* Menu burger */        
.menu-burger {            
    display: none;            
    margin: 0;
    width: 44px;
    height: 44px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    color: #667085;   
    font-size: 18px;
}        
.menu-burger:hover {            
    color: #344054;
    background: #f2f4f7;
}        
/* Menu mobile */        
.mobile-menu {            
    position: fixed;            
    top: 64px;            
    left: 0;            
    width: 100%;            
    background: #fff;            
    border: 1px solid #e4e7ec;   
    border-radius: 0;
    padding: 12px;            
    z-index: 997;        
}        
.mobile-menu nav {            
    display: flex;            
    flex-direction: column;            
    gap: 12px;        
}        
.mobile-menu nav a {            
    padding: 8px 12px;            
    color: #344054;            
    text-decoration: none;            
    font-size: 16px;            
    line-height: 20px;            
    font-weight: 500;            
    border-radius: 8px;        
}        
.mobile-menu nav a:hover {            
    color: var(--blue);            
background: #ecf3ff;        
}

/*point rouge Nouveautées*/

.news-item.unread::before {
  content: "•";
  color: red;
  font-size: 20px;
  margin-right: 5px;
}


/* Main content */
.main {
    transition: margin 200ms;
    padding: 24px 24px 0;
    width: 100%;
    max-width: 100%;
}
.main h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    color: #1d2939;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}
.main .main-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.main h2 span {
    display: flex;
    padding: 4px;
    background: #e9f0ff;
    border-radius: 8px;
}
.main h2 span img {
    width: 20px;
    height: auto;
}
#stats + div {
    margin-bottom: 24px;
}
#stats h2 {
    margin: 0;
}
.main h3 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #1d2939;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.main h3 i {
    margin-right: 8px;
}

/* Cards Stats */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    align-items: flex-start;
    flex: 1;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    border-color: #c7d7fe;
    box-shadow: var(--shadow-lg);
}
.card h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.card p {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
    color: #1d2939;
}
.card .card-submetric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e4e7ec;
}
.card .card-submetric-title {
    font-size: 12px;
    font-weight: 500;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
    padding: 0;
}
.card .card-submetric p {
    font-size: 20px;
}
.card .card-submetric-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card .card-submetric-values p {
    font-size: 20px;
    font-weight: bold;
}
.card div span {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    font-size: 12px;
    padding: 4px 8px;
}

/* Stats */
.stats-grid .card div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e4e7ec;
}
.stats-grid .card div span {
    font-size: 10px;
    font-weight: 500;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
    padding: 0;
}
.stats-grid .card div span p {
    font-size: 16px;
    color: #1d2939;
}
.globale,
.globale:hover{
    transform: translateY(0)!important;
    background: linear-gradient(135deg, #eef4ff, #ffffff)!important;
    border-color: #c7d7fe!important;
    box-shadow: var(--shadow-sm);
}
.toggle-group {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #f2f4f7;
    box-shadow: var(--inset-shadow-sm);
}
.toggle-group a {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    margin: 0;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #667085;
}
.toggle-group a:hover {
    color: #344054;
    background: transparent;
    
}
.toggle-group a.active {
    background: #fff;
    color: #1d2939;
    border: 1px solid #e4e7ec;
    box-shadow: var(--shadow-sm);
}
.pie {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    background: #fff;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    width: 100%;
}
.chart-box {
    display: flex;
    align-items: flex-start;
    gap: 80px;
    width: 100%;
}

/* DOUGHNUT */
#countriesChart {
    width: 100%;
    height: auto;
}
.chart-pane {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mini-stats {
    display: flex;
    gap: 8px;
    width: 100%;
}
.mini-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    min-width: 50%;
}
.mini-stat-label {
    font-size: 14px;
    color: #667085;
}
.mini-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #1d2939;
}
#countriesChartLegend {
    width: 75%;
}
#countriesChartLegend .sales-table {
    border: 1px solid #e4e7ec;
    border-bottom: none;
    border-radius: 8px;
}
#countriesChartLegend .sales-table table {
    min-width: 100%;
}
#countriesChartLegend th:first-child,
#countriesChartLegend td:first-child {
    width: 48px;
}
.chart-legend-row {
    cursor: pointer;
}
.chart-legend-row.is-hidden {
    opacity: 0.45;
}
.chart-legend-label {
    color: #1d2939;
    font-weight: 500;
}
.chart-legend-swatch {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    display: inline-block;
}

/* Graphs */

.graphs {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    padding: 24px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.toggle-btn {
    padding: 1px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #f2f4f7;
    box-shadow: var(--inset-shadow-sm);
}
.toggle {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #667085;
}
.toggle:hover {
    color: #344054;
    background: transparent;
}
.toggle.active {
    background: #fff;
    color: #1d2939;
    border: 1px solid #e4e7ec;
    box-shadow: var(--shadow-sm);
}
.graphs p {
    margin-bottom: 10px;
    font-weight: 800;
    color: #374151;
}
#salesChart {
    aspect-ratio: 4 / 1!important;
    width: 100%!important;
    height: 390px!important;
    display: block!important;
}
/*#salesChart7, #salesChart30, #salesChartYear {
    display: block;
    box-sizing: border-box;
    height: 120px;
    width: 100%;
    min-width: calc(100% / 3);
}

/* Filters */
form.filters {
    margin: 24px 0;
    background: #fff;
    padding: 24px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
form.filters label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #344054;
    margin-right: 15px;
}
form.filters input, 
form.filters button {
    margin-left: 5px;
}
form.filters input,
form.filters select {
    font-size: 14px;
    color: var(--input-color);
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    background-color: var(--input-bg);
}
form.filters input {
    padding: 8px 12px;
}
form.filters select {
    padding: 8px 34px 8px 12px;
}
form.filters input::placeholder {
    font-family: monospace;
    color: #98a2b3;
}
form.filters button {
    color: #fff;
    background: var(--blue);
    padding: 6px 12px;
    text-align: center;
    border: 1px solid var(--blue);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
form.filters button:hover {
    background: #3641f5;
    border-color: #3641f5;
}
form.filters a button {
    color: #344054;
    background: #fff;
    padding: 6px 12px;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
form.filters a button:hover {
    background: #f9fafb;
    border: 1px solid #d0d5dd;
}

/* Stocks */
.btn-group button {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.btn-group button:hover {
    background: #3641f5;
}
.btn-group div button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
}
.btn-group div button:hover {
    background: #f9fafb;
}
.btn-group div button svg {
    width: auto;
    height: 16px;
    display: block;
    fill: currentColor;
}
.btn-group a {
    text-decoration-line: underline;
    color: var(--blue);
    font-size: 14px;
    font-weight: 400;
}

/* Table */
.sales,
.stocks,
.suppliers
{
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.sales-exemple {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-top: 10px;
}
#stock .btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
}
#stock .btn-group div {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sales-table,
.stocks-table,
.suppliers-table
{
    width: 100%;
    overflow: auto;
    border-top: 1px solid #e4e7ec;
}
.stocks form.filters,
.suppliers form.filters
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.stocks form.filters input,
.suppliers form.filters input
{
    margin: 0;
    width: 100%;
    flex: 1;
}
#supplier .filters.btn-group {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
}
table {
    width: 100%;
    min-width: 1180px;
    max-width: 100%;
    background: #FDFDFD;
    border-collapse: collapse;
}
tbody:first-child tr {
    background: #fff;
}
tr th:first-child, 
tr td:first-child 
{
    padding-right: 0;
}
th, 
td 
{
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e4e7ec;
    font-size: 14px;
    color: #667085;
}
th {
    background: #F9FAFB;
    font-weight: 600;
    border-bottom: 1px solid #e4e7ec;
}
td {
    background: #fff;
    font-weight: 500;
}
tr:hover {
    background: #f9fafb!important;
}
tr:hover td {
    background: #f9fafb!important;
}
.prix-achat, .boost {
    padding: 6px 10px;
    color: #1d2939;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
}

td a, td .envoiFacture {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    color: #344054;
    background: #fff;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
td a:hover, td .envoiFacture:hover {
    background: #f9fafb;
}
td .tooltip {
    position: relative;
    text-decoration: none;
    cursor: pointer;
}
/* Texte de l'infobulle */
td .tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%; /* place au-dessus du lien */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

/* Petite flèche */
td .tooltip::before {
    content: "";
    position: absolute;
    bottom: 92%; 
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0,0,0,0.8) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Affichage au hover */
td .tooltip:hover::after,
td .tooltip:hover::before {
    opacity: 1;
}



td img {
    width: 90px;
    height: 90px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}
#refreshBtn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: var(--blue);
    padding: 8px 16px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
#refreshBtn:hover {
    background: #3641f5;
}
input[type="number"],
input[type="date"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="month"],
input[type="week"],
input[type="time"],
textarea,
select {
    background-color: var(--input-bg);
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    color: var(--input-color);
    padding: 8px 12px;
}
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px 8px;
    padding-right: 34px;
    cursor: pointer;
}

#bulkForm {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 20px;
}

#bulkForm select,
#bulkForm select:focus,
#bulkForm select:visited {
    padding: 8px 34px 8px 12px;
    font-size: 14px;
    color: var(--input-color);
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    background-color: var(--input-bg);
    cursor: pointer;
    outline: none;
}

#bulkForm select:hover {
    color: var(--blue);
}

#bulkForm button {
    color: #344054;
    background: #fff;
    padding: 4px 8px;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

#bulkForm button:hover {
    background: #f9fafb;
    color: var(--blue);
    border: 1px solid var(--blue);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px; /* espace entre les éléments */
    margin: 16px 0;
    padding: 0 20px;
    font-size: 14px;
}
        
.pagination a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    text-decoration: none;
    color: #98a2b3;
    font-weight: bold;
    transition: background 0.2s;
    box-shadow: var(--shadow-sm);
}
        
.pagination a:hover {
    background: #f9fafb;
    color: #1d2939;
}
        
.pagination form {
    display: inline-flex!important;
    align-items: center;
    gap: 5px;
}
        
.pagination input[type="number"] {
    width: 50px;
    padding: 5px 0 5px 5px;
    text-align: center;
    border: none;
    border-radius: var(--input-radius);
    box-shadow: none;
    color: var(--input-color);
    background: transparent;
    font-size: 14px;
}
        
.pagination span {
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding-right: 8px;
    height: 32px;
    box-shadow: var(--inset-shadow-sm);
}
.pagination select {
    border: var(--input-border);
    border-radius: var(--input-radius);
    height: 32px;
    padding: 0 34px 0 12px;
    box-shadow: var(--input-shadow);
    color: var(--input-color);
    background-color: var(--input-bg);
}

/* Alerts */
.alert {
    padding: 12px;
    margin: 15px 0;
    border-radius: 12px;
}
.alert.success {
    background: #e3f6ec;
    border: 1px solid #7be5a2;
    color: #2da56b;
    font-weight: 500;
}
.alert.success .fa-regular {
    margin-right: 8px;
}

/* Messages */
.message {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
}
.message .message-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #667085;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    padding: 0 6px;
    cursor: pointer;
    align-self: flex-start;
}
.message .message-close:hover {
    color: #344054;
    border-radius: 6px;
}
.message strong {
    line-height: 24px;
    color: #1d2939;
}
.message p {
    margin-top: 4px;
    color: #667085;
}
.warning {
    background: #fffaeb;
    border: 1px solid #f79009;
}
.success {
    background: #ecfdf3;
    border: 1px solid #12b76a;
}
.info {
    background: #f0f9ff;
    border: 1px solid #0ba5ec;
}

/* États */
.etat-select {
    border: var(--input-border);
    padding: 4px 24px 4px 6px;
    border-radius: var(--input-radius);
    font-weight: 400;
    cursor: pointer;
    appearance: none;
    box-shadow: var(--input-shadow);
    color: var(--input-color);
    background-color: var(--input-bg);
}

/* En cours → orange */
.etat-select.en_cours {
    background-color: #fffaeb; /* orange clair */
    color: #f79009;            /* orange foncé */
    border: 1px solid #f79009;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f79009' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Expédié → vert */
.etat-select.expedie {
    background-color: #ecfdf3;/* vert clair */
    color: #12b76a;           /* vert clair */
    border: 1px solid #12b76a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2312b76a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/*spin refresh*/
.spin {
  animation: spin 1s linear infinite;
}

/* Fenetres Modal */
.modal {
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: color-mix(in oklab, #98a2b3 50%, transparent);
    backdrop-filter: blur(2px);
    z-index: 9999;
}

.modal-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 24px;
    width: min(var(--modal-width, 600px), 92vw);
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
}

.modal-card--sm { --modal-width: 420px; }
.modal-card--md { --modal-width: 500px; }
.modal-card--lg { --modal-width: 584px; }
.modal-card--xl { --modal-width: 600px; }
.modal-card--center {
    text-align: center;
    padding: 32px 40px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #344054;
}
.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.modal-form-grid .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.modal-form-grid .field.full {
    grid-column: 1 / -1;
}
.modal-card form label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #344054;
}
.modal-form-grid .field select {
    padding: 8px 34px 8px 12px;
}
.modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.loader-icon {
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}
.loader-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.loader-text {
    color: #667085;
}

#loader-overlay {
    display: none;
}

/* Shared titles */
.page-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title-icon {
    display: flex;
    padding: 4px;
    background: #e9f0ff;
    border-radius: 8px;
}
.page-title-icon img {
    width: 20px;
    height: auto;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title img {
    width: 20px;
    height: auto;
}

/* Annonces IA */
.annonces-ai-page .main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    height: calc(100vh - var(--topbar-height));
    padding-bottom: 0;
}
.annonces-ai-page .page-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.annonces-ai-page .page-title-tag {
    font-size: 0.8rem;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 4px;
}
.annonces-ai-page .boxForm {
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.annonces-ai-page label {
    font-size: 16px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}
.annonces-ai-page select,
.annonces-ai-page textarea {
    width: 100%;
    margin: 6px 0 24px;
    font-size: 14px;
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    color: var(--input-color);
    background-color: var(--input-bg);
}
.annonces-ai-page select {
    padding: 10px 34px 10px 12px;
}
.annonces-ai-page textarea {
    padding: 10px;
}
.annonces-ai-page textarea {
    resize: none;
    min-height: 150px;
}
.annonces-ai-page .boxForm button {
    display: flex;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}
.annonces-ai-page .boxForm button:hover {
    background: #3641f5;
}
.annonces-ai-page .boxForm button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.annonces-ai-page .dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 16px;
    padding: 28px 16px;
    border: 1px dashed #cfd4e1;
    border-radius: 8px;
    background: #f9fafb;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.annonces-ai-page .dropzone:hover {
    border-color: var(--blue);
    background: #f9fafb;
}
.annonces-ai-page .dropzone.dragover {
    border-color: #1d4ed8;
    background: #eff6ff;
}
.annonces-ai-page .dropzone input[type="file"] {
    display: none;
}
.annonces-ai-page .dropzone .dz-icon {
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: #e4e7ec;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 18px;
}
.annonces-ai-page .dropzone .dz-title {
    font-weight: 600;
    font-size: 20px;
}
.annonces-ai-page .dropzone .dz-hint {
    font-size: 14px;
    color: #667085;
    text-align: center;
    width: 250px;
}
.annonces-ai-page .dropzone .dz-filename {
    font-size: 14px;
    color: #1f2937;
    margin-top: 4px;
    word-break: break-all;
}
.annonces-ai-page .dropzone .dz-browse {
    font-size: 14px;
    color: #2563eb;
    text-decoration: underline;
}
.annonces-ai-page .result {
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.annonces-ai-page .is-hidden {
    display: none;
}
.annonces-ai-page .result.is-full {
    width: 100%;
}
.annonces-ai-page .copy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}
.annonces-ai-page .result div:first-child textarea {
    min-height: 80px;
}
.annonces-ai-page .copy-btn {
    background: none;
    color: #667085;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}
.annonces-ai-page .copy-btn:hover {
    background: #f2f4f7;
    color: #344054;
}
.annonces-ai-page .clear-btn {
    color: #344054;
    background: #fff;
    padding: 6px 12px;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.annonces-ai-page .clear-btn:hover {
    background: #f9fafb;
    border: 1px solid #d0d5dd;
}

/* Dashboard */
.dashboard-page .chart-parent {
    position: relative;
    width: 100%;
    max-height: 400px;
    height: 100%;
}
.dashboard-page #factureForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}
.dashboard-page #factureForm label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.dashboard-page #factureForm input,
.dashboard-page #factureForm textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    color: var(--input-color);
    background: var(--input-bg);
    box-sizing: border-box;
}
.dashboard-page #factureForm input:focus,
.dashboard-page #factureForm textarea:focus {
    outline: none;
    border-color: var(--input-border-color);
}
.dashboard-page #factureForm textarea {
    resize: vertical;
}
.dashboard-page #factureForm .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}
.dashboard-page #factureForm button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}
.dashboard-page #factureForm button[type="button"] {
    background-color: #e0e0e0;
}
.dashboard-page #factureForm button[type="submit"] {
    background-color: var(--blue);
    color: #fff;
}
.dashboard-page #factureForm button:hover {
    opacity: 0.9;
}
.dashboard-page #corpsMail {
    height: 150px;
}

/* Admin */
.admin-page .msg {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    background: #ecfdf3;
    border: 1px solid #12b76a;
    border-radius: 6px;
    color: #667085;
    font-weight: 600;
    padding: 8px;
    font-size: 15px;
}
.admin-page .admin-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.admin-page .admin-container h2 {
    margin: 0;
    color: #1d2939;
    font-size: 20px;
    line-height: 28px;
}
.admin-page section {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-sm);
}
.admin-page .users .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}
.admin-page .debug-btn {
    color: #fff;
    background: var(--blue);
    padding: 12px 16px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.admin-page .debug-btn:hover {
    background: #3641f5;
}
.admin-page section h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #1d2939;
    font-size: 18px;
    line-height: 26px;
}
.admin-page .news h2 {
    justify-content: flex-start;
    margin-bottom: 16px;
}
.admin-page .tableau {
    width: 100%;
    overflow: auto;
    border-top: 1px solid #e4e7ec;
}
.admin-page .tableau table {
    min-width: unset;
    text-align: left;
}
.admin-page .tableau table th,
.admin-page .tableau table td {
    text-align: left;
}
.admin-page .key span {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
}
.admin-page .subscribe {
    width: auto;
}
.admin-page .tableau table .subscribe span {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 0 0 0 6px;
    width: 78px;
    height: 30px;
    border-radius: 8px;
    font-weight: 600;
}
.admin-page .tableau table .subscribe .actif {
    background: #ecfdf3;
    border: 1px solid #12b76a;
    color: #12b76a;
}
.admin-page .tableau table .subscribe .inactif {
    background: #fef3f2;
    border: 1px solid #f04438;
    color: #f04438;
}
.admin-page .tableau table img {
    width: 20px;
    height: 20px;
    border: none;
}
.admin-page .tableau table .action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 140px;
}
.admin-page .tableau button,
.admin-page .subscribe div a,
.admin-page .actu-card button {
    color: #667085;
    background: #fff;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.admin-page .tableau button:hover,
.admin-page .subscribe div a:hover,
.admin-page .actu-card button:hover {
    background: #f9fafb;
    color: #344054;
}
.admin-page .btn-edit {
    width: 92px;
    height: 34px;
}
.admin-page .btn-delete {
    width: 34px;
    height: 34px;
}
.admin-page .news .add {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 8px;
}
.admin-page .add div {
    display: flex;
    flex-direction: column;
    max-width: 550px;
    width: 100%;
}
.admin-page .add label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}
.admin-page .add input,
.admin-page .add textarea {
    margin-bottom: 24px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--input-color);
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    background: var(--input-bg);
}
.admin-page .add button {
    color: #fff;
    background: var(--blue);
    padding: 12px 16px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.admin-page .add button:hover {
    background: #3641f5;
}
.admin-page .actu-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 8px;
}
.admin-page .actu-card:hover {
    background: #ecf3ff;
}
.admin-page .actu-card:last-child {
    margin-bottom: 0;
}
.admin-page .actu-card h3 {
    color: #1d2939;
    font-size: 16px;
    line-height: 20px;
}
.admin-page .actu-card small {
    color: #667085;
}
.admin-page .actu-card p {
    font-size: 15px;
    font-weight: 500;
    color: #667085;
    margin-top: 8px;
}
.admin-page .edit-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}
.admin-page .edit-form div {
    display: flex;
    flex-direction: column;
    max-width: 550px;
    width: 100%;
}
.admin-page .edit-form label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 6px;
}
.admin-page .edit-form input,
.admin-page .edit-form textarea {
    margin-bottom: 24px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--input-color);
    border: var(--input-border);
    border-radius: var(--input-radius);
    box-shadow: var(--input-shadow);
    background: var(--input-bg);
}
.admin-page footer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    width: 100%;
    text-align: center;
    color: #667085;
    font-size: 14px;
}
@media screen and (max-width: 1500px) {
    .admin-page .admin-container {
        padding: 24px 24px 0;
    }
}
@media screen and (max-width: 768px) {
    .admin-page .admin-container {
        margin: 0;
        padding: 16px 16px 0;
    }
    .admin-page section,
    .admin-page .add,
    .admin-page .actu-card {
        padding: 16px;
    }
    .admin-page .add button {
        width: 100%;
    }
}

/* PromoScan */
.promo-scan-page .filters {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 16px 32px;
}
.promo-scan-page .filters > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.promo-scan-page .filters h4 {
    color: #1d2939;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
}
.promo-scan-page .filters > div:last-child {
    flex-direction: row;
    align-items: center;
    width: 100%;
}
.promo-scan-page .filters label,
.promo-scan-page .filters input {
    margin: 0 !important;
    font-size: 14px;
}
.promo-scan-page .filters input::placeholder {
    font-family: monospace;
    color: #98a2b3;
}
.promo-scan-page .filters select[name="marchand"] {
    width: 330px;
}
.promo-scan-page #submit {
    margin-left: 16px;
    color: #fff;
    background: var(--blue);
    padding: 8px 12px;
    text-align: center;
    border: 1px solid var(--blue);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.promo-scan-page #submit:hover {
    background: #3641f5;
    border-color: #3641f5;
}
.promo-scan-page #reset-btn {
    color: #344054;
    background: #fff;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.promo-scan-page #reset-btn:hover {
    background: #f9fafb;
}
.promo-scan-page .main p {
    margin-bottom: 24px;
}
.promo-scan-page .result {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.promo-scan-page .result p {
    padding: 24px 24px 0;
    color: #1d2939;
    font-size: 16px;
    font-weight: 600;
}
.promo-scan-page table {
    max-width: 100% !important;
}
.promo-scan-page th,
.promo-scan-page td {
    text-align: left;
}
.promo-scan-page th.pdt_img {
    position: sticky;
    left: 0;
}
.promo-scan-page th.pdt_name {
    min-width: 350px;
}
.promo-scan-page tbody td:first-child {
    position: sticky;
    left: 0;
}
.promo-scan-page td div {
    display: flex;
    align-items: center;
}
.promo-scan-page td div div {
    padding: 4px 10px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f9fafb;
}
.promo-scan-page td div div span {
    font-weight: 600;
}
.promo-scan-page td a {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #344054;
    background: #fff;
    width: 34px;
    height: 34px;
    padding: 0;
    text-align: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.promo-scan-page td a:hover {
    background: #f9fafb;
}
.promo-scan-page .pagination {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
    margin: 16px 0;
    font-family: Arial, sans-serif;
}
.promo-scan-page .pagination a:hover {
    background: #f9fafb;
    color: #1d2939;
}
.promo-scan-page .pagination form {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding-right: 10px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    height: 32px;
}
.promo-scan-page .pagination input[type="number"] {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 15px;
}
.promo-scan-page .pagination span {
    font-weight: bold;
}
.promo-scan-page footer {
    font-size: 14px;
    text-align: center;
    color: #667085;
}
.promo-scan-page footer div {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
}
.promo-scan-page .img-hover {
    position: relative;
    display: inline-block;
}
.promo-scan-page .img-hover img {
    width: 90px;
    height: auto;
    cursor: zoom-in;
}
.promo-scan-page .img-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    display: none;
    z-index: 999999;
    padding: 10px;
}
.promo-scan-page .img-popup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.promo-scan-page .img-hover:hover .img-popup {
    display: block;
}
@media screen and (max-width: 768px) {
    .promo-scan-page .filters h4 {
        padding-bottom: 16px;
        border-bottom: 1px solid #e4e7ec;
    }
    .promo-scan-page .result {
        padding: 0 !important;
    }
    .promo-scan-page .result p {
        margin: 0 0 20px;
        padding: 20px 20px 0;
    }
}

#csvDropzone.csv-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 16px;
    padding: 28px 16px;
    border: 1px dashed #cfd4e1;
    border-radius: 8px;
    background: #f9fafb;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
#csvDropzone.csv-dropzone:hover {
    border-color: var(--blue);
    background: #f9fafb;
}
#csvDropzone.csv-dropzone.is-dragover {
    border-color: #1d4ed8;
    background: #eff6ff;
}
.csv-dropzone-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 22px;
}
.csv-dropzone-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}
.csv-dropzone-link {
    background: none;
    border: none;
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.csv-dropzone-filename {
    margin-top: 12px;
    font-size: 14px;
    color: #111827;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    color: #667085;
    font-size: 14px;
}
footer div {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    height: 50px;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }
    .app-topbar {
        left: 0;
        width: 100%;
        padding: 0 16px;
    }
    .sidenav {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    .sidenav.is-open {
        transform: translateX(0);
    }
    .sidenav-toggle {
        display: flex;
    }
    .sidenav-collapse {
        display: none;
    }
    .topbar-logo {
        height: 26px;
    }
    .dropdown {
        top: 51px;
    }
    .card-news {
        top: 51px;
        right: 0;
    }
    .main {
        margin: 0;
        padding: 24px 16px;
    }
    .card,
    .graphs,
    form.filters
    {
        padding: 16px;
    }
    .sales,
    .stocks
    {
        padding: 0;
    }
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 16px;
    }
    .stats-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .pie {
        padding: 20px!important;
    }
    .pie div {
        flex-direction: column;
        gap: 24px!important;
    }
    .pie h3 {
        margin-bottom: 0!important;
    }
    .chart-pane {
        width: 100%!important;
    }
    #countriesChart {
        width: 80% !important;
        height: auto !important;
        margin: 0 auto;
    }
    #countriesChartLegend {
        width: 100%!important;
    }
    form.filters {
        display: flex;
        flex-wrap: wrap;
        row-gap: 8px;
        column-gap: 8px;
        margin: 16px 0;
    }
    form.filters input,
    form.filters select 
    {
        width: 100%;
    }
    form.filters label {
        width: 48%;
        margin: 0;
    }
    form.filters label:has(input[name="transaction_id"]) {
        width: 100%;
    }
    form.filters input[name="transaction_id"], select[name="etat"] {
        width: 100%;
    }
    form.filters a {
        display: flex;
    }
    #submit {
        margin: 0;
    }
    form.filters button {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 36px;
        gap: 4px;
    }
    form.filters div:has(input[name="marge"]) {
        width: 100%;
    }
    .graphs {
        gap: 16px;
    }
    .graphs > div {
        flex-direction: column;
        gap: 12px;
    }
    .graphs h3 {
        align-self: flex-start;
    }
    #salesChart {
        height: 160px !important;
    }
    .sales > div:first-child {
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px!important;
    }
    
    /* Promo Scan */
    .result {
        padding: 16px!important;
    }
    input[name="prix_min"], input[name="prix_max"], input[name="reduc_min"], input[name="reduc_max"] {
      width: 47%;
    }
    input[name="marge"] {
      width: 35%;
    }
    .filters select[name="marchand"] {
        width: 294px!important;
    }
}