/* ================================================================
   TRADITIONA CRM — PREMIUM DESIGN SYSTEM
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- DESIGN TOKENS ---- */
:root {
  /* Palette */
  --cream:       #faf8f3;
  --paper:       #ffffff;
  --ink:         #1a1a1a;
  --muted:       #6b7280;

  --green:       #185fa5;
  --green-dark:  #124a82;
  --green-mid:   #185fa5;
  --green-pale:  #e6f1fb;
  --green-glow:  rgba(24, 95, 165, 0.15);

  --gold:        #ba7517;
  --gold-dark:   #965d12;
  --gold-pale:   #fdf5e0;

  --blue:        #e6f1fb;
  --blue-dark:   #185fa5;
  --blue-pale:   #f0f8ff;

  --red:         #d45b5b;
  --red-dark:    #b03e3e;
  --red-soft:    #fdf0ef;

  --line:        #e5e7eb;
  --line-2:      #d1d5db;

  /* Shadows */
  --shadow-xs:   0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-sm:   0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow:      0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 20px 52px rgba(0, 0, 0, 0.10);
  --shadow-glow: 0 0 0 3px rgba(24, 95, 165, 0.15);

  /* Motion */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast:      150ms;
  --dur:       250ms;
  --slow:      420ms;

  /* Radius */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-2xl: 32px;
  --r-full: 9999px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 4vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  letter-spacing: -0.01em;
}

h3 { font-size: 15px; font-weight: 700; }


/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
  align-items: center;
  background: rgba(255, 253, 247, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 52px);
  position: sticky;
  top: 0;
  transition: box-shadow var(--dur) var(--ease);
  z-index: 100;
}

.topbar.is-scrolled { box-shadow: var(--shadow); }

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 17px;
  font-weight: 700;
  gap: 12px;
  letter-spacing: -0.01em;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
  border-radius: var(--r);
  box-shadow: 0 4px 14px rgba(24, 95, 165, 0.35);
  color: white;
  display: inline-flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  height: 40px;
  justify-content: center;
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
  width: 40px;
}

.brand:hover .brand-mark {
  box-shadow: 0 6px 20px rgba(24, 95, 165, 0.45);
  transform: rotate(-6deg) scale(1.1);
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}


/* ================================================================
   FLASH NOTIFICATIONS
   ================================================================ */
.flash-zone {
  display: grid;
  gap: 8px;
  left: 50%;
  position: fixed;
  top: 80px;
  transform: translateX(-50%);
  width: min(92vw, 480px);
  z-index: 300;
}

.flash {
  align-items: flex-start;
  animation: slideNotif var(--slow) var(--spring) both;
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.flash-icon {
  align-items: center;
  border-radius: var(--r-full);
  color: white;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 14px;
  height: 28px;
  justify-content: center;
  width: 28px;
  background: var(--green);
  margin-top: 1px;
}

.flash.error .flash-icon { background: var(--red); }
.flash.warning .flash-icon { background: var(--gold); }

.flash-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.flash-body p { margin: 0; font-size: 13px; color: var(--muted); }

@keyframes slideNotif {
  from { opacity: 0; transform: translateY(-24px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.flash.fade-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
}


/* ================================================================
   PAGE LAYOUT
   ================================================================ */
.page {
  animation: pageEnter 0.5s var(--ease-out) both;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(16px, 4vw, 52px) 64px;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.muted { color: var(--muted); }

.eyebrow {
  align-items: center;
  color: var(--gold);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: var(--gold);
  border-radius: var(--r-full);
  content: "";
  height: 2px;
  width: 20px;
}


/* ================================================================
   PILLS & STATUS BADGES
   ================================================================ */
.role-pill {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border-radius: var(--r-full);
  color: white;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  text-transform: uppercase;
}

.ticket-id {
  background: var(--blue);
  border-radius: var(--r-full);
  color: var(--blue-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.status {
  align-items: center;
  border-radius: var(--r-full);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 5px 12px;
}

.status::before {
  animation: statusPulse 2.4s ease-in-out infinite;
  background: currentColor;
  border-radius: var(--r-full);
  content: "";
  height: 6px;
  opacity: 0.7;
  width: 6px;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.25); }
}

/* Default style (new / en attente) */
.status { background: var(--blue); color: var(--blue-dark); }

.sla-badge {
  align-items: center;
  border-radius: var(--r-full);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  padding: 5px 10px;
  white-space: nowrap;
}

.sla-badge.ok {
  background: var(--green-pale);
  color: var(--green-dark);
}

.sla-badge.attention {
  background: var(--gold-pale);
  color: var(--gold-dark);
}

.sla-badge.overdue {
  background: var(--red-soft);
  color: var(--red-dark);
}

.sla-timer {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.sla-row.sla-attention td {
  background: rgba(196, 154, 60, 0.12);
}

.sla-row.sla-overdue td {
  background: rgba(212, 91, 91, 0.12);
}

.sla-client-note {
  background: var(--green-pale);
  border: 1px solid rgba(24, 95, 165, 0.16);
  border-radius: var(--r);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 9px 11px;
}

.sla-client-note.late {
  background: var(--red-soft);
  border-color: rgba(212, 91, 91, 0.2);
  color: var(--red-dark);
}


/* ================================================================
   BUTTONS
   ================================================================ */
.primary-button,
.secondary-button,
.ghost-button {
  align-items: center;
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  display: inline-flex;
  font-family: 'Inter', inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  overflow: hidden;
  padding: 11px 22px;
  position: relative;
  transition: all var(--dur) var(--ease);
}

/* Shimmer sweep */
.primary-button::after,
.secondary-button::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  content: "";
  inset: 0;
  left: -120%;
  position: absolute;
  transition: left 0.55s var(--ease);
}

.primary-button:hover::after,
.secondary-button:hover::after { left: 120%; }

.primary-button {
  background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
  box-shadow: 0 4px 14px rgba(24, 95, 165, 0.32), 0 1px 3px rgba(24, 95, 165, 0.2);
  color: white;
}

.primary-button:hover {
  box-shadow: 0 6px 22px rgba(24, 95, 165, 0.42), 0 2px 6px rgba(24, 95, 165, 0.25);
  transform: translateY(-2px);
}

.primary-button:active { box-shadow: 0 2px 8px rgba(24,95,165,0.2); transform: translateY(0); }

.primary-button.danger {
  background: linear-gradient(145deg, #e06060, var(--red-dark));
  box-shadow: 0 4px 14px rgba(176, 62, 62, 0.32);
}

.primary-button.danger:hover {
  box-shadow: 0 6px 22px rgba(176, 62, 62, 0.42);
}

.secondary-button {
  background: white;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--green-pale);
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.secondary-button.danger { border-color: var(--red); color: var(--red-dark); }
.secondary-button.danger:hover { background: var(--red-soft); }

.ghost-button {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ghost-button:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }


/* ================================================================
   LOGOUT CONFIRMATION
   ================================================================ */
body.modal-open {
  overflow: hidden;
}

.logout-modal[hidden] {
  display: none;
}

.logout-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 500;
}

.logout-modal__backdrop {
  background: rgba(20, 29, 25, 0.48);
  inset: 0;
  position: absolute;
}

.logout-modal__dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-width: 430px;
  padding: 26px;
  position: relative;
  width: min(100%, 430px);
}

.logout-modal__dialog h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.logout-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.logout-modal__actions .primary-button,
.logout-modal__actions .secondary-button {
  min-width: 142px;
}

/* Loading state */
.primary-button.is-loading { opacity: 0.7; pointer-events: none; }

.primary-button.is-loading::before {
  animation: spin 0.75s linear infinite;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: var(--r-full);
  border-top-color: white;
  content: "";
  height: 16px;
  width: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  padding: clamp(24px, 5vw, 60px);
  position: relative;
}

/* Ambient blobs */
.login-page::before,
.login-page::after {
  animation: blobDrift 9s ease-in-out infinite alternate;
  border-radius: var(--r-full);
  content: "";
  height: 560px;
  pointer-events: none;
  position: absolute;
  width: 560px;
}

.login-page::before {
  background: radial-gradient(circle, rgba(24, 95, 165, 0.09) 0%, transparent 70%);
  left: -160px;
  top: -140px;
}

.login-page::after {
  animation-delay: -4.5s;
  background: radial-gradient(circle, rgba(196, 154, 60, 0.07) 0%, transparent 70%);
  bottom: -140px;
  right: -160px;
}

@keyframes blobDrift {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.22) translate(40px, -28px); }
}

.login-shell {
  animation: pageEnter 0.65s var(--ease-out) both;
  margin: 0 auto;
  max-width: 460px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-shell::before,
.login-shell::after {
  border-radius: var(--r-2xl);
  content: "";
  inset: -20px;
  pointer-events: none;
  position: absolute;
}

.login-shell::before { border: 1px solid rgba(24, 95, 165, 0.14); }
.login-shell::after  { border: 1px solid rgba(196, 154, 60, 0.11); inset: -38px; }

.login-card {
  background: rgba(255, 253, 247, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.75) inset;
  padding: clamp(28px, 6vw, 50px);
  position: relative;
  text-align: center;
  z-index: 1;
}

.login-card h1 {
  color: var(--green-dark);
  font-size: clamp(30px, 6vw, 50px);
  margin-bottom: 8px;
}

.login-emblem {
  align-items: center;
  animation: emblemBreath 3.5s ease-in-out infinite;
  background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
  border-radius: var(--r-lg);
  box-shadow: 0 8px 28px rgba(24, 95, 165, 0.38);
  color: white;
  display: inline-flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 38px;
  height: 74px;
  justify-content: center;
  margin-bottom: 20px;
  width: 74px;
}

@keyframes emblemBreath {
  0%, 100% { box-shadow: 0 8px 28px rgba(24, 95, 165, 0.38); }
  50%       { box-shadow: 0 8px 36px rgba(24, 95, 165, 0.58), 0 0 0 10px rgba(24, 95, 165, 0.07); }
}

.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 auto 28px;
  max-width: 380px;
}

.login-form {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  padding: 22px;
  text-align: left;
}

.demo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
}

.demo-card {
  background: var(--green-pale);
  border: 1.5px solid rgba(24, 95, 165, 0.18);
  border-radius: var(--r);
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  transition: all var(--dur) var(--ease);
  user-select: none;
}

.demo-card:hover {
  background: #d0e3f7;
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.demo-card:active { transform: translateY(0); }

.demo-card strong { display: block; font-size: 13px; font-weight: 700; }

.demo-card span {
  color: var(--muted);
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  margin-top: 3px;
}


/* ================================================================
   NAVIGATION TABS
   ================================================================ */
.tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tabs a {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  transition: all var(--dur) var(--ease);
}

.tabs a:hover {
  background: var(--green-pale);
  border-color: var(--green);
  color: var(--green-dark);
  transform: translateY(-1px);
}

.tabs a.active {
  background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(24, 95, 165, 0.28);
  color: white;
}

/* Notification badge on tab */
.tabs a .badge {
  align-items: center;
  animation: badgePop 0.4s var(--spring) both;
  background: #f87171;
  border-radius: var(--r-full);
  color: white;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  margin-left: 4px;
  min-width: 18px;
  padding: 0 4px;
}

@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}


/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-band {
  align-items: end;
  background: linear-gradient(135deg, var(--paper) 55%, #e6f4e8);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 28px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 50px);
  position: relative;
}

.hero-band::before {
  background: radial-gradient(ellipse at 85% 50%, rgba(24, 95, 165, 0.07), transparent 60%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* Moroccan-inspired decorative corner */
.hero-band::after {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(24,95,165,0.03) 6px, rgba(24,95,165,0.03) 12px);
  bottom: 0;
  content: "";
  height: 120px;
  pointer-events: none;
  position: absolute;
  right: 0;
  width: 200px;
}

.hero-band > * { position: relative; z-index: 1; }

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* ================================================================
   INFO CARDS
   ================================================================ */
.card-grid { display: grid; gap: 16px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 26px;
  position: relative;
  transition: all var(--dur) var(--ease);
}

/* Animated accent stripe */
.info-card::before {
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  border-radius: 0 0 var(--r-xl) 0;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  top: 0;
  transition: width var(--slow) var(--ease);
  width: 52px;
}

.info-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.info-card:hover::before { width: 100%; }

.info-card .number {
  color: var(--green-dark);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.info-card.warning .number,
.info-card.warning h2          { color: var(--gold); }
.info-card.warning::before     { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); }
.info-card.green               { background: var(--green-pale); }


/* ================================================================
   SECTION BLOCKS
   ================================================================ */
.section-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
  padding: 28px;
}

.section-block.flat { box-shadow: none; }

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title a {
  border-bottom: 1px dashed currentColor;
  font-size: 13px;
  font-weight: 600;
  transition: border-style var(--dur) var(--ease);
}

.section-title a:hover { border-style: solid; }


/* ================================================================
   FORMS
   ================================================================ */
.form-card,
.form-stack {
  display: grid;
  gap: 14px;
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.form-card.wide { width: 100%; }

.form-page,
.split-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
}

label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select,
textarea {
  appearance: none;
  background: white;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  color: var(--ink);
  font: 15px/1.5 'Inter', Arial, sans-serif;
  min-height: 46px;
  padding: 11px 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-mid);
  box-shadow: var(--shadow-glow);
  outline: none;
}

input::placeholder { color: var(--muted); opacity: 0.7; }
textarea { min-height: 110px; resize: vertical; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e7d78' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  cursor: pointer;
  padding-right: 38px;
}

.danger-zone {
  background: linear-gradient(135deg, var(--red-soft), rgba(253, 240, 239, 0.4));
  border: 1.5px solid rgba(212, 91, 91, 0.22);
  border-radius: var(--r-xl);
  padding: 28px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.panel.soft {
  background: var(--green-pale);
  border-color: rgba(24, 95, 165, 0.18);
}

.bot-answer,
.response-box {
  animation: fadeUp 0.4s var(--ease-out) both;
  background: var(--green-pale);
  border: 1px solid rgba(24, 95, 165, 0.18);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--r) var(--r) 0;
  margin-top: 16px;
  padding: 16px 18px;
}

.response-box.danger {
  background: var(--red-soft);
  border-color: rgba(212, 91, 91, 0.18);
  border-left-color: var(--red);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ================================================================
   TICKET CARDS
   ================================================================ */
.ticket-list { display: grid; gap: 12px; }
.ticket-list.compact { max-height: 520px; overflow: auto; }

.ticket-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
  transition: all var(--dur) var(--ease);
}

.ticket-card:hover {
  border-left-color: var(--green);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.ticket-card.claim {
  background: #fff8f7;
  border-color: rgba(212, 91, 91, 0.28);
}

.ticket-card.claim:hover { border-left-color: var(--red); }

.ticket-card.sla-attention {
  background: #fff8e8;
  border-color: rgba(196, 154, 60, 0.35);
}

.ticket-card.sla-overdue {
  background: #fff4f3;
  border-color: rgba(212, 91, 91, 0.35);
}

.ticket-meta,
.ticket-actions {
  align-content: start;
  display: grid;
  gap: 8px;
}

.ticket-meta span {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  text-align: center;
}


/* ================================================================
   TIMELINE & NOTIFICATIONS
   ================================================================ */
.timeline,
.notification-list,
.faq-list { display: grid; gap: 10px; }

.timeline article {
  animation: fadeUp 0.4s var(--ease-out) both;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px 16px 22px;
  position: relative;
  transition: box-shadow var(--dur) var(--ease);
}

.timeline article::before {
  background: linear-gradient(to bottom, var(--green), var(--green-mid));
  border-radius: var(--r-full);
  content: "";
  height: calc(100% - 22px);
  left: 0;
  position: absolute;
  top: 11px;
  width: 3px;
}

.timeline article:hover { box-shadow: var(--shadow-sm); }

.timeline span,
.notification-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.notification-card {
  animation: fadeUp 0.4s var(--ease-out) both;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 18px 20px 18px 26px;
  position: relative;
  transition: all var(--dur) var(--ease);
}

.notification-card::before {
  background: linear-gradient(to bottom, var(--gold), var(--gold-dark));
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.notification-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }

.notification-content {
  min-width: 0;
}

.notification-action {
  background: var(--gold-pale);
  border-color: rgba(196, 154, 60, 0.42);
  color: var(--green-dark);
  font-size: 12px;
  min-height: 36px;
  padding: 8px 14px;
  white-space: nowrap;
}


/* ================================================================
   FAQ / DETAILS
   ================================================================ */
.faq-list details {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}

.faq-list details[open] { box-shadow: var(--shadow-sm); }

.faq-list summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
  transition: background var(--dur) var(--ease);
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  color: var(--green-dark);
  content: "+";
  font-size: 20px;
  font-weight: 300;
  transition: transform var(--dur) var(--ease);
}

.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { background: var(--green-pale); }

.faq-list p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 0 16px 14px;
}


/* ================================================================
   EMPTY STATES
   ================================================================ */
.empty-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state svg {
  color: var(--line-2);
  flex-shrink: 0;
  height: 48px;
  stroke-width: 1.5;
  width: 48px;
}

.empty-state p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap {
  border-radius: var(--r-lg);
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

thead { position: sticky; top: 0; z-index: 2; }

th {
  background: linear-gradient(to bottom, #f0e8d8, #e8ddc8);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 14px 16px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  border-bottom: 1px solid rgba(232, 222, 206, 0.6);
  font-size: 14px;
  padding: 14px 16px;
}

tr { transition: background var(--fast) var(--ease); }
tr:hover td { background: rgba(238, 247, 238, 0.55); }
tr:last-child td { border-bottom: none; }

.detail-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding-top: 2px;
  text-transform: uppercase;
}

.detail-list dd { font-size: 14px; margin: 0; }


/* ================================================================
   MANAGER SIDEBAR LAYOUT
   ================================================================ */
.manager-shell {
  animation: pageEnter 0.5s var(--ease-out) both;
  display: grid;
  gap: 24px;
  grid-template-columns: 230px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1440px;
  padding: 28px clamp(16px, 3vw, 48px) 64px;
}

.sidebar {
  align-self: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 4px;
  padding: 18px;
  position: sticky;
  top: 88px;
}

.sidebar-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  padding: 0 8px;
  text-transform: uppercase;
}

.sidebar a {
  align-items: center;
  border-radius: var(--r);
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 500;
  gap: 10px;
  padding: 11px 12px;
  transition: all var(--dur) var(--ease);
}

.sidebar a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  padding-left: 18px;
}

.sidebar a.active {
  background: linear-gradient(135deg, var(--green-pale), #d8eedd);
  box-shadow: var(--shadow-xs);
  color: var(--green-dark);
  font-weight: 700;
}

.sidebar-icon { font-size: 16px; flex-shrink: 0; }

.manager-content { min-width: 0; }

.dashboard-header {
  align-items: start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}


/* ================================================================
   KPI CARDS
   ================================================================ */
.kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.kpi-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 22px;
  position: relative;
  transition: all var(--dur) var(--ease);
}

/* Big soft circle accent */
.kpi-grid article::after {
  background: radial-gradient(circle, rgba(24, 95, 165, 0.05) 0%, transparent 60%);
  border-radius: var(--r-full);
  bottom: -40px;
  content: "";
  height: 110px;
  pointer-events: none;
  position: absolute;
  right: -30px;
  width: 110px;
}

.kpi-grid article:hover { box-shadow: var(--shadow); transform: translateY(-4px); }

.kpi-grid span {
  animation: countIn 0.7s var(--ease-out) both;
  color: var(--green-dark);
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.kpi-grid strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kpi-grid .danger span { color: var(--red); }

.kpi-grid .danger {
  background: linear-gradient(135deg, var(--paper), var(--red-soft));
  border-color: rgba(212, 91, 91, 0.22);
}

.kpi-grid .danger::after {
  background: radial-gradient(circle, rgba(212, 91, 91, 0.06) 0%, transparent 60%);
}

@keyframes countIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px 20px;
}


/* ================================================================
   STATS BARS
   ================================================================ */
.bar-list { display: grid; gap: 16px; }

.bar-list div {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  padding: 16px;
  transition: box-shadow var(--dur) var(--ease);
}

.bar-list div:hover { box-shadow: var(--shadow-sm); }

.bar-list span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Legacy strong-based bars (kept for template compat) */
.bar-list strong {
  background: linear-gradient(90deg, var(--green), var(--green-mid));
  border-radius: var(--r-full);
  display: block;
  height: 9px;
  transition: width 1.4s var(--ease-out);
}

.bar-list strong.danger {
  background: linear-gradient(90deg, var(--red), var(--red-dark));
}


/* ================================================================
   STAR RATING (evaluation page)
   ================================================================ */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 6px;
  justify-content: flex-end;
  margin: 4px 0;
}

.star-rating input { display: none; }

.star-rating label,
.star-rating .star-button {
  background: transparent;
  border: 0;
  color: var(--line-2);
  cursor: pointer;
  font-size: 34px;
  font-family: Georgia, serif;
  line-height: 1;
  padding: 0;
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  transition: color var(--fast) var(--ease), transform var(--fast) var(--spring);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label { color: var(--gold); }

.star-rating label:hover,
.star-rating .star-button:hover { transform: scale(1.25); }


/* ================================================================
   EVALUATION REDESIGN
   ================================================================ */
.evaluation-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 190px);
  padding: 18px 0 44px;
}

.evaluation-card {
  background: rgba(255, 253, 247, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;
  display: grid;
  gap: 16px;
  max-width: 620px;
  padding: clamp(26px, 5vw, 46px);
  position: relative;
  width: min(100%, 620px);
}

.evaluation-card::before {
  background: linear-gradient(90deg, var(--green-dark), var(--gold));
  border-radius: var(--r-full);
  content: "";
  height: 4px;
  left: clamp(26px, 5vw, 46px);
  position: absolute;
  right: clamp(26px, 5vw, 46px);
  top: 18px;
}

.evaluation-intro {
  display: grid;
  justify-items: center;
  margin: 8px auto 10px;
  max-width: 460px;
  text-align: center;
}

.evaluation-intro .eyebrow { justify-content: center; }

.evaluation-rating-block {
  background: var(--green-pale);
  border: 1px solid rgba(24, 95, 165, 0.16);
  border-radius: var(--r-xl);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px;
  text-align: center;
}

.evaluation-stars {
  flex-direction: row;
  gap: 8px;
  justify-content: center;
}

.evaluation-stars label,
.evaluation-stars .star-button {
  font-size: clamp(42px, 8vw, 64px);
  text-shadow: 0 4px 12px rgba(196, 154, 60, 0.18);
}

.evaluation-stars input:checked ~ label,
.evaluation-stars label:hover ~ label {
  color: var(--line-2);
}

.evaluation-stars label.is-active {
  color: var(--gold);
}

.evaluation-stars .star-button.is-active {
  color: var(--gold);
}

.evaluation-stars.needs-rating .star-button {
  animation: ratingNudge 0.22s ease-in-out 2;
}

@keyframes ratingNudge {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.rating-feedback {
  background: white;
  border: 1px solid rgba(196, 154, 60, 0.28);
  border-radius: var(--r-full);
  color: var(--green-dark);
  font-weight: 800;
  margin: 6px 0 0;
  min-width: 150px;
  padding: 8px 16px;
}

.evaluation-submit {
  margin-top: 4px;
  width: 100%;
}

.evaluation-submit:disabled,
.evaluation-card select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}


/* ================================================================
   CHATBOT REDESIGN
   ================================================================ */
.chatbot-page {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding-bottom: 42px;
}

.chat-window {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  display: grid;
  max-width: 820px;
  overflow: hidden;
  width: min(100%, 820px);
}

.chat-header {
  align-items: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 20px;
}

.assistant-avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--r-lg);
  display: inline-flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.chat-header h1 {
  color: white;
  font-size: 26px;
  margin: 0 0 2px;
}

.chat-header p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  margin: 0;
}

.chat-status {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-full);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  padding: 7px 11px;
}

.chat-status::before {
  background: #8df0a1;
  border-radius: var(--r-full);
  box-shadow: 0 0 0 4px rgba(141, 240, 161, 0.18);
  content: "";
  height: 8px;
  width: 8px;
}

.chat-body,
.history-conversation {
  background:
    linear-gradient(rgba(250, 246, 237, 0.88), rgba(250, 246, 237, 0.88)),
    repeating-linear-gradient(45deg, transparent, transparent 16px, rgba(24, 95, 165, 0.035) 16px, rgba(24, 95, 165, 0.035) 17px);
  display: grid;
  gap: 14px;
  height: 480px;
  overflow-y: auto;
  padding: 22px;
}

.chat-message {
  display: grid;
  gap: 4px;
  max-width: min(74%, 520px);
}

.chat-message.user {
  justify-self: end;
  text-align: right;
}

.chat-message.bot {
  justify-self: start;
}

.message-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-bubble {
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
  font-size: 14px;
  padding: 12px 15px;
}

.chat-message.user .message-bubble {
  background: linear-gradient(145deg, var(--green-mid), var(--green-dark));
  border-bottom-right-radius: 6px;
  color: white;
}

.chat-message.bot .message-bubble {
  background: white;
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  color: var(--ink);
}

.chat-message time {
  color: var(--muted);
  font-size: 11px;
}

.chat-escalation {
  justify-self: start;
  margin-left: 4px;
}

/* Bloc FAQ clairement separe dans l'interface de chat. */
.quick-question-section {
  background: linear-gradient(135deg, #fffaf0, var(--green-pale));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 18px;
}

.quick-question-header {
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(196, 154, 60, 0.22);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}

.quick-question-header .eyebrow {
  color: var(--gold-dark);
  margin-bottom: 6px;
}

.quick-question-header h2 {
  color: var(--green-dark);
  font-size: 20px;
  margin: 0 0 4px;
}

.quick-question-header p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.quick-question-bar {
  align-items: center;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.quick-question-bar form { flex: 0 0 auto; }

.quick-question-bar button {
  background: white;
  border: 1px solid rgba(196, 154, 60, 0.35);
  border-radius: var(--r-full);
  color: var(--green-dark);
  cursor: pointer;
  font: 700 13px/1 'Inter', Arial, sans-serif;
  padding: 10px 14px;
  transition: all var(--dur) var(--ease);
}

.quick-question-bar button:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.chat-input-form {
  background: white;
  border-top: 1px solid var(--line);
  bottom: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
  position: sticky;
  z-index: 2;
}

.chat-input-form input {
  border-radius: var(--r-full);
  min-height: 48px;
}

.chat-input-form .primary-button {
  border-radius: var(--r-full);
  min-width: 116px;
}

.history-toggle {
  border-color: rgba(196, 154, 60, 0.42);
  color: var(--green-dark);
}

.chat-history-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  max-width: 820px;
  overflow: hidden;
  width: min(100%, 820px);
}

.history-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 18px 20px;
}

.history-panel-header h2 { margin: 0; }

.chat-message.compact {
  max-width: min(82%, 560px);
}

.chat-message.compact .message-bubble {
  font-size: 13px;
  padding: 10px 13px;
}

.empty-history {
  margin: 0;
  padding: 22px;
  text-align: center;
}


/* ================================================================
   CHATBOT TYPING INDICATOR
   ================================================================ */
.typing-dots {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  padding: 2px 4px;
}

.typing-dots span {
  animation: typingBounce 1.2s ease-in-out infinite;
  background: var(--green);
  border-radius: var(--r-full);
  display: block;
  height: 8px;
  width: 8px;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30%            { transform: translateY(-9px); opacity: 1; }
}


/* ================================================================
   SCROLL STAGGER ANIMATIONS
   ================================================================ */
.stagger-in { animation: fadeUp 0.5s var(--ease-out) both; }
[data-delay="1"] { animation-delay: 0.07s; }
[data-delay="2"] { animation-delay: 0.14s; }
[data-delay="3"] { animation-delay: 0.21s; }
[data-delay="4"] { animation-delay: 0.28s; }
[data-delay="5"] { animation-delay: 0.35s; }


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .hero-band,
  .form-page,
  .split-layout { grid-template-columns: 1fr; }

  .manager-shell { grid-template-columns: 1fr; }

  .card-grid.three,
  .kpi-grid { grid-template-columns: 1fr 1fr; }

  .sidebar {
    display: flex;
    flex-wrap: wrap;
    position: static;
    border-radius: var(--r-lg);
  }
}

@media (max-width: 600px) {
  .card-grid.three,
  .kpi-grid,
  .demo-grid { grid-template-columns: 1fr; }

  .topbar { padding: 12px 16px; }
  .ticket-card { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }

  .topbar-actions,
  .dashboard-header { flex-direction: column; align-items: stretch; }

  .chat-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-input-form {
    grid-template-columns: 1fr;
  }

  .chat-body,
  .history-conversation {
    height: 420px;
  }

  .notification-card {
    grid-template-columns: 1fr;
  }

  .notification-action {
    justify-self: start;
  }

  .quick-question-bar {
    padding-inline: 12px;
  }
}


/* ================================================================
   MANAGER UI FROM JPEG MOCKUPS
   ================================================================ */
body:has(.manager-shell) {
  background: #f7f6fc;
}

body:has(.manager-shell) .topbar {
  background: #fff;
  border-bottom: 1px solid #e7eaf2;
  box-shadow: none;
  left: 0;
  min-height: 52px;
  padding-left: 190px;
  position: sticky;
  right: 0;
}

body:has(.manager-shell) .brand {
  color: #111827;
  font-size: 15px;
}

body:has(.manager-shell) .brand-mark {
  display: none;
}

.manager-role {
  color: #ba7517;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.manager-avatar {
  align-items: center;
  background: #185fa5;
  border-radius: 50%;
  box-sizing: border-box;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  margin-right: 8px;
  object-fit: cover;
  width: 32px;
}

.manager-avatar-photo {
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(24, 95, 165, 0.18);
  display: block;
  flex: 0 0 32px;
}

.manager-shell {
  animation: none;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  margin: 0;
  max-width: none;
  min-height: calc(100vh - 52px);
  padding: 0;
}

.sidebar {
  background: #fff;
  border: 0;
  border-radius: 0;
  border-right: 1px solid #e7eaf2;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - 52px);
  padding: 18px 14px;
  position: sticky;
  top: 52px;
}

.manager-sidebar-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.manager-logo {
  align-items: center;
  background: #185fa5;
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.manager-sidebar-brand strong {
  color: #1a3864;
  display: block;
  font-size: 13px;
  line-height: 1.1;
}

.manager-sidebar-brand small {
  color: #6b7a90;
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.sidebar a {
  border-radius: 5px;
  color: #3b4658;
  font-size: 11px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0.06em;
  padding: 10px 10px;
  text-transform: uppercase;
}

.sidebar a:hover,
.sidebar a.active {
  background: #eef5ff;
  box-shadow: none;
  color: #1f659d;
  padding-left: 10px;
}

.sidebar-icon {
  color: #1f659d;
  font-size: 15px;
  text-align: center;
  width: 18px;
}

.sidebar-bottom {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.manager-content {
  min-width: 0;
  padding: 34px clamp(28px, 5vw, 72px) 70px;
}

.manager-page-header {
  align-items: flex-start;
  margin-bottom: 24px;
}

.manager-page-header h1 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 6px;
}

.manager-page-header .eyebrow {
  font-size: 10px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-kpi-grid article {
  background: #fff;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(32, 49, 80, 0.06);
  min-height: 110px;
  padding: 18px 18px;
}

.dashboard-kpi-grid article::after {
  display: none;
}

.dashboard-kpi-grid span {
  color: #1f659d;
  font-size: 32px;
}

.dashboard-kpi-grid strong {
  color: #17233a;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-kpi-grid .danger {
  background: #fff;
  border-right: 3px solid #c83a30;
}

.manager-feature-row {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr);
  margin-bottom: 26px;
}

.manager-blue-metric,
.manager-closed-card {
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.06);
  padding: 26px 30px;
}

.manager-blue-metric {
  background: #185fa5;
  color: white;
  overflow: hidden;
  position: relative;
}

.manager-blue-metric::after {
  border: 16px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
  height: 112px;
  position: absolute;
  right: 24px;
  top: 18px;
  width: 112px;
}

.manager-blue-metric small,
.manager-closed-card small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manager-blue-metric strong,
.manager-closed-card strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  line-height: 1.1;
}

.manager-blue-metric span,
.manager-closed-card span {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

.manager-closed-card {
  background: white;
  color: #17233a;
}

.manager-table-card {
  background: #fff;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.06);
  overflow: hidden;
  padding: 0;
}

.manager-table-card .section-title {
  border-bottom: 1px solid #e8edf6;
  margin: 0;
  padding: 20px 24px;
}

.manager-table-actions {
  display: flex;
  gap: 8px;
}

.manager-table-actions .ghost-button {
  min-height: 30px;
  padding: 5px 10px;
}

.manager-table-card table {
  min-width: 760px;
}

.manager-table-card th,
.table-wrap th {
  background: #eef5ff;
  color: #3d4b61;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.manager-table-card td,
.table-wrap td {
  background: #fff;
  color: #17233a;
  font-size: 12px;
  padding: 16px;
}

.manager-eye-link {
  color: #126493;
  font-size: 17px;
}

.table-footer-link {
  align-items: center;
  border-top: 1px solid #edf1f7;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding: 14px 20px;
}

.table-footer-link a {
  color: #126493;
}

.pager {
  background: #185fa5;
  border-radius: 5px;
  color: #fff;
  padding: 6px 10px;
}

.manager-filter-bar {
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.06);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-bottom: 20px;
  padding: 18px 20px;
}

.manager-filter-bar label {
  grid-column: 1 / -1;
}

.manager-filter-bar select {
  max-width: none !important;
}

.manager-filter-bar .secondary-button {
  background: #185fa5;
  color: white;
  min-width: 92px;
}

.manager-promo-row {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  margin-top: 28px;
}

.manager-promo-blue,
.manager-promo-image {
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.06);
  padding: 28px;
}

.manager-promo-blue {
  background: #eaf3ff;
}

.manager-promo-blue h2 {
  color: #126493;
  font-size: 22px;
}

.manager-promo-blue p {
  color: #5e6a7d;
  max-width: 560px;
}

.manager-promo-blue a {
  border: 1px solid #126493;
  border-radius: 999px;
  color: #126493;
  display: inline-flex;
  font-size: 12px;
  padding: 9px 16px;
}

.manager-promo-image {
  background-image: linear-gradient(rgba(15, 28, 48, 0.25), rgba(15, 28, 48, 0.28)), url("../img/traditiona-reference.png");
  background-position: center 68%;
  background-size: cover;
  color: #fff;
  min-height: 160px;
}

.manager-promo-image strong,
.manager-promo-image span {
  display: block;
}

.manager-promo-image strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  margin-top: 38px;
}

.manager-promo-image span {
  background: #fff;
  color: #5e6a7d;
  margin: 28px -28px -28px;
  padding: 18px 22px;
}

.detail-header h1 {
  font-size: clamp(28px, 3vw, 38px) !important;
}

.back-link {
  color: #126493;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.soft-chip {
  background: #eaf3ff;
  border-radius: 999px;
  color: #126493;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
}

.danger-chip {
  background: #fff0ed;
  color: #c83a30;
}

.manager-detail-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.85fr);
}

.manager-info-card {
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.manager-info-card h2 {
  background: #eef5ff;
  font-size: 22px;
  margin: 0 !important;
  padding: 24px 28px 8px;
}

.manager-info-card .detail-list {
  grid-template-columns: 1fr 1fr;
  padding: 22px 28px 28px;
}

.manager-info-card dt {
  color: #6b7a90;
}

.manager-info-card dd {
  margin-bottom: 12px;
}

.manager-info-card dt:nth-last-of-type(1),
.manager-info-card dt:nth-last-of-type(1) + dd {
  grid-column: 1 / -1;
}

.manager-detail-notes {
  display: grid;
  gap: 16px;
  grid-column: 1;
  grid-template-columns: 1fr 1fr;
}

.note-card {
  background: white;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.05);
  padding: 22px;
}

.note-card.blue {
  background: #eaf3ff;
}

.note-card strong {
  color: #506079;
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.note-card p {
  font-size: 13px;
  margin: 0 0 10px;
}

.note-card span {
  color: #126493;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.manager-response-card {
  align-self: start;
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 28px;
}

.ai-helper-card {
  background: #f8f9fd;
  border-top: 1px solid #edf1f7;
  display: grid;
  gap: 7px;
  margin: 12px -28px -28px;
  padding: 22px 28px;
}

.ai-helper-card strong {
  color: #17233a;
}

.ai-helper-card span {
  color: var(--muted);
  font-size: 12px;
}

.manager-claims-layout {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
}

.claims-list-panel,
.corrective-card,
.faq-manager-card,
.manager-chatbot-form,
.unanswered-card {
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 49, 80, 0.06);
}

.manager-claim-card {
  background: white;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  padding: 18px;
}

.manager-claim-card span,
.manager-claim-card small {
  color: #126493;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.manager-claim-card small {
  color: #9aa5b5;
  float: right;
}

.manager-claim-card h3 {
  margin: 10px 0 8px;
}

.manager-claim-card p {
  color: #5e6a7d;
  font-size: 12px;
}

.manager-claim-card b {
  background: #eef5ff;
  border-radius: 999px;
  color: #126493;
  display: inline-flex;
  font-size: 9px;
  margin-right: 6px;
  padding: 5px 8px;
  text-transform: uppercase;
}

.manager-claim-card b:first-child,
.manager-claim-card b:nth-child(3) {
  background: #fff0ed;
  color: #c83a30;
}

.claim-banner {
  align-items: end;
  background-image: linear-gradient(rgba(23, 35, 58, 0.25), rgba(23, 35, 58, 0.35)), url("../img/traditiona-reference.png");
  background-position: center 76%;
  background-size: cover;
  border-radius: 8px;
  color: white;
  display: flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  height: 130px;
  margin-top: 16px;
  padding: 18px;
}

.corrective-card {
  padding: 28px;
}

.procedure-note {
  background: #eaf3ff;
  border-radius: 6px;
  color: #126493;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  padding: 16px 18px;
}

.procedure-note span {
  color: #5e6a7d;
  font-size: 12px;
  font-weight: 500;
}

.claim-form-footer {
  border-top: 1px solid #edf1f7;
  color: #8a7417;
  font-size: 11px;
  font-weight: 800;
  padding-top: 16px;
  text-transform: uppercase;
}

.chatbot-manager-header {
  margin-left: 25%;
  max-width: 760px;
}

.manager-chatbot-layout {
  grid-template-columns: minmax(280px, 0.74fr) minmax(380px, 1.06fr);
  margin: 0 auto;
  max-width: 1030px;
}

.faq-manager-card h2,
.manager-chatbot-form h2,
.unanswered-card h2 {
  font-size: 20px !important;
}

.manager-faq-row {
  border: 0 !important;
  border-bottom: 1px solid #edf1f7 !important;
  border-radius: 0 !important;
}

.manager-faq-row summary {
  color: #273348;
  font-size: 14px;
  line-height: 1.45;
}

.manager-faq-row summary::after {
  display: none;
}

.manager-faq-row summary span {
  color: #6b7a90;
  margin-left: auto;
}

.manager-faq-edit {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.manager-faq-edit-form {
  display: grid;
  gap: 10px;
}

.manager-faq-edit-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.manager-faq-delete-form {
  display: flex;
  justify-content: flex-end;
}

.manager-faq-edit .secondary-button,
.manager-faq-delete-form .ghost-button {
  justify-self: start;
  min-height: 36px;
  padding: 8px 13px;
}

.unanswered-card .empty-state {
  min-height: 210px;
}

@media (max-width: 1100px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-detail-layout,
  .manager-claims-layout,
  .manager-chatbot-layout,
  .manager-promo-row,
  .manager-feature-row {
    grid-template-columns: 1fr;
  }

  .manager-response-card {
    grid-column: auto;
    grid-row: auto;
  }

  .chatbot-manager-header {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  body:has(.manager-shell) .topbar {
    padding-left: 16px;
  }

  .manager-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

  .manager-content {
    padding: 24px 16px 54px;
  }

  .dashboard-kpi-grid,
  .manager-detail-notes {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   CLIENT UI FROM JPEG MOCKUPS
   ================================================================ */
:root {
  --cream: #f4f8ff;
  --paper: #ffffff;
  --ink: #17233a;
  --muted: #5e6a7d;
  --green: #185fa5;
  --green-dark: #1e5f97;
  --green-mid: #185fa5;
  --green-pale: #eaf3ff;
  --gold: #ba7517;
  --gold-dark: #965d12;
  --gold-pale: #fff8df;
  --blue: #eaf3ff;
  --blue-dark: #126493;
  --blue-pale: #f4f8ff;
  --red: #c83a30;
  --red-dark: #a92d25;
  --red-soft: #fff0ed;
  --line: #dfe7f2;
  --line-2: #c8d3e2;
  --shadow-xs: 0 2px 8px rgba(22, 44, 78, 0.05);
  --shadow-sm: 0 10px 24px rgba(22, 44, 78, 0.08);
  --shadow: 0 16px 38px rgba(22, 44, 78, 0.11);
  --shadow-lg: 0 26px 60px rgba(22, 44, 78, 0.14);
  --shadow-glow: 0 0 0 3px rgba(24, 95, 165, 0.15);
  --r: 6px;
  --r-lg: 8px;
  --r-xl: 10px;
  --r-2xl: 12px;
}

body {
  background:
    linear-gradient(rgba(244, 248, 255, 0.94), rgba(244, 248, 255, 0.94)),
    radial-gradient(circle at 16px 16px, rgba(24, 95, 165, 0.08) 2px, transparent 3px),
    radial-gradient(circle at 40px 40px, rgba(202, 166, 43, 0.055) 2px, transparent 3px);
  background-color: #f4f8ff;
  background-size: auto, 48px 48px, 48px 48px;
}

body:has(.home-hero) {
  position: relative;
  background: #f4f8ff;
}

body:has(.home-hero)::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../img/preview2.webp.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(18px) brightness(0.85) saturate(0.9);
  transform: scale(1.08);
  z-index: -2;
}

body:has(.home-hero)::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(245, 250, 255, 0.72),
    rgba(210, 230, 255, 0.45),
    rgba(255, 255, 255, 0.62)
  );
  z-index: -1;
}

h1,
h2 {
  color: var(--ink);
  letter-spacing: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  min-height: 56px;
  padding: 0 32px;
}

.brand {
  color: #173768;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  gap: 9px;
}

.brand-mark {
  background: transparent;
  border: 1.5px solid #2f6eb0;
  border-radius: 50%;
  box-shadow: none;
  color: #2f6eb0;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  height: 17px;
  width: 17px;
}

.brand:hover .brand-mark {
  box-shadow: none;
  transform: none;
}

.logout-link {
  color: #173768;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}

.topbar-nav {
  align-items: center;
  display: flex;
  gap: clamp(18px, 3.4vw, 48px);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.topbar-nav a {
  color: #5d6370;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
}

.topbar-nav a.active,
.topbar-nav a:hover {
  color: #174b86;
  font-weight: 800;
}

.topbar-nav .nav-notification-link {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.nav-notification-badge {
  align-items: center;
  animation: notificationBadgePop 0.42s cubic-bezier(.2, .9, .2, 1.25) both;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.26);
  color: #fff;
  display: inline-flex;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 10px;
  font-weight: 850;
  height: 18px;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 0 6px;
}

@keyframes notificationBadgePop {
  0% { opacity: 0; transform: translateY(2px) scale(0.72); }
  70% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.page {
  max-width: 1240px;
  padding: 0 28px 64px;
}

.page:has(.home-hero) {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: none;
  padding: 20px 16px 48px;
  position: relative;
  width: min(92%, 1600px);
  z-index: 1;
}

.home-hero,
.page:has(.home-hero) .card-grid.three,
.page:has(.home-hero) .latest-files {
  width: 100%;
}

.client-menu {
  display: none;
}

.client-menu a {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #5d6370;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  padding: 0;
  pointer-events: auto;
}

.client-menu a:hover,
.client-menu a.active {
  background: transparent;
  box-shadow: none;
  color: #174b86;
  transform: none;
}

.client-menu a.active {
  font-weight: 800;
}

.client-menu .badge {
  background: #0e6f9c;
}

.eyebrow {
  color: var(--gold-dark);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  background: var(--gold);
  width: 18px;
}

.form-page {
  align-items: center;
  gap: 48px;
  grid-template-columns: minmax(260px, 0.78fr) minmax(360px, 1.1fr);
  min-height: calc(100vh - 110px);
}

.request-side h1 {
  font-size: clamp(34px, 4vw, 48px);
  max-width: 430px;
}

.request-side .muted {
  max-width: 390px;
}

.request-form-card,
.form-card,
.section-block,
.notification-card,
.info-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(224, 232, 244, 0.9);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.request-form-card {
  padding: 36px 42px;
}

.request-form-card h2 {
  font-size: 26px;
}

.form-two {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

input,
select,
textarea {
  background: #f6f8ff;
  border-color: #cbd6e6;
  border-radius: 6px;
  font-size: 14px;
}

textarea {
  min-height: 132px;
}

.primary-button {
  background: #185fa5;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(24, 95, 165, 0.24);
  min-height: 54px;
}

.primary-button:hover {
  background: #246aa8;
  box-shadow: 0 10px 22px rgba(24, 95, 165, 0.3);
}

.secondary-button {
  border-color: #185fa5;
  color: #1f659d;
}

.panel.soft,
.evaluation-rating-block,
.sla-client-note,
.response-box {
  background: #eaf3ff;
  border-color: #d9e7f7;
}

.advice-box {
  border-left: 4px solid #185fa5;
  box-shadow: 0 12px 28px rgba(24, 95, 165, 0.09);
  max-width: 410px;
}

.artisan-photo,
.faq-photo,
.gallery-card {
  background-image: linear-gradient(rgba(15, 62, 100, 0.14), rgba(15, 62, 100, 0.14)), url("../img/traditiona-reference.png");
  background-position: center;
  background-size: cover;
}

.artisan-photo {
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: 250px;
  margin-top: 32px;
  max-width: 470px;
}

.claim-photo {
  background-position: center 68%;
}

.danger-zone {
  background: transparent;
  border: 0;
  padding: 0;
}

.claim-warning {
  background: #fff0ed;
  border: 0;
  border-left: 4px solid var(--red);
  box-shadow: 0 14px 30px rgba(200, 58, 48, 0.08);
  max-width: 410px;
}

.claim-card {
  border-top: 6px solid var(--red);
}

.primary-button.danger {
  background: #c83a30;
  box-shadow: 0 8px 18px rgba(200, 58, 48, 0.25);
}

.form-footnote {
  border-top: 1px solid #edf1f7;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 22px;
}

.evaluation-page {
  min-height: calc(100vh - 56px);
  padding-top: 92px;
}

.evaluation-card {
  border-radius: 10px;
  max-width: 520px;
  padding: 42px;
  width: min(100%, 520px);
}

.evaluation-card::before {
  background: linear-gradient(90deg, #185fa5 0 50%, #ba7517 50% 100%);
  border-radius: 10px 10px 0 0;
  height: 7px;
  left: 0;
  right: 0;
  top: 0;
}

.evaluation-intro h1 {
  color: #174b86;
  font-size: 33px !important;
}

.evaluation-rating-block {
  border: 0;
  border-radius: 8px;
  padding: 24px;
}

.evaluation-stars .star-button {
  color: #c9d2dd;
  font-size: 30px;
}

.rating-feedback {
  background: transparent;
  border: 0;
  color: #126493;
  font-size: 12px;
  padding: 0;
}

.home-hero {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: 0 24px 60px rgba(22, 44, 78, 0.14);
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  margin-bottom: 0;
  min-height: 230px;
  overflow: hidden;
  padding: 36px 48px;
}

.home-hero::before {
  display: none !important;
}

.home-hero::after {
  background:
    radial-gradient(circle, transparent 0 18%, rgba(24, 95, 165, 0.08) 19% 20%, transparent 21% 30%, rgba(24, 95, 165, 0.08) 31% 32%, transparent 33% 43%, rgba(24, 95, 165, 0.07) 44% 45%, transparent 46% 56%, rgba(24, 95, 165, 0.06) 57% 58%, transparent 59%),
    repeating-conic-gradient(from 0deg, rgba(24, 95, 165, 0.06) 0deg 7deg, transparent 7deg 14deg);
  border: 18px solid rgba(24, 95, 165, 0.045);
  border-radius: 50%;
  bottom: auto;
  content: "";
  height: 390px;
  opacity: 1;
  right: -64px;
  top: -56px;
  width: 390px;
  display: none !important;
}

.home-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  max-width: 520px;
}

.home-hero .muted {
  font-size: 16px;
  line-height: 1.65;
  max-width: 520px !important;
}

.home-hero .hero-actions {
  justify-content: flex-start;
  margin-top: 28px;
}

.home-hero .primary-button,
.home-hero .secondary-button {
  min-height: 58px;
  min-width: 185px;
}

.home-hero .secondary-button {
  background: transparent;
  border: 2px solid #185fa5;
  color: #2f6fa8;
}

/* ================================================================
   SUIVI DE COMMANDE - PREMIUM SAAS REDESIGN
   ================================================================ */
body:has(.tracking-page) {
  background: #09111f;
}

body:has(.tracking-page) .topbar {
  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-bottom: 1px solid rgba(15, 45, 80, 0.12);
  box-shadow: none;
  min-height: 58px;
  padding: 0 32px;
}

body:has(.tracking-page) .brand {
  color: #10213d;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  gap: 10px;
}

body:has(.tracking-page) .brand-mark {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 95, 165, 0.34);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(24, 95, 165, 0.12);
  color: #185fa5;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12px;
  height: 24px;
  width: 24px;
}

body:has(.tracking-page) .topbar-nav {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: clamp(18px, 3.4vw, 48px);
  padding: 0;
}

body:has(.tracking-page) .topbar-nav a {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: #5d6370;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body:has(.tracking-page) .topbar-nav a:hover,
body:has(.tracking-page) .topbar-nav a.active {
  background: transparent;
  box-shadow: none;
  color: #174b86;
  font-weight: 800;
  transform: none;
}

body:has(.tracking-page) .logout-link {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #173768;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

body:has(.tracking-page) .logout-link:hover {
  background: transparent;
  color: #185fa5;
  transform: none;
}

.tracking-page {
  align-items: center;
  background: #0b315d;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 62px);
  overflow: hidden;
  padding: clamp(54px, 7vh, 82px) 20px 34px;
  position: relative;
}

.tracking-page::before {
  background-image: url("../img/preview2.webp.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  content: "";
  filter: blur(18px) brightness(0.85) saturate(0.9);
  inset: -34px;
  pointer-events: none;
  position: absolute;
  transform: scale(1.08);
  z-index: 0;
}

.tracking-page::after {
  background: linear-gradient(
    135deg,
    rgba(245, 250, 255, 0.72),
    rgba(210, 230, 255, 0.45),
    rgba(255, 255, 255, 0.62)
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.tracking-search-shell {
  display: grid;
  justify-items: center;
  position: relative;
  width: min(100%, 640px);
  z-index: 1;
}

.tracking-search-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(22, 44, 78, 0.18), inset 0 1px 0 rgba(255,255,255,0.58);
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 48px);
  position: relative;
  text-align: center;
  width: min(100%, 540px);
  z-index: 1;
}

.tracking-search-card::before {
  background: linear-gradient(90deg, rgba(24,95,165,0), rgba(24,95,165,0.38), rgba(186,117,23,0.26), rgba(24,95,165,0));
  content: "";
  height: 1px;
  left: 36px;
  position: absolute;
  right: 36px;
  top: 0;
}

.tracking-icon {
  align-items: center;
  background: linear-gradient(145deg, #3f8ff2, #185fa5 68%, #124a82);
  border: 1px solid rgba(255,255,255,0.44);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(24, 95, 165, 0.32), inset 0 1px 0 rgba(255,255,255,0.24);
  color: #fff;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  justify-self: center;
  width: 58px;
}

.tracking-eyebrow {
  color: #b56f12 !important;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: 0.11em;
  margin: 4px 0 0 !important;
  text-transform: uppercase;
}

.tracking-search-card h1 {
  color: #0b1730;
  font-family: 'Inter', Arial, sans-serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
}

.tracking-search-card p {
  color: #4d5d76;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 390px;
}

.tracking-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  text-align: left;
}

.tracking-form label {
  color: #14213c;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tracking-form input {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(24, 95, 165, 0.16);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 10px 26px rgba(22, 44, 78, 0.06);
  color: #12213c;
  font-size: 16px;
  font-weight: 700;
  min-height: 58px;
  outline: none;
  padding: 0 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  width: 100%;
}

.tracking-form input::placeholder {
  color: #a3adbd;
  font-weight: 700;
}

.tracking-form input:focus {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(24, 95, 165, 0.58);
  box-shadow: 0 0 0 4px rgba(24, 95, 165, 0.12), 0 12px 30px rgba(22, 44, 78, 0.09);
}

.tracking-form .primary-button {
  background: linear-gradient(135deg, #4a9af6, #1f72c8 48%, #185fa5);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(24, 95, 165, 0.26), inset 0 1px 0 rgba(255,255,255,0.22);
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  justify-content: center;
  min-height: 60px;
  width: 100%;
}

.tracking-form .primary-button:hover {
  box-shadow: 0 22px 44px rgba(24, 95, 165, 0.36), inset 0 1px 0 rgba(255,255,255,0.24);
  transform: translateY(-2px);
}

.tracking-form .clear-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.tracking-clear-btn {
  background: transparent;
  border: none;
  color: #8a9ab0;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.tracking-clear-btn:hover {
  color: var(--green-dark);
}

.tracking-error {
  background: rgba(255, 243, 241, 0.9);
  border: 1px solid rgba(240, 183, 177, 0.92);
  border-radius: 12px;
  color: #a73830;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 13px;
}

.tracking-card-footer {
  align-items: center;
  border-top: 1px solid rgba(203, 214, 230, 0.74);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 22px;
  text-align: left;
}

.tracking-help-link {
  align-items: center;
  border-radius: 14px;
  color: #53657f;
  display: grid;
  gap: 0 11px;
  grid-template-columns: 38px auto;
  padding: 4px 8px 4px 0;
  transition: background 180ms ease, transform 180ms ease;
}

.tracking-help-link:hover {
  background: rgba(24, 95, 165, 0.06);
  transform: translateY(-1px);
}

.tracking-help-link span {
  align-items: center;
  background: rgba(232, 242, 255, 0.95);
  border-radius: 12px;
  color: #185fa5;
  display: inline-flex;
  grid-row: span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tracking-help-link strong {
  color: #233552;
  font-size: 13px;
  font-weight: 850;
}

.tracking-help-link small {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.tracking-history-link {
  border-radius: 999px;
  color: #185fa5;
  font-size: 13px;
  font-weight: 850;
  padding: 9px 0;
  white-space: nowrap;
}

.tracking-history-link:hover {
  color: #124a82;
}

.tracking-footer {
  color: rgba(23, 55, 104, 0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
  margin-top: 42px;
  max-width: 520px;
  text-align: center;
}

.tracking-footer a,
.tracking-footer span {
  color: rgba(23, 55, 104, 0.72);
  font-size: 12px;
  font-weight: 650;
}

.tracking-footer a:hover {
  color: #fff;
}

.tracking-footer span {
  flex-basis: 100%;
}

.tracking-deco {
  display: none;
}

.tracking-deco-bag {
  background:
    linear-gradient(rgba(66, 43, 25, 0.1), rgba(66, 43, 25, 0.1)),
    linear-gradient(135deg, #d0a06f, #7b5538);
  border: 7px solid rgba(255,255,255,0.82);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(5, 12, 24, 0.22);
  height: 150px;
  right: 7vw;
  top: 132px;
  transform: rotate(7deg);
  width: 174px;
}

.tracking-deco-tile {
  background:
    linear-gradient(90deg, transparent 47%, rgba(255,255,255,0.46) 48%, rgba(255,255,255,0.46) 52%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255,255,255,0.46) 48%, rgba(255,255,255,0.46) 52%, transparent 53%),
    #2d84c7;
  border: 7px solid rgba(255,255,255,0.82);
  border-radius: 16px;
  bottom: 50px;
  box-shadow: 0 24px 60px rgba(5, 12, 24, 0.18);
  height: 132px;
  left: 5vw;
  transform: rotate(-5deg);
  width: 132px;
}

.tracking-deco-star {
  border-left: 54px solid transparent;
  border-right: 54px solid transparent;
  border-bottom: 150px solid rgba(255, 255, 255, 0.12);
  bottom: 150px;
  right: -24px;
  transform: rotate(36deg);
}

@media (max-width: 1080px) {
  body:has(.tracking-page) .topbar {
    align-items: center;
    gap: 12px;
  }

  body:has(.tracking-page) .topbar-nav {
    order: 3;
    overflow-x: auto;
    padding: 5px;
    position: static;
    scrollbar-width: none;
    transform: none;
    width: 100%;
  }

  body:has(.tracking-page) .topbar-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .tracking-page {
    align-items: start;
    min-height: calc(100vh - 62px);
    padding: 34px 14px 30px;
  }

  .tracking-search-shell {
    width: 100%;
  }

  .tracking-search-card {
    border-radius: 20px;
    padding: 28px 20px;
    width: 100%;
  }

  .tracking-search-card h1 {
    font-size: 27px;
  }

  .tracking-search-card p {
    font-size: 14px;
  }

  .tracking-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .tracking-history-link {
    background: rgba(24, 95, 165, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    white-space: normal;
  }

  .tracking-deco {
    display: none;
  }

  .tracking-footer {
    margin-top: 28px;
  }
}
.tracking-detail-page {
  background: #f7f6fc;
  min-height: calc(100vh - 68px);
  padding: clamp(22px, 5vw, 48px);
}

.tracking-detail-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 290px;
  margin: 0 auto;
  max-width: 1040px;
}

.tracking-detail-main,
.tracking-summary,
.manager-order-panel,
.manager-order-notifications,
.order-alert-card {
  background: #fff;
  border: 1px solid #e7eaf2;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 45, 77, 0.06);
}

.tracking-detail-main {
  padding: clamp(22px, 4vw, 34px);
}

.tracking-detail-header {
  align-items: start;
  background: #eef5ff;
  border: 1px solid #d7e7fb;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 18px;
}

.tracking-detail-header h1 {
  color: #17233a;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.tracking-detail-header p {
  color: #26415f;
  margin: 0;
}

.tracking-status-pill,
.order-step-badge {
  background: #dcecff;
  border-radius: 999px;
  color: #1f659d;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.order-timeline {
  display: grid;
  gap: 0;
  padding: 8px 0;
}

.timeline-step {
  display: grid;
  gap: 16px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 78px;
  position: relative;
}

.timeline-step::after {
  background: #d9e0ea;
  content: "";
  height: calc(100% - 34px);
  left: 16px;
  position: absolute;
  top: 34px;
  width: 2px;
}

.timeline-step:last-child::after {
  display: none;
}

.timeline-dot {
  align-items: center;
  background: #f3f5f8;
  border: 2px solid #d9e0ea;
  border-radius: 50%;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
  z-index: 1;
}

.timeline-step.terminee .timeline-dot {
  background: #e8f7ef;
  border-color: #2fb36f;
}

.timeline-step.terminee .timeline-dot::before {
  color: #16965a;
  content: "✓";
  font-weight: 900;
}

.timeline-step.en_cours .timeline-dot {
  animation: trackingPulse 1.4s ease-in-out infinite;
  background: #e8f2ff;
  border-color: #185fa5;
}

.timeline-step.en_cours .timeline-dot::before {
  background: #185fa5;
  border-radius: 50%;
  content: "";
  height: 10px;
  width: 10px;
}

.timeline-step strong {
  color: #17233a;
  display: block;
  font-size: 15px;
  margin-top: 3px;
}

.timeline-step p {
  color: #667085;
  font-size: 13px;
  margin: 3px 0 0;
}

.tracking-actions {
  border-top: 1px solid #e7eaf2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
}

.tracking-summary {
  align-self: start;
  padding: 20px;
}

.tracking-summary h2,
.manager-order-notifications h2,
.order-alert-card h2 {
  color: #1a3864;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.tracking-summary dl,
.manager-order-info {
  display: grid;
  gap: 14px;
  margin: 0;
}

.tracking-summary dt,
.manager-order-info span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tracking-summary dd,
.manager-order-info strong {
  color: #17233a;
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 2px 0 0;
}

@keyframes trackingPulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 95, 165, 0.34); }
  70% { box-shadow: 0 0 0 10px rgba(24, 95, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 95, 165, 0); }
}

.order-row.ok td { border-left: 3px solid #1f9d64; }
.order-row.warning td { border-left: 3px solid #d99a21; }
.order-row.danger td { border-left: 3px solid #c83a30; }

.order-time {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.order-time.ok { background: #e8f7ef; color: #157346; }
.order-time.warning { background: #fff4dc; color: #94610b; }
.order-time.danger { background: #fff0ee; color: #a73830; }

.manager-order-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.manager-order-panel,
.manager-order-notifications {
  padding: 22px;
}

.manager-order-info {
  border-bottom: 1px solid #e7eaf2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.order-timeline.manager {
  padding-left: 6px;
}

.advance-step-form {
  margin: -34px 0 22px 50px;
  position: relative;
  z-index: 2;
}

.advance-step-form .primary-button {
  min-height: 40px;
  padding: 9px 14px;
}

.manager-order-notifications {
  align-self: start;
  display: grid;
  gap: 12px;
}

.manager-order-notifications div {
  border-bottom: 1px solid #eef1f6;
  padding-bottom: 12px;
}

.manager-order-notifications strong {
  color: #1f659d;
  font-size: 12px;
}

.manager-order-notifications p {
  color: #3d4b61;
  font-size: 13px;
  margin: 4px 0 0;
}

.order-alert-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.order-alert-card {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.order-alert-card.warning { border-color: #f0c36a; }
.order-alert-card.danger { border-color: #f0a19b; }

.order-alert-card a {
  align-items: center;
  background: #f8fafc;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.order-alert-card span {
  color: #667085;
  font-size: 12px;
}

@media (max-width: 860px) {
  .tracking-detail-layout,
  .manager-order-layout,
  .order-alert-grid {
    grid-template-columns: 1fr;
  }

  .tracking-detail-header,
  .tracking-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-order-info {
    grid-template-columns: 1fr;
  }
}


.info-card {
  border-top: 5px solid #185fa5;
  min-height: 150px;
}

.info-card::before {
  display: none;
}

.info-card.warning {
  border-top-color: var(--gold);
}

.info-card.green {
  background: white;
  border-top-color: #dfe7f2;
}

.info-card .number {
  color: #1472a8;
}

.latest-files {
  margin-top: 44px;
}

.page:has(.home-hero) .card-grid {
  gap: 16px;
}

.page:has(.home-hero) .card-grid.three {
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.page:has(.home-hero) .info-card,
.page:has(.home-hero) .info-card.green,
.page:has(.home-hero) .info-card.warning {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(22, 44, 78, 0.11);
  min-height: 130px;
  padding: 24px;
}

.page:has(.home-hero) .info-card .number {
  font-size: 38px;
  margin-bottom: 6px;
}

.page:has(.home-hero) .latest-files {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(235, 244, 255, 0.48));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(22, 44, 78, 0.11);
  margin-top: 18px;
  padding: 26px;
}

.page:has(.home-hero) .latest-files .section-title {
  border-bottom: 1px solid rgba(24, 95, 165, 0.12);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.page:has(.home-hero) .latest-files .section-title a {
  border-bottom: 1px solid rgba(24, 95, 165, 0.35);
  color: #185fa5;
  font-weight: 750;
}

.page:has(.home-hero) .latest-files .section-title a:hover {
  border-bottom-color: #185fa5;
  color: #124a82;
}

.page:has(.home-hero) .ticket-list {
  gap: 12px;
}

.chatbot-page {
  align-items: start;
  gap: 32px;
  grid-template-columns: 370px minmax(0, 1fr);
  justify-items: stretch;
}

.faq-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 18px;
  padding: 34px;
}

.faq-sidebar h2 {
  color: #174b86;
  font-size: 24px;
}

.faq-sidebar .quick-question-bar {
  display: flex;
  flex-wrap: wrap;
}

.quick-question-bar button {
  background: #edf7ff;
  border: 0;
  color: #126493;
}

.faq-photo {
  align-items: end;
  border-radius: 8px;
  color: white;
  display: flex;
  font-weight: 700;
  height: 175px;
  padding: 18px;
}

.chat-window {
  border-radius: 8px;
  max-width: none;
  width: 100%;
}

.chat-header {
  background: #185fa5;
  padding: 22px 28px;
}

.assistant-avatar {
  background: white;
  border-radius: 50%;
  color: #174b86;
}

.chat-body,
.history-conversation {
  background: #eaf3ff;
  height: 500px;
}

.chat-message.user .message-bubble {
  background: #0f72b2;
}

.chat-input-form {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.chat-input-form::before {
  color: #8090a6;
  content: "⌕";
  font-size: 22px;
}

.quick-question-section,
.history-toggle {
  display: none;
}

.center-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 26px auto 42px;
  max-width: 760px;
}

.center-header h1 {
  color: #126493;
  font-size: 32px;
}

.notifications-shell {
  margin: 0 auto;
  max-width: 760px;
}

.notification-list {
  gap: 18px;
}

.notification-card {
  border-left: 4px solid #185fa5;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 28px 34px;
}

.notification-card::before {
  display: none;
}

.notification-card:nth-child(even) {
  border-left-color: var(--gold);
}

.notification-gallery {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr 1fr;
  margin: 220px auto 0;
  max-width: 760px;
}

.gallery-card {
  align-items: end;
  border-radius: 8px;
  color: white;
  display: flex;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  height: 170px;
  padding: 24px;
}

.gallery-blue {
  background-position: left 20%;
}

.gallery-arch {
  background-position: right 62%;
}

.history-header {
  max-width: 860px;
}

.history-panel {
  margin: 0 auto;
  max-width: 860px;
  padding: 34px;
}

.history-journal {
  display: none;
}

.ticket-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid #edf1f7;
  padding: 26px 0;
}

.ticket-card:hover {
  box-shadow: none;
  transform: none;
}

.page:has(.home-hero) .ticket-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(245, 250, 255, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(22, 44, 78, 0.08);
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.page:has(.home-hero) .ticket-card:hover {
  border-color: rgba(24, 95, 165, 0.22);
  box-shadow: 0 16px 36px rgba(22, 44, 78, 0.13);
  transform: translateY(-2px);
}

.page:has(.home-hero) .ticket-card > div:first-child {
  max-width: 82%;
  min-width: 0;
}

.page:has(.home-hero) .ticket-card h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 8px 0 7px;
}

.page:has(.home-hero) .ticket-card p {
  color: #52627a;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 760px;
}

.page:has(.home-hero) .ticket-meta {
  align-items: end;
  justify-items: end;
  min-width: 0;
  width: fit-content;
}

.page:has(.home-hero) .ticket-meta span,
.page:has(.home-hero) .ticket-id,
.page:has(.home-hero) .sla-badge {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(22, 44, 78, 0.07);
  color: #405272;
}

.page:has(.home-hero) .ticket-meta span,
.page:has(.home-hero) .sla-badge {
  padding: 4px 9px;
}

.page:has(.home-hero) .sla-badge.ok {
  color: #185fa5;
}

.page:has(.home-hero) .sla-badge.attention {
  color: #965d12;
}

.page:has(.home-hero) .sla-badge.overdue {
  color: #b03e3e;
}

.page:has(.home-hero) .sla-timer {
  color: #52627a;
}

.response-box {
  border-left-color: #185fa5;
}

@media (max-width: 960px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: auto;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .topbar-nav {
    flex-wrap: wrap;
    gap: 12px 22px;
    justify-content: center;
    order: 3;
    position: static;
    transform: none;
    width: 100%;
  }

  .client-menu {
    display: none;
  }

  .form-two,
  .chatbot-page,
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero::after {
    display: none;
  }

  .artisan-photo {
    height: 190px;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 0 18px;
  }

  .page {
    padding-inline: 18px;
  }

  .request-form-card,
  .evaluation-card {
    padding: 28px 20px;
  }

  .form-footnote,
  .center-header,
  .notification-card {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .notification-gallery {
    grid-template-columns: 1fr;
    margin-top: 80px;
  }
}

/* ================================================================
   MANAGER DASHBOARD V2 - MODERN SAAS CRM
   ================================================================ */
body:has(.manager-dashboard-v2) { background: #f7f9fc; color: #172033; }
body:has(.manager-dashboard-v2)::before,
body:has(.manager-dashboard-v2)::after { display: none; }

body:has(.manager-dashboard-v2) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e7edf5;
  box-shadow: none;
  min-height: 54px;
  padding-left: 244px;
}

body:has(.manager-dashboard-v2) .brand {
  color: #0f1830;
  font-family: Inter, Arial, sans-serif;
  font-size: 19px;
  font-weight: 800;
}

body:has(.manager-dashboard-v2) .manager-role {
  color: #405272;
  font-family: Inter, Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

body:has(.manager-dashboard-v2) .manager-avatar { background: #eef4ff; color: #0f6bff; }
body:has(.manager-dashboard-v2) .manager-shell { grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 54px); }

.manager-sidebar-v2 {
  background: #fff;
  border-right: 1px solid #e7edf5;
  min-height: calc(100vh - 54px);
  padding: 28px 16px;
  top: 54px;
}

.manager-sidebar-v2 .manager-sidebar-brand { align-items: flex-start; margin-bottom: 28px; padding: 0 8px; }
.manager-sidebar-v2 .manager-sidebar-brand strong { color: #0f6bff; font-family: Inter, Arial, sans-serif; font-size: 16px; font-weight: 800; }
.manager-sidebar-v2 .manager-sidebar-brand small { color: #51607a; font-size: 9px; letter-spacing: 0; margin-top: 4px; }

.manager-sidebar-v2 a {
  border-radius: 8px;
  color: #405272;
  font-size: 12px;
  font-weight: 750;
  gap: 12px;
  letter-spacing: 0;
  min-height: 42px;
  padding: 10px 12px;
  text-transform: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.manager-sidebar-v2 a:hover,
.manager-sidebar-v2 a.active { background: #edf4ff; color: #0f6bff; padding-left: 12px; transform: translateX(1px); }
.manager-sidebar-v2 .sidebar-icon { align-items: center; color: currentColor; display: inline-flex; height: 18px; justify-content: center; width: 18px; }
.manager-sidebar-v2 svg,
.manager-dashboard-v2 svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

body:has(.manager-dashboard-v2) .manager-content { padding: 36px clamp(24px, 3vw, 48px) 64px; }
.manager-dashboard-v2 { display: grid; gap: 22px; }

.dashboard-hero { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.dashboard-hero .eyebrow { color: #f97316; font-size: 11px; font-weight: 800; letter-spacing: 0; margin-bottom: 6px; }
.dashboard-hero h1 { color: #0f1830; font-family: Inter, Arial, sans-serif; font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: 0; line-height: 1.08; margin: 0; }
.dashboard-hero p { color: #51607a; font-size: 14px; margin: 10px 0 0; }

.dashboard-create-button {
  align-items: center;
  background: #0f6bff;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 107, 255, 0.2);
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dashboard-create-button:hover { box-shadow: 0 14px 28px rgba(15, 107, 255, 0.28); color: #fff; transform: translateY(-1px); }
.dashboard-create-button svg { height: 16px; width: 16px; }

.dashboard-kpi-row { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-kpi-card,
.dashboard-panel { background: #fff; border: 1px solid #e8eef6; border-radius: 10px; box-shadow: 0 12px 30px rgba(31, 49, 82, 0.055); }
.dashboard-kpi-card { align-items: center; display: grid; gap: 18px; grid-template-columns: 58px minmax(0, 1fr); min-height: 128px; padding: 24px; transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.dashboard-kpi-card:hover,
.dashboard-panel:hover { border-color: #d9e5f4; box-shadow: 0 18px 36px rgba(31, 49, 82, 0.075); }
.dashboard-kpi-card:hover { transform: translateY(-2px); }

.kpi-icon { align-items: center; border-radius: 18px; display: inline-flex; height: 58px; justify-content: center; width: 58px; }
.kpi-icon svg { height: 27px; width: 27px; }
.kpi-icon.blue { background: #eaf2ff; color: #0f6bff; }
.kpi-icon.green { background: #e9f9ef; color: #10b759; }
.kpi-icon.red { background: #fff0f2; color: #ef233c; }
.kpi-icon.amber { background: #fff4e2; color: #f59e0b; }

.dashboard-kpi-card span,
.performance-card span { color: #405272; display: block; font-size: 13px; font-weight: 750; margin-bottom: 6px; }
.dashboard-kpi-card strong { color: #08122a; display: block; font-family: Inter, Arial, sans-serif; font-size: 31px; font-weight: 800; letter-spacing: 0; line-height: 1; }
.dashboard-kpi-card strong em { color: #51607a; font-size: 15px; font-style: normal; font-weight: 750; margin-left: 4px; }
.trend { display: block; font-size: 12px; font-weight: 750; margin-top: 10px; }
.trend.positive { color: #00a85a; }
.trend.negative { color: #ef233c; }

.dashboard-panel { padding: 22px; }
.panel-heading { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h2,
.performance-panel h2 { color: #0f1830; font-family: Inter, Arial, sans-serif; font-size: 18px; font-weight: 800; margin: 0; }

.chart-panel { padding: 22px 24px 10px; }
.chart-filter {
  position: relative;
  z-index: 5;
}

.chart-range {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #405272;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  transition: background 0.18s ease, color 0.18s ease;
}

.chart-range:hover,
.chart-filter.open .chart-range {
  background: #f3f6fb;
  color: #0f6bff;
}

.chart-range svg {
  height: 14px;
  transition: transform 0.18s ease;
  width: 14px;
}

.chart-filter.open .chart-range svg {
  transform: rotate(180deg);
}

.chart-range-menu {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(31, 49, 82, 0.12);
  display: grid;
  gap: 3px;
  min-width: 178px;
  opacity: 0;
  padding: 7px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chart-filter.open .chart-range-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chart-range-menu button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #405272;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.chart-range-menu button:hover {
  background: #f3f6fb;
  color: #0f6bff;
}

.chart-range-menu button.active {
  background: #edf4ff;
  color: #0f6bff;
}

.chart-filter.loading .chart-range {
  opacity: 0.65;
  pointer-events: none;
}
.chart-legend { display: flex; gap: 28px; margin: 4px 0 6px 46px; }
.chart-legend span,
.chart-legend-item { align-items: center; color: #405272; display: inline-flex; font-size: 12px; font-weight: 750; gap: 8px; }
.chart-legend-item {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: opacity 180ms ease, color 180ms ease;
}
.chart-legend-item[aria-pressed="false"] { color: #7a879c; opacity: 0.48; }
.chart-legend-item:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(15, 107, 255, 0.35);
  outline-offset: 4px;
}
.chart-legend i { border-radius: 3px; height: 10px; width: 10px; }
.chart-legend i.blue { background: #0f6bff; }
.chart-legend i.red { background: #ef233c; }
.line-chart { display: block; height: auto; min-height: 250px; width: 100%; }
.line-chart.chart-preload .chart-line,
.line-chart.chart-preload .chart-dots { opacity: 0; }
.chart-grid path { stroke: #e8edf5; stroke-width: 1; }
.chart-axis text {
  fill: #50617c;
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 650;
  stroke: none;
}
.chart-line {
  fill: none;
  stroke-width: 2.5;
  transition: opacity 700ms cubic-bezier(0.76, 0, 0.24, 1), stroke-dashoffset 700ms cubic-bezier(0.76, 0, 0.24, 1);
}
.chart-line.orders,
.chart-dots.orders { color: #0f6bff; stroke: #0f6bff; }
.chart-line.claims,
.chart-dots.claims { color: #ef233c; stroke: #ef233c; }
.chart-dots {
  transform-origin: center;
  transition: opacity 700ms cubic-bezier(0.76, 0, 0.24, 1), transform 700ms cubic-bezier(0.76, 0, 0.24, 1);
}
.chart-series-hidden {
  opacity: 0;
  pointer-events: none;
}
.chart-dots.chart-series-hidden {
  transform: translateY(6px);
}
.chart-dots circle {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 700ms cubic-bezier(0.76, 0, 0.24, 1), transform 700ms cubic-bezier(0.76, 0, 0.24, 1);
}
.chart-dots.chart-dots-intro circle {
  opacity: 0;
  transform: scale(0.72);
}

.recent-panel { overflow: hidden; padding: 0; }
.recent-panel .panel-heading { margin: 0; padding: 22px 24px 8px; }
.manager-table-actions { display: flex; gap: 8px; }
.manager-table-actions .ghost-button { align-items: center; background: #f3f6fb; border: 1px solid #e8eef6; border-radius: 7px; color: #172033; display: inline-flex; font-size: 12px; font-weight: 750; gap: 8px; min-height: 34px; padding: 0 12px; }
.manager-table-actions svg { color: #0f6bff; height: 15px; width: 15px; }
.dashboard-table-wrap { overflow-x: auto; padding: 0 18px 2px; }
.dashboard-table { border-collapse: separate; border-spacing: 0; min-width: 880px; width: 100%; }
.dashboard-table th { background: #f3f6fb; border: 0; color: #172033; font-size: 11px; font-weight: 800; letter-spacing: 0; padding: 13px 16px; text-transform: none; }
.dashboard-table th:first-child { border-radius: 8px 0 0 8px; }
.dashboard-table th:last-child { border-radius: 0 8px 8px 0; text-align: center; }
.dashboard-table td { background: #fff; border-bottom: 1px solid #edf1f6; color: #405272; font-size: 13px; padding: 14px 16px; vertical-align: middle; }
.dashboard-table tbody tr:hover td { background: #fbfdff; }
.dashboard-table td strong { color: #101a31; display: block; font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.dashboard-table td small { color: #697790; display: block; font-size: 11px; }
.ticket-id { color: #405272; font-weight: 750; }
.type-badge,
.status-badge,
.priority-badge { align-items: center; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; min-height: 24px; padding: 0 9px; }
.type-badge { background: #eaf2ff; color: #0f6bff; }
.status-badge { background: transparent; color: #405272; gap: 7px; padding: 0; }
.status-badge::before { background: #0f6bff; border-radius: 999px; content: ""; height: 7px; width: 7px; }
.status-badge.waiting::before { background: #ef233c; }
.status-badge.done::before { background: #10b759; }
.status-badge.progress::before { background: #0f6bff; }
.priority-badge.high { background: #fff0f2; color: #ef233c; }
.priority-badge.medium { background: #fff4e2; color: #f97316; }
.priority-badge.low { background: #eaf2ff; color: #0f6bff; }
.table-icon-action { align-items: center; color: #0f6bff; display: flex; justify-content: center; }
.table-icon-action svg { height: 18px; width: 18px; }
.archive-detail-button {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #d7e7fb;
  border-radius: 999px;
  color: #0f6bff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  padding: 0 13px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.archive-detail-button:hover {
  background: #dcecff;
  border-color: #b9d6ff;
  color: #0f6bff;
  transform: translateY(-1px);
}
.empty-table-cell { color: #697790 !important; padding: 34px !important; text-align: center; }
.recent-panel .table-footer-link { border-top: 0; justify-content: center; padding: 16px 20px 22px; }
.recent-panel .table-footer-link a { color: #0f6bff; font-size: 13px; font-weight: 800; }

.dashboard-bottom-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr); }
.performance-panel,
.problems-panel { padding: 24px; }
.performance-grid { display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.performance-card { min-height: 142px; padding: 12px 22px 8px 0; position: relative; }
.performance-card + .performance-card { border-left: 1px solid #edf1f6; padding-left: 22px; }
.performance-card strong { color: #0f1830; display: block; font-family: Inter, Arial, sans-serif; font-size: 26px; font-weight: 800; margin-top: 8px; }
.performance-card .trend {
  line-height: 1.45;
  max-width: 150px;
}

.sparkline,
.sparkline.alt {
  display: none;
}

.sparkline-chart {
  color: #35c979;
  display: block;
  height: 28px;
  margin-top: 13px;
  width: 74px;
}

.sparkline-chart path {
  fill: none;
  opacity: 0.9;
  stroke: currentColor;
  stroke-width: 2.2;
}
.problems-panel .panel-heading { margin-bottom: 20px; }
.problems-panel .panel-heading a { color: #0f6bff; font-size: 12px; font-weight: 800; }
.problem-list { display: grid; gap: 14px; }
.problem-list div { align-items: center; display: grid; gap: 12px; grid-template-columns: 24px minmax(130px, 1fr) minmax(110px, 1.4fr) 42px; }
.problem-list span { align-items: center; background: #edf4ff; border-radius: 6px; color: #405272; display: inline-flex; font-size: 12px; font-weight: 800; height: 24px; justify-content: center; width: 24px; }
.problem-list strong { color: #405272; font-size: 12px; font-weight: 750; }
.problem-list i { background: #edf1f6; border-radius: 999px; display: block; height: 7px; overflow: hidden; position: relative; }
.problem-list i::before { background: var(--tone); border-radius: inherit; content: ""; inset: 0 auto 0 0; position: absolute; width: var(--value); }
.problem-list em { color: #172033; font-size: 12px; font-style: normal; font-weight: 800; text-align: right; }

@media (max-width: 1180px) {
  .dashboard-kpi-row,
  .performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .performance-card:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 820px) {
  body:has(.manager-dashboard-v2) .topbar { padding-left: 16px; }
  body:has(.manager-dashboard-v2) .manager-shell { grid-template-columns: 1fr; }
  .manager-sidebar-v2 { min-height: auto; position: static; }
  .dashboard-hero,
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-create-button { justify-content: center; width: 100%; }
}

@media (max-width: 620px) {
  body:has(.manager-dashboard-v2) .manager-content { padding: 24px 14px 48px; }
  .dashboard-kpi-row,
  .performance-grid { grid-template-columns: 1fr; }
  .performance-card,
  .performance-card + .performance-card,
  .performance-card:nth-child(3) { border-left: 0; border-top: 1px solid #edf1f6; padding: 18px 0; }
  .performance-card:first-child { border-top: 0; }
  .problem-list div { grid-template-columns: 24px minmax(100px, 1fr) 44px; }
  .problem-list i { grid-column: 2 / -1; }
}

/* ================================================================
   CLAIM PAGE MODERN REDESIGN
   ================================================================ */

body:has(.claim-page) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

.claim-page {
  background: #f6f9fd;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

body:has(.claim-page)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(235, 244, 255, 0.28)),
    url("../img/preview3.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

.claim-page::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(235, 244, 255, 0.28)),
    url("../img/preview3.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: 0;
}

body:has(.claim-page)::after {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.54), transparent 36%),
    rgba(255, 255, 255, 0.18);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

.claim-page::after {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.54), transparent 36%),
    rgba(255, 255, 255, 0.18);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body:has(.claim-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.claim-page {
  display: grid;
  margin: 0 auto;
  max-width: none;
  min-height: calc(100vh - 56px);
  padding: clamp(34px, 6vh, 64px) 24px 48px;
  place-items: center;
}

.claim-modern {
  position: relative;
  z-index: 1;
}

.claim-page .form-page,
.claim-modern {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: auto;
  width: min(100%, 620px);
}

.claim-page .request-side,
.claim-modern .request-side {
  text-align: center;
  width: min(100%, 560px);
}

.claim-page .request-side .eyebrow,
.claim-modern .request-side .eyebrow {
  align-items: center;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  color: #d85f0d !important;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 14px;
  padding: 8px 13px;
  text-transform: none;
}

.claim-page .request-side .eyebrow::before,
.claim-modern .request-side .eyebrow::before {
  display: none;
}

.claim-page .request-side h1,
.claim-modern .request-side h1 {
  color: #102033;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0;
  line-height: 1.03;
  margin: 0 auto 12px;
  max-width: 560px;
}

.claim-page .request-side .muted,
.claim-modern .request-side .muted {
  color: #526174;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 520px;
}

.claim-page .claim-warning,
.claim-page .artisan-photo,
.claim-modern .claim-warning,
.claim-modern .artisan-photo {
  display: none;
}

.claim-page .request-form-card.claim-card,
.claim-modern .request-form-card.claim-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  border-top: 5px solid rgba(239, 99, 45, 0.86);
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
  gap: 16px;
  padding: clamp(24px, 4vw, 34px);
  width: min(100%, 560px);
}

.claim-page .claim-card > .eyebrow,
.claim-modern .claim-card > .eyebrow {
  color: #d85f0d !important;
  font-size: 11px;
  letter-spacing: 0;
  margin: 0;
  text-transform: none;
}

.claim-page .claim-card > .eyebrow::before,
.claim-modern .claim-card > .eyebrow::before {
  background: #f97316;
}

.claim-page .claim-card h2,
.claim-modern .claim-card h2 {
  color: #152235;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px !important;
}

.claim-page label,
.claim-modern label {
  color: #26364c;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.claim-page input,
.claim-page textarea,
.claim-modern input,
.claim-modern textarea {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(196, 209, 226, 0.78);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: #142235;
  font-size: 14px;
  min-height: 50px;
  padding: 13px 15px;
}

.claim-page textarea,
.claim-modern textarea {
  min-height: 126px;
}

.claim-page input:focus,
.claim-page textarea:focus,
.claim-modern input:focus,
.claim-modern textarea:focus {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(249, 115, 22, 0.78);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.claim-page .primary-button.danger,
.claim-modern .primary-button.danger {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  min-height: 52px;
}

.claim-page .primary-button.danger:hover,
.claim-modern .primary-button.danger:hover {
  background: linear-gradient(135deg, #ff862d, #c94312);
  box-shadow: 0 20px 42px rgba(217, 78, 24, 0.34);
  transform: translateY(-2px);
}

.claim-page .form-footnote,
.claim-modern .form-footnote {
  border-top: 1px solid rgba(210, 220, 235, 0.72);
  color: #68778b;
  margin-top: 12px;
  padding-top: 16px;
}

@media (max-width: 760px) {
  .claim-page {
    min-height: auto;
    padding: 28px 16px 40px;
  }

  .claim-page .request-side h1 {
    font-size: 34px;
  }

  .claim-page .request-form-card.claim-card {
    border-radius: 20px;
    padding: 22px;
  }
}

/* Live Flask fallback: targets the actual rendered reclamation markup. */
body:has(.claim-card) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.claim-card)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(235, 244, 255, 0.28)),
    url("../img/preview3.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.claim-card)::after {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.54), transparent 36%),
    rgba(255, 255, 255, 0.18);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.claim-card) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.page:has(.claim-card) {
  display: grid;
  margin: 0 auto;
  max-width: none;
  min-height: calc(100vh - 56px);
  padding: clamp(34px, 6vh, 64px) 24px 48px;
  place-items: center;
}

.page:has(.claim-card) .form-page.danger-zone {
  align-items: center;
  background: transparent;
  border: 0;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: auto;
  padding: 0;
  width: min(100%, 620px);
}

.page:has(.claim-card) .request-side {
  text-align: center;
  width: min(100%, 560px);
}

.page:has(.claim-card) .request-side .eyebrow {
  align-items: center;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  color: #d85f0d !important;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 14px;
  padding: 8px 13px;
  text-transform: none;
}

.page:has(.claim-card) .request-side .eyebrow::before {
  display: none;
}

.page:has(.claim-card) .request-side h1 {
  color: #102033;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0;
  line-height: 1.03;
  margin: 0 auto 12px;
  max-width: 560px;
}

.page:has(.claim-card) .request-side .muted {
  color: #526174;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 auto !important;
  max-width: 520px;
}

.page:has(.claim-card) .claim-warning,
.page:has(.claim-card) .artisan-photo {
  display: none;
}

.page:has(.claim-card) .request-form-card.claim-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  border-top: 5px solid rgba(239, 99, 45, 0.86);
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
  gap: 16px;
  padding: clamp(24px, 4vw, 34px);
  width: min(100%, 560px);
}

.page:has(.claim-card) .claim-card > .eyebrow {
  color: #d85f0d !important;
  font-size: 11px;
  letter-spacing: 0;
  margin: 0;
  text-transform: none;
}

.page:has(.claim-card) .claim-card > .eyebrow::before {
  background: #f97316;
}

.page:has(.claim-card) .claim-card h2 {
  color: #152235;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px !important;
}

.page:has(.claim-card) label {
  color: #26364c;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.page:has(.claim-card) input,
.page:has(.claim-card) textarea {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(196, 209, 226, 0.78);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: #142235;
  font-size: 14px;
  min-height: 50px;
  padding: 13px 15px;
}

.page:has(.claim-card) textarea {
  min-height: 126px;
}

.page:has(.claim-card) input:focus,
.page:has(.claim-card) textarea:focus {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(249, 115, 22, 0.78);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.page:has(.claim-card) .primary-button.danger {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  min-height: 52px;
}

.page:has(.claim-card) .primary-button.danger:hover {
  background: linear-gradient(135deg, #ff862d, #c94312);
  box-shadow: 0 20px 42px rgba(217, 78, 24, 0.34);
  transform: translateY(-2px);
}

.page:has(.claim-card) .form-footnote {
  border-top: 1px solid rgba(210, 220, 235, 0.72);
  color: #68778b;
  margin-top: 12px;
  padding-top: 16px;
}

@media (max-width: 760px) {
  .page:has(.claim-card) {
    min-height: auto;
    padding: 28px 16px 40px;
  }

  .page:has(.claim-card) .request-side h1 {
    font-size: 34px;
  }

  .page:has(.claim-card) .request-form-card.claim-card {
    border-radius: 20px;
    padding: 22px;
  }
}

/* ================================================================
   HISTORY PAGE MODERN REDESIGN
   ================================================================ */

body:has(.history-page) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.history-page)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(232, 243, 255, 0.36)),
    url("../img/preview4.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.82);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.history-page)::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.58), transparent 38%),
    rgba(245, 250, 255, 0.22);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.history-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.history-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(30px, 5vh, 54px) 24px 64px;
}

.history-page .history-header {
  align-items: end;
  margin: 0 auto 22px;
  max-width: 1080px;
}

.history-page .history-header h1 {
  color: #102033;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0;
}

.history-page .history-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
  margin: 0 auto;
  max-width: 1080px;
  padding: clamp(24px, 4vw, 36px);
}

.history-page .section-title {
  border-bottom: 1px solid rgba(210, 220, 235, 0.76);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.history-page .section-title h2 {
  color: #152235;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.history-page .ticket-list {
  gap: 14px;
}

.history-page .ticket-card {
  align-items: start;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(210, 220, 235, 0.78);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(22, 44, 78, 0.08);
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
}

.history-page .ticket-card:hover {
  border-color: rgba(24, 95, 165, 0.22);
  box-shadow: 0 18px 42px rgba(22, 44, 78, 0.13);
  transform: translateY(-2px);
}

.history-page .ticket-card.claim {
  background: rgba(255, 248, 246, 0.72);
  border-color: rgba(239, 99, 45, 0.22);
}

.history-page .ticket-id,
.history-page .status {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(22, 44, 78, 0.07);
  color: #405272;
}

.history-page .status {
  justify-content: center;
  min-width: 116px;
}

.history-page .sla-client-note {
  background: rgba(230, 241, 251, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.14);
  border-radius: 14px;
  color: #185fa5;
  padding: 11px 13px;
}

.history-page .sla-client-note.late {
  background: rgba(253, 240, 239, 0.8);
  border-color: rgba(212, 91, 91, 0.2);
  color: #b03e3e;
}

.history-page .response-box {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 95, 165, 0.14);
  border-left: 4px solid #185fa5;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(22, 44, 78, 0.06);
}

.history-page .response-box.danger {
  background: rgba(253, 240, 239, 0.72);
  border-color: rgba(212, 91, 91, 0.18);
  border-left-color: #d45b5b;
}

.history-page .history-journal {
  display: none;
}

@media (max-width: 760px) {
  .history-page {
    padding: 28px 16px 44px;
  }

  .history-page .history-header {
    align-items: flex-start;
  }

  .history-page .ticket-card {
    grid-template-columns: 1fr;
  }
}

/* Live Flask fallback + final scope for the real Historique markup. */
body:has(.historique-page),
body:has(.history-panel) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.historique-page)::before,
body:has(.history-panel)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(232, 243, 255, 0.36)),
    url("../img/preview4.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.82);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.historique-page)::after,
body:has(.history-panel)::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.58), transparent 38%),
    rgba(245, 250, 255, 0.22);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.historique-page) .topbar,
body:has(.history-panel) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.historique-page,
.page:has(.history-panel) {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(30px, 5vh, 54px) 24px 64px;
}

.historique-page .history-header,
.page:has(.history-panel) .history-header {
  align-items: end;
  margin: 0 auto 22px;
  max-width: 1080px;
}

.historique-page .history-header h1,
.page:has(.history-panel) .history-header h1 {
  color: #102033;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0;
}

.historique-page .history-panel,
.page:has(.history-panel) .history-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
  margin: 0 auto;
  max-width: 1080px;
  padding: clamp(24px, 4vw, 36px);
}

.historique-page .section-title,
.page:has(.history-panel) .section-title {
  border-bottom: 1px solid rgba(210, 220, 235, 0.76);
  margin-bottom: 18px;
  padding-bottom: 18px;
}

.historique-page .section-title h2,
.page:has(.history-panel) .section-title h2 {
  color: #152235;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.historique-page .ticket-list,
.page:has(.history-panel) .ticket-list {
  gap: 14px;
}

.historique-page .ticket-card,
.page:has(.history-panel) .ticket-card {
  align-items: start;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(210, 220, 235, 0.78);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(22, 44, 78, 0.08);
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
}

.historique-page .ticket-card:hover,
.page:has(.history-panel) .ticket-card:hover {
  border-color: rgba(24, 95, 165, 0.22);
  box-shadow: 0 18px 42px rgba(22, 44, 78, 0.13);
  transform: translateY(-2px);
}

.historique-page .ticket-card.claim,
.page:has(.history-panel) .ticket-card.claim {
  background: rgba(255, 248, 246, 0.72);
  border-color: rgba(239, 99, 45, 0.22);
}

.historique-page .ticket-id,
.historique-page .status,
.page:has(.history-panel) .ticket-id,
.page:has(.history-panel) .status {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(22, 44, 78, 0.07);
  color: #405272;
}

.historique-page .status,
.page:has(.history-panel) .status {
  justify-content: center;
  min-width: 116px;
}

.historique-page .sla-client-note,
.page:has(.history-panel) .sla-client-note {
  background: rgba(230, 241, 251, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.14);
  border-radius: 14px;
  color: #185fa5;
  padding: 11px 13px;
}

.historique-page .sla-client-note.late,
.page:has(.history-panel) .sla-client-note.late {
  background: rgba(253, 240, 239, 0.8);
  border-color: rgba(212, 91, 91, 0.2);
  color: #b03e3e;
}

.historique-page .response-box,
.page:has(.history-panel) .response-box {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 95, 165, 0.14);
  border-left: 4px solid #185fa5;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(22, 44, 78, 0.06);
}

.historique-page .response-box.danger,
.page:has(.history-panel) .response-box.danger {
  background: rgba(253, 240, 239, 0.72);
  border-color: rgba(212, 91, 91, 0.18);
  border-left-color: #d45b5b;
}

.historique-page .history-journal,
.page:has(.history-panel) .history-journal {
  display: none;
}

@media (max-width: 760px) {
  .historique-page,
  .page:has(.history-panel) {
    padding: 28px 16px 44px;
  }

  .historique-page .history-header,
  .page:has(.history-panel) .history-header {
    align-items: flex-start;
  }

  .historique-page .ticket-card,
  .page:has(.history-panel) .ticket-card {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   CLIENT DOSSIER CARDS + DETAILS MODAL
   ================================================================ */

.dossier-card {
  cursor: pointer;
  outline: none;
}

.dossier-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(24, 95, 165, 0.16), 0 16px 36px rgba(22, 44, 78, 0.13);
}

.dossier-card-main {
  min-width: 0;
}

.dossier-card-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.dossier-date {
  color: #6d7b8f;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

.dossier-card-meta {
  align-items: end;
  justify-items: end;
  min-width: 128px;
}

.dossier-card-meta .dossier-type,
.dossier-card-meta .status {
  text-transform: capitalize;
}

.dossier-card-meta form {
  width: 100%;
}

.dossier-card-meta .secondary-button {
  font-size: 12px;
  min-height: 34px;
  padding: 7px 12px;
  width: 100%;
}

.dossier-modal[hidden] {
  display: none;
}

.dossier-modal {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  overflow: hidden;
  padding: 16px;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.24s ease;
  z-index: 9999;
}

.dossier-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dossier-modal-backdrop {
  background: rgba(10, 22, 36, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  inset: 0;
  position: absolute;
}

.dossier-modal-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(241, 248, 255, 0.7));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(10, 28, 52, 0.28);
  color: #102033;
  max-height: 90vh;
  max-height: 90dvh;
  max-width: 760px;
  overflow: hidden;
  position: relative;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.28s cubic-bezier(.22, 1, .36, 1), opacity 0.22s ease;
  width: min(calc(100vw - 32px), 760px);
  z-index: 1;
}

.dossier-modal.is-open .dossier-modal-panel {
  transform: translateY(0) scale(1);
}

.dossier-modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(22, 44, 78, 0.1);
  color: #26384f;
  cursor: pointer;
  display: inline-flex;
  font-size: 26px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 18px;
  transition: all 0.2s ease;
  width: 38px;
  z-index: 2;
}

.dossier-modal-close:hover {
  background: white;
  transform: translateY(-1px);
}

.dossier-modal-content {
  box-sizing: border-box;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: clamp(24px, 4vw, 36px);
  scroll-behavior: auto;
  scrollbar-color: rgba(24, 95, 165, 0.34) transparent;
  scrollbar-width: thin;
}

.dossier-modal-kicker {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-right: 48px;
}

.dossier-modal-kicker span,
.dossier-detail-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  color: #405272;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dossier-modal h2 {
  color: #102033;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 48px 8px 0;
}

.dossier-modal-number {
  color: #68778b;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 24px;
}

.dossier-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dossier-detail-item {
  align-items: start;
  border-radius: 16px;
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.dossier-detail-item:hover,
.dossier-detail-section:hover,
.dossier-response-history article:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.dossier-detail-item span,
.dossier-detail-section h3,
.dossier-response-history span {
  color: #6b7a8f;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier-detail-item strong {
  color: #152235;
  font-size: 14px;
  line-height: 1.35;
}

.dossier-detail-section {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  margin-top: 12px;
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dossier-detail-section h3 {
  margin: 0 0 8px;
}

.dossier-detail-section p {
  color: #26384f;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.dossier-response-history {
  display: grid;
  gap: 10px;
}

.dossier-response-history article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-left: 3px solid rgba(24, 95, 165, 0.32);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 13px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dossier-response-history strong {
  color: #152235;
  display: block;
  font-size: 14px;
  margin: 3px 0 4px;
}

@media (max-width: 760px) {
  .dossier-card,
  .page:has(.home-hero) .dossier-card,
  .historique-page .dossier-card,
  .page:has(.history-panel) .dossier-card {
    grid-template-columns: 1fr;
  }

  .dossier-date {
    margin-left: 0;
  }

  .dossier-card-meta {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    justify-items: start;
    min-width: 0;
  }

  .dossier-card-meta form {
    width: auto;
  }

  .dossier-detail-grid {
    grid-template-columns: 1fr;
  }

  .dossier-modal-panel,
  .dossier-modal-content {
    max-height: 90vh;
    max-height: 90dvh;
  }

  .dossier-modal {
    padding: 10px;
  }

  .dossier-modal-panel {
    border-radius: 20px;
    width: min(calc(100vw - 20px), 760px);
  }
}

/* ================================================================
   NOTIFICATIONS PAGE MODERN REDESIGN
   ================================================================ */

body:has(.notifications-page),
body:has(.notifications-shell) {
  background: #edf5fb;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.notifications-page)::before,
body:has(.notifications-shell)::before {
  background:
    linear-gradient(rgba(12, 35, 62, 0.34), rgba(235, 246, 255, 0.28)),
    url("../img/preview5.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.notifications-page)::after,
body:has(.notifications-shell)::after {
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.38), transparent 36%),
    rgba(8, 32, 56, 0.16);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.notifications-page) .topbar,
body:has(.notifications-shell) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.notifications-page,
.page:has(.notifications-shell) {
  margin: 0 auto;
  max-width: 940px;
  min-height: calc(100vh - 56px);
  padding: clamp(30px, 5vh, 56px) 24px 60px;
}

.notifications-page .center-header,
.page:has(.notifications-shell) .center-header {
  margin: 0 auto 22px;
  max-width: 820px;
}

.notifications-page .center-header h1,
.page:has(.notifications-shell) .center-header h1 {
  color: #102033;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: 0;
}

.notifications-page .center-header .eyebrow,
.page:has(.notifications-shell) .center-header .eyebrow {
  color: #f97316;
}

.notifications-page .notifications-shell,
.page:has(.notifications-shell) .notifications-shell {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(10, 31, 55, 0.18);
  margin: 0 auto;
  max-width: 820px;
  padding: clamp(18px, 3vw, 26px);
}

.notifications-page .notification-list,
.page:has(.notifications-shell) .notification-list {
  gap: 14px;
}

.notifications-page .notification-card,
.page:has(.notifications-shell) .notification-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(210, 220, 235, 0.74);
  border-left: 0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(22, 44, 78, 0.08);
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.notifications-page .notification-card::before,
.page:has(.notifications-shell) .notification-card::before {
  display: none;
}

.notifications-page .notification-card:hover,
.page:has(.notifications-shell) .notification-card:hover {
  border-color: rgba(249, 115, 22, 0.24);
  box-shadow: 0 18px 42px rgba(22, 44, 78, 0.14);
  transform: translateY(-2px);
}

.notifications-page .notification-card span,
.page:has(.notifications-shell) .notification-card span {
  color: #60718a;
  letter-spacing: 0;
  text-transform: none;
}

.notifications-page .notification-card h3,
.page:has(.notifications-shell) .notification-card h3 {
  color: #132238;
  font-size: 16px;
  margin: 0 0 5px;
}

.notifications-page .notification-card p,
.page:has(.notifications-shell) .notification-card p {
  color: #526174;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.notifications-page .notification-action,
.page:has(.notifications-shell) .notification-action {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(217, 78, 24, 0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 14px;
  white-space: nowrap;
}

.notifications-page .notification-action:hover,
.page:has(.notifications-shell) .notification-action:hover {
  background: linear-gradient(135deg, #ff862d, #c94312);
  box-shadow: 0 18px 36px rgba(217, 78, 24, 0.32);
  color: #fff;
  transform: translateY(-1px);
}

.notifications-page .notification-gallery,
.page:has(.notifications-shell) .notification-gallery {
  display: none;
}

@media (max-width: 760px) {
  .notifications-page,
  .page:has(.notifications-shell) {
    padding: 28px 16px 44px;
  }

  .notifications-page .center-header,
  .page:has(.notifications-shell) .center-header {
    align-items: flex-start;
  }

  .notifications-page .notification-card,
  .page:has(.notifications-shell) .notification-card {
    grid-template-columns: 1fr;
  }

  .notifications-page .notification-action,
  .page:has(.notifications-shell) .notification-action {
    justify-content: center;
    width: 100%;
  }
}

/* ================================================================
   EVALUATION PAGE MODERN REDESIGN
   ================================================================ */

body:has(.evaluation-page) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.evaluation-page)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.24), rgba(232, 243, 255, 0.38)),
    url("../img/preview1.webp.webp");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.82);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.evaluation-page)::after {
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.58), transparent 38%),
    rgba(255, 255, 255, 0.18);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.evaluation-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.evaluation-page {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 56px);
  padding: clamp(28px, 5vh, 54px) 20px 48px;
}

.evaluation-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
  gap: 14px;
  max-width: 500px;
  padding: clamp(24px, 4vw, 34px);
  width: min(100%, 500px);
}

.evaluation-card::before {
  background: linear-gradient(90deg, #185fa5, #f97316);
  border-radius: 24px 24px 0 0;
  height: 5px;
  left: 0;
  right: 0;
  top: 0;
}

.evaluation-intro {
  margin: 4px auto 4px;
}

.evaluation-intro h1 {
  color: #102033 !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 4vw, 40px) !important;
  letter-spacing: 0;
}

.evaluation-intro .muted {
  color: #526174;
  line-height: 1.55;
}

.evaluation-rating-block {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 18px;
}

.evaluation-stars {
  gap: 10px;
}

.evaluation-stars .star-button {
  color: rgba(203, 213, 225, 0.9);
  font-size: clamp(42px, 7vw, 56px);
  text-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
}

.evaluation-stars .star-button:hover,
.evaluation-stars .star-button.is-active {
  color: #f97316;
}

.evaluation-stars .star-button:hover {
  transform: translateY(-2px) scale(1.14);
}

.rating-feedback {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(249, 115, 22, 0.22);
  color: #d85f0d;
  font-size: 12px;
  min-width: 142px;
}

.evaluation-card select,
.evaluation-card textarea {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(196, 209, 226, 0.78);
  border-radius: 14px;
}

.evaluation-card textarea {
  min-height: 104px;
}

.evaluation-submit {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.28);
  min-height: 52px;
}

.evaluation-submit:hover {
  background: linear-gradient(135deg, #ff862d, #c94312);
  box-shadow: 0 20px 42px rgba(217, 78, 24, 0.34);
}

.evaluation-help-card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(17, 38, 68, 0.12);
  color: #526174;
  margin-top: 14px;
  max-width: 500px;
  padding: 16px 18px;
  width: min(100%, 500px);
}

.evaluation-help-card strong {
  color: #102033;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.evaluation-help-card p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 760px) {
  .evaluation-page {
    padding: 28px 16px 44px;
  }

  .evaluation-card,
  .evaluation-help-card {
    border-radius: 20px;
  }
}

/* ================================================================
   PROFILE PAGE MODERN REDESIGN
   ================================================================ */

body:has(.profile-page) {
  background: #edf5fb;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.profile-page)::before {
  background:
    linear-gradient(rgba(9, 32, 56, 0.34), rgba(232, 243, 255, 0.24)),
    url("../img/preview4.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.profile-page)::after {
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.42), transparent 38%),
    rgba(8, 32, 56, 0.14);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.profile-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.profile-page {
  background: transparent !important;
  display: block !important;
  min-height: calc(100vh - 56px) !important;
}

.profile-page .profile-content {
  margin: 0 auto;
  max-width: 960px;
  padding: clamp(30px, 5vh, 54px) 24px 64px !important;
}

.profile-page .profile-header {
  margin: 0 auto 24px !important;
  text-align: center;
}

.profile-page .profile-avatar {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 42px rgba(17, 38, 68, 0.18) !important;
  height: 86px !important;
  width: 86px !important;
}

.profile-page .profile-avatar span {
  background: linear-gradient(135deg, #eaf4ff, #ffffff) !important;
  color: #185fa5 !important;
  font-size: 30px;
  height: 68px !important;
  width: 68px !important;
}

.profile-page .profile-avatar img {
  border: 6px solid rgba(255, 255, 255, 0.86) !important;
  height: 86px !important;
  width: 86px !important;
}

.profile-page .profile-avatar small {
  background: #f97316 !important;
  display: grid;
  height: 24px !important;
  place-items: center;
  right: 2px !important;
  width: 24px !important;
}

.profile-page .profile-photo-button {
  color: #f97316 !important;
}

.profile-page .profile-header h1 {
  color: #ffffff !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 4vw, 50px) !important;
  letter-spacing: 0;
  margin: 12px 0 4px !important;
  text-shadow: 0 10px 28px rgba(6, 24, 44, 0.28);
}

.profile-page .profile-header p {
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 14px !important;
}

.profile-page .profile-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr !important;
  margin: 0 auto !important;
  max-width: 760px !important;
}

.profile-page .profile-stack {
  display: grid;
  gap: 18px;
}

.profile-page .profile-card {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16) !important;
  gap: 13px !important;
  padding: clamp(22px, 4vw, 30px) !important;
}

.profile-page .profile-card-large {
  min-height: auto !important;
}

.profile-page .profile-card h2 {
  border-bottom: 0 !important;
  color: #102033 !important;
  font-family: 'Inter', Arial, sans-serif !important;
  font-size: 20px !important;
  font-weight: 800;
  margin: 0 0 6px !important;
  padding-bottom: 0 !important;
}

.profile-page .profile-card label {
  color: #26364c !important;
  font-size: 11px !important;
  letter-spacing: 0;
  text-transform: none;
}

.profile-page .profile-card input {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(196, 209, 226, 0.78) !important;
  border-radius: 14px !important;
  color: #142235 !important;
  min-height: 48px !important;
  padding: 0 15px !important;
}

.profile-page .profile-card input:focus {
  border-color: rgba(249, 115, 22, 0.78) !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
  outline: none;
}

.profile-page .profile-primary-button,
.profile-page .profile-secondary-button {
  background: linear-gradient(135deg, #f97316, #d94e18) !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.26);
  color: #fff !important;
  min-height: 48px !important;
}

.profile-page .profile-outline-button {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(24, 95, 165, 0.26) !important;
  border-radius: 16px !important;
  color: #185fa5 !important;
  min-height: 48px !important;
  text-transform: none !important;
}

.profile-page .profile-toggle-row {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(210, 220, 235, 0.62);
  border-radius: 16px;
  padding: 14px;
}

.profile-page .profile-toggle-row strong {
  color: #102033 !important;
  font-weight: 800 !important;
}

.profile-page .profile-toggle-row small {
  color: #60718a !important;
}

.profile-page .profile-toggle-row i {
  background: #d9e5f2 !important;
  flex: 0 0 auto;
}

.profile-page .profile-toggle-row input:checked + i {
  background: #f97316 !important;
}

@media (max-width: 760px) {
  .profile-page .profile-content {
    padding: 28px 16px 44px !important;
  }

  .profile-page .profile-card {
    border-radius: 20px !important;
  }
}

/* ================================================================
   CHATBOT PAGE MODERN REDESIGN
   ================================================================ */

body:has(.chatbot-page) {
  background: #f6f9fd;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.chatbot-page)::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.24), rgba(232, 243, 255, 0.36)),
    url("../img/preview6.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.8);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.chatbot-page)::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.52), transparent 38%),
    rgba(255, 255, 255, 0.16);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.chatbot-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.chatbot-page {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 120px);
  padding: clamp(28px, 5vh, 54px) 24px 56px;
}

.chatbot-page .faq-sidebar,
.chatbot-page .chat-window {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
}

.chatbot-page .faq-sidebar {
  align-content: start;
  gap: 18px;
  padding: 26px;
}

.chatbot-page .faq-sidebar h2 {
  color: #102033;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.chatbot-page .faq-sidebar .eyebrow {
  color: #f97316;
}

.chatbot-page .quick-question-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow: visible;
}

.chatbot-page .quick-question-bar form {
  display: flex;
  flex: 1 1 142px;
  min-width: min(100%, 142px);
}

.chatbot-page .quick-question-bar button {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(22, 44, 78, 0.07);
  color: #185fa5;
  font-size: 13px;
  line-height: 1.35;
  min-height: 42px;
  padding: 10px 14px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.chatbot-page .quick-question-bar button:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.22);
  color: #d85f0d;
  transform: translateY(-1px);
}

.chatbot-page .faq-photo {
  background-image:
    linear-gradient(rgba(12, 35, 62, 0.16), rgba(12, 35, 62, 0.24)),
    url("../img/preview6.webp.png");
  background-position: center;
  background-size: cover;
  border-radius: 18px;
  box-shadow: inset 0 -60px 80px rgba(6, 24, 44, 0.34);
  min-height: 180px;
}

.chatbot-page .chat-window {
  background: #eaf3ff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-width: none;
  overflow: hidden;
  width: 100%;
}

.chatbot-page .chat-header {
  background: rgba(24, 95, 165, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  padding: 18px 22px;
}

.chatbot-page .assistant-avatar {
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(6, 24, 44, 0.18);
  color: #185fa5;
}

.chatbot-page .chat-header h1 {
  font-size: 22px;
}

.chatbot-page .chat-status {
  background: rgba(255, 255, 255, 0.18);
}

.chatbot-page .chat-body,
.chatbot-page .history-conversation {
  background: #eaf3ff;
  gap: 14px;
  height: min(58vh, 560px);
  min-height: 430px;
  padding: 22px;
}

.chatbot-page .chat-message {
  max-width: min(78%, 620px);
}

.chatbot-page .message-bubble {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(22, 44, 78, 0.08);
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 15px;
}

.chatbot-page .chat-message.user .message-bubble {
  background: linear-gradient(135deg, #185fa5, #0f72b2);
  border-bottom-right-radius: 6px;
}

.chatbot-page .chat-message.bot .message-bubble {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(210, 220, 235, 0.78);
  border-bottom-left-radius: 6px;
}

.chatbot-page .chat-input-form {
  background: #eaf3ff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 0;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.chatbot-page .chat-input-form::before {
  display: none;
}

.chatbot-page .chat-input-form input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(196, 209, 226, 0.78);
  border-radius: 16px;
  min-height: 46px;
  padding: 0 15px;
}

.chatbot-page .chat-input-form input:focus {
  border-color: rgba(249, 115, 22, 0.78);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.chatbot-page .chat-input-form .primary-button {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(217, 78, 24, 0.25);
  min-height: 46px;
  min-width: 104px;
  padding: 0 16px;
}

.chatbot-page .chat-input-form .primary-button:hover {
  background: linear-gradient(135deg, #ff862d, #c94312);
  box-shadow: 0 18px 36px rgba(217, 78, 24, 0.32);
}

@media (max-width: 960px) {
  .chatbot-page {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 16px 44px;
  }

  .chatbot-page .chat-body,
  .chatbot-page .history-conversation {
    height: 56vh;
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .chatbot-page .chat-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chatbot-page .chat-header > div:last-child {
    grid-column: 1 / -1;
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  .chatbot-page .chat-message {
    max-width: 92%;
  }

  .chatbot-page .chat-input-form {
    grid-template-columns: 1fr;
  }

  .chatbot-page .chat-input-form .primary-button {
    width: 100%;
  }
}

/* ================================================================
   LOGIN PAGE PHOTO BACKGROUND REDESIGN
   ================================================================ */

.login-page {
  align-items: center !important;
  background: transparent !important;
  display: flex !important;
  isolation: isolate !important;
  justify-content: center !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  padding: clamp(24px, 5vw, 56px) !important;
  position: relative !important;
  z-index: 0 !important;
}

.login-page::before {
  animation: none !important;
  background-image: url("../img/preview7.webp.avif") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  border-radius: 0 !important;
  content: "" !important;
  filter: blur(8px) brightness(0.85) saturate(0.95) !important;
  height: auto !important;
  inset: 0 !important;
  pointer-events: none !important;
  position: fixed !important;
  transform: scale(1.04) !important;
  width: auto !important;
  z-index: -2 !important;
}

.login-page::after {
  animation: none !important;
  background: rgba(220, 235, 248, 0.35) !important;
  border-radius: 0 !important;
  content: "" !important;
  height: auto !important;
  inset: 0 !important;
  pointer-events: none !important;
  position: fixed !important;
  width: auto !important;
  z-index: -1 !important;
}

.login-page .login-shell.two-col {
  display: grid !important;
  grid-template-columns: 1fr !important;
  margin: 0 auto !important;
  max-width: 480px !important;
  min-height: auto !important;
  position: relative !important;
  width: min(100%, 480px) !important;
  z-index: 1 !important;
}

.login-page .login-shell::before,
.login-page .login-shell::after {
  display: none !important;
}

.login-page .login-left {
  align-items: center !important;
  background: transparent !important;
  display: flex !important;
  justify-content: center !important;
}

.login-page .login-card.light,
.login-page .login-card {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.18) !important;
  color: #102033 !important;
  padding: clamp(24px, 4vw, 34px) !important;
  text-align: center !important;
  width: 100% !important;
}

.login-page .login-card h1 {
  color: #102033 !important;
  font-size: clamp(34px, 5vw, 46px) !important;
  letter-spacing: 0 !important;
}

.login-page .login-card > .eyebrow {
  display: none !important;
}

.login-logo {
  width: 390px !important;
  max-width: 95% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto 18px auto !important;
  object-fit: contain !important;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.login-page img[alt="logo"],
.login-page img[src$="logo.png"] {
  content: url("../img/preview8.webp.png") !important;
  width: 390px !important;
  max-width: 95% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 18px auto !important;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.login-page .login-brand-sub {
  color: #f97316 !important;
}

.login-page .login-subtitle {
  color: #526174 !important;
  margin-bottom: 18px !important;
}

.login-page .login-form {
  background: rgba(255, 255, 255, 0.56) !important;
  border: 1px solid rgba(210, 220, 235, 0.68) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
  padding: 18px !important;
}

.login-page .login-form input,
.login-page input {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(196, 209, 226, 0.78) !important;
  border-radius: 14px !important;
  color: #142235 !important;
  min-height: 48px !important;
  padding: 0 15px !important;
}

.login-page .login-form input:focus {
  border-color: rgba(249, 115, 22, 0.78) !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14) !important;
  outline: none !important;
}

.login-page .primary-button {
  background: linear-gradient(135deg, #f97316, #d94e18) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.28) !important;
  min-height: 48px !important;
}

.login-page .primary-button:hover {
  background: linear-gradient(135deg, #ff862d, #c94312) !important;
  box-shadow: 0 20px 42px rgba(217, 78, 24, 0.34) !important;
}

.login-page [data-demo-accounts] > p {
  color: #60718a !important;
  letter-spacing: 0 !important;
  margin-top: 14px !important;
  text-transform: none !important;
}

.login-page .demo-grid {
  gap: 10px !important;
  margin-top: 10px !important;
}

.login-page .demo-card {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(210, 220, 235, 0.62) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(22, 44, 78, 0.06) !important;
  padding: 13px !important;
}

.login-page .demo-card:hover {
  background: rgba(255, 255, 255, 0.68) !important;
  border-color: rgba(249, 115, 22, 0.24) !important;
  transform: translateY(-2px) !important;
}

.login-page .demo-card strong {
  color: #102033 !important;
}

.login-page .demo-card span {
  color: #60718a !important;
}

.login-page .login-right {
  display: none !important;
}

@media (max-width: 620px) {
  .login-page {
    padding: 18px !important;
  }

  .login-page .demo-grid {
    grid-template-columns: 1fr !important;
  }

  .login-page .login-card.light,
  .login-page .login-card {
    border-radius: 20px !important;
  }
}

/* ================================================================
   TRACKING DETAIL PAGE MODERN REDESIGN
   ================================================================ */

body:has(.tracking-detail-page) {
  background: #edf5fb;
  min-height: 100vh;
  overflow-x: hidden;
}

body:has(.tracking-detail-page)::before {
  background:
    linear-gradient(rgba(8, 32, 56, 0.36), rgba(232, 243, 255, 0.24)),
    url("../img/preview9.webp.png");
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(18px) brightness(0.78);
  inset: -28px;
  position: fixed;
  transform: scale(1.06);
  z-index: -2;
}

body:has(.tracking-detail-page)::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.44), transparent 38%),
    rgba(8, 32, 56, 0.16);
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

body:has(.tracking-detail-page) .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 241, 0.74);
  box-shadow: 0 10px 30px rgba(18, 40, 70, 0.06);
}

.tracking-detail-page {
  background: transparent;
  min-height: calc(100vh - 56px);
  padding: clamp(30px, 5vh, 56px) 24px 64px;
}

.tracking-detail-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin: 0 auto;
  max-width: 1120px;
}

.tracking-detail-main,
.tracking-summary {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 38, 68, 0.16);
}

.tracking-detail-main {
  padding: clamp(24px, 4vw, 36px);
}

.tracking-detail-header {
  align-items: start;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(210, 220, 235, 0.68);
  border-radius: 18px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 26px;
  padding: 18px;
}

.tracking-detail-header .eyebrow {
  color: #f97316;
}

.tracking-detail-header h1 {
  color: #102033;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: 0;
  margin: 0 0 8px;
}

.tracking-detail-header p {
  color: #526174;
  line-height: 1.55;
  margin: 0;
}

.tracking-status-pill {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 95, 165, 0.14);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(22, 44, 78, 0.08);
  color: #185fa5;
  padding: 7px 12px;
}

.order-timeline {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(210, 220, 235, 0.62);
  border-radius: 20px;
  display: grid;
  gap: 0;
  padding: 20px;
}

.timeline-step {
  gap: 16px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 82px;
}

.timeline-step::after {
  background: rgba(24, 95, 165, 0.18);
  left: 18px;
  top: 38px;
  width: 2px;
}

.timeline-dot {
  background: rgba(255, 255, 255, 0.86);
  border: 2px solid rgba(196, 209, 226, 0.9);
  box-shadow: 0 8px 18px rgba(22, 44, 78, 0.08);
  height: 38px;
  width: 38px;
}

.timeline-step.terminee .timeline-dot {
  background: rgba(232, 247, 239, 0.95);
  border-color: #2fb36f;
}

.timeline-step.en_cours .timeline-dot {
  background: rgba(230, 241, 251, 0.95);
  border-color: #185fa5;
}

.timeline-step strong {
  color: #102033;
  font-size: 15px;
  font-weight: 800;
  margin-top: 4px;
}

.timeline-step p {
  color: #60718a;
  font-size: 13px;
}

.tracking-actions {
  border-top: 1px solid rgba(210, 220, 235, 0.72);
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
}

.tracking-actions .primary-button {
  background: linear-gradient(135deg, #f97316, #d94e18);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(217, 78, 24, 0.28);
}

.tracking-actions .secondary-button.danger {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(212, 91, 91, 0.22);
  border-radius: 16px;
  color: #b03e3e;
}

.tracking-summary {
  align-self: start;
  padding: 22px;
}

.tracking-summary h2 {
  color: #102033;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.tracking-summary dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.tracking-summary dl div {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(210, 220, 235, 0.58);
  border-radius: 16px;
  padding: 13px;
}

.tracking-summary dt {
  color: #60718a;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.tracking-summary dd {
  color: #102033;
  font-size: 14px;
  font-weight: 800;
  margin: 4px 0 0;
}

@media (max-width: 900px) {
  .tracking-detail-layout {
    grid-template-columns: 1fr;
  }

  .tracking-summary {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .tracking-detail-page {
    padding: 28px 16px 44px;
  }

  .tracking-detail-header {
    flex-direction: column;
  }

  .tracking-actions {
    justify-content: stretch;
  }

  .tracking-actions .primary-button,
  .tracking-actions .secondary-button {
    width: 100%;
  }

  .order-timeline {
    padding: 16px;
  }
}

/* ================================================================
   BLUE PRIMARY ACCENTS
   ================================================================ */
.login-page .login-brand-sub,
.notifications-page .center-header .eyebrow,
.page:has(.notifications-shell) .center-header .eyebrow,
.chatbot-page .faq-sidebar .eyebrow,
.tracking-detail-header .eyebrow,
.rating-feedback,
.evaluation-stars .star-button:hover,
.evaluation-stars .star-button.is-active,
.profile-page .profile-photo-button {
  color: #185fa5 !important;
}

.login-page .login-form input:focus,
.chatbot-page .chat-input-form input:focus,
.profile-page .profile-card input:focus,
.claim-modern input:focus,
.claim-modern select:focus,
.claim-modern textarea:focus,
.page:has(.claim-card) input:focus,
.page:has(.claim-card) select:focus,
.page:has(.claim-card) textarea:focus {
  border-color: rgba(24, 95, 165, 0.78) !important;
  box-shadow: 0 0 0 4px rgba(24, 95, 165, 0.14) !important;
}

.login-page .primary-button,
.chatbot-page .chat-input-form .primary-button,
.notifications-page .notification-action,
.page:has(.notifications-shell) .notification-action,
.evaluation-submit,
.profile-page .profile-primary-button,
.profile-page .profile-secondary-button,
.tracking-actions .primary-button,
.claim-page .primary-button.danger,
.claim-modern .primary-button.danger,
.page:has(.claim-card) .primary-button.danger {
  background: linear-gradient(135deg, #2f7fce, #185fa5) !important;
  box-shadow: 0 16px 34px rgba(24, 95, 165, 0.28) !important;
}

.login-page .primary-button:hover,
.chatbot-page .chat-input-form .primary-button:hover,
.evaluation-submit:hover,
.claim-page .primary-button.danger:hover,
.claim-modern .primary-button.danger:hover,
.page:has(.claim-card) .primary-button.danger:hover {
  background: linear-gradient(135deg, #3d91e2, #124a82) !important;
  box-shadow: 0 20px 42px rgba(24, 95, 165, 0.34) !important;
}

/* ================================================================
   MANAGER CLIENT MESSAGES
   ================================================================ */
.client-messages-table table {
  min-width: 820px;
}

.client-message-cell {
  line-height: 1.45;
  max-width: 520px;
  white-space: normal;
}

.client-message-reply-link {
  display: inline-flex;
  font-size: 12px;
  min-height: 34px;
  padding: 7px 13px;
}

.client-message-reply-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
}

.client-message-preview,
.client-message-reply-form {
  border-radius: 8px;
}

.client-message-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.client-message-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-message-body p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.client-message-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.client-message-empty-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(210, 220, 235, 0.74);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(22, 44, 78, 0.1);
  color: #526174;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 56px 28px;
  text-align: center;
}

.client-message-empty-icon {
  align-items: center;
  background: rgba(24, 95, 165, 0.08);
  border: 1px solid rgba(24, 95, 165, 0.12);
  border-radius: 999px;
  color: #185fa5;
  display: flex;
  height: 74px;
  justify-content: center;
  margin-bottom: 18px;
  width: 74px;
}

.client-message-empty-icon svg {
  height: 38px;
  width: 38px;
}

.client-message-empty-card h2 {
  color: #132238;
  font-size: 24px;
  margin: 0 0 8px;
}

.client-message-empty-card p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 980px) {
  .client-message-reply-layout {
    grid-template-columns: 1fr;
  }

  .client-message-actions {
    flex-direction: column-reverse;
  }

  .client-message-actions .primary-button,
  .client-message-actions .ghost-button {
    width: 100%;
  }
}

.evaluation-card::before {
  background: linear-gradient(90deg, #185fa5, #2f7fce) !important;
}

.evaluation-stars .star-button {
  text-shadow: 0 8px 18px rgba(24, 95, 165, 0.18) !important;
}

.profile-page .profile-avatar small,
.profile-page .profile-toggle-row input:checked + i {
  background: #185fa5 !important;
}

.chatbot-page .quick-question-bar button:hover,
.claim-page .request-side .eyebrow,
.claim-modern .request-side .eyebrow,
.page:has(.claim-card) .request-side .eyebrow {
  background: rgba(24, 95, 165, 0.12) !important;
  border-color: rgba(24, 95, 165, 0.22) !important;
  color: #185fa5 !important;
}

.claim-modern .claim-card > .eyebrow,
.page:has(.claim-card) .claim-card > .eyebrow {
  color: #185fa5 !important;
}

.claim-modern .claim-card > .eyebrow::before,
.page:has(.claim-card) .claim-card > .eyebrow::before {
  background: #185fa5 !important;
}

body:has(.claim-card) {
  overflow: auto !important;
}

.claim-page,
.page:has(.claim-card) {
  min-height: auto !important;
  overflow: visible !important;
  place-items: start center !important;
}

/* Topbar brand logo */
.brand {
  min-width: max-content;
}

.brand-logo-img {
  display: block;
  height: 34px;
  max-width: 150px;
  object-fit: contain;
  width: auto;
}

.brand:hover .brand-logo-img {
  transform: translateY(-1px);
}

body:has(.manager-shell) .brand-logo-img,
body:has(.manager-dashboard-v2) .brand-logo-img {
  height: 32px;
}

@media (max-width: 600px) {
  .brand-logo-img {
    height: 30px;
    max-width: 132px;
  }
}
