/* Atelier Suite — clean active stylesheet
   Scope: index.html + src/app.bundle.js only. Original file archived in /legacy/active-before-fix/. */

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top left, rgba(15,118,110,.09), transparent 32rem),
    radial-gradient(circle at top right, rgba(20,184,166,.10), transparent 28rem),
    var(--background);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}
body[data-theme="dark"] {
  --primary:#020617;
  --secondary:#2DD4BF;
  --secondary-hover:#14B8A6;
  --accent:#5EEAD4;
  --accent-soft:rgba(45,212,191,.14);
  --background:#07111F;
  --card:#0F172A;
  --surface:#0F172A;
  --surface-soft:#111C2E;
  --soft:#111C2E;
  --text:#E5EEF9;
  --muted:#94A3B8;
  --line:#1E293B;
  --sidebar:#020617;
  --sidebar-hover:#111827;
  --sidebar-active:#0F766E;
  --shadow:0 18px 48px rgba(0,0,0,.34);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg { max-width: 100%; }
svg.lucide, .lucide-slot svg { width: 1.05em; height: 1.05em; stroke-width: 2.15; vertical-align: -0.15em; }
.hidden { display: none; }
.muted { color: var(--muted); }
.green-text { color: #047857; }
.red-text { color: #B91C1C; }
.center { text-align: center; }

/* Buttons, forms, basic UI */
.btn, .icon-btn, .profile-trigger, .category-main, .category-sub button, .drawer-row, .list-item, .client-option, .launcher-card, .soft-toggle, .stock-period-tabs button, .tabs button, .quick-amounts button, .pos-product, .stock-watch-row {
  border: 0;
  appearance: none;
  text-decoration: none;
}
.btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  color: var(--text);
  background: #EEF2F7;
  border: 1px solid rgba(148,163,184,.26);
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover, .icon-btn:hover, .profile-trigger:hover, .launcher-card:hover, .quick-action-card:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15,23,42,.10); }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--secondary), #0F766E); }
.btn.success { color: #fff; border-color: transparent; background: linear-gradient(135deg, #16A34A, #15803D); }
.btn.warning { color: #111827; border-color: transparent; background: linear-gradient(135deg, #FBBF24, #F59E0B); }
.btn.danger { color: #fff; border-color: transparent; background: linear-gradient(135deg, #DC2626, #DC2626); }
.btn.ghost { color: var(--text); background: rgba(241,245,249,.92); }
.btn.link { min-height: auto; padding: 0; background: transparent; border: 0; color: var(--secondary); box-shadow: none; }
.btn.icon-only, .icon-only-action { width: 42px; padding: 0; }
.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.icon-btn b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: white;
  background: var(--danger);
  display: grid;
  place-items: center;
  font-size: 11px;
  border: 2px solid var(--card);
}
.form, .form-grid { display: grid; gap: 14px; }
.form { margin-top: 18px; }
.form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full, .full { grid-column: 1 / -1; }
.field label { color: #334155; font-weight: 800; font-size: 13px; }
body[data-theme="dark"] .field label { color: #C9D5E6; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select, .stock-search input, .dash-search input, .command-input, .assistant-input, .ai-mini-input, .client-selector input, .repair-filter-select select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 13px;
  outline: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus, .command-input:focus, .assistant-input:focus, .ai-mini-input:focus {
  border-color: rgba(15,118,110,.65);
  box-shadow: 0 0 0 4px rgba(15,118,110,.13);
}
select { cursor: pointer; }
.actions, .toolbar, .filters, .module-head-actions, .workspace-actions, .client-head-actions, .repair-hero-actions, .stock-product-actions, .supplier-card-actions, .print-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.toolbar { justify-content: space-between; }
.toolbar h3 { margin: 0; }

/* Auth + landing */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(360px, 470px);
  background:
    linear-gradient(135deg, rgba(15,23,42,.98), rgba(15,23,42,.88) 48%, rgba(15,118,110,.90)),
    radial-gradient(circle at 20% 20%, rgba(15,118,110,.35), transparent 22rem);
}
.auth-brand { color: white; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.auth-brand h1 { margin: 28px 0 12px; max-width: 740px; font-family: var(--font-main); font-size: clamp(34px, 5vw, 64px); line-height: .98; letter-spacing: -.04em; }
.auth-brand p { max-width: 660px; color: #C9D5E6; font-size: 18px; }
.auth-panel { display: grid; place-items: center; padding: 24px; background: rgba(248,250,252,.96); }
body[data-theme="dark"] .auth-panel { background: rgba(2,6,23,.82); }
.auth-card, .card {
  background: color-mix(in srgb, var(--card) 96%, white 4%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card { width: min(100%, 420px); padding: 28px; }
.auth-card h2, .page-title h2 { margin: 0 0 8px; }
.brand-mark, .brand-orb, .logo-box, .module-title-icon, .client-title-icon {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  box-shadow: 0 16px 36px rgba(15,118,110,.25);
}
.brand-mark { width: 58px; height: 58px; border-radius: 18px; font-weight: 900; }
.test-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245,158,11,.14);
  color: #F59E0B;
  border: 1px solid rgba(245,158,11,.25);
  font-weight: 850;
  font-size: 13px;
}
.landing, .pms-home, .morocco-landing { min-height: 100vh; color: var(--text); padding: 24px clamp(18px,4vw,56px); }
.pms-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; }
.pms-brand { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.pms-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,.9fr); gap: 34px; align-items: center; padding: clamp(26px,4vw,56px) 0; }
.pms-copy h1 { margin: 12px 0 16px; font-family: var(--font-main); font-size: clamp(38px,6vw,72px); line-height: .98; letter-spacing: -.055em; }
.pms-copy p { color: var(--muted); font-size: 18px; max-width: 720px; }
.pms-overline, .pms-pill { display: inline-flex; align-items: center; gap: 8px; color: #0F766E; background: #CCFBF1; padding: 7px 11px; border-radius: 999px; font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pms-section { padding: clamp(36px,6vw,86px) 0; }
.pms-section h2 { margin: 0 0 16px; font-size: clamp(28px,4vw,46px); letter-spacing: -.035em; }
.module-cards, .price-grid, .platform-map, .setup-flow, .faq, .pms-trust, .superpowers { display: grid; gap: 16px; }
.module-cards { grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.module-cards article, .pricing, .faq article, .setup-flow article, .future-mockup, .cost-table, .demo-form {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.module-cards article > i, .module-cards article > svg { color: var(--secondary); font-size: 26px; }
.module-cards ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); }
.pms-trust, .superpowers { grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); }
.pms-trust span, .superpowers span, .category-pill { padding: 11px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; text-align: center; font-weight: 800; }
.future-mockup { min-height: 420px; display: grid; grid-template-columns: 84px 1fr; gap: 16px; overflow: hidden; }
.mock-sidebar, .mock-main, .mock-kpis, .mock-grid, .mock-top, .mock-table { display: grid; gap: 12px; }
.mock-sidebar { align-content: start; padding: 14px; border-radius: 18px; background: #0F172A; }
.mock-sidebar b, .mock-sidebar span, .mock-top span, .mock-table b { display: block; height: 12px; border-radius: 999px; background: rgba(255,255,255,.20); }
.mock-main { padding: 14px; }
.mock-kpis { grid-template-columns: repeat(3,1fr); }
.mock-kpis article { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.mock-grid { grid-template-columns: 1.2fr .8fr; }
.mock-chart { min-height: 170px; display: flex; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.mock-chart i, .chart-bars i, .mini-bars i { flex: 1; min-height: 16px; border-radius: 999px 999px 6px 6px; background: linear-gradient(180deg, var(--secondary), var(--accent)); }
.mock-donut, .donut { border-radius: 50%; background: conic-gradient(#16A34A 0 42%, #2DD4BF 42% 70%, #F59E0B 70% 86%, #E2E8F0 86%); }
.mock-donut { aspect-ratio: 1; min-height: 170px; }
.mock-table p { display: flex; justify-content: space-between; gap: 12px; padding: 10px; margin: 0; border-radius: 12px; background: var(--soft); }
.cost-table { display: grid; gap: 10px; }
.cost-table > div { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; padding: 12px; border-radius: 14px; background: var(--soft); }
.pms-band.final, .guarantee { padding: 30px; border-radius: 28px; background: linear-gradient(135deg, var(--primary), #1E3A8A); color: white; }
.pms-footer { padding: 24px 0; color: var(--muted); }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 292px minmax(0,1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 12px;
  color: #CBD5E1;
  background:
    linear-gradient(180deg, rgba(15,23,42,.99), rgba(15,23,42,.96)),
    radial-gradient(circle at top, rgba(15,118,110,.18), transparent 18rem);
  border-right: 1px solid rgba(148,163,184,.16);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 999px; }
.side-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand-orb { width: 46px; height: 46px; border-radius: 16px; font-weight: 950; }
.side-head strong, .side-user strong { color: white; display: block; }
.side-head small, .side-user small { color: #94A3B8; display: block; font-size: 12px; }
.nav { display: grid; gap: 8px; margin-top: 14px; }
.nav-category { display: grid; gap: 5px; }
.category-main, .category-sub button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  color: #CBD5E1;
  background: transparent;
  font-weight: 850;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.category-main span { flex: 1; }
.category-main:hover, .category-main.active, .nav-category.open > .category-main, .category-sub button:hover, .category-sub button.active {
  color: #fff;
  background: rgba(15,118,110,.23);
}
.category-main.active, .category-sub button.active { box-shadow: inset 3px 0 0 var(--accent); }
.category-sub { display: none; padding: 2px 0 4px 18px; }
.nav-category.open .category-sub { display: grid; gap: 4px; }
.category-sub button { min-height: 38px; color: #AFC0D6; font-size: 13px; }
.category-main .arrow { margin-left: auto; opacity: .7; }
.side-user { margin-top: 18px; padding: 12px; display: flex; align-items: center; gap: 10px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.avatar, .profile-face {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0F766E;
  background: #CCFBF1;
  font-weight: 950;
}
.avatar.small, .profile-face.small { width: 54px; height: 54px; border-radius: 18px; font-size: 20px; }
.main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: color-mix(in srgb, var(--background) 84%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu { display: none; }
.topbar-title { display: grid; gap: 2px; min-width: 0; }
.topbar-title strong { font-size: 17px; }
.topbar-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.profile { display: flex; align-items: center; gap: 9px; min-width: 0; }
.profile-trigger {
  min-height: 42px;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 15px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}
.profile-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 850; }
.theme-switcher { display: inline-flex; gap: 4px; padding: 4px; border-radius: 15px; background: var(--soft); border: 1px solid var(--line); }
.theme-switcher button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: transparent; }
.theme-switcher button.active { color: white; background: var(--secondary); }
.content { padding: clamp(18px, 3vw, 30px); display: grid; gap: 22px; min-width: 0; }
.page-title, .workspace-head, .module-hero, .unified-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.page-title h2, .workspace-head h2, .module-hero h1 { margin: 0; letter-spacing: -.035em; }
.page-title p, .workspace-head p, .module-title-block p { margin: 5px 0 0; color: var(--muted); }
.module-hero {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card) 95%, white 5%), color-mix(in srgb, var(--soft) 92%, white 8%));
  box-shadow: var(--shadow);
}
.module-title-block { display: flex; align-items: center; gap: 16px; min-width: 0; }
.module-title-icon, .client-title-icon { width: 54px; height: 54px; border-radius: 18px; flex: 0 0 auto; font-size: 23px; }
.module-crumb { color: var(--secondary); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.card { padding: 18px; min-width: 0; }
.card h3 { margin-top: 0; }
.grid, .module-grid { display: grid; gap: 16px; min-width: 0; }
.grid.two, .module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid.six, .simple-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid.workspace { grid-template-columns: 360px minmax(0,1fr); align-items: start; }

/* KPIs, charts, dashboard */
.stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 128px;
  overflow: visible;
  text-align: left;
}
.simple-stats .stat-card,
.grid.four .stat-card,
.grid.six .stat-card {
  min-height: 138px;
}
.stat-card > i,
.stat-card > svg,
.stat-card > span > i,
.stat-card > span > svg {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 16px;
  color: #0F766E;
  background: #CCFBF1;
  flex: 0 0 auto;
}
.stat-card > div,
.stat-card > span {
  min-width: 0;
}
.stat-card > span {
  display: grid;
  gap: 7px;
  align-self: stretch;
  align-content: center;
}
.stat-card strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 1.65vw, 28px);
  line-height: 1.12;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
  white-space: normal;
}
.stat-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.stat-card small {
  display: block;
  margin-top: 6px;
  color: #15803D;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.stat-card.loss > i,
.stat-card.loss > span > i,
.stat-card.expense > i,
.stat-card.expense > span > i { color: #B91C1C; background: #FEE2E2; }
.stat-card.warning > i,
.stat-card.warning > span > i { color: #92400E; background: #FEF3C7; }
.stat-card.revenue > i,
.stat-card.revenue > span > i,
.stat-card.income > i,
.stat-card.income > span > i { color: #047857; background: #D1FAE5; }
.stat-card.category-kpi {
  width: 100%;
  border: 1px solid var(--line);
}
.stat-card.category-kpi > div {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.dash-v2-layout, .finance-dashboard-v2, .stock-dashboard-layout, .supplier-dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.dash-v2-main, .dash-v2-aside, .dash-bottom-grid, .dash-two-col, .stock-top-grid, .repair-bottom-grid, .repair-analytics-grid { display: grid; gap: 16px; }
.dash-two-col, .dash-bottom-grid, .stock-top-grid, .repair-bottom-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dash-mini-grid, .mock-kpis, .client-metric-strip, .repair-metric-strip, .supplier-kpi-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dash-widget, .dash-accounting-card, .dash-balance-card, .chart-card, .stock-widget, .supplier-widget, .priority-panel, .repair-insights-panel, .repair-hero-panel, .gauge-card, .hero-report { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.dash-widget-head, .dash-card-head, .repair-panel-head, .stock-panel-head, .client-project-head, .supplier-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-card-preview, .visual-screen, .live-preview { border-radius: 18px; border: 1px solid var(--line); background: var(--soft); min-height: 180px; padding: 16px; overflow: hidden; }
.chart-bars, .mini-bars, .visual-bars, .supplier-bar-chart, .supplier-multi-bars { min-height: 160px; display: flex; align-items: end; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.mini-bars { min-height: 150px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.bar-green { background: linear-gradient(180deg, #22C55E, #16A34A); }
.bar-red { background: linear-gradient(180deg, #FB7185, #DC2626); }
.bar-blue { background: linear-gradient(180deg, #2DD4BF, #0F766E); }
.chart-legend, .dash-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.donut-row { display: flex; align-items: center; gap: 24px; min-height: 170px; }
.donut, .supplier-donut { width: 140px; height: 140px; flex: 0 0 auto; position: relative; }
.donut::after, .supplier-donut::after { content: ""; position: absolute; inset: 25px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
.insight-line, .priority-line, .dash-transaction, .dash-client-row, .supplier-line, .supplier-balance-row, .stock-summary-row, .ticket-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.insight-line:last-child, .priority-line:last-child, .dash-transaction:last-child { border-bottom: 0; }

/* Tables, badges, empty states */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 999px; }
table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; }
th, td { padding: 12px 13px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); background: var(--soft); text-transform: uppercase; letter-spacing: .045em; font-size: 11px; font-weight: 900; }
tr:last-child td { border-bottom: 0; }
.badge, .status-dot, .category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #334155;
  background: #E2E8F0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.badge.blue { color: #0F766E; background: #CCFBF1; }
.badge.cyan { color: #0F766E; background: #CCFBF1; }
.badge.green { color: #047857; background: #D1FAE5; }
.badge.yellow { color: #92400E; background: #FEF3C7; }
.badge.orange { color: #C2410C; background: #FFEDD5; }
.badge.red { color: #B91C1C; background: #FEE2E2; }
.empty, .empty-state-premium {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
  padding: 22px;
  border: 1px dashed #CBD5E1;
  border-radius: 18px;
  background: var(--soft);
  color: var(--muted);
}
.empty-state-premium i, .empty-state-premium svg { font-size: 30px; color: var(--secondary); }
.empty-state-premium h3 { margin: 0; color: var(--text); }
.empty-state-premium p { margin: 0; }
.empty-state-premium.compact { min-height: 110px; }
.alert, .notification-card {
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid #99F6E4;
  color: #0F766E;
  background: #F0FDFA;
}
.alert.success { color: #047857; background: #ECFDF5; border-color: #A7F3D0; }
.alert.danger { color: #B91C1C; background: #FEF2F2; border-color: #FECACA; }
.alert.warning { color: #92400E; background: #FFFBEB; border-color: #FDE68A; }

/* Modals, drawers, command palette */
.modal-backdrop, .command-backdrop, .module-launcher-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(15,23,42,.52);
  backdrop-filter: blur(10px);
}
.modal {
  width: min(960px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
}
.slide-panel, .notification-center {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 55;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 14px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.drawer-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; color: var(--text); background: transparent; text-align: left; font-weight: 850; }
.drawer-row:hover { background: var(--soft); }
.drawer-row.danger { color: #B91C1C; }
.command-palette, .module-launcher {
  width: min(760px, 100%);
  padding: 18px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.command-results, .launcher-grid { display: grid; gap: 10px; margin-top: 14px; }
.command-results button, .launcher-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 16px;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  text-align: left;
}
.launcher-grid { grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); }

/* Client, repair, stock, supplier cards */
.client-card-grid, .stock-product-grid, .repair-card-grid, .supplier-card-grid, .parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; }
.crm-client-card, .stock-product-card, .repair-work-card, .supplier-card-v2, .stock-market-card, .category-card, .quick-action-card, .client-data-card, .client-risk-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
.crm-client-top, .stock-product-body, .repair-work-body, .supplier-card-info { display: grid; gap: 10px; }
.crm-client-info, .stock-product-stats, .repair-work-metrics, .supplier-card-metrics, .client-data-list, .detail-list { display: grid; gap: 8px; }
.crm-client-info span, .stock-product-stats span, .repair-work-metrics span, .supplier-card-metrics span, .detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 13px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}
.crm-client-metrics, .client-risk-grid, .repair-goal-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.crm-client-metrics div, .repair-goal-cards div { padding: 10px; border-radius: 14px; background: var(--soft); }
.crm-client-metrics strong, .client-metric-strip strong { display: block; }
.crm-client-metrics small { color: var(--muted); }
.client-avatar-img, .supplier-logo, .stock-thumb, .category-mini-logo, .category-card img { object-fit: cover; border: 1px solid var(--line); background: var(--soft); }
.client-avatar-img, .supplier-logo { width: 54px; height: 54px; border-radius: 18px; }
.stock-thumb, .stock-placeholder { width: 54px; height: 54px; border-radius: 16px; flex: 0 0 auto; }
.stock-placeholder { display: grid; place-items: center; color: #0F766E; background: #CCFBF1; font-weight: 950; }
.stock-placeholder.large { width: 100%; min-height: 260px; font-size: 54px; }
.stock-product-media, .repair-work-media, .stock-image-card, .stock-image-full { display: grid; place-items: center; min-height: 170px; border-radius: 18px; background: var(--soft); overflow: hidden; }
.stock-product-media img, .stock-image-card img, .stock-image-full img { width: 100%; height: 100%; max-height: 330px; object-fit: contain; }
.stock-search, .dash-search, .repair-filter-select { display: flex; align-items: center; gap: 9px; min-width: min(100%, 300px); }
.stock-watch-list, .client-profile-list, .timeline, .stock-movement-list { display: grid; gap: 10px; }
.stock-watch-row, .list-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; }
.stock-watch-row:hover, .list-item:hover, .list-item.active { background: #F0FDFA; border-color: #99F6E4; }
body[data-theme="dark"] .stock-watch-row:hover, body[data-theme="dark"] .list-item:hover, body[data-theme="dark"] .list-item.active { background: #112B4D; }
.stock-form-image, .cheque-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px dashed #CBD5E1;
  border-radius: 18px;
  background: var(--soft);
}
.stock-form-image img { width: 76px; height: 76px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.stock-image-note { flex-basis: 100%; color: #0F766E; background: #F0FDFA; border-radius: 12px; padding: 10px 12px; font-weight: 800; }
.repair-funnel-bars, .repair-channel-bars, .visual-kpis, .visual-grid, .tva-rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.repair-funnel-card, .pipe-step, .part-choice, .scan-field {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.repair-funnel-card div { height: 10px; margin-top: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.repair-funnel-card div i { display: block; height: 100%; background: linear-gradient(90deg, var(--secondary), var(--accent)); }
.pipeline, .status-flow-mini, .replace-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 10px; }
.pipe-step.green { border-color: #A7F3D0; background: #ECFDF5; }
.pipe-step.red { border-color: #FECACA; background: #FEF2F2; }
.pipe-step.blue { border-color: #99F6E4; background: #F0FDFA; }
body[data-theme="dark"] .pipe-step.green, body[data-theme="dark"] .pipe-step.red, body[data-theme="dark"] .pipe-step.blue { background: var(--soft); }
.category-strip, .stock-period-tabs, .tabs, .quick-amounts, .client-tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.category-strip button, .stock-period-tabs button, .tabs button, .quick-amounts button, .client-tabs button, .soft-toggle {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 850;
  white-space: nowrap;
}
.category-strip button.active, .stock-period-tabs button.active, .tabs button.active, .quick-amounts button.active, .client-tabs button.active, .soft-toggle.active, .active-filter {
  color: #0F766E;
  background: #F0FDFA;
  border-color: #99F6E4;
}
.supplier-cell { display: flex; align-items: center; gap: 10px; }
.supplier-donut-block { display: flex; align-items: center; gap: 20px; }

/* Documents, POS, assistant, QR */
.doc-preview {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #111827;
}
.doc-head { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid #0F172A; }
.logo-box { width: 82px; height: 60px; border-radius: 16px; font-weight: 950; }
.doc-client { background: #F6F8FB; border: 1px solid #E2E8F0; border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.doc-totals { max-width: 380px; margin: 18px 0 0 auto; display: grid; gap: 8px; }
.doc-totals div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px solid #E2E8F0; }
.signature, .signature-grid > div { min-height: 90px; border: 1px dashed #94A3B8; border-radius: 14px; display: grid; place-items: center; color: var(--muted); }
.signature-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.qr-card { display: grid; place-items: center; text-align: center; }
.qr-svg { width: min(280px, 100%); height: auto; background: white; border: 14px solid white; border-radius: 18px; box-shadow: 0 16px 44px rgba(15,23,42,.12); }
.mobile-upload { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--background); }
.pos-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; align-items: start; }
.pos-grid, .pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 12px; }
.pos-product { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; }
.pos-cart, .ticket-print { padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.pos-cart-list, .pos-cart-row { display: grid; gap: 10px; }
.pos-cart-row { grid-template-columns: 1fr auto; align-items: center; padding: 10px; border-radius: 14px; background: var(--soft); }
.pos-total { display: flex; justify-content: space-between; font-size: 22px; font-weight: 950; padding: 14px 0; }
.ai-floating { position: fixed; right: 22px; bottom: 22px; z-index: 45; }
.ai-fab { width: 58px; height: 58px; border-radius: 20px; border: 0; color: #fff; background: linear-gradient(135deg, var(--secondary), var(--accent)); box-shadow: 0 18px 40px rgba(15,118,110,.28); }
.ai-mini-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(380px, calc(100vw - 36px));
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.ai-mini-head, .ai-input-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-mini-messages { max-height: 300px; overflow: auto; display: grid; gap: 10px; margin: 12px 0; }
.ai-msg { padding: 10px 12px; border-radius: 16px; background: var(--soft); }
.ai-msg.assistant { border: 1px solid rgba(15,118,110,.22); }
.ai-mini-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-mini-suggestions button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; background: var(--soft); color: var(--text); }
.assistant-shell, .assistant-input { display: grid; gap: 14px; }
.assistant-input { grid-template-columns: 1fr auto; }
.ai-answer { min-height: 150px; }

/* Payroll / HR */
.payroll-simulator { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 18px; align-items: start; }
.payroll-control input[type="range"] { width: 100%; }
.payroll-result, .payroll-output { display: grid; gap: 14px; }
.attendance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }

/* Period menu and client autocomplete */
.period-select, .client-selector { position: relative; }
.period-trigger { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 0 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 850; }
.period-menu, .client-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.period-menu button { width: 100%; display: block; text-align: left; border: 0; border-radius: 12px; background: transparent; color: var(--text); padding: 10px; }
.period-menu button:hover { background: var(--soft); }
.custom-period { display: grid; gap: 8px; padding: 8px; }
.client-suggestions { left: 0; right: auto; min-width: 100%; display: none; overflow: hidden; padding: 0; }
.client-suggestions.open { display: block; }
.client-option { width: 100%; display: grid; gap: 4px; padding: 12px; background: var(--card); color: var(--text); border-bottom: 1px solid var(--line); text-align: left; }
.client-option:hover { background: var(--soft); }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }

/* Misc visual blocks */
.timeline { position: relative; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.timeline-dot { width: 12px; height: 12px; margin-top: 6px; border-radius: 999px; background: var(--secondary); }
.live-preview, .visual-flow, .visual-story, .visual-ledger, .visual-screen, .big-chart { min-height: 220px; }
.setup-checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.setup-checklist label { padding: 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); font-weight: 800; }
.priority-panel { display: grid; gap: 10px; }
.ticket, .a4-ticket { background: #fff; color: #111827; padding: 16px; border-radius: 16px; border: 1px solid #E2E8F0; }

@media (max-width: 1200px) {
  .grid.six, .simple-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .dash-v2-layout, .finance-dashboard-v2, .stock-dashboard-layout, .supplier-dashboard-grid { grid-template-columns: 1fr; }
  .pos-layout, .payroll-simulator { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .auth-shell, .pms-hero { grid-template-columns: 1fr; }
  .auth-brand { min-height: 360px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -310px;
    top: 0;
    width: 292px;
    z-index: 50;
    transition: left .2s ease;
    box-shadow: 20px 0 50px rgba(0,0,0,.25);
  }
  .sidebar.open { left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .module-hero, .workspace-head, .page-title { display: grid; }
  .grid.workspace, .form-grid, .dash-two-col, .dash-bottom-grid, .stock-top-grid, .repair-bottom-grid { grid-template-columns: 1fr; }
  .grid.two, .grid.three, .grid.four, .grid.six, .module-grid, .simple-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}
@media (max-width: 720px) {
  .content { padding: 14px; gap: 16px; }
  .topbar { height: 64px; gap: 8px; }
  .topbar-title { display: none; }
  .profile { margin-left: auto; gap: 6px; }
  .profile-trigger { width: 42px; padding: 0; justify-content: center; }
  .profile-trigger span, .profile-trigger > svg:last-child, .profile-trigger i:last-child { display: none; }
  .theme-switcher { display: none; }
  .icon-btn, .btn.icon-only { width: 39px; height: 39px; }
  .btn { width: 100%; }
  .actions .btn, .toolbar .btn, .module-head-actions .btn, .workspace-actions .btn { width: auto; }
  .modal-backdrop, .command-backdrop, .module-launcher-backdrop { padding: 10px; align-items: end; }
  .modal, .command-palette, .module-launcher { max-height: 92vh; border-radius: 22px 22px 0 0; }
  .slide-panel { top: 72px; right: 10px; }
  .client-metric-strip, .repair-metric-strip, .supplier-kpi-grid, .crm-client-metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
  .donut-row, .supplier-donut-block { align-items: flex-start; flex-direction: column; }
  .period-menu { right: auto; left: 0; }
}
@media print {
  body { background: white; }
  .sidebar, .topbar, .ai-floating, .actions, .print-actions, .btn, .icon-btn { display: none; }
  .app-shell, .main, .content { display: block; padding: 0; }
  .card, .doc-preview { box-shadow: none; border-color: #ccc; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none; transition: none; scroll-behavior: auto; }
}
.fallback-icon { width: 1.05em; height: 1.05em; display: inline-grid; place-items: center; }
.fallback-icon::before { content: "•"; font-style: normal; font-weight: 900; line-height: 1; }


/* Atlas Business SaaS refinements */
body {
  font-family: var(--font-main);
  font-size: 14px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.page-title h2, .workspace-head h2, .module-hero h1,
.auth-brand h1, .pms-copy h1 {
  font-family: var(--font-main);
  color: var(--text);
}

.auth-brand h1, .auth-brand h2, .auth-brand strong,
.sidebar h1, .sidebar h2, .side-head strong, .side-user strong,
.pms-band.final h2, .pms-band.final h3, .guarantee h2, .guarantee h3 {
  color: #fff;
}

.btn.primary,
.btn.success {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  color: #fff;
  box-shadow: 0 10px 22px rgba(15,118,110,.20);
}

.btn.primary:hover,
.btn.success:hover {
  box-shadow: 0 16px 30px rgba(15,118,110,.26);
}

.btn.ghost,
.btn-secondary {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

.icon-btn,
.profile-trigger,
.card,
.dash-widget,
.dash-accounting-card,
.dash-balance-card,
.chart-card,
.stock-widget,
.supplier-widget,
.priority-panel,
.repair-insights-panel,
.repair-hero-panel,
.gauge-card,
.hero-report,
.crm-client-card,
.stock-product-card,
.repair-work-card,
.supplier-card-v2,
.stock-market-card,
.category-card,
.quick-action-card,
.client-data-card,
.client-risk-card {
  box-shadow: var(--shadow-soft);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(15,23,42,.99), rgba(15,23,42,.97)),
    radial-gradient(circle at 20% 0%, rgba(20,184,166,.20), transparent 20rem);
}

.category-main:hover,
.category-main.active,
.nav-category.open > .category-main,
.category-sub button:hover,
.category-sub button.active {
  background: rgba(15,118,110,.22);
}

.category-main.active,
.category-sub button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.module-title-icon,
.client-title-icon,
.brand-mark,
.brand-orb,
.logo-box,
.ai-fab {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
}

.stock-placeholder,
.avatar,
.profile-face,
.empty-state-premium i,
.empty-state-premium svg {
  color: var(--secondary);
  background: var(--accent-soft);
}

.table-wrap {
  box-shadow: var(--shadow-soft);
}

th {
  color: #475569;
  background: #F8FAFC;
}

body[data-theme="dark"] th {
  color: #CBD5E1;
  background: #111C2E;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.command-input:focus,
.assistant-input:focus,
.ai-mini-input:focus {
  border-color: rgba(15,118,110,.65);
  box-shadow: 0 0 0 4px rgba(15,118,110,.14);
}

.alert,
.notification-card {
  color: var(--secondary);
  background: #F0FDFA;
  border-color: #99F6E4;
}

.badge.blue,
.badge.cyan {
  color: var(--secondary);
  background: var(--accent-soft);
}

/* Layout stability pass — KPI/stat cards fixed globally */
button.card,
button.stat-card,
.stat-card.category-kpi {
  appearance: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--card);
  font: inherit;
  cursor: pointer;
}

.grid,
.module-grid,
.simple-stats,
.dash-mini-grid,
.client-metric-strip,
.repair-metric-strip,
.supplier-kpi-grid {
  align-items: stretch;
}

.simple-stats,
.grid.four.simple-stats,
.grid.six.simple-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.dash-mini-grid,
.client-metric-strip,
.repair-metric-strip,
.supplier-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.stat-card {
  height: 100%;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 98%, white 2%), var(--card));
}

.stat-card > div,
.stat-card > span,
.stat-card strong,
.stat-card em,
.stat-card small {
  max-width: 100%;
  min-width: 0;
}

.stat-card > i,
.stat-card > svg,
.stat-card > span > i,
.stat-card > span > svg {
  box-sizing: border-box;
  flex: 0 0 46px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15,23,42,.10);
}

.stat-card.loss > i,
.stat-card.loss > svg,
.stat-card.loss > span > i,
.stat-card.loss > span > svg,
.stat-card.expense > i,
.stat-card.expense > svg,
.stat-card.expense > span > i,
.stat-card.expense > span > svg {
  color: #B91C1C;
  background: #FEE2E2;
}

.stat-card.warning > i,
.stat-card.warning > svg,
.stat-card.warning > span > i,
.stat-card.warning > span > svg {
  color: #92400E;
  background: #FEF3C7;
}

.stat-card.revenue > i,
.stat-card.revenue > svg,
.stat-card.revenue > span > i,
.stat-card.revenue > span > svg,
.stat-card.income > i,
.stat-card.income > svg,
.stat-card.income > span > i,
.stat-card.income > span > svg {
  color: #047857;
  background: #D1FAE5;
}

.stat-card.category-kpi > div,
.stat-card.category-kpi > span {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.card,
.dash-widget,
.dash-accounting-card,
.dash-balance-card,
.chart-card,
.stock-widget,
.supplier-widget,
.priority-panel,
.repair-insights-panel,
.repair-hero-panel,
.gauge-card,
.hero-report,
.crm-client-card,
.stock-product-card,
.repair-work-card,
.supplier-card-v2,
.stock-market-card,
.category-card,
.quick-action-card,
.client-data-card,
.client-risk-card {
  min-width: 0;
  overflow: visible;
}

.table-wrap,
.doc-preview,
.modal,
.command-palette,
.module-launcher,
.slide-panel {
  max-width: 100%;
}

@media (max-width: 520px) {
  .simple-stats,
  .grid.four.simple-stats,
  .grid.six.simple-stats,
  .dash-mini-grid,
  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    min-height: 124px;
  }
}

/* Deep layout repair — stable dashboards and full-page resizing */
.content > *,
.finance-dashboard-v2,
.dash-v2-layout,
.dash-v2-main,
.dash-v2-aside,
.dash-two-col,
.dash-bottom-grid,
.module-grid,
.grid,
.table-wrap,
.card {
  min-width: 0;
}

.finance-dashboard-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.dash-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.dash-v2-main,
.dash-v2-aside {
  display: grid;
  gap: 16px;
  width: 100%;
}

.dash-v2-top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.dash-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.dash-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.dash-top-actions,
.dash-action-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.content button:not(.btn):not(.icon-btn):not(.category-main):not(.profile-trigger):not(.theme-switcher button),
.dash-top-actions button,
.dash-card-head button,
.dash-widget button,
.dash-action-pad button,
.dash-client-row button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--card);
  font-weight: 850;
  box-shadow: var(--shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.content button:not(.btn):not(.icon-btn):not(.category-main):not(.profile-trigger):not(.theme-switcher button):hover {
  transform: translateY(-1px);
  border-color: rgba(15,118,110,.35);
  box-shadow: 0 12px 24px rgba(15,23,42,.09);
}

.dash-top-actions button:first-child,
.dash-action-pad button:first-child,
.dash-card-head button,
.alert-widget button {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
}

.dash-balance-card {
  display: grid;
  gap: 18px;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 12%, rgba(20,184,166,.18), transparent 18rem),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 92%, var(--accent-soft) 8%));
}

.dash-card-head {
  flex-wrap: wrap;
  align-items: flex-start;
}

.dash-card-head span {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dash-card-head h1 {
  margin: 4px 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: .95;
  letter-spacing: -.06em;
}

.dash-card-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.dash-chart-stack {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  align-items: end;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft);
}

.dash-chart-stack > div {
  height: 100%;
  display: grid;
  align-items: end;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dash-chart-stack span {
  min-height: 18px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--accent), var(--secondary));
  box-shadow: 0 8px 18px rgba(15,118,110,.16);
}

.dash-chart-legend span,
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.dash-chart-legend i,
.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: var(--secondary);
}

.dash-chart-legend .income { background: var(--success); }
.dash-chart-legend .expense { background: var(--warning); }

.dash-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.dash-mini-grid article,
.supplier-kpi-grid article,
.client-metric-strip article,
.repair-metric-strip article {
  min-height: 142px;
  padding: 17px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.dash-mini-grid article i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--secondary);
  background: var(--accent-soft);
}

.dash-mini-grid article span,
.supplier-kpi-grid article span {
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.dash-mini-grid article strong,
.supplier-kpi-grid article strong {
  display: block;
  color: var(--text);
  font-size: clamp(22px, 2.15vw, 34px);
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.dash-mini-grid article small,
.supplier-kpi-grid article small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.25;
}

.dash-two-col,
.dash-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.dash-widget h3,
.dash-accounting-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: -.02em;
}

.progress-line {
  height: 12px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warning), var(--secondary));
}

.segmented-costs {
  display: grid;
  grid-template-columns: 1.4fr .9fr 1.1fr .7fr .5fr;
  gap: 7px;
  height: 18px;
  margin: 18px 0;
}

.segmented-costs i {
  border-radius: 999px;
  background: var(--accent-soft);
}

.segmented-costs i:nth-child(2) { background: #DBEAFE; }
.segmented-costs i:nth-child(3) { background: #FEF3C7; }
.segmented-costs i:nth-child(4) { background: #FEE2E2; }
.segmented-costs i:nth-child(5) { background: #DCFCE7; }

.dash-gauge {
  width: 158px;
  height: 158px;
  margin: 8px auto 12px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--secondary) var(--score), var(--soft) 0);
}

.dash-gauge::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
}

.dash-gauge b {
  position: relative;
  z-index: 1;
  font-size: 28px;
  letter-spacing: -.04em;
}

.status-flow-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.status-flow-mini article {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.status-flow-mini span,
.status-flow-mini strong {
  display: block;
}

.status-flow-mini span { color: var(--muted); font-size: 12px; font-weight: 850; }
.status-flow-mini strong { margin-top: 6px; font-size: 24px; }

.dash-accounting-card {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(120px, 170px));
  gap: 12px;
  align-items: stretch;
}

.dash-accounting-card > div {
  grid-row: span 2;
}

.dash-accounting-card article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.dash-accounting-card b {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: var(--primary);
}

.dash-accounting-card span,
.dash-accounting-card small {
  min-width: 0;
}

.dash-accounting-card strong,
.dash-accounting-card small {
  display: block;
  overflow-wrap: anywhere;
}

.dash-accounting-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.dash-card-preview {
  min-height: 188px;
  background:
    linear-gradient(135deg, #0F172A, #0F766E);
  color: #fff;
  border: 0;
}

.dash-card-preview p,
.dash-card-preview span { color: rgba(255,255,255,.78); }
.dash-card-preview strong { display: block; margin: 10px 0; font-size: 28px; letter-spacing: -.04em; }

.dash-action-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.dash-action-pad button {
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 13px;
}

.dash-client-list,
.dash-transactions {
  display: grid;
  gap: 10px;
}

.dash-client-row,
.dash-transaction {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.dash-client-row > div:first-child,
.dash-transaction > i {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--secondary);
  background: var(--accent-soft);
}

.dash-client-row span,
.dash-transaction span {
  min-width: 0;
  flex: 1;
}

.dash-client-row strong,
.dash-client-row small,
.dash-transaction strong,
.dash-transaction small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-client-row em,
.dash-transaction em {
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

@media (min-width: 1500px) {
  .content { padding-left: 34px; padding-right: 34px; }
  .dash-v2-layout { grid-template-columns: minmax(0, 1fr) 380px; }
}

@media (max-width: 1280px) {
  .dash-v2-layout,
  .stock-dashboard-layout,
  .supplier-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dash-v2-aside {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  .dash-accounting-card {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .dash-accounting-card > div { grid-row: auto; }
}

@media (max-width: 760px) {
  .dash-v2-top,
  .page-title,
  .workspace-head,
  .module-hero,
  .unified-module-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .dash-top-actions {
    justify-content: stretch;
  }
  .dash-top-actions button {
    flex: 1 1 140px;
  }
  .dash-chart-stack {
    height: 150px;
    gap: 7px;
    padding: 12px;
  }
  .dash-card-head h1 {
    font-size: 34px;
  }
  .content button:not(.btn):not(.icon-btn):not(.category-main):not(.profile-trigger):not(.theme-switcher button) {
    max-width: 100%;
  }
}

/* Final proportional card pass — compact KPI cards and balanced numbers */
.finance-dashboard-v2 {
  gap: 16px;
}

.dash-v2-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
}

.dash-balance-card {
  min-height: 0;
  padding: 18px;
  gap: 14px;
}

.dash-card-head h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1;
}

.dash-chart-stack {
  height: clamp(138px, 17vw, 176px);
  padding: 14px;
  gap: 10px;
}

.dash-mini-grid,
.simple-stats,
.grid.four.simple-stats,
.grid.six.simple-stats,
.client-metric-strip,
.repair-metric-strip,
.supplier-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.dash-mini-grid article,
.supplier-kpi-grid article,
.client-metric-strip article,
.repair-metric-strip article,
.stat-card,
.card.stat-card,
button.stat-card,
.stat-card.category-kpi {
  min-height: 108px;
  padding: 14px;
  border-radius: 18px;
  align-content: center;
  gap: 9px;
}

.dash-mini-grid article i,
.stat-card > i,
.stat-card > svg,
.stat-card > span > i,
.stat-card > span > svg {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 9px;
  border-radius: 12px;
}

.dash-mini-grid article span,
.supplier-kpi-grid article span,
.stat-card em {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .035em;
}

.dash-mini-grid article strong,
.supplier-kpi-grid article strong,
.stat-card strong {
  font-size: clamp(20px, 1.85vw, 27px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.dash-mini-grid article small,
.supplier-kpi-grid article small,
.stat-card small {
  font-size: 11.5px;
  line-height: 1.25;
}

.dash-widget,
.dash-accounting-card,
.chart-card,
.stock-widget,
.supplier-widget,
.priority-panel,
.repair-insights-panel,
.repair-hero-panel,
.gauge-card,
.hero-report,
.card {
  border-radius: 18px;
}

.dash-two-col,
.dash-bottom-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.dash-widget {
  padding: 16px;
  min-height: 0;
}

.status-flow-mini {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.status-flow-mini article,
.pipeline article,
.visual-kpis article,
.visual-grid article,
.tva-rate-grid article {
  min-height: 76px;
  padding: 12px;
  border-radius: 14px;
}

.status-flow-mini strong,
.pipeline strong,
.visual-kpis strong,
.visual-grid strong,
.tva-rate-grid strong {
  font-size: clamp(18px, 1.8vw, 24px);
}

.dash-accounting-card {
  grid-template-columns: minmax(180px, .8fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
}

.dash-accounting-card article {
  min-height: 68px;
  padding: 12px;
  border-radius: 14px;
}

.dash-card-preview {
  min-height: 150px;
}

.dash-action-pad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-action-pad button {
  min-height: 44px;
}

@media (max-width: 1180px) {
  .dash-v2-layout {
    grid-template-columns: 1fr;
  }

  .dash-v2-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-v2-aside > * {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 14px;
  }

  .dash-v2-top {
    grid-template-columns: 1fr;
  }

  .dash-top-actions,
  .dash-action-pad {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-top-actions button,
  .dash-action-pad button {
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  .dash-balance-card {
    padding: 16px;
  }

  .dash-card-head {
    gap: 10px;
  }

  .dash-card-head h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .dash-chart-stack {
    height: 126px;
    gap: 7px;
    padding: 12px 10px;
  }

  .dash-mini-grid,
  .simple-stats,
  .grid.four.simple-stats,
  .grid.six.simple-stats,
  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dash-mini-grid article,
  .supplier-kpi-grid article,
  .client-metric-strip article,
  .repair-metric-strip article,
  .stat-card,
  .card.stat-card,
  button.stat-card,
  .stat-card.category-kpi {
    min-height: 96px;
    padding: 12px;
    border-radius: 16px;
  }

  .dash-mini-grid article i,
  .stat-card > i,
  .stat-card > svg,
  .stat-card > span > i,
  .stat-card > span > svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 8px;
    border-radius: 11px;
  }

  .dash-mini-grid article strong,
  .supplier-kpi-grid article strong,
  .stat-card strong {
    font-size: clamp(18px, 6vw, 22px);
    line-height: 1.08;
  }

  .dash-mini-grid article span,
  .supplier-kpi-grid article span,
  .stat-card em {
    font-size: 10px;
  }

  .dash-mini-grid article small,
  .supplier-kpi-grid article small,
  .stat-card small {
    font-size: 10.5px;
  }

  .dash-v2-aside,
  .dash-two-col,
  .dash-bottom-grid,
  .dash-accounting-card {
    grid-template-columns: 1fr;
  }

  .dash-accounting-card article {
    min-height: 58px;
  }

  .status-flow-mini {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .dash-mini-grid,
  .simple-stats,
  .grid.four.simple-stats,
  .grid.six.simple-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-mini-grid article strong,
  .stat-card strong {
    font-size: 18px;
  }
}

/* Dashboard KPI card redesign — icon + label + value in one compact block */
.dash-mini-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "note note";
  align-items: center;
  align-content: center;
  column-gap: 10px;
  row-gap: 3px;
  min-height: 104px;
  padding: 12px;
}

.dash-mini-grid article i {
  grid-area: icon;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 8px;
}

.dash-mini-grid article span {
  grid-area: label;
  align-self: end;
  min-width: 0;
}

.dash-mini-grid article strong {
  grid-area: value;
  align-self: start;
  min-width: 0;
  font-size: clamp(19px, 1.65vw, 25px);
  white-space: normal;
  overflow-wrap: anywhere;
}

.dash-mini-grid article small {
  grid-area: note;
  min-width: 0;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .dash-mini-grid article {
    min-height: 86px;
    padding: 10px;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 8px;
  }

  .dash-mini-grid article i {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 7px;
  }

  .dash-mini-grid article strong {
    font-size: clamp(16px, 4.8vw, 20px);
  }

  .dash-mini-grid article small {
    font-size: 10px;
  }
}

/* Keep money values readable inside compact KPI cards */
.dash-mini-grid article strong {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: clamp(18px, 1.45vw, 22px);
}

@media (max-width: 760px) {
  .dash-mini-grid article strong {
    font-size: clamp(15px, 4.2vw, 18px);
    white-space: nowrap;
  }
}

/* Page cleanup pass: hide duplicate controls and make CRM pages list-based */
[data-period-toggle],
[data-theme-choice] {
  display: none;
}

.theme-switcher.icon-theme-switcher {
  display: none;
}

/* Dashboard action cards: same size, same feeling */
.dash-action-pad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dash-action-pad button,
.dash-action-pad button:first-child {
  width: 100%;
  min-height: 82px;
  height: 100%;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.dash-action-pad button i,
.dash-action-pad button svg {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 14px;
  color: var(--secondary);
  background: var(--accent-soft);
}

.dash-action-pad button span {
  min-width: 0;
  display: block;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shared module spacing */
.client-studio-page,
.repair-studio-page,
.stock-studio-page,
.supplier-studio-page {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.client-project-head,
.repair-hero-panel,
.stock-performance-card,
.stock-products-section,
.repair-list-panel,
.supplier-widget,
.client-context-panel,
.client-filter-row,
.supplier-filter-row {
  min-width: 0;
  overflow: hidden;
}

.client-project-head,
.repair-hero-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.client-title-block,
.client-project-head,
.client-head-actions,
.repair-hero-actions,
.stock-panel-head,
.supplier-filter-row,
.client-filter-row {
  min-width: 0;
}

.client-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-title-block h2,
.repair-hero-panel h2,
.stock-panel-head h3,
.supplier-widget h3 {
  margin: 0 0 4px;
  letter-spacing: -.035em;
}

.client-title-block p,
.repair-hero-panel p,
.stock-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

/* Clients: clean CRM list instead of big broken cards */
.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.client-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.client-tabs button.active,
.client-tabs button:hover {
  color: var(--secondary);
  border-color: rgba(15,118,110,.22);
  background: var(--accent-soft);
}

.client-context-panel {
  display: none;
}

.client-filter-row,
.supplier-filter-row {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.client-filter-row label,
.supplier-filter-row label,
.stock-search {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.client-filter-row input,
.supplier-filter-row input,
.stock-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.client-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.crm-client-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.25fr) minmax(210px, 1fr) minmax(260px, 1.1fr) minmax(220px, .95fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.crm-client-card.is-risk {
  border-color: rgba(245, 158, 11, .38);
  background: linear-gradient(90deg, rgba(255,251,235,.82), var(--card) 35%);
}

.crm-client-top {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crm-client-top img,
.crm-client-top > b {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: var(--secondary);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  font-weight: 950;
}

.crm-client-top h3,
.crm-client-top p,
.crm-client-info span,
.crm-client-foot small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-client-info {
  display: grid;
  gap: 6px;
}

.crm-client-info span {
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.crm-client-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.crm-client-metrics div {
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  display: grid;
  align-content: center;
  border-radius: 14px;
  background: var(--soft);
}

.crm-client-metrics strong {
  font-size: 16px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.crm-client-foot {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.crm-client-foot > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.client-data-card,
.client-risk-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
}

.client-risk-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Repairs: clean list + compact dashboard, no oversized marketing feeling */
.repair-analytics-grid {
  display: none;
}

.repair-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.repair-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.repair-filter-select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.repair-metric-strip,
.supplier-kpi-grid,
.client-metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.repair-bottom-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.repair-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.repair-work-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.repair-work-media {
  width: 84px;
  height: 84px;
  min-height: 84px;
  border-radius: 18px;
}

.repair-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.repair-work-media .badge,
.repair-work-media span {
  position: absolute;
  transform: translateY(48px);
  max-width: 110px;
  justify-self: center;
}

.repair-work-body {
  min-width: 0;
  gap: 7px;
}

.repair-work-body h3,
.repair-work-body p,
.repair-work-body strong,
.repair-work-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-work-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.repair-work-metrics span {
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.repair-work-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.repair-insights-panel {
  position: sticky;
  top: 92px;
}

/* Stock: equal product cards, readable text, better responsive spacing */
.stock-top-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.stock-market-card {
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: center;
}

.stock-market-card > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-market-card span,
.stock-market-card small,
.stock-market-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-dashboard-layout,
.supplier-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.stock-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.stock-product-card {
  min-height: 380px;
  height: 100%;
  display: grid;
  grid-template-rows: 142px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.stock-product-media {
  min-height: 142px;
  height: 142px;
  border-radius: 16px;
  position: relative;
}

.stock-product-media .category-badge,
.stock-product-media span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
}

.stock-product-body {
  min-width: 0;
  gap: 8px;
  align-content: start;
}

.stock-product-body h3,
.stock-product-body p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-product-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stock-product-stats div,
.stock-product-stats span {
  min-width: 0;
  min-height: 60px;
  display: grid;
  align-content: center;
  justify-content: start;
  padding: 9px;
  border-radius: 13px;
  background: var(--soft);
}

.stock-product-stats strong {
  font-size: 15px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stock-product-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stock-product-actions .btn {
  min-width: 0;
  padding-inline: 8px;
  font-size: 12px;
}

.stock-watch-row {
  min-width: 0;
}

.stock-watch-row span {
  min-width: 0;
  flex: 1;
}

.stock-watch-row strong,
.stock-watch-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fournisseurs: equal list/card style and responsive widgets */
.supplier-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-widget {
  min-height: 230px;
}

.supplier-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.supplier-card-v2 {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(220px, 1fr) minmax(240px, .95fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.supplier-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.supplier-card-head h3,
.supplier-card-head p,
.supplier-card-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-card-info {
  display: grid;
  gap: 6px;
}

.supplier-card-info span {
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.supplier-card-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.supplier-card-metrics div,
.supplier-card-metrics span {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  padding: 9px;
  border-radius: 14px;
  background: var(--soft);
}

.supplier-card-metrics strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.supplier-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.supplier-card-actions .btn {
  min-width: 82px;
}

@media (max-width: 1280px) {
  .crm-client-card,
  .supplier-card-v2 {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .crm-client-foot > div,
  .supplier-card-actions {
    justify-content: flex-start;
  }

  .repair-bottom-grid,
  .stock-dashboard-layout,
  .supplier-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .repair-insights-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .client-project-head,
  .repair-hero-panel,
  .stock-panel-head,
  .client-filter-row,
  .supplier-filter-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-filter-row,
  .supplier-filter-row {
    gap: 10px;
  }

  .client-head-actions,
  .repair-hero-actions {
    justify-content: stretch;
  }

  .client-head-actions .btn,
  .repair-hero-actions .btn,
  .repair-filter-select {
    width: 100%;
  }

  .dash-action-pad,
  .dash-top-actions {
    grid-template-columns: 1fr;
  }

  .dash-action-pad button {
    min-height: 64px;
  }

  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .repair-work-card {
    grid-template-columns: 1fr;
  }

  .repair-work-media {
    width: 100%;
    height: 132px;
  }

  .repair-work-actions,
  .stock-product-actions,
  .supplier-card-actions,
  .crm-client-foot > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-product-grid {
    grid-template-columns: 1fr;
  }

  .stock-product-card {
    min-height: 0;
  }
}

@media (max-width: 460px) {
  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid,
  .stock-product-stats,
  .crm-client-metrics,
  .supplier-card-metrics {
    grid-template-columns: 1fr;
  }
}

/* Strong duplicate-control removal */
body #app [data-period-toggle][data-period-toggle],
body #app [data-theme-choice][data-theme-choice],
body #app .theme-switcher.icon-theme-switcher {
  display: none;
}

/* Final spacing fixes for stock, repairs and supplier details */
.repair-list-panel .stock-panel-head {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(300px, 1fr);
  align-items: center;
  gap: 14px;
}

.repair-work-media {
  position: relative;
  overflow: hidden;
}

.repair-work-media > span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  max-width: calc(100% - 10px);
  display: flex;
  justify-content: center;
}

.repair-work-media .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repair-goal-cards article {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--soft);
}

.repair-goal-cards b,
.repair-goal-cards span {
  display: block;
  line-height: 1.15;
}

.stock-market-card span strong,
.stock-market-card span small {
  display: block;
  line-height: 1.2;
}

.stock-market-card span small {
  color: var(--muted);
  margin-top: 2px;
}

.stock-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border-bottom: 0;
}

.stock-summary-row article {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--soft);
}

.stock-summary-row strong,
.stock-summary-row span {
  display: block;
  min-width: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stock-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplier-donut-block p {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.supplier-donut-block p b {
  margin-left: auto;
}

@media (max-width: 760px) {
  .repair-list-panel .stock-panel-head {
    grid-template-columns: 1fr;
  }

  .stock-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .stock-summary-row {
    grid-template-columns: 1fr;
  }
}

/* Final proportional typography pass — compact cards + one-line readable text */
:root {
  --card-pad-sm: 12px;
  --card-radius-sm: 16px;
}

/* Make repeated KPI cards feel balanced: smaller boxes, bigger text */
.dash-mini-grid article,
.client-metric-strip article,
.repair-metric-strip article,
.supplier-kpi-grid article,
.simple-stats .stat-card,
.grid.four .stat-card,
.grid.six .stat-card,
.stat-card,
.card.stat-card,
button.stat-card,
.stat-card.category-kpi {
  min-height: 84px;
  padding: var(--card-pad-sm);
  border-radius: var(--card-radius-sm);
  gap: 7px;
}

.dash-mini-grid,
.client-metric-strip,
.repair-metric-strip,
.supplier-kpi-grid,
.simple-stats,
.grid.four.simple-stats,
.grid.six.simple-stats {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.stat-card {
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 10px;
}

.dash-mini-grid article i,
.stat-card > i,
.stat-card > svg,
.stat-card > span > i,
.stat-card > span > svg {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 7px;
  border-radius: 11px;
}

.stat-card > span {
  gap: 3px;
  align-content: center;
}

.dash-mini-grid article span,
.client-metric-strip article span,
.repair-metric-strip article span,
.supplier-kpi-grid article span,
.stat-card em {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-mini-grid article strong,
.client-metric-strip article strong,
.repair-metric-strip article strong,
.supplier-kpi-grid article strong,
.stat-card strong {
  min-width: 0;
  color: var(--text);
  font-size: clamp(19px, 1.35vw, 23px);
  line-height: 1.05;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.dash-mini-grid article small,
.client-metric-strip article small,
.repair-metric-strip article small,
.supplier-kpi-grid article small,
.stat-card small {
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main page cards: reduce useless empty height and keep important text on one line */
.card,
.dash-widget,
.dash-accounting-card,
.dash-balance-card,
.chart-card,
.stock-widget,
.supplier-widget,
.priority-panel,
.repair-insights-panel,
.repair-hero-panel,
.gauge-card,
.hero-report,
.crm-client-card,
.stock-product-card,
.repair-work-card,
.supplier-card-v2,
.stock-market-card,
.category-card,
.quick-action-card,
.client-data-card,
.client-risk-card {
  padding: 14px;
  border-radius: 18px;
}

.dash-widget,
.supplier-widget,
.stock-widget,
.priority-panel,
.repair-insights-panel,
.gauge-card,
.hero-report {
  min-height: 0;
}

.supplier-widget {
  min-height: 0;
}

.dash-action-pad button,
.dash-action-pad button:first-child {
  min-height: 62px;
  padding: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.dash-action-pad button i,
.dash-action-pad button svg {
  width: 34px;
  height: 34px;
  padding: 8px;
}

.dash-action-pad button span,
.content button span,
.btn span {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clients / Fournisseurs rows: normal text size, no tiny labels */
.crm-client-card,
.supplier-card-v2 {
  min-height: 78px;
  gap: 12px;
}

.crm-client-top h3,
.supplier-card-head h3,
.repair-work-body h3,
.stock-product-body h3 {
  font-size: 15px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-client-top p,
.crm-client-info span,
.supplier-card-head p,
.supplier-card-info span,
.repair-work-body p,
.stock-product-body p {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-client-metrics div,
.supplier-card-metrics div,
.supplier-card-metrics span,
.stock-product-stats div,
.stock-product-stats span,
.repair-work-metrics span,
.stock-summary-row article,
.repair-goal-cards article {
  min-height: 48px;
  padding: 8px 9px;
  gap: 3px;
}

.crm-client-metrics strong,
.supplier-card-metrics strong,
.stock-product-stats strong,
.stock-summary-row strong,
.repair-goal-cards b {
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.crm-client-metrics small,
.supplier-card-metrics small,
.stock-product-stats small,
.stock-summary-row span,
.repair-goal-cards span {
  font-size: 11.5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Repairs: list cards should not feel like banners */
.repair-work-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  min-height: 78px;
}

.repair-work-media {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border-radius: 14px;
}

.repair-work-metrics {
  flex-wrap: nowrap;
  overflow: hidden;
}

.repair-work-metrics span {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

/* Stock: smaller image cards, more readable text */
.stock-product-card {
  min-height: 0;
  grid-template-rows: 104px minmax(0, 1fr) auto;
  gap: 10px;
}

.stock-product-media {
  min-height: 104px;
  height: 104px;
  border-radius: 14px;
}

.stock-product-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-product-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-product-actions .btn,
.supplier-card-actions .btn,
.repair-work-actions .btn,
.crm-client-foot .btn {
  min-height: 36px;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-market-card {
  min-height: 86px;
  padding: 12px;
}

.stock-summary-row {
  gap: 8px;
}

/* Make long labels one-line without breaking the layout */
.badge,
.status-pill,
.category-badge,
.module-crumb,
.dash-card-head span,
.chart-legend span,
.dash-chart-legend span,
.status-flow-mini span,
.status-flow-mini strong,
.ticket-line strong,
.ticket-line small,
.priority-line strong,
.priority-line small,
.supplier-line strong,
.supplier-line small,
.supplier-balance-row strong,
.supplier-balance-row small,
.stock-watch-row strong,
.stock-watch-row small,
.list-item strong,
.list-item small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1280px) {
  .crm-client-card,
  .supplier-card-v2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .dash-mini-grid,
  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid,
  .simple-stats,
  .grid.four.simple-stats,
  .grid.six.simple-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-mini-grid article,
  .client-metric-strip article,
  .repair-metric-strip article,
  .supplier-kpi-grid article,
  .simple-stats .stat-card,
  .grid.four .stat-card,
  .grid.six .stat-card,
  .stat-card,
  .card.stat-card,
  button.stat-card,
  .stat-card.category-kpi {
    min-height: 76px;
    padding: 10px;
  }

  .dash-mini-grid article strong,
  .client-metric-strip article strong,
  .repair-metric-strip article strong,
  .supplier-kpi-grid article strong,
  .stat-card strong {
    font-size: clamp(16px, 4.6vw, 20px);
  }

  .dash-mini-grid article span,
  .client-metric-strip article span,
  .repair-metric-strip article span,
  .supplier-kpi-grid article span,
  .stat-card em {
    font-size: 11px;
  }

  .repair-work-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .repair-work-media {
    width: 54px;
    height: 54px;
    min-height: 54px;
  }

  .repair-work-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-product-card {
    grid-template-rows: 92px minmax(0, 1fr) auto;
  }

  .stock-product-media {
    min-height: 92px;
    height: 92px;
  }
}

@media (max-width: 460px) {
  .dash-mini-grid,
  .client-metric-strip,
  .repair-metric-strip,
  .supplier-kpi-grid,
  .simple-stats,
  .grid.four.simple-stats,
  .grid.six.simple-stats {
    grid-template-columns: 1fr;
  }
}

/* Final list-row mode for oversized Stock and Réparation cards */
@media (min-width: 761px) {
  .stock-product-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stock-product-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(260px, .8fr) minmax(250px, auto);
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  .stock-product-media {
    width: 56px;
    height: 56px;
    min-height: 56px;
    border-radius: 14px;
  }

  .stock-product-media .category-badge,
  .stock-product-media > span:not(.stock-placeholder) {
    display: none;
  }

  .stock-product-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .stock-product-body h3 {
    font-size: 15px;
  }

  .stock-product-body p {
    font-size: 12.5px;
  }

  .stock-product-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .stock-product-actions {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 7px;
  }

  .repair-card-grid {
    gap: 8px;
  }

  .repair-work-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(230px, auto);
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  .repair-work-media {
    width: 56px;
    height: 56px;
    min-height: 56px;
    border-radius: 14px;
  }

  .repair-work-media > span,
  .repair-work-media .badge {
    display: none;
  }

  .repair-work-body {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(170px, 1fr) minmax(160px, .9fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
  }

  .repair-work-body > div,
  .repair-work-body > strong,
  .repair-work-body > small {
    min-width: 0;
  }

  .repair-work-body > div {
    grid-row: 1 / 3;
  }

  .repair-work-body > strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 14.5px;
  }

  .repair-work-body > small {
    grid-column: 3;
    grid-row: 1;
    font-size: 12.5px;
  }

  .repair-work-metrics {
    grid-column: 2 / 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .repair-work-metrics span {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12.5px;
  }

  .repair-work-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(70px, 1fr));
    gap: 7px;
  }

  .repair-work-actions .btn {
    min-height: 36px;
    padding-inline: 8px;
  }
}

/* More readable compact widgets and accounting cards */
.dash-accounting-card article,
.status-flow-mini article,
.category-card,
.quick-action-card,
.client-data-card,
.client-risk-card,
.ticket-line,
.priority-line,
.supplier-line,
.supplier-balance-row,
.stock-watch-row,
.list-item {
  min-height: 0;
  padding: 10px;
  border-radius: 14px;
}

.dash-accounting-card strong,
.dash-accounting-card small,
.status-flow-mini strong,
.status-flow-mini span,
.category-card strong,
.quick-action-card strong,
.client-data-card strong,
.client-risk-card strong {
  font-size: 13px;
  line-height: 1.15;
}

.dash-accounting-card small,
.status-flow-mini span,
.category-card small,
.quick-action-card span,
.client-data-card span,
.client-risk-card small {
  font-size: 11.5px;
}

/* Use one-line ellipsis for the most visible UI text, but keep paragraphs readable */
.card h3,
.dash-widget h3,
.stock-widget h3,
.supplier-widget h3,
.repair-insights-panel h3,
.gauge-card h3,
.hero-report h3,
.stock-panel-head h3,
.repair-panel-head h3,
.supplier-card-head h3,
.client-project-head h2,
.repair-hero-panel h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .stock-product-card,
  .repair-work-card {
    min-height: 0;
    padding: 10px;
  }

  .stock-product-body h3,
  .repair-work-body h3 {
    font-size: 14px;
  }
}

/* Stock row correction — stats and actions must have real space */
@media (min-width: 761px) {
  .stock-product-card {
    grid-template-columns: 50px minmax(190px, 1fr) minmax(290px, .9fr) minmax(240px, auto);
    min-height: 88px;
  }

  .stock-product-media {
    width: 50px;
    height: 50px;
    min-height: 50px;
  }

  .stock-product-body {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
    grid-template-areas:
      "name stats"
      "ref stats";
    align-items: center;
    gap: 4px 12px;
  }

  .stock-product-body h3 {
    grid-area: name;
  }

  .stock-product-body p {
    grid-area: ref;
  }

  .stock-product-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    gap: 8px;
  }

  .stock-product-stats div,
  .stock-product-stats span {
    min-height: 42px;
    padding: 7px 8px;
  }

  .stock-product-actions {
    grid-column: 4;
    align-self: center;
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .stock-product-card {
    grid-template-columns: 50px minmax(0, 1fr) minmax(230px, auto);
  }
  .stock-product-body {
    grid-column: 2;
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "ref"
      "stats";
  }
  .stock-product-actions {
    grid-column: 3;
    grid-template-columns: 1fr;
  }
}

/* Stock row width safety inside pages with right sidebar */
@media (min-width: 761px) {
  .stock-product-card {
    grid-template-columns: 46px minmax(115px, 1fr) minmax(210px, .75fr) minmax(190px, auto);
  }
  .stock-product-media {
    width: 46px;
    height: 46px;
    min-height: 46px;
  }
  .stock-product-body {
    grid-template-columns: minmax(0, 1fr) minmax(205px, .75fr);
  }
  .stock-product-stats {
    grid-template-columns: repeat(3, minmax(58px, 1fr));
  }
  .stock-product-actions {
    grid-template-columns: repeat(3, minmax(58px, 1fr));
  }
  .stock-product-actions .btn {
    padding-inline: 6px;
    font-size: 12px;
  }
}

/* Stock row readability: keep prices visible on one line */
@media (min-width: 761px) {
  .stock-product-card {
    grid-template-columns: 46px minmax(150px, .75fr) minmax(245px, .9fr) minmax(205px, auto);
  }
  .stock-product-body {
    grid-template-columns: minmax(145px, .75fr) minmax(245px, .9fr);
  }
  .stock-product-stats {
    grid-template-columns: repeat(3, minmax(74px, 1fr));
  }
  .stock-product-stats strong {
    font-size: 13.5px;
  }
  .stock-product-stats small {
    font-size: 11px;
  }
  .stock-product-actions {
    grid-template-columns: minmax(58px, .75fr) minmax(72px, .9fr) minmax(70px, .9fr);
  }
}


/* Smart upload detection for Devis, Factures and Bons de commande */
.smart-doc-form {
  gap: 16px;
}

.upload-detect-field {
  background: linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(37, 99, 235, .06));
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 18px;
  padding: 14px;
}

.upload-detect-field > label {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.upload-detect-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.upload-detect-card strong,
.upload-detect-card span {
  display: block;
}

.upload-detect-card strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.upload-detect-card span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-detect-status {
  margin-top: 10px;
  min-height: 34px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
}

.upload-detect-status strong {
  color: var(--primary);
  margin-right: 4px;
}

.smart-doc-form textarea[name="sourceText"] {
  min-height: 118px;
  resize: vertical;
  font-family: var(--font-main);
  line-height: 1.5;
}

.compact-doc-card {
  padding: 16px;
}

.smart-doc-form .actions {
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .upload-detect-card {
    grid-template-columns: 1fr;
  }
  .upload-detect-card .btn {
    width: 100%;
  }
  .smart-doc-form .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* --- Workflow fixes: document detection, absences and payroll simulator --- */
.doc-detect-hint {
  background: rgba(15, 118, 110, .08);
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 14px;
  padding: 12px 14px;
}
.doc-detect-hint label {
  color: var(--primary);
  font-weight: 900;
}
.doc-detect-hint p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 13px;
}
.supplier-smart-form textarea[name="notes"] {
  min-height: 130px;
  line-height: 1.5;
}
.absence-board {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 18px;
  align-items: start;
}
.attendance-grid > div {
  min-height: auto;
  align-items: center;
}
.attendance-grid .btn {
  margin-left: auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}
.payroll-premium {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(280px, .7fr);
  gap: 18px;
  align-items: start;
}
.payroll-hero-card,
.payroll-side-card,
.payroll-output.premium {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}
.payroll-hero-card {
  background: linear-gradient(135deg, #0F172A 0%, #0F766E 100%);
  color: #fff;
  min-height: 100%;
}
.payroll-hero-card span {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.payroll-hero-card h2 {
  margin: 16px 0 6px;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -.05em;
  color: #fff;
}
.payroll-hero-card p {
  color: rgba(255,255,255,.78);
  max-width: 560px;
  line-height: 1.55;
}
.payroll-hero-card input[type="range"] {
  width: 100%;
  margin: 20px 0 12px;
  accent-color: #14B8A6;
}
.payroll-hero-card .quick-amounts button {
  border-color: rgba(255,255,255,.22);
  color: #fff;
  background: rgba(255,255,255,.08);
}
.payroll-hero-card .quick-amounts button.active,
.payroll-hero-card .quick-amounts button:hover {
  background: #fff;
  color: #0F766E;
}
.payroll-side-card h3,
.payroll-output.premium h3 {
  margin-top: 0;
}
.payroll-output.premium {
  grid-column: 1 / -1;
}
.payroll-output.premium .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.payroll-output.premium .tabs button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  cursor: pointer;
}
.payroll-output.premium .tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.payroll-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.payroll-result article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.payroll-result article span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.payroll-result article strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: -.04em;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .absence-board,
  .payroll-premium {
    grid-template-columns: 1fr;
  }
  .payroll-output.premium {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  .attendance-grid > div {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .attendance-grid .btn {
    width: 100%;
    margin-left: 0;
  }
  .payroll-hero-card,
  .payroll-side-card,
  .payroll-output.premium {
    padding: 16px;
    border-radius: 18px;
  }
}

/* Finance dashboards upgrade */
.finance-pro-page {
  display: grid;
  gap: 18px;
}
.finance-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0F172A, #0F766E);
  color: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
  overflow: hidden;
  position: relative;
}
.finance-hero-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.finance-hero-card.negative { background: linear-gradient(135deg, #451A1A, #B91C1C); }
.finance-hero-card span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 900;
  opacity: .82;
}
.finance-hero-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.finance-hero-card p {
  margin: 10px 0 0;
  opacity: .88;
  font-weight: 700;
}
.finance-hero-card > i {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: rgba(255,255,255,.14);
  display: grid;
  place-items: center;
  font-size: 30px;
  flex: 0 0 auto;
}
.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.finance-kpi-grid .stat-card {
  min-height: 112px;
}
.finance-account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.finance-account-cards article {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.finance-account-cards i {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  flex: 0 0 auto;
}
.finance-account-cards span,
.expense-line span,
.report-client-row span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.finance-account-cards strong,
.report-client-row b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.finance-account-cards small { color: var(--text-muted); font-weight: 800; }
.finance-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: 16px;
}
.finance-panel-grid.wide { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); }
.finance-visual-panel,
.treasury-checklist,
.expense-category-panel,
.expense-supplier-panel,
.report-pnl {
  border-radius: 22px;
  overflow: hidden;
}
.pill-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.finance-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 240px;
  padding-top: 18px;
}
.finance-bars div {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  min-width: 0;
  height: 220px;
}
.finance-bars b {
  align-self: end;
  min-height: 16px;
  border-radius: 18px 18px 8px 8px;
  box-shadow: inset 0 -12px 25px rgba(255,255,255,.16);
}
.finance-bars span,
.finance-bars strong {
  text-align: center;
  white-space: nowrap;
}
.finance-bars span { color: var(--text-muted); font-size: 12px; font-weight: 900; }
.finance-bars strong { color: var(--text); font-size: 13px; font-weight: 900; }
.bar-blue { background: linear-gradient(180deg, #38BDF8, #2563EB); }
.bar-red { background: linear-gradient(180deg, #FB7185, #DC2626); }
.bar-orange { background: linear-gradient(180deg, #FBBF24, #F59E0B); }
.bar-purple { background: linear-gradient(180deg, #C084FC, #8B5CF6); }
.finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.finance-row:last-child { border-bottom: 0; }
.finance-row span { color: var(--text-muted); font-weight: 800; }
.finance-row strong { color: var(--text); white-space: nowrap; font-weight: 900; }
.expense-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: 16px;
}
.expense-line {
  display: grid;
  grid-template-columns: 150px minmax(140px, 1fr) 110px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.expense-line:last-child { border-bottom: 0; }
.expense-line b {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}
.expense-line b i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.expense-line strong { text-align: right; white-space: nowrap; color: var(--text); }
.report-bars { grid-template-columns: repeat(6, minmax(76px, 1fr)); }
.report-client-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.report-client-row:last-child { border-bottom: 0; }
.report-client-row small {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-weight: 800;
}
.green-text { color: #16A34A; }
.red-text { color: #DC2626; }

@media (max-width: 1100px) {
  .finance-panel-grid,
  .finance-panel-grid.wide,
  .expense-dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .finance-hero-card {
    align-items: flex-start;
    padding: 18px;
  }
  .finance-hero-card > i { width: 56px; height: 56px; font-size: 22px; border-radius: 18px; }
  .finance-bars,
  .report-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
  }
  .finance-bars div { height: 180px; }
  .expense-line {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .expense-line strong { text-align: left; }
  .finance-account-cards strong { font-size: 18px; }
}
@media (max-width: 520px) {
  .finance-hero-card { flex-direction: column; }
  .finance-hero-card strong { white-space: normal; }
  .finance-bars { grid-template-columns: 1fr; }
  .finance-bars div { height: auto; grid-template-rows: 120px auto auto; }
  .finance-row { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* === CRM requested refinements 2026-06-09 === */
.client-title-block h2,
.client-project-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.client-filter-row,
.supplier-filter-row {
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.client-filter-row label,
.supplier-filter-row label,
.stock-search {
  min-height: 42px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  border-radius: 14px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
}
.client-filter-row input,
.supplier-filter-row input,
.stock-search input {
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  min-width: 0;
  width: 100%;
}
.client-filter-row .soft-toggle,
.client-filter-row .btn,
.supplier-filter-row .btn {
  height: 42px;
  white-space: nowrap;
  font-size: 13px;
}
.client-filter-row .active-filter,
.client-filter-row .soft-toggle.active,
.supplier-filter-row .active-filter {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #99f6e4;
}
.client-risk-card {
  padding: 16px;
  border-radius: 18px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.client-risk-card strong { font-size: 15px; line-height: 1.2; }
.client-risk-card small,
.client-risk-card p { font-size: 13px; line-height: 1.35; }
.client-risk-card p { margin: 0; color: var(--text-muted, #64748b); }
.stock-products-section { margin-top: 18px; }
.stock-products-head { align-items: flex-start; gap: 14px; }
.stock-products-head h3 { margin-top: 6px; }
.stock-filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 420px;
}
.stock-category-select {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  border-radius: 14px;
  padding: 0 10px;
}
.stock-category-select span { font-size: 12px; color: #64748b; font-weight: 700; }
.stock-category-select select {
  min-width: 150px;
  height: 38px;
  border: 0;
  background: transparent;
  font-weight: 700;
  color: #0f172a;
  outline: 0;
}
.btn.danger,
button.btn.danger {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1;
}
.supplier-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.supplier-status-list div,
.supplier-progress-list {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px;
}
.supplier-status-list span,
.supplier-progress-list span {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.supplier-status-list strong,
.supplier-progress-list strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  margin-top: 6px;
  color: #0f172a;
}
.supplier-progress-list progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 8px;
}
.supplier-progress-list progress::-webkit-progress-bar { background: #e2e8f0; }
.supplier-progress-list progress::-webkit-progress-value { background: #0f766e; }
.repair-parts-card {
  padding: 16px;
  border-radius: 18px;
}
.repair-parts-card h3 { margin: 0 0 6px; }
.repair-parts-card .form-grid { margin-top: 12px; }
.smart-doc-form .upload-detect-card,
.supplier-smart-form .upload-detect-card {
  border-radius: 18px;
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
  border: 1px solid #99f6e4;
  align-items: center;
  gap: 14px;
}
.upload-detect-card .btn,
.smart-doc-form .upload-detect-card .btn,
.supplier-smart-form .upload-detect-card .btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 12px;
}
.upload-detect-card i,
.ai-fab i {
  width: 16px;
  height: 16px;
}
.ai-fab {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}
.ai-fab span { font-size: 11px; }
.field input[data-date-fr] {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
@media (max-width: 760px) {
  .client-filter-row,
  .supplier-filter-row,
  .stock-filter-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .client-filter-row label,
  .supplier-filter-row label,
  .stock-search,
  .stock-category-select {
    width: 100%;
    flex: 1 1 auto;
  }
  .stock-category-select select { width: 100%; }
  .supplier-status-list { grid-template-columns: 1fr; }
}

/* 2026-06-09 focused fixes: clients filters, repair period history, stock spacing, AI upload */
.client-filter-row {
  grid-template-columns: auto minmax(320px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}
.client-filter-row > strong {
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-muted);
}
.client-filter-row .client-search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  background: #fff;
  border: 1px solid #dbe5f0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.client-filter-row .client-search-box input {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  font-size: 14px;
  color: var(--text);
  caret-color: var(--secondary);
}
.client-filter-row .soft-toggle,
.client-filter-row .filter-risk-btn {
  min-height: 40px;
  white-space: nowrap;
  font-size: 13px;
  padding: 0 14px;
  border-radius: 13px;
}
.client-filter-row .soft-toggle.active,
.client-filter-row .filter-risk-btn.active-filter {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #0f766e;
}
.client-tabs button {
  white-space: nowrap;
  font-size: 13px;
}
.client-risk-card small,
.client-data-card span,
.crm-client-top p,
.crm-client-foot small {
  font-size: 12px;
  line-height: 1.35;
}
.client-risk-card p {
  font-size: 13px;
  line-height: 1.45;
}
.repair-hero-panel {
  gap: 16px;
}
.repair-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}
.repair-period-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 16px;
  background: #fff;
}
.repair-period-filter label {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.repair-period-filter input {
  width: 118px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 10px;
  direction: ltr;
  text-align: center;
  font-weight: 700;
  background: var(--soft);
}
.repair-period-filter .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 11px;
}
.repair-work-actions {
  grid-template-columns: repeat(2, minmax(74px, 1fr));
  gap: 8px;
}
.repair-work-actions .btn {
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 11px;
}
.repair-history-widget {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.repair-history-widget h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.repair-history-widget article {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(226, 232, 240, .7);
}
.repair-history-widget article strong {
  font-size: 12px;
  white-space: nowrap;
  color: var(--secondary);
}
.repair-history-widget article span {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repair-history-widget article small {
  grid-column: 2;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stock-products-section {
  margin-top: 18px;
}
.stock-products-section .stock-panel-head {
  padding-top: 4px;
  margin-bottom: 14px;
}
.stock-products-section .stock-panel-head h3 {
  margin-top: 0;
  font-size: 18px;
}
.stock-category-select select,
.stock-search input,
.field input[data-date-fr] {
  direction: ltr;
  unicode-bidi: plaintext;
}
.btn.danger,
.stock-widget .btn.danger,
.supplier-card-actions .btn.danger,
.stock-product-actions .btn.danger,
.repair-work-actions .btn.danger {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
}
.ai-upload-pro {
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
}
.ai-upload-pro .upload-detect-card {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}
.ai-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: #ccfbf1;
}
.ai-upload-icon svg,
.ai-upload-icon i,
.ai-upload-btn svg,
.ai-upload-btn i {
  width: 15px;
  height: 15px;
}
.ai-upload-btn {
  min-height: 34px;
  font-size: 12px;
  padding: 0 12px;
  border-radius: 12px;
}
.ai-fab {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}
.ai-fab svg,
.ai-fab i {
  width: 14px;
  height: 14px;
}
.ai-fab span {
  font-size: 10px;
}
@media (max-width: 980px) {
  .client-filter-row {
    grid-template-columns: 1fr;
  }
  .client-filter-row > strong,
  .client-filter-row .soft-toggle,
  .client-filter-row .filter-risk-btn {
    width: 100%;
    justify-content: center;
  }
  .repair-hero-actions,
  .repair-period-filter,
  .repair-filter-select {
    width: 100%;
  }
  .repair-filter-select select {
    width: 100%;
  }
}
@media (max-width: 620px) {
  .repair-period-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .repair-period-filter label,
  .repair-period-filter .btn {
    width: 100%;
  }
  .repair-period-filter input {
    width: 100%;
  }
  .ai-upload-pro .upload-detect-card {
    grid-template-columns: 1fr;
  }
  .ai-upload-icon {
    display: none;
  }
}

/* Final workflow polish: expenses, payslips, hidden POS, dashboard gauge */
.dash-gauge {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dash-gauge::after {
  z-index: 0;
}
.dash-gauge b {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  text-align: center;
  line-height: 1;
}
.expenses-pro-page .compact-real-kpis .stat-card strong {
  font-size: clamp(18px, 2vw, 24px);
}
.expenses-pro-page .expense-dashboard-grid {
  align-items: stretch;
}
.expense-line span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}
.expense-line span em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
}
.payslip-selector-card .form-grid {
  align-items: end;
}
.payslip-action-field .btn {
  width: 100%;
  min-height: 44px;
}
.compact-timeline {
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}
button[data-view="sales"],
button[data-command-view="sales"],
[data-quick-action="sales"] {
  display: none;
}
@media (max-width: 760px) {
  .payslip-selector-card .form-grid,
  .expenses-pro-page .finance-kpi-grid,
  .expense-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Coded public homepage - Atelier Suite navy/teal SaaS landing */
.as-home {
  --as-bg: #07111f;
  --as-bg-2: #0f172a;
  --as-card: rgba(15, 30, 50, .78);
  --as-card-2: rgba(13, 28, 48, .92);
  --as-line: rgba(148, 163, 184, .17);
  --as-text: #f8fafc;
  --as-muted: #9fb2ca;
  --as-soft: #cfe8f1;
  --as-primary: #0f766e;
  --as-accent: #14b8a6;
  --as-glow: rgba(20, 184, 166, .24);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--as-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 184, 166, .22), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(59, 130, 246, .14), transparent 32rem),
    linear-gradient(180deg, #07111f 0%, #081226 36%, #06101d 100%);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
}
.as-home * { box-sizing: border-box; }
.as-home a { color: inherit; text-decoration: none; }
.as-nav,
.as-hero,
.as-stats,
.as-section,
.as-final-cta,
.as-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.as-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(7, 17, 31, .96), rgba(7, 17, 31, .78));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}
.as-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: white;
  white-space: nowrap;
}
.as-logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ecfeff;
  font-weight: 950;
  background: linear-gradient(135deg, #14b8a6, #0f766e 56%, #2563eb);
  box-shadow: 0 16px 40px rgba(20, 184, 166, .24), inset 0 1px 0 rgba(255,255,255,.34);
}
.as-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}
.as-nav nav a,
.as-link {
  padding: 8px 0;
  color: #dbeafe;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.as-nav nav a:hover,
.as-link:hover { color: #5eead4; }
.as-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 850;
  font-size: 14px;
  line-height: 1;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.as-btn:hover { transform: translateY(-1px); }
.as-btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--as-primary), var(--as-accent));
  box-shadow: 0 18px 44px rgba(20, 184, 166, .22);
}
.as-btn-ghost {
  color: var(--as-text);
  border-color: rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .56);
}
.as-btn-light {
  color: #0f172a;
  background: white;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
}
.as-btn svg { width: 15px; height: 15px; }
.as-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(440px, 1.08fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  padding: clamp(42px, 7vw, 88px) 0 38px;
}
.as-pill,
.as-section-head span,
.as-preview-copy > span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #5eead4;
  background: rgba(20, 184, 166, .10);
  border: 1px solid rgba(20, 184, 166, .24);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.as-hero h1 {
  margin: 18px 0 18px;
  max-width: 710px;
  font-size: clamp(40px, 5.8vw, 76px);
  line-height: .98;
  letter-spacing: -.06em;
  color: white;
}
.as-hero h1 em {
  display: block;
  font-style: normal;
  color: transparent;
  background: linear-gradient(90deg, #5eead4, #14b8a6 45%, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
}
.as-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--as-muted);
  font-size: clamp(16px, 1.4vw, 19px);
}
.as-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.as-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: #b8c6d9;
  font-size: 13px;
  font-weight: 750;
}
.as-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.as-trust span:not(:first-child)::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--as-accent);
  box-shadow: 0 0 0 5px rgba(20, 184, 166, .10);
}
.as-dashboard-card,
.as-repair-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(15, 30, 50, .90), rgba(8, 18, 35, .96));
  box-shadow: 0 30px 90px rgba(0,0,0,.38), 0 0 70px rgba(20, 184, 166, .08);
}
.as-dashboard-card::before,
.as-repair-screen::before {
  content: '';
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: radial-gradient(circle at 28% 0%, rgba(20, 184, 166, .20), transparent 16rem);
}
.as-window-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.as-window-head > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .45);
}
.as-window-head label {
  margin-left: auto;
  width: min(280px, 48%);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  color: #9fb2ca;
  background: rgba(2, 6, 23, .34);
  border: 1px solid rgba(148, 163, 184, .13);
  font-size: 12px;
}
.as-window-head svg { width: 14px; height: 14px; }
.as-product-ui {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 18px;
  padding: 18px;
}
.as-product-ui aside {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(2, 6, 23, .32);
  border: 1px solid rgba(148, 163, 184, .12);
}
.as-product-ui aside b {
  margin-bottom: 6px;
  color: white;
  font-size: 13px;
}
.as-product-ui aside span {
  display: block;
  padding: 8px 9px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}
.as-product-ui aside span.active {
  color: white;
  background: linear-gradient(135deg, rgba(15, 118, 110, .95), rgba(20, 184, 166, .75));
}
.as-ui-title,
.as-screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.as-ui-title h3,
.as-chart h4,
.as-donut h4 { margin: 0; color: white; }
.as-ui-title small { color: #94a3b8; font-weight: 800; }
.as-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.as-kpi-row article,
.as-chart,
.as-donut,
.as-modules-grid article,
.as-benefits article,
.as-price-grid article,
.as-faq details {
  border: 1px solid rgba(148, 163, 184, .15);
  background: rgba(15, 23, 42, .58);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.as-kpi-row article { padding: 14px; }
.as-kpi-row small,
.as-kpi-row em { color: #8fa4bb; font-size: 11px; font-style: normal; font-weight: 800; }
.as-kpi-row strong { display: block; margin: 6px 0; color: white; font-size: 18px; white-space: nowrap; }
.as-kpi-row em { color: #5eead4; }
.as-ui-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(190px, .7fr);
  gap: 12px;
}
.as-chart,
.as-donut { padding: 16px; }
.as-chart div {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 9px;
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, .12);
}
.as-chart i {
  flex: 1;
  min-height: 22px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #5eead4, #0f766e);
  box-shadow: 0 12px 28px rgba(20, 184, 166, .18);
}
.as-donut b {
  width: 122px;
  aspect-ratio: 1;
  display: block;
  margin: 16px auto;
  border-radius: 50%;
  background: radial-gradient(circle, #0b1424 0 51%, transparent 52%), conic-gradient(#14b8a6 0 68%, #2563eb 68% 90%, #f59e0b 90% 100%);
}
.as-donut p {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  color: #9fb2ca;
  font-size: 12px;
}
.as-donut strong { color: white; }
.as-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 18px;
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 30, 50, .76), rgba(15, 23, 42, .46));
  box-shadow: 0 24px 70px rgba(0,0,0,.20);
}
.as-stats article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 5px 14px;
  align-items: center;
  padding: 10px 20px;
}
.as-stats article:not(:last-child) { border-right: 1px solid rgba(148, 163, 184, .14); }
.as-stats svg {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 14px;
  color: #5eead4;
  background: rgba(20, 184, 166, .13);
}
.as-stats strong { color: #5eead4; font-size: clamp(22px, 2vw, 30px); line-height: 1; }
.as-stats span { color: #cbd5e1; font-size: 13px; }
.as-section { padding: clamp(58px, 7vw, 96px) 0; }
.as-section + .as-section { border-top: 1px solid rgba(148, 163, 184, .07); }
.as-section-head {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}
.as-section-head h2,
.as-preview-copy h2,
.as-final-cta h2 {
  margin: 10px 0 10px;
  color: white;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.as-section-head p,
.as-preview-copy p,
.as-final-cta p { margin: 0; color: var(--as-muted); font-size: 16px; }
.as-tool-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr) auto) minmax(142px, .8fr);
  gap: 10px;
  align-items: stretch;
}
.as-tool-chain > b {
  display: grid;
  place-items: center;
  color: #5eead4;
  font-size: 20px;
}
.as-tool-chain > div {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  color: white;
  background: rgba(15, 30, 50, .72);
  border: 1px solid rgba(148, 163, 184, .14);
}
.as-tool-chain svg { width: 20px; height: 20px; color: #fda4af; }
.as-tool-chain small { color: #94a3b8; }
.as-tool-chain > .as-suite-box {
  justify-items: center;
  text-align: center;
  border-color: rgba(20, 184, 166, .42);
  background: linear-gradient(135deg, rgba(15, 118, 110, .38), rgba(20, 184, 166, .18));
}
.as-modules-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.as-modules-grid article,
.as-benefits article,
.as-price-grid article {
  padding: 22px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.as-modules-grid article:hover,
.as-benefits article:hover,
.as-price-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, .36);
  background: rgba(15, 30, 50, .84);
}
.as-modules-grid article div {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #5eead4;
  background: rgba(20, 184, 166, .12);
  margin-bottom: 18px;
}
.as-modules-grid svg { width: 24px; height: 24px; }
.as-modules-grid h3,
.as-benefits h3,
.as-price-grid h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  letter-spacing: -.02em;
}
.as-modules-grid p,
.as-benefits p,
.as-price-grid p,
.as-faq p {
  margin: 0;
  color: #9fb2ca;
  font-size: 14px;
}
.as-modules-grid small {
  display: inline-flex;
  margin-top: 16px;
  color: #5eead4;
  font-weight: 850;
  font-size: 12px;
}
.as-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .72fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.as-repair-screen { padding: 18px; }
.as-screen-top { position: relative; z-index: 1; color: white; }
.as-screen-top button {
  border: 1px solid rgba(148, 163, 184, .18);
  color: #dbeafe;
  background: rgba(15, 23, 42, .55);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
}
.as-repair-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.as-repair-cards article,
.as-tabs,
.as-repair-screen table {
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(2, 6, 23, .24);
}
.as-repair-cards article { padding: 14px; }
.as-repair-cards small { color: #94a3b8; font-size: 12px; }
.as-repair-cards strong { display: block; margin: 4px 0; color: white; }
.as-repair-cards em { color: #5eead4; font-style: normal; font-size: 12px; }
.as-tabs {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
  color: #94a3b8;
  font-size: 13px;
}
.as-tabs b { color: #5eead4; }
.as-repair-screen table {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}
.as-repair-screen th,
.as-repair-screen td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  color: #cbd5e1;
  font-size: 13px;
}
.as-repair-screen th { color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.as-preview-copy ul,
.as-price-grid ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 22px 0;
  list-style: none;
}
.as-preview-copy li,
.as-price-grid li {
  position: relative;
  padding-left: 26px;
  color: #cbd5e1;
  font-weight: 650;
}
.as-preview-copy li::before,
.as-price-grid li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #5eead4;
  font-weight: 900;
}
.as-benefits {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.as-benefits article { text-align: center; }
.as-benefits svg {
  width: 50px;
  height: 50px;
  padding: 12px;
  margin-bottom: 16px;
  color: #5eead4;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(20, 184, 166, .22), rgba(20, 184, 166, .08));
  box-shadow: 0 0 28px rgba(20, 184, 166, .13);
}
.as-pricing { text-align: center; }
.as-price-grid {
  width: min(640px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  text-align: left;
}
.as-price-grid article { position: relative; padding: 26px; }
.as-price-grid article.featured {
  border-color: rgba(20, 184, 166, .62);
  box-shadow: 0 22px 68px rgba(20, 184, 166, .14);
}
.as-price-grid article > em {
  position: absolute;
  top: -12px;
  right: 22px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #052e2b;
  background: #5eead4;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}
.as-price-grid strong {
  display: block;
  margin: 22px 0;
  color: white;
  font-size: 34px;
  letter-spacing: -.04em;
}
.as-price-grid strong small { font-size: 14px; color: #9fb2ca; }
.as-price-grid .as-btn { width: 100%; }
.as-price-note {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.as-price-note span::before { content: '◎'; color: #5eead4; margin-right: 6px; }
.as-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.as-faq details { overflow: hidden; }
.as-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 18px;
  color: white;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}
.as-faq summary::-webkit-details-marker { display: none; }
.as-faq summary::after { content: '+'; color: #5eead4; font-size: 20px; }
.as-faq details[open] summary::after { content: '−'; }
.as-faq p { padding: 0 18px 18px; }
.as-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-block: 24px 48px;
  border-radius: 28px;
  color: white;
  background: linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(20, 184, 166, .72) 48%, rgba(37, 99, 235, .52));
  box-shadow: 0 24px 70px rgba(20, 184, 166, .18);
}
.as-final-cta > div { display: grid; grid-template-columns: 54px 1fr; gap: 4px 16px; align-items: center; }
.as-final-cta .as-logo-mark { width: 54px; height: 54px; grid-row: span 2; }
.as-final-cta h2 { margin: 0; font-size: clamp(26px, 3vw, 40px); }
.as-final-cta p { color: rgba(255,255,255,.82); }
.as-footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 30px;
  padding: 34px 0 50px;
  border-top: 1px solid rgba(148, 163, 184, .12);
  color: #9fb2ca;
}
.as-footer p { max-width: 270px; }
.as-footer nav {
  display: grid;
  align-content: start;
  gap: 9px;
}
.as-footer strong { color: white; }
.as-footer a { color: #9fb2ca; font-size: 14px; }
.as-footer a:hover { color: #5eead4; }
@media (max-width: 1120px) {
  .as-hero,
  .as-preview { grid-template-columns: 1fr; }
  .as-dashboard-card { max-width: 760px; }
  .as-stats,
  .as-benefits { grid-template-columns: repeat(2, 1fr); }
  .as-modules-grid { grid-template-columns: repeat(2, 1fr); }
  .as-tool-chain { grid-template-columns: repeat(2, 1fr); }
  .as-tool-chain > b { display: none; }
}
@media (max-width: 760px) {
  .as-nav,
  .as-hero,
  .as-stats,
  .as-section,
  .as-final-cta,
  .as-footer { width: min(100% - 24px, 1180px); }
  .as-nav { align-items: flex-start; }
  .as-nav nav { justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; }
  .as-nav nav a:nth-child(1),
  .as-nav nav a:nth-child(2),
  .as-nav nav a:nth-child(3),
  .as-nav nav a:nth-child(4) { display: none; }
  .as-hero { padding-top: 30px; }
  .as-hero h1 { font-size: clamp(36px, 12vw, 54px); }
  .as-dashboard-card { border-radius: 22px; }
  .as-product-ui { grid-template-columns: 1fr; padding: 12px; }
  .as-product-ui aside { display: none; }
  .as-window-head label { width: 60%; }
  .as-kpi-row,
  .as-ui-grid,
  .as-stats,
  .as-modules-grid,
  .as-benefits,
  .as-price-grid,
  .as-faq-grid,
  .as-repair-cards,
  .as-footer { grid-template-columns: 1fr; }
  .as-home .as-stats article { border-right: 0; border-bottom: 1px solid rgba(148, 163, 184, .12); }
  .as-stats article:last-child { border-bottom: 0; }
  .as-tool-chain { grid-template-columns: 1fr; }
  .as-repair-screen { overflow-x: auto; }
  .as-repair-screen table { min-width: 560px; }
  .as-final-cta { display: grid; }
  .as-final-cta > div { grid-template-columns: 1fr; }
  .as-final-cta .as-logo-mark { grid-row: auto; }
}

/* Homepage responsive menu + Centre de pilotage dashboard upgrade */
.as-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, .72);
  font-weight: 850;
  cursor: pointer;
}
.as-menu-toggle svg { width: 18px; height: 18px; }
@media (max-width: 940px) {
  .as-nav {
    position: sticky;
    top: 0;
    align-items: center;
    padding: 12px 0;
  }
  .as-menu-toggle { display: inline-flex; margin-left: auto; }
  .as-home .as-nav nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: rgba(7, 17, 31, .98);
    box-shadow: 0 22px 60px rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
  }
  .as-home .as-nav nav.open { display: grid; }
  .as-home .as-nav nav.open a,
  .as-home .as-nav nav.open .as-link,
  .as-home .as-nav nav.open .as-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .as-home .as-nav nav.open a:hover,
  .as-home .as-nav nav.open .as-link:hover { background: rgba(20, 184, 166, .10); }
  .as-home .as-nav nav.open .as-btn { justify-content: center; }
}

.control-center {
  --cc-bg: #f6f8fb;
  --cc-card: #ffffff;
  --cc-text: #0f172a;
  --cc-muted: #64748b;
  --cc-line: #e2e8f0;
  --cc-primary: #0f766e;
  --cc-accent: #14b8a6;
  display: grid;
  gap: 18px;
}
.control-center * { box-sizing: border-box; }
.cc-hero,
.cc-panel,
.cc-kpi {
  border: 1px solid var(--cc-line);
  border-radius: 22px;
  background: var(--cc-card);
  box-shadow: 0 16px 45px rgba(15, 23, 42, .06);
}
.cc-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 20%, rgba(20, 184, 166, .18), transparent 22rem),
    linear-gradient(135deg, #0f172a, #12313a 58%, #0f766e);
  color: #fff;
}
.cc-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, .13);
  border: 1px solid rgba(45, 212, 191, .24);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cc-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -.04em;
}
.cc-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.78); font-size: 15px; }
.cc-hero p strong { color: #ccfbf1; }
.cc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-hero-actions .btn { white-space: nowrap; }
.cc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.cc-kpi {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
}
.cc-kpi > div {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--cc-primary);
  background: #ccfbf1;
}
.cc-kpi i { font-size: 18px; }
.cc-kpi span {
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.cc-kpi strong {
  display: block;
  color: var(--cc-text);
  font-size: clamp(18px, 1.55vw, 26px);
  line-height: 1.05;
  letter-spacing: -.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-kpi small { color: var(--cc-muted); font-size: 12px; line-height: 1.35; }
.cc-kpi.green > div { color: #16a34a; background: #dcfce7; }
.cc-kpi.orange > div { color: #d97706; background: #fef3c7; }
.cc-kpi.blue > div { color: #2563eb; background: #dbeafe; }
.cc-kpi.red > div { color: #dc2626; background: #fee2e2; }
.cc-kpi.purple > div { color: #7c3aed; background: #ede9fe; }
.cc-main-grid,
.cc-lower-grid,
.cc-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
}
.cc-panel { padding: 18px; min-width: 0; }
.cc-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.cc-panel-head span {
  color: var(--cc-primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cc-panel-head h3 { margin: 3px 0 0; color: var(--cc-text); font-size: 19px; letter-spacing: -.02em; }
.cc-panel-head button,
.cc-client-list button,
.cc-action-list button {
  border: 1px solid #dbe7ef;
  border-radius: 11px;
  background: #f8fafc;
  color: #0f766e;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}
.cc-health-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
}
.cc-health-ring {
  width: 178px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#14b8a6 var(--score), #e2e8f0 0);
  position: relative;
  margin-inline: auto;
}
.cc-health-ring::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.cc-health-ring b,
.cc-health-ring small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}
.cc-health-ring b { color: #0f172a; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
.cc-health-ring small { margin-top: 5px; color: #64748b; font-size: 12px; font-weight: 800; }
.cc-health-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-health-metrics p {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cc-health-metrics span { display: block; color: #64748b; font-size: 12px; font-weight: 800; }
.cc-health-metrics strong { display: block; margin-top: 4px; color: #0f172a; font-size: 18px; white-space: nowrap; }
.cc-action-list { display: grid; gap: 10px; }
.cc-action-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cc-action-list article.hot { border-color: rgba(245, 158, 11, .38); background: #fffbeb; }
.cc-action-list i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  background: #ccfbf1;
}
.cc-action-list article.hot i { color: #d97706; background: #fef3c7; }
.cc-action-list strong { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 9px; color: #fff; background: #0f766e; font-size: 14px; margin-right: 8px; }
.cc-action-list article.hot strong { background: #d97706; }
.cc-action-list b { color: #0f172a; font-size: 14px; }
.cc-action-list small { display: block; color: #64748b; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-pipeline-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.cc-pipeline-row article {
  min-height: 104px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}
.cc-pipeline-row span { color: #64748b; font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-pipeline-row strong { color: #0f172a; font-size: 30px; line-height: 1; }
.cc-pipeline-row i { height: 7px; border-radius: 999px; background: linear-gradient(90deg, #0f766e, #14b8a6); }
.cc-finance-chart { min-height: 340px; }
.cc-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  padding: 18px 10px 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid #e2e8f0;
}
.cc-chart-col {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  position: relative;
  padding-bottom: 28px;
}
.cc-chart-col span { width: 9px; min-height: 8px; border-radius: 999px 999px 4px 4px; }
.cc-chart-col .billed { background: #0f766e; }
.cc-chart-col .paid { background: #22c55e; }
.cc-chart-col .expense { background: #f59e0b; }
.cc-chart-col b { position: absolute; bottom: 0; color: #64748b; font-size: 12px; text-transform: capitalize; }
.cc-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; color: #64748b; font-size: 12px; font-weight: 850; }
.cc-chart-legend span::before { content:""; display:inline-block; width:10px; height:10px; border-radius:999px; margin-right:6px; }
.cc-chart-legend .billed::before { background:#0f766e; }
.cc-chart-legend .paid::before { background:#22c55e; }
.cc-chart-legend .expense::before { background:#f59e0b; }
.cc-ai {
  background:
    radial-gradient(circle at 95% 0%, rgba(20, 184, 166, .16), transparent 15rem),
    #0f172a;
  color: #fff;
  border-color: rgba(20, 184, 166, .20);
}
.cc-ai .cc-panel-head h3 { color: #fff; }
.cc-ai .cc-panel-head button { background: rgba(20, 184, 166, .12); border-color: rgba(20, 184, 166, .28); color: #99f6e4; }
.cc-ai ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 10px; color: #dbeafe; }
.cc-ai li { line-height: 1.45; }
.cc-client-list,
.cc-activity-list { display: grid; gap: 10px; }
.cc-client-list article,
.cc-activity-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.cc-activity-list article { grid-template-columns: 42px minmax(0, 1fr) auto; }
.cc-client-list img,
.cc-client-list b,
.cc-activity-list i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  object-fit: cover;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 900;
}
.cc-client-list strong,
.cc-activity-list strong { display: block; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-client-list small,
.cc-activity-list small { display: block; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-client-list em,
.cc-activity-list em { color: #0f766e; font-style: normal; font-weight: 900; white-space: nowrap; }
@media (max-width: 1220px) {
  .cc-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cc-pipeline-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cc-hero,
  .cc-panel-head { display: grid; }
  .cc-hero-actions { justify-content: start; }
  .cc-main-grid,
  .cc-lower-grid,
  .cc-bottom-grid { grid-template-columns: 1fr; }
  .cc-health-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cc-kpi-grid,
  .cc-pipeline-row,
  .cc-health-metrics { grid-template-columns: 1fr; }
  .cc-action-list article,
  .cc-client-list article,
  .cc-activity-list article { grid-template-columns: 38px minmax(0,1fr); }
  .cc-action-list button,
  .cc-client-list button,
  .cc-client-list em,
  .cc-activity-list em { grid-column: 2; justify-self: start; }
  .cc-chart { gap: 6px; padding-inline: 4px; }
  .cc-chart-col span { width: 7px; }
  .cc-health-ring { width: 154px; }
}


.as-mobile-scrim { display: none; }

/* Final responsive homepage menu + HR/stock detail improvements */
@media (max-width: 980px) {
  body.as-menu-open { overflow: hidden; }
  .as-home .as-nav {
    width: 100%;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148,163,184,.16);
  }
  .as-home .as-logo { min-width: 0; }
  .as-menu-toggle { display: inline-flex; margin-left: auto; flex-shrink: 0; }
  .as-mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 77;
    display: none;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(5px);
  }
  body.as-menu-open .as-mobile-scrim { display: block; }
  .as-home .as-nav nav {
    position: fixed;
    z-index: 78;
    top: 74px;
    left: 14px;
    right: 14px;
    display: none;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(20,184,166,.26);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(8,18,38,.99), rgba(15,23,42,.98));
    box-shadow: 0 30px 90px rgba(0,0,0,.45);
  }
  .as-home .as-nav nav.open { display: grid; }
  .as-home .as-nav nav a,
  .as-home .as-nav nav .as-link,
  .as-home .as-nav nav .as-btn,
  .as-home .as-nav nav.open a,
  .as-home .as-nav nav.open .as-link,
  .as-home .as-nav nav.open .as-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.12);
    background: rgba(15,30,50,.62);
    color: #e2e8f0;
  }
  .as-home .as-nav nav .as-btn-primary,
  .as-home .as-nav nav.open .as-btn-primary { justify-content: center; background: linear-gradient(135deg,#0f766e,#14b8a6); color: #fff; }
  .as-home .as-nav nav a:nth-child(1),
  .as-home .as-nav nav a:nth-child(2),
  .as-home .as-nav nav a:nth-child(3),
  .as-home .as-nav nav a:nth-child(4) { display: flex; }
}
@media (max-width: 520px) {
  .as-home .as-nav { padding-inline: 12px; }
  .as-logo span:last-child { font-size: 16px; }
  .as-logo-mark { width: 32px; height: 32px; border-radius: 10px; }
  .as-menu-toggle span { display: none; }
  .as-home .as-nav nav { top: 66px; left: 10px; right: 10px; }
}

.employee-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}
.employee-card-pro {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm, 0 8px 22px rgba(15,23,42,.06));
}
.employee-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.employee-card-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.employee-card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.employee-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.employee-info-grid span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.employee-info-grid b {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.employee-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-card-actions .btn { min-height: 34px; padding: 8px 10px; font-size: 12px; }
.employee-profile-pro { display: grid; gap: 16px; }
.employee-profile-head { margin-bottom: 0; }

.stock-detail-pro { display: grid; gap: 16px; }
.stock-detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: 16px;
}
.stock-image-card.pro {
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stock-image-card.pro img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.stock-detail-main {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.stock-detail-main h3 { margin: 4px 0 2px; font-size: 24px; letter-spacing: -.03em; }
.stock-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stock-detail-kpis article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}
.stock-detail-kpis span { color: var(--text-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.stock-detail-kpis strong { color: var(--text); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-history-card table td,
.stock-history-card table th { white-space: nowrap; }
.stock-smart-form .stock-form-help > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfeff;
  color: #134e4a;
  border: 1px solid #99f6e4;
  font-size: 13px;
}
@media (max-width: 860px) {
  .stock-detail-hero { grid-template-columns: 1fr; }
  .stock-detail-kpis { grid-template-columns: repeat(2, 1fr); }
  .employee-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .employee-directory { grid-template-columns: 1fr; }
  .stock-detail-kpis { grid-template-columns: 1fr; }
}


/* ===== mr3ecrm polish: dashboard, repairs, stock, docs ===== */
.cc-hero h1 span { background: linear-gradient(135deg, var(--secondary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cc-health-center { position: relative; z-index: 1; display: grid; place-items: center; text-align: center; gap: 4px; }
.cc-health-ring small { max-width: 92px; line-height: 1.2; }
.repair-period-dropdown { position: relative; }
.repair-period-dropdown .period-menu { right: 0; left: auto; min-width: 250px; }
.stock-category-grid { display: grid; gap: 10px; }
.stock-category-card { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 12px; display: grid; gap: 8px; text-align: left; }
.stock-category-card.active, .stock-category-card:hover { border-color: rgba(20,184,166,.45); background: linear-gradient(180deg, #ffffff, #f0fdfa); }
.stock-category-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stock-category-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(20,184,166,.10); font-size: 18px; }
.stock-category-card strong { font-size: 15px; }
.stock-category-card small { color: var(--muted); }
.stock-category-card em { color: #0f766e; font-style: normal; font-size: 12px; font-weight: 700; }
.stock-watch-list.enhanced { display: grid; gap: 12px; }
.stock-watch-item { width: 100%; display: grid; gap: 10px; padding: 13px; border-radius: 18px; border: 1px solid var(--line); background: #fff; text-align: left; }
.stock-watch-item.critical { border-color: rgba(220,38,38,.25); background: #fff5f5; }
.stock-watch-item.warning { border-color: rgba(245,158,11,.28); background: #fffbeb; }
.stock-watch-item.soon { border-color: rgba(234,179,8,.28); background: #fefce8; }
.stock-watch-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.stock-watch-top span { display: grid; gap: 3px; }
.stock-watch-status { padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.stock-watch-status.critical { background: #fee2e2; color: #b91c1c; }
.stock-watch-status.warning { background: #fef3c7; color: #b45309; }
.stock-watch-status.soon { background: #fef9c3; color: #a16207; }
.stock-watch-status.ok { background: #dcfce7; color: #166534; }
.stock-watch-metrics { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.stock-watch-bar { height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.stock-watch-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--secondary), var(--accent)); }
.stock-watch-item.critical .stock-watch-bar i { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stock-watch-item.warning .stock-watch-bar i { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stock-watch-item.soon .stock-watch-bar i { background: linear-gradient(90deg, #eab308, #ca8a04); }
.stock-watch-item p { margin: 0; color: var(--muted); font-size: 12px; }
.stock-movement-compact { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.stock-movement-compact i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(37,99,235,.10); color: #2563eb; }
.stock-movement-compact div { display: grid; gap: 3px; }
.stock-movement-compact small, .stock-movement-compact em { color: var(--muted); font-style: normal; }
.stock-movement-compact b { font-size: 16px; }
.doc-preview.delivery-template { background: #f3f4f6; padding: 24px 28px 0; border: 1px solid #d5d7db; }
.delivery-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.delivery-header h1 { margin: 0; color: #12b6ca; font-size: clamp(32px, 5vw, 56px); line-height: 1.02; }
.delivery-rule { height: 3px; background: #12b6ca; margin-top: 24px; }
.delivery-logo { width: 98px; height: 98px; border-radius: 999px; background: #f3b01b; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px; }
.delivery-company { margin: 32px 0 18px; display: grid; gap: 4px; color: #4b5563; }
.delivery-company strong { color: #111827; font-size: 26px; }
.delivery-top-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: 28px; margin: 28px 0; }
.delivery-box { background: #efefef; padding: 16px; }
.delivery-box table { width: 100%; border-collapse: collapse; }
.delivery-box td { padding: 4px 0; color: #4b5563; }
.delivery-box td:first-child { width: 55%; color: #374151; }
.delivery-dest h3 { margin: 0 0 8px; font-size: 30px; color: #111827; }
.delivery-dest strong { display: block; margin-bottom: 4px; }
.delivery-dest p { margin: 2px 0; color: #4b5563; }
.delivery-info { margin: 10px 0 18px; color: #6b7280; }
.delivery-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.delivery-table th { padding: 12px 10px; text-align: left; border-top: 3px solid #12b6ca; border-bottom: 1px solid #d7dce2; }
.delivery-table td { padding: 11px 10px; border-bottom: 1px solid #e5e7eb; color: #4b5563; }
.delivery-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 26px 0 18px; }
.delivery-signs strong { display: block; margin-bottom: 10px; }
.delivery-footer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid #9ca3af; padding: 16px 0 22px; color: #4b5563; }
.delivery-footer strong { display: block; margin-bottom: 8px; color: #111827; }
.delivery-footer span { display: block; }
.delivery-bottom-strip { height: 22px; background: #12b6ca; margin: 0 -28px; }
.doc-preview.facture-template { position: relative; background: #ececec; padding: 26px 28px 30px 42px; border: 1px solid #ddd; min-height: 540px; }
.facture-side-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: #c7b95a; }
.facture-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.facture-brand strong { display: block; font-size: 28px; }
.facture-brand span { display: block; color: #4b5563; }
.facture-title-block { text-align: right; }
.facture-title-block h1 { margin: 0; font-size: clamp(36px, 6vw, 56px); letter-spacing: .04em; }
.facture-title-block strong { display: block; margin-top: 10px; font-size: 18px; }
.facture-meta-row { display: flex; justify-content: space-between; gap: 14px; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px dashed #777; }
.facture-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 16px 0 20px; }
.facture-parties h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: .03em; }
.facture-parties p { margin: 0; line-height: 1.55; }
.facture-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.facture-table th, .facture-table td { padding: 10px 8px; border-bottom: 1px dashed #9ca3af; text-align: left; }
.facture-bottom { display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start; margin-top: 18px; }
.facture-payment h3, .facture-terms strong { margin: 0 0 8px; display: block; }
.facture-payment p, .facture-terms p { margin: 0; color: #374151; line-height: 1.5; }
.facture-terms { margin-top: 22px; }
.facture-totals { display: grid; gap: 8px; }
.facture-totals div { display: flex; justify-content: space-between; gap: 20px; }
.facture-totals .grand { font-size: 20px; font-weight: 900; margin-top: 6px; }
.facture-dots { position: absolute; right: 26px; bottom: 18px; display: flex; gap: 10px; }
.facture-dots i { width: 14px; height: 14px; border-radius: 999px; display: block; }
.facture-dots i:nth-child(1) { background: #f59ac5; }
.facture-dots i:nth-child(2) { background: #f0a43a; }
.facture-dots i:nth-child(3) { background: #cdbba7; }
.facture-dots i:nth-child(4) { background: #99d4ea; }
@media (max-width: 900px) {
  .delivery-top-grid, .delivery-footer, .facture-parties, .facture-bottom { grid-template-columns: 1fr; }
  .facture-header, .delivery-header, .facture-meta-row { flex-direction: column; }
  .delivery-logo { width: 84px; height: 84px; }
}

/* === mr3ecrm premium patch: dashboard, finance, PDFs === */
:root{--mr3-navy:#0B1120;--mr3-blue:#2563EB;--mr3-cyan:#06B6D4;--mr3-soft:#F8FAFC;--mr3-border:#E2E8F0}
.cc-hero{background:linear-gradient(135deg,#0B1120 0%,#102653 48%,#2563EB 100%)!important;color:#fff!important;border:0!important;box-shadow:0 24px 60px rgba(15,23,42,.18)!important}
.cc-hero h1{color:#fff!important;font-size:clamp(28px,3vw,44px)!important;font-weight:900!important;letter-spacing:-.04em!important}.cc-hero h1 span{background:linear-gradient(90deg,#7DD3FC,#fff,#A7F3D0);-webkit-background-clip:text;background-clip:text;color:transparent!important}.cc-hero p,.cc-eyebrow{color:rgba(255,255,255,.82)!important}.cc-hero .btn.ghost{background:rgba(255,255,255,.12)!important;color:#fff!important;border-color:rgba(255,255,255,.22)!important}
.cc-kpi,.cc-panel,.card{border-radius:22px!important;border:1px solid rgba(226,232,240,.9)!important;box-shadow:0 18px 50px rgba(15,23,42,.08)!important}.cc-kpi strong{font-size:clamp(22px,2vw,30px)!important;color:#0B1120!important}.cc-kpi span{font-weight:800!important;color:#475569!important}
.cc-health{background:radial-gradient(circle at top left,rgba(37,99,235,.12),transparent 38%),#fff!important}.cc-health-body{display:grid!important;grid-template-columns:220px 1fr!important;align-items:center!important;gap:22px!important}.cc-health-ring{width:210px!important;height:210px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:conic-gradient(var(--mr3-blue) var(--score),#E2E8F0 0)!important;position:relative!important}.cc-health-ring:after{content:"";position:absolute;inset:18px;background:#fff;border-radius:50%;box-shadow:inset 0 0 0 1px #E2E8F0}.cc-health-center{position:relative;z-index:1;text-align:center;display:grid;gap:4px}.cc-health-center b{font-size:44px!important;line-height:1;color:#0B1120!important}.cc-health-center small{font-weight:800;color:#2563EB!important}.cc-health-center em{font-style:normal;font-size:11px;color:#64748B!important}.cc-health-metrics p{background:#F8FAFC!important;border:1px solid #E2E8F0!important;border-radius:16px!important;padding:12px 14px!important}.cc-health-metrics strong{color:#0B1120!important;font-size:18px!important}.cc-panel-head h3{color:#0B1120!important;font-weight:900!important}.cc-panel-head span{color:#2563EB!important;font-weight:800!important}.cc-actions .cc-panel-head span{color:#F97316!important}.cc-action-list article{align-items:center!important;text-align:left!important;border-radius:18px!important}.cc-activity-main .cc-activity-list article{padding:14px 0!important}.cc-bottom-grid{align-items:stretch!important}
.period-trigger{background:#fff!important;border:1px solid #D7E3F5!important;border-radius:999px!important;color:#0B1120!important;box-shadow:0 10px 28px rgba(15,23,42,.08)!important}.period-menu{border-radius:18px!important;border:1px solid #E2E8F0!important;box-shadow:0 24px 60px rgba(15,23,42,.18)!important}.period-menu button:hover{background:#EFF6FF!important;color:#2563EB!important}
.doc-period-card{background:linear-gradient(135deg,#F8FAFC,#EFF6FF)!important}.doc-period-options{display:flex;gap:10px;flex-wrap:wrap}.doc-period-options button{border:1px solid #D7E3F5;background:#fff;border-radius:999px;padding:10px 14px;font-weight:800;color:#0B1120}.doc-period-options button.active{background:#0B1120;color:#fff}.module-grid .chart-card h3{font-weight:900;color:#0B1120!important}
.finance-pro-page{background:linear-gradient(180deg,#F8FAFC 0%,#fff 100%);border-radius:28px;padding:16px}.finance-hero-card{border-radius:30px!important;background:linear-gradient(135deg,#0B1120,#1D4ED8)!important;color:#fff!important;box-shadow:0 26px 70px rgba(37,99,235,.25)!important}.finance-hero-card strong,.finance-hero-card span,.finance-hero-card p{color:#fff!important}.finance-kpi-grid,.finance-account-cards{gap:16px!important}.finance-account-cards article{border-radius:22px!important;background:#fff!important;border:1px solid #E2E8F0!important;box-shadow:0 18px 46px rgba(15,23,42,.08)!important}.finance-command-center{display:grid;grid-template-columns:220px 1fr 260px;gap:18px;align-items:center;margin:18px 0;padding:22px;border-radius:28px;background:#fff;border:1px solid #E2E8F0;box-shadow:0 18px 50px rgba(15,23,42,.08)}.finance-health-orb{width:170px;height:170px;border-radius:50%;display:grid;place-items:center;text-align:center;background:conic-gradient(#22C55E 0 68%,#E2E8F0 0);position:relative}.finance-health-orb:before{content:"";position:absolute;inset:16px;border-radius:50%;background:#fff}.finance-health-orb strong,.finance-health-orb span{position:relative;z-index:1}.finance-health-orb strong{font-size:42px;color:#0B1120}.finance-health-orb span{font-size:12px;font-weight:800;color:#2563EB}.finance-command-center h3{margin:0;color:#0B1120;font-size:26px}.finance-command-center p{margin:6px 0;color:#475569;font-weight:800}.finance-alerts{display:grid;gap:8px}.finance-alerts b{color:#0B1120}.finance-alerts span{background:#FFF7ED;border:1px solid #FED7AA;border-radius:12px;padding:8px 10px;color:#9A3412;font-weight:700}
@media(max-width:900px){.cc-health-body,.finance-command-center{grid-template-columns:1fr!important}.cc-health-ring,.finance-health-orb{margin:auto}.finance-alerts{grid-template-columns:1fr}.finance-command-center{text-align:center}}

/* PDF modern templates */
.pdf-brand-lockup{display:flex;align-items:center;gap:12px}.mr3e-logo-mark{width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,#2563EB,#06B6D4);display:grid;place-items:center;color:#fff;font-weight:900;font-size:28px;box-shadow:0 14px 30px rgba(37,99,235,.25)}.pdf-brand-lockup strong{display:block!important;font-size:24px!important;letter-spacing:-.03em!important;color:#0B1120!important}.pdf-brand-lockup span{display:block!important;color:#64748B!important;font-weight:700!important}.delivery-template{background:#F8FAFC!important;border:0!important;border-radius:0!important;padding:30px!important}.delivery-header{align-items:center!important;border-bottom:4px solid #0B1120!important;padding-bottom:18px!important}.delivery-header h1{color:#0B1120!important;text-transform:uppercase!important;font-size:42px!important;letter-spacing:.04em!important}.delivery-rule{background:linear-gradient(90deg,#2563EB,#06B6D4)!important}.delivery-company,.delivery-box,.delivery-dest,.delivery-note-card{background:#fff!important;border:1px solid #E2E8F0!important;border-radius:18px!important;padding:18px!important;box-shadow:0 12px 30px rgba(15,23,42,.06)!important}.delivery-table th{background:#0B1120!important;color:#fff!important;border:0!important}.delivery-table td{background:#fff!important}.delivery-bottom-strip{background:linear-gradient(90deg,#0B1120,#2563EB,#06B6D4)!important;border-radius:12px!important;margin-top:18px!important}.delivery-note-card{margin:22px 0;color:#475569}.delivery-note-card strong{display:block;color:#0B1120;font-size:18px;margin-bottom:6px}
.facture-template{background:#fff!important;border:0!important;padding:34px 38px!important;box-shadow:none!important}.facture-template:before{content:"";position:absolute;left:0;right:0;top:0;height:18px;background:linear-gradient(90deg,#0B1120 0 70%,#06B6D4 70% 100%)}.facture-side-bar{display:none!important}.facture-title-block h1{font-size:52px!important;color:#0B1120!important;font-weight:900!important}.facture-title-block strong{background:#EFF6FF;border:1px solid #BFDBFE;color:#1D4ED8;border-radius:999px;padding:8px 14px;display:inline-block!important}.devis-template .facture-title-block strong{background:#ECFEFF;border-color:#A5F3FC;color:#0891B2}.facture-meta-row{border:0!important;background:#F8FAFC;border-radius:18px;padding:14px 18px!important}.facture-parties>div{border:1px solid #E2E8F0;border-radius:18px;padding:18px;background:#F8FAFC}.facture-table th{background:#FACC15!important;color:#0B1120!important;border:0!important}.facture-table td{border-bottom:1px solid #E5E7EB!important}.facture-bottom{border-top:4px solid #0B1120;padding-top:22px}.facture-totals{background:#F8FAFC;border:1px solid #E2E8F0;border-radius:18px;padding:18px}.facture-totals .grand{background:#0B1120;color:#fff;border-radius:14px;padding:12px}.facture-dots{display:none!important}

/* === mr3ecrm premium pages + PDF upgrade 2026-06-13 === */
:root{--mr-navy:#0b1120;--mr-blue:#2563eb;--mr-cyan:#06b6d4;--mr-mint:#9bea7a;--mr-bg:#f7fbff;--mr-card:#ffffff;--mr-line:#e6eef8;--mr-text:#0f172a}
.sidebar .brand,.pdf-brand-lockup{letter-spacing:.01em}.brand-mark,.mr3e-logo-mark{background:linear-gradient(135deg,var(--mr-blue),var(--mr-cyan))!important;color:#fff!important;box-shadow:0 12px 30px rgba(37,99,235,.25)!important}.brand-text strong,.pdf-brand-lockup strong{font-weight:900;color:var(--mr-navy)}
.cc-hero{background:radial-gradient(circle at top right,rgba(6,182,212,.24),transparent 38%),linear-gradient(135deg,#071225 0%,#0b1b39 48%,#0f2e56 100%)!important;border:0!important;color:#fff!important;box-shadow:0 28px 70px rgba(15,23,42,.18)!important}.cc-hero h1{color:#fff!important;font-size:clamp(30px,4vw,48px)!important}.cc-hero h1 span{background:linear-gradient(90deg,#7dd3fc,#fff,#9bea7a);-webkit-background-clip:text;background-clip:text;color:transparent!important;text-shadow:none!important}.cc-hero p,.cc-eyebrow{color:rgba(255,255,255,.82)!important}.cc-hero .btn.ghost{background:rgba(255,255,255,.12)!important;color:#fff!important;border-color:rgba(255,255,255,.2)!important}
.cc-kpi{border:1px solid var(--mr-line)!important;border-radius:24px!important;background:linear-gradient(180deg,#fff,#f8fbff)!important;box-shadow:0 18px 50px rgba(15,23,42,.07)!important}.cc-kpi strong{color:var(--mr-navy)!important}.cc-kpi div{border-radius:18px!important}
.cc-main-grid,.cc-bottom-grid,.cc-lower-grid{align-items:stretch}.cc-panel{border:1px solid var(--mr-line)!important;border-radius:26px!important;background:rgba(255,255,255,.92)!important;box-shadow:0 18px 54px rgba(15,23,42,.08)!important;backdrop-filter:blur(14px)}.cc-panel-head span{color:#64748b!important;font-weight:800;text-transform:uppercase;font-size:11px;letter-spacing:.08em}.cc-panel-head h3{color:var(--mr-navy)!important}.cc-panel-head button{border:1px solid #dbeafe!important;background:#eff6ff!important;color:#1d4ed8!important;border-radius:999px!important;padding:9px 14px!important;font-weight:800!important}
.cc-health{background:radial-gradient(circle at 20% 10%,rgba(155,234,122,.28),transparent 38%),#fff!important}.cc-health-body{display:grid;grid-template-columns:280px 1fr;gap:22px;align-items:center}.cc-health-ring{width:252px!important;height:252px!important;margin:auto!important;border-radius:50%;background:conic-gradient(var(--mr-mint) var(--score),#eef2f7 0)!important;display:grid;place-items:center;box-shadow:inset 0 0 0 18px #fff,0 16px 50px rgba(132,204,22,.22)!important}.cc-health-center{width:178px!important;height:178px!important;border-radius:50%;background:#fff!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center;box-shadow:0 10px 28px rgba(15,23,42,.08)}.cc-health-center b{font-size:52px!important;line-height:1!important;color:var(--mr-navy)!important}.cc-health-center small{font-weight:900;color:#16a34a!important}.cc-health-center em{font-style:normal;color:#64748b;font-size:12px;margin-top:8px}.cc-health-metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cc-health-metrics p{border:1px solid var(--mr-line);background:#f8fbff;border-radius:18px;padding:16px;margin:0}.cc-health-metrics strong{font-size:21px;color:var(--mr-navy)}
.cc-recent-activity .premium-timeline,.cc-activity-list{display:grid;gap:10px}.cc-recent-activity article,.cc-activity-list article{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;border:1px solid #eef2f7;background:#fbfdff;border-radius:18px;padding:12px}.cc-recent-activity article i{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#dbeafe,#cffafe);display:grid;place-items:center;color:#2563eb}.cc-recent-activity article strong{display:block;color:var(--mr-navy)}.cc-recent-activity article small,.cc-recent-activity article em{color:#64748b}.cc-actions{background:linear-gradient(180deg,#fff7ed,#fff)!important}.cc-actions .cc-action-list article.hot{border-color:#fed7aa;background:#fff7ed}.cc-actions .cc-action-list article.ok{border-color:#dcfce7;background:#f7fee7}.cc-finance-chart .cc-chart{border-radius:22px;background:linear-gradient(180deg,#f8fafc,#fff);padding:18px}.cc-finance-chart .cc-chart-col span{border-radius:999px 999px 8px 8px}.cc-finance-chart .cc-chart-col .billed{background:linear-gradient(#60a5fa,#2563eb)!important}.cc-finance-chart .cc-chart-col .paid{background:linear-gradient(#86efac,#22c55e)!important}.cc-finance-chart .cc-chart-col .expense{background:linear-gradient(#fca5a5,#ef4444)!important}.cc-chart-legend{font-weight:800;color:#64748b}.cc-chart-legend:before{content:'Vue filtrée par date sélectionnée';margin-right:auto;color:#94a3b8;font-size:12px}
.finance-pro-page{background:radial-gradient(circle at top left,rgba(37,99,235,.08),transparent 24%),linear-gradient(180deg,#f8fbff,#fff);padding:4px;border-radius:30px}.finance-hero-card{border-radius:30px!important;background:linear-gradient(135deg,#081225,#0b2b56)!important;color:#fff!important;box-shadow:0 30px 70px rgba(15,23,42,.16)!important;position:relative;overflow:hidden}.finance-hero-card:after{content:'';position:absolute;right:-45px;top:-70px;width:220px;height:220px;border-radius:50%;background:rgba(6,182,212,.25)}.finance-hero-card strong{font-size:clamp(34px,5vw,58px)!important;color:#fff!important}.finance-hero-card span,.finance-hero-card p{color:rgba(255,255,255,.78)!important}.finance-account-cards article{border:1px solid var(--mr-line)!important;background:#fff!important;border-radius:24px!important;box-shadow:0 16px 45px rgba(15,23,42,.06)!important}.finance-account-cards i{background:linear-gradient(135deg,#dbeafe,#cffafe);color:#2563eb;border-radius:16px;padding:14px}.finance-panel-grid .card,.expense-dashboard-grid .card{border-radius:26px!important;border:1px solid var(--mr-line)!important;box-shadow:0 18px 48px rgba(15,23,42,.07)!important}.finance-row{border-bottom:1px solid #eef2f7;padding:12px 0}.finance-row strong{color:var(--mr-navy)}.finance-bars div b{border-radius:999px 999px 10px 10px!important;background:linear-gradient(180deg,#9bea7a,#22c55e)!important}.finance-bars div b.loss{background:linear-gradient(180deg,#fca5a5,#ef4444)!important}.finance-bars div b.warning{background:linear-gradient(180deg,#fde68a,#f59e0b)!important}
.doc-preview .pdf-brand-lockup{display:flex;align-items:center;gap:12px}.doc-preview .mr3e-logo-mark{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;font-size:24px;font-weight:950}.delivery-template{background:#f8fbff!important;border:0!important;padding:32px!important;color:#0f172a!important}.delivery-header h1{text-transform:uppercase;color:#0b1120!important;font-size:42px!important;letter-spacing:.08em!important}.delivery-rule{height:4px!important;background:linear-gradient(90deg,#2563eb,#06b6d4)!important}.delivery-box,.delivery-dest,.delivery-note-card{background:#fff!important;border:1px solid #dbeafe!important;border-radius:18px!important;box-shadow:0 12px 35px rgba(15,23,42,.05)!important}.delivery-note-card{padding:18px!important}.delivery-table th{border-top:0!important;background:#0b1120!important;color:#fff!important}.delivery-table td{background:#fff!important}.delivery-footer{background:#0b1120!important;color:#e5f0ff!important;border-radius:22px 22px 0 0!important;padding:18px!important}.delivery-footer span{color:#bfdbfe!important}.delivery-bottom-strip{background:linear-gradient(90deg,#2563eb,#06b6d4)!important;height:10px!important;border-radius:0 0 18px 18px!important}.facture-template{border:0!important;background:#fff!important;padding:34px 42px!important;color:#0f172a!important;box-shadow:none!important}.facture-side-bar{background:linear-gradient(180deg,#0b1120,#2563eb,#06b6d4)!important;width:14px!important}.facture-header{padding-top:4px}.facture-title-block h1{font-weight:950!important;color:#050816!important}.facture-title-block strong{background:#eff6ff;border:1px solid #dbeafe;border-radius:999px;padding:8px 14px;color:#1d4ed8}.facture-meta-row{border-bottom:1px solid #e5e7eb!important}.facture-parties>div{background:#f8fbff;border:1px solid #e5eefb;border-radius:20px;padding:18px}.facture-table th{background:#0b1120!important;color:#fff!important;border:0!important}.facture-table td{border-bottom:1px solid #e5e7eb!important}.facture-totals{background:#f8fbff;border:1px solid #dbeafe;border-radius:20px;padding:18px}.facture-totals .grand{background:#0b1120;color:#fff;border-radius:14px;padding:13px}.facture-dots{display:none!important}.devis-template .facture-side-bar{background:linear-gradient(180deg,#06b6d4,#2563eb)!important}.devis-template .facture-title-block strong{background:#ecfeff;color:#0e7490;border-color:#a5f3fc}
@media(max-width:900px){.cc-health-body{grid-template-columns:1fr}.cc-health-ring{width:220px!important;height:220px!important}.cc-health-center{width:156px!important;height:156px!important}.cc-health-center b{font-size:42px!important}.cc-health-metrics{grid-template-columns:1fr}.cc-recent-activity article{grid-template-columns:38px 1fr}.cc-recent-activity article em{grid-column:2}}

/* === Dashboard page-by-page polish: Home • Dashboard === */
.workspace-head {
  position: relative;
  overflow: visible;
  align-items: center !important;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--card) 96%, #fff 4%), color-mix(in srgb, var(--soft) 92%, #fff 8%));
  box-shadow: 0 18px 48px rgba(15,23,42,.07);
}
.workspace-head h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(22px, 2vw, 30px);
  color: var(--text);
}
.workspace-head h2 i {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 26px rgba(37,99,235,.24);
}
.workspace-head p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 55px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 10%, transparent);
  color: var(--secondary);
  font-weight: 900;
  font-size: 12px;
}
.workspace-actions { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.workspace-actions .icon-btn,
.period-trigger {
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
}
.period-menu { z-index: 45; right: 0; }

.profile-trigger.active,
.top-notification.active {
  border-color: rgba(37,99,235,.35) !important;
  background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(6,182,212,.08)) !important;
  box-shadow: 0 12px 30px rgba(37,99,235,.12) !important;
}
.top-notification { position: relative; }
.top-notification b {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  border: 2px solid var(--card);
  font-size: 10px;
  line-height: 1;
}
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15,23,42,.18);
  backdrop-filter: blur(3px);
}
.floating-panel {
  position: fixed;
  top: 86px;
  right: 24px;
  z-index: 75;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 108px);
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 26px;
  background: color-mix(in srgb, var(--card) 97%, white 3%);
  box-shadow: 0 26px 80px rgba(15,23,42,.22);
  display: grid;
}
.floating-head,
.floating-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.floating-foot { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.floating-head span {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.floating-head h3 { margin: 2px 0 2px; font-size: 21px; letter-spacing: -.03em; }
.floating-head p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.notification-summary {
  margin: 14px 16px 0;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(6,182,212,.06));
  border: 1px solid rgba(37,99,235,.12);
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
}
.notification-summary span { color: var(--muted); font-size: 12px; font-weight: 900; }
.notification-summary strong { color: var(--text); font-size: 18px; }
.notification-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  max-height: min(54vh, 500px);
  overflow: auto;
}
.clean-scroll { scrollbar-width: thin; }
.notification-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  color: var(--text);
}
.notification-row:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(15,23,42,.08); }
.notification-dot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #2563eb;
  background: #dbeafe;
}
.notification-row.danger .notification-dot,
.notification-row.high .notification-dot { color: #dc2626; background: #fee2e2; }
.notification-copy { min-width: 0; display: grid; gap: 3px; }
.notification-copy strong,
.notification-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-copy small { color: var(--muted); font-weight: 700; }
.notification-copy em { font-style: normal; color: #94a3b8; font-size: 11px; font-weight: 850; }
.notification-row b {
  padding: 7px 9px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--secondary);
  font-size: 11px;
  white-space: nowrap;
}
.profile-popover { width: min(390px, calc(100vw - 28px)); }
.profile-card-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,.18), transparent 35%),
    linear-gradient(135deg, #0f172a, #12313a);
  color: #fff;
}
.profile-card-head h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.profile-card-head p { margin: 3px 0 8px; color: rgba(255,255,255,.70); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card-head span { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #a7f3d0; font-size: 11px; font-weight: 950; }
.profile-card-head .icon-btn { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.profile-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.profile-mini-grid article { padding: 13px; border-radius: 17px; border: 1px solid var(--line); background: #f8fafc; }
.profile-mini-grid small { display: block; color: var(--muted); font-weight: 850; }
.profile-mini-grid strong { display: block; margin-top: 4px; color: var(--text); }
.profile-menu-clean { display: grid; gap: 9px; padding: 16px; }
.profile-menu-clean button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.profile-menu-clean button:hover { background: #f8fafc; transform: translateY(-1px); }
.profile-menu-clean i { grid-row: span 2; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #dbeafe; color: #2563eb; }
.profile-menu-clean span { font-weight: 950; }
.profile-menu-clean small { color: var(--muted); font-size: 12px; font-weight: 750; }
.profile-menu-clean .danger i { background: #fee2e2; color: #dc2626; }
.profile-menu-clean .danger span { color: #dc2626; }

.cc-health {
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(34,197,94,.16), transparent 36%),
    radial-gradient(circle at 100% 5%, rgba(37,99,235,.10), transparent 34%),
    #fff !important;
}
.cc-health-body {
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: center !important;
}
.cc-health-ring {
  width: clamp(190px, 18vw, 252px) !important;
  height: clamp(190px, 18vw, 252px) !important;
  box-shadow: inset 0 0 0 16px rgba(255,255,255,.72), 0 22px 52px rgba(34,197,94,.18) !important;
}
.cc-health-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.cc-health-metrics p {
  position: relative;
  min-width: 0;
  padding: 14px 14px 14px 46px !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg,#fff,#f8fafc) !important;
}
.cc-health-metrics p > i {
  position: absolute;
  left: 13px;
  top: 14px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
}
.cc-health-metrics strong {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: clamp(16px, 1.35vw, 21px) !important;
}
.cc-health-metrics p small { display: block; margin-top: 4px; color: #94a3b8; font-size: 11px; font-weight: 850; }
.cc-health-note {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 8px 12px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(240,253,244,.86);
}
.cc-health-note i { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; color: #16a34a; background: #dcfce7; }
.cc-health-note span { color: #166534; font-weight: 950; }
.cc-health-note small { color: #64748b; font-weight: 750; line-height: 1.35; }
.cc-recent-activity { overflow: hidden; }
.cc-recent-activity .premium-timeline,
.cc-activity-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}
.cc-recent-activity article,
.cc-activity-list article {
  width: 100%;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) max-content !important;
}
.cc-recent-activity article span,
.cc-activity-list article span { min-width: 0; overflow: hidden; }
.cc-recent-activity article strong,
.cc-recent-activity article small,
.cc-activity-list article strong,
.cc-activity-list article small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-recent-activity article em,
.cc-activity-list article em {
  white-space: nowrap;
  justify-self: end;
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 900px) {
  .workspace-head { align-items: stretch !important; }
  .workspace-head p { margin-left: 0; }
  .workspace-actions { justify-content: flex-start; }
  .floating-panel { top: 76px; right: 14px; left: 14px; width: auto; max-height: calc(100vh - 94px); }
  .notification-summary { grid-template-columns: 1fr auto; }
  .cc-health-body { grid-template-columns: 1fr !important; text-align: center; }
  .cc-health-metrics { grid-template-columns: 1fr !important; text-align: left; }
  .cc-recent-activity article,
  .cc-activity-list article { grid-template-columns: 38px minmax(0, 1fr) !important; }
  .cc-recent-activity article em,
  .cc-activity-list article em { grid-column: 2; justify-self: start; }
}

/* Dashboard v4: hide workspace header, keep original dashboard card style */
.control-center-dashboard {
  margin-top: 0 !important;
}
body:has(.control-center-dashboard) .workspace-head {
  display: none !important;
}
.cc-dashboard-actions {
  align-items: center !important;
  justify-content: flex-end;
  gap: 10px !important;
  flex-wrap: wrap;
}
.dashboard-period-select {
  position: relative;
  z-index: 25;
}
.dashboard-period-select .period-trigger {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 900;
}
.dashboard-period-select .period-menu {
  right: 0;
  left: auto;
  z-index: 60;
}
.dashboard-export-btn {
  border-color: rgba(239, 68, 68, .18) !important;
}
.nav-category.open > .category-main {
  background: rgba(37, 99, 235, .14);
}
.category-main .arrow {
  transition: transform .18s ease;
}
.nav-category.open .category-main .arrow {
  transform: rotate(0deg);
}
@media (max-width: 860px) {
  .cc-dashboard-actions {
    justify-content: stretch;
    display: grid !important;
    grid-template-columns: 1fr;
  }
  .cc-dashboard-actions .btn,
  .cc-dashboard-actions .period-trigger,
  .cc-dashboard-actions .period-select {
    width: 100%;
  }
}

/* === Client page v5 refinements === */
.client-project-head-v2 {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 34%),
    linear-gradient(135deg, var(--card), var(--soft));
  align-items: center;
}
.client-project-head-v2 .client-title-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 32px rgba(37,99,235,.22);
}
.client-project-head-v2 .module-crumb {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.client-project-head-v2 .client-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.client-context-panel-v2 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.client-context-panel-v2 > div {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid rgba(148,163,184,.18);
}
.client-context-panel-v2 span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.client-context-panel-v2 strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.client-filter-row-v2 {
  grid-template-columns: auto minmax(240px, 1fr) auto minmax(210px, auto);
}
.client-risk-select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.client-risk-select select {
  min-width: 170px;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}
.client-risk-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.client-risk-summary-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.client-risk-summary-card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -.04em;
}
.client-risk-summary-card span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.client-risk-summary-card.warning { border-color: rgba(245,158,11,.32); background: linear-gradient(135deg, rgba(255,251,235,.92), var(--card)); }
.client-risk-summary-card.danger { border-color: rgba(244,63,94,.28); background: linear-gradient(135deg, rgba(255,241,242,.92), var(--card)); }
.client-risk-summary-card.info { border-color: rgba(59,130,246,.28); background: linear-gradient(135deg, rgba(239,246,255,.92), var(--card)); }
.client-risk-section {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.client-risk-section h3 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: -.03em;
}
.client-risk-section .table-wrap,
.client-risk-section table {
  width: 100%;
}
.client-risk-section table {
  font-size: 13px;
}
.client-risk-section td,
.client-risk-section th {
  white-space: nowrap;
}
.client-risk-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.client-risk-card img,
.client-risk-card b {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #0f766e;
  background: #ccfbf1;
}
@media (max-width: 1050px) {
  .client-context-panel-v2,
  .client-risk-dashboard { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .client-filter-row-v2 { grid-template-columns: 1fr; }
  .client-risk-select select { width: 100%; }
}
@media (max-width: 680px) {
  .client-project-head-v2 { align-items: flex-start; }
  .client-project-head-v2 .client-head-actions { justify-content: flex-start; width: 100%; }
  .client-context-panel-v2,
  .client-risk-dashboard { grid-template-columns: 1fr; }
}

/* Stock page v6: client-head inspired but distinct */
.stock-studio-page-v2 {
  display: grid;
  gap: 16px;
}
.stock-project-head-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(6,182,212,.14), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,253,250,.88));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.stock-title-block {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.stock-title-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 16px 28px rgba(15,118,110,.22);
  flex: 0 0 auto;
}
.stock-title-block h2 {
  margin: 2px 0 5px;
  letter-spacing: -.04em;
  font-size: clamp(22px, 3vw, 32px);
}
.stock-title-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 760px;
}
.stock-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.stock-context-panel-v2 {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(160px, .7fr));
  gap: 10px;
}
.stock-context-panel-v2 > div {
  padding: 14px 16px;
  border: 1px solid rgba(15,118,110,.12);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.stock-context-panel-v2 span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}
.stock-context-panel-v2 strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
}
.stock-studio-page-v2 .stock-panel-head {
  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(148,163,184,.18);
  margin-bottom: 14px;
}
.stock-studio-page-v2 .stock-panel-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}
.stock-studio-page-v2 .stock-panel-head h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 0 0 5px rgba(15,118,110,.08);
}
.stock-studio-page-v2 .stock-widget {
  border-radius: 22px;
  border: 1px solid rgba(15,118,110,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  box-shadow: var(--shadow-soft);
}
.stock-studio-page-v2 .stock-category-grid {
  display: grid;
  gap: 10px;
}
.stock-studio-page-v2 .stock-category-card {
  text-align: left;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  padding: 13px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stock-studio-page-v2 .stock-category-card:hover,
.stock-studio-page-v2 .stock-category-card.active {
  transform: translateY(-2px);
  border-color: rgba(15,118,110,.32);
  box-shadow: 0 16px 34px rgba(15,23,42,.10);
}
.stock-studio-page-v2 .stock-category-card em {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15,118,110,.08);
  color: #0f766e;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.stock-studio-page-v2 .stock-watch-list.enhanced {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.stock-studio-page-v2 .stock-watch-item {
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 18px;
  background: #fff;
  padding: 13px;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
}
.stock-studio-page-v2 .stock-watch-top {
  align-items: flex-start;
}
.stock-qty-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  background: rgba(15,118,110,.10);
  color: #0f766e;
}
.stock-qty-pill.warning,
.stock-qty-pill.soon {
  background: rgba(245,158,11,.14);
  color: #92400e;
}
.stock-qty-pill.critical {
  background: rgba(239,68,68,.12);
  color: #b91c1c;
}
.stock-studio-page-v2 .stock-product-stats strong:first-child {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37,99,235,.09);
}
@media (max-width: 980px) {
  .stock-project-head-v2 { align-items: flex-start; flex-direction: column; }
  .stock-head-actions { justify-content: flex-start; width: 100%; }
  .stock-context-panel-v2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stock-context-panel-v2 { grid-template-columns: 1fr; }
  .stock-title-block { align-items: flex-start; }
}

/* v8 fournisseurs + documents premium */
.supplier-studio-page .supplier-kpi-grid,
.supplier-studio-page .supplier-dashboard-grid,
.supplier-studio-page .supplier-card-grid { align-items: stretch; }
.supplier-studio-page .supplier-kpi-grid article {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.supplier-studio-page .supplier-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.supplier-studio-page .supplier-widget {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.supplier-studio-page .supplier-widget .table-wrap,
.supplier-studio-page .supplier-widget table { width: 100%; }
.supplier-studio-page .supplier-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.supplier-card-v2 {
  min-height: 286px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}
.supplier-card-v2 .supplier-card-head {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.supplier-card-v2 .supplier-card-head h3,
.supplier-card-v2 .supplier-card-head p { overflow: hidden; text-overflow: ellipsis; }
.supplier-card-v2 .supplier-card-info {
  min-height: 72px;
  display: grid;
  gap: 8px;
}
.supplier-card-v2 .supplier-card-info span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-card-v2 .supplier-card-metrics {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.supplier-card-v2 .supplier-card-metrics div {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 18px;
}
.supplier-card-v2 .supplier-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}
.supplier-card-v2 .supplier-card-actions .btn { width: 100%; justify-content: center; }
@media (max-width: 1100px) {
  .supplier-studio-page .supplier-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .supplier-studio-page .supplier-dashboard-grid,
  .supplier-studio-page .supplier-card-grid { grid-template-columns: 1fr; }
  .supplier-card-v2 .supplier-card-actions { grid-template-columns: 1fr; }
}

.doc-preview.pro-invoice-template,
.doc-preview.pro-delivery-template {
  width: min(100%, 920px);
  margin: 0 auto;
}
.pro-invoice-template,
.pro-delivery-template {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
}
.facture-watermark,
.delivery-watermark {
  position: absolute;
  right: 34px;
  top: 140px;
  z-index: -1;
  color: rgba(37,99,235,.055);
  font-size: 118px;
  font-weight: 950;
  letter-spacing: -.08em;
  line-height: 1;
}
.pro-invoice-header,
.pro-delivery-header { align-items: flex-start; }
.invoice-company-meta {
  margin-top: 14px;
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
}
.pro-title-block small,
.delivery-title-block small {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pro-title-block em {
  display: inline-flex;
  margin-top: 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
}
.pro-meta-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 28px 0 18px !important;
}
.pro-meta-row span {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
  color: #0f172a;
}
.pro-meta-row b { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.pro-parties { gap: 16px !important; }
.pro-parties > div {
  min-height: 138px;
  border-radius: 22px !important;
  background: linear-gradient(180deg,#ffffff,#f8fbff) !important;
  border: 1px solid #dbeafe !important;
}
.pro-invoice-table { border-collapse: separate !important; border-spacing: 0 !important; overflow: hidden; border-radius: 18px; }
.pro-invoice-table th:first-child { border-radius: 16px 0 0 0; }
.pro-invoice-table th:last-child { border-radius: 0 16px 0 0; }
.pro-invoice-table td { padding: 13px 12px !important; }
.pro-invoice-bottom { grid-template-columns: 1fr 320px !important; }
.pro-total-box { box-shadow: 0 18px 45px rgba(37,99,235,.08); }
.pro-doc-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 11px;
}
.pro-quote-template .facture-side-bar { background: linear-gradient(180deg,#0f766e,#06b6d4,#2563eb) !important; }
.pro-quote-template .pro-title-block em { background: #f0fdfa; color: #0f766e; }
.pro-delivery-template { background: #fff !important; padding: 34px 42px 0 !important; }
.delivery-title-block { text-align: right; }
.delivery-title-block h1 { margin: 0; font-size: 38px !important; color: #0b1120 !important; letter-spacing: .05em !important; }
.delivery-title-block strong { display: inline-flex; margin-top: 10px; padding: 8px 14px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; }
.pro-company-line { display: flex !important; flex-wrap: wrap; gap: 12px 24px !important; margin: 18px 0 0 !important; color: #64748b !important; }
.pro-company-line span { display: inline-flex; }
.pro-delivery-grid { grid-template-columns: 1fr 1fr !important; gap: 18px !important; }
.pro-info-box h3,
.pro-dest-box h3 { margin: 0 0 12px; color: #0f172a; }
.pro-info-box table td:first-child { color: #64748b !important; font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.pro-info-box table td:last-child { text-align: right; color: #0f172a !important; font-weight: 800; }
.pro-doc-note { margin: 12px 0 16px !important; padding: 16px 18px; border-radius: 18px; background: #f8fbff; border: 1px solid #dbeafe; color: #475569 !important; }
.pro-delivery-table { border-collapse: separate !important; border-spacing: 0 !important; border-radius: 18px; overflow: hidden; }
.pro-delivery-table th { background: #0b1120 !important; color: #fff !important; border: 0 !important; }
.pro-delivery-table td { padding: 13px 12px !important; border-bottom: 1px solid #e5e7eb !important; }
.pro-signs { display: grid !important; grid-template-columns: 1fr 1fr; gap: 18px; margin: 28px 0 !important; }
.pro-signs div { min-height: 78px; border: 1px dashed #94a3b8; border-radius: 18px; padding: 14px; background: #fff; }
.pro-signs strong { color: #0f172a; }
.pro-delivery-footer { margin: 16px -42px 0; border-radius: 24px 24px 0 0 !important; }
@media print {
  .doc-preview.pro-invoice-template,
  .doc-preview.pro-delivery-template { width: 100%; }
  .pro-invoice-template,
  .pro-delivery-template { border-radius: 0 !important; }
}

/* v9 fixes: dashboard finance card, period dropdown layering, simple A4 document previews */
.control-center-dashboard,
.control-center-dashboard .cc-hero,
.control-center-dashboard .cc-dashboard-actions,
.dashboard-period-select { overflow: visible !important; position: relative; }
.control-center-dashboard .cc-hero { z-index: 60 !important; }
.dashboard-period-select { z-index: 5000 !important; }
.dashboard-period-select .period-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 99999 !important;
  min-width: 245px !important;
  background: #fff !important;
  border: 1px solid #dbe3ef !important;
  box-shadow: 0 28px 80px rgba(15,23,42,.25) !important;
}
.control-center-dashboard .cc-kpi-grid,
.control-center-dashboard .cc-main-grid,
.control-center-dashboard .cc-lower-grid,
.control-center-dashboard .cc-panel { position: relative; z-index: 1; }
.cc-health-polished { border: 1px solid rgba(37,99,235,.10) !important; }
.cc-finance-head-clean { align-items: center !important; gap: 14px !important; }
.cc-finance-head-clean div { min-width: 0; }
.cc-finance-head-clean span { color: #2563eb !important; font-size: 12px !important; letter-spacing: .06em !important; text-transform: uppercase !important; }
.cc-finance-head-clean h3 { margin: 2px 0 0 !important; font-size: clamp(20px,2.2vw,28px) !important; color: #0b1120 !important; line-height: 1.05 !important; }
.cc-finance-head-clean small { display: inline-flex; margin-top: 7px; padding: 5px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-weight: 850; font-size: 11px; }
.cc-finance-head-clean button { white-space: nowrap; border-radius: 999px !important; background: #0b1120 !important; color: #fff !important; border: 0 !important; padding: 10px 13px !important; }
.cc-health-polished .cc-health-ring { background: conic-gradient(#2563eb var(--score), #e5e7eb 0) !important; box-shadow: inset 0 0 0 16px #fff, 0 18px 45px rgba(37,99,235,.15) !important; }
.cc-health-polished .cc-health-center small { color: #2563eb !important; }
.cc-health-polished .cc-health-note { background: #f8fafc !important; border-color: #e2e8f0 !important; }
.cc-health-polished .cc-health-note span { color: #0b1120 !important; }
.cc-health-polished .cc-health-note i { background: #dbeafe !important; color: #2563eb !important; }

@media (max-width: 760px){
  .dashboard-period-select .period-menu{right:auto!important;left:0!important;min-width:min(92vw,270px)!important;}
  .cc-finance-head-clean{align-items:flex-start!important;}
}

/* Simple print-preview style inside modal: same spirit as A4, no heavy decoration */
.doc-preview.facture-template,
.doc-preview.delivery-template { background: #fff !important; border: 1px solid #e5e7eb !important; box-shadow: none !important; padding: 24px !important; color: #111827 !important; }
.doc-preview .facture-watermark,
.doc-preview .delivery-watermark,
.doc-preview .facture-side-bar,
.doc-preview .delivery-bottom-strip,
.doc-preview .facture-dots { display: none !important; }
.doc-preview .facture-header,
.doc-preview .delivery-header { border-bottom: 2px solid #111827 !important; padding-bottom: 12px !important; margin-bottom: 14px !important; }
.doc-preview .facture-title-block h1,
.doc-preview .delivery-title-block h1 { font-size: clamp(30px,4vw,44px) !important; color: #111827 !important; }
.doc-preview .facture-parties > div,
.doc-preview .delivery-box,
.doc-preview .delivery-dest,
.doc-preview .delivery-info,
.doc-preview .facture-payment,
.doc-preview .facture-totals { background: #fff !important; border: 1px solid #e5e7eb !important; border-radius: 12px !important; box-shadow: none !important; }
.doc-preview .facture-table th,
.doc-preview .delivery-table th { background: #111827 !important; color: #fff !important; border: 0 !important; }
.doc-preview .facture-totals .grand { background: transparent !important; color: #111827 !important; border-top: 1px solid #d1d5db !important; border-radius: 0 !important; padding-top: 10px !important; }

/* v10: final dropdown layering + cleaner dashboard finance card */
.repair-hero-panel,
.repair-hero-panel .repair-hero-actions,
.repair-period-dropdown,
.period-select,
.cc-dashboard-actions,
.dashboard-period-select {
  overflow: visible !important;
}
.repair-hero-panel {
  position: relative !important;
  z-index: 1200 !important;
}
.repair-list-panel,
.repair-insights-panel,
.stock-products-section,
.stock-performance-card,
.cc-kpi-grid,
.cc-main-grid,
.cc-lower-grid {
  position: relative !important;
  z-index: 1 !important;
}
.repair-period-dropdown,
.dashboard-period-select,
.period-select:has(.period-menu) {
  position: relative !important;
  z-index: 1300 !important;
}
.repair-period-dropdown .period-menu,
.dashboard-period-select .period-menu,
.period-select .period-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 999999 !important;
  min-width: 260px !important;
  max-height: min(430px, 70vh) !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .28) !important;
  padding: 8px !important;
  transform: translateZ(0) !important;
}
.repair-period-dropdown .period-trigger,
.dashboard-period-select .period-trigger {
  position: relative !important;
  z-index: 1000000 !important;
}
.repair-period-dropdown .period-menu button,
.dashboard-period-select .period-menu button,
.period-select .period-menu button {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  font-weight: 850 !important;
  color: #0f172a !important;
}
.repair-period-dropdown .period-menu button:hover,
.dashboard-period-select .period-menu button:hover,
.period-select .period-menu button:hover {
  background: #eff6ff !important;
  color: #2563eb !important;
}
.cc-health-v10 {
  overflow: hidden !important;
  background:
    radial-gradient(circle at 0 0, rgba(37,99,235,.12), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #dbeafe !important;
}
.cc-health-v10 .cc-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 18px !important;
}
.cc-health-v10 .cc-panel-head h3 {
  font-size: clamp(20px, 2vw, 26px) !important;
  line-height: 1.05 !important;
  max-width: 100% !important;
}
.cc-health-v10 .cc-panel-head small {
  width: fit-content !important;
  max-width: 100% !important;
}
.cc-health-v10 .cc-health-body {
  display: grid !important;
  grid-template-columns: minmax(210px, 245px) minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: center !important;
}
.cc-health-v10 .cc-health-ring {
  width: clamp(190px, 18vw, 232px) !important;
  height: clamp(190px, 18vw, 232px) !important;
  margin: 0 auto !important;
  box-shadow: inset 0 0 0 15px #fff, 0 18px 45px rgba(37,99,235,.14) !important;
}
.cc-health-v10 .cc-health-center {
  width: 158px !important;
  height: 158px !important;
  border-radius: 50% !important;
  padding: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(15,23,42,.08) !important;
}
.cc-health-v10 .cc-health-center b { font-size: 44px !important; }
.cc-health-v10 .cc-health-center em { line-height: 1.35 !important; }
.cc-health-v10 .cc-health-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  min-width: 0 !important;
}
.cc-health-v10 .cc-health-metrics p {
  min-width: 0 !important;
  min-height: 94px !important;
  margin: 0 !important;
  padding: 14px 14px 14px 48px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.04) !important;
}
.cc-health-v10 .cc-health-metrics strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(16px, 1.25vw, 20px) !important;
}
.cc-health-v10 .cc-health-note {
  grid-column: 1 / -1 !important;
  border-color: #dbeafe !important;
  background: #eff6ff !important;
}
.cc-health-v10 .cc-health-note i {
  color: #2563eb !important;
  background: #dbeafe !important;
}
.cc-health-v10 .cc-health-note span { color: #0f172a !important; }
@media (max-width: 980px) {
  .cc-health-v10 .cc-health-body { grid-template-columns: 1fr !important; }
  .cc-health-v10 .cc-health-ring { margin: 0 auto !important; }
}
@media (max-width: 640px) {
  .repair-period-dropdown .period-menu,
  .dashboard-period-select .period-menu,
  .period-select .period-menu {
    left: 0 !important;
    right: auto !important;
    min-width: min(92vw, 280px) !important;
  }
  .cc-health-v10 .cc-health-metrics { grid-template-columns: 1fr !important; }
  .cc-health-v10 .cc-panel-head { display: grid !important; }
}

/* v11: dashboard finance card focused UX + dropdown above every card */
.control-center-dashboard,
.control-center-dashboard .cc-hero,
.control-center-dashboard .cc-dashboard-actions,
.dashboard-period-select,
.period-select,
.repair-period-dropdown,
.repair-hero-panel,
.repair-hero-actions {
  overflow: visible !important;
}
.control-center-dashboard .cc-hero,
.repair-hero-panel {
  position: relative !important;
  z-index: 20000 !important;
  isolation: isolate !important;
}
.dashboard-period-select,
.repair-period-dropdown,
.period-select:has(.period-menu) {
  position: relative !important;
  z-index: 30000 !important;
  isolation: isolate !important;
}
.dashboard-period-select .period-menu,
.repair-period-dropdown .period-menu,
.period-select .period-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 9999999 !important;
  min-width: 260px !important;
  max-height: min(430px, 72vh) !important;
  overflow-y: auto !important;
  background: #fff !important;
  border: 1px solid #dbeafe !important;
  border-radius: 18px !important;
  box-shadow: 0 34px 96px rgba(15,23,42,.32) !important;
  padding: 8px !important;
  transform: translate3d(0,0,0) !important;
}
.control-center-dashboard .cc-kpi-grid,
.control-center-dashboard .cc-main-grid,
.control-center-dashboard .cc-lower-grid,
.control-center-dashboard .cc-panel,
.repair-list-panel,
.repair-insights-panel {
  position: relative !important;
  z-index: 1 !important;
}
.cc-health-stack {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #dbeafe !important;
  overflow: hidden !important;
}
.cc-health-stack .cc-panel-head {
  align-items: center !important;
  border-bottom: 1px solid #edf2f7 !important;
  padding-bottom: 14px !important;
}
.cc-health-stack .cc-panel-head h3 {
  font-size: clamp(22px, 2.3vw, 30px) !important;
  line-height: 1.05 !important;
  color: #0f172a !important;
}
.cc-health-stack .cc-panel-head small {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fed7aa !important;
}
.cc-health-stack .cc-health-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: center !important;
}
.cc-health-stack .cc-health-ring {
  width: clamp(205px, 22vw, 245px) !important;
  height: clamp(205px, 22vw, 245px) !important;
  margin: 4px auto 0 !important;
  background: conic-gradient(#2563eb var(--score), #e5e7eb 0) !important;
  box-shadow: inset 0 0 0 16px #fff, 0 18px 45px rgba(37,99,235,.16) !important;
}
.cc-health-stack .cc-health-center {
  width: 162px !important;
  height: 162px !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.08) !important;
}
.cc-health-stack .cc-health-center b {
  font-size: 46px !important;
  color: #0f172a !important;
}
.cc-health-stack .cc-health-center small {
  color: #2563eb !important;
  font-weight: 900 !important;
}
.cc-health-stack .cc-health-center em {
  color: #64748b !important;
  line-height: 1.35 !important;
}
.cc-health-stack .cc-health-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}
.cc-health-stack .cc-health-metrics p {
  position: relative !important;
  min-height: 104px !important;
  margin: 0 !important;
  padding: 15px 14px 14px 50px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.045) !important;
}
.cc-health-stack .cc-health-metrics p i {
  position: absolute !important;
  left: 14px !important;
  top: 16px !important;
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
}
.cc-health-stack .cc-health-metrics span {
  display: block !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
}
.cc-health-stack .cc-health-metrics strong {
  display: block !important;
  margin-top: 7px !important;
  font-size: clamp(18px, 1.5vw, 23px) !important;
  color: #0f172a !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.cc-health-stack .cc-health-metrics small {
  display: block !important;
  margin-top: 5px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}
@media (max-width: 720px) {
  .cc-health-stack .cc-health-metrics { grid-template-columns: 1fr !important; }
  .dashboard-period-select .period-menu,
  .repair-period-dropdown .period-menu,
  .period-select .period-menu { left: 0 !important; right: auto !important; min-width: min(92vw, 280px) !important; }
}

/* v11: modal previews use the same simple A4 proportions as the printed PDF */
.doc-preview.facture-template,
.doc-preview.delivery-template {
  width: min(100%, 210mm) !important;
  min-height: 297mm !important;
  margin: 0 auto !important;
  padding: 14mm 13mm 12mm !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
}
.doc-preview .facture-bottom { margin-top: auto !important; }
.doc-preview .delivery-signs { margin-top: auto !important; padding-top: 20mm !important; }

/* v12: Commercial > Factures premium status and period panels */
.commercial-analysis-grid{
  align-items: stretch !important;
  gap: 18px !important;
}
.invoice-status-card,
.pro-period-card{
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  background: linear-gradient(145deg,#ffffff 0%,#f8fbff 55%,#eef6ff 100%) !important;
  box-shadow: 0 22px 55px rgba(15,23,42,.08) !important;
}
.invoice-status-card:before,
.pro-period-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background: linear-gradient(90deg,#2563eb,#06b6d4,#14b8a6);
}
.invoice-status-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin-bottom:14px !important;
}
.invoice-status-head span,
.period-card-top small{
  display:block !important;
  color:#64748b !important;
  font-weight:900 !important;
  font-size:12px !important;
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
}
.invoice-status-head h3,
.period-card-top h3{
  margin:4px 0 0 !important;
  color:#0f172a !important;
  font-size:21px !important;
  font-weight:950 !important;
}
.invoice-status-head > strong{
  white-space:nowrap !important;
  border-radius:16px !important;
  padding:10px 13px !important;
  color:#1d4ed8 !important;
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  font-size:14px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8) !important;
}
.invoice-status-summary{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:12px 14px !important;
  margin-bottom:14px !important;
  border-radius:18px !important;
  background:#0f172a !important;
  color:#fff !important;
}
.invoice-status-summary span{color:#cbd5e1 !important;font-weight:850 !important;}
.invoice-status-summary b{margin-left:auto !important;font-size:23px !important;line-height:1 !important;}
.invoice-status-summary small{color:#94a3b8 !important;font-weight:800 !important;}
.invoice-status-list{
  display:grid !important;
  gap:10px !important;
}
.invoice-status-row{
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) auto auto !important;
  align-items:center !important;
  gap:12px !important;
  min-height:66px !important;
  padding:11px 12px !important;
  border:1px solid #e2e8f0 !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.88) !important;
}
.invoice-status-icon{
  width:42px !important;height:42px !important;border-radius:15px !important;
  display:grid !important;place-items:center !important;
  background:#eff6ff !important;color:#2563eb !important;
}
.invoice-status-row.paid .invoice-status-icon{background:#ecfdf5 !important;color:#16a34a !important;}
.invoice-status-row.partial .invoice-status-icon{background:#fefce8 !important;color:#ca8a04 !important;}
.invoice-status-row.unpaid .invoice-status-icon{background:#fff7ed !important;color:#ea580c !important;}
.invoice-status-row.late .invoice-status-icon{background:#fef2f2 !important;color:#dc2626 !important;}
.invoice-status-main{min-width:0 !important;}
.invoice-status-main strong{display:block !important;color:#0f172a !important;font-weight:950 !important;}
.invoice-status-main small{display:block !important;margin-top:2px !important;color:#64748b !important;font-weight:750 !important;}
.invoice-status-main i{
  display:block !important;
  height:6px !important;
  margin-top:8px !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,#2563eb,#06b6d4) !important;
}
.invoice-status-row.paid .invoice-status-main i{background:linear-gradient(90deg,#16a34a,#14b8a6) !important;}
.invoice-status-row.partial .invoice-status-main i{background:linear-gradient(90deg,#eab308,#f59e0b) !important;}
.invoice-status-row.unpaid .invoice-status-main i{background:linear-gradient(90deg,#f97316,#f59e0b) !important;}
.invoice-status-row.late .invoice-status-main i{background:linear-gradient(90deg,#dc2626,#fb7185) !important;}
.invoice-status-row > b{
  font-size:22px !important;
  color:#0f172a !important;
  font-weight:950 !important;
}
.invoice-status-row > em{
  min-width:92px !important;
  text-align:right !important;
  color:#475569 !important;
  font-style:normal !important;
  font-weight:900 !important;
  font-size:12px !important;
}
.period-card-top{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  margin-bottom:16px !important;
}
.period-card-top > span{
  width:48px !important;height:48px !important;border-radius:18px !important;
  display:grid !important;place-items:center !important;
  background:#0f172a !important;color:#fff !important;
  box-shadow:0 14px 24px rgba(15,23,42,.18) !important;
}
.period-card-metrics{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  margin:12px 0 !important;
}
.period-card-metrics p{
  margin:0 !important;
  padding:12px !important;
  border-radius:16px !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
}
.period-card-metrics strong{display:block !important;color:#0f172a !important;font-weight:950 !important;font-size:18px !important;}
.period-card-metrics small{display:block !important;margin-top:3px !important;color:#64748b !important;font-weight:750 !important;}
.pro-period-card > p{
  margin:10px 0 14px !important;
  color:#475569 !important;
  font-weight:750 !important;
  line-height:1.5 !important;
}
.pro-period-card .btn{
  width:100% !important;
  justify-content:center !important;
  border-radius:16px !important;
  background:#fff !important;
  border:1px solid #dbeafe !important;
  color:#1d4ed8 !important;
  font-weight:900 !important;
}
@media (max-width: 760px){
  .invoice-status-head{flex-direction:column !important;}
  .invoice-status-row{grid-template-columns:38px minmax(0,1fr) auto !important;}
  .invoice-status-row > em{grid-column:2 / -1 !important;text-align:left !important;}
  .period-card-metrics{grid-template-columns:1fr !important;}
}

/* v13: Commercial > Paiements and Bons de commande refined cards */
.payment-focus-grid,
.commercial-order-grid{
  align-items:stretch !important;
  gap:18px !important;
}
.payment-received-card,
.payment-debtors-card,
.order-reception-card{
  position:relative !important;
  overflow:hidden !important;
  border:1px solid rgba(148,163,184,.22) !important;
  background:linear-gradient(145deg,#fff 0%,#f8fbff 55%,#eef6ff 100%) !important;
  box-shadow:0 22px 55px rgba(15,23,42,.08) !important;
}
.payment-received-card:before,
.order-reception-card:before{
  content:"";position:absolute;inset:0 0 auto 0;height:4px;
  background:linear-gradient(90deg,#16a34a,#14b8a6,#2563eb);
}
.payment-card-head,
.order-reception-head{
  display:flex !important;align-items:center !important;gap:13px !important;margin-bottom:15px !important;
}
.payment-card-head > span,
.order-reception-head > span{
  width:50px !important;height:50px !important;border-radius:18px !important;display:grid !important;place-items:center !important;
  color:#fff !important;background:linear-gradient(135deg,#16a34a,#14b8a6) !important;box-shadow:0 15px 28px rgba(20,184,166,.25) !important;
}
.payment-card-head small,
.order-reception-head small{
  display:block !important;color:#64748b !important;font-weight:950 !important;text-transform:uppercase !important;letter-spacing:.08em !important;font-size:11px !important;
}
.payment-card-head h3,
.order-reception-head h3{
  margin:3px 0 0 !important;color:#0f172a !important;font-size:25px !important;font-weight:950 !important;line-height:1 !important;
}
.payment-card-head > b,
.order-reception-head > b{
  margin-left:auto !important;white-space:nowrap !important;padding:9px 12px !important;border-radius:999px !important;
  background:#ecfdf5 !important;color:#047857 !important;border:1px solid #bbf7d0 !important;font-size:12px !important;font-weight:950 !important;
}
.payment-health-strip,
.order-reception-kpis{
  display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important;margin:13px 0 !important;
}
.payment-health-strip p,
.order-reception-kpis p{
  margin:0 !important;padding:12px !important;border-radius:16px !important;background:#fff !important;border:1px solid #e2e8f0 !important;
}
.payment-health-strip strong,
.order-reception-kpis strong{display:block !important;color:#0f172a !important;font-size:18px !important;font-weight:950 !important;line-height:1.1 !important;}
.payment-health-strip small,
.order-reception-kpis small{display:block !important;margin-top:4px !important;color:#64748b !important;font-size:11px !important;font-weight:850 !important;}
.payment-method-bars{display:grid !important;gap:9px !important;margin-top:12px !important;}
.payment-method-bars > div{display:grid !important;grid-template-columns:80px minmax(0,1fr) 92px !important;align-items:center !important;gap:10px !important;font-size:12px !important;font-weight:850 !important;color:#475569 !important;}
.payment-method-bars i{height:8px !important;border-radius:999px !important;background:#e2e8f0 !important;overflow:hidden !important;display:block !important;}
.payment-method-bars em{display:block !important;height:100% !important;border-radius:999px !important;background:linear-gradient(90deg,#16a34a,#06b6d4) !important;}
.payment-method-bars strong{text-align:right !important;color:#0f172a !important;font-weight:950 !important;}
.payment-recent-list{display:grid !important;gap:9px !important;margin-top:14px !important;}
.payment-recent-list button,
.debtor-row{
  width:100% !important;border:1px solid #e2e8f0 !important;background:rgba(255,255,255,.9) !important;border-radius:16px !important;
  padding:11px 12px !important;display:flex !important;align-items:center !important;justify-content:space-between !important;gap:12px !important;text-align:left !important;
}
.payment-recent-list button span,
.debtor-row span{min-width:0 !important;display:block !important;}
.payment-recent-list i{width:34px !important;height:34px !important;border-radius:12px !important;background:#eff6ff !important;color:#2563eb !important;display:inline-grid !important;place-items:center !important;margin-right:9px !important;vertical-align:middle !important;}
.payment-recent-list b,
.debtor-row strong{display:block !important;color:#0f172a !important;font-weight:950 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.payment-recent-list small,
.debtor-row small{display:block !important;color:#64748b !important;font-weight:750 !important;margin-top:2px !important;}
.payment-recent-list button > strong,
.debtor-row > b{white-space:nowrap !important;color:#0f172a !important;font-weight:950 !important;}
.order-reception-progress{height:12px !important;border-radius:999px !important;background:#e2e8f0 !important;overflow:hidden !important;margin:12px 0 !important;}
.order-reception-progress i{display:block !important;height:100% !important;border-radius:999px !important;background:linear-gradient(90deg,#2563eb,#06b6d4,#16a34a) !important;}
.order-reception-flow{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important;margin:14px 0 !important;}
.order-reception-flow span{border:1px solid #e2e8f0 !important;background:#fff !important;border-radius:14px !important;padding:10px !important;text-align:center !important;color:#64748b !important;font-weight:900 !important;font-size:12px !important;}
.order-reception-flow span.done{background:#ecfdf5 !important;color:#047857 !important;border-color:#bbf7d0 !important;}
.order-reception-flow span.active{background:#eff6ff !important;color:#1d4ed8 !important;border-color:#bfdbfe !important;}
.order-reception-card .muted{line-height:1.5 !important;font-weight:750 !important;}
@media (max-width: 760px){
  .payment-health-strip,.order-reception-kpis,.order-reception-flow{grid-template-columns:1fr !important;}
  .payment-method-bars > div{grid-template-columns:72px minmax(0,1fr) !important;}
  .payment-method-bars strong{grid-column:2 !important;text-align:left !important;}
  .payment-card-head,.order-reception-head{align-items:flex-start !important;}
  .payment-card-head > b,.order-reception-head > b{margin-left:0 !important;}
}

/* v14: Commercial > Paiements - Clients à relancer premium card */
.premium-debtors-card{
  background:linear-gradient(145deg,#ffffff 0%,#f8fbff 52%,#eef6ff 100%) !important;
  border:1px solid rgba(37,99,235,.14) !important;
  box-shadow:0 24px 60px rgba(15,23,42,.08) !important;
}
.premium-debtors-card:before{
  content:"" !important;
  position:absolute !important;
  inset:0 0 auto 0 !important;
  height:4px !important;
  background:linear-gradient(90deg,#f59e0b,#ef4444,#2563eb) !important;
}
.debtor-head-pro{
  display:flex !important;
  align-items:center !important;
  gap:13px !important;
  margin-bottom:14px !important;
}
.debtor-head-pro > span{
  width:50px !important;
  height:50px !important;
  border-radius:18px !important;
  display:grid !important;
  place-items:center !important;
  color:#fff !important;
  background:linear-gradient(135deg,#f97316,#ef4444) !important;
  box-shadow:0 16px 28px rgba(239,68,68,.22) !important;
  flex:0 0 auto !important;
}
.debtor-head-pro small{
  display:block !important;
  color:#64748b !important;
  font-weight:950 !important;
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
  font-size:11px !important;
}
.debtor-head-pro h3{
  margin:3px 0 0 !important;
  color:#0f172a !important;
  font-size:22px !important;
  font-weight:950 !important;
  letter-spacing:-.03em !important;
}
.debtor-head-pro > b{
  margin-left:auto !important;
  white-space:nowrap !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  background:#fff7ed !important;
  color:#c2410c !important;
  border:1px solid #fed7aa !important;
  font-size:12px !important;
  font-weight:950 !important;
}
.debtor-summary-pro{
  display:grid !important;
  grid-template-columns:1.2fr .8fr !important;
  gap:10px !important;
  margin-bottom:12px !important;
}
.debtor-summary-pro p{
  margin:0 !important;
  padding:13px !important;
  border-radius:18px !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
}
.debtor-summary-pro strong{
  display:block !important;
  color:#0f172a !important;
  font-weight:950 !important;
  font-size:20px !important;
  line-height:1.1 !important;
}
.debtor-summary-pro small{
  display:block !important;
  margin-top:4px !important;
  color:#64748b !important;
  font-weight:850 !important;
  font-size:11px !important;
}
.debtor-priority-list{
  display:grid !important;
  gap:9px !important;
  max-height:320px !important;
  overflow:auto !important;
  padding-right:2px !important;
}
.debtor-item-pro{
  width:100% !important;
  border:1px solid #e2e8f0 !important;
  background:rgba(255,255,255,.94) !important;
  border-radius:18px !important;
  padding:11px !important;
  display:grid !important;
  grid-template-columns:44px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:11px !important;
  text-align:left !important;
  cursor:pointer !important;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease !important;
}
.debtor-item-pro:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 16px 32px rgba(15,23,42,.08) !important;
  border-color:#bfdbfe !important;
}
.debtor-item-pro.critical{border-left:4px solid #ef4444 !important;}
.debtor-item-pro.warning{border-left:4px solid #f59e0b !important;}
.debtor-item-pro.soft{border-left:4px solid #2563eb !important;}
.debtor-avatar{
  width:42px !important;
  height:42px !important;
  border-radius:15px !important;
  overflow:hidden !important;
  display:grid !important;
  place-items:center !important;
  background:linear-gradient(135deg,#eff6ff,#dbeafe) !important;
  border:1px solid #dbeafe !important;
  color:#1d4ed8 !important;
  font-weight:950 !important;
}
.debtor-avatar img{width:100% !important;height:100% !important;object-fit:cover !important;}
.debtor-info{min-width:0 !important;display:block !important;}
.debtor-info strong{
  display:block !important;
  color:#0f172a !important;
  font-weight:950 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.debtor-info small,
.debtor-info em{
  display:block !important;
  font-style:normal !important;
  color:#64748b !important;
  font-size:11px !important;
  font-weight:800 !important;
  margin-top:2px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.debtor-amount{text-align:right !important;white-space:nowrap !important;}
.debtor-amount b{display:block !important;color:#0f172a !important;font-weight:950 !important;}
.debtor-amount small{
  display:inline-block !important;
  margin-top:4px !important;
  padding:4px 8px !important;
  border-radius:999px !important;
  background:#f8fafc !important;
  color:#64748b !important;
  border:1px solid #e2e8f0 !important;
  font-size:10px !important;
  font-weight:950 !important;
}
.debtor-item-pro.critical .debtor-amount small{background:#fef2f2 !important;color:#b91c1c !important;border-color:#fecaca !important;}
.debtor-item-pro.warning .debtor-amount small{background:#fffbeb !important;color:#b45309 !important;border-color:#fde68a !important;}
.debtor-action-footer{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-top:13px !important;
  padding-top:12px !important;
  border-top:1px solid #e2e8f0 !important;
}
.debtor-action-footer span{
  color:#64748b !important;
  font-weight:800 !important;
  font-size:12px !important;
  line-height:1.4 !important;
}
@media (max-width:760px){
  .debtor-head-pro{align-items:flex-start !important;}
  .debtor-head-pro > b{margin-left:0 !important;}
  .debtor-summary-pro{grid-template-columns:1fr !important;}
  .debtor-item-pro{grid-template-columns:40px minmax(0,1fr) !important;}
  .debtor-amount{grid-column:2 !important;text-align:left !important;}
  .debtor-action-footer{flex-direction:column !important;align-items:stretch !important;}
}

/* v15 - Dashboard recent activity: full-card content, no wasted empty area */
.cc-main-grid{
  align-items: stretch !important;
}
.cc-panel.cc-recent-activity{
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
}
.cc-panel.cc-recent-activity .cc-panel-head{
  flex: 0 0 auto !important;
}
.cc-panel.cc-recent-activity .premium-timeline,
.cc-panel.cc-recent-activity .cc-activity-list{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  padding: 2px 4px 2px 0 !important;
  display: grid !important;
  gap: 10px !important;
  align-content: start !important;
}
.cc-panel.cc-recent-activity .cc-activity-list:empty{
  min-height: 260px !important;
}
.cc-panel.cc-recent-activity article,
.cc-panel.cc-recent-activity .cc-activity-list article{
  width: 100% !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0,1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 72px !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(226,232,240,.95) !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(15,23,42,.045) !important;
  overflow: hidden !important;
}
.cc-panel.cc-recent-activity article > svg,
.cc-panel.cc-recent-activity article > i{
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 15px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  color: #2563eb !important;
  background: linear-gradient(135deg,#dbeafe,#ecfeff) !important;
  border: 1px solid rgba(37,99,235,.12) !important;
}
.cc-panel.cc-recent-activity article span{
  min-width: 0 !important;
  width: 100% !important;
  display: block !important;
  overflow: visible !important;
}
.cc-panel.cc-recent-activity article strong{
  display: block !important;
  color: #0b1120 !important;
  font-weight: 950 !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.cc-panel.cc-recent-activity article small{
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  color: #64748b !important;
  font-weight: 750 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 3px !important;
}
.cc-panel.cc-recent-activity article em{
  align-self: start !important;
  justify-self: end !important;
  white-space: nowrap !important;
  color: #0f766e !important;
  background: #ecfdf5 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 999px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 900 !important;
}
.cc-panel.cc-recent-activity .empty-state,
.cc-panel.cc-recent-activity .pretty-empty{
  min-height: 240px !important;
  display: grid !important;
  place-items: center !important;
}

@media (max-width: 900px){
  .cc-panel.cc-recent-activity article,
  .cc-panel.cc-recent-activity .cc-activity-list article{
    grid-template-columns: 40px minmax(0,1fr) !important;
    min-height: auto !important;
  }
  .cc-panel.cc-recent-activity article em{
    grid-column: 2 !important;
    justify-self: start !important;
    align-self: auto !important;
    margin-top: 4px !important;
  }
}

/* v16 - Fix Dashboard recent activity blank white area */
.cc-main-grid{
  align-items: start !important;
}
.cc-panel.cc-recent-activity{
  min-height: 0 !important;
  height: auto !important;
  align-self: start !important;
}
.cc-panel.cc-recent-activity .premium-timeline,
.cc-panel.cc-recent-activity .cc-activity-list{
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 430px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 8px 2px 0 !important;
  align-content: start !important;
}
.cc-panel.cc-recent-activity article,
.cc-panel.cc-recent-activity .cc-activity-list article{
  min-height: 64px !important;
  padding: 11px 13px !important;
  margin: 0 !important;
}
.cc-panel.cc-recent-activity article:last-child,
.cc-panel.cc-recent-activity .cc-activity-list article:last-child{
  margin-bottom: 0 !important;
}
.cc-panel.cc-recent-activity .cc-activity-list::-webkit-scrollbar{
  width: 8px;
}
.cc-panel.cc-recent-activity .cc-activity-list::-webkit-scrollbar-track{
  background: transparent;
}
.cc-panel.cc-recent-activity .cc-activity-list::-webkit-scrollbar-thumb{
  background: #cbd5e1;
  border-radius: 999px;
}
@media (max-width: 900px){
  .cc-panel.cc-recent-activity .premium-timeline,
  .cc-panel.cc-recent-activity .cc-activity-list{
    max-height: 360px !important;
  }
}

/* v17 - Dashboard recent activity: same height as finance card + useful content filler */
.cc-main-grid{
  align-items: stretch !important;
}
.cc-panel.cc-recent-activity{
  height: 100% !important;
  min-height: 100% !important;
  align-self: stretch !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.cc-panel.cc-recent-activity .premium-timeline,
.cc-panel.cc-recent-activity .cc-activity-list{
  flex: 1 1 0 !important;
  min-height: 310px !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 8px 8px 0 !important;
  align-content: start !important;
}
.cc-panel.cc-recent-activity article,
.cc-panel.cc-recent-activity .cc-activity-list article{
  min-height: 66px !important;
}
.cc-activity-fill{
  flex: 0 0 auto !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid #e2e8f0 !important;
}
.cc-activity-fill-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin-bottom:10px !important;
}
.cc-activity-fill-head span{
  color:#64748b !important;
  font-weight:900 !important;
  font-size:12px !important;
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
}
.cc-activity-fill-head b{
  color:#0f766e !important;
  background:#ecfdf5 !important;
  border:1px solid #bbf7d0 !important;
  border-radius:999px !important;
  padding:6px 10px !important;
  font-size:12px !important;
}
.cc-activity-mini-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
}
.cc-activity-mini-grid article{
  display:grid !important;
  grid-template-columns:34px minmax(0,1fr) !important;
  grid-template-areas:"icon label" "icon value" "icon hint" !important;
  gap:2px 9px !important;
  min-height:82px !important;
  padding:12px !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#f8fafc,#fff) !important;
  border:1px solid #e2e8f0 !important;
  box-shadow:none !important;
}
.cc-activity-mini-grid article i{
  grid-area:icon !important;
  width:34px !important;
  height:34px !important;
  border-radius:13px !important;
  display:grid !important;
  place-items:center !important;
  color:#2563eb !important;
  background:#eff6ff !important;
}
.cc-activity-mini-grid article span{
  grid-area:label !important;
  min-width:0 !important;
  color:#64748b !important;
  font-size:11px !important;
  font-weight:900 !important;
  line-height:1.1 !important;
}
.cc-activity-mini-grid article strong{
  grid-area:value !important;
  color:#0b1120 !important;
  font-size:17px !important;
  font-weight:950 !important;
  line-height:1.1 !important;
}
.cc-activity-mini-grid article small{
  grid-area:hint !important;
  color:#64748b !important;
  font-size:11px !important;
  font-weight:750 !important;
  line-height:1.2 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
@media (max-width:900px){
  .cc-panel.cc-recent-activity{height:auto !important;min-height:0 !important;}
  .cc-panel.cc-recent-activity .premium-timeline,
  .cc-panel.cc-recent-activity .cc-activity-list{min-height:0 !important;max-height:430px !important;flex:0 0 auto !important;}
}
@media (max-width:560px){
  .cc-activity-mini-grid{grid-template-columns:1fr !important;}
}

/* v23: Cleaner dashboard activity footer, period focus cards and documents hub */
.activity-command-center{
  margin-top:14px !important;
  padding:14px !important;
  border-radius:22px !important;
  border:1px solid #dbeafe !important;
  background:linear-gradient(135deg,#f8fbff,#ffffff 55%,#eff6ff) !important;
}
.activity-command-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom:12px !important;
}
.activity-command-head small{
  display:block !important;
  color:#64748b !important;
  font-weight:950 !important;
  text-transform:uppercase !important;
  letter-spacing:.08em !important;
  font-size:11px !important;
}
.activity-command-head strong{display:block !important;color:#0f172a !important;font-weight:950 !important;font-size:18px !important;}
.activity-command-head .btn{padding:8px 11px !important;border-radius:12px !important;white-space:nowrap !important;}
.activity-action-stack{display:grid !important;gap:9px !important;}
.activity-action-stack button{
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  min-height:62px !important;
  padding:10px !important;
  border:1px solid #e2e8f0 !important;
  border-radius:18px !important;
  background:#fff !important;
  text-align:left !important;
  cursor:pointer !important;
}
.activity-action-stack button > span{width:42px !important;height:42px !important;border-radius:15px !important;display:grid !important;place-items:center !important;background:#eff6ff !important;color:#2563eb !important;}
.activity-action-stack strong{display:block !important;color:#0f172a !important;font-weight:950 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.activity-action-stack small{display:block !important;color:#64748b !important;font-weight:750 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.activity-action-stack em{font-style:normal !important;font-weight:950 !important;color:#0f766e !important;background:#ecfdf5 !important;border:1px solid #bbf7d0 !important;border-radius:999px !important;padding:6px 9px !important;font-size:11px !important;}

.doc-focus-card{padding:18px !important;background:linear-gradient(145deg,#ffffff,#f8fafc 55%,#eef6ff) !important;}
.doc-focus-top{display:flex !important;gap:13px !important;align-items:flex-start !important;margin-bottom:14px !important;}
.doc-focus-top > span{width:52px !important;height:52px !important;border-radius:19px !important;display:grid !important;place-items:center !important;background:#0f172a !important;color:#fff !important;box-shadow:0 15px 26px rgba(15,23,42,.18) !important;}
.doc-focus-top small{display:block !important;color:#64748b !important;font-weight:950 !important;text-transform:uppercase !important;letter-spacing:.08em !important;font-size:11px !important;}
.doc-focus-top h3{margin:3px 0 !important;color:#0f172a !important;font-size:22px !important;font-weight:950 !important;}
.doc-focus-top p{margin:0 !important;color:#2563eb !important;font-weight:900 !important;}
.doc-focus-amount{padding:15px !important;border-radius:20px !important;background:#0b1120 !important;color:#fff !important;margin:12px 0 !important;}
.doc-focus-amount strong{display:block !important;font-size:25px !important;font-weight:950 !important;}
.doc-focus-amount small{display:block !important;color:#cbd5e1 !important;font-weight:800 !important;margin-top:2px !important;}
.doc-focus-grid{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:9px !important;margin:12px 0 !important;}
.doc-focus-grid article{padding:12px 10px !important;border:1px solid #e2e8f0 !important;background:#fff !important;border-radius:17px !important;text-align:center !important;}
.doc-focus-grid b{display:block !important;color:#0f172a !important;font-size:20px !important;font-weight:950 !important;}
.doc-focus-grid span{display:block !important;color:#64748b !important;font-size:11px !important;font-weight:850 !important;}
.doc-focus-next{display:flex !important;gap:10px !important;align-items:flex-start !important;padding:12px !important;border-radius:18px !important;background:#ecfeff !important;border:1px solid #bae6fd !important;margin:12px 0 !important;}
.doc-focus-next i{color:#0891b2 !important;margin-top:3px !important;}
.doc-focus-next strong{display:block !important;color:#0f172a !important;font-weight:950 !important;}
.doc-focus-next small{display:block !important;color:#475569 !important;font-weight:750 !important;line-height:1.35 !important;}

.documents-hub{display:grid !important;gap:16px !important;}
.documents-hero-card{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:16px !important;padding:18px !important;background:linear-gradient(135deg,#0f172a,#1e3a8a 60%,#0f766e) !important;color:#fff !important;border:0 !important;overflow:hidden !important;}
.documents-hero-left{display:flex !important;align-items:center !important;gap:14px !important;min-width:0 !important;}
.documents-hero-left > span{width:58px !important;height:58px !important;border-radius:22px !important;display:grid !important;place-items:center !important;background:rgba(255,255,255,.14) !important;border:1px solid rgba(255,255,255,.22) !important;}
.documents-hero-left small{display:block !important;color:#bfdbfe !important;text-transform:uppercase !important;letter-spacing:.08em !important;font-weight:950 !important;font-size:11px !important;}
.documents-hero-left h3{margin:3px 0 !important;color:#fff !important;font-size:25px !important;font-weight:950 !important;}
.documents-hero-left p{margin:0 !important;color:#dbeafe !important;font-weight:750 !important;}
.documents-hero-actions{display:flex !important;gap:8px !important;flex-wrap:wrap !important;justify-content:flex-end !important;}
.documents-hero-actions .btn{background:#fff !important;color:#0f172a !important;border:0 !important;border-radius:14px !important;}
.documents-metric-grid{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:12px !important;}
.documents-metric-grid article{padding:14px !important;border-radius:20px !important;background:#fff !important;border:1px solid #e2e8f0 !important;box-shadow:0 14px 34px rgba(15,23,42,.06) !important;}
.documents-metric-grid i{width:40px !important;height:40px !important;border-radius:15px !important;display:grid !important;place-items:center !important;background:#eff6ff !important;color:#2563eb !important;margin-bottom:10px !important;}
.documents-metric-grid strong{display:block !important;color:#0f172a !important;font-size:24px !important;font-weight:950 !important;}
.documents-metric-grid span{display:block !important;color:#64748b !important;font-weight:800 !important;font-size:12px !important;}
.documents-workspace-grid{display:grid !important;grid-template-columns:minmax(0,1.7fr) minmax(260px,.8fr) !important;gap:16px !important;align-items:start !important;}
.documents-list-card,.documents-side-card{padding:18px !important;}
.documents-clean-list{display:grid !important;gap:10px !important;}
.documents-clean-list article{display:grid !important;grid-template-columns:44px minmax(0,1fr) auto auto !important;gap:12px !important;align-items:center !important;padding:11px !important;border:1px solid #e2e8f0 !important;border-radius:18px !important;background:#fff !important;}
.documents-clean-list article > span{width:44px !important;height:44px !important;border-radius:16px !important;display:grid !important;place-items:center !important;background:#eff6ff !important;color:#2563eb !important;}
.documents-clean-list strong{display:block !important;color:#0f172a !important;font-weight:950 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.documents-clean-list small{display:block !important;color:#64748b !important;font-weight:750 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.documents-clean-list em{font-style:normal !important;color:#475569 !important;background:#f8fafc !important;border:1px solid #e2e8f0 !important;border-radius:999px !important;padding:7px 10px !important;font-weight:850 !important;font-size:12px !important;white-space:nowrap !important;}
.documents-type-list{display:grid !important;gap:9px !important;margin-top:10px !important;}
.documents-type-list button{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:10px !important;padding:12px !important;border:1px solid #e2e8f0 !important;background:#fff !important;border-radius:16px !important;color:#0f172a !important;font-weight:900 !important;}
.documents-type-list strong{background:#eff6ff !important;color:#2563eb !important;border-radius:999px !important;padding:5px 9px !important;}
.documents-tip{display:flex !important;gap:10px !important;margin-top:14px !important;padding:13px !important;border-radius:18px !important;background:#f8fafc !important;border:1px solid #e2e8f0 !important;}
.documents-tip i{color:#0f766e !important;margin-top:3px !important;}
.documents-tip strong{display:block !important;color:#0f172a !important;font-weight:950 !important;}
.documents-tip small{display:block !important;color:#64748b !important;font-weight:750 !important;line-height:1.35 !important;}
@media (max-width:900px){.documents-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}.documents-workspace-grid{grid-template-columns:1fr !important}.documents-hero-card{align-items:flex-start !important;flex-direction:column !important}.documents-hero-actions{justify-content:flex-start !important}.doc-focus-grid{grid-template-columns:1fr !important}.activity-action-stack button{grid-template-columns:38px minmax(0,1fr) !important}.activity-action-stack em{grid-column:2 / -1 !important;width:max-content !important}}
@media (max-width:560px){.documents-metric-grid{grid-template-columns:1fr !important}.documents-clean-list article{grid-template-columns:42px minmax(0,1fr) !important}.documents-clean-list em,.documents-clean-list .btn{grid-column:2 / -1 !important;width:max-content !important}.activity-command-head{align-items:flex-start !important;flex-direction:column !important}}

/* v24 - New repair contact panel + stock command improvements */
.repair-smart-form {
  gap: 18px;
}
.repair-contact-panel {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.86));
  box-shadow: 0 18px 42px rgba(15,23,42,.08);
  margin-bottom: 4px;
}
.repair-contact-panel.is-empty {
  border-style: dashed;
  background: linear-gradient(135deg, rgba(248,250,252,.98), rgba(255,255,255,.94));
}
.repair-contact-avatar {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 950;
  font-size: 23px;
  box-shadow: 0 14px 24px rgba(37,99,235,.22);
}
.repair-contact-main { min-width: 0; }
.repair-contact-main span,
.repair-form-section-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.repair-contact-main strong,
.repair-form-section-title strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.repair-contact-main small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
  word-break: break-word;
}
.repair-contact-tags {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  max-width: 330px;
}
.repair-contact-tags em {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(37,99,235,.09);
  color: #1d4ed8;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.repair-form-section-title {
  padding: 6px 2px 0;
}
.stock-studio-page-v24 {
  gap: 18px;
}
.stock-command-head {
  border-color: rgba(37,99,235,.16);
  background:
    radial-gradient(circle at 8% 0%, rgba(37,99,235,.16), transparent 36%),
    radial-gradient(circle at 85% 0%, rgba(6,182,212,.14), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
}
.stock-command-head .stock-title-icon {
  background: linear-gradient(135deg, #0f172a, #2563eb 58%, #06b6d4);
}
.stock-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20,184,166,.10);
  font-size: 12px;
  font-weight: 950;
  border: 1px solid rgba(20,184,166,.16);
}
.stock-command-strip {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(160px, .75fr));
  gap: 12px;
}
.stock-command-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(148,163,184,.17);
  box-shadow: 0 18px 42px rgba(15,23,42,.07);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.stock-command-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(37,99,235,.07);
}
.stock-command-card.main {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  border-color: rgba(37,99,235,.28);
}
.stock-command-card.main::after { background: rgba(255,255,255,.12); }
.stock-command-card span {
  color: inherit;
  opacity: .74;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.stock-command-card strong {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -.04em;
}
.stock-command-card small {
  position: relative;
  z-index: 1;
  color: inherit;
  opacity: .72;
  font-weight: 800;
}
.stock-command-card.warning {
  border-color: rgba(245,158,11,.22);
  background: linear-gradient(180deg, #fff, #fffbeb);
}
.stock-command-card.danger {
  border-color: rgba(239,68,68,.22);
  background: linear-gradient(180deg, #fff, #fef2f2);
}
.stock-command-card.ok {
  border-color: rgba(20,184,166,.20);
  background: linear-gradient(180deg, #fff, #f0fdfa);
}
.stock-studio-page-v24 .stock-top-grid {
  margin-top: 0;
}
.stock-studio-page-v24 .stock-products-section,
.stock-studio-page-v24 .stock-performance-card,
.stock-studio-page-v24 .stock-widget {
  border-radius: 24px;
}
@media (max-width: 980px) {
  .stock-command-strip { grid-template-columns: 1fr 1fr; }
  .repair-contact-panel { grid-template-columns: 52px minmax(0,1fr); }
  .repair-contact-tags { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}
@media (max-width: 640px) {
  .stock-command-strip { grid-template-columns: 1fr; }
  .repair-contact-panel { grid-template-columns: 1fr; text-align: left; }
}

/* v25: modal always above dashboard hero + compact paginated lists */
.modal-backdrop,
.command-backdrop,
.module-launcher-backdrop {
  z-index: 20000000 !important;
}
.modal,
.command-palette,
.module-launcher {
  position: relative !important;
  z-index: 20000001 !important;
}
.control-center-dashboard .cc-hero,
.repair-hero-panel {
  z-index: 2 !important;
  isolation: auto !important;
}
.control-center-dashboard .cc-kpi-grid,
.control-center-dashboard .cc-main-grid,
.control-center-dashboard .cc-lower-grid,
.control-center-dashboard .cc-panel,
.repair-list-panel,
.repair-insights-panel,
.stock-products-section,
.stock-performance-card,
.supplier-card-grid,
.client-card-grid {
  z-index: 1 !important;
}
.dashboard-period-select,
.repair-period-dropdown,
.period-select:has(.period-menu) {
  z-index: 5000 !important;
}
.dashboard-period-select .period-menu,
.repair-period-dropdown .period-menu,
.period-select .period-menu {
  z-index: 6000 !important;
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg,#fff,#f8fafc);
}
.list-pagination .btn,
.list-pagination .page-dot {
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}
.list-pagination .page-dot.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37,99,235,.25);
}
.list-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.client-card-grid,
.stock-product-grid,
.supplier-card-grid,
.repair-card-grid {
  align-items: stretch !important;
}
.client-card-grid > *,
.stock-product-grid > *,
.supplier-card-grid > *,
.repair-card-grid > * {
  min-height: 0;
}
@media (max-width: 640px) {
  .list-pagination { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
}

/* v26 fournisseurs + reparations UX rebuild */
.supplier-command-page,
.repair-studio-page{
  display:grid;
  gap:18px;
}
.supplier-command-hero{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);
  gap:18px;
  align-items:stretch;
  padding:22px;
  border:1px solid rgba(148,163,184,.24);
  border-radius:28px;
  background:linear-gradient(135deg,#0b1120 0%,#12305a 48%,#0f766e 100%);
  color:#fff;
  box-shadow:0 22px 50px rgba(15,23,42,.18);
  overflow:hidden;
}
.supplier-command-hero h2{margin:6px 0 8px;font-size:clamp(26px,3vw,38px);letter-spacing:-.04em;color:#fff}
.supplier-command-hero p{max-width:760px;margin:0;color:rgba(255,255,255,.78);line-height:1.65}
.section-kicker{display:inline-flex;align-items:center;width:max-content;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.12);color:#e0f2fe;font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.supplier-command-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-self:stretch}
.supplier-command-summary article{min-height:112px;display:flex;flex-direction:column;justify-content:space-between;padding:14px;border-radius:20px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(12px)}
.supplier-command-summary span{font-size:12px;font-weight:800;color:rgba(255,255,255,.68)}
.supplier-command-summary strong{font-size:22px;color:#fff}
.supplier-command-summary small{color:rgba(255,255,255,.72)}
.supplier-command-grid{display:grid;grid-template-columns:1.1fr .95fr .95fr;gap:16px;align-items:stretch}
.supplier-command-panel{min-height:280px;padding:18px;border:1px solid rgba(148,163,184,.22);border-radius:24px;background:var(--card);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:14px;overflow:hidden}
.panel-title-line{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.panel-title-line span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.panel-title-line h3{margin:3px 0 0;font-size:18px;letter-spacing:-.02em}
.panel-title-line>b,.panel-title-line>i{min-width:46px;height:46px;display:inline-grid;place-items:center;border-radius:16px;background:#eff6ff;color:#2563eb;font-weight:1000}
.supplier-flow-bar{height:12px;border-radius:999px;background:#e2e8f0;overflow:hidden}.supplier-flow-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb,#06b6d4)}
.supplier-flow-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.supplier-flow-steps article{min-height:86px;padding:12px;border-radius:18px;background:#f8fafc;border:1px solid #e2e8f0;display:flex;flex-direction:column;justify-content:space-between}.supplier-flow-steps strong{font-size:22px}.supplier-flow-steps span{font-weight:800;color:#64748b;font-size:12px}
.supplier-next-box{margin-top:auto;display:flex;gap:12px;align-items:center;padding:14px;border-radius:20px;background:linear-gradient(135deg,#ecfeff,#f8fafc);border:1px solid #cffafe}.supplier-next-box i{width:42px;height:42px;display:grid;place-items:center;border-radius:15px;background:#0891b2;color:white}.supplier-next-box strong{display:block}.supplier-next-box small{color:#64748b}
.supplier-alert-list{display:grid;gap:10px}.supplier-alert-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;border-radius:18px;background:#fff7ed;border:1px solid #fed7aa}.supplier-alert-list strong{display:block}.supplier-alert-list small{color:#9a3412}.supplier-alert-list b{white-space:nowrap;color:#0f172a}
.supplier-category-bars{display:grid;gap:12px}.supplier-category-bars p{margin:0;display:grid;grid-template-columns:minmax(120px,1fr) minmax(80px,1fr) auto;gap:10px;align-items:center}.supplier-category-bars span{font-weight:850;color:#334155;display:flex;gap:8px;align-items:center}.supplier-category-bars span i{width:10px;height:10px;border-radius:999px}.supplier-category-bars b{height:9px;border-radius:999px;background:#e2e8f0;overflow:hidden}.supplier-category-bars b i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0ea5e9,#22c55e)}.supplier-category-bars em{font-style:normal;font-size:12px;font-weight:900;color:#0f172a}
.supplier-directory-panel{padding:18px;border:1px solid rgba(148,163,184,.22);border-radius:26px;background:var(--card);box-shadow:var(--shadow);display:grid;gap:16px}.supplier-filter-row.pro{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;align-items:center;gap:12px}.supplier-filter-row.pro div strong{display:block}.supplier-filter-row.pro div small{color:var(--muted);font-weight:800}.supplier-filter-row.pro label{height:46px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;padding:0 14px;display:flex;align-items:center;gap:10px}.supplier-filter-row.pro input{border:0;background:transparent;outline:0;width:100%;font-weight:800;color:#0f172a}
.supplier-pro-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:14px}.supplier-pro-card{min-height:258px;display:flex;flex-direction:column;gap:13px;padding:16px;border:1px solid #e2e8f0;border-radius:24px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 10px 28px rgba(15,23,42,.06)}.supplier-pro-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start}.supplier-pro-logo .supplier-logo,.supplier-pro-logo img{width:48px;height:48px;border-radius:16px}.supplier-pro-title{min-width:0}.supplier-pro-title h3{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:17px}.supplier-pro-title p{margin:4px 0 0;color:#64748b;font-weight:750}.supplier-pro-lines{display:grid;gap:7px}.supplier-pro-lines span{display:flex;align-items:center;gap:8px;min-width:0;color:#334155;font-weight:750;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.supplier-pro-lines i{color:#2563eb;width:16px}.supplier-pro-metrics{margin-top:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.supplier-pro-metrics div{padding:10px;border-radius:16px;background:#fff;border:1px solid #e2e8f0}.supplier-pro-metrics strong{display:block;font-size:15px}.supplier-pro-metrics small{color:#64748b;font-weight:800}.supplier-pro-actions{display:flex;gap:8px;flex-wrap:wrap}.supplier-pro-actions .btn{min-height:34px;padding:7px 10px}
.pro-pagination{border:0;background:transparent;box-shadow:none;padding:6px;margin-top:8px}.pro-pagination .page-number-group{display:flex;gap:7px;align-items:center;justify-content:center;flex-wrap:wrap}.pro-pagination .page-nav{height:40px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:0 14px;display:inline-flex;align-items:center;gap:8px;font-weight:950;cursor:pointer}.pro-pagination .page-nav:disabled{opacity:.45;cursor:not-allowed}.pro-pagination .page-dot{border-radius:14px}
.repair-bottom-grid{align-items:stretch;gap:18px!important}.repair-list-panel,.repair-insights-panel{height:100%}.repair-insights-pro{position:static!important;display:flex;flex-direction:column;gap:14px;padding:18px!important}.repair-insights-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.repair-insights-head span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:900}.repair-insights-head h3{margin:3px 0 0}.repair-insights-head b{width:46px;height:46px;border-radius:16px;background:#eef2ff;color:#4338ca;display:grid;place-items:center;font-size:20px}.repair-goal-cards.pro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.repair-goal-cards.pro article{min-height:94px;padding:14px;border:1px solid #e2e8f0;border-radius:18px;background:#f8fafc;display:flex;flex-direction:column;justify-content:space-between}.repair-goal-cards.pro b{font-size:24px}.repair-goal-cards.pro span{color:#64748b;font-weight:900;font-size:12px}.repair-priority-strip{display:flex;gap:12px;align-items:center;padding:14px;border-radius:20px;background:linear-gradient(135deg,#fff7ed,#f8fafc);border:1px solid #fed7aa}.repair-priority-strip i{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:#f97316;color:#fff}.repair-priority-strip strong{display:block}.repair-priority-strip small{color:#64748b;line-height:1.45}.repair-history-widget.pro{margin-top:0!important;padding:0!important;border:0!important;background:transparent!important;display:grid;gap:10px}.repair-history-widget.pro .toolbar{padding:0;margin:0;align-items:center}.repair-history-widget.pro .toolbar h3{margin:0;font-size:17px}.repair-history-widget.pro article{display:grid;grid-template-columns:88px minmax(0,1fr);gap:10px;align-items:center;padding:11px;border-radius:16px;background:#fff;border:1px solid #e2e8f0}.repair-history-widget.pro article b{font-size:12px;color:#2563eb}.repair-history-widget.pro article strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.repair-history-widget.pro article small{display:block;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1100px){.supplier-command-hero{grid-template-columns:1fr}.supplier-command-grid{grid-template-columns:1fr 1fr}.repair-bottom-grid{grid-template-columns:1fr!important}.repair-insights-pro{min-height:auto}}
@media(max-width:720px){.supplier-command-summary,.supplier-flow-steps,.repair-goal-cards.pro{grid-template-columns:1fr}.supplier-command-grid{grid-template-columns:1fr}.supplier-filter-row.pro{grid-template-columns:1fr}.supplier-command-hero{padding:18px}.pro-pagination .page-nav span{display:none}.supplier-category-bars p{grid-template-columns:1fr}.supplier-pro-grid{grid-template-columns:1fr}}

/* v27 — module period controls + RH employees redesign */
.module-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;overflow:visible!important;position:relative;z-index:30}.module-period-select{position:relative;overflow:visible!important;z-index:70}.module-period-select:has(.period-menu){z-index:9000!important}.module-period-select .period-trigger{height:42px;min-width:132px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;border-radius:999px;background:#fff!important;border:1px solid #dbe7f7!important;box-shadow:0 12px 28px rgba(15,23,42,.08)!important;color:#0f172a!important;font-weight:800}.module-period-select .period-menu{position:absolute!important;top:calc(100% + 10px)!important;right:0!important;left:auto!important;z-index:10000!important;min-width:260px!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:18px!important;box-shadow:0 28px 80px rgba(15,23,42,.22)!important;padding:8px!important}.clients-period-control .period-menu,.stock-period-control .period-menu,.suppliers-period-control .period-menu,.hr-period-control .period-menu{right:0!important;left:auto!important}.repairs-period-control .period-menu{right:0!important;left:auto!important;min-width:270px!important}.client-head-actions,.stock-head-actions{overflow:visible!important;position:relative;z-index:40}.client-project-head,.stock-project-head,.module-hero{overflow:visible!important}.repair-hero-panel-compact{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;margin:0 0 14px!important;min-height:0!important}.repair-hero-panel-compact .repair-hero-actions-only{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:10px!important;width:100%!important}.repair-range-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #e2e8f0;background:#fff;border-radius:999px;padding:10px 14px;font-size:12px;font-weight:800;color:#475569;box-shadow:0 10px 24px rgba(15,23,42,.06)}
.hr-employees-studio{display:grid;gap:18px}.hr-people-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.95fr);gap:18px;align-items:stretch;padding:22px;border:1px solid #dce8f7;border-radius:28px;background:linear-gradient(135deg,#f8fbff 0%,#ffffff 44%,#eef6ff 100%);box-shadow:0 22px 70px rgba(15,23,42,.08)}.hr-people-hero h2{margin:4px 0 6px;font-size:clamp(24px,3vw,36px);letter-spacing:-.05em;color:#0f172a}.hr-people-hero p{max-width:760px;margin:0;color:#64748b;font-weight:600;line-height:1.65}.hr-hero-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hr-hero-kpis article{padding:16px;border-radius:22px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 14px 35px rgba(15,23,42,.06)}.hr-hero-kpis strong{display:block;font-size:24px;color:#0f172a}.hr-hero-kpis span{font-size:12px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.06em}.hr-command-grid{display:grid;grid-template-columns:1.35fr .85fr .95fr;gap:16px;align-items:stretch}.hr-command-panel{padding:18px;border-radius:24px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 18px 50px rgba(15,23,42,.07);min-height:100%}.hr-command-panel.wide{background:linear-gradient(180deg,#fff,#f8fbff)}.hr-dept-bars{display:grid;gap:12px;margin-top:14px}.hr-dept-bars p,.supplier-category-bars p{display:grid;grid-template-columns:120px 1fr 34px;gap:10px;align-items:center;margin:0}.hr-dept-bars span{font-size:12px;font-weight:800;color:#475569}.hr-dept-bars b{height:9px;border-radius:999px;background:#eaf0f8;overflow:hidden}.hr-dept-bars b i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb,#06b6d4)}.hr-dept-bars em{font-style:normal;text-align:right;font-weight:900;color:#0f172a}.hr-contract-list,.hr-mini-timeline{display:grid;gap:10px;margin-top:12px}.hr-contract-list article,.hr-mini-timeline article{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;border-radius:18px;background:#f8fafc;border:1px solid #e8eef7}.hr-contract-list strong,.hr-mini-timeline strong{color:#0f172a}.hr-contract-list span,.hr-mini-timeline small{font-size:12px;color:#64748b;font-weight:700}.hr-mini-timeline article{justify-content:flex-start}.hr-mini-timeline b{min-width:82px;padding:7px 8px;border-radius:999px;background:#eef6ff;color:#2563eb;font-size:11px;text-align:center}.employee-directory-panel{padding:18px;border-radius:26px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 18px 55px rgba(15,23,42,.07)}.employee-filter-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.employee-filter-row strong{display:block;color:#0f172a}.employee-filter-row small{display:block;color:#64748b;font-weight:700}.employee-filter-row label{display:flex;align-items:center;gap:8px;min-width:min(420px,100%);background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:0 12px;height:42px}.employee-filter-row input{border:0;outline:0;background:transparent;width:100%;font-weight:700}.employee-filter-row select{height:42px;border-radius:16px;border:1px solid #e2e8f0;background:#fff;padding:0 12px;font-weight:800;color:#0f172a}.employee-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}.employee-profile-card{padding:16px;border-radius:24px;background:linear-gradient(180deg,#fff,#f8fbff);border:1px solid #e2e8f0;box-shadow:0 14px 38px rgba(15,23,42,.06);display:grid;gap:10px}.employee-profile-card.active{border-color:#bfdbfe}.employee-profile-card.leave{border-color:#fed7aa;background:linear-gradient(180deg,#fff,#fff7ed)}.employee-card-top{display:flex;align-items:center;justify-content:space-between}.employee-avatar-pro{width:48px;height:48px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;font-weight:900;box-shadow:0 12px 25px rgba(37,99,235,.25);overflow:hidden}.employee-avatar-pro img{width:100%;height:100%;object-fit:cover}.employee-profile-card h3{margin:0;color:#0f172a;font-size:16px}.employee-profile-card p{margin:0;color:#64748b;font-weight:700}.employee-card-meta{display:grid;gap:8px}.employee-card-meta span{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:#475569}.employee-card-actions{display:flex;gap:8px;flex-wrap:wrap}.employee-table-card{margin-top:4px;overflow:hidden}@media(max-width:1100px){.hr-people-hero,.hr-command-grid{grid-template-columns:1fr}.employee-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-head-actions{justify-content:flex-start}}@media(max-width:720px){.employee-profile-grid{grid-template-columns:1fr}.hr-hero-kpis{grid-template-columns:1fr}.module-period-select .period-menu{left:0!important;right:auto!important;min-width:min(92vw,270px)!important}.client-head-actions,.stock-head-actions{justify-content:flex-start}.repair-hero-panel-compact .repair-hero-actions-only{justify-content:flex-start!important;flex-wrap:wrap}}

/* v28 — period controls + payroll simulator polish */
.module-head-actions{overflow:visible!important;position:relative!important;z-index:80!important}
.module-period-select{position:relative!important;z-index:90!important;overflow:visible!important}
.module-period-select:has(.period-menu){z-index:12000!important}
.period-menu-pro{display:grid!important;gap:6px!important;min-width:292px!important;padding:10px!important;border-radius:22px!important;background:#fff!important;border:1px solid #e2e8f0!important;box-shadow:0 30px 90px rgba(15,23,42,.22)!important;overflow:visible!important}
.period-menu-pro>button{display:flex!important;align-items:center!important;gap:10px!important;width:100%!important;text-align:left!important;padding:11px 12px!important;border-radius:15px!important;font-weight:850!important;color:#334155!important;background:transparent!important;border:0!important}
.period-menu-pro>button i{width:18px!important;color:#2563eb!important;text-align:center!important}
.period-menu-pro>button:hover{background:#eff6ff!important;color:#1d4ed8!important;transform:translateX(2px)}
.pro-custom-period{margin-top:8px!important;padding:12px!important;border-radius:18px!important;background:linear-gradient(180deg,#f8fbff,#fff)!important;border:1px solid #dbeafe!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;display:grid!important;gap:10px!important}
.custom-period-head span{display:block!important;font-size:13px!important;font-weight:950!important;color:#0f172a!important}.custom-period-head small{display:block!important;margin-top:2px!important;color:#64748b!important;font-size:11px!important;font-weight:700!important}
.custom-period-fields{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.custom-period-fields label{display:grid!important;gap:5px!important;margin:0!important}.custom-period-fields label span{font-size:11px!important;font-weight:900!important;color:#475569!important}.custom-period-fields input{width:100%!important;height:38px!important;border:1px solid #dbe7f7!important;border-radius:13px!important;background:#fff!important;padding:0 10px!important;font-weight:800!important;color:#0f172a!important;outline:0!important}.custom-period-fields input:focus{border-color:#2563eb!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)!important}.custom-period-apply{width:100%!important;justify-content:center!important;margin-top:2px!important}
.stock-head-actions,.supplier-command-actions,.module-hero,.stock-project-head{overflow:visible!important}.quotes-period-control .period-menu,.invoices-period-control .period-menu,.payments-period-control .period-menu,.orders-period-control .period-menu,.suppliers-period-control .period-menu,.stock-period-control .period-menu{right:0!important;left:auto!important}.repair-period-menu{right:0!important;left:auto!important}
.salary-simulator-pro{display:grid;gap:18px}.salary-hero-pro{display:grid;grid-template-columns:minmax(0,1.1fr) 180px minmax(320px,.9fr);gap:18px;align-items:center;padding:22px;border-radius:30px;border:1px solid #dce8f7;background:radial-gradient(circle at top left,rgba(37,99,235,.12),transparent 34%),linear-gradient(135deg,#f8fbff,#fff 55%,#eef6ff);box-shadow:0 24px 75px rgba(15,23,42,.08)}.salary-hero-copy h2{margin:4px 0 8px;font-size:clamp(30px,4vw,48px);letter-spacing:-.06em;color:#0f172a}.salary-hero-copy p{margin:0;max-width:700px;color:#64748b;font-weight:700;line-height:1.65}.salary-meter{width:166px;height:166px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#2563eb var(--net),#e8eef7 0);box-shadow:inset 0 0 0 15px #fff,0 18px 45px rgba(37,99,235,.16)}.salary-meter div{width:112px;height:112px;border-radius:50%;background:#fff;display:grid;place-items:center;text-align:center;box-shadow:0 12px 30px rgba(15,23,42,.08)}.salary-meter strong{font-size:28px;color:#0f172a}.salary-meter small{font-weight:900;color:#64748b;text-transform:uppercase;font-size:11px}.salary-main-slider{display:grid;gap:12px}.salary-main-slider label{display:flex;justify-content:space-between;gap:12px;color:#475569;font-weight:900}.salary-main-slider label strong{color:#0f172a}.salary-main-slider input[type=range]{width:100%;accent-color:#2563eb}.salary-quick-amounts{display:flex;flex-wrap:wrap;gap:8px}.salary-quick-amounts button{border:1px solid #dbe7f7;background:#fff;border-radius:999px;padding:8px 10px;font-weight:900;color:#475569}.salary-quick-amounts button.active,.salary-quick-amounts button:hover{background:#2563eb;color:#fff;border-color:#2563eb}.salary-grid-pro{display:grid;grid-template-columns:.9fr 1.25fr;gap:18px;align-items:stretch}.salary-settings-card,.salary-result-card{padding:18px;border-radius:26px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 18px 55px rgba(15,23,42,.07)}.salary-card-head{display:flex;gap:12px;align-items:center;margin-bottom:14px}.salary-card-head>span{width:44px;height:44px;border-radius:16px;display:grid;place-items:center;background:#eff6ff;color:#2563eb}.salary-card-head small{display:block;color:#64748b;font-weight:900;text-transform:uppercase;font-size:11px}.salary-card-head h3{margin:2px 0 0;color:#0f172a}.salary-info-note{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:12px;border-radius:18px;background:#f8fafc;color:#64748b;font-weight:700}.salary-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.salary-tabs button{border:1px solid #dbe7f7;background:#f8fafc;border-radius:999px;padding:9px 14px;font-weight:900;color:#475569}.salary-tabs button.active{background:#0f172a;color:#fff;border-color:#0f172a}.salary-breakdown-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.salary-breakdown-grid article{padding:16px;border-radius:22px;background:linear-gradient(180deg,#fff,#f8fbff);border:1px solid #e2e8f0}.salary-breakdown-grid article.net{background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff}.salary-breakdown-grid span{display:block;font-size:12px;font-weight:900;color:inherit;opacity:.78}.salary-breakdown-grid strong{display:block;margin:7px 0;font-size:24px;letter-spacing:-.04em;color:inherit}.salary-breakdown-grid small{font-weight:800;color:inherit;opacity:.75}.salary-slip-preview{display:grid;gap:9px}.salary-slip-preview>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0}.salary-slip-preview span{font-weight:800;color:#64748b}.salary-slip-preview strong{color:#0f172a}.salary-slip-preview .total{background:#ecfdf5;border-color:#bbf7d0}.salary-slip-preview.employer .total{background:#eff6ff;border-color:#bfdbfe}.salary-action-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.salary-mini-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.salary-mini-insights article{padding:14px 16px;border-radius:20px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 12px 35px rgba(15,23,42,.05)}.salary-mini-insights span{display:block;font-size:12px;font-weight:900;color:#64748b}.salary-mini-insights strong{display:block;margin-top:6px;color:#0f172a;font-size:18px}@media(max-width:1100px){.salary-hero-pro,.salary-grid-pro{grid-template-columns:1fr}.salary-meter{margin:auto}.salary-mini-insights{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.period-menu-pro{left:0!important;right:auto!important;min-width:min(92vw,292px)!important}.custom-period-fields,.salary-breakdown-grid,.salary-mini-insights{grid-template-columns:1fr}.salary-hero-pro{padding:16px}.salary-meter{width:140px;height:140px}.salary-meter div{width:94px;height:94px}}

/* v29 — period trigger + payroll simulator polish */
.module-head-actions .module-period-select,
.page-title .actions .module-period-select{
  position:relative!important;
  z-index:24!important;
  flex:0 0 auto!important;
}
.module-head-actions .period-trigger,
.page-title .actions .period-trigger{
  height:42px!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  border:1px solid #dbe7f7!important;
  box-shadow:0 10px 28px rgba(15,23,42,.06)!important;
}
.period-menu-pro{
  right:0!important;
  left:auto!important;
  top:calc(100% + 10px)!important;
  z-index:240!important;
}
.pro-custom-period{
  min-width:320px!important;
  padding:14px!important;
  background:linear-gradient(135deg,#f8fbff,#ffffff)!important;
  border:1px solid #bfdbfe!important;
  box-shadow:0 18px 48px rgba(37,99,235,.12)!important;
}
.custom-period-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.custom-period-head span{font-size:13px!important;font-weight:950!important;color:#0f172a!important}
.custom-period-head small{font-size:11px!important;font-weight:800!important;color:#64748b!important;text-align:right!important}
.custom-period-fields{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
.custom-period-fields label{display:grid!important;gap:6px!important;font-weight:900!important;color:#475569!important;font-size:11px!important;text-transform:uppercase!important}
.custom-period-fields input{height:40px!important;border-radius:13px!important;border:1px solid #dbe7f7!important;background:#fff!important;padding:0 10px!important;font-weight:900!important;color:#0f172a!important}
.custom-period-apply{width:100%!important;justify-content:center!important;border-radius:14px!important}
.salary-meter{
  position:relative!important;
  place-self:center!important;
  display:grid!important;
  place-items:center!important;
}
.salary-meter>div{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  line-height:1.05!important;
  padding:0!important;
}
.salary-meter strong{display:block!important;text-align:center!important;line-height:1!important;margin:0!important}
.salary-meter small{display:block!important;text-align:center!important;line-height:1.05!important;margin:0!important;max-width:80px!important}
.salary-action-row .btn[data-sim-payroll-pdf],
.module-head-actions .btn[data-sim-payroll-pdf]{
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
  color:#fff!important;
  border-color:transparent!important;
}
.payslip-a4 table th,
.payslip-a4 table td{font-size:12px!important}
@media(max-width:700px){
  .custom-period-fields{grid-template-columns:1fr!important}
  .pro-custom-period{min-width:min(88vw,320px)!important}
  .module-head-actions .module-period-select,
  .page-title .actions .module-period-select{width:100%!important}
  .module-head-actions .period-trigger,
  .page-title .actions .period-trigger{width:100%!important;justify-content:space-between!important}
}

/* v30 - visible period controls for commercial and finance pages */
.period-command-strip{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin:14px 0 18px!important;
  padding:14px 16px!important;
  border:1px solid #dbe7f7!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 54%,#eef6ff 100%)!important;
  box-shadow:0 16px 45px rgba(15,23,42,.07)!important;
  position:relative!important;
  z-index:80!important;
  overflow:visible!important;
}
.period-command-copy{display:grid!important;gap:3px!important;min-width:0!important;}
.period-command-copy span{display:flex!important;align-items:center!important;gap:8px!important;font-size:11px!important;font-weight:950!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#2563eb!important;}
.period-command-copy strong{font-size:17px!important;line-height:1.1!important;color:#0f172a!important;font-weight:950!important;}
.period-command-copy small{color:#64748b!important;font-size:12px!important;font-weight:750!important;line-height:1.45!important;}
.period-command-strip .module-period-select{margin-left:auto!important;z-index:100!important;}
.period-command-strip .period-trigger{height:44px!important;min-width:156px!important;padding:0 16px!important;background:#0f172a!important;color:#fff!important;border:0!important;box-shadow:0 14px 34px rgba(15,23,42,.20)!important;}
.period-command-strip .period-trigger i{color:inherit!important;}
.period-command-strip .period-menu{right:0!important;left:auto!important;top:calc(100% + 12px)!important;z-index:20000!important;min-width:330px!important;padding:10px!important;border-radius:22px!important;}
.period-command-strip .period-menu button{display:flex!important;align-items:center!important;gap:10px!important;min-height:40px!important;border-radius:14px!important;font-weight:900!important;}
.period-command-strip .period-menu button i{width:18px!important;color:#2563eb!important;text-align:center!important;}
.period-command-strip .pro-custom-period{margin-top:8px!important;padding:12px!important;border-radius:18px!important;background:#f8fbff!important;border:1px solid #dbe7f7!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;}
.period-command-strip .custom-period-head{align-items:flex-start!important;}
.period-command-strip .custom-period-head span{font-size:14px!important;}
.period-command-strip .custom-period-head small{text-align:left!important;max-width:150px!important;}
.period-command-strip .custom-period-fields input{background:#fff!important;border-color:#cbdaf0!important;}
.period-command-strip .custom-period-apply{height:42px!important;font-weight:950!important;}
@media(max-width:780px){
  .period-command-strip{align-items:stretch!important;flex-direction:column!important;padding:13px!important;}
  .period-command-strip .module-period-select{width:100%!important;margin-left:0!important;}
  .period-command-strip .period-trigger{width:100%!important;justify-content:space-between!important;}
  .period-command-strip .period-menu{left:0!important;right:auto!important;min-width:min(92vw,340px)!important;}
}

/* v32 — period trigger visible in module heads */
.unified-module-head .module-head-actions,
.page-title > .actions {
  align-items: center !important;
  gap: 10px !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 80 !important;
}
.unified-module-head .module-period-select,
.page-title .module-period-select {
  order: -10 !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  position: relative !important;
  z-index: 120 !important;
  overflow: visible !important;
}
.unified-module-head .module-period-select .period-trigger,
.page-title .module-period-select .period-trigger {
  min-width: 148px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg,#ffffff,#f8fbff) !important;
  border: 1px solid #dbeafe !important;
  color: #0f172a !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.10) !important;
}
.unified-module-head .module-period-select .period-trigger:before,
.page-title .module-period-select .period-trigger:before {
  content: "Période";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 900;
  color: #64748b;
  margin-right: 2px;
}
.unified-module-head .module-period-select:has(.period-menu),
.page-title .module-period-select:has(.period-menu) { z-index: 13000 !important; }
.unified-module-head .module-period-select .period-menu,
.page-title .module-period-select .period-menu {
  right: 0 !important;
  left: auto !important;
  top: calc(100% + 12px) !important;
  z-index: 14000 !important;
}
@media (max-width: 720px){
  .unified-module-head .module-period-select,
  .page-title .module-period-select { width: 100% !important; }
  .unified-module-head .module-period-select .period-trigger,
  .page-title .module-period-select .period-trigger { width: 100% !important; justify-content: space-between !important; }
}

/* v33 exact date period controls */
.exact-date-trigger .period-trigger{
  min-width:158px!important;
  border:1px solid #bfdbfe!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
}
.exact-period-menu{min-width:330px!important;}
.exact-day-period{display:grid!important;gap:10px!important;margin:8px 0!important;padding:12px!important;border-radius:18px!important;background:#f8fbff!important;border:1px solid #dbe7f7!important;}
.exact-day-field{display:grid!important;gap:6px!important;font-weight:900!important;color:#475569!important;}
.exact-day-field input{height:42px!important;border-radius:14px!important;border:1px solid #cbdaf0!important;background:#fff!important;padding:0 12px!important;font-weight:850!important;color:#0f172a!important;}
.page-title .actions,.module-head-actions{overflow:visible!important;position:relative!important;z-index:90!important;}
.page-title .actions .module-period-select,.module-head-actions .module-period-select{z-index:100!important;}
.page-title .actions .module-period-select:has(.period-menu),.module-head-actions .module-period-select:has(.period-menu){z-index:15000!important;}
@media(max-width:720px){.exact-period-menu{min-width:min(94vw,340px)!important}.exact-date-trigger .period-trigger{width:100%!important;justify-content:space-between!important}}

/* v36 document style studio */
.document-style-page{gap:18px}.doc-style-hero{border:1px solid rgba(15,23,42,.08);border-radius:24px;padding:22px;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;display:flex;justify-content:space-between;gap:18px;align-items:center;box-shadow:0 18px 40px rgba(15,23,42,.18)}
.doc-style-hero span{opacity:.75;font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:12px}.doc-style-hero h2{margin:4px 0;font-size:28px}.doc-style-hero p{margin:0;max-width:720px;color:rgba(255,255,255,.78)}.doc-style-summary{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:18px;padding:14px;min-width:190px;display:grid;gap:5px}.doc-style-summary b{width:46px;height:46px;border-radius:14px;background:#fff;color:#0f172a;display:grid;place-items:center}.doc-style-summary span{font-size:16px;text-transform:none;letter-spacing:0;opacity:1}.doc-style-summary small{color:rgba(255,255,255,.7)}
.doc-style-group{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:24px;padding:18px;box-shadow:0 16px 36px rgba(15,23,42,.06)}.doc-style-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}.doc-style-head small{color:#64748b;font-weight:800;text-transform:uppercase;font-size:11px}.doc-style-head h3{margin:2px 0 0}.doc-style-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.doc-style-option{position:relative;border:1px solid #e5e7eb;border-radius:18px;padding:12px;cursor:pointer;background:#f8fafc;display:grid;gap:9px;transition:.18s ease}.doc-style-option input{position:absolute;opacity:0}.doc-style-option:hover,.doc-style-option.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 16px 32px rgba(37,99,235,.14);transform:translateY(-1px)}.doc-style-option strong{color:#0f172a}.doc-style-option small{color:#64748b;line-height:1.45}.doc-mini-preview{height:160px;border-radius:14px;padding:12px;background:#fff;border:1px solid #e5e7eb;display:grid;grid-template-rows:auto 1fr auto;gap:8px;overflow:hidden}.doc-mini-preview header{display:flex;justify-content:space-between;gap:8px;font-size:10px}.doc-mini-preview header b{font-size:12px}.doc-mini-preview p{height:7px;background:#e5e7eb;border-radius:99px;margin:0 0 6px}.mini-table{display:grid;gap:5px}.mini-table i{height:16px;border-radius:7px;background:#f1f5f9}.doc-mini-preview footer{display:flex;justify-content:flex-end}.doc-mini-preview footer strong{background:#111827;color:#fff;padding:6px 8px;border-radius:8px;font-size:11px}.doc-mini-preview.dark{background:#0f172a;color:#fff}.doc-mini-preview.dark p,.doc-mini-preview.dark .mini-table i{background:rgba(255,255,255,.15)}.doc-mini-preview.dark footer strong{background:#fff;color:#0f172a}.doc-mini-preview.blue{border-top:5px solid #2563eb}.doc-mini-preview.light{background:#fff}.doc-mini-preview.slate{background:#f1f5f9}.doc-style-settings{border-radius:22px}.sticky-actions{position:sticky;bottom:14px;background:rgba(255,255,255,.86);backdrop-filter:blur(10px);border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:12px;z-index:8}
.pdf-style-modern .facture-brand,.pdf-style-modern .delivery-brand{border-top:6px solid #2563eb}.pdf-style-clean{box-shadow:none!important;border:1px solid #e5e7eb!important}.pdf-style-compact{font-size:11px!important}.pdf-style-compact .facture-table th,.pdf-style-compact .facture-table td,.pdf-style-compact .delivery-table th,.pdf-style-compact .delivery-table td{padding:5px!important}.pdf-style-premium .facture-brand,.pdf-style-premium .delivery-brand{background:linear-gradient(135deg,#0f172a,#1e293b)!important;color:#fff!important}.pdf-style-premium .facture-brand span,.pdf-style-premium .invoice-company-meta span,.pdf-style-premium .delivery-brand span{color:rgba(255,255,255,.72)!important}
@media(max-width:1100px){.doc-style-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.doc-style-hero{flex-direction:column;align-items:flex-start}.doc-style-summary{width:100%}}@media(max-width:640px){.doc-style-grid{grid-template-columns:1fr}.doc-style-hero h2{font-size:23px}}

/* v37 - Dépenses list period and pagination polish */
.expense-list-card .expense-list-toolbar { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.expense-list-card .expense-list-toolbar > .actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.expense-list-card .module-period-select { min-width: 180px; }
.expense-list-card .period-trigger svg { width: 18px; height: 18px; }
.expense-list-card .period-menu { right: 0; left: auto; z-index: 80; }
.list-pagination.always-visible { display:flex; margin-top: 14px; }
.list-pagination.always-visible .page-dot { min-width: 54px; }
@media (max-width: 760px) {
  .expense-list-card .expense-list-toolbar > .actions { width: 100%; justify-content: stretch; }
  .expense-list-card .module-period-select,
  .expense-list-card .btn { flex: 1 1 100%; }
}

/* v38 - quick exact date selector for Dépenses header */
.exact-date-quick{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;
  background:rgba(255,255,255,.82);
  box-shadow:0 12px 30px rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
}
.exact-date-quick label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 10px;
  border-radius:14px;
  background:rgba(248,250,252,.95);
  color:#475569;
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
}
.exact-date-quick label i{color:#2563eb;}
.exact-date-quick input{
  width:104px;
  border:0;
  outline:0;
  background:transparent;
  color:#0f172a;
  font-weight:900;
  text-align:center;
}
.exact-date-quick .btn{min-height:38px;border-radius:14px;}
@media (max-width: 760px){
  .page-title .actions{align-items:stretch;width:100%;}
  .exact-date-quick{width:100%;justify-content:space-between;}
  .exact-date-quick label{flex:1;justify-content:flex-start;}
  .exact-date-quick input{width:96px;}
}


/* v39 — scoped layering fix: only the OPEN date menu goes above cards.
   Normal command strips/buttons must stay below notifications, profile drawer and modals. */
.period-command-strip,
.module-head-actions,
.page-title > .actions,
.page-title .actions,
.unified-module-head .module-head-actions,
.client-head-actions,
.stock-head-actions {
  z-index: 1 !important;
}
.period-command-strip .module-period-select,
.module-head-actions .module-period-select,
.page-title .module-period-select,
.page-title .actions .module-period-select,
.unified-module-head .module-period-select,
.dashboard-period-select,
.repair-period-dropdown,
.period-select {
  z-index: 2 !important;
}
.period-command-strip .period-trigger,
.period-command-strip .btn,
.module-head-actions .btn,
.page-title .actions .btn,
.unified-module-head .btn,
.btn.ghost,
.btn.primary {
  position: relative !important;
  z-index: 1 !important;
}
/* when the period dropdown is actually open, lift only its wrapper and menu */
.period-select:has(> .period-menu),
.module-period-select:has(> .period-menu),
.dashboard-period-select:has(> .period-menu),
.repair-period-dropdown:has(> .period-menu) {
  z-index: 9000 !important;
}
.period-select > .period-menu,
.module-period-select > .period-menu,
.dashboard-period-select > .period-menu,
.repair-period-dropdown > .period-menu,
.period-command-strip .period-menu,
.unified-module-head .module-period-select .period-menu,
.page-title .module-period-select .period-menu {
  z-index: 9001 !important;
}
/* drawers/dropdowns from the top bar always stay above regular page controls */
.slide-panel,
.notification-center,
.profile-menu-clean {
  z-index: 30000 !important;
}
.topbar,
.profile {
  position: relative !important;
  z-index: 25000 !important;
}
/* modals stay highest */
.modal-backdrop,
.command-backdrop,
.module-launcher-backdrop {
  z-index: 20000000 !important;
}
.modal,
.command-palette,
.module-launcher {
  z-index: 20000001 !important;
}


/* v42 - Date period icon + global UX polish */
.sr-only {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.page-title,
.module-hero,
.unified-module-head,
.toolbar,
.card .toolbar,
.period-command-strip {
  gap: 14px;
}
.page-title .actions,
.module-head-actions,
.toolbar .actions,
.card .actions,
.cc-hero-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}
.btn,
.icon-btn,
.period-trigger {
  line-height:1.1;
  white-space:nowrap;
}
.btn {
  min-height:38px;
  padding:9px 13px;
  border-radius:12px;
  font-size:13px;
}
.btn svg,
.btn i,
.period-trigger svg,
.period-trigger i {
  flex:0 0 auto;
}
.period-select.icon-only-period .period-trigger {
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  justify-content:center;
  border-radius:14px;
}
.period-select.icon-only-period .period-trigger svg:first-child {
  margin:0;
}
.period-select.icon-only-period .period-trigger svg:last-child {
  width:15px;
  height:15px;
  position:absolute;
  right:4px;
  bottom:4px;
  opacity:.72;
}
.period-select.icon-only-period .period-menu {
  min-width:220px;
}
.compact-period-menu button span {
  white-space:nowrap;
}
.period-command-strip {
  align-items:center;
  overflow:visible;
}
.period-command-copy {
  min-width:0;
}
.period-command-copy strong,
.period-command-copy small,
.module-title-block p,
.page-title p,
.card p,
.card small,
.muted {
  overflow-wrap:anywhere;
}
.card,
.cc-panel,
.module-hero,
.page-title,
.table-card,
.expense-list-card {
  overflow:visible;
}
.data-table,
.table,
table {
  table-layout:auto;
}
td, th {
  vertical-align:middle;
}
td *, th * {
  max-width:100%;
}
.profile-card,
.notifications-menu,
.profile-menu,
.drawer {
  z-index:260!important;
}
.modal-overlay,
.modal {
  z-index:360!important;
}
.period-select {
  position:relative;
  z-index:6;
}
.period-select:has(.period-menu),
.repair-period-dropdown:has(.period-menu) {
  z-index:120;
}
.period-menu,
.period-dropdown {
  z-index:140!important;
}
@media (max-width: 760px) {
  .page-title,
  .module-hero,
  .unified-module-head,
  .period-command-strip {
    align-items:flex-start;
  }
  .page-title .actions,
  .module-head-actions,
  .toolbar .actions {
    justify-content:flex-start;
    width:100%;
  }
  .btn {
    min-height:36px;
    padding:8px 11px;
    font-size:12.5px;
  }
  .period-select.icon-only-period .period-trigger {
    width:40px;
    height:40px;
    min-width:40px;
  }
}

/* v43 - Clean date period UX + stronger dashboard */
.period-command-strip{display:none!important;}
.page-title .actions .period-select.icon-only-period .period-trigger,
.module-head-actions .period-select.icon-only-period .period-trigger,
.expense-list-card .period-select.icon-only-period .period-trigger{
  width:42px!important;min-width:42px!important;height:42px!important;padding:0!important;
  border-radius:14px!important;display:inline-grid!important;place-items:center!important;
  background:linear-gradient(180deg,#fff,#f8fbff)!important;border:1px solid #dbeafe!important;
  box-shadow:0 10px 24px rgba(15,23,42,.08)!important;color:#0f172a!important;
}
.period-select.icon-only-period .period-trigger:before{display:none!important;content:none!important;}
.period-select.icon-only-period .period-trigger svg{width:20px!important;height:20px!important;}
.period-select.icon-only-period .period-trigger svg:last-child{width:13px!important;height:13px!important;right:3px!important;bottom:3px!important;position:absolute!important;}
.period-select.icon-only-period .period-menu{min-width:230px!important;max-width:min(92vw,270px)!important;padding:8px!important;border-radius:18px!important;}
.period-select.icon-only-period .period-menu button{min-height:38px!important;border-radius:12px!important;font-size:13px!important;}
.period-select.icon-only-period .pro-custom-period{padding:10px!important;border-radius:14px!important;}
.period-select.icon-only-period .custom-period-head small{display:none!important;}
.period-select.icon-only-period .custom-period-fields{grid-template-columns:1fr!important;gap:8px!important;}
.period-select.icon-only-period .custom-period-fields input{height:38px!important;}
.period-select.icon-only-period .custom-period-apply{height:38px!important;font-size:12.5px!important;}

.control-center-dashboard{display:grid!important;gap:18px!important;}
.control-center-dashboard .cc-hero{padding:24px!important;border-radius:28px!important;align-items:center!important;min-height:auto!important;background:radial-gradient(circle at 84% 0%,rgba(250,204,21,.20),transparent 34%),linear-gradient(135deg,#05070d 0%,#0d1728 52%,#1f2937 100%)!important;}
.control-center-dashboard .cc-hero h1{font-size:clamp(26px,3.2vw,42px)!important;line-height:1.02!important;margin:4px 0 8px!important;}
.control-center-dashboard .cc-hero p{max-width:620px!important;font-size:14px!important;line-height:1.55!important;color:rgba(255,255,255,.76)!important;}
.control-center-dashboard .cc-eyebrow{display:inline-flex!important;align-items:center!important;gap:8px!important;color:#facc15!important;font-size:11px!important;letter-spacing:.12em!important;text-transform:uppercase!important;font-weight:950!important;}
.control-center-dashboard .cc-hero-actions .btn,.control-center-dashboard .dashboard-period-select .period-trigger{height:40px!important;min-height:40px!important;padding:0 13px!important;border-radius:13px!important;font-size:12.5px!important;}
.control-center-dashboard .cc-kpi-grid{gap:14px!important;}
.control-center-dashboard .cc-kpi{min-height:132px!important;padding:17px!important;border-radius:22px!important;box-shadow:0 14px 34px rgba(15,23,42,.07)!important;}
.control-center-dashboard .cc-kpi strong{font-size:clamp(20px,2.1vw,28px)!important;line-height:1.05!important;overflow-wrap:anywhere!important;}
.control-center-dashboard .cc-kpi small{line-height:1.35!important;}
.dashboard-stat-deck{display:grid!important;grid-template-columns:1.35fr repeat(4,minmax(0,1fr))!important;gap:14px!important;align-items:stretch!important;}
.dashboard-stat-deck article{background:#fff!important;border:1px solid rgba(15,23,42,.08)!important;border-radius:22px!important;padding:16px!important;box-shadow:0 16px 36px rgba(15,23,42,.06)!important;display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.dashboard-stat-deck .deck-main{display:grid!important;gap:6px!important;align-items:start!important;background:linear-gradient(135deg,#0f172a,#1e293b)!important;color:#fff!important;}
.dashboard-stat-deck span{font-weight:850!important;color:#64748b!important;font-size:12px!important;line-height:1.25!important;}
.dashboard-stat-deck .deck-main span,.dashboard-stat-deck .deck-main small{color:rgba(255,255,255,.72)!important;}
.dashboard-stat-deck strong{font-size:clamp(20px,2vw,30px)!important;line-height:1.05!important;font-weight:950!important;color:#0f172a!important;overflow-wrap:anywhere!important;}
.dashboard-stat-deck .deck-main strong{color:#fff!important;}
.dashboard-stat-deck small{color:#64748b!important;font-weight:700!important;line-height:1.35!important;}
.dashboard-stat-deck > article > i{width:42px!important;height:42px!important;border-radius:14px!important;background:#eff6ff!important;color:#2563eb!important;display:grid!important;place-items:center!important;flex:0 0 auto!important;}
.deck-meter{height:8px!important;background:rgba(255,255,255,.16)!important;border-radius:999px!important;overflow:hidden!important;margin-top:4px!important;}
.deck-meter i{display:block!important;height:100%!important;border-radius:inherit!important;background:linear-gradient(90deg,#22c55e,#facc15)!important;}
.control-center-dashboard .cc-main-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;gap:16px!important;align-items:stretch!important;}
.control-center-dashboard .cc-panel{border-radius:24px!important;overflow:hidden!important;}
.control-center-dashboard .cc-panel-head{gap:10px!important;align-items:center!important;}
.control-center-dashboard .cc-panel-head h3{font-size:19px!important;line-height:1.15!important;}
.control-center-dashboard .cc-panel-head button{min-height:36px!important;padding:8px 11px!important;font-size:12px!important;}
.activity-command-center{padding-top:12px!important;}
.activity-command-head,.activity-action-stack button{min-width:0!important;}
.activity-action-stack button small,.activity-action-stack button strong{overflow-wrap:anywhere!important;}
@media(max-width:1180px){.dashboard-stat-deck{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dashboard-stat-deck .deck-main{grid-column:1/-1!important}.control-center-dashboard .cc-main-grid{grid-template-columns:1fr!important}}
@media(max-width:680px){.dashboard-stat-deck{grid-template-columns:1fr!important}.control-center-dashboard .cc-hero{padding:18px!important;border-radius:22px!important}.control-center-dashboard .cc-hero-actions{justify-content:flex-start!important}.control-center-dashboard .cc-hero-actions .btn{flex:1 1 auto!important}.control-center-dashboard .dashboard-period-select{flex:0 0 auto!important}.dashboard-stat-deck article{padding:14px!important}.control-center-dashboard .cc-kpi{min-height:auto!important}}

/* v44 - Clean expenses period + dashboard readability */
.expenses-pro-page .period-command-strip,
.period-command-strip { display:none!important; }
.expenses-pro-page .page-title .period-select,
.page-title .actions .expenses-head-period { display:none!important; }
.clean-expense-toolbar{
  align-items:center!important;
  gap:12px!important;
  padding-bottom:10px!important;
}
.clean-expense-toolbar > div:first-child{
  min-width:0!important;
}
.clean-expense-toolbar h3{
  margin:0!important;
  font-size:18px!important;
  line-height:1.2!important;
  letter-spacing:-.02em!important;
}
.clean-expense-toolbar .muted{
  display:block!important;
  margin-top:3px!important;
  font-size:12.5px!important;
  line-height:1.35!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.clean-expense-toolbar .actions{
  gap:8px!important;
  flex-wrap:nowrap!important;
}
.clean-expense-toolbar .btn{
  min-height:36px!important;
  height:36px!important;
  padding:0 11px!important;
  border-radius:12px!important;
  font-size:12.5px!important;
}
.expense-list-card .period-select.icon-only-period .period-trigger{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  border-radius:12px!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  border-color:#e2e8f0!important;
  background:#fff!important;
}
.expense-list-card .period-select.icon-only-period .period-trigger svg:first-child{
  width:19px!important;
  height:19px!important;
}
.expense-list-card .period-select.icon-only-period .period-trigger svg:last-child{
  width:11px!important;
  height:11px!important;
  right:2px!important;
  bottom:2px!important;
}
.expense-list-card .period-select.icon-only-period .period-menu{
  right:0!important;
  left:auto!important;
  min-width:220px!important;
  box-shadow:0 18px 44px rgba(15,23,42,.16)!important;
}
.expense-list-card{
  box-shadow:0 12px 30px rgba(15,23,42,.05)!important;
}
.expense-list-card .table-wrap,
.expense-list-card table{
  font-size:13px!important;
}
.expense-list-card th,
.expense-list-card td{
  padding:11px 10px!important;
  line-height:1.35!important;
  white-space:normal!important;
}
.expense-list-card td strong{font-size:13px!important;}

.control-center-dashboard,
.control-center-dashboard *{
  text-overflow:clip!important;
}
.control-center-dashboard .cc-panel,
.control-center-dashboard .cc-kpi,
.dashboard-stat-deck article{
  overflow:visible!important;
}
.control-center-dashboard .cc-kpi small,
.control-center-dashboard .cc-kpi strong,
.control-center-dashboard .cc-panel-head h3,
.control-center-dashboard .cc-panel-head span,
.control-center-dashboard .cc-activity-list strong,
.control-center-dashboard .cc-activity-list small,
.control-center-dashboard .cc-action-list small,
.control-center-dashboard .cc-pipeline-row span,
.activity-action-stack button small,
.activity-action-stack button strong{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.35!important;
}
.control-center-dashboard .cc-activity-list article{
  grid-template-columns:34px minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:10px!important;
  padding:10px!important;
}
.control-center-dashboard .cc-activity-list em{
  white-space:normal!important;
  text-align:right!important;
  font-size:11.5px!important;
  line-height:1.25!important;
}
.control-center-dashboard .cc-panel-head h3{font-size:17px!important;}
.control-center-dashboard .cc-panel-head span{font-size:11px!important;}
.control-center-dashboard .cc-kpi{min-height:118px!important;}
.control-center-dashboard .cc-kpi strong{font-size:clamp(18px,1.8vw,25px)!important;}
.control-center-dashboard .cc-kpi small{font-size:12px!important;}
.dashboard-stat-deck strong{font-size:clamp(18px,1.75vw,26px)!important;}
.dashboard-stat-deck small{font-size:12px!important;}
.dashboard-stat-deck span{font-size:11.5px!important;}

@media(max-width:760px){
  .clean-expense-toolbar{align-items:flex-start!important;}
  .clean-expense-toolbar .actions{width:100%!important;justify-content:flex-start!important;flex-wrap:wrap!important;}
  .expense-list-card .period-select.icon-only-period .period-trigger{width:38px!important;min-width:38px!important;height:38px!important;}
}


/* v45 - Expenses date control + dashboard readability */
.page-title .actions { align-items: center; flex-wrap: wrap; gap: 8px; }
.page-title .actions .period-select.expenses-head-period { position: relative; z-index: 8; }
.expenses-head-period.icon-only-period .period-trigger,
.icon-only-period .period-trigger {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  justify-content: center !important;
  border-radius: 14px !important;
  gap: 0 !important;
}
.icon-only-period .period-trigger svg { width: 18px !important; height: 18px !important; }
.icon-only-period .period-trigger svg:last-child { display: none !important; }
.icon-only-period .period-trigger .sr-only { position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important; }
.expense-list-toolbar .actions .period-select { display: none !important; }
.clean-expense-toolbar { align-items: center !important; gap: 10px !important; }
.clean-expense-toolbar h3 { margin: 0; font-size: 1rem !important; }
.clean-expense-toolbar small { display:block; margin-top: 3px; line-height: 1.35; }
.clean-expense-toolbar .actions .btn { height: 38px; padding: 0 12px; font-size: .86rem; border-radius: 12px; }
.table-sort-btn { border:0; background:transparent; color:inherit; font:inherit; font-weight:800; cursor:pointer; padding:0; display:inline-flex; align-items:center; gap:4px; }
.expenses-pro-page .table-wrap table th,
.expenses-pro-page .table-wrap table td { white-space: normal !important; line-height: 1.35; font-size: .88rem; }
.expenses-pro-page .table-wrap table th { font-size: .78rem; }
.period-menu.compact-period-menu,
.expenses-head-period .period-menu {
  width: 250px !important;
  min-width: 250px !important;
  max-width: min(92vw, 290px) !important;
  overflow: visible !important;
  padding: 10px !important;
}
.period-menu .pro-custom-period,
.period-menu .custom-period {
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  display: grid !important;
  gap: 8px !important;
}
.custom-period-fields { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
.custom-period-fields label,
.custom-period label { min-width: 0 !important; }
.custom-period input { width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
.custom-period-apply { width: 100% !important; min-height: 36px !important; }

.dashboard-nextgen { --dash-gap: 16px; display: grid; gap: var(--dash-gap); }
.dash-hero-pro { border-radius: 28px !important; padding: 22px !important; align-items: center; background: linear-gradient(135deg, rgba(15,23,42,.98), rgba(15,118,110,.9)) !important; color: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.20); }
.dash-hero-pro h1 { font-size: clamp(1.7rem, 3vw, 2.45rem) !important; line-height: 1.12 !important; margin: 8px 0 !important; letter-spacing: -.04em; }
.dash-hero-pro p { max-width: 760px; line-height: 1.55 !important; margin: 0 !important; color: rgba(255,255,255,.82) !important; font-size: .95rem !important; }
.dash-hero-pro .cc-hero-actions .btn,
.dash-hero-pro .period-trigger { min-height: 40px !important; padding: 0 13px !important; font-size: .86rem !important; border-radius: 13px !important; }
.dash-live-row { display:grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dash-live-card { background:#fff; border:1px solid rgba(148,163,184,.22); border-radius:20px; padding:14px; display:grid; gap:7px; min-height:132px; box-shadow:0 14px 32px rgba(15,23,42,.06); }
[data-theme="dark"] .dash-live-card,
[data-theme="dark"] .dash-focus-card { background: rgba(15,23,42,.74); border-color: rgba(148,163,184,.18); }
.dash-live-card div { width:38px; height:38px; border-radius:13px; display:grid; place-items:center; background:rgba(15,118,110,.1); color:#0f766e; }
.dash-live-card span { font-size:.78rem; color:#64748b; font-weight:800; line-height:1.25; }
.dash-live-card strong { font-size:1.18rem; color:#0f172a; line-height:1.15; overflow-wrap:anywhere; }
[data-theme="dark"] .dash-live-card strong,
[data-theme="dark"] .dash-focus-card h3,
[data-theme="dark"] .dash-focus-card strong { color:#f8fafc; }
.dash-live-card small { font-size:.76rem; color:#64748b; line-height:1.3; white-space: normal; overflow: visible; text-overflow: clip; }
.dash-focus-grid { display:grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: var(--dash-gap); }
.dash-focus-grid.second { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-bottom-modern { display:grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, .78fr); gap: var(--dash-gap); }
.dash-focus-card { background:#fff; border:1px solid rgba(148,163,184,.22); border-radius:24px; padding:18px; box-shadow:0 16px 42px rgba(15,23,42,.07); min-width:0; }
.dash-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.dash-card-head span { display:block; color:#64748b; font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; font-weight:900; }
.dash-card-head h3 { margin:3px 0 0; font-size:1.15rem; line-height:1.25; letter-spacing:-.02em; }
.dash-card-head button { border:0; border-radius:999px; padding:8px 11px; background:#f1f5f9; color:#0f172a; font-size:.78rem; font-weight:800; cursor:pointer; white-space:nowrap; }
.dash-finance-strip { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.dash-finance-strip p { margin:0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:16px; padding:11px; display:grid; gap:4px; }
.dash-finance-strip span { font-size:.75rem; color:#64748b; font-weight:800; }
.dash-finance-strip strong { font-size:.98rem; color:#0f172a; overflow-wrap:anywhere; }
.dash-chart-soft .cc-chart { min-height: 215px; }
.health-meter-line { height:10px; border-radius:999px; overflow:hidden; background:#e2e8f0; margin:12px 0 14px; }
.health-meter-line i { display:block; height:100%; background:linear-gradient(90deg,#f59e0b,#14b8a6); border-radius:inherit; }
.health-clean-list { display:grid; gap:9px; }
.health-clean-list p { margin:0; display:flex; justify-content:space-between; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid rgba(148,163,184,.22); }
.health-clean-list span { color:#64748b; font-weight:750; font-size:.84rem; }
.health-clean-list strong { font-size:.92rem; overflow-wrap:anywhere; text-align:right; }
.dash-pipeline-modern { display:grid; gap:9px; }
.dash-pipeline-modern article { display:grid; grid-template-columns:minmax(100px,1fr) 44px minmax(90px,1.2fr); gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid rgba(148,163,184,.2); }
.dash-pipeline-modern span { font-size:.86rem; font-weight:800; color:#334155; }
.dash-pipeline-modern strong { text-align:center; }
.dash-pipeline-modern i { height:8px; background:#14b8a6; border-radius:999px; }
.dash-action-modern { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.dash-action-modern button { text-align:left; border:1px solid #e2e8f0; background:#fff; border-radius:16px; padding:11px; display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:9px; align-items:center; cursor:pointer; }
.dash-action-modern i { width:34px; height:34px; border-radius:12px; display:grid; place-items:center; background:#f1f5f9; color:#0f766e; }
.dash-action-modern strong { display:block; font-size:.86rem; line-height:1.2; white-space:normal; }
.dash-action-modern small { display:block; color:#64748b; font-size:.75rem; line-height:1.3; white-space:normal; }
.dash-action-modern em { font-style:normal; font-weight:900; color:#0f172a; }
.dash-action-modern .hot { border-color:rgba(245,158,11,.35); background:#fffbeb; }
.dash-client-list article,
.dash-activity-list article { align-items:center; }
.dash-client-list strong,
.dash-client-list small,
.dash-activity-list strong,
.dash-activity-list small { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height:1.3 !important; }
.dash-ai-list { margin:0; padding-left:18px; display:grid; gap:10px; }
.dash-ai-list li { font-size:.88rem; line-height:1.45; color:#334155; }
.cc-kpi small,.cc-kpi strong,.cc-activity-list small,.cc-activity-list strong { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
@media (max-width: 1180px){ .dash-live-row{grid-template-columns:repeat(3,1fr)} .dash-focus-grid,.dash-focus-grid.second,.dash-bottom-modern{grid-template-columns:1fr} }
@media (max-width: 720px){ .dash-live-row{grid-template-columns:repeat(2,1fr)} .dash-finance-strip,.dash-action-modern{grid-template-columns:1fr} .dash-hero-pro{padding:18px!important} .custom-period-fields{grid-template-columns:1fr!important} }


/* v46 - clean expenses header period selector + readable dashboard fallback */
.expenses-pro-page .expense-list-card .expenses-list-period{display:none!important;}
.page-title .actions .expenses-head-period{position:relative!important;z-index:60!important;}
.page-title .actions .expenses-head-period .period-trigger{height:38px!important;min-width:44px!important;padding:0 12px!important;border-radius:13px!important;gap:8px!important;font-size:12px!important;font-weight:800!important;box-shadow:0 8px 20px rgba(15,23,42,.08)!important;}
.page-title .actions .expenses-head-period.icon-only-period .period-trigger span:not(.sr-only){display:none!important;}
.page-title .actions .expenses-head-period .period-menu{right:0!important;left:auto!important;top:calc(100% + 8px)!important;min-width:280px!important;max-width:min(92vw,320px)!important;max-height:none!important;overflow:visible!important;z-index:9000!important;padding:10px!important;border-radius:18px!important;box-shadow:0 24px 70px rgba(15,23,42,.24)!important;}
.page-title .actions .expenses-head-period .period-menu button{min-height:36px!important;padding:8px 10px!important;border-radius:12px!important;font-size:12px!important;font-weight:800!important;}
.page-title .actions .expenses-head-period .pro-custom-period{margin-top:8px!important;padding:10px!important;border-radius:14px!important;display:grid!important;gap:8px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;}
.page-title .actions .expenses-head-period .custom-period-head small{display:none!important;}
.page-title .actions .expenses-head-period .custom-period-fields{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
.page-title .actions .expenses-head-period .custom-period-fields label{display:grid!important;gap:4px!important;font-size:11px!important;font-weight:800!important;color:#64748b!important;}
.page-title .actions .expenses-head-period .custom-period-fields input{height:34px!important;border-radius:10px!important;font-size:12px!important;padding:0 9px!important;}
.page-title .actions .expenses-head-period .custom-period-apply{height:36px!important;min-height:36px!important;font-size:12px!important;border-radius:11px!important;}
.page-title .actions .btn{height:38px!important;padding:0 12px!important;border-radius:13px!important;font-size:12px!important;gap:7px!important;}
.expense-list-toolbar.clean-expense-toolbar{align-items:center!important;gap:12px!important;}
.expense-list-toolbar.clean-expense-toolbar h3{font-size:16px!important;line-height:1.2!important;margin:0!important;}
.expense-list-toolbar.clean-expense-toolbar small{font-size:12px!important;line-height:1.35!important;white-space:normal!important;}
.expense-list-toolbar.clean-expense-toolbar .actions .btn{height:34px!important;font-size:12px!important;padding:0 10px!important;border-radius:11px!important;}
.cc-panel *, .cc-hero *, .cc-stat-card *, .cc-dashboard-grid *{text-overflow:clip!important;}
.cc-panel small, .cc-panel p, .cc-panel span, .cc-panel strong, .cc-panel h3, .cc-stat-card small, .cc-stat-card p{white-space:normal!important;overflow:visible!important;line-height:1.35!important;}
.cc-panel h3{font-size:17px!important;}
.cc-panel small,.cc-panel p{font-size:12px!important;}
@media (max-width: 760px){
  .page-title .actions{gap:8px!important;flex-wrap:wrap!important;}
  .page-title .actions .expenses-head-period .period-menu{left:0!important;right:auto!important;}
}

/* v47 - Dashboard statistics visibility + premium equal priority cards */
.dashboard-nextgen .dash-focus-card {
  min-height: 100%;
}
.dashboard-nextgen .main-finance {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dashboard-nextgen .dash-chart-soft.cc-chart {
  height: 260px !important;
  min-height: 260px !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: end !important;
  padding: 18px 14px 4px !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.98)),
    repeating-linear-gradient(to top, transparent 0 48px, rgba(148,163,184,.16) 49px 50px) !important;
  border: 1px solid rgba(148,163,184,.26) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.dashboard-nextgen .dash-chart-soft .cc-chart-col {
  min-width: 0;
  gap: 5px;
}
.dashboard-nextgen .dash-chart-soft .cc-chart-col span {
  width: 11px !important;
  min-height: 12px !important;
  border-radius: 999px 999px 6px 6px !important;
  box-shadow: 0 10px 18px rgba(15,23,42,.12);
}
.dashboard-nextgen .dash-chart-soft .cc-chart-col .billed { background: linear-gradient(180deg,#14b8a6,#0f766e) !important; }
.dashboard-nextgen .dash-chart-soft .cc-chart-col .paid { background: linear-gradient(180deg,#86efac,#22c55e) !important; }
.dashboard-nextgen .dash-chart-soft .cc-chart-col .expense { background: linear-gradient(180deg,#fbbf24,#f59e0b) !important; }
.dashboard-nextgen .dash-chart-soft .cc-chart-col b {
  font-size: .74rem !important;
  font-weight: 850 !important;
  color: #64748b !important;
  bottom: 2px !important;
}
.dashboard-nextgen .cc-chart-legend {
  margin-top: 4px !important;
  padding-top: 4px;
  gap: 16px !important;
  align-items: center;
}
.dashboard-nextgen .cc-chart-legend:before {
  content: "Statistiques mensuelles" !important;
  margin-right: auto;
  color: #94a3b8;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.equal-stat-strip p {
  min-height: 74px;
  align-content: center;
  border-radius: 18px !important;
}
.equal-stat-strip span,
.health-clean-list span,
.dash-card-head span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.premium-priority-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 12px !important;
}
.premium-priority-grid .priority-tile {
  min-height: 94px;
  height: 100%;
  padding: 13px !important;
  border-radius: 20px !important;
  grid-template-columns: 38px minmax(0,1fr) 42px !important;
  background: linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border: 1px solid rgba(148,163,184,.26) !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.premium-priority-grid .priority-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15,23,42,.10);
}
.premium-priority-grid .priority-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15,118,110,.10);
  color: #0f766e;
}
.premium-priority-grid .priority-icon i {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  color: inherit !important;
  border-radius: 0 !important;
  font-size: .98rem;
}
.premium-priority-grid .priority-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.premium-priority-grid .priority-copy strong {
  font-size: .86rem !important;
  line-height: 1.28 !important;
  letter-spacing: -.01em;
  color: #0f172a;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.premium-priority-grid .priority-copy small {
  font-size: .74rem !important;
  line-height: 1.35 !important;
  color: #64748b !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.premium-priority-grid .priority-tile em {
  justify-self: end;
  align-self: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #fff !important;
  font-size: .86rem;
}
.premium-priority-grid .priority-tile.ok em { background: #e2e8f0; color: #334155 !important; }
.premium-priority-grid .priority-tile.hot { background: linear-gradient(180deg,#fffbeb,#fff) !important; border-color: rgba(245,158,11,.38) !important; }
.premium-priority-grid .priority-tile.hot .priority-icon { background: rgba(245,158,11,.14); color: #b45309; }
.premium-priority-grid .priority-tile.hot em { background: #f59e0b; }
.dashboard-nextgen .dash-focus-grid.second {
  align-items: stretch;
}
.dashboard-nextgen .dash-focus-grid.second > .dash-focus-card {
  display: flex;
  flex-direction: column;
}
.dashboard-nextgen .dash-pipeline-modern,
.dashboard-nextgen .premium-priority-grid {
  flex: 1;
}
@media (max-width: 820px) {
  .premium-priority-grid { grid-template-columns: 1fr !important; }
  .dashboard-nextgen .dash-chart-soft.cc-chart { height: 230px !important; min-height:230px !important; gap: 8px !important; }
  .dashboard-nextgen .dash-chart-soft .cc-chart-col span { width: 8px !important; }
}

/* v48 - Clients page + profile UX refresh */
.client-card-grid {
  align-items: stretch;
}
.crm-client-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  overflow: hidden;
}
.crm-client-card h3,
.crm-client-card p,
.crm-client-card small,
.crm-client-card span,
.crm-client-card strong {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.crm-client-info {
  flex: 1;
  align-content: start;
}
.crm-client-info span {
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}
.crm-client-foot {
  margin-top: auto;
  gap: 12px;
}
.crm-client-foot .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: .82rem;
}
.client-metric-strip,
.client-context-panel,
.client-filter-row {
  gap: 12px;
}
.client-metric-strip article {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.client-filter-row input,
.client-filter-row select {
  font-size: .9rem;
}
.profile-page-head {
  gap: 16px;
  align-items: center;
}
.profile-page-head h1,
.profile-page-head p {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.client-profile-pro-v2 {
  display: grid;
  gap: 16px;
}
.client-profile-hero-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(20,184,166,.14), transparent 34%),
    linear-gradient(135deg, #fff 0%, #f8fafc 52%, #eef6f5 100%);
  box-shadow: 0 18px 50px rgba(15,23,42,.08);
}
.client-profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.client-profile-avatar-v2 {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  box-shadow: 0 14px 30px rgba(15,23,42,.12);
  flex: 0 0 auto;
}
.client-profile-avatar-v2.fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#0f766e,#14b8a6);
  color: #fff;
  font-weight: 900;
  font-size: 2rem;
}
.profile-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #0f766e;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.client-profile-identity h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: #0f172a;
}
.client-profile-identity p {
  margin: 6px 0 8px;
  color: #64748b;
  line-height: 1.45;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.profile-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.client-profile-actions-v2 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 520px;
}
.client-profile-actions-v2 .btn,
.client-profile-panel .btn.mini {
  min-height: 34px;
  padding: 0 11px;
  font-size: .8rem;
  border-radius: 11px;
}
.client-profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
}
.client-profile-overview-grid > article {
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.client-profile-overview-grid > article span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.client-profile-overview-grid > article strong {
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #0f172a;
  white-space: normal !important;
}
.client-profile-overview-grid > article small {
  margin-top: 4px;
  color: #64748b;
  white-space: normal !important;
}
.client-profile-score-card {
  flex-direction: row !important;
  align-items: center;
  gap: 16px;
  justify-content: flex-start !important;
}
.client-score-ring {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: conic-gradient(#14b8a6 var(--score), #e2e8f0 0);
  position: relative;
}
.client-score-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #fff;
}
.client-score-ring strong,
.client-score-ring span {
  position: relative;
  z-index: 1;
  grid-area: 1/1;
  text-align: center;
}
.client-score-ring strong {
  margin-top: -12px;
  font-size: 1.45rem !important;
}
.client-score-ring span {
  margin-top: 32px;
  font-size: .68rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.client-profile-score-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.client-profile-score-card p,
.client-profile-score-card small {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
  white-space: normal !important;
}
.client-profile-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
.client-profile-action-grid article {
  min-height: 96px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 10px;
  align-items: center;
}
.client-profile-action-grid i {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #ecfeff;
  color: #0f766e;
}
.client-profile-action-grid span,
.client-profile-action-grid em {
  min-width: 0;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.client-profile-action-grid strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}
.client-profile-action-grid small,
.client-profile-action-grid em {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.35;
  font-style: normal;
}
.client-profile-action-grid em {
  grid-column: 2;
}
.client-profile-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  align-items: stretch;
}
.client-profile-panel {
  min-height: 330px;
  overflow: hidden;
}
.client-profile-panel.wide {
  grid-column: 1 / -1;
  min-height: 290px;
}
.client-profile-panel .toolbar.clean {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.client-profile-panel h3,
.client-profile-panel small,
.client-profile-panel td,
.client-profile-panel th,
.client-profile-panel strong,
.client-profile-panel span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.35;
}
.client-profile-panel table td small {
  display: block;
  font-size: .72rem;
  color: #64748b;
}
.client-info-lines {
  display: grid;
  gap: 10px;
}
.client-info-lines p {
  display: grid;
  grid-template-columns: 34px minmax(90px,.55fr) minmax(0,1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
}
.client-info-lines i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ecfeff;
  color: #0f766e;
}
.client-info-lines span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}
.client-info-lines strong {
  color: #0f172a;
  font-size: .88rem;
  word-break: break-word;
}
.client-history.pro {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}
.client-history.pro .history-card {
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}
@media (max-width: 1100px) {
  .client-profile-overview-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .client-profile-score-card { grid-column: 1 / -1; }
  .client-profile-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .client-profile-hero-v2 { align-items: flex-start; flex-direction: column; }
  .client-profile-actions-v2 { justify-content: flex-start; max-width: none; }
  .client-profile-overview-grid,
  .client-profile-main-grid,
  .client-profile-action-grid { grid-template-columns: 1fr; }
  .client-profile-panel.wide { grid-column: auto; }
  .client-profile-identity { align-items: flex-start; }
  .client-profile-avatar-v2 { width: 64px; height: 64px; border-radius: 18px; }
  .client-info-lines p { grid-template-columns: 34px 1fr; }
  .client-info-lines strong { grid-column: 2; }
}


/* v49 — MR3E corporate home + global UX polish */
.brand-logo-orb{background:#050505!important;overflow:hidden;border:1px solid rgba(255,255,255,.12)}
.brand-logo-orb img{width:100%;height:100%;object-fit:contain;display:block;padding:2px}
.mr3e-home-logo,.mr3e-footer-logo{width:44px;height:44px;object-fit:contain;border-radius:12px;background:#050505;padding:2px;box-shadow:0 10px 26px rgba(0,0,0,.18)}
.mr3e-corporate-home{--mr3e-yellow:#f5c400;--mr3e-dark:#070707;--mr3e-blue:#0f172a;background:linear-gradient(180deg,#070707 0%,#111827 38%,#f8fafc 38%,#fff 100%)}
.mr3e-nav{background:rgba(7,7,7,.82)!important;border-color:rgba(255,255,255,.10)!important;backdrop-filter:blur(16px)}
.mr3e-nav a,.mr3e-nav button{color:#fff!important}.home-social{display:inline-flex;gap:10px;align-items:center;color:#fff}.home-social i{width:28px;height:28px;border-radius:999px;background:rgba(255,255,255,.1);display:grid;place-items:center;font-size:13px}
.mr3e-hero{align-items:center}.mr3e-hero .as-pill{background:rgba(245,196,0,.14);color:#fef3c7;border:1px solid rgba(245,196,0,.28)}
.mr3e-hero .as-hero-copy h1,.mr3e-hero .as-hero-copy p{color:#fff}.mr3e-hero .as-hero-copy h1 em{color:#facc15}.mr3e-hero .as-trust span{background:rgba(255,255,255,.09);color:#fff;border-color:rgba(255,255,255,.12)}
.mr3e-hero-panel{background:linear-gradient(145deg,#111 0%,#202020 100%);border:1px solid rgba(255,255,255,.12);border-radius:34px;padding:28px;box-shadow:0 34px 80px rgba(0,0,0,.42);color:#fff;min-height:440px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;position:relative;overflow:hidden}
.mr3e-hero-panel:before{content:"";position:absolute;inset:auto -20% -40% -20%;height:65%;background:radial-gradient(circle,rgba(250,204,21,.22),transparent 60%)}
.mr3e-hero-panel>img{width:min(360px,78%);height:auto;object-fit:contain;position:relative;z-index:1;filter:drop-shadow(0 24px 50px rgba(0,0,0,.52))}
.mr3e-hero-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;width:100%;position:relative;z-index:1}.mr3e-hero-metrics article{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:14px;text-align:center}.mr3e-hero-metrics b{display:block;font-size:24px;color:#facc15}.mr3e-hero-metrics span{font-size:12px;color:#e5e7eb}.mr3e-hero-panel p{position:relative;z-index:1;text-align:center;color:#d1d5db;max-width:420px;margin:0}
.mr3e-quality{display:grid;place-items:center;margin:16px auto 20px;width:160px;height:160px;border-radius:50%;background:conic-gradient(#facc15 0 95%,#e5e7eb 95%);position:relative}.mr3e-quality:after{content:"";position:absolute;inset:16px;background:#fff;border-radius:50%}.mr3e-quality strong,.mr3e-quality span{position:relative;z-index:1}.mr3e-quality strong{font-size:38px}.mr3e-quality span{font-weight:800;color:#64748b}.mr3e-cta-logo{width:58px;height:58px;object-fit:contain;background:#050505;border-radius:15px;padding:3px}
.as-home .as-section{scroll-margin-top:90px}.as-home p,.as-home li{line-height:1.65}.as-modules-grid article,.as-benefits article,.as-price-grid article{height:auto;min-height:0}.as-modules-grid article p,.as-benefits article p{display:block!important;overflow:visible!important;text-overflow:clip!important;-webkit-line-clamp:unset!important}
/* global app readability */
.main,.content{min-width:0}.card,.cc-panel,.module-hero,.client-pro-card,.supplier-pro-card,.repair-work-card,.stock-widget,.expense-list-card{overflow:visible!important}.card p,.card small,.card span,.card strong,.cc-panel p,.cc-panel small,.cc-panel span{white-space:normal!important;text-overflow:clip!important;overflow:visible!important}.btn{min-height:36px;padding:8px 12px;font-size:13px;line-height:1.2}.btn svg,.btn i{flex:0 0 auto}.actions{gap:8px;flex-wrap:wrap;align-items:center}.toolbar{gap:12px;align-items:center}.toolbar h3,.page-title h2,.module-title-block h1{line-height:1.15}
.table-wrap{overflow-x:visible!important}.table-wrap table{table-layout:auto;width:100%}.table-wrap th,.table-wrap td{white-space:normal!important;word-break:normal;line-height:1.35;font-size:13px;vertical-align:middle}.badge{white-space:nowrap!important}.list-pagination{overflow:visible!important;flex-wrap:wrap}.page-nav svg,.page-dot svg{width:16px!important;height:16px!important}.page-nav{min-height:34px}.page-dot{min-width:34px;min-height:34px}
/* equal card rhythm across pages */
.client-pro-grid,.supplier-pro-grid,.stock-grid,.repair-card-grid,.employee-cards,.documents-grid{align-items:stretch}.client-pro-card,.supplier-pro-card,.repair-work-card,.stock-card,.employee-card,.documents-grid article{height:100%;display:flex;flex-direction:column}.client-pro-card .actions,.supplier-pro-card .actions,.repair-work-actions{margin-top:auto}
/* dashboard old style readability */
.dashboard-nextgen .cc-grid,.dashboard-nextgen .dashboard-stat-deck{align-items:stretch}.dashboard-nextgen .cc-panel{height:100%}.premium-timeline article,.cc-activity-list article{grid-template-columns:auto minmax(0,1fr) auto!important}.premium-timeline span small,.premium-timeline span strong{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.quick-priority-card,.priority-card,.cc-priority-card{min-height:96px!important;height:100%;display:flex;align-items:flex-start;gap:12px}.quick-priority-card small,.priority-card small,.cc-priority-card small{display:block;line-height:1.35}
@media (max-width: 900px){.mr3e-hero-panel{min-height:unset;padding:22px}.mr3e-hero-metrics{grid-template-columns:1fr}.table-wrap{overflow-x:auto!important}.table-wrap table{min-width:640px}.as-nav nav{background:#080808}.actions .btn{flex:1 1 auto}.module-hero,.page-title,.toolbar{align-items:flex-start}.page-title .actions,.module-head-actions{width:100%;justify-content:flex-start}.facture-parties,.delivery-top-grid{grid-template-columns:1fr!important}}

/* v59 - shadcn-like data table for Clients and Dossiers réparation */
.data-table-card{
  width:100%;
  background:#fff;
  border:1px solid rgba(148,163,184,.26);
  border-radius:18px;
  box-shadow:0 16px 38px rgba(15,23,42,.06);
  padding:16px;
  display:grid;
  gap:14px;
  overflow:visible;
}
.dark .data-table-card{background:rgba(15,23,42,.92);}
.data-table-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.dt-show{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.84rem;}
.dt-show select{
  width:66px;height:34px;border-radius:10px;border:1px solid rgba(148,163,184,.35);
  background:var(--card);color:var(--text);font-weight:800;padding:0 10px;outline:0;
}
.dt-search{height:36px;min-width:min(280px,100%);display:flex;align-items:center;gap:8px;border:1px solid rgba(148,163,184,.28);border-radius:12px;background:var(--card);padding:0 11px;}
.dt-search i{color:var(--muted);font-size:.86rem;}
.dt-search input{border:0;outline:0;background:transparent;width:100%;height:100%;color:var(--text);font-weight:700;}
.data-table-wrap{border:1px solid rgba(148,163,184,.22);border-radius:14px;overflow:auto;background:var(--card);}
.pro-data-table{width:100%;border-collapse:separate;border-spacing:0;min-width:860px;font-size:.86rem;}
.pro-data-table thead th{
  height:44px;padding:0 14px;text-align:left;color:#64748b;font-size:.78rem;font-weight:900;
  background:#f8fafc;border-bottom:1px solid rgba(148,163,184,.22);white-space:nowrap;
}
.dark .pro-data-table thead th{background:rgba(30,41,59,.72);}
.pro-data-table tbody td{padding:13px 14px;border-bottom:1px solid rgba(148,163,184,.14);vertical-align:middle;color:var(--text);}
.pro-data-table tbody tr:last-child td{border-bottom:0;}
.pro-data-table tbody tr:hover{background:rgba(37,99,235,.035);}
.pro-data-table .dt-money{text-align:right;font-weight:900;white-space:nowrap;}
.dt-check{display:inline-grid;place-items:center;cursor:pointer;}
.dt-check input{display:none;}
.dt-check span{width:16px;height:16px;border:1.5px solid rgba(100,116,139,.48);border-radius:5px;background:#fff;display:block;}
.dt-check input:checked + span{background:#2563eb;border-color:#2563eb;box-shadow:inset 0 0 0 3px #fff;}
.dt-main{display:grid;gap:3px;min-width:0;}
.dt-main strong{font-weight:900;color:var(--text);line-height:1.25;white-space:normal;overflow:visible;text-overflow:clip;}
.dt-main small{color:var(--muted);line-height:1.3;white-space:normal;overflow:visible;text-overflow:clip;}
.dt-person{display:flex;align-items:center;gap:11px;min-width:220px;}
.dt-person img,.dt-person b{width:38px;height:38px;border-radius:12px;flex:0 0 38px;}
.dt-person img{object-fit:cover;display:block;}
.dt-person b{display:grid;place-items:center;background:linear-gradient(135deg,#dbeafe,#e0f2fe);color:#0f172a;font-weight:950;}
.dt-person span{display:grid;gap:2px;min-width:0;}
.dt-person strong{font-weight:950;color:var(--text);line-height:1.2;white-space:normal;}
.dt-person small{color:var(--muted);line-height:1.3;white-space:normal;}
.dt-score{min-width:34px;height:28px;border-radius:999px;display:inline-grid;place-items:center;font-weight:950;font-size:.8rem;background:#ecfdf5;color:#047857;}
.dt-score.warn{background:#fff7ed;color:#c2410c;}
.dt-actions{display:flex;justify-content:flex-end;gap:6px;white-space:nowrap;}
.icon-btn.mini{width:32px;height:32px;border-radius:10px;border:1px solid rgba(148,163,184,.24);background:var(--card);color:var(--text);display:inline-grid;place-items:center;padding:0;}
.icon-btn.mini:hover{background:#eff6ff;color:#2563eb;}
.icon-btn.mini.danger:hover{background:#fef2f2;color:#dc2626;}
.data-table-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:.84rem;}
.data-table-footer p{margin:0;white-space:normal;}
.data-table-footer .list-pagination{margin:0!important;}
.data-table-footer .page-number-group{display:flex;gap:6px;}
.data-table-footer .page-nav,.data-table-footer .page-dot{min-height:32px;border-radius:10px;font-size:.78rem;}
.client-filter-row-v2 > strong{font-size:.9rem;white-space:normal;}
@media(max-width:760px){
  .data-table-card{padding:12px;border-radius:16px;}
  .data-table-toolbar{align-items:stretch;}
  .dt-search{width:100%;min-width:0;}
  .data-table-footer{align-items:flex-start;}
}

/* v60 - rectangular DataTable list UX (no card-over-card feeling) */
.clients-data-table-card,
.repair-data-table-card{
  padding:14px!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#ffffff,#fbfdff)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  box-shadow:0 12px 26px rgba(15,23,42,.055)!important;
  gap:12px!important;
}
.clients-data-table-card .data-table-toolbar,
.repair-data-table-card .data-table-toolbar{
  padding:0 2px 4px!important;
  border:0!important;
  background:transparent!important;
}
.clients-data-table-card .dt-show,
.repair-data-table-card .dt-show{
  height:34px!important;
  padding:0!important;
  font-size:12px!important;
  color:#64748b!important;
}
.clients-data-table-card .dt-show select,
.repair-data-table-card .dt-show select{
  height:32px!important;
  width:62px!important;
  border-radius:10px!important;
  background:#fff!important;
}
.clients-data-table-card .dt-search,
.repair-data-table-card .dt-search{
  height:34px!important;
  min-width:240px!important;
  max-width:300px!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.clients-data-table-card .dt-search input,
.repair-data-table-card .dt-search input{
  font-size:12px!important;
  font-weight:700!important;
}
.clients-data-table-card .data-table-wrap,
.repair-data-table-card .data-table-wrap{
  border:0!important;
  background:transparent!important;
  border-radius:0!important;
  overflow:visible!important;
}
.clients-data-table-card .pro-data-table,
.repair-data-table-card .pro-data-table{
  width:100%!important;
  min-width:0!important;
  border-collapse:separate!important;
  border-spacing:0 10px!important;
  table-layout:fixed!important;
  font-size:12.5px!important;
}
.clients-data-table-card .pro-data-table thead th,
.repair-data-table-card .pro-data-table thead th{
  height:32px!important;
  padding:0 10px!important;
  background:transparent!important;
  border:0!important;
  color:#94a3b8!important;
  font-size:11px!important;
  letter-spacing:.02em!important;
}
.clients-data-table-card .pro-data-table tbody tr,
.repair-data-table-card .pro-data-table tbody tr{
  background:#fff!important;
  border-radius:16px!important;
  box-shadow:0 8px 20px rgba(15,23,42,.045)!important;
  outline:1px solid rgba(148,163,184,.18)!important;
  outline-offset:-1px!important;
  transition:.18s ease!important;
}
.clients-data-table-card .pro-data-table tbody tr:hover,
.repair-data-table-card .pro-data-table tbody tr:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 14px 30px rgba(15,23,42,.075)!important;
  outline-color:rgba(37,99,235,.24)!important;
  background:#fff!important;
}
.clients-data-table-card .pro-data-table tbody td,
.repair-data-table-card .pro-data-table tbody td{
  padding:12px 10px!important;
  border:0!important;
  vertical-align:middle!important;
  background:transparent!important;
  color:#334155!important;
  line-height:1.35!important;
  overflow:visible!important;
  white-space:normal!important;
  text-overflow:clip!important;
}
.clients-data-table-card .pro-data-table tbody td:first-child,
.repair-data-table-card .pro-data-table tbody td:first-child{
  border-radius:16px 0 0 16px!important;
}
.clients-data-table-card .pro-data-table tbody td:last-child,
.repair-data-table-card .pro-data-table tbody td:last-child{
  border-radius:0 16px 16px 0!important;
}
.clients-data-table-card .dt-person{
  min-width:0!important;
  gap:10px!important;
}
.clients-data-table-card .dt-person img,
.clients-data-table-card .dt-person b{
  width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  flex:0 0 42px!important;
}
.clients-data-table-card .dt-person strong,
.repair-data-table-card .dt-main strong{
  font-size:13px!important;
  line-height:1.25!important;
  font-weight:900!important;
  color:#0f172a!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.clients-data-table-card .dt-person small,
.repair-data-table-card .dt-main small,
.clients-data-table-card .dt-main small{
  font-size:11.5px!important;
  color:#64748b!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.clients-data-table-card .dt-main strong,
.repair-data-table-card .dt-main strong{
  display:block!important;
}
.clients-data-table-card .dt-score{
  height:26px!important;
  min-width:34px!important;
  font-size:12px!important;
}
.clients-data-table-card .dt-money,
.repair-data-table-card .dt-money{
  font-size:12.5px!important;
  white-space:normal!important;
  text-align:right!important;
}
.clients-data-table-card .dt-actions,
.repair-data-table-card .dt-actions{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:6px!important;
  flex-wrap:wrap!important;
}
.clients-data-table-card .icon-btn.mini,
.repair-data-table-card .icon-btn.mini{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  border:1px solid rgba(148,163,184,.22)!important;
}
.clients-data-table-card .icon-btn.mini i,
.repair-data-table-card .icon-btn.mini i,
.clients-data-table-card .icon-btn.mini svg,
.repair-data-table-card .icon-btn.mini svg{
  width:14px!important;
  height:14px!important;
  font-size:13px!important;
}
.clients-data-table-card .badge,
.repair-data-table-card .badge{
  display:inline-flex!important;
  width:max-content!important;
  max-width:100%!important;
  font-size:11px!important;
  padding:5px 8px!important;
  border-radius:999px!important;
  white-space:normal!important;
  line-height:1.15!important;
}
.clients-data-table-card .dt-check span,
.repair-data-table-card .dt-check span{
  width:15px!important;
  height:15px!important;
  border-radius:5px!important;
}
.clients-data-table-card .data-table-footer,
.repair-data-table-card .data-table-footer{
  padding:2px 2px 0!important;
  font-size:12px!important;
}
.clients-data-table-card .data-table-footer .list-pagination,
.repair-data-table-card .data-table-footer .list-pagination{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
/* column rhythm: reduce empty space */
.clients-data-table-card .pro-data-table th:nth-child(1),
.clients-data-table-card .pro-data-table td:nth-child(1){width:42px!important;}
.clients-data-table-card .pro-data-table th:nth-child(2),
.clients-data-table-card .pro-data-table td:nth-child(2){width:25%!important;}
.clients-data-table-card .pro-data-table th:nth-child(3),
.clients-data-table-card .pro-data-table td:nth-child(3){width:16%!important;}
.clients-data-table-card .pro-data-table th:nth-child(4),
.clients-data-table-card .pro-data-table td:nth-child(4){width:13%!important;}
.clients-data-table-card .pro-data-table th:nth-child(5),
.clients-data-table-card .pro-data-table td:nth-child(5){width:10%!important;}
.clients-data-table-card .pro-data-table th:nth-child(6),
.clients-data-table-card .pro-data-table td:nth-child(6){width:10%!important;}
.clients-data-table-card .pro-data-table th:nth-child(7),
.clients-data-table-card .pro-data-table td:nth-child(7){width:7%!important;}
.clients-data-table-card .pro-data-table th:nth-child(8),
.clients-data-table-card .pro-data-table td:nth-child(8){width:9%!important;}
.clients-data-table-card .pro-data-table th:nth-child(9),
.clients-data-table-card .pro-data-table td:nth-child(9){width:13%!important;}
.clients-data-table-card .pro-data-table th:nth-child(10),
.clients-data-table-card .pro-data-table td:nth-child(10){width:72px!important;}
.repair-data-table-card .pro-data-table th:nth-child(1),
.repair-data-table-card .pro-data-table td:nth-child(1){width:42px!important;}
.repair-data-table-card .pro-data-table th:nth-child(2),
.repair-data-table-card .pro-data-table td:nth-child(2){width:22%!important;}
.repair-data-table-card .pro-data-table th:nth-child(3),
.repair-data-table-card .pro-data-table td:nth-child(3){width:23%!important;}
.repair-data-table-card .pro-data-table th:nth-child(4),
.repair-data-table-card .pro-data-table td:nth-child(4){width:12%!important;}
.repair-data-table-card .pro-data-table th:nth-child(5),
.repair-data-table-card .pro-data-table td:nth-child(5){width:12%!important;}
.repair-data-table-card .pro-data-table th:nth-child(6),
.repair-data-table-card .pro-data-table td:nth-child(6){width:13%!important;}
.repair-data-table-card .pro-data-table th:nth-child(7),
.repair-data-table-card .pro-data-table td:nth-child(7){width:12%!important;}
.repair-data-table-card .pro-data-table th:nth-child(8),
.repair-data-table-card .pro-data-table td:nth-child(8){width:136px!important;}
@media (max-width:1050px){
  .clients-data-table-card .data-table-wrap,
  .repair-data-table-card .data-table-wrap{overflow-x:auto!important;padding-bottom:2px!important;}
  .clients-data-table-card .pro-data-table{min-width:920px!important;}
  .repair-data-table-card .pro-data-table{min-width:820px!important;}
}
@media (max-width:720px){
  .clients-data-table-card,
  .repair-data-table-card{padding:12px!important;border-radius:16px!important;}
  .clients-data-table-card .data-table-toolbar,
  .repair-data-table-card .data-table-toolbar{align-items:stretch!important;}
  .clients-data-table-card .dt-search,
  .repair-data-table-card .dt-search{max-width:none!important;width:100%!important;}
  .clients-data-table-card .data-table-wrap,
  .repair-data-table-card .data-table-wrap{overflow:visible!important;}
  .clients-data-table-card .pro-data-table,
  .repair-data-table-card .pro-data-table,
  .clients-data-table-card .pro-data-table thead,
  .repair-data-table-card .pro-data-table thead,
  .clients-data-table-card .pro-data-table tbody,
  .repair-data-table-card .pro-data-table tbody,
  .clients-data-table-card .pro-data-table tr,
  .repair-data-table-card .pro-data-table tr,
  .clients-data-table-card .pro-data-table td,
  .repair-data-table-card .pro-data-table td{display:block!important;width:100%!important;min-width:0!important;}
  .clients-data-table-card .pro-data-table thead,
  .repair-data-table-card .pro-data-table thead{display:none!important;}
  .clients-data-table-card .pro-data-table,
  .repair-data-table-card .pro-data-table{border-spacing:0!important;}
  .clients-data-table-card .pro-data-table tbody,
  .repair-data-table-card .pro-data-table tbody{display:grid!important;gap:12px!important;}
  .clients-data-table-card .pro-data-table tbody tr,
  .repair-data-table-card .pro-data-table tbody tr{display:grid!important;gap:8px!important;padding:12px!important;border-radius:16px!important;}
  .clients-data-table-card .pro-data-table tbody td,
  .repair-data-table-card .pro-data-table tbody td{padding:0!important;border-radius:0!important;}
  .clients-data-table-card .pro-data-table tbody td:first-child,
  .repair-data-table-card .pro-data-table tbody td:first-child{display:none!important;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(n+3):nth-child(-n+9),
  .repair-data-table-card .pro-data-table tbody td:nth-child(n+3):nth-child(-n+7){
    display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;
    padding:8px 0!important;border-top:1px solid rgba(148,163,184,.12)!important;font-size:12px!important;
  }
  .clients-data-table-card .pro-data-table tbody td:nth-child(3)::before{content:"Contact";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(4)::before{content:"ICE";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(5)::before{content:"CA";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(6)::before{content:"Encours";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(7)::before{content:"Score";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(8)::before{content:"Statut";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:nth-child(9)::before{content:"Activité";font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(3)::before{content:"Client";font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(4)::before{content:"Réception";font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(5)::before{content:"Échéance";font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(6)::before{content:"Statut";font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(7)::before{content:"Montant";font-weight:900;color:#94a3b8;}
  .clients-data-table-card .pro-data-table tbody td:last-child,
  .repair-data-table-card .pro-data-table tbody td:last-child{padding-top:4px!important;}
  .clients-data-table-card .dt-actions,
  .repair-data-table-card .dt-actions{justify-content:flex-start!important;}
  .clients-data-table-card .icon-btn.mini,
  .repair-data-table-card .icon-btn.mini{width:34px!important;height:34px!important;}
  .clients-data-table-card .data-table-footer,
  .repair-data-table-card .data-table-footer{align-items:flex-start!important;}
}


/* v61 - hard fix data table alignment: desktop/tablet rows must stay under headers */
@media (min-width: 721px) {
  .clients-data-table-card .data-table-wrap,
  .repair-data-table-card .data-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    border-radius: 16px !important;
    background: #fff !important;
  }

  .clients-data-table-card .pro-data-table,
  .repair-data-table-card .pro-data-table {
    display: table !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    table-layout: fixed !important;
  }

  .clients-data-table-card .pro-data-table { min-width: 1040px !important; }
  .repair-data-table-card .pro-data-table { min-width: 900px !important; }

  .clients-data-table-card .pro-data-table thead,
  .repair-data-table-card .pro-data-table thead { display: table-header-group !important; }

  .clients-data-table-card .pro-data-table tbody,
  .repair-data-table-card .pro-data-table tbody { display: table-row-group !important; }

  .clients-data-table-card .pro-data-table tr,
  .repair-data-table-card .pro-data-table tr { display: table-row !important; width: auto !important; }

  .clients-data-table-card .pro-data-table th,
  .repair-data-table-card .pro-data-table th,
  .clients-data-table-card .pro-data-table td,
  .repair-data-table-card .pro-data-table td {
    display: table-cell !important;
    width: auto;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .clients-data-table-card .pro-data-table tbody td,
  .repair-data-table-card .pro-data-table tbody td {
    padding: 13px 12px !important;
    vertical-align: middle !important;
    border-top: 1px solid rgba(148,163,184,.16) !important;
    border-bottom: 1px solid rgba(148,163,184,.16) !important;
    background: #fff !important;
  }

  .clients-data-table-card .pro-data-table tbody td:first-child,
  .repair-data-table-card .pro-data-table tbody td:first-child {
    border-left: 1px solid rgba(148,163,184,.16) !important;
    border-radius: 16px 0 0 16px !important;
  }

  .clients-data-table-card .pro-data-table tbody td:last-child,
  .repair-data-table-card .pro-data-table tbody td:last-child {
    border-right: 1px solid rgba(148,163,184,.16) !important;
    border-radius: 0 16px 16px 0 !important;
  }

  .clients-data-table-card .pro-data-table tbody tr,
  .repair-data-table-card .pro-data-table tbody tr {
    box-shadow: none !important;
    outline: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  .clients-data-table-card .pro-data-table tbody tr:hover td,
  .repair-data-table-card .pro-data-table tbody tr:hover td { background: #f8fbff !important; }

  .repair-data-table-card .pro-data-table th:nth-child(1),
  .repair-data-table-card .pro-data-table td:nth-child(1),
  .clients-data-table-card .pro-data-table th:nth-child(1),
  .clients-data-table-card .pro-data-table td:nth-child(1) {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  .repair-data-table-card .pro-data-table th:nth-child(2),
  .repair-data-table-card .pro-data-table td:nth-child(2) { width: 22% !important; }
  .repair-data-table-card .pro-data-table th:nth-child(3),
  .repair-data-table-card .pro-data-table td:nth-child(3) { width: 24% !important; }
  .repair-data-table-card .pro-data-table th:nth-child(4),
  .repair-data-table-card .pro-data-table td:nth-child(4) { width: 12% !important; white-space: nowrap !important; }
  .repair-data-table-card .pro-data-table th:nth-child(5),
  .repair-data-table-card .pro-data-table td:nth-child(5) { width: 12% !important; white-space: nowrap !important; }
  .repair-data-table-card .pro-data-table th:nth-child(6),
  .repair-data-table-card .pro-data-table td:nth-child(6) { width: 13% !important; }
  .repair-data-table-card .pro-data-table th:nth-child(7),
  .repair-data-table-card .pro-data-table td:nth-child(7) { width: 12% !important; white-space: nowrap !important; }
  .repair-data-table-card .pro-data-table th:nth-child(8),
  .repair-data-table-card .pro-data-table td:nth-child(8) { width: 132px !important; }

  .repair-data-table-card .dt-main strong,
  .repair-data-table-card .dt-main small,
  .clients-data-table-card .dt-main strong,
  .clients-data-table-card .dt-main small,
  .clients-data-table-card .dt-person strong,
  .clients-data-table-card .dt-person small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
  }

  .repair-data-table-card .dt-actions,
  .clients-data-table-card .dt-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
  }
}

/* keep the mobile card mode only on very small screens */
@media (max-width: 720px) {
  .repair-data-table-card .pro-data-table,
  .clients-data-table-card .pro-data-table { min-width: 0 !important; }
}

/* v62 - repairs table controls cleanup */
.repair-hero-panel-compact,
.repair-range-chip {
  display: none !important;
}
.repair-data-table-card .data-table-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}
.repair-data-table-card .dt-table-tools {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex: 1 1 420px !important;
  min-width: 280px !important;
}
.repair-data-table-card .dt-search {
  flex: 1 1 320px !important;
  max-width: 420px !important;
  min-width: 220px !important;
}
.repair-data-table-card .dt-filter-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  position: relative !important;
  background: #fff !important;
  border: 1px solid #dbe7f7 !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.06) !important;
  color: #64748b !important;
  flex: 0 0 42px !important;
  overflow: hidden !important;
}
.repair-data-table-card .dt-filter-icon i,
.repair-data-table-card .dt-filter-icon svg {
  width: 16px !important;
  height: 16px !important;
  pointer-events: none !important;
}
.repair-data-table-card .dt-filter-icon select {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
  width: 100% !important;
  height: 100% !important;
}
.repair-data-table-card .dt-show select {
  min-width: 64px !important;
}
.repair-history-widget.pro article {
  min-height: 42px !important;
}
@media (max-width: 760px) {
  .repair-data-table-card .dt-table-tools {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: stretch !important;
  }
  .repair-data-table-card .dt-search {
    max-width: none !important;
    min-width: 0 !important;
  }
}


/* v63 - Repairs table gets full width; insights moved below to avoid horizontal scroll */
.repair-bottom-grid{
  grid-template-columns:1fr!important;
  align-items:start!important;
  gap:18px!important;
}
.repair-list-panel{
  width:100%!important;
  min-width:0!important;
}
.repair-data-table-card{
  width:100%!important;
  max-width:100%!important;
}
.repair-data-table-card .data-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
}
@media (min-width: 1100px){
  .repair-data-table-card .data-table-wrap{
    overflow-x:visible!important;
  }
  .repair-data-table-card .pro-data-table{
    min-width:0!important;
    table-layout:fixed!important;
    font-size:12px!important;
  }
  .repair-data-table-card .pro-data-table th,
  .repair-data-table-card .pro-data-table td{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .repair-data-table-card .pro-data-table th:nth-child(1),
  .repair-data-table-card .pro-data-table td:nth-child(1){width:38px!important;min-width:38px!important;max-width:38px!important;}
  .repair-data-table-card .pro-data-table th:nth-child(2),
  .repair-data-table-card .pro-data-table td:nth-child(2){width:21%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(3),
  .repair-data-table-card .pro-data-table td:nth-child(3){width:22%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(4),
  .repair-data-table-card .pro-data-table td:nth-child(4){width:11%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(5),
  .repair-data-table-card .pro-data-table td:nth-child(5){width:11%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(6),
  .repair-data-table-card .pro-data-table td:nth-child(6){width:12%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(7),
  .repair-data-table-card .pro-data-table td:nth-child(7){width:11%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(8),
  .repair-data-table-card .pro-data-table td:nth-child(8){width:104px!important;}
  .repair-data-table-card .dt-actions{gap:4px!important;justify-content:flex-end!important;}
  .repair-data-table-card .icon-btn.mini{width:26px!important;height:26px!important;border-radius:8px!important;}
  .repair-data-table-card .icon-btn.mini i{font-size:11px!important;}
}
.repair-insights-panel.repair-insights-pro{
  width:100%!important;
  height:auto!important;
  display:grid!important;
  grid-template-columns:minmax(220px,.75fr) minmax(260px,1fr) minmax(260px,1.15fr)!important;
  gap:14px!important;
  align-items:stretch!important;
}
.repair-insights-pro .repair-insights-head,
.repair-insights-pro .repair-goal-cards.pro,
.repair-insights-pro .repair-priority-strip,
.repair-insights-pro .repair-history-widget.pro{
  min-width:0!important;
}
.repair-insights-pro .repair-insights-head{
  padding:16px!important;
  border-radius:18px!important;
  border:1px solid #e2e8f0!important;
  background:#fff!important;
}
.repair-insights-pro .repair-goal-cards.pro{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.repair-insights-pro .repair-priority-strip{
  height:100%!important;
  align-self:stretch!important;
}
.repair-insights-pro .repair-history-widget.pro{
  grid-column:1/-1!important;
  padding:14px!important;
  border-radius:18px!important;
  border:1px solid #e2e8f0!important;
  background:#fff!important;
}
.repair-history-widget.pro .toolbar{
  margin-bottom:8px!important;
}
.repair-history-widget.pro article{
  display:grid!important;
  grid-template-columns:88px minmax(0,1fr)!important;
  min-height:44px!important;
}
.repair-history-widget.pro article strong,
.repair-history-widget.pro article small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
@media (min-width: 900px){
  .repair-history-widget.pro{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .repair-history-widget.pro .toolbar{
    grid-column:1/-1!important;
  }
}
@media (max-width: 980px){
  .repair-insights-panel.repair-insights-pro{
    grid-template-columns:1fr!important;
  }
  .repair-insights-pro .repair-history-widget.pro{
    grid-column:auto!important;
  }
}


/* v64 - remove useless repair checkbox column and rebalance table columns */
.repair-data-table-card .dt-check{display:none!important;}
@media (min-width: 1100px){
  .repair-data-table-card .pro-data-table{table-layout:fixed!important;font-size:12px!important;}
  .repair-data-table-card .pro-data-table th:nth-child(1),
  .repair-data-table-card .pro-data-table td:nth-child(1){width:24%!important;min-width:0!important;max-width:none!important;}
  .repair-data-table-card .pro-data-table th:nth-child(2),
  .repair-data-table-card .pro-data-table td:nth-child(2){width:25%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(3),
  .repair-data-table-card .pro-data-table td:nth-child(3){width:11%!important;white-space:nowrap!important;}
  .repair-data-table-card .pro-data-table th:nth-child(4),
  .repair-data-table-card .pro-data-table td:nth-child(4){width:11%!important;white-space:nowrap!important;}
  .repair-data-table-card .pro-data-table th:nth-child(5),
  .repair-data-table-card .pro-data-table td:nth-child(5){width:13%!important;}
  .repair-data-table-card .pro-data-table th:nth-child(6),
  .repair-data-table-card .pro-data-table td:nth-child(6){width:10%!important;white-space:nowrap!important;text-align:right!important;padding-right:14px!important;}
  .repair-data-table-card .pro-data-table th:nth-child(7),
  .repair-data-table-card .pro-data-table td:nth-child(7){width:96px!important;min-width:96px!important;max-width:96px!important;padding-left:6px!important;padding-right:6px!important;}
  .repair-data-table-card .dt-actions{gap:3px!important;justify-content:flex-end!important;flex-wrap:nowrap!important;}
  .repair-data-table-card .icon-btn.mini{width:24px!important;height:24px!important;border-radius:8px!important;}
  .repair-data-table-card .icon-btn.mini i,.repair-data-table-card .icon-btn.mini svg{font-size:10px!important;width:10px!important;height:10px!important;}
  .repair-data-table-card .badge{font-size:10px!important;padding:5px 7px!important;white-space:normal!important;line-height:1.15!important;}
}
@media (max-width: 720px){
  .repair-data-table-card .pro-data-table tbody td:nth-child(2)::before{content:"Client"!important;font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(3)::before{content:"Réception"!important;font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(4)::before{content:"Échéance"!important;font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(5)::before{content:"Statut"!important;font-weight:900;color:#94a3b8;}
  .repair-data-table-card .pro-data-table tbody td:nth-child(6)::before{content:"Montant"!important;font-weight:900;color:#94a3b8;}
}

/* v65 - repair period menu + table spacing + export polish */
body .app-shell,
body .app-content,
body .workspace,
body .module-hero,
body .unified-module-head,
body .repair-studio-page,
body .repair-bottom-grid,
body .repair-list-panel,
body .repair-data-table-card,
body .data-table-toolbar {
  overflow: visible !important;
}
body .module-hero.unified-module-head:has(.repair-period-menu),
body .unified-module-head:has(.repair-period-menu),
body .module-head-actions:has(.repair-period-menu),
body .repair-period-dropdown:has(.repair-period-menu) {
  position: relative !important;
  z-index: 999999 !important;
}
body .repair-period-dropdown {
  position: relative !important;
  z-index: 50 !important;
}
body .repair-period-dropdown .period-trigger {
  min-width: 132px !important;
  justify-content: center !important;
}
body .repair-period-dropdown .repair-period-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 1000000 !important;
  width: 238px !important;
  min-width: 238px !important;
  max-width: 238px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 8px !important;
  border-radius: 16px !important;
  background: #fff !important;
  border: 1px solid rgba(148,163,184,.24) !important;
  box-shadow: 0 30px 90px rgba(15,23,42,.28) !important;
}
body .repair-period-dropdown .repair-period-menu button {
  width: 100% !important;
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}
body .repair-period-dropdown .repair-period-menu button i,
body .repair-period-dropdown .repair-period-menu button svg {
  display: none !important;
}
body .repair-period-dropdown .repair-period-menu button span {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
body .repair-period-dropdown .repair-period-menu .custom-period,
body .repair-period-dropdown .repair-period-menu .pro-custom-period {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 10px !important;
  border-radius: 14px !important;
  margin-top: 8px !important;
}
body .repair-period-dropdown .repair-period-menu .custom-period-fields {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
body .repair-period-dropdown .repair-period-menu .custom-period input {
  height: 36px !important;
  width: 100% !important;
  min-width: 0 !important;
}
body .repair-data-table-card .data-table-wrap {
  width: 100% !important;
  overflow-x: visible !important;
}
@media (min-width: 1100px) {
  body .repair-data-table-card .pro-data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 12.5px !important;
  }
  body .repair-data-table-card .pro-data-table th,
  body .repair-data-table-card .pro-data-table td {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body .repair-data-table-card .pro-data-table th:nth-child(1),
  body .repair-data-table-card .pro-data-table td:nth-child(1) { width: 23% !important; }
  body .repair-data-table-card .pro-data-table th:nth-child(2),
  body .repair-data-table-card .pro-data-table td:nth-child(2) { width: 24% !important; }
  body .repair-data-table-card .pro-data-table th:nth-child(3),
  body .repair-data-table-card .pro-data-table td:nth-child(3) { width: 11% !important; white-space: nowrap !important; }
  body .repair-data-table-card .pro-data-table th:nth-child(4),
  body .repair-data-table-card .pro-data-table td:nth-child(4) { width: 11% !important; white-space: nowrap !important; }
  body .repair-data-table-card .pro-data-table th:nth-child(5),
  body .repair-data-table-card .pro-data-table td:nth-child(5) { width: 12% !important; }
  body .repair-data-table-card .pro-data-table th:nth-child(6),
  body .repair-data-table-card .pro-data-table td:nth-child(6) {
    width: 12% !important;
    min-width: 118px !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding-right: 18px !important;
  }
  body .repair-data-table-card .pro-data-table th:nth-child(7),
  body .repair-data-table-card .pro-data-table td:nth-child(7) {
    width: 98px !important;
    min-width: 98px !important;
    max-width: 98px !important;
    padding-left: 4px !important;
    padding-right: 6px !important;
  }
  body .repair-data-table-card .dt-actions {
    display: flex !important;
    gap: 4px !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }
  body .repair-data-table-card .icon-btn.mini {
    width: 23px !important;
    height: 23px !important;
    border-radius: 7px !important;
  }
  body .repair-data-table-card .icon-btn.mini i,
  body .repair-data-table-card .icon-btn.mini svg {
    width: 10px !important;
    height: 10px !important;
    font-size: 10px !important;
  }
}
@media (max-width: 720px) {
  body .repair-period-dropdown .repair-period-menu {
    left: 0 !important;
    right: auto !important;
    width: min(88vw, 260px) !important;
    min-width: min(88vw, 260px) !important;
  }
  body .repair-data-table-card .data-table-wrap {
    overflow-x: auto !important;
  }
}


/* v66 - MR3E public home page rebuilt for company brand */
.mr3e-home-v66{
  min-height:100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(37,99,235,.24), transparent 34%),
    radial-gradient(circle at 80% 16%, rgba(245,158,11,.18), transparent 30%),
    linear-gradient(180deg,#050913 0%,#07111f 46%,#f8fafc 46%,#f8fafc 100%);
  color:#0f172a;
  font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.mr3e-home-v66 *{box-sizing:border-box}
.mr3e-nav-v66{
  position:sticky;top:0;z-index:80;
  max-width:1220px;margin:0 auto;padding:18px 22px;
  display:flex;align-items:center;gap:18px;justify-content:space-between;
  backdrop-filter:blur(18px);
}
.mr3e-brand-v66{display:inline-flex;align-items:center;gap:12px;color:#fff;text-decoration:none;font-weight:950;font-size:1.25rem;letter-spacing:.02em}
.mr3e-brand-v66 img{width:48px;height:48px;object-fit:contain;border-radius:12px;background:rgba(255,255,255,.08);padding:4px}
.mr3e-nav-v66 nav{display:flex;align-items:center;gap:6px;padding:7px;border:1px solid rgba(255,255,255,.12);background:rgba(15,23,42,.58);border-radius:999px}
.mr3e-nav-v66 nav a{color:rgba(255,255,255,.78);text-decoration:none;font-size:.84rem;font-weight:800;padding:9px 12px;border-radius:999px}
.mr3e-nav-v66 nav a:hover{background:rgba(255,255,255,.10);color:#fff}
.mr3e-social-v66{display:flex;gap:8px;color:rgba(255,255,255,.7);font-size:.76rem;font-weight:800}
.mr3e-login-v66{border:0;border-radius:999px;background:#facc15;color:#111827;padding:10px 16px;font-weight:950;cursor:pointer}
.mr3e-hero-v66{max-width:1220px;margin:0 auto;padding:72px 22px 42px;display:grid;grid-template-columns:1fr 1fr;gap:42px;align-items:center;color:#fff}
.mr3e-eyebrow-v66{display:inline-flex;padding:8px 12px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.06);font-size:.78rem;font-weight:900;color:#93c5fd}
.mr3e-hero-copy-v66 h1{font-size:clamp(2.4rem,5vw,5.4rem);line-height:.98;margin:22px 0 18px;letter-spacing:-.065em;max-width:720px}
.mr3e-hero-copy-v66 p{font-size:1.05rem;line-height:1.75;color:rgba(255,255,255,.76);max-width:690px;margin:0}
.mr3e-hero-actions-v66{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.mr3e-hero-actions-v66 a{min-height:46px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:0 20px;text-decoration:none;font-weight:950}
.mr3e-hero-actions-v66 a:first-child{background:#2563eb;color:#fff;box-shadow:0 18px 40px rgba(37,99,235,.38)}
.mr3e-hero-actions-v66 a:last-child{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);color:#fff}
.mr3e-hero-points-v66{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.mr3e-hero-points-v66 span{font-size:.78rem;color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);padding:8px 10px;border-radius:999px}
.mr3e-industrial-visual-v66{min-width:0}
.mr3e-board-v66{border:1px solid rgba(96,165,250,.28);background:linear-gradient(180deg,rgba(15,23,42,.92),rgba(2,6,23,.86));border-radius:30px;box-shadow:0 34px 80px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06);padding:22px}
.mr3e-board-head-v66{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;color:#fff}
.mr3e-board-head-v66 img{width:38px;height:38px;object-fit:contain}
.mr3e-board-head-v66 span{font-weight:950}
.mr3e-board-head-v66 b{font-size:.78rem;background:rgba(34,197,94,.14);color:#86efac;padding:8px 10px;border-radius:999px}
.mr3e-circuit-v66{position:relative;min-height:310px;border-radius:24px;background:linear-gradient(135deg,rgba(37,99,235,.13),rgba(245,158,11,.10)),#0b1220;overflow:hidden;border:1px solid rgba(255,255,255,.08);display:grid;place-items:center}
.mr3e-circuit-v66:before,.mr3e-circuit-v66:after{content:"";position:absolute;inset:48px;border:2px solid rgba(37,99,235,.28);border-radius:22px}
.mr3e-circuit-v66:after{inset:82px;border-color:rgba(250,204,21,.26)}
.mr3e-circuit-v66 i{position:absolute;width:96px;height:2px;background:linear-gradient(90deg,transparent,#60a5fa,transparent)}
.mr3e-circuit-v66 i:nth-child(1){top:70px;left:70px}.mr3e-circuit-v66 i:nth-child(2){top:140px;right:60px}.mr3e-circuit-v66 i:nth-child(3){bottom:70px;left:90px}.mr3e-circuit-v66 i:nth-child(4){width:2px;height:90px;left:120px;top:98px}.mr3e-circuit-v66 i:nth-child(5){width:2px;height:80px;right:120px;bottom:74px}.mr3e-circuit-v66 i:nth-child(6){bottom:128px;right:160px}
.mr3e-circuit-v66 strong{position:relative;z-index:3;font-size:3.3rem;letter-spacing:-.06em;color:#fff;text-shadow:0 10px 34px rgba(37,99,235,.52)}
.mr3e-circuit-v66 em{position:absolute;z-index:4;width:34px;height:86px;background:#facc15;clip-path:polygon(56% 0,100% 0,62% 40%,100% 40%,28% 100%,45% 55%,0 55%);filter:drop-shadow(0 0 22px rgba(250,204,21,.55));}
.mr3e-board-grid-v66{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}
.mr3e-board-grid-v66 article{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.05);border-radius:16px;padding:14px 12px}
.mr3e-board-grid-v66 small{display:block;color:#94a3b8;font-weight:800}.mr3e-board-grid-v66 b{display:block;margin-top:4px;color:#fff;font-size:.9rem}
.mr3e-benefits-v66,.mr3e-about-v66,.mr3e-services-v66,.mr3e-sectors-v66,.mr3e-blog-v66,.mr3e-contact-v66{max-width:1220px;margin:0 auto 18px;padding:0 22px}
.mr3e-section-title-v66{margin:28px 0 18px}.mr3e-section-title-v66 span,.mr3e-about-card-v66 span,.mr3e-contact-v66 span{color:#2563eb;font-weight:950;font-size:.82rem;text-transform:uppercase;letter-spacing:.08em}
.mr3e-section-title-v66 h2,.mr3e-about-card-v66 h2,.mr3e-contact-v66 h2{margin:8px 0 0;font-size:clamp(1.7rem,3vw,3rem);letter-spacing:-.04em;color:#0f172a}
.mr3e-section-title-v66 p{color:#64748b;line-height:1.6}
.mr3e-benefit-grid-v66,.mr3e-service-grid-v66,.mr3e-blog-grid-v66{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.mr3e-benefit-grid-v66 article,.mr3e-service-grid-v66 article,.mr3e-blog-grid-v66 article,.mr3e-about-card-v66,.mr3e-contact-box-v66,.mr3e-stats-v66 article{border:1px solid rgba(148,163,184,.22);border-radius:24px;background:#fff;box-shadow:0 16px 40px rgba(15,23,42,.06);padding:22px}
.mr3e-benefit-grid-v66 svg,.mr3e-service-grid-v66 svg{width:30px;height:30px;color:#2563eb}
.mr3e-benefit-grid-v66 h3,.mr3e-service-grid-v66 h3,.mr3e-blog-grid-v66 h3{margin:12px 0 8px;color:#0f172a}.mr3e-benefit-grid-v66 p,.mr3e-service-grid-v66 p,.mr3e-blog-grid-v66 p{margin:0;color:#64748b;line-height:1.55;font-size:.92rem}
.mr3e-service-grid-v66{grid-template-columns:repeat(3,1fr)}.mr3e-service-grid-v66 small{display:inline-flex;margin-top:14px;padding:7px 10px;border-radius:999px;background:#eff6ff;color:#2563eb;font-weight:900}
.mr3e-about-v66{display:grid;grid-template-columns:1.5fr .8fr;gap:16px;align-items:stretch}.mr3e-about-card-v66 p,.mr3e-about-card-v66 li{color:#64748b;line-height:1.7}.mr3e-stats-v66{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mr3e-stats-v66 strong{font-size:2rem;color:#0f172a}.mr3e-stats-v66 span{display:block;color:#64748b;font-weight:800;margin-top:5px}
.mr3e-sector-list-v66{display:flex;flex-wrap:wrap;gap:10px}.mr3e-sector-list-v66 span{padding:12px 14px;border-radius:999px;background:#fff;border:1px solid rgba(148,163,184,.24);font-weight:850;color:#334155}
.mr3e-contact-v66{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:stretch;padding-top:18px}.mr3e-contact-v66>div:first-child{background:#0f172a;color:#fff;border-radius:28px;padding:30px}.mr3e-contact-v66>div:first-child h2{color:#fff}.mr3e-contact-v66>div:first-child p{color:#cbd5e1;line-height:1.7}.mr3e-contact-box-v66{display:grid;gap:10px}.mr3e-contact-box-v66 p{margin:0;padding:14px;border-radius:16px;background:#f8fafc}.mr3e-contact-box-v66 strong{display:block;color:#0f172a}.mr3e-contact-box-v66 span{display:block;margin-top:4px;color:#64748b}
.mr3e-footer-v66{max-width:1220px;margin:18px auto 0;padding:28px 22px 40px;display:flex;justify-content:space-between;gap:18px;align-items:center;color:#64748b}.mr3e-footer-v66 img{width:44px;height:44px;object-fit:contain}.mr3e-footer-v66 div{display:flex;align-items:center;gap:10px}.mr3e-footer-v66 nav{display:flex;gap:12px;flex-wrap:wrap}.mr3e-footer-v66 a{color:#334155;text-decoration:none;font-weight:800}.mr3e-footer-v66 strong{color:#0f172a}
@media(max-width:1050px){.mr3e-nav-v66{flex-wrap:wrap}.mr3e-nav-v66 nav{order:3;width:100%;justify-content:center;flex-wrap:wrap;border-radius:22px}.mr3e-hero-v66,.mr3e-about-v66,.mr3e-contact-v66{grid-template-columns:1fr}.mr3e-benefit-grid-v66,.mr3e-service-grid-v66,.mr3e-blog-grid-v66{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.mr3e-home-v66{background:linear-gradient(180deg,#050913 0%,#07111f 40%,#f8fafc 40%,#f8fafc 100%)}.mr3e-nav-v66{padding:12px}.mr3e-social-v66{display:none}.mr3e-hero-v66{padding:34px 14px;gap:22px}.mr3e-hero-copy-v66 h1{font-size:2.35rem}.mr3e-board-grid-v66,.mr3e-benefit-grid-v66,.mr3e-service-grid-v66,.mr3e-blog-grid-v66,.mr3e-stats-v66{grid-template-columns:1fr}.mr3e-footer-v66{flex-direction:column;align-items:flex-start}.mr3e-circuit-v66{min-height:240px}.mr3e-circuit-v66 strong{font-size:2.4rem}}

/* v69 - Admin Appearance & Templates page */
.template-studio-page{display:grid;gap:18px}
.template-safe-banner{display:grid;grid-template-columns:46px minmax(0,1fr);gap:14px;align-items:center;padding:16px 18px;border-radius:22px;background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(20,184,166,.08));border:1px solid rgba(37,99,235,.18);box-shadow:0 16px 34px rgba(15,23,42,.05)}
.template-safe-banner i{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:#2563eb;color:#fff}
.template-safe-banner strong{display:block;color:var(--text);font-size:1rem}
.template-safe-banner span{display:block;color:var(--muted);line-height:1.45;margin-top:3px;white-space:normal}
.template-hero-v69{overflow:hidden}
.template-home-card{padding:0;overflow:hidden}
.template-home-card .toolbar{padding:18px 20px;border-bottom:1px solid rgba(148,163,184,.16)}
.template-home-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:0}
.template-options-column{padding:18px 20px;display:grid;gap:12px;border-right:1px solid rgba(148,163,184,.16)}
.template-choice{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:center;padding:12px;border:1px solid rgba(148,163,184,.22);border-radius:18px;background:#fff;cursor:pointer;transition:.18s}
.template-choice input{display:none}
.template-choice i{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(37,99,235,.08);color:#2563eb}
.template-choice strong,.template-choice small{display:block;white-space:normal;overflow:visible;text-overflow:clip}
.template-choice small{color:var(--muted);line-height:1.35;margin-top:3px}
.template-choice.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 14px 28px rgba(37,99,235,.10)}
.template-options-column textarea{width:100%;min-height:88px;resize:vertical;border:1px solid rgba(148,163,184,.45);border-radius:16px;padding:12px;font:inherit;color:var(--text);background:var(--card)}
.template-preview-column{padding:20px;display:grid;place-items:center;background:linear-gradient(180deg,#f8fafc,#fff)}
.template-home-preview{width:min(100%,520px);min-height:330px;border-radius:28px;padding:24px;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(148,163,184,.22);box-shadow:0 22px 60px rgba(15,23,42,.12);background:#08111f;color:#fff;position:relative;overflow:hidden}
.template-home-preview:before{content:"";position:absolute;inset:-30%;background:radial-gradient(circle at 20% 20%,color-mix(in srgb,var(--accent) 48%,transparent),transparent 32%),radial-gradient(circle at 80% 10%,rgba(250,204,21,.22),transparent 28%);pointer-events:none}
.template-home-preview>*{position:relative;z-index:2}
.template-home-top{display:flex;align-items:center;justify-content:space-between;font-size:.8rem;font-weight:950;color:#bfdbfe}
.template-home-preview h3{font-size:1.65rem;line-height:1.08;letter-spacing:-.04em;margin:22px 0 10px;max-width:460px;color:#fff}
.template-home-preview p{color:#cbd5e1;line-height:1.55;margin:0;max-width:460px}
.template-home-preview div:last-child{display:flex;gap:8px;margin-top:22px}
.template-home-preview div:last-child i{height:10px;border-radius:999px;background:var(--accent);display:block}
.template-home-preview div:last-child i:nth-child(1){width:90px}.template-home-preview div:last-child i:nth-child(2){width:54px;background:#facc15}.template-home-preview div:last-child i:nth-child(3){width:120px;background:#22c55e}
.template-home-preview.clean{background:#fff;color:#0f172a}
.template-home-preview.clean h3{color:#0f172a}.template-home-preview.clean p{color:#64748b}.template-home-preview.clean .template-home-top{color:#2563eb}
.template-home-preview.compact{min-height:240px;background:linear-gradient(135deg,#0f172a,#1e293b)}
@media(max-width:900px){.template-home-grid{grid-template-columns:1fr}.template-options-column{border-right:0;border-bottom:1px solid rgba(148,163,184,.16)}}

/* v70 - WordPress-like safe template installer */
.template-installer-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:16px;margin-bottom:16px}
.template-upload-card,.template-current-card,.template-list-card{overflow:hidden}
.template-upload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.template-upload-head span{color:#2563eb;font-weight:950;text-transform:uppercase;font-size:.78rem;letter-spacing:.08em}
.template-upload-head h2{margin:6px 0 6px;font-size:1.8rem;letter-spacing:-.035em;color:var(--text)}
.template-upload-head p{margin:0;color:var(--muted);line-height:1.55}
.template-lock{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:999px;background:rgba(22,163,74,.10);color:#15803d;font-weight:950;white-space:nowrap}
.template-drop-zone{min-height:190px;border:2px dashed rgba(37,99,235,.28);border-radius:26px;display:grid;place-items:center;text-align:center;padding:28px;background:linear-gradient(180deg,rgba(37,99,235,.06),rgba(20,184,166,.04));cursor:pointer;transition:.18s}
.template-drop-zone:hover{border-color:#2563eb;background:rgba(37,99,235,.08)}
.template-drop-zone i{font-size:2.7rem;color:#2563eb}
.template-drop-zone strong{display:block;margin-top:10px;color:var(--text);font-size:1.1rem}
.template-drop-zone small{display:block;margin-top:6px;color:var(--muted)}
.template-rules{display:grid;gap:10px;margin-top:18px}
.template-rules p{display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;align-items:start;margin:0;padding:12px;border-radius:16px;background:rgba(148,163,184,.08);color:var(--muted);line-height:1.45}
.template-rules i{width:32px;height:32px;border-radius:12px;background:#eff6ff;color:#2563eb;display:grid;place-items:center}
.template-rules b{color:var(--text)}
.template-install-status{margin-top:14px;min-height:24px;color:#b45309;font-weight:850}
.template-install-status .ok{color:#15803d}
.template-current-preview{height:210px;border-radius:24px;background:linear-gradient(135deg,var(--tpl-color),#0f172a);position:relative;overflow:hidden;margin:10px 0 16px;padding:20px;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}
.template-current-preview b{font-size:2rem;letter-spacing:-.06em}
.template-current-preview span{position:absolute;border-radius:999px;background:rgba(255,255,255,.32)}
.template-current-preview span:nth-child(2){width:140px;height:10px;left:20px;bottom:34px}
.template-current-preview span:nth-child(3){width:86px;height:10px;left:20px;bottom:54px}
.template-current-preview span:nth-child(4){width:180px;height:10px;right:20px;top:28px}
.template-installed-list{display:grid;gap:12px}
.template-installed-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid rgba(148,163,184,.18);border-radius:18px;background:#fff}
.template-installed-row.active{background:#eff6ff;border-color:rgba(37,99,235,.30)}
.template-installed-main{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;align-items:center;min-width:0}
.template-installed-thumb{width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,var(--tpl-color),#0f172a);color:#fff;display:grid;place-items:center}
.template-installed-main strong,.template-installed-main small{display:block;white-space:normal;overflow:visible;text-overflow:clip}
.template-installed-main small{color:var(--muted);line-height:1.35}
.template-installed-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.template-installed-actions .btn.mini{min-height:34px;padding:0 10px;font-size:.78rem}
.template-installed-actions .danger{color:#b91c1c}
@media(max-width:900px){.template-installer-layout{grid-template-columns:1fr}.template-upload-head,.template-installed-row{flex-direction:column;align-items:flex-start}.template-installed-actions{justify-content:flex-start}}

/* v71 - MR3E home page calmer professional colors */
.mr3e-home-v66{
  background:
    radial-gradient(circle at 12% 8%, rgba(14,165,233,.18), transparent 32%),
    radial-gradient(circle at 86% 12%, rgba(20,184,166,.12), transparent 28%),
    linear-gradient(180deg,#06101d 0%,#0b1727 46%,#f8fafc 46%,#f8fafc 100%) !important;
}
.mr3e-nav-v66 nav{background:rgba(8,18,32,.74)!important;border-color:rgba(148,163,184,.18)!important}
.mr3e-login-v66{background:#0ea5e9!important;color:#fff!important;box-shadow:0 12px 28px rgba(14,165,233,.24)!important}
.mr3e-eyebrow-v66{color:#7dd3fc!important;border-color:rgba(125,211,252,.22)!important;background:rgba(14,165,233,.08)!important}
.mr3e-hero-actions-v66 a:first-child{background:#0ea5e9!important;box-shadow:0 18px 40px rgba(14,165,233,.28)!important}
.mr3e-board-v66{border-color:rgba(125,211,252,.20)!important;background:linear-gradient(180deg,rgba(8,18,32,.96),rgba(2,6,23,.92))!important}
.mr3e-board-head-v66 b{background:rgba(20,184,166,.14)!important;color:#5eead4!important}
.mr3e-circuit-v66{background:linear-gradient(135deg,rgba(14,165,233,.12),rgba(20,184,166,.08)),#081320!important}
.mr3e-circuit-v66:before{border-color:rgba(14,165,233,.30)!important}
.mr3e-circuit-v66:after{border-color:rgba(20,184,166,.24)!important}
.mr3e-circuit-v66 em{background:#0ea5e9!important;filter:drop-shadow(0 0 22px rgba(14,165,233,.45))!important}
.mr3e-circuit-v66 i{background:linear-gradient(90deg,transparent,#38bdf8,transparent)!important}
.mr3e-section-title-v66 span,.mr3e-about-card-v66 span,.mr3e-contact-v66 span{color:#0284c7!important}
.mr3e-benefit-grid-v66 svg,.mr3e-service-grid-v66 svg{color:#0284c7!important}
.mr3e-service-grid-v66 small{background:#e0f2fe!important;color:#0369a1!important}
.mr3e-contact-v66>div:first-child{background:linear-gradient(135deg,#07111f,#0f2b46)!important}

/* v72 - Global A4 PDF preview and print fixes */
.modal .pdf-preview-modal-shell{
  max-height:72vh;
  overflow:auto;
  background:#e5e7eb;
  border-radius:18px;
  padding:16px;
}
.modal .pdf-preview-modal-shell .doc-preview{
  transform-origin:top center;
}
@media screen and (max-width:900px){
  .modal .pdf-preview-modal-shell .doc-preview{
    transform:scale(.62);
    margin-bottom:-110mm!important;
  }
}
@media print{
  @page{size:A4;margin:0}
  html,body{background:#fff!important}
  .app-shell,.main,.page,.content{background:#fff!important}
  .sidebar,.topbar,.modal-backdrop,.actions,.btn,.icon-btn,.period-menu,.data-table-toolbar{display:none!important}
  .doc-preview{width:210mm!important;min-height:297mm!important;max-height:297mm!important;margin:0!important;padding:9mm 10mm!important;box-shadow:none!important;overflow:hidden!important}
  .pdf-logo-img{width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;object-fit:contain!important}
}

/* v73 - PDF A4 final polish */
.pdf-preview-modal-shell .pdf-logo-img,
.doc-preview .pdf-logo-img{
  width:22px!important;
  height:22px!important;
  max-width:22px!important;
  max-height:22px!important;
  object-fit:contain!important;
}
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  width:22px!important;
  height:22px!important;
  font-size:10px!important;
}
.pdf-preview-modal-shell .doc-preview{
  height:297mm!important;
  min-height:297mm!important;
  max-height:297mm!important;
}
.doc-preview .facture-bottom{
  margin-top:auto!important;
}
.doc-preview .pro-doc-footer,
.doc-preview .delivery-footer{
  margin-top:6px!important;
}
@media print{
  .pdf-logo-img{width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important}
  .mr3e-logo-mark{width:22px!important;height:22px!important;font-size:10px!important}
  .doc-preview{height:297mm!important;min-height:297mm!important;max-height:297mm!important}
  .facture-bottom{margin-top:auto!important}
}

/* v75 - Admin private uploads page */
.uploads-admin-page { display: grid; gap: 16px; }
.upload-category-pills { display:flex; gap:8px; flex-wrap:wrap; }
.upload-category-pills button { border:1px solid rgba(148,163,184,.24); background:#fff; color:#334155; border-radius:999px; padding:8px 12px; font-weight:850; cursor:pointer; }
.upload-category-pills button.active { background:#0f172a; color:#fff; border-color:#0f172a; }
.upload-row-list { display:grid; gap:10px; }
.upload-row-card { display:grid; grid-template-columns:54px minmax(0,1fr) auto; gap:12px; align-items:center; padding:12px; border:1px solid rgba(148,163,184,.18); border-radius:18px; background:#fff; }
.upload-row-icon { width:54px; height:54px; border-radius:16px; display:grid; place-items:center; overflow:hidden; background:#eff6ff; color:#2563eb; }
.upload-row-icon img { width:100%; height:100%; object-fit:cover; }
.upload-row-card strong, .upload-row-card small { display:block; white-space:normal; overflow:visible; text-overflow:clip; }
.upload-row-card small { color:#64748b; margin-top:4px; line-height:1.35; }
.upload-row-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.upload-row-actions .mini { min-height:34px; padding:0 10px; font-size:.78rem; }
@media (max-width:720px){ .upload-row-card{ grid-template-columns:44px minmax(0,1fr); } .upload-row-actions{ grid-column:1/-1; justify-content:flex-start; } }

/* v76 - Invoice PDF final A4 balanced layout */
.pdf-preview-modal-shell .doc-preview,
.doc-preview.facture-template,
.doc-preview.invoice-template{
  background:#fff!important;
}
.pdf-preview-modal-shell .pdf-logo-img,
.doc-preview .pdf-logo-img{
  width:16px!important;
  height:16px!important;
  max-width:16px!important;
  max-height:16px!important;
  object-fit:contain!important;
  background:#fff!important;
  padding:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:4px!important;
}
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  width:16px!important;
  height:16px!important;
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid #d1d5db!important;
  font-size:8px!important;
}
.pdf-preview-modal-shell .facture-bottom,
.doc-preview .facture-bottom{
  margin:0!important;
  align-self:stretch!important;
}
.pdf-preview-modal-shell .facture-table,
.doc-preview .facture-table{
  height:100%!important;
}
.pdf-preview-modal-shell .facture-table tbody tr:nth-child(only-child) td,
.doc-preview .facture-table tbody tr:nth-child(only-child) td{
  height:42mm!important;
}
.pdf-preview-modal-shell .facture-payment,
.doc-preview .facture-payment{
  min-height:38mm!important;
}
@media print{
  .pdf-logo-img{width:16px!important;height:16px!important;max-width:16px!important;max-height:16px!important;background:#fff!important;padding:0!important}
  .mr3e-logo-mark{width:16px!important;height:16px!important;background:#fff!important;color:#0f172a!important;font-size:8px!important}
  .facture-table tbody tr:nth-child(only-child) td{height:42mm!important}
}

/* v78 - Detail/PDF preview: tiny logo + totals pinned lower on A4 */
.pdf-preview-modal-shell .doc-preview,
.doc-preview.facture-template,
.doc-preview.invoice-template,
.doc-preview.delivery-template{
  width:210mm!important;
  height:297mm!important;
  min-height:297mm!important;
  max-height:297mm!important;
  background:#fff!important;
  padding:8mm 9mm!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.pdf-preview-modal-shell .pdf-logo-img,
.doc-preview .pdf-logo-img,
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  min-height:14px!important;
  max-width:14px!important;
  max-height:14px!important;
  object-fit:contain!important;
  background:#fff!important;
  padding:0!important;
  border:1px solid #e5e7eb!important;
  border-radius:3px!important;
  flex:0 0 14px!important;
}
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  color:#0f172a!important;
  font-size:7px!important;
}
.pdf-preview-modal-shell .facture-table,
.doc-preview .facture-table{
  min-height:48mm!important;
  margin-bottom:7mm!important;
}
.pdf-preview-modal-shell .facture-table tbody tr:nth-child(only-child) td,
.doc-preview .facture-table tbody tr:nth-child(only-child) td{
  height:36mm!important;
}
.pdf-preview-modal-shell .facture-bottom,
.doc-preview .facture-bottom{
  margin-top:auto!important;
  margin-bottom:7mm!important;
  align-self:stretch!important;
}
.pdf-preview-modal-shell .pro-doc-footer,
.doc-preview .pro-doc-footer{
  margin-top:0!important;
}
@media print{
  .pdf-logo-img,.mr3e-logo-mark{width:14px!important;height:14px!important;max-width:14px!important;max-height:14px!important;background:#fff!important;padding:0!important}
  .facture-bottom{margin-top:auto!important;margin-bottom:7mm!important}
}

/* v79 - user registration approval */
.user-approval-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  margin-bottom:16px;
  background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(34,197,94,.08));
}
.user-approval-banner span,
.pending-users-card .toolbar span{
  color:#2563eb;
  font-weight:950;
  text-transform:uppercase;
  font-size:.76rem;
  letter-spacing:.08em;
}
.user-approval-banner strong{
  display:block;
  font-size:2.1rem;
  color:var(--text);
  line-height:1;
  margin-top:4px;
}
.user-approval-banner small{
  display:block;
  color:var(--muted);
  margin-top:5px;
}
.pending-users-card{
  border:1px solid rgba(245,158,11,.28)!important;
  box-shadow:0 18px 46px rgba(245,158,11,.08)!important;
}
.pending-user-row td{
  background:rgba(255,251,235,.55)!important;
}
.user-admin-actions{
  gap:6px!important;
  flex-wrap:wrap!important;
}
.user-admin-actions .btn{
  min-height:32px!important;
  padding:0 10px!important;
  font-size:.78rem!important;
}
@media(max-width:780px){
  .user-approval-banner{flex-direction:column;align-items:flex-start}
}

/* v80 - register visible message + PDF logo clean + uploads URLs */
.register-success-message{
  display:block;
  margin-bottom:12px;
}
.pdf-preview-modal-shell .pdf-logo-img,
.doc-preview .pdf-logo-img,
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  max-width:24px!important;
  max-height:24px!important;
  background:#fff!important;
  border:1px solid #e5e7eb!important;
  border-radius:6px!important;
  padding:1px!important;
  object-fit:contain!important;
  flex:0 0 24px!important;
}
.pdf-preview-modal-shell .mr3e-logo-mark,
.doc-preview .mr3e-logo-mark{
  color:#0f172a!important;
  font-size:10px!important;
}
.pdf-preview-modal-shell .pdf-brand-lockup,
.doc-preview .pdf-brand-lockup{
  gap:8px!important;
}

/* v81 - clean profile popover + users refresh + client form safety */
.profile-popover-v81{
  width:min(380px,calc(100vw - 26px))!important;
  right:18px!important;
  top:76px!important;
  left:auto!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:24px!important;
}
.profile-v81-head{
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr) 34px!important;
  gap:12px!important;
  align-items:center!important;
  padding:18px!important;
  border-bottom:1px solid rgba(148,163,184,.18)!important;
}
.profile-v81-main{min-width:0!important}
.profile-v81-main span{
  color:#2563eb!important;
  font-size:.72rem!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.profile-v81-main h3{
  margin:3px 0!important;
  font-size:1rem!important;
  line-height:1.1!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.profile-v81-main p{
  margin:0!important;
  color:var(--muted)!important;
  font-size:.82rem!important;
  line-height:1.35!important;
  word-break:break-word!important;
}
.profile-v81-main b{
  display:inline-flex!important;
  margin-top:7px!important;
  padding:5px 9px!important;
  border-radius:999px!important;
  background:rgba(37,99,235,.10)!important;
  color:#2563eb!important;
  font-size:.72rem!important;
}
.profile-v81-stats{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  padding:14px 18px!important;
}
.profile-v81-stats article{
  border:1px solid rgba(148,163,184,.18)!important;
  border-radius:16px!important;
  padding:12px!important;
  background:rgba(248,250,252,.65)!important;
}
.profile-v81-stats small{display:block!important;color:var(--muted)!important;font-size:.72rem!important}
.profile-v81-stats strong{display:block!important;margin-top:4px!important;font-size:.95rem!important;color:var(--text)!important;white-space:normal!important}
.profile-v81-actions{
  display:grid!important;
  gap:8px!important;
  padding:0 18px 18px!important;
}
.profile-v81-actions button{
  width:100%!important;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  border:1px solid rgba(148,163,184,.18)!important;
  background:var(--card)!important;
  color:var(--text)!important;
  border-radius:16px!important;
  padding:10px!important;
  text-align:left!important;
  cursor:pointer!important;
}
.profile-v81-actions button i{
  width:38px!important;
  height:38px!important;
  border-radius:13px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(37,99,235,.09)!important;
  color:#2563eb!important;
}
.profile-v81-actions button strong,
.profile-v81-actions button small{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.profile-v81-actions button small{color:var(--muted)!important;margin-top:2px!important}
.profile-v81-actions button.danger i{background:rgba(220,38,38,.10)!important;color:#dc2626!important}
.register-success-message[style*="display:none"]{display:none}
.register-success-message{display:block;margin-bottom:12px}
.pending-users-card .table-wrap table td small,
.card .table-wrap table td small{display:block;color:var(--muted);margin-top:3px}
@media(max-width:620px){
  .profile-popover-v81{right:10px!important;top:66px!important;width:calc(100vw - 20px)!important}
}

/* v82 - Mobile-first clean version + requested UI fixes */
html, body, #app{
  max-width:100%!important;
  overflow-x:hidden!important;
}
*{
  min-width:0;
}
.dashboard-export-btn{
  display:none!important;
}
.soft-toggle[data-client-recent]{
  display:none!important;
}
.upload-status-chip{
  display:inline-flex!important;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(37,99,235,.08);
  color:#2563eb;
  font-size:.78rem;
  font-weight:800;
  line-height:1.25;
}
.dt-money{
  white-space:nowrap!important;
  text-align:right!important;
  padding-right:18px!important;
  min-width:105px!important;
}
.dt-actions{
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:150px!important;
}
.repair-data-table-card .pro-data-table th:last-child,
.repair-data-table-card .pro-data-table td:last-child{
  width:170px!important;
}
.repair-data-table-card .pro-data-table th.dt-money,
.repair-data-table-card .pro-data-table td.dt-money{
  width:120px!important;
}
.stock-product-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;
  gap:16px!important;
  align-items:stretch!important;
}
.stock-product-card{
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  min-height:310px!important;
  border-radius:24px!important;
  overflow:hidden!important;
}
.stock-product-media{
  min-height:96px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  padding:16px!important;
}
.stock-product-media .category-badge{
  max-width:100%!important;
  white-space:normal!important;
  line-height:1.25!important;
}
.stock-product-body{
  padding:16px!important;
  flex:1!important;
}
.stock-product-body h3,
.stock-product-body p{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.stock-product-stats{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:8px!important;
}
.stock-product-actions{
  padding:14px 16px 16px!important;
  display:grid!important;
  grid-template-columns:1fr 1fr 1fr!important;
  gap:8px!important;
}
.stock-product-actions .btn{
  min-height:38px!important;
  padding:0 10px!important;
  font-size:.82rem!important;
}
.payments-history-card .table-wrap{
  overflow-x:auto;
}
.payments-history-card .btn.mini{
  min-height:32px!important;
  padding:0 10px!important;
  font-size:.78rem!important;
}
.order-actions-compact{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
}
.order-actions-compact .btn{
  min-height:32px!important;
  padding:0 9px!important;
  font-size:.76rem!important;
}
.repair-parts-lines{
  display:grid;
  gap:12px;
}
.repair-part-line{
  border:1px solid rgba(148,163,184,.18);
  border-radius:16px;
  padding:12px;
  background:rgba(248,250,252,.55);
}

/* Better employees/profile/absence rough polish */
.hr-employee-card,
.employee-profile-card,
.absence-card,
.hr-card{
  border-radius:22px!important;
  box-shadow:0 16px 40px rgba(15,23,42,.06)!important;
}
.absence-calendar-grid{
  display:grid!important;
  grid-template-columns:repeat(7,1fr)!important;
  gap:8px!important;
}
.absence-calendar-grid > *{
  min-height:54px!important;
  border-radius:14px!important;
  background:rgba(248,250,252,.75)!important;
}

/* Mobile layout */
@media(max-width: 760px){
  body{
    background:#f8fafc!important;
  }
  .app-shell{
    display:block!important;
    width:100%!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
  }
  .main{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
  }
  .content{
    padding:12px 12px 88px!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  .topbar{
    position:sticky!important;
    top:0!important;
    z-index:70!important;
    width:100%!important;
    padding:10px 12px!important;
    border-radius:0 0 20px 20px!important;
    background:rgba(255,255,255,.96)!important;
    backdrop-filter:blur(16px)!important;
    box-shadow:0 10px 30px rgba(15,23,42,.08)!important;
  }
  [data-theme="dark"] .topbar{
    background:rgba(15,23,42,.96)!important;
  }
  .topbar-title span{
    display:none!important;
  }
  .profile .theme-switcher,
  .profile .icon-theme-switcher,
  .profile-trigger span,
  .profile-trigger > i{
    display:none!important;
  }
  .profile{
    gap:6px!important;
  }
  .sidebar{
    position:fixed!important;
    inset:0 auto 0 0!important;
    width:min(84vw,320px)!important;
    max-width:320px!important;
    height:100vh!important;
    z-index:120!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
    overflow-y:auto!important;
    border-radius:0 24px 24px 0!important;
    box-shadow:18px 0 60px rgba(15,23,42,.22)!important;
  }
  .sidebar.open{
    transform:translateX(0)!important;
  }
  .mobile-menu{
    display:inline-flex!important;
  }
  .nav-category .category-main{
    min-height:46px!important;
    border-radius:14px!important;
  }
  .category-sub{
    padding-left:8px!important;
  }
  .category-sub button{
    min-height:38px!important;
    border-radius:12px!important;
    font-size:.88rem!important;
  }
  .page-title,
  .module-hero,
  .cc-hero,
  .client-project-head,
  .repair-hero-panel,
  .module-title-block{
    display:block!important;
    padding:16px!important;
    border-radius:22px!important;
    margin-bottom:12px!important;
  }
  .page-title .actions,
  .module-head-actions,
  .client-head-actions,
  .cc-hero-actions{
    margin-top:12px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    width:100%!important;
  }
  .btn{
    min-height:42px!important;
    border-radius:13px!important;
    justify-content:center!important;
  }
  .grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .finance-panel-grid,
  .commercial-order-grid,
  .client-context-panel,
  .cc-grid,
  .dashboard-grid,
  .form-grid{
    grid-template-columns:1fr!important;
    width:100%!important;
  }
  .card{
    border-radius:20px!important;
    padding:14px!important;
    overflow:hidden!important;
  }
  .table-wrap,
  .data-table-wrap{
    max-width:100%!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  table{
    min-width:720px!important;
  }
  .stock-product-grid{
    grid-template-columns:1fr!important;
  }
  .stock-product-card{
    min-height:auto!important;
  }
  .stock-product-actions{
    grid-template-columns:1fr!important;
  }
  .repair-data-table-card .data-table-wrap table{
    min-width:780px!important;
  }
  .modal{
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
    max-height:88vh!important;
    overflow-y:auto!important;
    border-radius:22px!important;
    padding:14px!important;
  }
  .modal .toolbar{
    position:sticky!important;
    top:0!important;
    background:var(--card)!important;
    z-index:5!important;
    padding-bottom:10px!important;
  }
  .drawer-scrim{
    z-index:130!important;
  }
  .floating-panel,
  .profile-popover-v81{
    z-index:140!important;
    width:calc(100vw - 20px)!important;
    right:10px!important;
    left:10px!important;
    top:64px!important;
    max-height:calc(100vh - 80px)!important;
    overflow:auto!important;
  }
  .period-menu{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    top:auto!important;
    bottom:18px!important;
    width:auto!important;
    max-width:none!important;
    z-index:500!important;
    border-radius:22px!important;
    box-shadow:0 24px 70px rgba(15,23,42,.28)!important;
  }
  .period-menu button{
    min-height:44px!important;
  }
  .mr3e-nav-v66{
    position:relative!important;
    display:block!important;
    padding:14px!important;
  }
  .mr3e-nav-v66 nav{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin-top:12px!important;
  }
  .mr3e-hero-v66{
    grid-template-columns:1fr!important;
    padding:32px 14px!important;
  }
  .mr3e-hero-copy-v66 h1{
    font-size:2.1rem!important;
    line-height:1.05!important;
  }
  .mr3e-benefit-grid-v66,
  .mr3e-service-grid-v66,
  .mr3e-blog-grid-v66,
  .mr3e-about-v66,
  .mr3e-contact-v66{
    grid-template-columns:1fr!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
}

/* v83 - compact tables, list stock, responsive menu, read notifications */
.top-notification b{
  pointer-events:none!important;
}
.notification-row.is-read{
  opacity:.62!important;
}
.notification-row.is-read .notification-dot{
  filter:grayscale(1)!important;
}
.notification-row.is-new{
  box-shadow:inset 3px 0 0 #2563eb!important;
}

.client-data-table-card table,
.repair-data-table-card table,
.data-table-card table{
  table-layout:fixed!important;
  width:100%!important;
  min-width:0!important;
}
.client-data-table-card th,
.client-data-table-card td,
.repair-data-table-card th,
.repair-data-table-card td{
  padding:9px 8px!important;
  font-size:.78rem!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.client-data-table-card td strong,
.client-data-table-card td small,
.repair-data-table-card td strong,
.repair-data-table-card td small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.client-data-table-card th:nth-child(1){width:17%!important}
.client-data-table-card th:nth-child(2){width:14%!important}
.client-data-table-card th:nth-child(3){width:11%!important}
.client-data-table-card th:nth-child(4){width:9%!important}
.client-data-table-card th:nth-child(5){width:10%!important}
.client-data-table-card th:nth-child(6){width:9%!important}
.client-data-table-card th:nth-child(7){width:10%!important}
.client-data-table-card th:nth-child(8){width:13%!important}
.client-data-table-card th:nth-child(9){width:7%!important}
.client-data-table-card .dt-money,
.repair-data-table-card .dt-money{
  min-width:0!important;
  width:auto!important;
  padding-right:8px!important;
  font-size:.76rem!important;
}
.repair-data-table-card th:nth-child(1){width:16%!important}
.repair-data-table-card th:nth-child(2){width:22%!important}
.repair-data-table-card th:nth-child(3){width:11%!important}
.repair-data-table-card th:nth-child(4){width:11%!important}
.repair-data-table-card th:nth-child(5){width:13%!important}
.repair-data-table-card th:nth-child(6){width:12%!important}
.repair-data-table-card th:nth-child(7){width:15%!important}
.repair-data-table-card .dt-actions{
  min-width:0!important;
  justify-content:flex-end!important;
  gap:5px!important;
}
.repair-data-table-card .icon-btn.mini{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
}
.repair-data-table-card .icon-btn.mini svg,
.repair-data-table-card .icon-btn.mini i{
  width:15px!important;
  height:15px!important;
}

/* Stock as clean list instead of cards */
.stock-product-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}
.stock-list-row{
  display:grid!important;
  grid-template-columns:minmax(220px,1.45fr) minmax(110px,.7fr) 90px 105px 105px minmax(210px,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  padding:12px!important;
  border:1px solid rgba(148,163,184,.20)!important;
  border-radius:18px!important;
  background:var(--card)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.04)!important;
}
.stock-list-row.critical{border-color:rgba(220,38,38,.32)!important;background:linear-gradient(90deg,rgba(254,242,242,.65),var(--card))!important}
.stock-list-row.warning{border-color:rgba(245,158,11,.34)!important;background:linear-gradient(90deg,rgba(255,251,235,.75),var(--card))!important}
.stock-list-main{
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
}
.stock-list-main .stock-placeholder,
.stock-list-main img{
  width:46px!important;
  height:46px!important;
  border-radius:14px!important;
}
.stock-list-main strong,
.stock-list-main small{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.stock-list-main small{color:var(--muted)!important;margin-top:2px!important}
.stock-list-cat .category-badge{
  white-space:normal!important;
  line-height:1.2!important;
}
.stock-list-metric strong,
.stock-list-metric small{
  display:block!important;
  text-align:right!important;
}
.stock-list-metric small{
  color:var(--muted)!important;
  font-size:.72rem!important;
}
.stock-list-actions{
  display:flex!important;
  gap:6px!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
}
.stock-list-actions .btn{
  min-height:32px!important;
  padding:0 10px!important;
  font-size:.78rem!important;
}
.stock-side-panel{
  min-width:0!important;
}
.stock-history-modal-card .table-wrap{
  max-height:60vh!important;
  overflow:auto!important;
}

/* menu responsive relation with page */
.sidebar{
  flex:0 0 280px!important;
}
.main{
  min-width:0!important;
}
@media(max-width:1180px){
  .sidebar{width:260px!important;flex-basis:260px!important}
  .content{padding-left:14px!important;padding-right:14px!important}
}
@media(max-width:900px){
  .client-data-table-card table,
  .repair-data-table-card table{
    min-width:650px!important;
  }
}
@media(max-width:760px){
  .client-data-table-card .data-table-wrap,
  .repair-data-table-card .data-table-wrap{
    overflow-x:auto!important;
  }
  .client-data-table-card table,
  .repair-data-table-card table{
    min-width:640px!important;
  }
  .client-data-table-card th,
  .client-data-table-card td,
  .repair-data-table-card th,
  .repair-data-table-card td{
    font-size:.72rem!important;
    padding:7px 6px!important;
  }
  .stock-list-row{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .stock-list-metric strong,
  .stock-list-metric small{
    text-align:left!important;
  }
  .stock-list-actions{
    justify-content:stretch!important;
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .stock-list-actions .btn{
    width:100%!important;
  }
}

/* v83 overrides for mobile tables */
@media(max-width:760px){
  .client-data-table-card table,
  .repair-data-table-card table{min-width:640px!important}
  .stock-history-modal-card table{min-width:680px!important}
}

/* v84 - final fixes uploads/home/sidebar/repair/share */
.pdf-share-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  align-items:center!important;
}
.pdf-share-actions a{
  text-decoration:none!important;
}
.upload-status-chip,
.stock-image-note[data-stock-image-status]{
  display:inline-flex!important;
  margin-top:8px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:rgba(37,99,235,.08)!important;
  color:#2563eb!important;
  font-size:.78rem!important;
  font-weight:800!important;
  line-height:1.25!important;
}
.stock-form-image img.stock-thumb-preview,
.stock-form-image img{
  object-fit:cover!important;
}
.client-profile-avatar-v2,
.dt-person img,
.supplier-logo,
.stock-thumb{
  object-fit:cover!important;
}
.sidebar{
  height:100vh!important;
  max-height:100vh!important;
  overflow-y:auto!important;
  padding-bottom:24px!important;
  overscroll-behavior:contain!important;
}
.side-user{
  position:sticky!important;
  bottom:0!important;
  background:inherit!important;
  padding-top:12px!important;
  margin-top:18px!important;
}
.stock-list-actions{
  min-width:260px!important;
}
.stock-list-row{
  grid-template-columns:minmax(220px,1.35fr) minmax(110px,.65fr) 76px 92px 92px minmax(260px,1.1fr)!important;
}
.stock-list-actions .btn{
  padding:0 8px!important;
}
.repair-data-table-card th:nth-child(6),
.repair-data-table-card td:nth-child(6){
  width:96px!important;
  max-width:96px!important;
}
.repair-data-table-card .dt-money{
  text-align:left!important;
  padding-left:8px!important;
  padding-right:22px!important;
  font-size:.74rem!important;
  white-space:nowrap!important;
}
.repair-data-table-card th:nth-child(7),
.repair-data-table-card td:nth-child(7){
  width:190px!important;
  min-width:190px!important;
}
.repair-data-table-card .dt-actions{
  min-width:178px!important;
  gap:8px!important;
}
.repair-data-table-card .icon-btn.mini{
  width:30px!important;
  height:30px!important;
}
@media(max-width:760px){
  .stock-list-actions{
    min-width:0!important;
  }
  .stock-list-row{
    grid-template-columns:1fr!important;
  }
  .pdf-share-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .pdf-share-actions .btn{
    width:100%!important;
  }
}

/* v85 - client images, repair actions inside table, stock buttons, sidebar full scroll */
.client-data-table-card .dt-check,
.client-data-row .dt-check{
  display:none!important;
}
.client-data-table-card th:first-child,
.client-data-table-card td:first-child{
  width:18%!important;
}
.dt-person{
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:8px!important;
}
.dt-person img,
.dt-person b{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  border-radius:12px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#eff6ff,#dbeafe)!important;
  color:#1d4ed8!important;
  font-weight:950!important;
}
.client-profile-avatar-v2{
  object-fit:cover!important;
  background:#fff!important;
}
.repair-data-table-card{
  overflow:hidden!important;
}
.repair-data-table-card .data-table-wrap{
  overflow-x:hidden!important;
}
.repair-data-table-card table{
  table-layout:fixed!important;
  width:100%!important;
  min-width:0!important;
}
.repair-data-table-card th,
.repair-data-table-card td{
  padding:8px 7px!important;
  font-size:.76rem!important;
}
.repair-data-table-card th:nth-child(1){width:15%!important}
.repair-data-table-card th:nth-child(2){width:20%!important}
.repair-data-table-card th:nth-child(3){width:10%!important}
.repair-data-table-card th:nth-child(4){width:10%!important}
.repair-data-table-card th:nth-child(5){width:13%!important}
.repair-data-table-card th:nth-child(6){width:10%!important}
.repair-data-table-card th:nth-child(7){width:22%!important}
.repair-data-table-card .dt-money{
  text-align:left!important;
  padding-left:6px!important;
  padding-right:8px!important;
  font-size:.72rem!important;
  white-space:nowrap!important;
}
.repair-data-table-card .dt-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  min-width:0!important;
  width:100%!important;
  overflow:hidden!important;
}
.repair-data-table-card .icon-btn.mini{
  width:27px!important;
  height:27px!important;
  min-width:27px!important;
  border-radius:9px!important;
  flex:0 0 27px!important;
}
.repair-data-table-card .icon-btn.mini svg,
.repair-data-table-card .icon-btn.mini i{
  width:14px!important;
  height:14px!important;
}
.stock-list-row{
  grid-template-columns:minmax(190px,1.3fr) minmax(92px,.52fr) 58px 76px 76px 178px!important;
  gap:8px!important;
}
.stock-list-actions{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:5px!important;
  min-width:0!important;
  width:100%!important;
}
.stock-list-actions .btn.mini,
.stock-list-actions .btn{
  min-height:30px!important;
  padding:0 6px!important;
  font-size:.7rem!important;
  border-radius:10px!important;
  gap:4px!important;
}
.stock-list-actions .btn i{
  font-size:.72rem!important;
}
.stock-list-actions .btn span{
  display:inline!important;
  white-space:nowrap!important;
}
.stock-list-metric strong{
  font-size:.78rem!important;
}
.stock-list-metric small{
  font-size:.65rem!important;
}
.sidebar{
  height:100dvh!important;
  max-height:100dvh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:90px!important;
  scrollbar-gutter:stable!important;
}
.sidebar .nav,
.sidebar nav{
  padding-bottom:110px!important;
}
.side-user{
  position:relative!important;
  bottom:auto!important;
  margin-bottom:30px!important;
}
.app-shell{
  min-height:100vh!important;
  align-items:stretch!important;
}
.main{
  min-width:0!important;
  overflow-x:hidden!important;
}
@media(max-width:1180px){
  .repair-data-table-card .data-table-wrap{overflow-x:auto!important}
  .repair-data-table-card table{min-width:680px!important}
}
@media(max-width:760px){
  .repair-data-table-card .data-table-wrap{overflow-x:auto!important}
  .repair-data-table-card table{min-width:640px!important}
  .stock-list-row{grid-template-columns:1fr!important}
  .stock-list-actions{grid-template-columns:1fr!important}
  .stock-list-actions .btn span{display:inline!important}
  .sidebar{padding-bottom:130px!important}
  .sidebar .nav,.sidebar nav{padding-bottom:150px!important}
}

/* v86 - final table/menu/AI/user fixes */
.stock-list-actions{
  grid-template-columns:repeat(3,34px)!important;
  justify-content:end!important;
  min-width:118px!important;
  width:auto!important;
}
.stock-list-actions .icon-btn.mini{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  border-radius:10px!important;
}
.stock-list-row{
  grid-template-columns:minmax(190px,1.45fr) minmax(92px,.65fr) 60px 78px 78px 128px!important;
}
.sidebar{
  position:sticky!important;
  top:0!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:28px!important;
}
.sidebar .nav,
.sidebar nav{
  padding-bottom:42px!important;
}
.side-user{
  position:sticky!important;
  bottom:0!important;
  background:linear-gradient(180deg,rgba(11,17,32,.88),#0b1120)!important;
  padding:12px!important;
  margin:12px -4px 0!important;
  border-radius:16px!important;
}
.client-data-table-card .data-table-wrap{
  overflow-x:hidden!important;
}
.client-data-table-card table{
  table-layout:fixed!important;
  width:100%!important;
  min-width:0!important;
}
.client-data-table-card th,
.client-data-table-card td{
  padding:8px 7px!important;
  font-size:.74rem!important;
  line-height:1.22!important;
  white-space:normal!important;
}
.client-data-table-card th:nth-child(1){width:18%!important}
.client-data-table-card th:nth-child(2){width:15%!important}
.client-data-table-card th:nth-child(3){width:10%!important}
.client-data-table-card th:nth-child(4){width:9%!important}
.client-data-table-card th:nth-child(5){width:10%!important}
.client-data-table-card th:nth-child(6){width:8%!important}
.client-data-table-card th:nth-child(7){width:10%!important}
.client-data-table-card th:nth-child(8){width:14%!important}
.client-data-table-card th:nth-child(9){width:6%!important}
.client-data-table-card .dt-person{
  grid-template-columns:30px minmax(0,1fr)!important;
  gap:7px!important;
}
.client-data-table-card .dt-person img,
.client-data-table-card .dt-person b{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:10px!important;
}
.client-data-table-card .dt-money{
  font-size:.7rem!important;
  white-space:nowrap!important;
  text-align:left!important;
  padding-right:4px!important;
}
.client-data-table-card .dt-score{
  min-width:28px!important;
  height:24px!important;
  font-size:.72rem!important;
}
.client-data-table-card .badge{
  font-size:.66rem!important;
  padding:4px 6px!important;
}
.client-data-table-card .dt-actions{
  justify-content:flex-end!important;
  gap:4px!important;
}
.client-data-table-card .icon-btn.mini{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
}
.user-mode-note{
  margin-bottom:12px!important;
  background:linear-gradient(135deg,rgba(6,182,212,.08),rgba(37,99,235,.08))!important;
}
.user-mode-note strong,
.user-mode-note small{
  display:block!important;
}
.user-mode-note small{
  color:var(--muted)!important;
  margin-top:4px!important;
  line-height:1.45!important;
}
.ai-settings-card .alert{
  margin-top:12px!important;
}
@media(max-width:980px){
  .sidebar{position:fixed!important}
  .client-data-table-card .data-table-wrap{overflow-x:auto!important}
  .client-data-table-card table{min-width:680px!important}
}
@media(max-width:760px){
  .stock-list-actions{grid-template-columns:repeat(3,34px)!important;justify-content:start!important}
  .sidebar{position:fixed!important}
}

/* v87 - stabilize profile/clients/home/menu */
.mr3e-home-v66{
  background:
    radial-gradient(circle at 10% 8%, rgba(6,182,212,.16), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(37,99,235,.14), transparent 30%),
    linear-gradient(180deg,#06101d 0%,#0b1727 50%,#f8fafc 50%,#f8fafc 100%)!important;
  color:#0f172a!important;
}
.mr3e-home-v66 h1,
.mr3e-home-v66 h2,
.mr3e-home-v66 h3{
  color:#0f172a!important;
}
.mr3e-hero-v66 h1,
.mr3e-hero-v66 h2,
.mr3e-hero-v66 h3,
.mr3e-hero-copy-v66 h1{
  color:#ffffff!important;
}
.mr3e-hero-copy-v66 p,
.mr3e-hero-v66 p{
  color:#dbeafe!important;
}
.mr3e-section-title-v66 h2,
.mr3e-about-card-v66 h2,
.mr3e-contact-v66 h2{
  color:#0f172a!important;
}
.mr3e-section-title-v66 p,
.mr3e-service-grid-v66 p,
.mr3e-about-card-v66 p,
.mr3e-contact-v66 p{
  color:#475569!important;
}
.mr3e-service-grid-v66 article,
.mr3e-benefit-grid-v66 article,
.mr3e-blog-grid-v66 article{
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid rgba(148,163,184,.18)!important;
}
.mr3e-board-v66,
.mr3e-board-v66 h3,
.mr3e-board-v66 strong{
  color:#fff!important;
}
.mr3e-board-v66 p,
.mr3e-board-v66 small{
  color:#cbd5e1!important;
}

/* stable profile */
.profile-page-head,
.client-profile-clean{
  width:100%!important;
  max-width:100%!important;
}
.client-profile-clean{
  display:grid!important;
  gap:16px!important;
}
.client-profile-hero-clean{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:18px!important;
}
.client-profile-id{
  display:grid!important;
  grid-template-columns:64px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
}
.client-profile-id h2,
.client-profile-id p{
  margin:0!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.client-profile-id span{
  color:#2563eb!important;
  font-size:.78rem!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.client-profile-avatar-v2{
  width:64px!important;
  height:64px!important;
  border-radius:20px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-weight:950!important;
  font-size:1.4rem!important;
}
.client-profile-tags{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.client-profile-tags b{
  padding:7px 10px!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:.78rem!important;
}
.info-list-clean{
  display:grid!important;
  gap:10px!important;
}
.info-list-clean p{
  display:flex!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  padding:10px 0!important;
  border-bottom:1px solid rgba(148,163,184,.15)!important;
}
.info-list-clean span{
  color:var(--muted)!important;
  text-align:right!important;
}
.profile-action-clean{
  display:grid!important;
  gap:10px!important;
}

/* clients page stable table */
.client-data-table-card{
  overflow:hidden!important;
}
.client-data-table-card .data-table-wrap,
.client-data-table-card .table-wrap{
  overflow-x:auto!important;
}
.client-data-table-card table{
  table-layout:fixed!important;
  width:100%!important;
  min-width:920px!important;
}
.client-data-table-card th,
.client-data-table-card td{
  padding:10px 9px!important;
  font-size:.78rem!important;
  line-height:1.25!important;
  vertical-align:middle!important;
}
.client-data-table-card .dt-person{
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:8px!important;
}
.client-data-table-card .dt-person img,
.client-data-table-card .dt-person b{
  width:34px!important;
  height:34px!important;
  border-radius:12px!important;
}
.client-data-table-card .dt-money{
  white-space:nowrap!important;
  text-align:left!important;
}
.client-data-table-card .dt-actions{
  display:flex!important;
  gap:6px!important;
  justify-content:flex-end!important;
  min-width:90px!important;
}
.client-data-table-card th:nth-child(1){width:170px!important}
.client-data-table-card th:nth-child(2){width:145px!important}
.client-data-table-card th:nth-child(3){width:105px!important}
.client-data-table-card th:nth-child(4){width:90px!important}
.client-data-table-card th:nth-child(5){width:95px!important}
.client-data-table-card th:nth-child(6){width:75px!important}
.client-data-table-card th:nth-child(7){width:95px!important}
.client-data-table-card th:nth-child(8){width:130px!important}
.client-data-table-card th:nth-child(9){width:95px!important}

/* AI settings must be visible in menu */
.category-sub [data-view="aiSettings"]{
  display:flex!important;
}
.ai-settings-card{
  max-width:900px!important;
}
@media(max-width:760px){
  .client-profile-hero-clean{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  .client-profile-tags{
    justify-content:flex-start!important;
  }
  .client-data-table-card table{
    min-width:880px!important;
  }
}

/* v88 - fixed sidebar + stable client table + upload images + supplier profile */
@media(min-width:981px){
  .app-shell{
    display:block!important;
    min-height:100vh!important;
    background:#f8fafc!important;
  }
  .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:280px!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-bottom:24px!important;
    z-index:80!important;
    border-radius:0!important;
  }
  .main{
    margin-left:280px!important;
    width:calc(100% - 280px)!important;
    max-width:calc(100% - 280px)!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
  }
  .topbar{
    position:sticky!important;
    top:0!important;
    z-index:60!important;
  }
}
.sidebar .nav,
.sidebar nav{
  padding-bottom:30px!important;
}
.side-user{
  position:relative!important;
  margin-bottom:24px!important;
}

/* Client table: kill broken card row styles and use real table layout */
.client-data-table-card{
  overflow:hidden!important;
}
.client-data-table-card .data-table-wrap,
.client-data-table-card .table-wrap{
  width:100%!important;
  overflow-x:auto!important;
}
.client-data-table-card table{
  display:table!important;
  table-layout:fixed!important;
  width:100%!important;
  min-width:1060px!important;
  border-collapse:separate!important;
  border-spacing:0 8px!important;
}
.client-data-table-card thead{
  display:table-header-group!important;
}
.client-data-table-card tbody{
  display:table-row-group!important;
}
.client-data-table-card tr,
.client-data-table-card tr.data-table-row,
.client-data-table-card .data-table-row{
  display:table-row!important;
  height:auto!important;
  min-height:0!important;
  transform:none!important;
}
.client-data-table-card th,
.client-data-table-card td{
  display:table-cell!important;
  vertical-align:middle!important;
  padding:10px 9px!important;
  font-size:.78rem!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.client-data-table-card th:first-child,
.client-data-table-card td:first-child{
  display:none!important;
}
.client-data-table-card th:nth-child(2){width:190px!important}
.client-data-table-card th:nth-child(3){width:160px!important}
.client-data-table-card th:nth-child(4){width:135px!important}
.client-data-table-card th:nth-child(5){width:90px!important}
.client-data-table-card th:nth-child(6){width:105px!important}
.client-data-table-card th:nth-child(7){width:80px!important}
.client-data-table-card th:nth-child(8){width:105px!important}
.client-data-table-card th:nth-child(9){width:150px!important}
.client-data-table-card th:nth-child(10){width:95px!important}
.client-data-table-card td{
  background:#fff!important;
  border-top:1px solid rgba(148,163,184,.15)!important;
  border-bottom:1px solid rgba(148,163,184,.15)!important;
}
.client-data-table-card td:nth-child(2){
  border-left:1px solid rgba(148,163,184,.15)!important;
  border-radius:16px 0 0 16px!important;
}
.client-data-table-card td:last-child{
  border-right:1px solid rgba(148,163,184,.15)!important;
  border-radius:0 16px 16px 0!important;
}
.client-data-table-card .dt-person{
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
}
.client-data-table-card .dt-person img,
.client-data-table-card .dt-person b{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  border-radius:12px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
}
.client-data-table-card .dt-person strong,
.client-data-table-card .dt-person small{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.client-data-table-card .dt-money{
  white-space:nowrap!important;
  text-align:left!important;
}
.client-data-table-card .dt-actions{
  display:flex!important;
  gap:6px!important;
  justify-content:flex-end!important;
}
.client-data-table-card .icon-btn.mini{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
}

/* Upload preview */
.upload-status-chip{
  display:inline-flex!important;
  margin-top:8px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:rgba(37,99,235,.08)!important;
  color:#2563eb!important;
  font-size:.78rem!important;
  font-weight:850!important;
}
.client-upload-preview,
.stock-form-image img,
.supplier-logo,
.stock-thumb,
.client-profile-avatar-v2{
  object-fit:cover!important;
}

/* Supplier profile clean */
.supplier-profile-clean{
  display:grid!important;
  gap:16px!important;
}
.supplier-profile-head{
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:center!important;
  padding:16px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,rgba(37,99,235,.07),rgba(6,182,212,.06))!important;
}
.supplier-profile-logo{
  width:72px!important;
  height:72px!important;
  border-radius:20px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.18)!important;
  color:#2563eb!important;
  font-size:1.4rem!important;
  font-weight:950!important;
}
.supplier-profile-head span{
  color:#2563eb!important;
  font-size:.78rem!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.supplier-profile-head h2,
.supplier-profile-head p{
  margin:0!important;
  white-space:normal!important;
}

/* AI menu visibility */
.category-sub [data-view="aiSettings"]{
  display:flex!important;
}
@media(max-width:980px){
  .sidebar{
    position:fixed!important;
    width:min(84vw,320px)!important;
    border-radius:0 24px 24px 0!important;
  }
  .main{
    margin-left:0!important;
    width:100%!important;
    max-width:100%!important;
  }
}

/* v89 - final client table alignment + image display */
.client-data-table-card{
  overflow:hidden!important;
}
.client-data-table-card .data-table-wrap,
.client-data-table-card .table-wrap{
  width:100%!important;
  overflow-x:auto!important;
}
.client-data-table-card table{
  display:table!important;
  table-layout:fixed!important;
  width:100%!important;
  min-width:980px!important;
  border-collapse:collapse!important;
  border-spacing:0!important;
}
.client-data-table-card thead{display:table-header-group!important}
.client-data-table-card tbody{display:table-row-group!important}
.client-data-table-card tr,
.client-data-table-card .data-table-row,
.client-data-table-card .client-clean-row{
  display:table-row!important;
  height:auto!important;
  min-height:0!important;
  border:0!important;
  box-shadow:none!important;
  transform:none!important;
}
.client-data-table-card th,
.client-data-table-card td{
  display:table-cell!important;
  vertical-align:middle!important;
  padding:9px 8px!important;
  font-size:.74rem!important;
  line-height:1.18!important;
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  border-bottom:1px solid #eef2f7!important;
}
.client-data-table-card th{
  font-size:.7rem!important;
  color:#94a3b8!important;
  text-transform:uppercase!important;
  font-weight:950!important;
  background:#fff!important;
}
.client-data-table-card td{
  background:#fff!important;
}
.client-data-table-card th:first-child,
.client-data-table-card td:first-child{
  display:table-cell!important;
}
.client-data-table-card th:nth-child(1){width:170px!important}
.client-data-table-card th:nth-child(2){width:140px!important}
.client-data-table-card th:nth-child(3){width:135px!important}
.client-data-table-card th:nth-child(4){width:82px!important}
.client-data-table-card th:nth-child(5){width:88px!important}
.client-data-table-card th:nth-child(6){width:68px!important}
.client-data-table-card th:nth-child(7){width:86px!important}
.client-data-table-card th:nth-child(8){width:150px!important}
.client-data-table-card th:nth-child(9){width:82px!important}
.client-cell-main{
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
  min-width:0!important;
}
.client-cell-main img,
.client-cell-main b{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  border-radius:10px!important;
  object-fit:cover!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-weight:950!important;
  font-size:.85rem!important;
}
.client-cell-main strong,
.client-cell-main small,
.client-data-table-card td strong,
.client-data-table-card td small{
  display:block!important;
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.client-cell-main small,
.client-data-table-card td small{
  color:#64748b!important;
  font-size:.68rem!important;
  margin-top:2px!important;
}
.client-data-table-card .dt-money{
  white-space:nowrap!important;
  text-align:left!important;
  font-size:.72rem!important;
}
.client-data-table-card .dt-score{
  min-width:28px!important;
  height:24px!important;
  font-size:.72rem!important;
}
.client-data-table-card .badge{
  font-size:.66rem!important;
  padding:4px 7px!important;
  white-space:nowrap!important;
}
.client-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:6px!important;
}
.client-actions .icon-btn.mini{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
}
.client-profile-avatar-v2{
  object-fit:cover!important;
  background:#eff6ff!important;
}
@media(max-width:760px){
  .client-data-table-card table{min-width:940px!important}
}

/* v90 - clients table without Score/Statut + stronger upload clarity */
.clients-data-table-card table,
.client-data-table-card table{
  min-width:820px!important;
}
.clients-data-table-card th:first-child,
.clients-data-table-card td:first-child,
.client-data-table-card th:first-child,
.client-data-table-card td:first-child{
  display:table-cell!important;
}
.clients-data-table-card th:nth-child(1),
.client-data-table-card th:nth-child(1){width:190px!important}
.clients-data-table-card th:nth-child(2),
.client-data-table-card th:nth-child(2){width:160px!important}
.clients-data-table-card th:nth-child(3),
.client-data-table-card th:nth-child(3){width:150px!important}
.clients-data-table-card th:nth-child(4),
.client-data-table-card th:nth-child(4){width:100px!important}
.clients-data-table-card th:nth-child(5),
.client-data-table-card th:nth-child(5){width:105px!important}
.clients-data-table-card th:nth-child(6),
.client-data-table-card th:nth-child(6){width:170px!important}
.clients-data-table-card th:nth-child(7),
.client-data-table-card th:nth-child(7){width:90px!important}
.clients-data-table-card .client-clean-row td,
.client-data-table-card .client-clean-row td{
  height:58px!important;
}
.upload-status-chip{
  width:100%!important;
  border-radius:12px!important;
  justify-content:center!important;
  text-align:center!important;
}
.client-upload-preview,
.stock-form-image img{
  max-width:96px!important;
  max-height:96px!important;
  border-radius:18px!important;
  object-fit:cover!important;
}

/* v91 - Clients table simpler + public upload path */
.clients-data-table-card table,
.client-data-table-card table{
  min-width:720px!important;
}
.clients-data-table-card th:nth-child(1),
.client-data-table-card th:nth-child(1){width:210px!important}
.clients-data-table-card th:nth-child(2),
.client-data-table-card th:nth-child(2){width:125px!important}
.clients-data-table-card th:nth-child(3),
.client-data-table-card th:nth-child(3){width:160px!important}
.clients-data-table-card th:nth-child(4),
.client-data-table-card th:nth-child(4){width:95px!important}
.clients-data-table-card th:nth-child(5),
.client-data-table-card th:nth-child(5){width:105px!important}
.clients-data-table-card th:nth-child(6),
.client-data-table-card th:nth-child(6){width:90px!important}
.client-data-table-card td:nth-child(2),
.clients-data-table-card td:nth-child(2){
  white-space:nowrap!important;
}
.client-data-table-card .client-clean-row td,
.clients-data-table-card .client-clean-row td{
  height:54px!important;
}
@media(max-width:760px){
  .clients-data-table-card table,
  .client-data-table-card table{
    min-width:720px!important;
  }
}

/* v92 - supplier profile clean + stock strip restored + client image visibility */
.supplier-pro-actions{
  display:flex!important;
  gap:8px!important;
  align-items:center!important;
  flex-wrap:wrap!important;
}
.supplier-pro-actions .icon-btn.mini{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
}
.supplier-pro-actions .btn{
  min-height:34px!important;
  padding:0 10px!important;
  font-size:.78rem!important;
}

/* Clean supplier profile modal */
.supplier-profile-modal-clean{
  display:grid!important;
  gap:16px!important;
}
.supplier-profile-hero-clean{
  display:grid!important;
  grid-template-columns:78px minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:center!important;
  padding:18px!important;
  border:1px solid rgba(148,163,184,.18)!important;
  border-radius:24px!important;
  background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(6,182,212,.06))!important;
}
.supplier-profile-logo{
  width:78px!important;
  height:78px!important;
  border-radius:22px!important;
  object-fit:cover!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.2)!important;
  display:grid!important;
  place-items:center!important;
  color:#2563eb!important;
  font-size:1.6rem!important;
  font-weight:950!important;
}
.supplier-profile-title-clean span{
  display:block!important;
  color:#2563eb!important;
  font-size:.76rem!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-weight:950!important;
}
.supplier-profile-title-clean h2,
.supplier-profile-title-clean p,
.supplier-profile-title-clean small{
  margin:0!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.supplier-profile-title-clean p{color:var(--text)!important;margin-top:4px!important}
.supplier-profile-title-clean small{display:block!important;color:var(--muted)!important;margin-top:5px!important}
.supplier-profile-actions-clean{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.supplier-profile-kpis-clean{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
.supplier-profile-kpis-clean article{
  background:#fff!important;
  border:1px solid rgba(148,163,184,.16)!important;
  border-radius:18px!important;
  padding:14px!important;
}
.supplier-profile-kpis-clean span,
.supplier-profile-kpis-clean small{display:block!important;color:var(--muted)!important}
.supplier-profile-kpis-clean strong{display:block!important;margin:5px 0!important;font-size:1.25rem!important;color:var(--text)!important}
.supplier-profile-tables-clean .table-wrap{overflow:auto!important}
.supplier-profile-tables-clean table{min-width:520px!important}

/* Restore nice stock command cards */
.stock-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  margin:16px 0!important;
}
.stock-command-card{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  min-height:118px!important;
  border-radius:24px!important;
  padding:18px!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.18)!important;
  box-shadow:0 18px 45px rgba(15,23,42,.06)!important;
  overflow:hidden!important;
}
.stock-command-card span{
  color:#64748b!important;
  font-size:.78rem!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
}
.stock-command-card strong{
  color:#0f172a!important;
  font-size:1.35rem!important;
  line-height:1.1!important;
  white-space:normal!important;
}
.stock-command-card small{
  color:#64748b!important;
  line-height:1.35!important;
}
.stock-command-card.main{
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
}
.stock-command-card.main span,
.stock-command-card.main strong,
.stock-command-card.main small{color:#fff!important}
.stock-command-card.danger{border-color:rgba(220,38,38,.28)!important;background:#fef2f2!important}
.stock-command-card.warning{border-color:rgba(245,158,11,.32)!important;background:#fffbeb!important}
.stock-command-card.ok{border-color:rgba(34,197,94,.24)!important;background:#f0fdf4!important}

/* client uploaded images */
.client-cell-main img,
.client-profile-avatar-v2,
.stock-form-image img.client-upload-preview{
  object-fit:cover!important;
  background:#fff!important;
}
@media(max-width:900px){
  .stock-command-strip,
  .supplier-profile-kpis-clean{
    grid-template-columns:1fr 1fr!important;
  }
  .supplier-profile-hero-clean{
    grid-template-columns:68px minmax(0,1fr)!important;
  }
  .supplier-profile-actions-clean{
    grid-column:1 / -1!important;
    justify-content:flex-start!important;
  }
}
@media(max-width:560px){
  .stock-command-strip,
  .supplier-profile-kpis-clean{
    grid-template-columns:1fr!important;
  }
}

/* v93 - Base64 localStorage images */
.upload-status-chip{background:rgba(34,197,94,.09)!important;color:#15803d!important}
.stock-form-image img,.client-cell-main img,.client-profile-avatar-v2,.supplier-logo,.supplier-profile-logo,.stock-thumb,.employee-avatar-pro img,.repair-contact-avatar{object-fit:cover!important}
.mobile-preview img{display:block;margin-top:12px;max-width:220px;border-radius:18px}

/* v94 SQL persistence + cache refresh buttons */
.asset-refresh-floating{
  position:fixed!important;
  right:18px!important;
  bottom:18px!important;
  z-index:999!important;
  border:0!important;
  border-radius:999px!important;
  padding:11px 15px!important;
  background:linear-gradient(135deg,#2563eb,#06b6d4)!important;
  color:#fff!important;
  font-weight:900!important;
  box-shadow:0 18px 45px rgba(37,99,235,.28)!important;
  cursor:pointer!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.asset-refresh-floating:hover{transform:translateY(-1px)}
@media(max-width:760px){
  .asset-refresh-floating{right:10px!important;bottom:10px!important;font-size:.78rem!important}
}

/* v95 clean install + stock equal size */
.stock-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.stock-command-card{
  min-height:124px!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  padding:18px!important;
  border-radius:24px!important;
}
.stock-command-card strong{
  white-space:normal!important;
  line-height:1.1!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.stock-command-card small,
.stock-command-card span{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.stock-product-grid{
  align-items:stretch!important;
}
.stock-product-card,
.stock-list-row{
  min-height:96px!important;
  height:100%!important;
}
.stock-list-row{
  align-items:center!important;
}
.stock-list-main strong,
.stock-list-main small{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
@media(max-width:1000px){
  .stock-command-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:560px){
  .stock-command-strip{grid-template-columns:1fr!important}
}

/* v100 image upload debug */
.upload-url-chip{
  display:block;
  margin-top:8px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(15,23,42,.06);
  color:#0f172a;
  font-size:.75rem;
  line-height:1.35;
  word-break:break-all;
  border:1px dashed rgba(37,99,235,.35);
}
.client-cell-main img,
.client-profile-avatar-v2,
.client-upload-preview{
  display:block!important;
  object-fit:cover!important;
  background:#fff!important;
}
.client-cell-main img{
  width:32px!important;
  height:32px!important;
  border-radius:10px!important;
}
.client-profile-avatar-v2{
  width:72px!important;
  height:72px!important;
}

/* v101 real upload progress */
.upload-progress{
  width:100%;
  height:26px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  align-items:center;
  position:relative;
  margin-top:8px;
  border:1px solid rgba(148,163,184,.25);
}
.upload-progress span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(135deg,#22c55e,#06b6d4);
  transition:width .18s ease;
}
.upload-progress b{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:.78rem;
  color:#0f172a;
  font-weight:950;
}
.upload-url-chip a{
  color:#2563eb;
  font-weight:900;
  text-decoration:underline;
}
.client-cell-main img,
.client-profile-avatar-v2{
  object-fit:cover!important;
}

/* v102 upload-on-select client */
.upload-progress{
  width:100%;
  height:26px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
  align-items:center;
  position:relative;
  margin-top:8px;
  border:1px solid rgba(148,163,184,.25);
}
.upload-progress span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(135deg,#22c55e,#06b6d4);
  transition:width .18s ease;
}
.upload-progress b{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:.78rem;
  color:#0f172a;
  font-weight:950;
}
.upload-url-chip a{
  color:#2563eb!important;
  font-weight:950!important;
  text-decoration:underline!important;
}

/* v103 WebP uploads + UI cleanup */
.asset-refresh-floating{display:none!important}
.topbar [data-force-assets-refresh]{
  display:inline-grid!important;
}

/* hide requested admin pages if old markup remains */
.category-sub [data-view="activityLog"],
.category-sub [data-view="security"],
.category-sub [data-view="aiSettings"],
.category-sub [data-view="templateInstaller"],
.category-sub [data-view="documentStyles"]{
  display:none!important;
}

/* equal stock command cards */
.stock-command-strip{
  align-items:stretch!important;
}
.stock-command-card{
  min-height:132px!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  gap:8px!important;
}
.stock-command-card.main,
.stock-command-card.danger,
.stock-command-card.warning,
.stock-command-card.ok{
  min-height:132px!important;
}
.stock-command-card strong{
  line-height:1.1!important;
  overflow:visible!important;
  white-space:normal!important;
}

/* AI page pro */
.ai-page-pro{
  display:grid!important;
  grid-template-columns:280px minmax(0,1fr)!important;
  gap:18px!important;
  align-items:start!important;
}
.ai-insights-panel{
  display:grid!important;
  gap:12px!important;
}
.ai-insights-panel article{
  background:var(--card)!important;
  border:1px solid rgba(148,163,184,.18)!important;
  border-radius:20px!important;
  padding:14px!important;
  display:grid!important;
  gap:7px!important;
  box-shadow:0 14px 34px rgba(15,23,42,.06)!important;
}
.ai-insights-panel i{color:#2563eb!important;font-size:1.15rem!important}
.ai-insights-panel span{color:var(--muted)!important;font-weight:850!important}
.ai-insights-panel strong{font-size:1rem!important;color:var(--text)!important}
.ai-chat-card-pro{
  min-height:620px!important;
  display:flex!important;
  flex-direction:column!important;
  padding:0!important;
  overflow:hidden!important;
}
.ai-chat-head{
  padding:18px!important;
  border-bottom:1px solid rgba(148,163,184,.16)!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
}
.ai-chat-head span{color:#2563eb!important;font-weight:900!important;text-transform:uppercase!important;font-size:.76rem!important}
.ai-chat-head h3{margin:3px 0 0!important}
.ai-chat-head b{background:#eff6ff!important;color:#1d4ed8!important;border-radius:999px!important;padding:7px 10px!important}
.ai-page-messages{
  flex:1!important;
  padding:18px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  overflow:auto!important;
  max-height:520px!important;
  background:linear-gradient(180deg,rgba(248,250,252,.72),rgba(255,255,255,.96))!important;
}
.ai-page-msg{
  max-width:86%!important;
  border-radius:18px!important;
  padding:12px 14px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  background:#fff!important;
  box-shadow:0 10px 25px rgba(15,23,42,.05)!important;
}
.ai-page-msg.user{
  margin-left:auto!important;
  background:linear-gradient(135deg,#2563eb,#06b6d4)!important;
  color:#fff!important;
}
.ai-page-msg.assistant{
  margin-right:auto!important;
}
.ai-page-msg strong{display:block!important;margin-bottom:6px!important}
.ai-page-msg ul{margin:8px 0 0 18px!important;padding:0!important}
.ai-page-msg li{margin:4px 0!important}
.ai-quick-prompts{
  padding:12px 18px!important;
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  border-top:1px solid rgba(148,163,184,.12)!important;
}
.ai-quick-prompts button{
  border:1px solid rgba(37,99,235,.18)!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  border-radius:999px!important;
  padding:7px 10px!important;
  font-weight:800!important;
}
.ai-input-row.pro{
  padding:14px 18px 18px!important;
}

/* Employee page nicer */
.employee-card,
.hr-employee-card,
.employee-profile-card{
  border-radius:24px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  box-shadow:0 18px 45px rgba(15,23,42,.06)!important;
}
.employee-avatar-pro,
.employee-avatar-pro img{
  width:56px!important;
  height:56px!important;
  border-radius:18px!important;
  object-fit:cover!important;
}
[data-employee-form] .stock-form-image{
  background:linear-gradient(135deg,rgba(37,99,235,.06),rgba(6,182,212,.05))!important;
  border:1px dashed rgba(37,99,235,.25)!important;
  border-radius:22px!important;
  padding:14px!important;
}

/* Uploaded image feedback */
.upload-status-chip a,
.stock-image-note a{
  color:#2563eb!important;
  font-weight:950!important;
  text-decoration:underline!important;
}
.stock-thumb-preview,
.supplier-logo,
.employee-avatar-pro img,
.repair-contact-avatar,
.stock-thumb{
  object-fit:cover!important;
}

@media(max-width:900px){
  .ai-page-pro{grid-template-columns:1fr!important}
  .ai-page-msg{max-width:96%!important}
}

/* v106 - rollback home stable + safe stock card equal-height fix */
.stock-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.stock-command-card,
.stock-command-card.main,
.stock-command-card.danger,
.stock-command-card.warning,
.stock-command-card.ok{
  min-height:138px!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  align-self:stretch!important;
  padding:18px!important;
  border-radius:24px!important;
  overflow:hidden!important;
}
.stock-command-card span,
.stock-command-card strong,
.stock-command-card small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.stock-command-card strong{
  line-height:1.08!important;
  font-size:1.35rem!important;
}
@media(max-width:1100px){
  .stock-command-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  .stock-command-strip{grid-template-columns:1fr!important}
}

/* v109 SAFE PDF redesign - CSS only, no JS touched */
/* PDF preview modal frame */
.pdf-preview-modal-shell{
  width:100%!important;
  max-height:82vh!important;
  overflow:auto!important;
  background:#e5e7eb!important;
  border-radius:20px!important;
  padding:18px!important;
  display:flex!important;
  justify-content:center!important;
  align-items:flex-start!important;
}

/* Existing facture/devis preview transformed into a real A4 page */
.pdf-preview-modal-shell .doc-preview.facture-template,
.pdf-preview-modal-shell .doc-preview.pro-invoice-template,
.pdf-preview-modal-shell .doc-preview.invoice-template,
.pdf-preview-modal-shell .doc-preview.pdf-style-premium{
  width:210mm!important;
  min-width:210mm!important;
  height:297mm!important;
  min-height:297mm!important;
  max-height:297mm!important;
  margin:0 auto!important;
  padding:11mm 10mm 8mm!important;
  background:#fff!important;
  color:#303030!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:0 24px 70px rgba(15,23,42,.22)!important;
  overflow:hidden!important;
  position:relative!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:10.5px!important;
  line-height:1.25!important;
}

/* Remove old decorative elements that were breaking A4 */
.pdf-preview-modal-shell .facture-side-bar,
.pdf-preview-modal-shell .facture-watermark{
  display:none!important;
}

/* Header = company + document title like formal invoice */
.pdf-preview-modal-shell .facture-header,
.pdf-preview-modal-shell .pro-invoice-header{
  display:grid!important;
  grid-template-columns:1.08fr .92fr!important;
  gap:18mm!important;
  align-items:start!important;
  margin:0 0 8mm!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

.pdf-preview-modal-shell .facture-brand,
.pdf-preview-modal-shell .pdf-brand-lockup{
  display:block!important;
  text-align:left!important;
  color:#333!important;
}

.pdf-preview-modal-shell .pdf-brand-lockup img,
.pdf-preview-modal-shell .pdf-logo-img{
  display:block!important;
  width:42mm!important;
  height:28mm!important;
  object-fit:contain!important;
  background:#fff!important;
  border:0!important;
  margin:0 0 4mm!important;
  padding:0!important;
  border-radius:0!important;
}

.pdf-preview-modal-shell .pdf-brand-lockup strong,
.pdf-preview-modal-shell .facture-brand strong{
  display:block!important;
  font-size:18px!important;
  line-height:1.1!important;
  color:#333!important;
  margin:0 0 2mm!important;
}

.pdf-preview-modal-shell .pdf-brand-lockup span,
.pdf-preview-modal-shell .invoice-company-meta span{
  display:block!important;
  font-size:10.5px!important;
  line-height:1.35!important;
  color:#444!important;
  margin:0 0 1mm!important;
}

.pdf-preview-modal-shell .invoice-company-meta{
  display:block!important;
  margin-top:2mm!important;
}

/* Document title block */
.pdf-preview-modal-shell .facture-title-block,
.pdf-preview-modal-shell .pro-title-block{
  display:block!important;
  text-align:right!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  color:#333!important;
}

.pdf-preview-modal-shell .facture-title-block small,
.pdf-preview-modal-shell .pro-title-block small{
  display:block!important;
  color:#555!important;
  font-size:9.5px!important;
  margin-bottom:2mm!important;
  text-transform:none!important;
}

.pdf-preview-modal-shell .facture-title-block h1,
.pdf-preview-modal-shell .pro-title-block h1{
  display:block!important;
  width:78mm!important;
  margin:0 0 4mm auto!important;
  padding:2.2mm!important;
  border:1px solid #bfbfbf!important;
  color:#333!important;
  font-size:20px!important;
  line-height:1.1!important;
  font-weight:600!important;
  text-align:center!important;
  letter-spacing:.04em!important;
  background:#fff!important;
}

.pdf-preview-modal-shell .facture-title-block strong,
.pdf-preview-modal-shell .pro-title-block strong{
  display:block!important;
  color:#333!important;
  font-size:12px!important;
  margin-bottom:1.5mm!important;
}

.pdf-preview-modal-shell .facture-title-block em,
.pdf-preview-modal-shell .pro-title-block em{
  display:inline-block!important;
  font-style:normal!important;
  font-size:10px!important;
  color:#fff!important;
  background:#0f172a!important;
  border-radius:999px!important;
  padding:1.5mm 3mm!important;
}

/* Meta row: date/échéance/devise */
.pdf-preview-modal-shell .facture-meta-row,
.pdf-preview-modal-shell .pro-meta-row{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:2mm!important;
  margin:0 0 7mm!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
}

.pdf-preview-modal-shell .facture-meta-row span,
.pdf-preview-modal-shell .pro-meta-row span{
  display:block!important;
  border:1px solid #d5d5d5!important;
  background:#f7f7f7!important;
  padding:2.2mm!important;
  color:#333!important;
  font-size:10px!important;
  line-height:1.3!important;
}

.pdf-preview-modal-shell .facture-meta-row b,
.pdf-preview-modal-shell .pro-meta-row b{
  display:block!important;
  color:#555!important;
  font-size:8.5px!important;
  text-transform:uppercase!important;
  margin-bottom:.8mm!important;
}

/* Parties: emitter/client */
.pdf-preview-modal-shell .facture-parties,
.pdf-preview-modal-shell .pro-parties{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8mm!important;
  margin:0 0 8mm!important;
}

.pdf-preview-modal-shell .facture-parties > div,
.pdf-preview-modal-shell .pro-parties > div{
  border:1px solid #d8d8d8!important;
  background:#f6f6f6!important;
  padding:0!important;
  min-height:30mm!important;
}

.pdf-preview-modal-shell .facture-parties h3,
.pdf-preview-modal-shell .pro-parties h3{
  margin:0!important;
  padding:2mm!important;
  background:#e9e9e9!important;
  color:#333!important;
  font-size:10px!important;
  letter-spacing:.05em!important;
  border-bottom:2px solid #fff!important;
}

.pdf-preview-modal-shell .facture-parties p,
.pdf-preview-modal-shell .pro-parties p{
  margin:0!important;
  padding:2.5mm!important;
  color:#333!important;
  font-size:11px!important;
  line-height:1.35!important;
}

/* Items table */
.pdf-preview-modal-shell .facture-table,
.pdf-preview-modal-shell .pro-invoice-table{
  width:100%!important;
  border-collapse:collapse!important;
  margin:0 0 8mm!important;
  font-size:10.5px!important;
  color:#333!important;
}

.pdf-preview-modal-shell .facture-table th,
.pdf-preview-modal-shell .pro-invoice-table th{
  padding:2.3mm 1.3mm!important;
  text-align:right!important;
  border-top:1px solid #bfbfbf!important;
  border-bottom:1px solid #bfbfbf!important;
  background:#fff!important;
  color:#333!important;
  font-size:11px!important;
  font-weight:800!important;
}

.pdf-preview-modal-shell .facture-table th:first-child,
.pdf-preview-modal-shell .pro-invoice-table th:first-child{
  text-align:left!important;
}

.pdf-preview-modal-shell .facture-table td,
.pdf-preview-modal-shell .pro-invoice-table td{
  padding:2.6mm 1.3mm!important;
  text-align:right!important;
  vertical-align:top!important;
  border-bottom:1px solid #d9d9d9!important;
  color:#333!important;
  background:#fff!important;
}

.pdf-preview-modal-shell .facture-table td:first-child,
.pdf-preview-modal-shell .pro-invoice-table td:first-child{
  text-align:left!important;
  width:44%!important;
}

.pdf-preview-modal-shell .facture-table td strong,
.pdf-preview-modal-shell .pro-invoice-table td strong{
  color:#333!important;
  font-size:11.5px!important;
  line-height:1.2!important;
}

/* Bottom = payment + totals */
.pdf-preview-modal-shell .facture-bottom,
.pdf-preview-modal-shell .pro-invoice-bottom{
  display:grid!important;
  grid-template-columns:1fr 79mm!important;
  gap:14mm!important;
  align-items:start!important;
  margin-top:8mm!important;
}

.pdf-preview-modal-shell .facture-payment,
.pdf-preview-modal-shell .facture-terms{
  color:#333!important;
  font-size:10px!important;
  line-height:1.4!important;
}

.pdf-preview-modal-shell .facture-payment h3,
.pdf-preview-modal-shell .facture-terms strong{
  display:block!important;
  color:#333!important;
  font-size:12px!important;
  margin:0 0 2.5mm!important;
}

.pdf-preview-modal-shell .facture-payment p,
.pdf-preview-modal-shell .facture-terms p{
  margin:0 0 3mm!important;
  color:#444!important;
}

.pdf-preview-modal-shell .facture-totals,
.pdf-preview-modal-shell .pro-total-box{
  display:block!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  color:#333!important;
}

.pdf-preview-modal-shell .facture-totals > div,
.pdf-preview-modal-shell .pro-total-box > div{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:8px!important;
  padding:2.2mm 0!important;
  border-bottom:1px solid #d2d2d2!important;
  color:#333!important;
  font-size:10.5px!important;
}

.pdf-preview-modal-shell .facture-totals span,
.pdf-preview-modal-shell .pro-total-box span{
  color:#333!important;
}

.pdf-preview-modal-shell .facture-totals b,
.pdf-preview-modal-shell .pro-total-box b{
  color:#333!important;
  font-size:11px!important;
}

.pdf-preview-modal-shell .facture-totals .grand,
.pdf-preview-modal-shell .pro-total-box .grand{
  border-top:2px solid #333!important;
  margin-top:1mm!important;
  font-weight:900!important;
}

.pdf-preview-modal-shell .facture-totals .grand b,
.pdf-preview-modal-shell .pro-total-box .grand b{
  font-size:13px!important;
}

/* Legal footer bottom */
.pdf-preview-modal-shell .pro-doc-footer{
  position:absolute!important;
  left:10mm!important;
  right:10mm!important;
  bottom:5mm!important;
  display:grid!important;
  grid-template-columns:1fr auto 1fr!important;
  gap:6px!important;
  border-top:1px solid #d8d8d8!important;
  padding-top:2mm!important;
  color:#555!important;
  font-size:7px!important;
  line-height:1.15!important;
  text-align:center!important;
  background:#fff!important;
}

.pdf-preview-modal-shell .pro-doc-footer span:first-child{
  text-align:left!important;
}

.pdf-preview-modal-shell .pro-doc-footer span:last-child{
  text-align:right!important;
}

/* Print safety: only affects preview/print document */
@media print{
  body:has(.pdf-preview-modal-shell){
    background:#fff!important;
  }
  .pdf-preview-modal-shell{
    max-height:none!important;
    overflow:visible!important;
    padding:0!important;
    background:#fff!important;
  }
  .pdf-preview-modal-shell .doc-preview.facture-template{
    box-shadow:none!important;
  }
}

/* v109 stock card hard fix */
.stock-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  width:100%!important;
  overflow:visible!important;
}
.stock-command-strip > .stock-command-card,
.stock-command-strip > .stock-command-card.main,
.stock-command-strip > .stock-command-card.danger{
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  grid-column:auto!important;
  flex:initial!important;
  transform:none!important;
  margin:0!important;
  min-height:138px!important;
  height:138px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  overflow:hidden!important;
}
.stock-command-strip > .stock-command-card.main{
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
  color:#fff!important;
}
.stock-command-strip > .stock-command-card span,
.stock-command-strip > .stock-command-card strong,
.stock-command-strip > .stock-command-card small{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
@media(max-width:1100px){
  .stock-command-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  .stock-command-strip{grid-template-columns:1fr!important}
  .stock-command-strip > .stock-command-card{height:auto!important;min-height:124px!important}
}

/* v110 documents: safer PDF style, logo, BC PDF, Bon de livraison */
.pdf-preview-modal-shell .pdf-logo-img,
.pdf-preview-modal-shell .pdf-brand-lockup img{
  width:38mm!important;
  height:24mm!important;
  max-width:38mm!important;
  max-height:24mm!important;
  object-fit:contain!important;
  background:#fff!important;
  border:0!important;
  border-radius:0!important;
  padding:0!important;
  box-shadow:none!important;
}
.pdf-preview-modal-shell .mr3e-logo-mark{
  width:24mm!important;
  height:18mm!important;
  border-radius:10px!important;
  display:grid!important;
  place-items:center!important;
  background:#0f172a!important;
  color:#fff!important;
  font-weight:950!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template,
.pdf-preview-modal-shell .doc-preview.delivery-template{
  background:#fff!important;
  color:#1f2937!important;
}
.pdf-preview-modal-shell .facture-title-block h1,
.pdf-preview-modal-shell .delivery-title-block h1{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  padding:5px 12px!important;
  border-radius:0!important;
  color:#111827!important;
}
.pdf-preview-modal-shell .facture-parties>div,
.pdf-preview-modal-shell .delivery-dest,
.pdf-preview-modal-shell .delivery-info{
  background:#f8fafc!important;
  border:1px solid #dbe4ef!important;
}
.pdf-preview-modal-shell .facture-table th,
.pdf-preview-modal-shell .delivery-table th{
  background:#0f172a!important;
  color:#fff!important;
}
.pdf-preview-modal-shell .facture-totals .grand,
.pdf-preview-modal-shell .pro-total-box .grand{
  background:#f1f5f9!important;
  padding-left:6px!important;
  padding-right:6px!important;
}
.pdf-preview-modal-shell .delivery-signs{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10mm!important;
  margin-top:auto!important;
}
.pdf-preview-modal-shell .delivery-signs>div{
  min-height:28mm!important;
  border:1px dashed #94a3b8!important;
  border-radius:10px!important;
  padding:6px!important;
  background:#fff!important;
}
.pdf-preview-modal-shell .delivery-signs strong{
  display:block!important;
  font-size:9px!important;
  color:#475569!important;
  margin-bottom:20mm!important;
}
.delivery-dashboard .delivery-focus-card{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  min-height:160px!important;
  border-radius:24px!important;
  overflow:hidden!important;
}
.delivery-dashboard .delivery-focus-card i{
  font-size:3rem!important;
  color:#2563eb!important;
  opacity:.22!important;
}
.delivery-lines{
  display:grid!important;
  gap:8px!important;
}
.delivery-line-row{
  display:grid!important;
  grid-template-columns:1fr 2fr 90px 90px!important;
  gap:8px!important;
}
.delivery-line-row input{
  min-height:40px!important;
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:12px!important;
  padding:0 10px!important;
}
@media(max-width:760px){
  .delivery-line-row{grid-template-columns:1fr!important}
}

/* v111 - facture like devis: clean light PDF, no dark blocks */
.pdf-preview-modal-shell .doc-preview.facture-template.invoice-template,
.pdf-preview-modal-shell .doc-preview.facture-template.devis-template,
.pdf-preview-modal-shell .doc-preview.facture-template.pro-invoice-template{
  background:#ffffff!important;
  color:#263238!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-watermark,
.pdf-preview-modal-shell .doc-preview.facture-template .facture-side-bar{
  display:none!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-header,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-invoice-header{
  border-bottom:1px solid #d9dee7!important;
  background:#fff!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .pdf-logo-img{
  width:36mm!important;
  height:24mm!important;
  max-width:36mm!important;
  max-height:24mm!important;
  object-fit:contain!important;
  background:#fff!important;
  border:0!important;
  box-shadow:none!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-title-block h1,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-title-block h1,
.pdf-preview-modal-shell .doc-preview.facture-template .delivery-title-block h1{
  background:#fff!important;
  color:#1f2937!important;
  border:1px solid #cbd5e1!important;
  border-radius:2px!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-title-block strong,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-title-block strong{
  border-color:#cbd5e1!important;
  background:#f8fafc!important;
  color:#1f2937!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-title-block em,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-title-block em{
  background:#eef2ff!important;
  color:#1e3a8a!important;
  border:1px solid #c7d2fe!important;
  padding:2px 7px!important;
  border-radius:999px!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-meta-row span,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-meta-row span,
.pdf-preview-modal-shell .doc-preview.facture-template .facture-parties>div,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-parties>div{
  background:#f8fafc!important;
  border:1px solid #dbe4ef!important;
  color:#1f2937!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-table th,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-invoice-table th{
  background:#f3f6fb!important;
  color:#1f2937!important;
  border:1px solid #d8e0ec!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-table td,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-invoice-table td{
  background:#fff!important;
  color:#1f2937!important;
  border:1px solid #e5eaf2!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-table tr:nth-child(even) td,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-invoice-table tr:nth-child(even) td{
  background:#fbfdff!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .facture-totals .grand,
.pdf-preview-modal-shell .doc-preview.facture-template .pro-total-box .grand{
  background:#f1f5f9!important;
  color:#0f172a!important;
  border-top:2px solid #cbd5e1!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template .pro-doc-footer{
  background:#fff!important;
  color:#64748b!important;
  border-top:1px solid #e2e8f0!important;
}

/* v111 - Bons de commande cleaner */
.orders-pro-page,
.delivery-pro-page{
  display:grid!important;
  gap:18px!important;
}
.order-command-strip,
.delivery-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.order-command-card,
.delivery-command-card{
  min-height:132px!important;
  border-radius:24px!important;
  padding:18px!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.18)!important;
  box-shadow:0 18px 45px rgba(15,23,42,.06)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
}
.order-command-card.main,
.delivery-command-card.main{
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
  color:#fff!important;
}
.order-command-card.success,
.delivery-command-card.success{
  background:linear-gradient(135deg,rgba(16,185,129,.12),rgba(255,255,255,.95))!important;
}
.order-command-card.warning,
.delivery-command-card.warning{
  background:linear-gradient(135deg,rgba(245,158,11,.13),rgba(255,255,255,.95))!important;
}
.order-command-card.danger{
  background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(255,255,255,.95))!important;
}
.order-command-card span,
.delivery-command-card span{
  color:inherit!important;
  opacity:.8!important;
  font-size:.78rem!important;
  font-weight:850!important;
}
.order-command-card strong,
.delivery-command-card strong{
  color:inherit!important;
  font-size:1.55rem!important;
  line-height:1.05!important;
}
.order-command-card small,
.delivery-command-card small{
  color:inherit!important;
  opacity:.72!important;
  line-height:1.35!important;
}
.orders-dashboard-grid,
.delivery-hero-grid{
  display:grid!important;
  grid-template-columns:1.12fr .88fr!important;
  gap:18px!important;
  align-items:stretch!important;
}
.order-pipeline-pro,
.order-history-pro,
.delivery-route-card,
.delivery-sign-card{
  border-radius:26px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  box-shadow:0 20px 50px rgba(15,23,42,.07)!important;
}
.order-card-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:14px!important;
}
.order-card-head span,
.delivery-route-card span,
.delivery-sign-card span{
  display:block!important;
  color:#2563eb!important;
  font-weight:900!important;
  font-size:.78rem!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}
.order-card-head h3,
.delivery-route-card h3,
.delivery-sign-card h3{
  margin:3px 0 0!important;
  color:#0f172a!important;
}
.order-card-head b{
  background:#eff6ff!important;
  color:#1d4ed8!important;
  border-radius:999px!important;
  padding:8px 11px!important;
}
.order-progress-large{
  height:13px!important;
  border-radius:999px!important;
  background:#e2e8f0!important;
  overflow:hidden!important;
  margin:12px 0 16px!important;
}
.order-progress-large i{
  display:block!important;
  height:100%!important;
  background:linear-gradient(90deg,#2563eb,#06b6d4)!important;
  border-radius:inherit!important;
}
.order-flow-clean{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  margin-bottom:14px!important;
}
.order-flow-clean span{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  border:1px solid rgba(148,163,184,.20)!important;
  background:#f8fafc!important;
  border-radius:999px!important;
  padding:8px 10px!important;
  font-size:.8rem!important;
  font-weight:850!important;
}
.order-flow-clean span.done{
  background:#ecfdf5!important;
  color:#047857!important;
}
.order-flow-clean span.active{
  background:#eff6ff!important;
  color:#1d4ed8!important;
}
.order-mini-kpis{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:10px!important;
}
.order-mini-kpis p{
  margin:0!important;
  background:#f8fafc!important;
  border-radius:16px!important;
  padding:10px!important;
}
.order-mini-kpis strong{
  display:block!important;
  font-size:1.05rem!important;
  color:#0f172a!important;
}
.order-mini-kpis small{
  color:#64748b!important;
}
.order-timeline-clean{
  display:grid!important;
  gap:10px!important;
}
.order-timeline-clean>div{
  display:grid!important;
  grid-template-columns:34px 1fr auto!important;
  gap:10px!important;
  align-items:center!important;
  padding:10px!important;
  border:1px solid rgba(148,163,184,.14)!important;
  border-radius:18px!important;
  background:#fff!important;
}
.order-timeline-clean i{
  width:34px!important;
  height:34px!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  border-radius:12px!important;
}
.order-table-card,
.delivery-table-card{
  border-radius:26px!important;
  overflow:hidden!important;
}
.order-actions-clean{
  display:flex!important;
  gap:6px!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}
.status-pill{
  border:1px solid rgba(148,163,184,.22)!important;
  background:#fff!important;
  color:#334155!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  font-size:.72rem!important;
  font-weight:850!important;
  cursor:pointer!important;
}
.status-pill.active{
  background:#0f172a!important;
  color:#fff!important;
  border-color:#0f172a!important;
}
.delivery-route-card,
.delivery-sign-card{
  min-height:180px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px!important;
  overflow:hidden!important;
}
.delivery-route-card i,
.delivery-sign-card i{
  font-size:3.4rem!important;
  color:#2563eb!important;
  opacity:.16!important;
}
.delivery-actions{
  justify-content:flex-start!important;
}
@media(max-width:1050px){
  .order-command-strip,
  .delivery-command-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .orders-dashboard-grid,
  .delivery-hero-grid{grid-template-columns:1fr!important}
}
@media(max-width:680px){
  .order-command-strip,
  .delivery-command-strip{grid-template-columns:1fr!important}
  .order-actions-clean{flex-wrap:wrap!important}
  .order-mini-kpis{grid-template-columns:1fr!important}
}

/* v112 - HARD command cards fix on Stock + Bons livraison + Bons commande */
.stock-command-strip,
.order-command-strip,
.delivery-command-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
.stock-command-strip > article,
.order-command-strip > article,
.delivery-command-strip > article,
.stock-command-strip > .stock-command-card,
.order-command-strip > .order-command-card,
.delivery-command-strip > .delivery-command-card{
  grid-column:auto!important;
  grid-row:auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  flex:initial!important;
  flex-basis:auto!important;
  transform:none!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  height:138px!important;
  min-height:138px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  align-self:stretch!important;
  padding:18px!important;
  border-radius:24px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.stock-command-strip > article.main,
.order-command-strip > article.main,
.delivery-command-strip > article.main{
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
  color:#fff!important;
}
.stock-command-strip > article span,
.stock-command-strip > article strong,
.stock-command-strip > article small,
.order-command-strip > article span,
.order-command-strip > article strong,
.order-command-strip > article small,
.delivery-command-strip > article span,
.delivery-command-strip > article strong,
.delivery-command-strip > article small{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  color:inherit!important;
}
.stock-command-strip > article span,
.order-command-strip > article span,
.delivery-command-strip > article span{
  font-size:.76rem!important;
  line-height:1.2!important;
  font-weight:900!important;
  letter-spacing:.04em!important;
}
.stock-command-strip > article strong,
.order-command-strip > article strong,
.delivery-command-strip > article strong{
  font-size:1.32rem!important;
  line-height:1.08!important;
}
.stock-command-strip > article small,
.order-command-strip > article small,
.delivery-command-strip > article small{
  font-size:.78rem!important;
  line-height:1.35!important;
}

/* v112 - Facture/Devis PDF: remove dark gradients/blocks and keep clean light preview */
.pdf-preview-modal-shell .doc-preview.facture-template,
.pdf-preview-modal-shell .doc-preview.pro-invoice-template,
.pdf-preview-modal-shell .doc-preview.invoice-template,
.pdf-preview-modal-shell .doc-preview.pdf-style-premium{
  background:#fff!important;
  color:#1f2937!important;
  background-image:none!important;
}
.pdf-preview-modal-shell .doc-preview.facture-template *,
.pdf-preview-modal-shell .doc-preview.pro-invoice-template *,
.pdf-preview-modal-shell .doc-preview.invoice-template *{
  text-shadow:none!important;
}
.pdf-preview-modal-shell .facture-header,
.pdf-preview-modal-shell .pro-invoice-header,
.pdf-preview-modal-shell .facture-title-block,
.pdf-preview-modal-shell .pro-title-block,
.pdf-preview-modal-shell .facture-brand,
.pdf-preview-modal-shell .pro-total-box,
.pdf-preview-modal-shell .facture-totals,
.pdf-preview-modal-shell .pro-doc-footer{
  background:#fff!important;
  background-image:none!important;
  color:#1f2937!important;
}
.pdf-preview-modal-shell .facture-side-bar,
.pdf-preview-modal-shell .facture-watermark{
  display:none!important;
}
.pdf-preview-modal-shell .facture-title-block h1,
.pdf-preview-modal-shell .pro-title-block h1,
.pdf-preview-modal-shell .delivery-title-block h1{
  background:#fff!important;
  background-image:none!important;
  color:#111827!important;
  border:1px solid #cbd5e1!important;
  box-shadow:none!important;
}
.pdf-preview-modal-shell .facture-title-block em,
.pdf-preview-modal-shell .pro-title-block em,
.pdf-preview-modal-shell .delivery-title-block em{
  background:#eef2ff!important;
  color:#1e3a8a!important;
  border:1px solid #c7d2fe!important;
  border-radius:999px!important;
  padding:2px 8px!important;
}
.pdf-preview-modal-shell .facture-meta-row span,
.pdf-preview-modal-shell .pro-meta-row span,
.pdf-preview-modal-shell .facture-parties>div,
.pdf-preview-modal-shell .pro-parties>div{
  background:#f8fafc!important;
  background-image:none!important;
  border:1px solid #dbe4ef!important;
  color:#1f2937!important;
}
.pdf-preview-modal-shell .facture-table th,
.pdf-preview-modal-shell .pro-invoice-table th,
.pdf-preview-modal-shell .delivery-table th{
  background:#f3f6fb!important;
  background-image:none!important;
  color:#1f2937!important;
  border:1px solid #d8e0ec!important;
}
.pdf-preview-modal-shell .facture-table td,
.pdf-preview-modal-shell .pro-invoice-table td,
.pdf-preview-modal-shell .delivery-table td{
  background:#fff!important;
  color:#1f2937!important;
  border:1px solid #e5eaf2!important;
}
.pdf-preview-modal-shell .facture-totals .grand,
.pdf-preview-modal-shell .pro-total-box .grand{
  background:#f1f5f9!important;
  color:#0f172a!important;
  border-top:2px solid #cbd5e1!important;
}

/* v112 - clean actions for Factures/Devis/BC/BL */
.doc-actions-clean,
.order-actions-clean,
.delivery-actions{
  display:flex!important;
  gap:6px!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
}
.doc-actions-clean .icon-btn,
.order-actions-clean .icon-btn,
.delivery-actions .icon-btn{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  border-radius:12px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(148,163,184,.22)!important;
  background:#fff!important;
  color:#334155!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
}
.doc-actions-clean .icon-btn.success,
.order-actions-clean .icon-btn.success{
  color:#047857!important;
  background:#ecfdf5!important;
  border-color:rgba(16,185,129,.22)!important;
}
.doc-actions-clean .icon-btn.warning{
  color:#b45309!important;
  background:#fffbeb!important;
  border-color:rgba(245,158,11,.28)!important;
}
.doc-actions-clean .icon-btn.danger,
.order-actions-clean .icon-btn.danger,
.delivery-actions .icon-btn.danger{
  color:#b91c1c!important;
  background:#fef2f2!important;
  border-color:rgba(239,68,68,.24)!important;
}
.status-pill{
  min-height:32px!important;
  padding:0 10px!important;
}

@media(max-width:1100px){
  .stock-command-strip,
  .order-command-strip,
  .delivery-command-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:680px){
  .stock-command-strip,
  .order-command-strip,
  .delivery-command-strip{grid-template-columns:1fr!important}
  .stock-command-strip > article,
  .order-command-strip > article,
  .delivery-command-strip > article{height:auto!important;min-height:124px!important}
  .doc-actions-clean,
  .order-actions-clean,
  .delivery-actions{flex-wrap:wrap!important}
}

/* v120 PDF preview: iframe = same as print/download */
.pdf-preview-frame-shell{
  width:100%;
  height:min(82vh, 940px);
  overflow:auto;
  background:#e5e7eb;
  border-radius:20px;
  padding:18px;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.pdf-preview-frame{
  width:calc(210mm + 36px);
  height:calc(297mm + 36px);
  min-height:760px;
  border:0;
  background:#eef2f7;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(15,23,42,.16);
}
.pdf-share-actions{
  justify-content:flex-end;
  flex-wrap:wrap;
}
@media(max-width:900px){
  .pdf-preview-frame-shell{padding:8px;height:76vh;justify-content:flex-start}
  .pdf-preview-frame{width:860px;height:1180px}
}

/* v121 PDF preview srcdoc render fix */
.pdf-preview-frame-shell{
  background:#e5e7eb!important;
}
.pdf-preview-frame{
  background:#eef2f7!important;
}

/* v123 RH employee profile redesign */
.employee-table-card{display:none!important}

.employee-profile-v123{
  display:grid!important;
  gap:18px!important;
}
.emp-hero-v123{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr) auto!important;
  gap:18px!important;
  align-items:center!important;
  padding:22px!important;
  border-radius:28px!important;
  background:linear-gradient(135deg,#0f172a,#1e3a8a)!important;
  color:#fff!important;
  box-shadow:0 24px 60px rgba(15,23,42,.22)!important;
  overflow:hidden!important;
}
.emp-avatar-v123{
  width:82px!important;
  height:82px!important;
  border-radius:26px!important;
  background:rgba(255,255,255,.12)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  font-size:2rem!important;
  font-weight:950!important;
}
.emp-avatar-v123 img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
.emp-kicker-v123{
  display:inline-flex!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.12)!important;
  color:#bfdbfe!important;
  font-size:.74rem!important;
  font-weight:900!important;
  margin-bottom:7px!important;
}
.emp-hero-main-v123 h2{
  margin:0!important;
  color:#fff!important;
  font-size:1.85rem!important;
  line-height:1.05!important;
}
.emp-hero-main-v123 p{
  margin:6px 0 10px!important;
  color:#dbeafe!important;
}
.emp-badges-v123{
  display:flex!important;
  gap:7px!important;
  flex-wrap:wrap!important;
}
.emp-hero-actions-v123,
.emp-action-strip-v123{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.emp-hero-actions-v123 .btn{
  white-space:nowrap!important;
}
.emp-kpi-grid-v123{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
.emp-kpi-v123{
  min-height:122px!important;
  border-radius:24px!important;
  padding:16px!important;
  background:#fff!important;
  border:1px solid rgba(148,163,184,.18)!important;
  box-shadow:0 16px 42px rgba(15,23,42,.06)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
}
.emp-kpi-v123.success{background:linear-gradient(135deg,rgba(16,185,129,.12),#fff)!important}
.emp-kpi-v123.warning{background:linear-gradient(135deg,rgba(245,158,11,.13),#fff)!important}
.emp-kpi-v123 span{
  color:#64748b!important;
  font-size:.78rem!important;
  font-weight:900!important;
}
.emp-kpi-v123 strong{
  color:#0f172a!important;
  font-size:1.22rem!important;
  line-height:1.1!important;
}
.emp-kpi-v123 small{color:#64748b!important}
.emp-profile-grid-v123{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:16px!important;
}
.emp-panel-v123{
  border-radius:26px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  box-shadow:0 18px 48px rgba(15,23,42,.06)!important;
  overflow:hidden!important;
}
.emp-panel-head-v123{
  display:flex!important;
  gap:12px!important;
  align-items:flex-start!important;
  margin-bottom:14px!important;
}
.emp-panel-head-v123>i{
  width:42px!important;
  height:42px!important;
  border-radius:15px!important;
  display:grid!important;
  place-items:center!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  flex:0 0 42px!important;
}
.emp-panel-head-v123 h3{
  margin:0!important;
  color:#0f172a!important;
}
.emp-panel-head-v123 p{margin:3px 0 0!important}
.emp-contact-list-v123{
  display:grid!important;
  gap:10px!important;
}
.emp-contact-list-v123>div{
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  padding:10px!important;
  border:1px solid rgba(148,163,184,.14)!important;
  border-radius:16px!important;
  background:#f8fafc!important;
}
.emp-contact-list-v123 i{
  width:36px!important;
  height:36px!important;
  border-radius:12px!important;
  display:grid!important;
  place-items:center!important;
  background:#fff!important;
  color:#2563eb!important;
}
.emp-contact-list-v123 b,
.emp-detail-grid-v123 span{
  display:block!important;
  color:#64748b!important;
  font-size:.74rem!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.03em!important;
}
.emp-contact-list-v123 small{
  display:block!important;
  color:#0f172a!important;
  overflow-wrap:anywhere!important;
}
.emp-detail-grid-v123{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
.emp-detail-grid-v123>div{
  padding:11px!important;
  border-radius:16px!important;
  background:#f8fafc!important;
  border:1px solid rgba(148,163,184,.14)!important;
  min-height:70px!important;
}
.emp-detail-grid-v123 strong{
  display:block!important;
  color:#0f172a!important;
  margin-top:5px!important;
  overflow-wrap:anywhere!important;
}
.emp-action-strip-v123{
  justify-content:flex-start!important;
  padding:14px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  border-radius:22px!important;
  background:#fff!important;
}
.emp-timeline-v123{
  max-height:260px!important;
  overflow:auto!important;
}

/* v123 Absences page */
.absence-page-v123{
  display:grid!important;
  gap:18px!important;
}
.absence-kpi-strip{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
.absence-layout-v123{
  display:grid!important;
  grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr)!important;
  gap:18px!important;
  align-items:stretch!important;
}
.absence-board-v123,
.absence-side-v123,
.absence-table-card-v123{
  border-radius:26px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  box-shadow:0 18px 48px rgba(15,23,42,.06)!important;
  overflow:hidden!important;
}
.absence-person-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
.absence-person-card{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto 36px!important;
  gap:10px!important;
  align-items:center!important;
  padding:11px!important;
  border:1px solid rgba(148,163,184,.16)!important;
  border-radius:18px!important;
  background:#fff!important;
}
.absence-person-card.has-absence{
  background:#fffbeb!important;
  border-color:rgba(245,158,11,.28)!important;
}
.absence-person-card strong{
  display:block!important;
  color:#0f172a!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.absence-person-card span{
  display:block!important;
  color:#64748b!important;
  font-size:.78rem!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.absence-summary-list{
  display:grid!important;
  gap:10px!important;
  margin:12px 0!important;
}
.absence-summary-list>div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:13px!important;
  border-radius:16px!important;
  background:#f8fafc!important;
  border:1px solid rgba(148,163,184,.14)!important;
}
.absence-summary-list strong{
  color:#2563eb!important;
  font-size:1.15rem!important;
}
.absence-table-card-v123 .table-wrap{
  overflow:auto!important;
}
.absence-table-card-v123 table td,
.absence-table-card-v123 table th{
  vertical-align:middle!important;
  white-space:normal!important;
}

/* v123 payroll simulator fields + PDF */
.salary-settings-card .form-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.payslip-a4{
  width:210mm!important;
  min-height:297mm!important;
  height:297mm!important;
  background:#fff!important;
  overflow:hidden!important;
}
@media(max-width:1050px){
  .emp-hero-v123{grid-template-columns:72px 1fr!important}
  .emp-hero-actions-v123{grid-column:1 / -1!important;justify-content:flex-start!important}
  .emp-kpi-grid-v123,
  .absence-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .emp-profile-grid-v123,
  .absence-layout-v123{grid-template-columns:1fr!important}
  .absence-person-grid{grid-template-columns:1fr!important}
}
@media(max-width:680px){
  .emp-hero-v123{grid-template-columns:1fr!important;text-align:left!important}
  .emp-kpi-grid-v123,
  .absence-kpi-strip{grid-template-columns:1fr!important}
  .emp-detail-grid-v123,
  .salary-settings-card .form-grid{grid-template-columns:1fr!important}
  .absence-person-card{grid-template-columns:44px minmax(0,1fr) 36px!important}
  .absence-person-card .badge{grid-column:2 / 3!important;width:max-content!important}
}
