@import url('./color.css');
@import url('./light.css');
@import url('./dark.css');
@import url('./alerts.css');

@font-face {
  font-family: 'Righteous';
  src: url('../font/Righteous-Regular.ttf?v=1') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Variables structurelles */
:root {
  --font: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --bs-body-font-family: var(--font);
  /* Hauteur du header global (barre du haut) */
  --header-height: 58px;
  /* Largeur sidebar */
  --sidebar-expanded-width: 240px;
  --sidebar-width: var(--sidebar-expanded-width);
  --sidebar-collapsed-width: 72px;
  /* Border radius unifié */
  --bs-border-radius: 8px;
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: 8px;
  --bs-btn-border-radius: 8px;
  --bs-dropdown-border-radius: 8px;
  --bs-card-border-radius: 8px;
  --bs-badge-border-radius: 8px;
  --bs-nav-pills-border-radius: 8px;
  /* Font size unifié */
  --bs-font-size: 14px;
  --font-size-primary: 14px;
  --font-size-secondary: 12px;
  /* Accent couleur (bouton) */
  --accent-purple: #0d6efd;
}

/* Fond + typo */
body {
  font-family: var(--font);
  font-size: var(--bs-font-size);
  --bs-body-font-size: var(--bs-font-size);
}

/* Rayon commun du panel. Les avatars, pastilles et anneaux conservent leur forme ronde. */
.btn,.card,.modal-content,.dropdown-menu,.form-control,.form-select,.input-group-text,
.alert,.toast,.accordion-item,.list-group,.table-responsive,.sidebar-link,
.server-tabs,.server-tab,.instance-card,.metric-card,.info-card,.kv-table,
.stats-card,.stats-chart-frame,.stats-period-trigger,.stats-period-menu {
  border-radius: 8px !important;
}
:where([class$="-card"],[class*="-card "]) { border-radius:8px !important; }

/* Taille de police homogène pour composants courants */
.navbar .nav-link,
.dropdown-item,
.form-control,
.form-check-label,
.navbar-brand,
.nav .nav-link,
table {
  font-size: var(--bs-font-size) !important;
}

/* Taille uniforme des boutons */
.btn {
  font-size: var(--font-size-primary) !important;
  padding: .45rem .9rem;
  line-height: 1.5;
}
.btn-sm {
  font-size: var(--font-size-primary) !important;
  padding: .3rem .7rem;
}
.btn-lg {
  font-size: var(--font-size-primary) !important;
  padding: .6rem 1.25rem;
}

/* Échelle typographique globale : contenu principal 14 px. */
.sidebar-link,.dropdown-item,.form-control,.form-select,.form-check-label,
.nav-link,.metric-value,.kv-val,.field-value,.os-name,.info-card-header,
.os-section-title,.os-tile span,.modal-title,.modal-body,.alert,.toast-body,td,th {
  font-size: var(--font-size-primary) !important;
}

/* Libellés, aides et métadonnées : 12 px. */
small,.small,.text-muted,.form-text,.invalid-feedback,.valid-feedback,
.field-label,.metric-title,.metric-sub,.kv-key,.breadcrumb,.breadcrumb-item,
.chip,.badge,.sidebar-badge,.sidebar-section-label,.stats-card-head > div > span,.stats-unit,
.osc-desc,.page-breadcrumb,footer {
  font-size: var(--font-size-secondary) !important;
}

/* Espacement uniforme entre le titre, le séparateur et le fil d’Ariane. */
@media (min-width: 577px) {
  .page-header,
  .page-header-left:has(> .page-vertical-sep) {
    gap: .375rem !important;
  }
  .page-vertical-sep {
    margin-inline-start: 2px !important;
    margin-inline-end: 6px !important;
  }
}

/* neutralise toute “barre” visuelle du header */
.navbar.sticky-top { background: transparent !important; box-shadow: none !important; }
.backdrop-blur { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-radius: 0 !important; }

.navbar-brand img { height: 34px; }

/* soulignement: structure (couleurs définies dans les fichiers thèmes) */
.nav-link.active {
  border: 0 !important;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .28rem;
}
/* retire toute règle ::after précédente */
.navbar .nav-link.active::after { content: none !important; }

/* position du lien (pour alignement du soulignement) */
.navbar .nav-link { position: static; }

.navbar-toggler {border: 0px;}
.navbar-toggler:focus { box-shadow: none; }

.avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--panel-nav-border);
  color: var(--bs-body-color); font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .15s ease;
  cursor: default;
}
.avatar-circle:hover {
  color: var(--bs-body-color);
}
/* badge vérifié */
.avatar-verify {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  animation: verify-pulse 2.8s ease-in-out infinite;
}
@keyframes verify-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13,110,253,.55); }
  50%       { box-shadow: 0 0 0 4px rgba(13,110,253,0); }
}

/* ============================================================
   LAYOUT : SIDEBAR pleine hauteur (sans header global séparé)
   ============================================================ */

/* --- Barre mobile (visible uniquement sous lg) --- */
.panel-mobile-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 400;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--panel-nav-border);
  background: var(--panel-nav-bg);
}
.mobile-topbar-actions { flex-shrink: 0; }
@media (max-width: 400px) {
  .topbar-balance span { display: none; }
  .topbar-balance { padding: 3px 7px; }
}

/* Burger (mobile) */
.panel-burger {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--bs-body-color); font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center;
}

/* --- Wrapper global --- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.panel-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 0;
}

/* --- Contenu principal (avec espace pour la topbar) --- */
.panel-content {
  margin-left: var(--sidebar-width);
  padding: 28px 28px 40px;
  padding-top: calc(var(--header-height) + 28px);
  flex: 1;
  transition: margin-left .2s ease;
}

/* --- Footer panel --- */
.panel-footer {
  margin-left: var(--sidebar-width);
  transition: margin-left .2s ease;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--panel-nav-border);
}
.panel-footer-inner {
  padding: 60px 40px 0;
}
.panel-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 50px;
}
.panel-footer-brand-col { display: flex; flex-direction: column; }
.panel-footer-brand-link { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel-footer-logo { display: block; height: 36px; width: auto; max-width: 180px; object-fit: contain; }
.panel-footer-brand-name { font-size: .95rem; font-weight: 700; color: var(--bs-body-color); }
.panel-footer-desc {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}
.panel-footer-socials { display: flex; gap: 8px; }
.panel-footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--panel-nav-border);
  border-radius: 6px;
  color: var(--bs-secondary-color);
  font-size: 1rem;
  text-decoration: none;
  transition: color .14s, border-color .14s, background .14s;
}
.panel-footer-socials a:hover {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  background: rgba(13,110,253,.08);
}
.panel-footer-col h4 {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--bs-body-color);
  margin-bottom: 18px;
}
.panel-footer-col ul { list-style: none; padding: 0; margin: 0; }
.panel-footer-col ul li { margin-bottom: 10px; }
.panel-footer-col ul li a {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
  transition: color .14s;
}
.panel-footer-col ul li a:hover { color: var(--bs-primary); }
.panel-footer-bottom {
  border-top: 1px solid var(--panel-nav-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.panel-footer-bottom p { font-size: 1rem; color: var(--bs-secondary-color); margin: 0; }
.panel-footer-bottom p a { color: var(--bs-body-color); }
.panel-footer-payments { display: flex; gap: 8px; }

@media (max-width: 991.98px) {
  .panel-footer { margin-left: 0; }
  .panel-footer-inner { padding: 32px 16px 0; }
  .panel-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .panel-footer-brand-col { grid-column: 1 / -1; }
}

/* Footer minimal (orders, payments) : masquer la grille, garder le copyright */
body[data-layout="minimal"] .panel-footer {
  margin-left: 0;
  margin-top: auto;
}
body[data-layout="minimal"] .panel-footer-inner {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
}
body[data-layout="minimal"] .panel-footer-grid {
  display: none;
}
@media (max-width: 1399.98px) {
  body[data-layout="minimal"] .panel-footer-inner { max-width: 1140px; }
}
@media (max-width: 1199.98px) {
  body[data-layout="minimal"] .panel-footer-inner { max-width: 960px; }
}
@media (max-width: 991.98px) {
  body[data-layout="minimal"] .panel-footer-inner { max-width: 720px; }
}
@media (max-width: 767.98px) {
  body[data-layout="minimal"] .panel-footer-inner { max-width: 540px; }
}
@media (max-width: 575.98px) {
  body[data-layout="minimal"] .panel-footer-inner { max-width: 100%; padding: 0 8px; }
}

/* --- Sidebar (pleine hauteur, depuis top:0) --- */
.panel-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100dvh;
  flex-direction: column;
  border-right: 1px solid var(--panel-nav-border);
  background: var(--panel-nav-bg);
  z-index: 400;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-nav-border) transparent;
  transition: width .2s ease;
}
.panel-sidebar::-webkit-scrollbar { width: 4px; }
.panel-sidebar::-webkit-scrollbar-track { background: transparent; }
.panel-sidebar::-webkit-scrollbar-thumb { background: var(--panel-nav-border); border-radius: 4px; }
.panel-sidebar::-webkit-scrollbar-thumb:hover { background: #484848; }

/* --- Logo en haut de la sidebar --- */
.sidebar-brand {
  height: var(--header-height);
  padding: 0 16px;
  flex-shrink: 0;
  border-bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-brand-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.sidebar-brand-logo {
  display: block;
  width: 122px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  transition: opacity .12s ease;
}
.sidebar-logo-animation {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--bs-body-color);
  opacity: 0;
  pointer-events: none;
}
.sidebar-logo-symbol {
  position: relative;
  width: 19px;
  height: 32px;
  flex: 0 0 19px;
}
.sidebar-logo-bar {
  position: absolute;
  display: block;
  width: 5px;
  height: 14px;
  border-radius: 1.5px;
  background: currentColor;
  opacity: 0;
}
.sidebar-logo-bar.bar-left { left: 0; top: 9px; }
.sidebar-logo-bar.bar-top { left: 7px; top: 0; }
.sidebar-logo-bar.bar-bottom { left: 7px; bottom: 0; }
.sidebar-logo-bar.bar-right { right: 0; top: 9px; }
.sidebar-logo-word {
  display: flex;
  overflow: hidden;
  font-family: 'Righteous', sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}
.sidebar-logo-text {
  position: relative;
  display: inline-flex;
  padding-bottom: 9px;
}
.sidebar-logo-panel {
  position: absolute;
  left: 1px;
  bottom: 3px;
  font-family: 'Righteous', sans-serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
}
.sidebar-logo-word > span { opacity: 0; transform: translateY(10px); }
.sidebar-brand-link:hover .sidebar-brand-logo { opacity: 0; }
.sidebar-brand-link:hover .sidebar-logo-animation { opacity: 1; }
.sidebar-brand-link:hover .sidebar-logo-bar {
  animation-duration: .48s;
  animation-timing-function: cubic-bezier(.2,.85,.3,1.15);
  animation-fill-mode: forwards;
}
.sidebar-brand-link:hover .sidebar-logo-bar.bar-left { transform: translateX(-30px); animation-name: sidebar-logo-from-left; animation-delay: .08s; }
.sidebar-brand-link:hover .sidebar-logo-bar.bar-right { transform: translateX(30px); animation-name: sidebar-logo-from-right; animation-delay: .12s; }
.sidebar-brand-link:hover .sidebar-logo-bar.bar-top { transform: translateY(-30px); animation-name: sidebar-logo-from-top; }
.sidebar-brand-link:hover .sidebar-logo-bar.bar-bottom { transform: translateY(30px); animation-name: sidebar-logo-from-bottom; animation-delay: .04s; }
.sidebar-brand-link:hover .sidebar-logo-word > span {
  animation: sidebar-logo-letter-in .28s cubic-bezier(.2,.8,.3,1) forwards;
  animation-delay: calc(.54s + var(--sidebar-letter-index) * .075s);
}
.sidebar-brand-link:hover .sidebar-logo-panel {
  animation: sidebar-logo-panel-in .25s ease forwards;
  animation-delay: 1.1s;
}
@keyframes sidebar-logo-from-left { to { opacity: 1; transform: translateX(0); } }
@keyframes sidebar-logo-from-right { to { opacity: 1; transform: translateX(0); } }
@keyframes sidebar-logo-from-top { to { opacity: 1; transform: translateY(0); } }
@keyframes sidebar-logo-from-bottom { to { opacity: 1; transform: translateY(0); } }
@keyframes sidebar-logo-letter-in { to { opacity: 1; transform: translateY(0); } }
@keyframes sidebar-logo-panel-in { to { opacity: 1; transform: translateY(0); } }
.sidebar-brand-icon-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.sidebar-brand-icon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.sidebar-brand-name {
  font-size: 1rem;
  font-weight: 400;
  color: var(--bs-body-color);
  letter-spacing: -.01em;
  white-space: nowrap;
}

.hx-logo-badge {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary);
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.6;
}
.sidebar-collapse-btn {
  position: static;
  width: 30px;
  height: 30px;
  padding: 0;
  flex: 0 0 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 17px;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.sidebar-collapse-btn:hover {
  color: #ddd;
  background: #1a1a1a;
}
.sidebar-collapse-btn:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), .35);
  outline-offset: 2px;
}
.sidebar-collapse-site-icon {
  display: none;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* --- Topbar desktop (à droite de la sidebar) --- */
.panel-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--panel-nav-border);
  background: var(--panel-nav-bg);
  transition: left .2s ease;
}

@media (min-width: 992px) {
  body.sidebar-collapsed { --sidebar-width: var(--sidebar-collapsed-width); }
  body.sidebar-collapsed .sidebar-brand { padding: 0; justify-content: center; }
  body.sidebar-collapsed .sidebar-brand-link { display: none; }
  body.sidebar-collapsed .sidebar-collapse-menu-icon { display: none; }
  body.sidebar-collapsed .sidebar-collapse-site-icon { display: block; }
  body.sidebar-collapsed .sidebar-nav { padding-inline: 10px; }
  body.sidebar-collapsed .sidebar-section-label { height: 14px; padding: 0; margin: 9px 0 5px; font-size: 0 !important; }
  body.sidebar-collapsed .sidebar-section-label::after { content: ''; display: block; width: 20px; height: 1px; margin: 0 auto; background: var(--panel-nav-border); }
  body.sidebar-collapsed .sidebar-section-label-mt { margin-top: 14px; }
  body.sidebar-collapsed .sidebar-link { position: relative; justify-content: center; gap: 0; padding-inline: 0; min-height: 38px; }
  body.sidebar-collapsed .sidebar-link > span:not(.sidebar-badge),
  body.sidebar-collapsed .sidebar-theme-toggle .form-switch { display: none; }
  body.sidebar-collapsed .sidebar-link i { font-size: 19px; }
  body.sidebar-collapsed .sidebar-badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding-inline: 4px; font-size: 10px !important; }
  body.sidebar-collapsed .sidebar-bottom { padding-inline: 10px; }

  /* Ouverture temporaire au survol lorsque la sidebar est pliée. */
  body.sidebar-collapsed .panel-sidebar:hover {
    width: var(--sidebar-expanded-width);
    box-shadow: 10px 0 28px rgba(15, 23, 42, .12);
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-brand {
    padding: 0 16px;
    justify-content: flex-start;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-brand-link {
    display: flex;
    animation: sidebar-hover-content-in .12s ease .1s both;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-collapse-menu-icon { display: inline-block; }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-collapse-site-icon { display: none; }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-nav {
    padding-inline: 10px;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-section-label {
    height: auto;
    padding: 12px 8px 4px;
    margin: 0;
    font-size: var(--font-size-secondary) !important;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-section-label::after {
    display: none;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-section-label-mt {
    padding-top: 18px;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-link {
    justify-content: flex-start;
    gap: 10px;
    padding-inline: 10px;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-link > span:not(.sidebar-badge),
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-theme-toggle .form-switch {
    display: initial;
    white-space: nowrap;
    animation: sidebar-hover-content-in .12s ease .1s both;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-theme-toggle .form-switch {
    display: block;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-link i {
    font-size: 1.05rem;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-badge {
    position: static;
    min-width: 18px;
    height: 18px;
    padding-inline: 5px;
    margin-left: auto !important;
    font-size: 10px !important;
    animation: sidebar-hover-content-in .12s ease .1s both;
  }
  body.sidebar-collapsed .panel-sidebar:hover .sidebar-bottom {
    padding-inline: 10px;
  }
  @keyframes sidebar-hover-content-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
.panel-topbar-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel-topbar-right { display: flex; align-items: center; gap: 8px; }

.panel-topbar-breadcrumb { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: .86rem; }
.panel-breadcrumb-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
  transition: color .14s;
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px;
}
.panel-breadcrumb-link:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.panel-breadcrumb-sep { color: var(--bs-secondary-color); opacity: .5; font-size: .75rem; }
.panel-breadcrumb-current { color: var(--bs-body-color); font-weight: 650; white-space: nowrap; text-transform: uppercase; }

.panel-topbar-btn {
  width: 32px; height: 32px;
  background: var(--panel-nav-bg);
  border: 1px solid var(--panel-nav-border);
  border-radius: 50%;
  padding: 0; cursor: pointer;
  color: var(--bs-secondary-color); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: color .14s, background .14s;
}
.panel-topbar-btn:hover { color: var(--bs-body-color); background: var(--bs-secondary-bg); }
.panel-topbar-btn[aria-expanded="true"] {
  color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 10%, var(--panel-nav-bg));
  border-color: color-mix(in srgb, var(--bs-primary) 35%, var(--panel-nav-border));
}

.notification-dropdown { position: relative; }
.notification-menu {
  width: min(330px, calc(100vw - 24px));
  margin-top: 10px !important;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--panel-nav-border);
  border-radius: 12px;
  background: var(--panel-nav-bg);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .14);
}
.notification-menu-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-nav-border);
  color: var(--bs-body-color);
  font-size: .86rem;
  font-weight: 700;
}
.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 28px 20px 30px;
  text-align: center;
}
.notification-empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
  font-size: 1.2rem;
}
.notification-empty strong {
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 500;
}
[data-bs-theme="dark"] .notification-menu { box-shadow: 0 16px 42px rgba(0, 0, 0, .36); }

.topbar-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--bs-body-color);
  text-decoration: none;
  background: var(--panel-nav-bg);
  border: 1px solid var(--panel-nav-border);
  border-radius: 20px;
  height: 32px;
  padding: 0 10px;
  transition: background .14s, color .14s;
  white-space: nowrap;
}
.topbar-balance i { font-size: .95rem; color: var(--bs-secondary-color); }
.topbar-balance:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

.panel-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  height: 32px;
  border-radius: 6px;
  background: var(--panel-nav-bg);
  transition: background .14s;
}

.panel-topbar-username {
  font-size: .85rem;
  font-weight: 500;
  color: var(--bs-body-color);
  white-space: nowrap;
}
.panel-topbar-chevron { font-size: .72rem; color: var(--bs-secondary-color); }

/* Dropdown topbar : au-dessus de tout */
.panel-topbar .dropdown-menu {
  z-index: 500;
}

/* Bloc utilisateur (sous le logo) */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--panel-nav-border);
}
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-user-name {
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bs-body-color);
}
.sidebar-user-email {
  font-size: .75rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avatar sidebar */
.avatar-lg {
  width: 36px !important;
  height: 36px !important;
  font-size: .9rem !important;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  gap: 2px;
}

/* Séparateur entre sections */
.sidebar-sep {
  height: 1px;
  background: var(--bs-border-color);
  margin: 8px 8px;
}

.sidebar-section-label {
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--bs-secondary-color);
  padding: 12px 8px 4px;
  opacity: .7;
}
.sidebar-section-label-mt { padding-top: 18px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--bs-secondary-color);
  font-size: .875rem;
  font-weight: 500;
  transition: background-color .14s, color .14s;
}
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.sidebar-link.active { background: var(--bs-primary); color: #fff !important; }
.sidebar-link.active:hover { background: var(--bs-primary); }
.sidebar-link-disabled,
.sidebar-link-disabled:hover {
  background: transparent;
  color: var(--bs-secondary-color);
  cursor: not-allowed;
  opacity: .45;
}

/* Badge count services actifs */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  background: var(--bs-primary);
  color: #fff;
  flex-shrink: 0;
}
.sidebar-link.active .sidebar-badge {
  background: rgba(255,255,255,.28);
  color: #fff;
}
.sidebar-badge-warning {
  background: var(--warning);
  color: #000;
}
.sidebar-link.active .sidebar-badge-warning {
  background: rgba(255,255,255,.28);
  color: #fff;
}

/* Bas de sidebar : thème + déconnexion */
.sidebar-bottom {
  padding: 8px 10px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-theme-toggle { cursor: default; }
.sidebar-theme-toggle:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); cursor: pointer; }
.sidebar-theme-toggle .form-check-input { width: 34px; height: 18px; cursor: pointer; border: 0; }
.sidebar-theme-toggle .form-check-input:focus { box-shadow: none; }
.sidebar-logout { color: var(--danger, #dc3545) !important; }
.sidebar-logout:hover { background: var(--danger-light, rgba(220,53,69,.1)) !important; color: var(--danger, #dc3545) !important; }

/* --- Mobile : pas de sidebar fixe, espace pour la barre mobile --- */
@media (max-width: 991.98px) {
  .panel-content {
    margin-left: 0;
    padding: 16px 16px 32px;
    padding-top: calc(var(--header-height) + 16px);
  }
  .panel-topbar { display: none !important; }
}
/* radius global */
.dropdown-menu { border-radius: 5px; overflow: hidden; }
.btn { border-radius: 5px; }
.form-check-input { border-radius: 5px; }
.card, .list-group, .modal-content { border-radius: 5px; }



/* Respect strict de la hauteur du header */
#header { height: var(--header-height); }
#header .navbar {
  height: 100%;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#header .container { height: 100%; }

.fs-18 { font-size: 18px !important; }

/* Menu profil (structure non-colorée) */
.profile-menu {
  border-radius: 8px;
  min-width: 280px;
  box-shadow: var(--shadow, 0 2px 12px rgba(0,0,0,.4));
  font-size: var(--bs-font-size);
  --menu-pad-x: 14px; --menu-item-py: 12px; --menu-icon-size: 18px; --menu-gap: 12px;
}
.profile-menu .menu-head {
  padding: 12px 14px !important;
  display: flex; align-items: center; gap: 12px;
}
.profile-menu .menu-head .avatar-circle { width: 36px; height: 36px; font-size: var(--bs-font-size); }
.profile-menu small,
.profile-menu .small,
.profile-menu a,
.profile-menu .dropdown-item,
.profile-menu .menu-head {
  font-size: var(--bs-font-size) !important;
}
.profile-menu .dropdown-divider { margin: 0 !important; }

/* Items avec icônes (grid: icône | label) */
.profile-menu .dropdown-item {
  display: grid;
  grid-template-columns: var(--menu-icon-size) 1fr;
  align-items: center;
  gap: var(--menu-gap);
  padding: var(--menu-item-py) var(--menu-pad-x);
  background: transparent;
}
.profile-menu .dropdown-item i.ti {
  width: var(--menu-icon-size);
  min-width: var(--menu-icon-size);
  text-align: center;
  font-size: var(--menu-icon-size);
}

/* Ligne switch (grid: icône | label | action) */
.profile-menu .menu-switch {
  display: grid;
  grid-template-columns: var(--menu-icon-size) 1fr auto;
  align-items: center;
  gap: var(--menu-gap);
  padding: var(--menu-item-py) var(--menu-pad-x) !important;
  border-top: 1px solid transparent; /* couleur définie par thème */
}
.profile-menu .menu-switch .ti {
  font-size: var(--menu-icon-size);
  text-align: center;
}
.profile-menu .menu-switch .menu-switch-label { line-height: 1.25; }
.profile-menu .menu-switch .form-check-input {
  width: 42px; height: 22px;
  border: 0;
  justify-self: end;
}
.profile-menu .menu-switch .form-check-input:focus { box-shadow: none; }

/* Footer du menu + padding latéral cohérent */
.profile-menu .menu-footer {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid transparent; /* couleur par thème */
}

/* Bouton logout (plein largeur) */
.profile-menu .btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 5px;
  background: transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.profile-menu .btn-logout:focus { outline: 0; box-shadow: none; }

/* Contrôle d'affichage des variantes de logo selon le thème */
.d-light-inline, .d-dark-inline { display: none !important; }
.d-light-none, .d-dark-none { display: inline !important; }

/* Mobile: réordonner la navbar pour avoir toggler | brand | actions (avatar à droite) */
@media (max-width: 991.98px) {
  #header .container {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  #header .navbar-toggler {
    order: 0;
    margin-right: 6px;
  }
  #header .navbar-brand {
    order: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav-actions {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  #mainNav {
    width: 100%;
  }
}

/* Style pour l'icône custom du navbar-toggler */
.navbar-toggler { padding: .25rem .5rem; }
.navbar-toggler .ti {
  font-size: 20px;
  line-height: 1;
  color: currentColor;
  display: inline-block;
}
.navbar-toggler-icon { display: none; }

/* Offcanvas (menu burger) à gauche pour mobile */
.offcanvas.offcanvas-start {
  width: 280px;
  max-width: 85%;
  /* on peut définir une valeur par défaut ici si besoin */
  --offcanvas-link-color: currentColor;
}
.offcanvas .nav-link { 
  padding-left: 0.5rem; padding-right: 0.5rem;
  color: var(--offcanvas-link-color) !important; /* override couleur de lien par défaut */
  text-decoration: none;
}
.offcanvas .nav { padding-top: 8px; }
.offcanvas .nav-link { padding: .5rem .75rem; border-radius: 6px; }

/* Footer : centrer les liens et réduire la taille sur mobile */
@media (max-width: 767.98px) {
  footer .container {
    align-items: center;
    text-align: center;
  }
  footer .nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding-left: 0;
    margin: .4rem 0 0 0;
  }
  footer .nav .nav-link {
    font-size: 12px !important;
    padding: .25rem .5rem;
  }
  footer .order-2.order-md-1 {
    margin-top: .6rem;
  }
}

/* Nom du site (poids, couleur via thème) */
.site-name { font-weight: 600; }
/* transition douce sur éléments hover (offcanvas et menu profil) */
.offcanvas .nav-link,
.profile-menu .dropdown-item {
  transition: background-color .14s ease, color .14s ease;
}

/* optionnel : améliorer léger effet visuel au survol */
.offcanvas .nav-link:hover,
.profile-menu .dropdown-item:hover {
  /* aucune modification de couleur ici : les thèmes définissent la couleur via --oc-hover / --menu-hover */
  cursor: pointer;
}

/* Notifications globales : coin inférieur droit */
.toast-center-bottom {
  position: fixed;
  top: auto;
  right: 24px;
  left: auto;
  bottom: 24px;
  transform: none;
  z-index: 2100;
  pointer-events: auto !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding: 0;
}
.toast-center-bottom .toast {
  border-radius: 10px;
  min-width: 380px;
  max-width: min(520px, calc(100vw - 48px));
  width: auto;
	padding: .65rem .8rem .65rem 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.toast-center-bottom .toast > .d-flex { width: 100%; align-items: center; gap: 1rem; }

/* texte de la toast */
.toast-center-bottom .toast .toast-body {
  padding: 0;
  line-height: 1.35;
  color: inherit;
  font-size: .95rem;
  flex: 1 1 auto;
  min-width: 0;
}
.toast-center-bottom .toast .btn-close {
  flex: 0 0 auto;
  margin: 0 0 0 auto !important;
  padding: .55rem;
}

/* Responsive: sur petits écrans, occuper presque toute la largeur disponible */
@media (max-width: 600px) {
  /* Adaptation complète pour petits écrans : la toast occupe la largeur disponible */
  .toast-center-bottom {
    left: 12px;
    right: 12px;
		top: auto;
    transform: none;        /* plus de centrage par transform */
		bottom: 12px;
    padding: 0;             /* on gère l'espacement via left/right */
    box-sizing: border-box;
  }
  .toast-center-bottom .toast {
    min-width: unset;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: .6rem 1rem;
  }
}

/* Styles pour les cards statistiques (dashboard) */
.stat-card {
  border-radius: 12px;
  background: var(--bs-body-bg-card, #ffffff);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(15,15,15,.06);
  min-height: 88px;
}

/* Icon bloc */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(0,0,0,.06);
  color: var(--bs-primary);
}
.stat-icon .ti {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  color: inherit; /* hérite de la couleur définie sur .stat-icon */
}

/* petit ajustement si l'icône a des marges par défaut */
.stat-icon .ti * { vertical-align: middle; }

/* Titres / valeurs */
.stat-card small.text-muted { display: block; }
.stat-card h3 { font-size: 1.6rem; margin-bottom: .125rem; }

/* Adaptation sombre : si vous voulez garder les cards claires en sombre, vous pouvez conserver les mêmes valeurs.
   Si vous préférez inversion, override ici : */
[data-bs-theme="dark"] .stat-card {
  background: #10101070;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 22px rgba(0,0,0,.55);
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .stat-icon {
  border-color: rgba(255,255,255,.06);
  color: var(--bs-primary);
}

/* Responsive: espacement vertical sur petits écrans */
@media (max-width: 575.98px) {
  .stat-card { padding: .85rem; }
  .stat-icon { width: 44px; height: 44px; }
}

/* Services list (hébergements / domaines / VPS) */
.service-block .card-body { padding: 1rem; }

.service-list { gap: .5rem; display: block; }
.service-item {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  margin-bottom: .6rem;
  padding: .7rem .9rem;
  background: var(--bs-body-bg-card, #ffffff);
  box-shadow: 0 6px 16px rgba(15,15,15,.04);
}
.service-item .fw-semibold { font-size: .98rem; }

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(0,0,0,.06);
  color: var(--bs-primary);
  font-size: 20px;
}

/* bouton gérer (aligné, taille petite) */
.service-manage-btn { min-width: 76px; }

/* dark theme overrides */
[data-bs-theme="dark"] .service-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: none;
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .service-icon {
  border-color: rgba(255,255,255,0.06);
  color: var(--bs-primary);
}
[data-bs-theme="dark"] .service-item small.text-muted {
  color: rgba(255,255,255,0.65);
}

/* responsive tweaks */
@media (max-width: 575.98px) {
  .service-item { padding: .6rem; }
  .service-icon { width: 40px; height: 40px; }
}

/* Accordion / service header styling pour ressembler à l'UI fournie */
.service-list .accordion-item { border: 0; background: transparent; }
.service-item + .service-item { margin-top: .6rem; }

/* style du header (bouton toggle) */
.service-item .accordion-header {
  gap: .5rem;
  position: relative;
  align-items: center;
}

/* bouton principal (toggle) transformé en "card-like" */
.service-item .accordion-button {
  background: var(--bs-body-bg-card, #fff);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(15,15,15,.04);
  padding: .75rem 1rem;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
}

/* masquer l'icône par défaut de bootstrap et la replacer */
.service-item .accordion-button::after {
  /* conserver le chevron mais le pousser à l'extrémité droite */
  transform: none;
  right: 12px;
  left: auto;
  font-size: 18px;
  color: rgba(0,0,0,.35);
  opacity: 1;
}

/* action à droite (bouton Gérer) */
.service-action { display: flex; align-items: center; }

/* bouton gérer compact */
.service-action .btn {
  border-radius: .45rem;
  padding: .42rem .8rem;
}

/* override dark theme pour header */
[data-bs-theme="dark"] .service-item .accordion-button {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: none;
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .service-item .accordion-button::after {
  color: rgba(255,255,255,0.5);
}

/* icon block (alignement identique) */
.service-icon { width: 44px; height: 44px; border-radius: 8px; display:inline-flex; align-items:center; justify-content:center; border:1px solid rgba(0,0,0,.06); background:transparent; color:var(--bs-primary); }

/* collapse body spacing */
.service-item .accordion-body { padding: .9rem; background: transparent; }

/* responsive: diminuer padding et cacher le statut texte */
@media (max-width: 575.98px) {
  .service-item .accordion-button { padding: .6rem .8rem; }
  .service-action .btn { padding: .35rem .6rem; font-size: .9rem; }
  .service-item .d-none.d-sm-inline { display: none !important; }
}

/* Styles pour listes internes de chaque catégorie */
.category-list-inner { margin-top: .5rem; }
.category-list-inner .list-group-item {
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.06);
  background: var(--bs-body-bg-card, #fff);
  margin-bottom: .5rem;
  padding: .6rem .85rem;
  box-shadow: 0 6px 12px rgba(15,15,15,.03);
}
[data-bs-theme="dark"] .category-list-inner .list-group-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: none;
}

/* icônes petites dans les listes internes */
.category-list-inner .service-icon { width:40px; height:40px; font-size:18px; }

/* gardez espace entre le toggle et le bouton Gérer */
.accordion-header .service-action { margin-left: .5rem; }
/* Category card (apparence identique au screenshot) */
.services-categories .category-card {
  border-radius: 10px;
  background: var(--bs-body-bg-card, #ffffff);
  border: 1px solid rgba(0,0,0,.06);
  overflow: hidden;
  /* ombre similaire aux cards du haut */
  box-shadow: 0 6px 18px rgba(15,15,15,.06);
  transition: box-shadow .18s ease, transform .18s ease;
}

/* légère élévation au hover pour retour visuel */
.services-categories .category-card:hover {
  box-shadow: 0 10px 28px rgba(15,15,15,.09);
  transform: translateY(-2px);
}

/* variante sombre : ombre plus subtile adaptée au fond sombre */
[data-bs-theme="dark"] .services-categories .category-card {
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}

/* Header mince, titre à gauche, caret à droite */
.category-header {
  padding: .7rem 1rem;
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.category-title { font-weight: 600; }

/* Caret léger (placer à l'extrême droite) */
.category-controls .ti { font-size: 18px; color: rgba(0,0,0,.45); }

/* Corps de la card (ligne unique) */
.category-body {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Service icon */
.category-card .service-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.06);
  background: transparent;
  color: var(--bs-primary);
}

/* Bouton Gérer violet */
.manage-btn {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: none;
}
.manage-btn:hover {
  background-color: color-mix(in oklab, var(--accent-purple) 85%, black 15%);
  border-color: color-mix(in oklab, var(--accent-purple) 85%, black 15%);
}

/* Dark theme overrides to keep same look in dark mode */
[data-bs-theme="dark"] .services-categories .category-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
[data-bs-theme="dark"] .category-header { border-bottom-color: rgba(255,255,255,0.03); }
[data-bs-theme="dark"] .category-controls .ti { color: rgba(255,255,255,0.6); }
[data-bs-theme="dark"] .manage-btn {
  /* garder le bouton visible en sombre */
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
  .category-body { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .category-controls { margin-left: 8px; }
  .category-header { display: flex; align-items: center; justify-content: space-between; }
}

/* Section "Aucun service" centrée -> adaptée pour avoir la même taille que les category-card */
.no-services {
  max-width: none;      /* occupe la largeur disponible */
  width: 100%;
  border-radius: 10px;  /* même radius que .category-card */
  background: var(--bs-body-bg-card, #ffffff);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(15,15,15,.06);
  color: var(--bs-body-color);
  box-sizing: border-box;
}
.no-services .fs-36 { font-size: 36px; }

/* conserver hover identique aux category-card */
.no-services:hover {
  box-shadow: 0 10px 28px rgba(15,15,15,.09);
  transform: translateY(-2px);
}

/* dark theme override */
[data-bs-theme="dark"] .no-services {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}

/* adaptabilité mobile */
@media (max-width: 575.98px) {
  .no-services { padding: 1rem; }
  .no-services .btn { width: 100%; }
}

.no-services-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* icône gauche */
.no-services-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.06);
  background: transparent;
  color: var(--bs-body-color);
  font-size: 20px;
}

/* titre / description */
.no-services-content h5 { font-size: 1.125rem; margin: 0; font-weight: 600; }
.no-services-content p { margin: 0; }

/* bouton à droite */
.no-services-action .btn {
  min-width: 180px;
  padding: .5rem .9rem;
}

.dashboard-services-heading {
  padding: 15px 5px;
}
.dashboard-support-empty {
  border: 1px solid rgba(0,0,0,.07) !important;
  border-radius: 12px !important;
  background: var(--bs-body-bg-card, #fff) !important;
  box-shadow: none !important;
}
.dashboard-support-empty:hover {
  transform: none !important;
  border-color: rgba(var(--bs-primary-rgb),.32) !important;
  box-shadow: none !important;
}
.dashboard-services-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.dashboard-services-scroll {
  max-height: 322px;
  padding-right: 7px;
  overflow-y: auto;
  scrollbar-color: rgba(var(--bs-secondary-rgb),.38) transparent;
  scrollbar-width: thin;
}
.dashboard-services-scroll::-webkit-scrollbar { width: 6px; }
.dashboard-services-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.dashboard-services-scroll::-webkit-scrollbar-track { background: transparent; }
.dashboard-services-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb),.38);
}
.dashboard-service-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 98px;
  padding: 18px;
  gap: 16px;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 12px;
  background: var(--bs-body-bg-card, #fff);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dashboard-service-card:hover {
  transform: none;
  border-color: rgba(var(--bs-primary-rgb),.32);
  box-shadow: none;
}
.dashboard-service-main {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.dashboard-service-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(var(--bs-primary-rgb),.08);
  color: var(--bs-primary);
}
.dashboard-service-visual img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.dashboard-service-visual--themed {
  color: var(--bs-body-color);
}
.dashboard-service-svg {
  display: block;
  width: 30px;
  height: 30px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.dashboard-service-svg--nodejs {
  -webkit-mask-image: url('../img/games/nodejs.svg');
  mask-image: url('../img/games/nodejs.svg');
}
.dashboard-service-visual i { font-size: 1.45rem; }
.dashboard-service-info { line-height: 1.25; }
.dashboard-service-name {
  margin-bottom: 7px;
  color: var(--bs-body-color);
  font-size: 1.15rem;
  font-weight: 700;
}
.dashboard-service-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: var(--bs-secondary-color);
  font-size: .78rem;
}
.dashboard-expiry {
  padding: 4px 8px;
  border: 1px solid rgba(var(--bs-secondary-rgb),.22);
  border-radius: 999px;
  background: rgba(var(--bs-secondary-rgb),.06);
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.dashboard-service-manage { flex: 0 0 auto; }
.dashboard-services-skeleton { display: none; }
.dashboard-services-loading .dashboard-services-content { display: none; }
.dashboard-services-loading .dashboard-services-skeleton {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
}
.dashboard-service-card-skeleton { pointer-events: none; }
.dashboard-skeleton {
  display: block;
  overflow: hidden;
  position: relative;
  border-radius: 7px;
  background: rgba(var(--bs-secondary-rgb),.12);
}
.dashboard-skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent);
  animation: dashboard-skeleton-shimmer 1.35s infinite;
}
.dashboard-skeleton-icon { width: 48px; height: 48px; border-radius: 10px; }
.dashboard-skeleton-copy { display: flex; flex-direction: column; gap: 9px; width: min(280px,52vw); }
.dashboard-skeleton-title { width: 72%; height: 15px; }
.dashboard-skeleton-meta { width: 100%; height: 11px; }
.dashboard-skeleton-button { width: 64px; height: 32px; }
@keyframes dashboard-skeleton-shimmer { to { transform: translateX(100%); } }
[data-bs-theme="dark"] .dashboard-service-card {
  border-color: rgba(255,255,255,.07);
  background: rgba(255,255,255,.025);
  box-shadow: none;
}
[data-bs-theme="dark"] .dashboard-support-empty {
  border-color: rgba(255,255,255,.07) !important;
  background: rgba(255,255,255,.025) !important;
}
.min-w-0 { min-width: 0; }

@media (max-width: 575.98px) {
  .dashboard-service-card { align-items: stretch; flex-direction: column; }
  .dashboard-service-manage { width: 100%; }
  .dashboard-skeleton-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-skeleton::after { animation: none; }
}

/* dark theme adjustments */
[data-bs-theme="dark"] .no-services-icon {
  border-color: rgba(255,255,255,.06);
}

/* ── Login Loader ───────────────────────────────────────────── */
#login-loader {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 1;
  transition: opacity .45s ease;
}
#login-loader.active {
  display: flex;
}
#login-loader.login-loader-fade {
  opacity: 0;
  pointer-events: none;
}
.login-loader-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
}
.login-loader-symbol {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 98px;
}
.login-loader-bar {
  position: absolute;
  display: block;
  width: 13px;
  height: 44px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0;
  animation-duration: .62s;
  animation-timing-function: cubic-bezier(.2,.85,.3,1.15);
  animation-fill-mode: forwards;
}
.login-loader-bar.bar-left {
  left: 0;
  top: 27px;
  transform: translateX(-90px);
  animation-name: login-bar-from-left;
  animation-delay: .12s;
}
.login-loader-bar.bar-top {
  left: 22px;
  top: 0;
  transform: translateY(-90px);
  animation-name: login-bar-from-top;
  animation-delay: .02s;
}
.login-loader-bar.bar-bottom {
  left: 22px;
  bottom: 0;
  transform: translateY(90px);
  animation-name: login-bar-from-bottom;
  animation-delay: .08s;
}
.login-loader-bar.bar-right {
  right: 0;
  top: 27px;
  transform: translateX(90px);
  animation-name: login-bar-from-right;
  animation-delay: .18s;
}
.login-loader-word {
  display: flex;
  overflow: hidden;
  font-family: 'Righteous', sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}
.login-loader-word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  animation: login-letter-in .38s cubic-bezier(.2,.8,.3,1) forwards;
  animation-delay: calc(.72s + var(--letter-index) * .1s);
}
#login-loader.is-leaving .login-loader-word span {
  opacity: 1;
  transform: translateY(0);
  animation-name: login-letter-out;
  animation-duration: .28s;
  animation-timing-function: ease-in;
  animation-delay: calc(var(--letter-exit-index) * .065s);
}
#login-loader.is-leaving .login-loader-bar {
  opacity: 1;
  transform: translate(0, 0);
  animation-duration: .48s;
  animation-timing-function: cubic-bezier(.65,0,.8,.35);
  animation-delay: .52s;
}
#login-loader.is-leaving .login-loader-bar.bar-left { animation-name: login-bar-to-left; }
#login-loader.is-leaving .login-loader-bar.bar-right { animation-name: login-bar-to-right; }
#login-loader.is-leaving .login-loader-bar.bar-top { animation-name: login-bar-to-top; }
#login-loader.is-leaving .login-loader-bar.bar-bottom { animation-name: login-bar-to-bottom; }
#login-loader.is-leaving .login-loader-msg { opacity: 0; transform: translateY(6px); }
.login-loader-msg {
  margin-top: 22px;
  font-size: .82rem;
  color: #fff;
  letter-spacing: .03em;
  text-align: center;
  transition: opacity .3s ease, transform .3s ease;
}
@keyframes login-bar-from-left { to { opacity: 1; transform: translateX(0); } }
@keyframes login-bar-from-right { to { opacity: 1; transform: translateX(0); } }
@keyframes login-bar-from-top { to { opacity: 1; transform: translateY(0); } }
@keyframes login-bar-from-bottom { to { opacity: 1; transform: translateY(0); } }
@keyframes login-letter-in { to { opacity: 1; transform: translateY(0); } }
@keyframes login-letter-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-18px); } }
@keyframes login-bar-to-left { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-90px); } }
@keyframes login-bar-to-right { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(90px); } }
@keyframes login-bar-to-top { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-90px); } }
@keyframes login-bar-to-bottom { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(90px); } }
@media (prefers-reduced-motion: reduce) {
  .login-loader-bar,
  .login-loader-word span { animation-duration: .01ms; animation-delay: 0s; }
}
@media (max-width: 575.98px) {
  .login-loader-brand {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    width: min(100%, 280px);
  }
  .login-loader-symbol {
    flex: 0 0 98px;
    width: 58px;
    height: 98px;
    overflow: visible;
  }
  .login-loader-word {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    width: max-content;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    font-size: clamp(2rem, 12vw, 2.75rem);
  }
  .login-loader-word span { flex: 0 0 auto; }
}

/* ── Cookie Banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 8888;
  width: min(820px, calc(100vw - 32px));
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.cookie-banner.cookie-banner-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.cookie-banner.cookie-banner-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel-nav-bg, #111);
  border: 1px solid var(--panel-nav-border, #1e1e1e);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
}
.cookie-banner-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--bs-warning, #f59e0b);
  line-height: 1;
}
.cookie-banner-body {
  flex: 1;
  min-width: 0;
}
.cookie-banner-body strong {
  display: block;
  font-size: .9rem;
  margin-bottom: 3px;
}
.cookie-banner-body p {
  font-size: .78rem;
  color: var(--bs-secondary-color, #6b7280);
  margin: 0;
  line-height: 1.5;
}
.cookie-banner-body a {
  color: var(--bs-primary, #0d6efd);
  text-decoration: none;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .cookie-banner-inner {
    flex-wrap: wrap;
  }
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* mobile: empiler et centrer */
@media (max-width: 575.98px) {
  .no-services-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .no-services-content { text-align: center; }
  .no-services-action .btn { width: 100%; }
  .no-services-icon { margin-bottom: .25rem; }
}

/* Tickets list — boxes pleine largeur et cohérentes */
.tickets-card { width: 100%; }

/* header identique aux category-card */
.tickets-card .category-header {
  padding: 15px 5px;
  background: transparent;
  border-bottom: 0px solid rgba(0, 0, 0, .04);
}

/* list-group : pas de padding pour que les boxes occupent toute la largeur interne */
.tickets-card .list-group { padding: 0; }
.tickets-card .service-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  background: transparent;
  color: #212529 !important;
  font-size: 20px;
}
.tickets-card .service-icon i {
  color: inherit !important;
}
[data-bs-theme="dark"] .tickets-card .service-icon {
  border-color: rgba(255,255,255,.06);
  color: #fff !important;
}

/* chaque ticket devient une box complète (fond, radius, shadow) */
.ticket-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1rem;
  margin: 0;                      /* plus de marge entre boxes (gérée par gap visuel via padding) */
  border-radius: 10px;
  background: var(--bs-body-bg-card, #fff);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(15,15,15,.06);
  color: inherit;
  text-decoration: none;
}

/* espacement entre boxes */
.tickets-card .list-group .ticket-item + .ticket-item { margin-top: .75rem; }

/* hover similaire aux autres cards */
.ticket-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15,15,15,.09);
  background: color-mix(in oklab, var(--bs-body-bg-card, #fff) 94%, transparent);
}

/* contenu */
.ticket-left .fw-semibold { font-weight: 600; }
.ticket-meta { display: block; margin-top: .35rem; color: var(--hostrix-muted); font-size: .88rem; }

/* pastille statut */
.ticket-status { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.08); margin-left: 8px; vertical-align: middle; }
.ticket-status.open { background: #28a745; }
.ticket-status.closed { background: #6c757d; }
/* Tickets: pastille statut (cohérente avec vos box) */
.ticket-status-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  vertical-align: middle;
}
.ticket-status-dot.open { background: #28a745; }
.ticket-status-dot.closed { background: #6c757d; }

/* Assure largeur complète et bon wrap */
.tickets-card .ticket-left { flex: 1 1 auto; min-width: 0; }
.tickets-card .ticket-left .text-truncate { max-width: 100% !important; }
.tickets-card .ticket-open-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tickets-card .ticket-open-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: 1rem;
  transition: background-color .15s ease, color .15s ease;
}
.tickets-card .ticket-item:hover .ticket-open-icon {
  background: color-mix(in srgb, var(--bs-secondary-bg) 82%, var(--bs-body-color));
  color: var(--bs-body-color);
}
.dashboard-stat-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dashboard-wave {
  display: inline-block;
  transform-origin: 70% 75%;
  animation: dashboard-wave 1.6s ease-in-out 2;
}
@keyframes dashboard-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(16deg); }
  20% { transform: rotate(-9deg); }
  30% { transform: rotate(16deg); }
  40% { transform: rotate(-5deg); }
  50% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-wave { animation: none; }
}
.dashboard-stat-link:hover {
  color: inherit;
  border-color: rgba(var(--bs-primary-rgb), .45);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(var(--bs-primary-rgb), .09);
}
.dashboard-stat-link:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}
@media (max-width: 575.98px) {
  .service-order-header {
    align-items: stretch !important;
    flex-direction: column;
    gap: 12px;
  }
  .service-order-header .btn {
    width: 100%;
  }
}

/* Optionnel: léger hover comme vos autres box */
.ticket-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15,15,15,.09);
  background: color-mix(in oklab, var(--bs-body-bg-card, #fff) 94%, transparent);
}

/* Dark mode: garder le rendu cohérent */
[data-bs-theme="dark"] .ticket-item:hover {
  background: rgba(255,255,255,0.02);
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}

/* dark theme adjustments */
[data-bs-theme="dark"] .ticket-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
[data-bs-theme="dark"] .ticket-item:hover {
  background: rgba(255,255,255,0.02);
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
[data-bs-theme="dark"] .ticket-meta,
[data-bs-theme="dark"] .ticket-action small { color: rgba(255,255,255,0.65); }

/* Ligne identifiant + statut dans l'entête du ticket */
.ticket-id-line { display: inline-flex; align-items: center; gap: .4rem; }
/* Ligne identifiant + statut dans l'entête du ticket */
.ticket-id-line .fw-semibold { line-height: 1; }
.ticket-id-line .ticket-status-dot { width: 10px; height: 10px; }
.ticket-id-line .status-label { font-size: .9rem; }

/* ── Orders page ────────────────────────────────────────────── */
.orders-grid { display: flex; flex-direction: column; gap: 10px; }

.order-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 16px; padding: 18px 20px; background: #070607;
  border: 1px solid var(--panel-nav-border); border-radius: var(--radius-lg);
  transition: border-color .15s, box-shadow .15s; text-decoration: none; color: inherit;
}
.order-card:hover { border-color: var(--border-hover); box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.order-card.is-pending   { border-left: 3px solid var(--warning); }
.order-card.is-paid      { border-left: 3px solid var(--success); }
.order-card.is-cancelled { border-left: 3px solid var(--danger); }
.order-card.is-refunded  { border-left: 3px solid #0dcaf0; }

.order-card-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.order-icon-wrap {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.is-pending  .order-icon-wrap { background: var(--warning-light); color: var(--warning); }
.is-paid     .order-icon-wrap { background: var(--success-light);  color: var(--success); }
.is-cancelled .order-icon-wrap { background: var(--danger-light);  color: var(--danger); }
.is-refunded  .order-icon-wrap { background: rgba(13,202,240,.12); color: #0dcaf0; }

.order-card-meta { min-width: 0; }
.order-ref {
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  color: var(--bs-secondary-color); text-transform: uppercase; margin-bottom: 3px;
}
.order-product {
  font-size: .95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--bs-body-color);
}
.order-cycle { font-size: .8rem; font-weight: 400; color: var(--bs-secondary-color); }
.order-dates { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; }
.order-date-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .78rem; color: var(--bs-secondary-color);
}
.order-date-item i { font-size: .85rem; }

.order-card-right { display: flex; align-items: center; gap: 0; flex-shrink: 0; }

.order-price-block {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  padding-right: 20px;
}
.order-amount {
  font-size: 1.15rem; font-weight: 700; color: var(--bs-body-color); line-height: 1;
}

.order-action-block {
  border-left: 1px solid var(--panel-nav-border);
  padding-left: 20px;
  display: flex; align-items: center; justify-content: center;
  min-width: 110px;
}
.order-pay-btn {
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap; font-size: .875rem;
}
.order-chevron {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  font-size: 1rem;
  transition: background .15s, color .15s;
}
.order-card:hover .order-chevron {
  background: var(--bs-primary);
  color: #fff;
}
.order-chevron { text-decoration: none; }

/* ── Order detail ──────────────────────────────────────────── */
.order-detail-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr); gap:18px; }
.order-detail-card { padding:22px; border:1px solid var(--bs-border-color); border-radius:12px; background:var(--surface-color,var(--bs-body-bg)); }
.order-detail-card-title { display:flex; align-items:center; gap:9px; margin:0 0 18px; font-size:1rem; font-weight:700; }
.order-detail-card-title i { color:var(--bs-primary); font-size:1.15rem; }
.order-detail-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.order-detail-item { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:13px 0; border-bottom:1px solid var(--bs-border-color); }
.order-detail-item:nth-last-child(-n+2) { border-bottom:0; }
.order-detail-label { color:var(--bs-secondary-color); font-size:.79rem; }
.order-detail-value { color:var(--bs-body-color); font-size:.84rem; font-weight:600; text-align:right; overflow-wrap:anywhere; }
.order-detail-summary { display:grid; gap:12px; }
.order-detail-summary-row { display:flex; justify-content:space-between; align-items:center; gap:16px; color:var(--bs-secondary-color); font-size:.84rem; }
.order-detail-summary-row strong { color:var(--bs-body-color); font-size:.9rem; }
.order-detail-summary-row.total { padding-top:13px; border-top:1px solid var(--bs-border-color); }
.order-detail-summary-row.total strong { font-size:1.2rem; }
.order-detail-actions { display:grid; gap:9px; margin-top:18px; }
.order-service-list { display:grid; gap:10px; }
.order-service-row { display:flex; align-items:center; gap:13px; padding:14px; border:1px solid var(--bs-border-color); border-radius:10px; color:inherit; text-decoration:none; transition:border-color .15s,background .15s; }
.order-service-row:hover { border-color:var(--bs-primary); background:rgba(var(--bs-primary-rgb),.05); color:inherit; }
.order-service-row-disabled { cursor:default; }
.order-service-row-disabled:hover { border-color:var(--bs-border-color); background:transparent; }
.order-service-icon { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:9px; color:var(--bs-primary); background:rgba(var(--bs-primary-rgb),.1); font-size:1.1rem; }
.order-service-meta { min-width:0; flex:1; }
.order-service-name { font-size:.88rem; font-weight:700; }
.order-service-sub { margin-top:2px; color:var(--bs-secondary-color); font-size:.75rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-service-row>.ti-chevron-right { color:var(--bs-secondary-color); }
@media(max-width:991.98px){.order-detail-grid{grid-template-columns:1fr}.order-detail-list{grid-template-columns:1fr}.order-detail-item:nth-last-child(2){border-bottom:1px solid var(--bs-border-color)}}
@media(max-width:575.98px){.order-detail-card{padding:17px}.order-detail-item{gap:10px}.order-detail-value{max-width:58%}}

.order-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.order-status-pending   { background: var(--warning-light); color: var(--warning); }
.order-status-paid      { background: var(--success-light);  color: var(--success); }
.order-status-cancelled { background: var(--danger-light);   color: var(--danger); }
.order-status-refunded  { background: rgba(13,202,240,.12);  color: #0dcaf0; }
.order-status-suspended { background: var(--warning-light); color: var(--warning); }
.order-status-ended     { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.order-status-info      { background: rgba(13,202,240,.12); color: #0a94b0; }
[data-bs-theme="dark"] .order-status-info { color: #5dd8ef; }

.orders-empty { text-align: center; padding: 56px 20px; color: var(--bs-secondary-color); }
.orders-empty i { font-size: 2.8rem; opacity: .35; }
.orders-empty p { margin-top: 12px; font-size: .95rem; }

/* ── Orders search ── */
.orders-search-form { max-width: 420px; }
.orders-search-wrap {
  position: relative; display: flex; align-items: center;
}
.orders-search-icon {
  position: absolute; left: 12px; font-size: 1rem;
  color: var(--bs-secondary-color); pointer-events: none;
}
.orders-search-input {
  padding-left: 36px; padding-right: 36px;
  background: var(--bg-card); border-color: var(--panel-nav-border);
  border-radius: var(--radius-lg);
}
.orders-search-input:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(13,110,253,.15); }
.orders-search-clear {
  position: absolute; right: 12px;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--bs-secondary-color); font-size: 1rem; line-height: 1;
  transition: color .14s;
}
.orders-search-clear:hover { color: var(--bs-body-color); }

/* ── Orders pagination ── */
.orders-pagination { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.orders-pagination .page-link {
  background: var(--bg-card); border-color: var(--panel-nav-border);
  color: var(--bs-body-color); border-radius: 6px !important;
  min-width: 36px; text-align: center;
  transition: background .14s, border-color .14s, color .14s;
}
.orders-pagination .page-link:hover { background: var(--bs-secondary-bg); border-color: var(--border-hover); }
.orders-pagination .page-item.active .page-link { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.orders-pagination .page-item.disabled .page-link { opacity: .35; }
.orders-pagination .pagination { gap: 4px; }
.orders-pagination-info { font-size: .78rem; color: var(--bs-secondary-color); margin: 0; }

@media (max-width: 576px) {
  .order-card { grid-template-columns: 1fr; gap: 12px; }
  .order-card-right {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 0; width: 100%;
    border-top: 1px solid var(--panel-nav-border); padding-top: 12px; margin-top: 0;
  }
  .order-price-block { flex-direction: column; align-items: flex-start; gap: 5px; padding-right: 0; }
  .order-action-block {
    border-left: none; padding-left: 0; min-width: unset;
    justify-content: flex-end;
  }
  .order-dates { gap: 8px; }
}

/* ── Factures (list_invoices + view_invoice) ─────────────────────────────── */

/* Badges statut */
.inv-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
}
.inv-status-paid      { background: rgba(25,135,84,.15);  color: #5dba8a; }
.inv-status-pending   { background: rgba(255,193,7,.12);  color: #f0b429; }
.inv-status-refunded  { background: rgba(13,110,253,.14); color: #6ea8fe; }
.inv-status-cancelled { background: rgba(220,53,69,.12);  color: #ea868f; }

/* Badges type */
.inv-type-badge { font-size: .7rem; font-weight: 500; padding: 2px 7px; border-radius: 4px; }
.inv-type-initial { background: rgba(13,110,253,.12); color: #6ea8fe; }
.inv-type-renewal { background: rgba(111,66,193,.12); color: #cf9fff; }
.inv-type-adjustment { background: rgba(240,180,41,.14); color: #d9a91c; }

/* ── Liste factures ── */
.inv-row { cursor: pointer; transition: background .12s; }
.inv-row:hover td { background: var(--bs-tertiary-bg) !important; }

.inv-stat-card {
  border-radius: 10px; padding: 16px 20px;
  border: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"]  .inv-stat-card { background: #111; }
[data-bs-theme="light"] .inv-stat-card { background: var(--tertiary, #f2f1ff); box-shadow: 0 1px 6px rgba(0,0,0,.06); }

.inv-stat-label { font-size: .8rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .05em; }
.inv-stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }

/* Cartes statistiques du support, alignées sur celles des factures et devis */
.ticket-card:not(.ticket-list-card) {
  padding: 16px 20px !important;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transform: none !important;
}
.ticket-card:not(.ticket-list-card) > small {
  display: block;
  margin-bottom: 4px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ticket-card:not(.ticket-list-card) > .fs-3 {
  font-size: 1.5rem !important;
  line-height: 1.2;
}

.inv-pm-badge { font-size: .7rem; color: var(--bs-secondary-color); }

.inv-empty { padding: 56px 0; text-align: center; }
.inv-empty i { font-size: 3.2rem; color: var(--bs-secondary-color); opacity: .3; display: block; margin-bottom: 12px; }
.inv-empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.inv-empty-sub   { font-size: .875rem; color: var(--bs-secondary-color); }

.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 500; padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--bs-border-color);
  background: transparent; color: var(--bs-body-color);
  text-decoration: none; transition: background .12s, border-color .12s;
}
.filter-pill:hover, .filter-pill.active {
  background: #0d6efd; border-color: #0d6efd; color: #fff;
}
.filter-pill.active-paid      { background: rgba(25,135,84,.15);  border-color: rgba(25,135,84,.4);  color: #5dba8a; }
.filter-pill.active-pending   { background: rgba(255,193,7,.12);  border-color: rgba(255,193,7,.4);  color: #f0b429; }
.filter-pill.active-cancelled { background: rgba(220,53,69,.12);  border-color: rgba(220,53,69,.4);  color: #ea868f; }

/* ── Vue facture — améliorations visuelles ── */
.invoice-shell { width: 100%; max-width: none; margin: 0; padding: 12px 0 48px; }

.invoice-card {
  border-radius: 10px;
  border: 1px solid var(--bs-border-color);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .12s ease;
}
[data-bs-theme="dark"]  .invoice-card { background: #0b0b0b; }
[data-bs-theme="light"] .invoice-card { background: var(--tertiary, #f2f1ff); box-shadow: 0 6px 20px rgba(15,15,15,.06); }

.invoice-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--bs-border-color);
}
.invoice-body   { padding: 20px 28px; }
.invoice-footer { padding: 12px 28px; border-top: 1px solid var(--bs-border-color); }
.inv-legal-name{font-size:14px;font-weight:700;color:var(--bs-body-color)}.inv-legal-contact{margin-top:7px}
.invoice-additional-info { padding: 0 28px 20px; }
.invoice-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
}
.invoice-dates.invoice-dates-renewal {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.invoice-date-cell .inv-meta-label {
  margin: 0;
  padding: 14px 16px;
  background: var(--bs-secondary-bg);
  font-size: .8rem;
  text-transform: none;
  letter-spacing: 0;
}
.invoice-date-cell .inv-meta-value {
  padding: 14px 16px;
  background: transparent;
}
@media (max-width: 576px) {
  .invoice-dates,
  .invoice-dates.invoice-dates-renewal { grid-template-columns: 1fr; }
  .invoice-date-cell + .invoice-date-cell { border-top: 1px solid var(--bs-border-color); }
}
.invoice-terms-text { padding: 2px; font-size: .76rem; line-height: 1.55; color: var(--bs-secondary-color); }
.payment-immediate-acceptance{display:flex;align-items:flex-start;gap:.65rem;padding:14px 15px;border:1px solid rgba(var(--bs-primary-rgb),.3);border-radius:10px;background:rgba(var(--bs-primary-rgb),.06);font-size:.78rem;line-height:1.5}.payment-immediate-acceptance .form-check-input{flex:0 0 auto;margin:.18rem 0 0}.payment-immediate-acceptance .form-check-label{cursor:pointer}.payment-immediate-acceptance a{color:var(--bs-primary);font-weight:600}
.invoice-payment-box { overflow: hidden; margin-bottom: 12px; border: 1px solid var(--bs-border-color); border-radius: 6px; font-size: .76rem; background: var(--bs-body-bg); }
.invoice-payment-title { padding: 10px 12px; background: var(--bs-secondary-bg); border-bottom: 1px solid var(--bs-border-color); font-weight: 700; color: var(--bs-body-color); }
.invoice-payment-content { padding: 10px 12px; line-height: 1.7; color: var(--bs-body-color); }

.inv-logo    { width: 50%; height: auto; object-fit: contain; display: block; }
.inv-brand-block { min-width: 240px; }
.inv-legal-info { margin-top: 15px; font-size: .76rem; line-height: 1.55; color: var(--bs-secondary-color); }
.inv-legal-info a { color: inherit; text-decoration: none; }
.inv-legal-info a:hover { color: var(--primary); }
.inv-brand-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.inv-ref     { font-family: monospace; font-size: .85rem; font-weight: 700; color: var(--bs-body-color); }
.inv-ref-sub { font-size: .75rem; color: var(--bs-secondary-color); margin-top: 4px; }

.inv-status-badge { padding: 4px 10px; font-size: .72rem; border-radius: 14px; text-transform: none; font-weight: 700; }

.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 576px) { .inv-meta { grid-template-columns: 1fr; gap: 14px; } }

.inv-meta-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); margin-bottom: 4px; }
.inv-meta-value { font-size: .9rem; font-weight: 600; color: var(--bs-body-color); }
.inv-billing-address { margin-top: 7px; font-size: .78rem; line-height: 1.5; color: var(--bs-secondary-color); }

.inv-table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--bs-secondary-color);
  padding: 12px 14px;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 700; background: transparent;
}
.inv-table td {
  padding: 12px 14px; font-size: .94rem; vertical-align: middle;
  border-bottom: 1px solid var(--bs-border-color-translucent, rgba(255,255,255,.05));
}
.inv-table tbody tr:last-child td { border-bottom: 0; }
.inv-line-title { font-weight: 700; color: var(--bs-body-color); }
.inv-line-config { margin-top: 3px; max-width: 680px; font-size: .76rem; line-height: 1.45; color: var(--bs-secondary-color); }

.inv-totals {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; padding-top: 18px;
}
.inv-total-line { display: flex; gap: 28px; font-size: .95rem; align-items: center; }
.inv-total-line span:first-child { color: var(--bs-secondary-color); min-width: 140px; text-align: right; }
.inv-grand-total {
  font-size: 1.2rem; font-weight: 700;
  padding-top: 10px; margin-top: 8px;
  border-top: 2px solid var(--bs-border-color);
}

/* Facture : séparateurs blancs en thème sombre. */
[data-bs-theme="dark"] .invoice-header { border-bottom-color: #fff; }
[data-bs-theme="dark"] .invoice-dates { border-color: #fff; }
[data-bs-theme="dark"] .inv-table th { border-bottom-color: #fff; }
[data-bs-theme="dark"] .inv-table td { border-bottom-color: #fff; }
[data-bs-theme="dark"] .inv-grand-total { border-top-color: #fff; }
[data-bs-theme="dark"] .invoice-payment-box { border-color: #fff; }
[data-bs-theme="dark"] .invoice-payment-title { border-bottom-color: #fff; }
[data-bs-theme="dark"] .invoice-footer { border-top-color: #fff; }

@media print {
  /* ── Masquer tout le layout : ne laisser que la facture ── */
  .panel-sidebar,
  .panel-topbar,
  .panel-burger,
  .mobile-topbar,
  .mobile-topbar-actions,
  .panel-footer,
  .offcanvas,
  .offcanvas-backdrop,
  .no-print { display: none !important; }

  html, body, .panel-layout, .panel-content {
    background: #fff !important;
    margin: 0 !important; padding: 0 !important;
    display: block !important;
    width: 100% !important;
  }
  main#content   { padding: 0 !important; overflow: visible !important; }
  .container-fluid { padding: 0 !important; max-width: 100% !important; }

  .invoice-shell { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .invoice-card  { border: 1px solid #ddd !important; box-shadow: none !important;
                   background: #fff !important; border-radius: 0 !important; color: #111 !important; }

  /* Couleurs print */
  .inv-status-paid      { color: #0a6640 !important; background: #d1e7dd !important; }
  .inv-status-pending   { color: #856404 !important; background: #fff3cd !important; }
  .inv-status-refunded  { color: #084298 !important; background: #cfe2ff !important; }
  .inv-status-cancelled { color: #842029 !important; background: #f8d7da !important; }
  .inv-meta-label, .inv-ref-sub { color: #6c757d !important; }
  .inv-meta-value, .inv-ref, .inv-brand-name { color: #111 !important; }
  .inv-grand-total { border-top-color: #ccc !important; }
  .inv-table th { border-bottom-color: #ddd !important; }
  .inv-table td { border-bottom-color: #f0f0f0 !important; }
  /* Section dates */
  .invoice-dates { padding: 0 !important; background: #fff !important; border-color: #e2e5e9 !important; }
  .invoice-date-cell .inv-meta-label { background: #f8f9fa !important; }
  .invoice-date-cell .inv-meta-value { background: #fff !important; }
  .invoice-payment-box { background: #fff !important; border-color: #e2e5e9 !important; }
  .invoice-payment-title { background: #f8f9fa !important; border-bottom-color: #e2e5e9 !important; color: #343a40 !important; }
  .invoice-payment-content { color: #343a40 !important; }
}
.domain-card .dns-table {
    width: 100%;
    table-layout: fixed;
}

.domain-card .dns-table th:nth-child(1) { width: 8%; }
.domain-card .dns-table th:nth-child(2) { width: 16%; }
.domain-card .dns-table th:nth-child(4) { width: 9%; }
.domain-card .dns-table th:nth-child(5) { width: 100px; }

.domain-card .dns-table td:nth-child(3) {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
