/* ===== Smart e-Invoice Platform — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --radius: 0.75rem;
  --background: #f8f9fc;
  --foreground: #1a1d2e;
  --card: #ffffff;
  --card-foreground: #1a1d2e;
  --popover: #ffffff;
  --popover-foreground: #1a1d2e;
  --primary: #2d3a8c;
  --primary-foreground: #f8f9fc;
  --secondary: #eef0f6;
  --secondary-foreground: #2d3a8c;
  --muted: #eef0f6;
  --muted-foreground: #6b7194;
  --accent: #e8eaf5;
  --accent-foreground: #2d3a8c;
  --destructive: #dc3545;
  --destructive-foreground: #f8f9fc;
  --border: #e0e3ef;
  --input: #e0e3ef;
  --ring: #2d3a8c;
  --cyan: #0db9d7;
  --cyan-foreground: #fff;
  --purple: #7c3aed;
  --purple-foreground: #fff;
  --success: #22c55e;
  --success-foreground: #fff;
  --warning: #eab308;
  --warning-foreground: #1a1d2e;
  --sidebar-bg: #1a1d2e;
  --sidebar-fg: #e0e3ef;
  --sidebar-accent: #2d3a8c;
  --sidebar-border: #2a2d40;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== Utilities ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media(min-width:640px) { .container { padding: 0 1.5rem; } }
@media(min-width:1024px) { .container { padding: 0 2rem; } }

.gradient-primary { background: linear-gradient(135deg, var(--primary), var(--cyan)); }
.gradient-hero { background: linear-gradient(135deg, #12152a 0%, #1e2250 50%, #191d3e 100%); }
.gradient-accent { background: linear-gradient(135deg, var(--cyan), var(--purple)); }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.shadow-glow { box-shadow: 0 0 30px rgba(45,58,140,0.15), 0 0 60px rgba(13,185,215,0.08); }
.shadow-card { box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.08); }

.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,0.12); }

/* ===== Animations ===== */
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)} }
@keyframes float { 0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)} }
@keyframes pulseGlow { 0%,100%{box-shadow:0 0 20px var(--primary)}50%{box-shadow:0 0 40px var(--primary),0 0 60px var(--cyan)} }
.animate-fade-up { animation: fadeUp 0.6s ease-out both; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.875rem; border-radius: var(--radius);
  padding: 0.625rem 1.25rem; border: none; transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-cyan:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-hero { background: var(--cyan); color: #fff; padding: 0.875rem 2rem; font-size: 1rem; border-radius: 0.75rem; }
.btn-hero:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(13,185,215,0.3); }
.btn-hero-outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 0.875rem 2rem; font-size: 1rem; border-radius: 0.75rem; }
.btn-hero-outline:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; }
.btn-block { width: 100%; }

/* ===== Card ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.card-title { font-size: 0.9375rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.card-content { padding: 1.5rem; }

/* ===== Form Inputs ===== */
.form-input {
  width: 100%; height: 2.75rem; border-radius: 0.5rem; border: 1px solid var(--input);
  background: var(--card); padding: 0 1rem; font-size: 0.875rem; color: var(--foreground);
  outline: none; transition: box-shadow 0.2s;
}
.form-input:focus { box-shadow: 0 0 0 2px var(--ring); }
.form-input::placeholder { color: var(--muted-foreground); }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.form-textarea {
  width: 100%; border-radius: 0.5rem; border: 1px solid var(--input);
  background: var(--card); padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--foreground);
  outline: none; resize: none; transition: box-shadow 0.2s;
}
.form-textarea:focus { box-shadow: 0 0 0 2px var(--ring); }

/* ===== Badge ===== */
.badge {
  display: inline-flex; align-items: center; padding: 0.25rem 0.625rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
}
.badge-success { background: rgba(34,197,94,0.1); color: var(--success); }
.badge-warning { background: rgba(234,179,8,0.1); color: #b8860b; }
.badge-destructive { background: rgba(220,53,69,0.1); color: var(--destructive); }
.badge-cyan { background: rgba(13,185,215,0.1); color: var(--cyan); }
.badge-purple { background: rgba(124,58,237,0.1); color: var(--purple); }
.badge-primary { background: rgba(45,58,140,0.1); color: var(--primary); }
.badge-muted { background: var(--muted); color: var(--muted-foreground); }

/* ===== Tables ===== */
.table { width: 100%; text-align: left; font-size: 0.875rem; border-collapse: collapse; }
.table th { padding: 0.75rem; font-weight: 500; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.table td { padding: 0.75rem; border-bottom: 1px solid rgba(224,227,239,0.5); }
.table tr:hover td { background: rgba(238,240,246,0.3); }

/* ===== Icon box ===== */
.icon-box {
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; flex-shrink: 0;
}
.icon-box-sm { width: 2.25rem; height: 2.25rem; }
.icon-box-md { width: 2.5rem; height: 2.5rem; }
.icon-box-lg { width: 3rem; height: 3rem; }
.icon-box-xl { width: 5rem; height: 5rem; }

/* ===== Status dot ===== */
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0; }

/* ===== Landing Header ===== */
.landing-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 4rem; display: flex; align-items: center;
}
.landing-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.landing-header nav { display: flex; align-items: center; gap: 2rem; }
.landing-header nav a { font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); transition: color 0.2s; }
.landing-header nav a:hover { color: var(--foreground); }
.landing-header .header-actions { display: flex; align-items: center; gap: 0.75rem; }

.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary-foreground); }
.logo-text { font-size: 1.125rem; font-weight: 700; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; padding: 8rem 0 4rem;
}
.hero .decorative {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.15;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media(min-width:1024px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(13,185,215,0.1); border: 1px solid rgba(13,185,215,0.2);
  border-radius: 9999px; padding: 0.375rem 1rem; margin-bottom: 1.5rem;
}
.hero-badge .dot { background: var(--cyan); }
.hero-badge span { font-size: 0.875rem; font-weight: 500; color: var(--cyan); }
.hero h1 { font-size: 2.5rem; font-weight: 800; color: var(--primary-foreground); margin-bottom: 1.5rem; line-height: 1.15; }
@media(min-width:640px) { .hero h1 { font-size: 3rem; } }
@media(min-width:1024px) { .hero h1 { font-size: 3.75rem; } }
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--cyan), #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p.lead { font-size: 1.125rem; color: rgba(248,249,252,0.7); margin-bottom: 2rem; max-width: 36rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-checks { display: flex; gap: 2rem; margin-top: 2.5rem; font-size: 0.875rem; color: rgba(248,249,252,0.6); }
.hero-checks span { display: flex; align-items: center; gap: 0.5rem; }
.hero-checks svg { color: var(--success); }
.hero-image { position: relative; display: none; }
@media(min-width:1024px) { .hero-image { display: block; } }
.hero-image .glow {
  position: absolute; inset: 0; border-radius: 1.5rem;
  filter: blur(30px); opacity: 0.2;
}

/* ===== Sections ===== */
.section { padding: 6rem 0; }
.section-alt { background: rgba(238,240,246,0.5); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header .overline { font-size: 0.875rem; font-weight: 600; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.05em; }
.section-header h2 { font-size: 1.875rem; margin-top: 0.75rem; margin-bottom: 1rem; }
@media(min-width:640px) { .section-header h2 { font-size: 2.25rem; } }
.section-header p { font-size: 1.125rem; color: var(--muted-foreground); max-width: 40rem; margin: 0 auto; }

/* ===== Features Grid ===== */
.features-grid { display: grid; gap: 1.5rem; }
@media(min-width:640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card { padding: 1.5rem; border-radius: 1rem; }
.feature-card h3 { font-size: 1.125rem; margin: 1rem 0 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* ===== Benefits Grid ===== */
.benefits-grid { display: grid; gap: 2rem; }
@media(min-width:768px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .benefits-grid { grid-template-columns: repeat(3, 1fr); } }
.benefit-item { display: flex; gap: 1rem; }
.benefit-item h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.benefit-item p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }
.benefit-icon {
  width: 3rem; height: 3rem; border-radius: 0.75rem;
  background: rgba(13,185,215,0.1); border: 1px solid rgba(13,185,215,0.2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.benefit-icon svg { width: 1.5rem; height: 1.5rem; color: var(--cyan); }

/* ===== Steps ===== */
.steps-row { display: flex; flex-direction: column; gap: 2rem; }
@media(min-width:1024px) { .steps-row { flex-direction: row; justify-content: space-between; } }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-icon-wrap { position: relative; margin-bottom: 1rem; }
.step-icon {
  width: 5rem; height: 5rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.step-icon svg { width: 2rem; height: 2rem; color: var(--primary-foreground); }
.step-number {
  position: absolute; top: -0.5rem; right: -0.5rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--cyan); color: #fff; font-size: 0.875rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.step p { font-size: 0.875rem; color: var(--muted-foreground); max-width: 200px; }

/* ===== Stats Banner ===== */
.stats-banner { padding: 5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media(min-width:1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: center; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--primary-foreground); }
@media(min-width:640px) { .stat-value { font-size: 3rem; } }
.stat-label { font-size: 0.875rem; color: rgba(248,249,252,0.7); margin-top: 0.5rem; }

/* ===== Testimonials ===== */
.testimonials-grid { display: grid; gap: 2rem; }
@media(min-width:768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { padding: 2rem; border-radius: 1rem; }
.testimonial-stars { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.testimonial-stars svg { width: 1rem; height: 1rem; fill: var(--warning); color: var(--warning); }
.testimonial-quote { color: rgba(26,29,46,0.8); margin-bottom: 1.5rem; font-style: italic; line-height: 1.6; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-foreground); font-size: 0.875rem; font-weight: 600;
}
.testimonial-name { font-weight: 600; font-size: 0.875rem; }
.testimonial-role { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Footer ===== */
.site-footer { background: var(--foreground); color: var(--primary-foreground); padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 3rem; }
@media(min-width:768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 { font-weight: 600; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.875rem; opacity: 0.6; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-col p { font-size: 0.875rem; opacity: 0.6; line-height: 1.7; }
.footer-contact li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; opacity: 0.6; margin-bottom: 0.75rem; }
.footer-contact svg { width: 1rem; height: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(248,249,252,0.1); margin-top: 3rem; padding-top: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  font-size: 0.875rem; opacity: 0.4;
}
@media(min-width:768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a:hover { opacity: 1; }

/* ===== Auth Pages ===== */
.auth-page { min-height: 100vh; display: flex; }
.auth-illustration {
  display: none; width: 50%; align-items: center; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden;
}
@media(min-width:1024px) { .auth-illustration { display: flex; } }
.auth-illustration .decorative {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.15;
}
.auth-illustration .content { position: relative; z-index: 10; text-align: center; }
.auth-illustration h2 { font-size: 1.875rem; color: var(--primary-foreground); margin-bottom: 1rem; }
.auth-illustration p { color: rgba(248,249,252,0.6); max-width: 20rem; }
.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form { width: 100%; max-width: 28rem; }
.auth-form h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-form .subtitle { color: var(--muted-foreground); margin-bottom: 2rem; }
.auth-form .form-group { margin-bottom: 1.25rem; }
.auth-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.auth-form .form-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.auth-form .form-footer a { color: var(--cyan); font-weight: 500; }
.auth-form .form-footer a:hover { text-decoration: underline; }
.password-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted-foreground); padding: 0;
}
.password-toggle:hover { color: var(--foreground); }
.remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; font-size: 0.875rem; }
.remember-row label { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); cursor: pointer; }
.remember-row a { color: var(--cyan); }
.remember-row a:hover { text-decoration: underline; }

/* ===== Dashboard Layout ===== */
.dashboard-layout { display: flex; min-height: 100vh; }


/* Sidebare */

.sidebare {
    position: fixed;          /* Sidebar reste fixe */
    top: 0;
    left: 0;
    width: 280px;             /* Largeur de la sidebar */
    height: 100vh;            /* Toute la hauteur de l'écran */
    background: linear-gradient(180deg, #0f172a, #7c3aed);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;         /* Scroll si le menu est long */
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}
/* Sidebar */
.sidebar {
    position: fixed;          /* Sidebar reste fixe */
    top: 0;
    left: 0;
    width: 280px;             /* Largeur de la sidebar */
    height: 100vh;            /* Toute la hauteur de l'écran */
    background: linear-gradient(180deg, #0f172a, #1e3a8a);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;         /* Scroll si le menu est long */
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}
.sidebar.collapsed { width: 4.25rem; }
/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.sidebar-logo 
.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}
.sidebar-nav { flex: 1; padding: 1rem 0.5rem; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: rgba(224,227,239,0.6);
  transition: all 0.2s; margin-bottom: 0.125rem;
}
.sidebar-nav a:hover { color: var(--sidebar-fg); background: rgba(45,58,140,0.3); }
.sidebar-nav a.active { color: var(--cyan); background: var(--sidebar-accent); }
.sidebar-nav svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
/* Footer */
.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.sidebar-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem; background: none; border: none;
  font-size: 0.875rem; color: rgba(224,227,239,0.6); transition: all 0.2s;
}
.sidebar-toggle:hover { color: var(--sidebar-fg); background: rgba(45,58,140,0.3); }
.sidebar-logout {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: rgba(224,227,239,0.6);
  transition: all 0.2s; margin-top: 0.25rem;
}
.sidebar-logout:hover { color: var(--destructive); }

/* Topbar */
.topbar {
  height: 4rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; background: var(--card); border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 1.125rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.topbar-search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--secondary); border-radius: 0.5rem; padding: 0 0.75rem; height: 2.25rem;
}
.topbar-search input {
  background: transparent; border: none; font-size: 0.875rem;
  color: var(--foreground); outline: none; width: 10rem;
}
.topbar-search input::placeholder { color: var(--muted-foreground); }
.topbar-bell {
  position: relative; width: 2.25rem; height: 2.25rem; border-radius: 0.5rem;
  background: var(--secondary); border: none; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.topbar-bell:hover { background: var(--accent); }
.topbar-bell svg { width: 1rem; height: 1rem; color: var(--muted-foreground); }
.topbar-bell .badge-count {
  position: absolute; top: -0.25rem; right: -0.25rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--destructive); color: #fff;
  font-size: 0.625rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar svg { width: 1rem; height: 1rem; color: var(--primary-foreground); }

/* Main content */
.main-content {
    margin-left: 280px;   /* même largeur que sidebar */
    width: calc(100% - 280px);
    padding: 20px;
}
.main-content-inner { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ===== Dashboard Stats ===== */
.stats-cards { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
@media(min-width:640px) { .stats-cards { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .stats-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card .card-content { padding: 1.25rem; }
.stat-card .stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.stat-card .stat-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary-foreground); }
.stat-card .stat-change { font-size: 0.75rem; font-weight: 600; }
.stat-card .stat-change.positive { color: var(--success); }
.stat-card .stat-change.negative { color: var(--destructive); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.875rem; color: var(--muted-foreground); }

/* ===== Charts placeholder ===== */
.chart-placeholder {
  width: 100%; height: 280px; border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(45,58,140,0.05), rgba(13,185,215,0.05));
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); font-size: 0.875rem;
}

/* ===== Grid layouts ===== */
.grid-2-1 { display: grid; gap: 1.5rem; }
@media(min-width:1024px) { .grid-2-1 { grid-template-columns: 2fr 1fr; } }
.grid-2 { display: grid; gap: 1.5rem; }
@media(min-width:1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 1rem; }
@media(min-width:768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-6 { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media(min-width:1024px) { .grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media(min-width:1280px) { .grid-6 { grid-template-columns: repeat(6, 1fr); } }

/* ===== Activity list ===== */
.activity-list { display: flex; flex-direction: column; gap: 1rem; }
.activity-item { display: flex; gap: 0.75rem; }
.activity-item .dot { margin-top: 0.5rem; }
.activity-item p { font-size: 0.875rem; }
.activity-item .time { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Drop zone ===== */
.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem; border: 2px dashed var(--border); border-radius: 0.75rem;
  cursor: pointer; transition: all 0.2s;
}
.drop-zone:hover { border-color: rgba(13,185,215,0.5); background: rgba(238,240,246,0.3); }
.drop-zone.active { border-color: var(--cyan); background: rgba(13,185,215,0.05); transform: scale(1.01); }
.drop-zone .drop-icon {
  width: 4rem; height: 4rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.drop-zone .drop-icon svg { width: 2rem; height: 2rem; color: var(--primary-foreground); }
.drop-zone h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.drop-zone p { font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 1rem; }

/* ===== File list ===== */
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem; border-radius: 0.75rem; background: rgba(238,240,246,0.3);
  border: 1px solid var(--border);
}
.file-item .file-info { display: flex; align-items: center; gap: 0.75rem; }
.file-item .file-info svg { width: 2rem; height: 2rem; color: var(--cyan); }
.file-item .file-name { font-size: 0.875rem; font-weight: 500; }
.file-item .file-size { font-size: 0.75rem; color: var(--muted-foreground); }
.file-item .file-status { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 500; }

/* ===== Cert / ERP items ===== */
.cert-item, .erp-form-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem; border-radius: 0.75rem; background: rgba(238,240,246,0.3);
  border: 1px solid var(--border);
}
.cert-info { display: flex; align-items: center; gap: 0.75rem; }
.cert-info svg { width: 2rem; height: 2rem; color: var(--success); }
.cert-name { font-size: 0.875rem; font-weight: 500; }
.cert-detail { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Notification items ===== */
.notif-item {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem;
}
.notif-item.unread { border-left: 3px solid var(--cyan); }
.notif-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-title { font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.notif-desc { font-size: 0.875rem; color: var(--muted-foreground); }
.notif-time { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ===== Ticket items ===== */
.ticket-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem; border-radius: 0.75rem; background: rgba(238,240,246,0.3);
  border: 1px solid var(--border); cursor: pointer; transition: background 0.2s;
}
.ticket-item:hover { background: rgba(238,240,246,0.5); }
.ticket-info { display: flex; align-items: center; gap: 0.75rem; }
.ticket-info svg { width: 1.25rem; height: 1.25rem; }
.ticket-subject { font-size: 0.875rem; font-weight: 500; }
.ticket-meta { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Audit log items ===== */
.audit-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem; border-radius: 0.5rem; transition: background 0.2s;
}
.audit-item:hover { background: rgba(238,240,246,0.3); }
.audit-item svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.audit-action { font-size: 0.875rem; font-weight: 500; }
.audit-user { font-size: 0.75rem; color: var(--muted-foreground); }
.audit-detail { font-size: 0.75rem; color: var(--muted-foreground); }
.audit-time { font-size: 0.75rem; color: var(--muted-foreground); white-space: nowrap; margin-left: auto; }

/* ===== Client cards ===== */
.client-card { padding: 1.25rem; border-radius: 0.75rem; border: 1px solid var(--border); background: var(--card); }
.client-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.client-card h3 { font-weight: 600; margin-bottom: 0.25rem; }
.client-card .tax-id, .client-card .email { font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 0.125rem; }
.client-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.75rem; }
.client-card-footer span { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Pagination ===== */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--border);
}
.pagination-info { font-size: 0.875rem; color: var(--muted-foreground); }
.pagination-btns { display: flex; align-items: center; gap: 0.5rem; }
.pagination-btns button {
  padding: 0.375rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.8125rem; font-weight: 500; border: 1px solid var(--border);
  background: var(--card); color: var(--foreground); transition: all 0.2s;
}
.pagination-btns button:hover { background: var(--accent); }
.pagination-btns button.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.pagination-btns button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Filter pills ===== */
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-pill {
  padding: 0.375rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.75rem; font-weight: 500; border: none;
  background: var(--secondary); color: var(--muted-foreground); transition: all 0.2s;
}
.filter-pill:hover { color: var(--foreground); }
.filter-pill.active { background: var(--primary); color: var(--primary-foreground); }

/* ===== Action buttons (table) ===== */
.action-btn {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: none; border: none; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.action-btn:hover { background: var(--muted); }
.action-btn svg { width: 1rem; height: 1rem; color: var(--muted-foreground); }

/* ===== Search bar inline ===== */
.search-bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--secondary); border-radius: 0.5rem; padding: 0 0.75rem; height: 2.25rem;
}
.search-bar input {
  background: transparent; border: none; font-size: 0.875rem;
  color: var(--foreground); outline: none; width: 10rem;
}
.search-bar input::placeholder { color: var(--muted-foreground); }
.search-bar svg { width: 1rem; height: 1rem; color: var(--muted-foreground); }

/* ===== Status config alert ===== */
.status-alert {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem; border-radius: 0.5rem;
}
.status-alert.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); }
.status-alert.warning { background: rgba(234,179,8,0.1); border: 1px solid rgba(234,179,8,0.2); }
.status-alert svg { width: 1.25rem; height: 1.25rem; }
.status-alert .alert-title { font-size: 0.875rem; font-weight: 500; }
.status-alert .alert-desc { font-size: 0.75rem; color: var(--muted-foreground); }

/* ===== Responsive nav toggle (mobile) ===== */
.mobile-toggle { display: none; background: none; border: none; }
@media(max-width:767px) {
  .mobile-toggle { display: block; }
  .landing-header nav { display: none; }
  .landing-header .header-actions { display: none; }
  .sidebar { display: none; }
}

/* ===== Profile ===== */
.profile-header { display: flex; align-items: center; gap: 1.25rem; }
.profile-avatar {
  width: 5rem; height: 5rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar svg { width: 2.5rem; height: 2.5rem; color: var(--primary-foreground); }
.profile-name { font-size: 1.25rem; font-weight: 700; }
.profile-role { font-size: 0.875rem; color: var(--muted-foreground); }
.profile-plan { font-size: 0.75rem; color: var(--cyan); margin-top: 0.25rem; }

/* ===== Max width wrapper ===== */
.max-w-3xl { max-width: 48rem; margin: 0 auto; }
.max-w-4xl { max-width: 56rem; margin: 0 auto; }

/* ===== Spacing helpers ===== */
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }

/* ===== SVG Icons (via Lucide CDN sprite classes) ===== */
/* We use inline SVGs in HTML for simplicity */
