/* ============================================================
   HOSTINITY
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Couleurs de base */
  --bg-base:        #1a1c1e;
  --bg-panel:       #2d3032;
  --bg-card:        #252729;
  --bg-card-hover:  #2e3133;
  --bg-input:       #1e2022;
  --bg-glass:       rgba(45,48,50,0.7);

  /* Violet primaire & nuances */
  --purple-50:      #f3eeff;
  --purple-100:     #e2d5ff;
  --purple-200:     #c4acff;
  --purple-300:     #a87dff;
  --purple:         #9a5bff;
  --purple-600:     #7c3de6;
  --purple-700:     #5e22cc;
  --purple-glow:    rgba(154,91,255,0.35);
  --purple-glow-sm: rgba(154,91,255,0.15);

  /* Textes */
  --text-primary:   #f0f1f2;
  --text-secondary: #9ba3ac;
  --text-muted:     #5c6370;
  --text-accent:    #9a5bff;

  /* Bordures */
  --border:         rgba(255,255,255,0.06);
  --border-active:  rgba(154,91,255,0.4);
  --border-card:    rgba(255,255,255,0.04);

  /* Statuts */
  --green:          #22c55e;
  --green-bg:       rgba(34,197,94,0.12);
  --yellow:         #f59e0b;
  --yellow-bg:      rgba(245,158,11,0.12);
  --red:            #ef4444;
  --red-bg:         rgba(239,68,68,0.12);
  --blue:           #3b82f6;
  --blue-bg:        rgba(59,130,246,0.12);
  --orange:         #f97316;
  --orange-bg:      rgba(249,115,22,0.12);

  /* Dimensions */
  --sidebar-w:      260px;
  --radius:         12px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --radius-sm:      8px;

  /* Ombres */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
  --shadow:         0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.45);
  --shadow-purple:  0 4px 24px rgba(154,91,255,0.25);
  --shadow-card:    0 2px 12px rgba(0,0,0,0.4);

  /* Transitions */
  --transition:     0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow:0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; overflow-x: hidden; }

/* SVG sans classe = taille icône standard, jamais plein écran */
svg { display: inline-block; vertical-align: middle; }
svg:not([class]) { width: 18px; height: 18px; flex-shrink: 0; }

body {
  font-family: 'Geist', system-ui, sans-serif;
  font-feature-settings: normal;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fond avec texture subtile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(154,91,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(154,91,255,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout Principal ─────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100% - var(--sidebar-w));
  overflow-x: hidden;
}

.page-body {
  flex: 1;
  padding: 28px 32px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(154,91,255,0.2) transparent;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(154,91,255,0.2); border-radius: 3px; }

/* Logo */
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--purple-600));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-purple);
  flex-shrink: 0;
}

.logo-icon svg { width: 20px; height: 20px; color: #fff; }

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--purple-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-glow-sm);
  border: 1px solid var(--border-active);
  padding: 1px 6px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: auto;
}

/* User info sidebar */
.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-600), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(154,91,255,0.3);
}

.user-info { min-width: 0; flex: 1; }
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.68rem;
  color: var(--green);
  font-weight: 500;
  margin-top: 2px;
}
.user-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.nav-group {
  margin-bottom: 4px;
}

.nav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(154,91,255,0.08);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(154,91,255,0.15);
  color: #fff;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--purple);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--purple-glow);
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: var(--transition);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon { opacity: 1; }

.nav-link.active .nav-icon { color: var(--purple-300); }

.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--purple);
  color: #fff;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(154,91,255,0.4);
}

/* Sidebar bottom */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-footer-links {
  display: flex;
  gap: 4px;
}

.sidebar-footer-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-footer-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

.sidebar-footer-link.danger:hover {
  background: rgba(239,68,68,0.1);
  color: var(--red);
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: 64px;
  background: rgba(26,28,30,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-title {
  flex: 1;
}

.topbar-title h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.topbar-title .breadcrumb {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.topbar-btn:hover {
  background: rgba(154,91,255,0.1);
  border-color: var(--border-active);
  color: var(--purple);
}

.topbar-btn .notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--purple);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 6px var(--purple);
}

.topbar-btn svg { width: 17px; height: 17px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { border-color: var(--border); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  gap: 12px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-glow-sm);
  border: 1px solid var(--border-active);
  color: var(--purple-300);
  flex-shrink: 0;
}

.card-title-icon svg { width: 14px; height: 14px; }

.card-body { padding: 20px 24px; }
.card-body-flush { padding: 0; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--stat-color, var(--purple)), transparent);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover { border-color: rgba(154,91,255,0.15); transform: translateY(-1px); }
.stat-card:hover::before { opacity: 1; }

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stat-bg, rgba(154,91,255,0.12));
  border: 1px solid var(--stat-border, rgba(154,91,255,0.2));
  color: var(--stat-color, var(--purple));
  flex-shrink: 0;
}

.stat-icon svg { width: 20px; height: 20px; }

.stat-trend {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-trend.up { background: var(--green-bg); color: var(--green); }
.stat-trend.down { background: var(--red-bg); color: var(--red); }
.stat-trend.neutral { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Grids Layout ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: rgba(255,255,255,0.02);
}

th {
  padding: 12px 18px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: rgba(154,91,255,0.04);
}

td strong { color: var(--text-primary); font-weight: 600; }

/* ── Badges & Status ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-active, .badge-paid, .badge-completed { background: var(--green-bg); color: var(--green); }
.badge-pending, .badge-awaiting { background: var(--yellow-bg); color: var(--yellow); }
.badge-suspended, .badge-overdue, .badge-cancelled, .badge-fraud { background: var(--red-bg); color: var(--red); }
.badge-draft, .badge-unpaid { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-transfer, .badge-refunded { background: var(--blue-bg); color: var(--blue); }
.badge-terminated { background: rgba(239,68,68,0.07); color: #ff6b6b; }
.badge-register { background: rgba(154,91,255,0.12); color: var(--purple-300); }
.badge-purple { background: var(--purple-glow-sm); color: var(--purple-300); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  outline: none;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-600));
  color: #fff;
  box-shadow: 0 2px 12px rgba(154,91,255,0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(154,91,255,0.5);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.35);
}

.btn-success {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.2);
  color: var(--green);
}

.btn-success:hover { background: rgba(34,197,94,0.2); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 7px 12px;
}

.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(154,91,255,0.12);
  background: rgba(154,91,255,0.04);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235c6370'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

select option { background: var(--bg-panel); color: var(--text-primary); }

textarea { resize: vertical; min-height: 110px; }

.form-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 0.73rem;
  color: var(--red);
  margin-top: 5px;
  display: flex; align-items: center; gap: 4px;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border-left: 3px solid;
  margin-bottom: 20px;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.alert-error   { background: var(--red-bg); color: #ff8080; border-color: var(--red); }
.alert-warning { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow); }
.alert-info    { background: var(--blue-bg); color: var(--blue); border-color: var(--blue); }

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-header-left {}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Section séparateur ───────────────────────────────────── */
.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Info Grid (détail service/domaine) ───────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-item {
  background: var(--bg-card);
  padding: 16px 18px;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.info-value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

/* ── Progress bars ────────────────────────────────────────── */
.progress-wrap { margin-top: 6px; }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-label { font-size: 0.72rem; color: var(--text-muted); }
.progress-value { font-size: 0.72rem; color: var(--text-secondary); font-weight: 600; }
.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--purple-600), var(--purple-300));
  transition: width 0.5s ease;
}
.progress-fill.danger { background: linear-gradient(90deg, #c0392b, var(--red)); }
.progress-fill.warning { background: linear-gradient(90deg, #d68910, var(--yellow)); }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(154,91,255,0.08);
  border: 1px solid var(--border-active);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--purple);
}

.empty-icon svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }

/* ── Timeline / Activity ──────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-dot svg { width: 15px; height: 15px; }
.activity-dot.purple { background: rgba(154,91,255,0.12); color: var(--purple-300); }
.activity-dot.green  { background: var(--green-bg); color: var(--green); }
.activity-dot.red    { background: var(--red-bg); color: var(--red); }
.activity-dot.blue   { background: var(--blue-bg); color: var(--blue); }
.activity-dot.yellow { background: var(--yellow-bg); color: var(--yellow); }

.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  background: transparent;
  font-family: 'Geist', system-ui, sans-serif;
}

.tab-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }

.tab-btn.active {
  background: var(--purple-glow-sm);
  color: var(--purple-300);
  box-shadow: inset 0 0 0 1px var(--border-active);
}

/* ── Notification Dropdown ────────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.notif-dropdown.open { display: block; animation: fadeDown 0.15s ease; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-header h3 { font-size: 0.875rem; font-weight: 700; }
.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
  text-decoration: none;
}

.notif-item:hover { background: rgba(154,91,255,0.05); }

.notif-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.notif-icon svg { width: 16px; height: 16px; }

.notif-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.notif-text strong { color: var(--text-primary); }
.notif-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  transform: scale(0.97);
  transition: var(--transition);
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── Toast notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  animation: slideUp 0.3s ease;
  transition: var(--transition);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--yellow); }
.toast.info    { border-left: 3px solid var(--purple); }

.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--yellow); }
.toast.info    .toast-icon { color: var(--purple); }
.toast-text { flex: 1; color: var(--text-secondary); }
.toast-text strong { color: var(--text-primary); display: block; margin-bottom: 1px; }

/* ── Highlight / Glow Cards ───────────────────────────────── */
.glow-card {
  background: linear-gradient(135deg, rgba(154,91,255,0.1) 0%, rgba(154,91,255,0.03) 100%);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(154,91,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
}

/* ── Credit Display ───────────────────────────────────────── */
.credit-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(34,197,94,0.08) 0%, rgba(34,197,94,0.03) 100%);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
}

.credit-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}

/* ── Service Card ─────────────────────────────────────────── */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: rgba(154,91,255,0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.service-card-header {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.service-card-body {
  padding: 16px 20px;
  flex: 1;
}

.service-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-type-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-glow-sm);
  border: 1px solid var(--border-active);
  color: var(--purple-300);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Domain Card ──────────────────────────────────────────── */
.domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.domain-card:hover {
  border-color: rgba(154,91,255,0.2);
  transform: translateY(-1px);
}

.domain-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* ── Invoice Row ──────────────────────────────────────────── */
.invoice-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ── Search bar ───────────────────────────────────────────── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-bar input {
  padding-left: 38px;
  font-size: 0.85rem;
}

.search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Filter row ───────────────────────────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-row select { width: auto; font-size: 0.825rem; padding: 8px 32px 8px 12px; }

/* ── Two factor / Security ────────────────────────────────── */
.security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.security-item:last-child { border-bottom: none; }

.security-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.security-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.security-icon.enabled { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.security-icon.disabled { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }
.security-icon.warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245,158,11,0.2); }

.security-icon svg { width: 18px; height: 18px; }

.security-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.security-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Affiliate Cards ──────────────────────────────────────── */
.affiliate-stat {
  text-align: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

.affiliate-stat .value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.affiliate-stat .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Quote card ───────────────────────────────────────────── */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.quote-card:hover { border-color: rgba(154,91,255,0.15); }

.quote-card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.quote-card-body { padding: 16px 20px; }
.quote-card-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* ── Login & Auth Pages ───────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(154,91,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(154,91,255,0.06) 0%, transparent 50%);
}

.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
}

.auth-logo .logo-text { font-size: 1.4rem; }

.auth-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer-link {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-footer-link a { color: var(--purple); text-decoration: none; font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Ticket message bubbles ───────────────────────────────── */
.msg-bubble {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  max-width: 85%;
  position: relative;
}

.msg-bubble.client {
  background: var(--purple-glow-sm);
  border: 1px solid var(--border-active);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.msg-bubble.support {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.msg-author { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.msg-time   { font-size: 0.72rem; color: var(--text-muted); }
.msg-text   { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
}

.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.page-btn.active { background: var(--purple-glow-sm); border-color: var(--border-active); color: var(--purple-300); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Misc ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.spacer-sm { height: 12px; }
.spacer-md { height: 20px; }
.spacer-lg { height: 32px; }

.text-sm     { font-size: 0.825rem; }
.text-xs     { font-size: 0.73rem; }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--purple-300); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-mono   { font-family: 'JetBrains Mono', monospace; }
.font-bold   { font-weight: 700; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.ml-auto     { margin-left: auto; }

/* ── Scroll ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(154,91,255,0.3); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  .main-content { margin-left: 0; width: 100%; max-width: 100%; }
  .page-body { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  /*.form-row { grid-template-columns: 1fr; }*/
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .filter-row { flex-direction: column; align-items: flex-start; }
}

/* ── Animations subtiles ──────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Fade in pour les pages */
.page-body { animation: pageFade 0.2s ease; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HOSTINITY — Responsive
   ============================================================ */

@media (max-width: 768px) {

  /* ══════════════════════════════════════════════════════════
     tools
     ══════════════════════════════════════════════════════════ */
  .tools-tabs {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box !important;
  }
  .tools-tabs::-webkit-scrollbar { display: none; }

  .tools-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: .75rem !important;
  }
  
 /* ══════════════════════════════════════════════════════════
     profil
     ══════════════════════════════════════════════════════════ */
	 
.kb-grid {
  grid-template-columns: 1fr !important;
}

/* ══════════════════════════════════════════════════════════
     commande
     ══════════════════════════════════════════════════════════ */
	 
.order-grid {
  grid-template-columns: 1fr !important;
}

.order-grid div[style*="position:sticky"] {
  position: static !important;
}

.step-label {
    display: none !important;
  }


  div[style*="flex:1;display:flex;align-items:center;justify-content:center"] {
    padding: 12px 6px !important;
  }

  /* ══════════════════════════════════════════════════════════
     profile
     ══════════════════════════════════════════════════════════ */
  .tabs {
  width: 100% !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
  .tabs::-webkit-scrollbar { display: none; }

  .tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: .78rem !important;
    padding: 8px 12px !important;
  }

  /* ── Grille principale profil : sidebar passe en dessous ── */
  .profile-grid-main {
    grid-template-columns: 1fr !important;
  }

  /* ── Grille contacts/notifs : 1fr 1fr → colonne ── */
  .profile-grid-half {
    grid-template-columns: 1fr !important;
  }
}