/* ============================================
   BCorp — Design System & Styles
   Mobile-first · Inter · Accent #2e7dff
   Inspired by Intelly Dashboard
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: #1a1a1a;
  background-color: #f7f7f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

img, video, svg { display: block; max-width: 100%; }
a { color: #2e7dff; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #1a5fd6; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }

/* ── Typographie ──────────────────────────── */

h1, h2, h3, h4 { font-weight: 900; line-height: 1.15; color: #1a1a1a; }
h1 { font-size: 1.8rem; letter-spacing: -0.04em; }
h2 { font-size: 1.4rem; letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
h4 { font-size: 1rem; letter-spacing: -0.02em; }
p { color: #444444; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-muted { color: #999999; }
.text-accent { color: #2e7dff; }
.text-small { font-size: 0.85rem; }

.label, .caps {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #999999;
}

/* ── Layout ───────────────────────────────── */

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }

/* ── Grid ─────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

/* ============================================
   SIDEBAR LAYOUT (Admin)
   ============================================ */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────── */
.sidebar {
  width: 260px;
  background-color: #1a1a1a;
  color: #ffffff;
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  padding: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 32px 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-brand img {
  height: 80px;
  width: auto;
  max-width: 100%;
  display: block;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 16px 12px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.sidebar-link:hover {
  background-color: rgba(255,255,255,0.08);
  color: #ffffff;
}

.sidebar-link.active {
  background-color: rgba(123, 156, 255, 0.15);
  color: #7b9cff;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b9cff, #2e7dff);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #ffffff;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
}

/* ── Mobile topbar (visible only on mobile) ── */
.topbar-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.topbar-brand img {
  height: 38px;
  width: auto;
  display: block;
}

.hamburger {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #1a1a1a;
  cursor: pointer;
}

/* Sidebar overlay mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 199;
  display: none;
}

.sidebar-overlay.active { display: block; }
.sidebar.open { display: flex; }

/* ── Main content ─────────────────────────── */
.main-content {
  flex: 1;
  min-height: 100vh;
}

.main-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.btn i { font-size: 1rem; }

.btn-primary { background-color: #2e7dff; color: #ffffff; }
.btn-primary:hover { background-color: #1a5fd6; color: #ffffff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46, 125, 255, 0.25); }

.btn-secondary { background-color: #ffffff; color: #1a1a1a; border: 1.5px solid rgba(0,0,0,0.1); }
.btn-secondary:hover { border-color: #2e7dff; color: #2e7dff; transform: translateY(-1px); }


.btn-ghost { background-color: transparent; color: #444444; padding: 8px 16px; }
.btn-ghost:hover { background-color: rgba(0,0,0,0.04); color: #1a1a1a; }

.btn-danger { background-color: #ff5c5c; color: #ffffff; }
.btn-danger:hover { background-color: #e04444; color: #ffffff; transform: translateY(-1px); }

.btn-success { background-color: #22c55e; color: #ffffff; }
.btn-success:hover { background-color: #16a34a; color: #ffffff; transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 10px; }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }


/* ============================================
   COLORFUL STAT CARDS (Intelly style)
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.stat-card-default {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label i {
  font-size: 1rem;
  color: #2e7dff;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #1a1a1a;
  line-height: 1;
}

.stat-sub {
  font-size: 0.8rem;
  color: rgba(0,0,0,0.4);
  margin-top: 6px;
  font-weight: 500;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 24px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card-flat {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}


.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  white-space: nowrap;
}

.badge i { font-size: 0.65rem; }

.badge-accent { background-color: rgba(46,125,255,0.08); color: #2e7dff; }
.badge-success { background-color: rgba(34,197,94,0.1); color: #166534; }
.badge-warning { background-color: rgba(245,158,11,0.1); color: #92400e; }
.badge-danger { background-color: rgba(220,38,38,0.08); color: #dc2626; }
.badge-neutral { background-color: #f0f0ee; color: #666666; }

/* ============================================
   FORMULAIRES
   ============================================ */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  background-color: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #1a1a1a;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #2e7dff;
  box-shadow: 0 0 0 4px rgba(46,125,255,0.06);
}

.form-input::placeholder, .form-textarea::placeholder { color: #bbbbbb; }
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { font-size: 0.85rem; color: #dc3545; margin-top: 6px; }
.form-hint { font-size: 0.85rem; color: #999999; margin-top: 6px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */

.progress-bar {
  width: 100%; height: 6px;
  background-color: rgba(0,0,0,0.05);
  border-radius: 100px; overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e7dff, #7b9cff);
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 24px 0;
  padding: 0 4px;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 16px; left: 20px; right: 20px;
  height: 3px;
  background-color: rgba(0,0,0,0.06);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.progress-step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2.5px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  font-size: 0.7rem;
  font-weight: 700;
  color: #bbbbbb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.progress-step.active .progress-step-dot {
  border-color: #2e7dff;
  background-color: #2e7dff;
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(46,125,255,0.12);
}

.progress-step.completed .progress-step-dot {
  border-color: #22c55e;
  background-color: #22c55e;
  color: #ffffff;
}

.progress-step-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: #bbbbbb;
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
  word-break: break-word;
}

/* Sur très petit écran, cacher les labels des étapes */
@media (max-width: 480px) {
  .progress-step-label { display: none; }
  .progress-step-dot { width: 28px; height: 28px; font-size: 0.6rem; }
}

/* Carte sans hover (historique, statique) */
.card-static {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.progress-step.active .progress-step-label { color: #2e7dff; }
.progress-step.completed .progress-step-label { color: #16a34a; }

/* ============================================
   AVATAR
   ============================================ */

.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #2e7dff;
  font-weight: 900; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }

/* ============================================
   NAVBAR (Client / Landing)
   ============================================ */

.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
}

.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 76px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-brand img {
  height: 44px;
  width: auto;
  display: block;
}
.navbar-actions { display: flex; align-items: center; gap: 8px; }
.navbar-user { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.navbar-user-name { font-weight: 600; font-size: 0.9rem; color: #1a1a1a; display: none; }

/* ============================================
   MODALE
   ============================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background-color: #ffffff;
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background-color: #f0f0ee;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.2rem; color: #444444;
  transition: background-color 0.2s ease; border: none;
}

.modal-close:hover { background-color: #e0e0dd; }
.modal-body { margin-bottom: 20px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; }

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-zone {
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 24px;
  padding: 48px 20px;
  text-align: center;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: #2e7dff;
  background-color: rgba(46,125,255,0.04);
}

.upload-zone-icon { font-size: 2.5rem; margin-bottom: 12px; color: #2e7dff; opacity: 0.4; }
.upload-zone-text { font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.upload-zone-hint { font-size: 0.85rem; color: #999999; }

/* ============================================
   FILE LIST
   ============================================ */

.file-list { display: flex; flex-direction: column; gap: 8px; }

.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px; gap: 12px;
  transition: all 0.2s ease;
}

.file-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.04); }

.file-item-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }

.file-item-icon {
  width: 42px; height: 42px; border-radius: 14px;
  background-color: rgba(46,125,255,0.06); color: #2e7dff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.1rem;
}

.file-item-thumb {
  width: 42px; height: 42px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.file-item-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.2s;
}

.file-item-thumb:hover img { transform: scale(1.15); }

.file-item-name { font-weight: 600; font-size: 0.9rem; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item-size { font-size: 0.8rem; color: #999999; }

/* ============================================
   SELECTABLE CARDS
   ============================================ */

.selectable-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.selectable-card {
  background-color: #ffffff;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.selectable-card:hover { border-color: rgba(46,125,255,0.2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.04); }
.selectable-card.selected { border-color: #2e7dff; background-color: rgba(46,125,255,0.04); box-shadow: 0 0 0 3px rgba(46,125,255,0.08); }
.selectable-card-icon { font-size: 1.8rem; margin-bottom: 10px; color: #2e7dff; }
.selectable-card-label { font-weight: 700; font-size: 0.85rem; color: #1a1a1a; }

/* ============================================
   TIMELINE
   ============================================ */

.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background-color: #2e7dff; flex-shrink: 0; margin-top: 6px;
}

.timeline-dot.success { background-color: #22c55e; }
.timeline-dot.warning { background-color: #f59e0b; }

.timeline-content { flex: 1; }
.timeline-text { font-size: 0.88rem; color: #1a1a1a; margin-bottom: 2px; }
.timeline-date { font-size: 0.78rem; color: #999999; }

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}

.section-title {
  font-size: 1.05rem; font-weight: 900;
  letter-spacing: -0.02em; color: #1a1a1a;
  display: flex; align-items: center; gap: 10px;
}

.section-title i { font-size: 1.15rem; color: #2e7dff; opacity: 0.6; }

.section-count {
  background-color: rgba(46,125,255,0.08);
  color: #2e7dff;
  font-weight: 700; font-size: 0.72rem;
  padding: 3px 12px; border-radius: 100px;
}

/* ============================================
   VERIFIED BADGE / WELCOME / PILLS
   ============================================ */

.verified-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background-color: rgba(34,197,94,0.08);
  color: #166534;
  border-radius: 14px;
  font-weight: 600; font-size: 0.85rem;
  margin-bottom: 24px;
}

.verified-badge i { font-size: 1rem; }

.welcome-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0; gap: 16px;
}

.welcome-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.welcome-name { font-weight: 900; font-size: 1.1rem; color: #1a1a1a; }
.welcome-company { font-size: 0.85rem; color: #999999; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 100px;
  border: 1.5px solid rgba(0,0,0,0.06);
  color: #444444;
  background-color: #ffffff;
}

.pill i { font-size: 0.6rem; }
.pill-court { border-color: rgba(46,125,255,0.15); color: #2e7dff; background-color: rgba(46,125,255,0.06); }
.pill-complet { border-color: rgba(100,100,100,0.15); color: #444444; background-color: rgba(0,0,0,0.04); }

/* ============================================
   LIVRABLE ITEMS
   ============================================ */

.livrable-item {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.livrable-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.livrable-item.validated { opacity: 0.45; }
.livrable-info { display: flex; align-items: center; gap: 12px; }
.livrable-actions { display: flex; gap: 8px; }

/* ============================================
   DEMANDE ITEMS
   ============================================ */

.demande-item {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.demande-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.demande-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.demande-client { font-weight: 700; color: #1a1a1a; }
.demande-description { font-size: 0.9rem; color: #444444; line-height: 1.6; }
.demande-actions { display: flex; gap: 8px; }

/* ============================================
   EMPTY STATE / DIVIDER / TOAST / LOADER
   ============================================ */

.divider { height: 1px; background-color: rgba(0,0,0,0.06); margin: 24px 0; }

.empty-state {
  text-align: center; padding: 56px 20px;
  background-color: #ffffff;
  border: 2px dashed rgba(0,0,0,0.06);
  border-radius: 24px;
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 16px; color: #bbbbbb; }
.empty-state-title { font-weight: 700; font-size: 1rem; color: #1a1a1a; margin-bottom: 8px; }
.empty-state-text { font-size: 0.88rem; color: #999999; }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1a1a1a; color: #ffffff;
  padding: 14px 28px; border-radius: 16px;
  font-weight: 600; font-size: 0.9rem;
  z-index: 2000; opacity: 0;
  transition: transform 0.35s cubic-bezier(0.32,0.72,0,1), opacity 0.3s ease;
  max-width: calc(100% - 40px); text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast-success { background-color: #16a34a; }
.toast.toast-error { background-color: #dc2626; }

.spinner { width: 24px; height: 24px; border: 3px solid rgba(0,0,0,0.06); border-top-color: #2e7dff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   PAGE LAYOUT
   ============================================ */

.page-header { padding: 32px 0 20px; }
.page-header h1 { margin-bottom: 4px; }
.page-header p { font-size: 0.9rem; color: #999999; margin-bottom: 0; }
.page-content { padding-bottom: 60px; }
.page-section { margin-bottom: 36px; }

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
  background-color: #f7f7f5;
}

.login-card {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 28px;
  padding: 40px 24px;
  width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}

.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 90px; width: auto; max-width: 100%; display: inline-block; }
.login-logo h1 { font-size: 1.8rem; }
.login-title { text-align: center; margin-bottom: 32px; }
.login-title h2 { margin-bottom: 8px; }
.login-title p { font-size: 0.9rem; }

/* ============================================
   LANDING PAGE
   ============================================ */

.hero {
  padding: 80px 0 60px; text-align: center; background-color: #ffffff;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 16px; letter-spacing: -0.05em; }
.hero p { font-size: 1.1rem; color: #444444; max-width: 500px; margin: 0 auto 32px; }
.hero .btn-group { justify-content: center; }

.services-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.service-card {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.25s ease;
}

.service-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); transform: translateY(-4px); }

.service-icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 20px;
}

.service-card .service-icon { background-color: rgba(46,125,255,0.06); color: #2e7dff; }

.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 0.9rem; }

.cta-block {
  background: rgba(46,125,255,0.04);
  border: 1px solid rgba(46,125,255,0.1);
  border-radius: 28px;
  padding: 48px 24px;
  text-align: center;
}

.cta-block h2 { margin-bottom: 12px; }
.cta-block p { margin-bottom: 24px; }

.footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 32px 0; text-align: center;
}
.footer p { font-size: 0.85rem; color: #999999; }


/* ============================================
   ANIMATIONS
   ============================================ */

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

.fade-up { animation: fadeUp 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.fade-up-delay-1 { animation-delay: 0.06s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.12s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.18s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.24s; opacity: 0; }
.fade-up-delay-5 { animation-delay: 0.30s; opacity: 0; }

/* ============================================
   UTILITIES
   ============================================ */

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.text-center { text-align: center; } .text-right { text-align: right; }
.w-full { width: 100%; } .hidden { display: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 100px; }

/* ============================================
   RESPONSIVE — Tablet (768px)
   ============================================ */

@media (min-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }

  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }

  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  .navbar-user-name { display: block; }

  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 28px; max-width: 560px; padding: 36px; }

  .hero h1 { font-size: 3.2rem; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .login-card { padding: 48px 40px; }

  .livrable-item, .demande-item {
    flex-direction: row; align-items: center; justify-content: space-between;
  }

  .selectable-cards { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   RESPONSIVE — Desktop (1024px)
   ============================================ */

@media (min-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }

  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }

  .section { padding: 80px 0; }
  .hero { padding: 120px 0 80px; }
  .hero h1 { font-size: 3.8rem; }
  .cta-block { padding: 64px 48px; }

  /* Sidebar visible on desktop */
  .sidebar { display: flex; }
  .topbar-mobile { display: none; }
  .main-content { margin-left: 260px; }
  .main-inner { padding: 0 40px 60px; }
}

/* ============================================
   SIDEBAR BADGES & SEARCH
   ============================================ */

.sidebar-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 50px;
  margin-left: auto;
  text-align: center;
  line-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-search {
  padding: 16px 20px 8px;
  position: relative;
}

.sidebar-search-input {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0 12px;
  transition: background 0.2s;
}

.sidebar-search-input:focus-within {
  background: rgba(255,255,255,0.14);
}

.sidebar-search-input i {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin-right: 8px;
}

.sidebar-search-input input {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  padding: 10px 0;
  font-size: 0.82rem;
  outline: none;
}

.sidebar-search-input input::placeholder {
  color: rgba(255,255,255,0.35);
}

.sidebar-search-results {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: none;
}

.sidebar-search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #ddd;
  text-decoration: none;
  font-size: 0.82rem;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.search-result-item i {
  font-size: 0.9rem;
  opacity: 0.5;
  width: 16px;
  text-align: center;
}

.search-result-item .search-type {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.search-no-results {
  padding: 16px;
  color: rgba(255,255,255,0.35);
  font-size: 0.82rem;
  text-align: center;
}

/* ============================================
   MODAL ANIMATIONS (fadeUp)
   ============================================ */

.modal-overlay {
  transition: opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay .modal {
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ============================================
   UPLOAD PROGRESS BAR
   ============================================ */

.upload-progress-container {
  margin-top: 12px;
}

.upload-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

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

.upload-progress-info {
  flex: 1;
  min-width: 0;
}

.upload-progress-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-progress-bar {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.upload-progress-fill {
  height: 100%;
  background: #2e7dff;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-progress-fill.complete {
  background: #22c55e;
}

.upload-progress-fill.error {
  background: #dc2626;
}

.upload-progress-status {
  font-size: 0.75rem;
  color: #999;
  white-space: nowrap;
}

/* ============================================
   FILE PREVIEW
   ============================================ */

.file-preview-container {
  position: relative;
  cursor: pointer;
}

.file-preview-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f7f7f5;
  border: 1px solid rgba(0,0,0,0.06);
}

.file-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.file-preview-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.file-preview-overlay img,
.file-preview-overlay iframe {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.file-preview-overlay iframe {
  width: 80vw;
  height: 85vh;
  background: #fff;
}

.file-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.file-preview-close:hover {
  background: rgba(255,255,255,0.3);
}

/* Navbar user logo */
.navbar-user-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

/* Client tabs navigation */
.client-tabs {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 90;
  margin-bottom: 24px;
}

.client-tabs-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.client-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #999;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.client-tab:hover {
  color: #111;
}

.client-tab.active {
  color: #2e7dff;
  border-bottom-color: #2e7dff;
}

.client-tab i {
  font-size: 1rem;
}

.client-tab-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  line-height: 16px;
}

@media (max-width: 480px) {
  .client-tab { padding: 12px 14px; font-size: 0.8rem; }
  .client-tab span { display: none; }
  .client-tab i { font-size: 1.2rem; }
}

/* Welcome logo */
.welcome-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}

.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   CLIENT DASHBOARD SUMMARY CARDS
   ============================================ */

.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
}

.summary-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(46,125,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2e7dff;
  font-size: 1rem;
  margin-bottom: 12px;
}

.summary-card-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #111;
  line-height: 1;
}

.summary-card-label {
  font-size: 0.75rem;
  color: #999;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

@media (min-width: 768px) {
  .summary-cards { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   CLIENT CARDS GRID
   ============================================ */

.client-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .client-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .client-grid { grid-template-columns: repeat(3, 1fr); }
}

.client-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.client-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border-color: rgba(46,125,255,0.15);
}

.client-card.inactive {
  opacity: 0.55;
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 0;
}

.client-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.client-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-card-initials {
  font-size: 1.1rem;
  font-weight: 800;
  color: #bbb;
  letter-spacing: 0.03em;
}

.client-card-body {
  padding: 4px 0 0;
  flex: 1;
  min-width: 0;
}

.client-card-name {
  font-weight: 800;
  font-size: 1rem;
  color: #111;
  line-height: 1.3;
}

.client-card-contact {
  font-size: 0.82rem;
  color: #666;
  margin-top: 2px;
}

.client-card-email {
  font-size: 0.78rem;
  color: #999;
  margin-top: 4px;
}

.client-card-footer {
  padding: 10px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-card-stat {
  font-size: 0.75rem;
  color: #999;
  font-weight: 600;
}

/* ── Client Card V2 (enriched) ──────────── */
.client-card-v2 {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.client-card-v2:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border-color: rgba(46,125,255,0.15);
}

.client-card-v2.inactive {
  opacity: 0.6;
}

.client-card-v2-status {
  height: 4px;
  width: 100%;
}

.client-card-v2-status.status-active {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.client-card-v2-status.status-inactive {
  background: #d4d4d4;
}

.client-card-v2-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 12px;
  text-decoration: none;
  color: inherit;
}

.client-card-v2-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f0f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.client-card-v2-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.client-card-v2-initials {
  font-size: 1.2rem;
  font-weight: 800;
  color: #bbb;
  letter-spacing: 0.03em;
}

.client-card-v2-info {
  flex: 1;
  min-width: 0;
}

.client-card-v2-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #111;
  line-height: 1.3;
}

.client-card-v2-contact {
  font-size: 0.82rem;
  color: #666;
  margin-top: 1px;
}

.client-card-v2-meta {
  font-size: 0.78rem;
  color: #999;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.client-card-v2-meta i {
  font-size: 0.7rem;
}

.client-card-v2-stats {
  display: flex;
  gap: 0;
  padding: 0 18px;
  margin: 4px 0 8px;
}

.client-card-v2-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f7f7f5;
  border-radius: 10px;
  margin-right: 8px;
}

.client-card-v2-stat-value {
  font-weight: 800;
  font-size: 1.1rem;
  color: #2e7dff;
}

.client-card-v2-stat-label {
  font-size: 0.72rem;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-card-v2-stat-alert {
  background: #fff3e6;
}

.client-card-v2-stat-alert .client-card-v2-stat-value {
  color: #e67e22;
}

.client-card-v2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(0,0,0,0.04);
}

.client-card-v2-since {
  font-size: 0.72rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.client-card-v2-since i {
  font-size: 0.7rem;
}

.client-card-v2-actions {
  display: flex;
  gap: 4px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-icon:hover {
  background: #f0f0ed;
  border-color: rgba(0,0,0,0.12);
  color: #2e7dff;
}

.btn-icon-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ── Client List (row-based) ────────────── */
.client-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

.client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  flex-wrap: wrap;
}

.client-row:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.client-row:hover {
  background: #f7f7f5;
}

.client-row.inactive {
  opacity: 0.5;
}

.client-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 200px;
}

.client-row-indicator {
  width: 4px;
  height: 36px;
  border-radius: 4px;
  background: #d4d4d4;
  flex-shrink: 0;
}

.client-row-indicator.active {
  background: #22c55e;
}

.client-row-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f0f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.client-row-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.client-row-logo span {
  font-size: 0.85rem;
  font-weight: 800;
  color: #bbb;
}

.client-row-info {
  min-width: 0;
}

.client-row-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-sub {
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.client-row-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.client-row-tva {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #888;
  font-weight: 600;
}

.client-row-stat {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2e7dff;
  background: rgba(46,125,255,0.06);
  padding: 4px 10px;
  border-radius: 8px;
}

.client-row-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e67e22;
  background: #fff3e6;
  padding: 4px 10px;
  border-radius: 8px;
}

.client-row-since {
  font-size: 0.72rem;
  color: #aaa;
  font-weight: 600;
  white-space: nowrap;
}

.client-row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .client-row-center {
    display: none;
  }
  .client-row {
    padding: 14px 16px;
  }
}

/* Logo upload dans la fiche client */
.logo-upload-zone {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: #f7f7f5;
  border: 2px dashed rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}

.logo-upload-zone:hover {
  border-color: #2e7dff;
  background: rgba(46,125,255,0.03);
}

.logo-upload-zone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.logo-upload-zone .logo-placeholder {
  text-align: center;
  color: #bbb;
  font-size: 0.7rem;
  line-height: 1.4;
}

.logo-upload-zone .logo-placeholder i {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 4px;
}

/* ============================================
   FOLDER GRID (dossiers visuels)
   ============================================ */

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .folder-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .folder-grid { grid-template-columns: repeat(4, 1fr); }
}

.folder-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: block;
}

.folder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  border-color: rgba(46,125,255,0.15);
}

.folder-card-cover {
  position: relative;
  width: 100%;
  padding-top: 65%;
  background: #f7f7f5;
  overflow: hidden;
}

.folder-card-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.folder-card:hover .folder-card-cover img {
  transform: scale(1.05);
}

.folder-card-cover-empty {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.folder-card-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.folder-card-info {
  padding: 12px 14px;
}

.folder-card-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-card-meta {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

/* ============================================
   FILE THUMBNAIL GRID (contenu dossier)
   ============================================ */

.file-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 768px) {
  .file-thumb-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .file-thumb-grid { grid-template-columns: repeat(4, 1fr); }
}

.file-thumb-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.file-thumb-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-color: rgba(46,125,255,0.12);
}

.file-thumb-img {
  width: 100%;
  padding-top: 75%;
  position: relative;
  background: #f7f7f5;
  cursor: pointer;
  overflow: hidden;
}

.file-thumb-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.file-thumb-img:hover img {
  transform: scale(1.06);
}

.file-thumb-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.file-thumb-icon i,
.file-thumb-icon span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.file-thumb-icon span {
  top: calc(50% + 20px);
}

.file-thumb-info {
  padding: 10px 12px 4px;
}

.file-thumb-name {
  font-weight: 600;
  font-size: 0.78rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-thumb-meta {
  font-size: 0.7rem;
  color: #999;
  margin-top: 2px;
}

.file-thumb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding: 4px 8px 8px;
}

.file-thumb-actions .btn {
  padding: 4px 8px;
}

/* ============================================
   BILLING INFO
   ============================================ */

.billing-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.billing-detail-item .label {
  margin-bottom: 4px;
  display: block;
}

.billing-detail-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #111;
  line-height: 1.5;
}

.billing-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .billing-detail-grid { grid-template-columns: 1fr; }
  .billing-form-grid { grid-template-columns: 1fr; }
  .billing-form-grid .form-group { grid-column: auto !important; }
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: rgba(46,125,255,0.08);
  color: #2e7dff;
}

.pagination .active {
  background: #2e7dff;
  color: #fff;
}

.pagination .disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================
   CHAT DRAWER
   ============================================ */

.chat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  display: none;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}

.chat-drawer-overlay.open {
  display: flex;
}

.chat-drawer {
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.chat-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e1e3e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.chat-drawer-header h3 {
  font-size: 1.05rem;
  margin: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f7f7f5;
}

.chat-msg {
  display: flex;
}

.chat-msg-admin {
  justify-content: flex-end;
}

.chat-msg-client {
  justify-content: flex-start;
}

.chat-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  position: relative;
}

.chat-msg-admin .chat-msg-bubble {
  background: #2e7dff;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-msg-client .chat-msg-bubble {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #e1e3e4;
  border-bottom-left-radius: 4px;
}

.chat-msg-author {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  opacity: 0.7;
}

.chat-msg-text {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg-time {
  font-size: 0.65rem;
  opacity: 0.5;
  margin-top: 4px;
  text-align: right;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid #e1e3e4;
  display: flex;
  gap: 8px;
  background: #ffffff;
}

.chat-input-area .form-input {
  flex: 1;
  border-radius: 24px;
  padding: 10px 18px;
}

.chat-input-area .btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================
   CALENDAR
   ============================================ */

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.calendar-month-label {
  font-size: 1.2rem;
  min-width: 200px;
  text-align: center;
}

.calendar-container {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e1e3e4;
  overflow: hidden;
  margin-bottom: 32px;
}

.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f7f7f5;
  border-bottom: 1px solid #e1e3e4;
}

.calendar-day-name {
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999999;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
  aspect-ratio: 1;
  padding: 8px;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
  position: relative;
}

.calendar-cell:hover {
  background: #f7f7f5;
}

.calendar-cell.today .calendar-cell-day {
  background: #2e7dff;
  color: #ffffff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell.selected {
  background: rgba(46,125,255,0.06);
}

.calendar-cell-empty {
  cursor: default;
  background: #fafafa;
}

.calendar-cell-day {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333333;
}

.calendar-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}

.calendar-dot-more {
  font-size: 0.6rem;
  color: #999;
  font-weight: 600;
}

/* Event cards */
.event-card {
  background: #ffffff;
  border: 1px solid #e1e3e4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.event-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.event-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.event-card-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.event-card-info {
  flex: 1;
}

.event-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.event-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-card-desc {
  margin: 8px 0 0 32px;
  color: #666666;
}

.event-card-notes {
  margin: 6px 0 0 32px;
  font-size: 0.8rem;
  color: #b8860b;
  background: #fffbe6;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #f0e6b0;
  display: inline-block;
}

.pill-sm {
  font-size: 0.65rem;
  padding: 2px 8px;
}

/* Color picker */
.color-picker-row {
  display: flex;
  gap: 8px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.selected {
  border-color: #1a1a1a;
  transform: scale(1.15);
}

/* Form row for side-by-side inputs */
.form-row {
  display: flex;
  gap: 12px;
}

/* Empty state inline */
.empty-state-inline {
  text-align: center;
  padding: 24px;
  background: #f7f7f5;
  border-radius: 12px;
  border: 1px dashed #d5d5d5;
}

/* Modal footer */
.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid #e1e3e4;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Responsive calendar */
@media (max-width: 600px) {
  .calendar-cell {
    aspect-ratio: auto;
    min-height: 48px;
    padding: 4px;
  }
  .calendar-cell-day {
    font-size: 0.75rem;
  }
  .calendar-dot {
    width: 4px;
    height: 4px;
  }
  .chat-drawer {
    width: 100vw;
  }
  .calendar-month-label {
    font-size: 1rem;
    min-width: 160px;
  }
}

/* ── Galerie ────────────────────────────── */
.galerie-client-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.galerie-client-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #ffffff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #444;
  transition: all 0.2s;
}

.galerie-client-pill:hover {
  border-color: rgba(46,125,255,0.2);
  background: #f7f7f5;
}

.galerie-client-pill.active {
  background: #2e7dff;
  color: #fff;
  border-color: #2e7dff;
}

.galerie-pill-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}

.galerie-pill-count {
  background: rgba(0,0,0,0.08);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.galerie-client-pill.active .galerie-pill-count {
  background: rgba(255,255,255,0.2);
}

.galerie-category {
  margin-bottom: 24px;
}

.galerie-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.galerie-category-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.galerie-category-count {
  background: #f0f0ed;
  color: #666;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .galerie-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .galerie-grid { grid-template-columns: repeat(4, 1fr); }
}

.galerie-item {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: all 0.25s;
}

.galerie-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  border-color: rgba(46,125,255,0.12);
}

.galerie-item-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: #f7f7f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galerie-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.galerie-item:hover .galerie-item-thumb img {
  transform: scale(1.05);
}

.galerie-item-file-icon {
  font-size: 2.5rem;
  color: #ccc;
}

.galerie-item-info {
  padding: 10px 12px 4px;
}

.galerie-item-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.galerie-item-meta {
  font-size: 0.72rem;
  color: #999;
  margin-top: 2px;
}

.galerie-item-actions {
  padding: 4px 12px 10px;
  display: flex;
  gap: 4px;
}

/* ── Categorie selector (radio cards) ──── */
.categorie-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.categorie-option input[type="radio"] {
  display: none;
}

.categorie-option-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.08);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.categorie-option-inner:hover {
  border-color: rgba(46,125,255,0.2);
}

.categorie-option input[type="radio"]:checked + .categorie-option-inner {
  border-color: #2e7dff;
  background: rgba(46,125,255,0.06);
  color: #2e7dff;
}

/* ── Lightbox ───────────────────────────── */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 16px;
  font-weight: 500;
  text-align: center;
}

/* ── Delivered project cards ────────────── */
.delivered-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .delivered-grid { grid-template-columns: repeat(2, 1fr); }
}

.delivered-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid #d4edda;
  overflow: hidden;
  display: flex;
  transition: all 0.25s;
}

.delivered-card:hover {
  box-shadow: 0 4px 16px rgba(34,197,94,0.1);
  border-color: #22c55e;
}

.delivered-card-check {
  width: 48px;
  min-height: 100%;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.delivered-card-body {
  flex: 1;
  padding: 16px;
  min-width: 0;
}

.delivered-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.delivered-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.delivered-card-date {
  font-size: 0.75rem;
  color: #16a34a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.delivered-card-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.delivered-file {
  background: #f7f7f5;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
  min-width: 100px;
  max-width: 160px;
}

.delivered-file-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eee;
}

.delivered-file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.delivered-file:hover .delivered-file-thumb img {
  transform: scale(1.05);
}

.delivered-file-info {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.delivered-file-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── Delivered card compact (admin) ─────── */
.delivered-card-compact {
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid #d4edda;
  padding: 14px 16px;
  transition: all 0.2s;
}

.delivered-card-compact:hover {
  border-color: #22c55e;
  box-shadow: 0 2px 12px rgba(34,197,94,0.08);
}

.delivered-compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.delivered-compact-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
}

.delivered-compact-date {
  font-size: 0.72rem;
  color: #16a34a;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.delivered-compact-files {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.delivered-compact-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.06);
}

.delivered-compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.delivered-compact-thumb:hover img {
  transform: scale(1.1);
}

.delivered-compact-file-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f7f7f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #999;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06);
}

/* ── Messages layout (admin) ────────────── */
.messages-layout {
  display: flex;
  gap: 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.messages-sidebar {
  width: 280px;
  border-right: 1px solid rgba(0,0,0,0.06);
  overflow-y: auto;
  flex-shrink: 0;
}

.messages-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.msg-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.msg-contact:hover { background: #f7f7f5; }
.msg-contact.active { background: rgba(46,125,255,0.06); }
.msg-contact-unread { background: rgba(46,125,255,0.03); }

.msg-contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 800;
  color: #999;
}

.msg-contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.msg-contact-info {
  flex: 1;
  min-width: 0;
}

.msg-contact-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-contact-time {
  font-size: 0.7rem;
  color: #999;
}

.msg-contact-badge {
  background: #2e7dff;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.messages-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.messages-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.messages-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.messages-chat-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.messages-chat .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.messages-chat .chat-input-area {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 12px 20px;
}

/* Client full-width chat */
.messages-fullchat {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.messages-fullchat .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  max-height: calc(100vh - 320px);
}

.messages-fullchat .chat-input-area {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 14px 20px;
}

@media (max-width: 768px) {
  .messages-layout {
    flex-direction: column;
    height: auto;
  }
  .messages-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    max-height: 200px;
  }
}

/* ── Spin animation ─────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Update indicator ──────────────────── */
.update-indicator {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2e7dff;
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 9000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(46,125,255,0.3);
  pointer-events: none;
}

.update-indicator.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
