/* ============================================================
   THIALIE PHARMA CONNECT — Azia Theme (Bootstrap 5 overlay)
   Design system basé sur Azia Angular Admin Template
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* ---- Typicons Icon Font ---- */
@font-face {
  font-family: 'typicons';
  font-weight: 400;
  font-style: normal;
  src: url('../fonts/typicons.eot');
  src: url('../fonts/typicons.eot?#iefix') format('embedded-opentype'),
       url('../fonts/typicons.woff') format('woff'),
       url('../fonts/typicons.ttf') format('truetype');
}

/* ---- Ionicons Icon Font ---- */
@font-face {
  font-family: 'Ionicons';
  font-weight: normal;
  font-style: normal;
  src: url('../fonts/ionicons.woff2') format('woff2'),
       url('../fonts/ionicons.woff') format('woff'),
       url('../fonts/ionicons.ttf') format('truetype');
}

/* ============================================================
   CSS Variables — Azia Design Tokens
   ============================================================ */
:root {
  /* ---- Palette logo THIALIE PHARMA ---- */
  --az-blue-logo:        #00AEEF;   /* bleu vif (croix/P)          */
  --az-green-logo:       #3DAA72;   /* vert émeraude (arrondi P)   */
  --az-green-light:      #7DC542;   /* vert clair (pointe feuille) */

  /* Colors */
  --az-indigo:           #00AEEF;
  --az-blue:             #0091C8;
  --az-teal:             #3DAA72;
  --az-green:            #7DC542;
  --az-orange:           #fd7e14;
  --az-red:              #dc3545;
  --az-pink:             #f10075;

  --az-color-primary:    #00AEEF;   /* bleu logo — boutons, liens, actif */
  --az-color-secondary:  #3DAA72;   /* vert logo — badges secondaires    */
  --az-color-accent:     #7DC542;   /* vert clair — succès, KPI positifs */
  --az-color-headline:   #0d2c40;   /* bleu nuit harmonisé logo          */
  --az-color-text:       #3f5a70;

  /* Grays */
  --az-gray-100: #f3f7f9;
  --az-gray-200: #e0eaf0;
  --az-gray-300: #c8d8e4;
  --az-gray-400: #aabecf;
  --az-gray-500: #85a0b4;
  --az-gray-600: #637d94;
  --az-gray-700: #4a6278;
  --az-gray-800: #2e4459;
  --az-gray-900: #152433;

  /* Layout */
  --az-sidebar-width:    240px;
  --az-header-height:    64px;
  --az-footer-height:    40px;

  /* Bootstrap 5 overrides */
  --bs-primary:          #00AEEF;
  --bs-primary-rgb:      0, 174, 239;
  --bs-success:          #3DAA72;
  --bs-success-rgb:      61, 170, 114;
  --bs-info:             #00AEEF;
  --bs-info-rgb:         0, 174, 239;
  --bs-body-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-body-font-size:   0.875rem;
  --bs-body-color:       #0d2c40;
  --bs-body-bg:          #f3f7f9;
  --bs-border-radius:    4px;
  --bs-border-radius-sm: 3px;
  --bs-border-radius-lg: 6px;
  --bs-border-color:     #c8d8e4;
  --bs-card-border-radius: 4px;
}

/* ============================================================
   Global / Body
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  color: var(--az-color-headline);
  background-color: var(--az-gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--az-color-primary); text-decoration: none; }
a:hover { color: #0091C8; }

h1, h2, h3, h4, h5, h6 { color: var(--az-color-headline); font-weight: 500; }

/* ============================================================
   Typicons Helper Classes
   ============================================================ */
.typcn {
  font-family: 'typicons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Ionicons Helper Classes
   ============================================================ */
.ion {
  font-family: 'Ionicons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
.az-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 900;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ============================================================
   SIDEBAR
   ============================================================ */
.az-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--az-sidebar-width);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--az-gray-200);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.25,.46,.45,.94);
  overflow: hidden;
}

/* ---- Sidebar Header (Logo) ---- */
.az-sidebar-header {
  height: var(--az-header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(135deg, #0d2c40 0%, #0d3d4f 100%);
  border-bottom: none;
  flex-shrink: 0;
}
.az-sidebar-header .az-logo {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.az-sidebar-header .az-logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--az-color-primary);
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

/* ---- Sidebar Logged-In User ---- */
.az-sidebar-loggedin {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0,174,239,.12);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(0,174,239,.05);
}
.az-sidebar-loggedin .az-img-user {
  width: 36px;
  height: 36px;
  border-radius: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.az-sidebar-loggedin .az-img-user img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.az-sidebar-loggedin .az-img-user-initials {
  width: 36px;
  height: 36px;
  border-radius: 100%;
  background: var(--az-color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.az-sidebar-loggedin .sidebar-user-info h6 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--az-color-headline);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.az-sidebar-loggedin .sidebar-user-info span {
  font-size: 11px;
  color: var(--az-gray-500);
}

/* ---- Sidebar Body (Nav) ---- */
.az-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--az-gray-300) transparent;
}
.az-sidebar-body::-webkit-scrollbar { width: 4px; }
.az-sidebar-body::-webkit-scrollbar-thumb { background: var(--az-gray-300); border-radius: 4px; }

/* Nav Labels */
.az-sidebar-body .nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--az-gray-500);
  padding: 12px 20px 5px;
  margin-top: 4px;
}

/* Nav Items */
.az-sidebar-body .nav { flex-direction: column; padding: 0; margin: 0; list-style: none; }
.az-sidebar-body .nav-item { position: relative; }

.az-sidebar-body .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--az-gray-700);
  white-space: nowrap;
  transition: all .2s;
  border-radius: 0;
  position: relative;
}
.az-sidebar-body .nav-link i {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color .2s;
}
.az-sidebar-body .nav-link:hover {
  color: var(--az-color-primary);
  background: rgba(0,174,239,.07);
}
.az-sidebar-body .nav-link:hover i { color: var(--az-color-primary); }

/* Active state */
.az-sidebar-body .nav-item.active > .nav-link,
.az-sidebar-body .nav-item.active > .nav-link i {
  color: var(--az-color-primary);
}
.az-sidebar-body .nav-item.active > .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--az-color-primary);
  border-radius: 0 2px 2px 0;
}

/* Sub-menu toggle arrow (CSS chevron) */
.az-sidebar-body .nav-link.with-sub::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--az-gray-400);
  border-bottom: 2px solid var(--az-gray-400);
  transform: rotate(-45deg);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .25s, border-color .2s;
}
.az-sidebar-body .nav-item.show > .nav-link.with-sub::after {
  transform: rotate(45deg) translateY(-2px);
  border-color: var(--az-color-primary);
}

/* Sub-menu */
.az-sidebar-body .nav-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--az-gray-100);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.az-sidebar-body .nav-item.show > .nav-sub {
  max-height: 500px;
}
.az-sidebar-body .nav-sub-item { }
.az-sidebar-body .nav-sub-link {
  display: block;
  padding: 7px 20px 7px 50px;
  font-size: 12.5px;
  color: var(--az-gray-600);
  transition: color .2s;
  position: relative;
}
.az-sidebar-body .nav-sub-link::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--az-gray-400);
}
.az-sidebar-body .nav-sub-link:hover,
.az-sidebar-body .nav-sub-item.active > .nav-sub-link {
  color: var(--az-color-primary);
}
.az-sidebar-body .nav-sub-item.active > .nav-sub-link::before {
  background: var(--az-color-primary);
}

/* Desktop: sidebar visible */
@media (min-width: 992px) {
  .az-sidebar { transform: translateX(0); }
}

/* Mobile: show sidebar on body class */
body.az-sidebar-open .az-sidebar { transform: translateX(0); }
body.az-sidebar-open .az-sidebar-overlay { display: block; }

/* ============================================================
   MAIN WRAPPER (shifts right when sidebar visible)
   ============================================================ */
.az-main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s ease;
}
@media (min-width: 992px) {
  .az-main-wrapper { margin-left: var(--az-sidebar-width); }
}

/* ============================================================
   HEADER (Topbar)
   ============================================================ */
.az-header {
  height: var(--az-header-height);
  background: #fff;
  border-bottom: 1px solid var(--az-gray-200);
  box-shadow: 0 0 30px rgba(28,39,60,.06);
  display: flex;
  align-items: center;
  padding: 0 20px 0 16px;
  position: sticky;
  top: 0;
  z-index: 800;
  flex-shrink: 0;
}

.az-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

/* Hamburger toggle (mobile) */
.az-header-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 3px;
  transition: background .2s;
}
.az-header-menu-icon:hover { background: var(--az-gray-100); }
.az-header-menu-icon span,
.az-header-menu-icon span::before,
.az-header-menu-icon span::after {
  display: block;
  height: 2px;
  background: var(--az-gray-700);
  border-radius: 2px;
  transition: all .3s;
}
.az-header-menu-icon span { width: 20px; position: relative; }
.az-header-menu-icon span::before,
.az-header-menu-icon span::after {
  content: '';
  position: absolute;
  left: 0;
}
.az-header-menu-icon span::before { top: -6px; width: 14px; }
.az-header-menu-icon span::after  { bottom: -6px; width: 17px; }
@media (min-width: 992px) { .az-header-menu-icon { display: none; } }

/* Header page title */
.az-header-left .az-header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--az-color-headline);
  display: none;
}
@media (min-width: 576px) { .az-header-left .az-header-title { display: block; } }

.az-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Search */
.az-header-search {
  display: none;
  position: relative;
}
@media (min-width: 768px) { .az-header-search { display: flex; align-items: center; } }
.az-header-search .form-control {
  width: 220px;
  border-radius: 3px;
  font-size: 13px;
  border: 1px solid var(--az-gray-300);
  background: var(--az-gray-100);
  padding-left: 34px;
  height: 34px;
  transition: all .2s;
}
.az-header-search .form-control:focus {
  background: #fff;
  border-color: var(--az-color-primary);
  box-shadow: 0 0 0 3px rgba(0,174,239,.18);
  width: 260px;
}
.az-header-search i {
  position: absolute;
  left: 10px;
  color: var(--az-gray-500);
  font-size: 15px;
}

/* Icon buttons (notification, message) */
.az-header-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--az-gray-600);
  font-size: 18px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.az-header-icon-btn:hover {
  background: var(--az-gray-100);
  color: var(--az-color-primary);
}
.az-header-icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 16px;
  border-radius: 8px;
}

/* Profile dropdown */
.az-profile-menu { position: relative; }
.az-profile-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
.az-profile-menu-link:hover { background: var(--az-gray-100); }
.az-img-user {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.az-img-user img { width: 100%; height: 100%; object-fit: cover; }
.az-img-user-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--az-color-primary), var(--az-color-secondary));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.az-profile-menu-link .user-info { display: none; }
@media (min-width: 576px) {
  .az-profile-menu-link .user-info { display: block; }
  .az-profile-menu-link .user-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--az-color-headline);
    line-height: 1.2;
  }
  .az-profile-menu-link .user-info small {
    font-size: 11px;
    color: var(--az-gray-500);
  }
}

/* Notification dropdown panel */
.az-notification-panel {
  min-width: 300px;
  max-width: 320px;
  padding: 0;
  border: 0;
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
  border-radius: 5px;
}
.az-notification-header {
  padding: 12px 15px;
  border-bottom: 1px solid var(--az-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.az-notification-header h6 { margin: 0; font-size: 13px; font-weight: 600; }
.az-notification-list { max-height: 280px; overflow-y: auto; }
.az-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--az-gray-100);
  transition: background .15s;
  text-decoration: none;
}
.az-notification-item:hover { background: var(--az-gray-100); }
.az-notification-item.unread { background: #f8f7ff; }
.az-notification-item-body p {
  margin: 0;
  font-size: 12.5px;
  color: var(--az-color-headline);
  line-height: 1.4;
}
.az-notification-item-body small { font-size: 11px; color: var(--az-gray-500); }
.az-notification-footer {
  padding: 10px 15px;
  text-align: center;
  border-top: 1px solid var(--az-gray-200);
}
.az-notification-footer a { font-size: 12px; color: var(--az-color-primary); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.az-content {
  flex: 1;
  padding: 20px 20px;
}
@media (min-width: 992px) { .az-content { padding: 25px 30px; } }
@media (min-width: 1200px) { .az-content { padding: 25px 40px; } }

/* Page header */
.az-content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.az-content-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--az-color-headline);
  margin: 0 0 2px;
}
.az-content-header .breadcrumb {
  margin: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.az-footer {
  height: var(--az-footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-top: 1px solid var(--az-gray-200);
  background: #fff;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--az-gray-500);
}
@media (min-width: 992px) { .az-footer { padding: 0 30px; } }

/* ============================================================
   Bootstrap 5 Component Overrides — Azia Style
   ============================================================ */

/* --- Buttons --- */
.btn {
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  letter-spacing: .2px;
  transition: all .2s;
  border-width: 1px;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 9px 20px; font-size: 14px; }

.btn-primary {
  background: var(--az-color-primary);
  border-color: var(--az-color-primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: #0091C8;
  border-color: #0091C8;
  color: #fff;
}
.btn-primary:focus, .btn-primary:active {
  box-shadow: 0 0 0 3px rgba(0,174,239,.3);
}
.btn-secondary { background: #3DAA72; border-color: #3DAA72; color: #fff; }
.btn-secondary:hover { background: #2e9660; border-color: #2e9660; color: #fff; }
.btn-outline-primary { color: var(--az-color-primary); border-color: var(--az-color-primary); }
.btn-outline-primary:hover { background: var(--az-color-primary); border-color: var(--az-color-primary); color: #fff; }
.btn:focus { box-shadow: none; }
.btn-group .btn { border-radius: 3px !important; }

/* --- Cards --- */
.card {
  border: 1px solid var(--az-gray-200);
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(28,39,60,.04);
  background: #fff;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--az-gray-200);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--az-color-headline);
}
.card-body { padding: 18px; }
.card-footer {
  background: #fff;
  border-top: 1px solid var(--az-gray-200);
  padding: 12px 18px;
}

/* --- Tables --- */
.table {
  font-size: 13px;
  color: var(--az-color-headline);
  border-color: var(--az-gray-200);
}
.table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--az-gray-600);
  border-color: var(--az-gray-200);
  background: var(--az-gray-100);
  white-space: nowrap;
  padding: 10px 14px;
}
.table td { padding: 10px 14px; border-color: var(--az-gray-200); vertical-align: middle; }
.table-hover > tbody > tr:hover > td { background: #f8f7ff; }
.table-striped > tbody > tr:nth-of-type(odd) > td { background: var(--az-gray-100); }
thead.table-light th { background: var(--az-gray-100); color: var(--az-gray-600); }

/* --- Forms --- */
.form-control, .form-select {
  border: 1px solid var(--az-gray-300);
  border-radius: 3px;
  font-size: 13px;
  color: var(--az-color-headline);
  background: #fff;
  height: 38px;
  padding: 6px 12px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--az-color-primary);
  box-shadow: 0 0 0 3px rgba(0,174,239,.18);
  outline: none;
}
textarea.form-control { height: auto; min-height: 80px; }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--az-gray-700); margin-bottom: 5px; }
.form-text { font-size: 11px; color: var(--az-gray-500); }
.input-group .form-control:focus { z-index: 3; }
.input-group-text {
  border: 1px solid var(--az-gray-300);
  border-radius: 3px;
  font-size: 13px;
  background: var(--az-gray-100);
  color: var(--az-gray-600);
}

/* --- Badges --- */
.badge {
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge.bg-primary { background: var(--az-color-primary) !important; }
.badge.bg-success { background: #3bb001 !important; }
.badge.bg-warning { background: #f7c94b !important; color: #031b4e !important; }
.badge.bg-danger  { background: #dc3545 !important; }
.badge.bg-info    { background: #17a2b8 !important; }
.badge.bg-secondary { background: var(--az-gray-500) !important; }
.badge.bg-light   { background: var(--az-gray-200) !important; color: var(--az-gray-700) !important; }

/* --- Alerts --- */
.alert { border-radius: 3px; font-size: 13px; border-width: 0; border-left: 4px solid; }
.alert-success { background: #edfbe8; border-color: #3bb001; color: #1e5c00; }
.alert-danger  { background: #fde8ec; border-color: #dc3545; color: #842029; }
.alert-warning { background: #fffae8; border-color: #f7c94b; color: #6e4e00; }
.alert-info    { background: #e8f6fc; border-color: #17a2b8; color: #0a4f5e; }

/* --- Dropdowns --- */
.dropdown-menu {
  border: 1px solid var(--az-gray-200);
  border-radius: 5px;
  box-shadow: 0 6px 25px rgba(0,0,0,.1);
  padding: 6px 0;
  font-size: 13px;
}
.dropdown-item {
  padding: 7px 16px;
  color: var(--az-color-text);
  transition: background .15s;
  font-size: 13px;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(0,174,239,.07);
  color: var(--az-color-primary);
}
.dropdown-divider { border-color: var(--az-gray-200); }
.dropdown-header { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--az-gray-500); letter-spacing: .5px; }

/* --- Nav Tabs / Pills --- */
.nav-tabs { border-bottom: 1px solid var(--az-gray-200); }
.nav-tabs .nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--az-gray-600);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 16px;
}
.nav-tabs .nav-link:hover { color: var(--az-color-primary); border-bottom-color: var(--az-gray-300); }
.nav-tabs .nav-link.active { color: var(--az-color-primary); border-bottom-color: var(--az-color-primary); background: transparent; }
.nav-pills .nav-link { font-size: 13px; border-radius: 3px; color: var(--az-gray-600); }
.nav-pills .nav-link.active { background: var(--az-color-primary); }

/* --- Pagination --- */
.pagination { gap: 3px; }
.page-link {
  border-radius: 3px !important;
  font-size: 12px;
  padding: 5px 10px;
  color: var(--az-color-text);
  border-color: var(--az-gray-300);
}
.page-link:hover { color: var(--az-color-primary); border-color: var(--az-color-primary); background: rgba(0,174,239,.06); }
.page-item.active .page-link { background: var(--az-color-primary); border-color: var(--az-color-primary); }
.page-item.disabled .page-link { color: var(--az-gray-400); }

/* --- Modals --- */
.modal-content { border: 0; border-radius: 5px; box-shadow: 0 15px 40px rgba(0,0,0,.15); }
.modal-header { border-bottom: 1px solid var(--az-gray-200); padding: 16px 20px; }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-footer { border-top: 1px solid var(--az-gray-200); padding: 12px 20px; }
.modal-body { padding: 20px; }

/* --- Progress --- */
.progress { border-radius: 2px; height: 6px; background: var(--az-gray-200); }
.progress-bar { background: var(--az-color-primary); }
.progress-bar.bg-success { background: #3bb001 !important; }
.progress-bar.bg-warning { background: #f7c94b !important; }
.progress-bar.bg-danger  { background: #dc3545 !important; }
.progress-bar.bg-info    { background: #17a2b8 !important; }

/* --- List Group --- */
.list-group-item { font-size: 13px; border-color: var(--az-gray-200); padding: 10px 15px; }
.list-group-item.active { background: var(--az-color-primary); border-color: var(--az-color-primary); }

/* --- Breadcrumb --- */
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 12px; }
.breadcrumb-item a { color: var(--az-color-primary); }
.breadcrumb-item.active { color: var(--az-gray-600); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--az-gray-400); }

/* --- Spinners --- */
.spinner-border { border-color: var(--az-color-primary); border-right-color: transparent; }

/* ============================================================
   Table-card (existing app component wrapper)
   ============================================================ */
.table-card {
  background: #fff;
  border: 1px solid var(--az-gray-200);
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(28,39,60,.04);
}
.table-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--az-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card-header h5 { margin: 0; font-size: 13px; font-weight: 600; color: var(--az-color-headline); }
.table-card-body { padding: 18px; }
.table-card-body.p-0 { padding: 0; }

/* ============================================================
   Page Header (existing .page-header class)
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--az-gray-200);
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--az-color-headline);
}
.page-subtitle {
  font-size: 12.5px;
  color: var(--az-gray-500);
  margin: 0;
}

/* ============================================================
   KPI / Stat Cards
   ============================================================ */
.stat-card {
  background: #fff;
  border: 1px solid var(--az-gray-200);
  border-radius: 3px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover {
  box-shadow: 0 4px 18px rgba(28,39,60,.1);
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(0,174,239,.12);  color: var(--az-color-primary); }
.stat-icon.green  { background: rgba(59,176,1,.12);  color: #3bb001; }
.stat-icon.orange { background: rgba(253,126,20,.12); color: #fd7e14; }
.stat-icon.red    { background: rgba(220,53,69,.1);  color: #dc3545; }
.stat-icon.purple { background: rgba(108,117,125,.1); color: #6f42c1; }
.stat-icon.teal   { background: rgba(0,204,204,.1);  color: #00cccc; }
.stat-icon.indigo { background: rgba(0,174,239,.12);  color: var(--az-color-primary); }

.stat-body { flex: 1; min-width: 0; }
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--az-color-headline);
  line-height: 1;
  margin-bottom: 3px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--az-gray-500);
}
.stat-trend {
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  color: var(--az-gray-500);
}
.stat-trend.up   { color: #3bb001; }
.stat-trend.down { color: #dc3545; }

/* compat anciens stat-card-* */
.stat-card-value { font-size: 22px; font-weight: 700; color: var(--az-color-headline); }
.stat-card-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--az-gray-500); }
.stat-card-trend { font-size: 12px; margin-top: 4px; color: var(--az-gray-500); }
.stat-card-icon  { font-size: 32px; opacity: .12; color: var(--az-color-primary); }

/* ============================================================
   Charts
   ============================================================ */
.chart-wrapper { position: relative; }

/* ============================================================
   Utilities (Azia-specific)
   ============================================================ */
.tx-primary  { color: var(--az-color-primary) !important; }
.tx-success  { color: #3bb001 !important; }
.tx-warning  { color: #f7c94b !important; }
.tx-danger   { color: #dc3545 !important; }
.tx-info     { color: #17a2b8 !important; }
.tx-muted    { color: var(--az-gray-500) !important; }
.tx-bold     { font-weight: 700 !important; }
.tx-semibold { font-weight: 600 !important; }
.tx-medium   { font-weight: 500 !important; }
.tx-10 { font-size: 10px !important; }
.tx-11 { font-size: 11px !important; }
.tx-12 { font-size: 12px !important; }
.tx-13 { font-size: 13px !important; }
.tx-14 { font-size: 14px !important; }
.tx-16 { font-size: 16px !important; }
.tx-18 { font-size: 18px !important; }
.tx-20 { font-size: 20px !important; }
.tx-24 { font-size: 24px !important; }
.tx-32 { font-size: 32px !important; }

.bg-gray-100 { background: var(--az-gray-100) !important; }
.bg-primary-light { background: rgba(0,174,239,.12) !important; }

.rounded-az { border-radius: 3px !important; }

/* ============================================================
   AUTH PAGES (Login, Forgot Password)
   ============================================================ */
.az-signin-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--az-gray-100);
  padding: 20px;
}
.az-signin-box {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 5px 30px rgba(28,39,60,.08);
  width: 100%;
  max-width: 420px;
  padding: 40px;
}
.az-signin-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}
.az-signin-logo-mark {
  width: 56px;
  height: 56px;
  background: var(--az-color-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(0,174,239,.35);
}
.az-signin-logo-mark svg { width: 30px; height: 30px; }
.az-signin-logo-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--az-color-headline);
  letter-spacing: -0.5px;
}
.az-signin-logo-subtitle {
  font-size: 12px;
  color: var(--az-gray-500);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.az-signin-box h5 {
  font-size: 16px;
  font-weight: 600;
  color: var(--az-color-headline);
  margin-bottom: 5px;
}
.az-signin-box p.lead { font-size: 13px; color: var(--az-gray-500); margin-bottom: 22px; }
.az-signin-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--az-gray-500); }

/* ============================================================
   Scrollbar (global)
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--az-gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--az-gray-400); }

/* ============================================================
   Upload Components
   ============================================================ */

/* --- Circular avatar upload --- */
.az-upload-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.az-upload-avatar-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  background: var(--az-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  border: 3px solid var(--az-gray-200);
  transition: border-color .2s;
  flex-shrink: 0;
}
.az-upload-avatar-preview:hover { border-color: var(--az-color-primary); }
.az-upload-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.az-upload-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transition: opacity .2s;
  color: #fff;
  font-size: 11px;
}
.az-upload-avatar-preview:hover .az-upload-avatar-overlay { opacity: 1; }
.az-upload-avatar-hint { font-size: 11.5px; color: var(--az-gray-500); text-align: center; }

/* --- Rectangular image upload box --- */
.az-upload-image {
  border: 2px dashed var(--az-gray-300);
  border-radius: var(--az-border-radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--az-gray-100);
  position: relative;
}
.az-upload-image:hover {
  border-color: var(--az-color-primary);
  background: rgba(0,174,239,.05);
}
.az-upload-image.has-image {
  padding: 10px;
  border-style: solid;
  border-color: var(--az-gray-200);
  background: #fff;
}
.az-upload-image.has-image:hover { border-color: var(--az-color-primary); }
.az-upload-image img {
  max-height: 130px;
  max-width: 100%;
  border-radius: 3px;
  display: block;
  margin: 0 auto;
}
.az-upload-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--az-gray-400);
  pointer-events: none;
}
.az-upload-image-placeholder i { font-size: 30px; }
.az-upload-image-placeholder p { margin: 0; font-size: 13px; color: var(--az-gray-600); }
.az-upload-image-placeholder small { font-size: 11px; }
.az-upload-image-change {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--az-gray-500);
}

/* --- Thumbnails in tables --- */
.az-thumb-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 3px;
  border: 1px solid var(--az-gray-200);
  background: #fff;
  vertical-align: middle;
}
.az-thumb-product {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--az-gray-200);
  vertical-align: middle;
}
.az-thumb-placeholder {
  width: 32px;
  height: 32px;
  background: var(--az-gray-100);
  border: 1px solid var(--az-gray-200);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--az-gray-400);
  font-size: 14px;
  vertical-align: middle;
}

/* ============================================================
   Responsive adjustments
   ============================================================ */
@media (max-width: 575.98px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header .btn { width: 100%; }
  .az-content { padding: 16px; }
}

/* ============================================================
   Bulk selection & actions bar
   ============================================================ */
.bulk-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #1a6fc4;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 18px rgba(26,111,196,.40);
  animation: bulkSlideIn .18s ease;
}
@keyframes bulkSlideIn {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}
.bulk-bar.d-none { display: none !important; }
.bulk-bar .bulk-count { font-weight: 600; flex: 1; font-size: .93rem; }
.bulk-bar .btn-bulk { font-size: .8rem; padding: 4px 12px; border-radius: 20px; }
.bulk-bar .btn-bulk-danger  { background: #fff; color: #dc3545; border: none; font-weight: 600; }
.bulk-bar .btn-bulk-danger:hover  { background: #ffe0e3; }
.bulk-bar .btn-bulk-success { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.bulk-bar .btn-bulk-success:hover { background: rgba(255,255,255,.28); }
.bulk-bar .btn-bulk-warning { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.bulk-bar .btn-bulk-warning:hover { background: rgba(255,255,255,.28); }
.bulk-bar .btn-bulk-close   { background: transparent; color: rgba(255,255,255,.7); border: none; font-size: 1rem; margin-left: auto; }
.bulk-bar .btn-bulk-close:hover { color: #fff; }

/* Checkbox column */
.th-cb, .td-cb { width: 40px; padding-left: 12px !important; }
.td-cb input[type=checkbox],
.th-cb input[type=checkbox] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: #1a6fc4;
  vertical-align: middle;
}
tr.az-row-selected { background: rgba(26,111,196,.07) !important; }

/* ============================================================
   Tom Select — intégration Azia / Bootstrap 5
   ============================================================ */

/* Wrapper */
.ts-wrapper {
  --ts-pr-clear-button: 0;
}
.ts-wrapper.form-select,
.ts-wrapper.form-select-sm,
.ts-wrapper.form-control {
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

/* Contrôle principal */
.ts-control {
  border: 1px solid var(--az-gray-300) !important;
  border-radius: var(--az-border-radius) !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: .92rem;
  color: var(--az-gray-800);
  min-height: 38px;
  padding: 6px 10px !important;
  transition: border-color .15s, box-shadow .15s;
}
.ts-control input::placeholder {
  color: var(--az-gray-400);
}

/* Focus */
.ts-wrapper.focus .ts-control {
  border-color: #1a6fc4 !important;
  box-shadow: 0 0 0 3px rgba(26, 111, 196, .15) !important;
  outline: none !important;
}

/* Petits selects (form-select-sm) */
.ts-wrapper.form-select-sm .ts-control {
  min-height: 31px !important;
  padding: 3px 8px !important;
  font-size: .82rem !important;
}

/* Dropdown panel */
.ts-dropdown {
  border: 1px solid var(--az-gray-300) !important;
  border-radius: var(--az-border-radius) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.12) !important;
  font-size: .9rem;
  z-index: 9999;
}

/* Champ de recherche dans le dropdown */
.ts-dropdown .ts-dropdown-content { padding: 2px 0; }
.ts-dropdown input.ts-input,
.ts-dropdown .ts-dropdown-header input {
  border: none;
  border-bottom: 1px solid var(--az-gray-200);
  border-radius: 0 !important;
  padding: 7px 12px;
  font-size: .88rem;
  background: var(--az-gray-100);
  width: 100%;
}

/* Options */
.ts-dropdown .option {
  padding: 7px 14px;
  cursor: pointer;
  color: var(--az-gray-800);
  transition: background .1s;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: rgba(26, 111, 196, .08) !important;
  color: #1a6fc4 !important;
}
.ts-dropdown .option.selected {
  background: #1a6fc4 !important;
  color: #fff !important;
  font-weight: 600;
}
.ts-dropdown .option.selected.active {
  background: #155da0 !important;
}

/* Highlight de recherche */
.ts-dropdown .option .highlight {
  background: rgba(26, 111, 196, .18);
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 700;
}

/* Aucun résultat */
.ts-dropdown .no-results {
  padding: 10px 14px;
  color: var(--az-gray-400);
  font-style: italic;
  font-size: .85rem;
}

/* Multi-select : tags */
.ts-control .item {
  background: rgba(26, 111, 196, .12) !important;
  color: #1a6fc4 !important;
  border: 1px solid rgba(26, 111, 196, .3) !important;
  border-radius: 20px !important;
  padding: 1px 10px !important;
  font-size: .8rem;
  font-weight: 600;
}
.ts-control .item .remove {
  color: #1a6fc4 !important;
  border-left: 1px solid rgba(26, 111, 196, .25) !important;
}

/* Caret / flèche */
.ts-wrapper:not(.rtl) .ts-control.has-items ~ .ts-dropdown,
.ts-wrapper .ts-control::after {
  border-top-color: var(--az-gray-400);
}

/* Icône de recherche intégrée */
.ts-dropdown:before {
  font-family: "bootstrap-icons";
  content: "\F52A"; /* bi-search */
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--az-gray-400);
  font-size: .85rem;
  pointer-events: none;
}

/* Désactiver l'effet sur les petits selects de filtre (form-select-sm) */
.ts-wrapper.form-select-sm .ts-control {
  background: #fff !important;
}

