
:root {
  --lf-primary: #92272D;
  --lf-primary-dark: #6b1f1f;
  --lf-primary-light: #b43d44;
  --lf-gold: #d4a574;
  --lf-gold-dark: #b8864f;
  --lf-gold-light: #f3e5d3;
  --lf-cream: #faf8f5;
  --lf-cream-dark: #f0ebe4;
  --lf-dark: #2c1e1e;
  --lf-text: #423131;
  --lf-text-muted: #826b6b;
  --lf-border: #e6ded6;
  --lf-border-gold: rgba(212, 165, 116, 0.4);
  --lf-shadow-sm: 0 2px 8px rgba(107, 31, 31, 0.05);
  --lf-shadow-md: 0 6px 20px rgba(107, 31, 31, 0.08);
  --lf-shadow-lg: 0 12px 35px rgba(107, 31, 31, 0.12);
  --lf-radius: 12px;
  --lf-radius-sm: 8px;
  --lf-font-serif: 'Cormorant Garamond', Georgia, serif;
  --lf-font-sans: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--lf-font-sans);
  background-color: var(--lf-cream);
  color: var(--lf-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.lf-topbar {
  background: white;
  border-bottom: 1px solid var(--lf-border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--lf-shadow-sm);
}

.lf-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--lf-primary);
}

.lf-brand-logo {
  height: 42px;
  width: auto;
}

.lf-brand-info h1 {
  font-family: var(--lf-font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--lf-primary-dark);
  letter-spacing: 1px;
  line-height: 1.1;
}

.lf-brand-info span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--lf-gold-dark);
  font-weight: 500;
}

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

.lf-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  font-size: 12px;
  font-weight: 500;
}

.lf-badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #2e7d32;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px #2e7d32; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-boutique-link {
  font-size: 13px;
  color: var(--lf-primary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--lf-border-gold);
  border-radius: 30px;
  transition: all 0.25s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-boutique-link:hover {
  background: var(--lf-primary);
  color: white;
  border-color: var(--lf-primary);
}

.lf-main-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 67px);
}

.lf-sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid var(--lf-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.lf-sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--lf-text-muted);
  padding: 8px 12px;
  font-weight: 600;
}

.agent-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--lf-radius-sm);
  color: var(--lf-text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.agent-nav-item:hover {
  background: var(--lf-cream);
  border-color: var(--lf-border);
}

.agent-nav-item.active {
  background: #fcf6f0;
  border-color: var(--lf-gold);
  color: var(--lf-primary-dark);
  box-shadow: var(--lf-shadow-sm);
}

.agent-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--lf-primary);
}

.agent-nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--lf-cream);
  flex-shrink: 0;
  border: 1px solid var(--lf-border);
}

.agent-nav-item.active .agent-nav-icon {
  background: var(--lf-primary);
  color: white;
  border-color: var(--lf-primary);
}

.agent-nav-info {
  display: flex;
  flex-direction: column;
}

.agent-nav-name {
  font-weight: 600;
  font-size: 14px;
}

.agent-nav-role {
  font-size: 11px;
  color: var(--lf-text-muted);
}

.lf-content-area {
  flex: 1;
  padding: 32px 40px;
  max-width: 1350px;
  margin: 0 auto;
  width: 100%;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
  display: block;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--lf-border);
}

.section-title-wrap h2 {
  font-family: var(--lf-font-serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--lf-primary-dark);
  margin-bottom: 4px;
}

.section-title-wrap p {
  color: var(--lf-text-muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 22px;
  border-radius: var(--lf-radius);
  border: 1px solid var(--lf-border);
  box-shadow: var(--lf-shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lf-primary), var(--lf-gold));
}

.stat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--lf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-icon {
  font-size: 20px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--lf-dark);
  font-family: var(--lf-font-sans);
}

.stat-card-sub {
  font-size: 12px;
  color: #2e7d32;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.agents-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.agent-summary-card {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  padding: 24px;
  box-shadow: var(--lf-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.agent-summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lf-shadow-md);
  border-color: var(--lf-gold);
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--lf-cream);
  border: 1px solid var(--lf-border-gold);
}

.agent-title-box h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--lf-primary-dark);
}

.agent-title-box p {
  font-size: 12px;
  color: var(--lf-text-muted);
}

.agent-desc {
  font-size: 13px;
  color: var(--lf-text);
  margin-bottom: 16px;
  flex: 1;
}

.agent-tasks-list {
  list-style: none;
  margin-bottom: 20px;
  font-size: 12px;
  background: var(--lf-cream);
  padding: 12px;
  border-radius: var(--lf-radius-sm);
}

.agent-tasks-list li {
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lf-text);
}

.agent-tasks-list li::before {
  content: "✓";
  color: var(--lf-gold-dark);
  font-weight: bold;
}

.btn-launch-agent {
  background: var(--lf-primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-launch-agent:hover {
  background: var(--lf-primary-dark);
}

.ads-subnav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--lf-border);
  padding-bottom: 12px;
}

.ads-tab-btn {
  background: transparent;
  border: 1px solid var(--lf-border);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--lf-text);
  transition: all 0.2s;
}

.ads-tab-btn.active {
  background: var(--lf-primary);
  border-color: var(--lf-primary);
  color: white;
}

.ads-panel {
  display: none;
}

.ads-panel.active {
  display: block;
}

.ads-builder-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}

.builder-controls {
  background: white;
  padding: 24px;
  border-radius: var(--lf-radius);
  border: 1px solid var(--lf-border);
  box-shadow: var(--lf-shadow-sm);
}

.builder-preview {
  background: white;
  padding: 24px;
  border-radius: var(--lf-radius);
  border: 1px solid var(--lf-border);
  box-shadow: var(--lf-shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--lf-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  font-family: inherit;
  font-size: 13px;
  background: var(--lf-cream);
  color: var(--lf-text);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--lf-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(146, 39, 45, 0.1);
}

.google-ad-preview-box {
  background: #f8f9fa;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.google-ad-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #202124;
  margin-bottom: 4px;
}

.google-ad-url {
  font-size: 12px;
  color: #202124;
  margin-bottom: 4px;
  display: block;
}

.google-ad-title {
  color: #1a0dab;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 6px;
  cursor: pointer;
}

.google-ad-title:hover {
  text-decoration: underline;
}

.google-ad-desc {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.4;
}

.google-ad-extensions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8eaed;
}

.google-ad-ext {
  font-size: 12px;
  color: #1a0dab;
  cursor: pointer;
}

.keywords-box {
  background: #fdfbf9;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  padding: 12px;
  margin-top: 14px;
  font-size: 12px;
}

.keywords-tag {
  display: inline-block;
  background: white;
  border: 1px solid var(--lf-border-gold);
  border-radius: 4px;
  padding: 3px 8px;
  margin: 3px;
  color: var(--lf-primary-dark);
}

.insta-preview-card {
  border: 1px solid #dbdbdb;
  border-radius: 10px;
  background: white;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--lf-shadow-sm);
  width: 100%;
}

.insta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.insta-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insta-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--lf-gold);
  object-fit: cover;
}

.insta-name {
  font-size: 13px;
  font-weight: 600;
  color: #262626;
}

.insta-location {
  font-size: 11px;
  color: #8e8e8e;
}

.insta-image-wrap {
  width: 100%;
  height: 320px;
  background: #f0f0f0;
  overflow: hidden;
  position: relative;
}

.insta-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insta-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.insta-caption {
  white-space: pre-line;
  margin-bottom: 10px;
}

.insta-hashtags {
  color: #00376b;
  font-size: 12px;
  word-break: break-word;
}

.copy-btn {
  background: var(--lf-cream);
  border: 1px solid var(--lf-border-gold);
  color: var(--lf-primary);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 12px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--lf-primary);
  color: white;
}

.invoice-workspace {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  align-items: start;
}

.invoice-editor-sidebar {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  padding: 24px;
  box-shadow: var(--lf-shadow-sm);
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.doc-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.doc-type-btn {
  padding: 10px;
  border: 1px solid var(--lf-border);
  background: var(--lf-cream);
  border-radius: var(--lf-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--lf-text);
}

.doc-type-btn.active {
  background: var(--lf-primary);
  color: white;
  border-color: var(--lf-primary);
}

.items-table-editor {
  width: 100%;
  margin-bottom: 16px;
  font-size: 12px;
}

.items-table-editor th {
  text-align: left;
  padding: 6px 4px;
  color: var(--lf-text-muted);
  border-bottom: 1px solid var(--lf-border);
}

.items-table-editor td {
  padding: 6px 4px;
}

.items-table-editor input,
.items-table-editor select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--lf-border);
  border-radius: 4px;
  background: white;
}

.btn-add-item {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--lf-gold);
  background: rgba(212, 165, 116, 0.1);
  color: var(--lf-gold-dark);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background 0.2s;
}

.btn-add-item:hover {
  background: rgba(212, 165, 116, 0.2);
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

.a4-preview-wrapper {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  padding: 24px;
  box-shadow: var(--lf-shadow-md);
  display: flex;
  flex-direction: column;
}

.a4-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lf-border);
}

.btn-action-primary {
  background: var(--lf-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-action-primary:hover {
  background: var(--lf-primary-dark);
}

.btn-action-secondary {
  background: white;
  color: var(--lf-text);
  border: 1px solid var(--lf-border);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-secondary:hover {
  background: var(--lf-cream);
  border-color: var(--lf-gold);
}

.document-sheet {
  background: white;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 45px 50px;
  border: 1px solid #e0d8cf;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  font-family: var(--lf-font-sans);
  color: #333;
  line-height: 1.5;
  position: relative;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--lf-gold);
}

.doc-brand-title {
  font-family: var(--lf-font-serif);
  font-size: 28px;
  color: var(--lf-primary-dark);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.doc-brand-sub {
  font-size: 12px;
  color: var(--lf-gold-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  font-weight: 500;
}

.doc-company-details {
  font-size: 11px;
  color: #666;
  line-height: 1.6;
}

.doc-meta-box {
  text-align: right;
}

.doc-type-badge {
  display: inline-block;
  font-family: var(--lf-font-serif);
  font-size: 24px;
  color: var(--lf-primary-dark);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.doc-number {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.doc-date {
  font-size: 12px;
  color: #666;
}

.doc-client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 35px;
}

.doc-client-card {
  background: #fdfbf9;
  border: 1px solid #f0e6dc;
  border-radius: 6px;
  padding: 16px 20px;
}

.doc-client-card h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--lf-gold-dark);
  margin-bottom: 8px;
  font-weight: 600;
}

.doc-client-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--lf-dark);
  margin-bottom: 4px;
}

.doc-client-address {
  font-size: 12px;
  color: #555;
  white-space: pre-line;
  line-height: 1.4;
}

.doc-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.doc-items-table th {
  background: var(--lf-primary-dark);
  color: white;
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.doc-items-table th:first-child { border-radius: 4px 0 0 0; }
.doc-items-table th:last-child { border-radius: 0 4px 0 0; text-align: right; }

.doc-items-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  color: #333;
}

.doc-items-table tr:last-child td {
  border-bottom: 2px solid var(--lf-border);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.doc-totals-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 35px;
}

.doc-payment-info {
  width: 45%;
  font-size: 11px;
  color: #666;
  background: #fdfbf9;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid #f0e6dc;
}

.doc-payment-info h5 {
  color: var(--lf-primary-dark);
  font-size: 12px;
  margin-bottom: 6px;
}

.doc-totals-box {
  width: 45%;
}

.total-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  color: #555;
  border-bottom: 1px solid #f2f2f2;
}

.total-line.grand-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--lf-primary-dark);
  border-top: 2px solid var(--lf-gold);
  border-bottom: 2px solid var(--lf-gold);
  padding: 10px 0;
  margin-top: 6px;
}

.doc-footer-legal {
  text-align: center;
  font-size: 10px;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 15px;
  line-height: 1.5;
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kanban-col {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  padding: 18px;
  box-shadow: var(--lf-shadow-sm);
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--lf-border);
}

.kanban-col-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-count {
  background: var(--lf-cream);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--lf-border);
}

.delivery-card {
  background: #fdfbf9;
  border: 1px solid #f0e6dc;
  border-radius: var(--lf-radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.delivery-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--lf-primary-dark);
}

.delivery-client {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.delivery-detail {
  font-size: 11px;
  color: var(--lf-text-muted);
  margin-bottom: 8px;
}

.delivery-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-express { background: #ffebee; color: #c62828; }
.tag-hotel { background: #fff8e1; color: #f57f17; }
.tag-standard { background: #e8f5e9; color: #2e7d32; }

@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }

  .lf-topbar,
  .lf-sidebar,
  .a4-actions-bar,
  .invoice-editor-sidebar,
  .section-header,
  .ads-subnav,
  .btn-add-item,
  .btn-boutique-link {
    display: none !important;
  }

  .lf-main-layout {
    display: block !important;
    min-height: auto !important;
  }

  .lf-content-area {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .invoice-workspace {
    display: block !important;
  }

  .a4-preview-wrapper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .document-sheet {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 15mm 12mm !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .doc-items-table th {
    background: #444 !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (max-width: 992px) {
  .lf-main-layout {
    flex-direction: column;
  }

  .lf-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--lf-border);
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }

  .agent-nav-item {
    width: auto;
    white-space: nowrap;
  }

  .invoice-workspace,
  .ads-builder-grid {
    grid-template-columns: 1fr;
  }

  .invoice-editor-sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }

  .lf-content-area {
    padding: 20px 16px;
  }
}

.business-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fdfbf9;
  border: 1px solid var(--lf-border-gold);
  padding: 4px 12px;
  border-radius: 20px;
}

.business-selector-select {
  border: none;
  background: transparent;
  font-family: var(--lf-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--lf-primary-dark);
  cursor: pointer;
  outline: none;
}

.config-container {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  box-shadow: var(--lf-shadow-sm);
  overflow: hidden;
}

.config-tabs-nav {
  display: flex;
  background: #fcfaf8;
  border-bottom: 1px solid var(--lf-border);
  overflow-x: auto;
}

.config-tab-btn {
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lf-text);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-tab-btn:hover {
  background: rgba(212, 165, 116, 0.1);
  color: var(--lf-primary-dark);
}

.config-tab-btn.active {
  background: white;
  border-bottom-color: var(--lf-primary);
  color: var(--lf-primary);
}

.config-tab-content {
  padding: 30px;
  display: none;
}

.config-tab-content.active {
  display: block;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.status-connected {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-disconnected {
  background: #ffebee;
  color: #c62828;
}

.status-pending {
  background: #fff8e1;
  color: #f57f17;
}

.log-console {
  background: #1e1e1e;
  color: #e0e0e0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 14px;
  line-height: 1.5;
  border: 1px solid #333;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.profile-card {
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  padding: 20px;
  background: #faf8f5;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  position: relative;
}

.profile-card.active {
  border-color: var(--lf-gold);
  background: #fffdfb;
  box-shadow: 0 4px 14px rgba(212, 165, 116, 0.2);
}

.profile-card.active::before {
  content: 'Actif';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--lf-primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.boutique-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.cat-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--lf-border-gold);
  background: white;
  color: var(--lf-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-pill:hover {
  background: var(--lf-cream);
  border-color: var(--lf-primary);
  color: var(--lf-primary);
}

.cat-pill.active {
  background: var(--lf-primary);
  color: white;
  border-color: var(--lf-primary);
  box-shadow: 0 2px 8px rgba(146, 39, 45, 0.25);
}

.cat-pill .pill-count {
  font-size: 11px;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
}

.cat-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
}

.boutique-search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.boutique-search-input {
  padding: 9px 14px;
  border-radius: 20px;
  border: 1px solid var(--lf-border);
  background: white;
  font-size: 13px;
  min-width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.boutique-search-input:focus {
  border-color: var(--lf-gold);
}

.boutique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.boutique-card {
  background: white;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius);
  overflow: hidden;
  box-shadow: var(--lf-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.boutique-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lf-shadow-md);
  border-color: var(--lf-gold);
}

.boutique-card-img-wrap {
  width: 100%;
  height: 220px;
  background: #fbf9f6;
  overflow: hidden;
  position: relative;
}

.boutique-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.boutique-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(44, 30, 30, 0.85);
  backdrop-filter: blur(4px);
  color: #faf5ed;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boutique-card-badge.is-pack {
  background: linear-gradient(45deg, #92272D, #d4a574);
  color: white;
  font-weight: 700;
}

.boutique-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.boutique-card-title {
  font-family: var(--lf-font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--lf-primary-dark);
  margin-bottom: 6px;
  line-height: 1.25;
}

.boutique-card-desc {
  font-size: 12px;
  color: var(--lf-text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.boutique-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f2ede6;
}

.boutique-card-pricing {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.boutique-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--lf-primary-dark);
}

.boutique-card-tva {
  font-size: 11px;
  color: #777;
}

.boutique-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.boutique-btn-add {
  background: var(--lf-primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s;
}

.boutique-btn-add:hover {
  background: var(--lf-primary-dark);
}

.boutique-btn-dispatch {
  background: white;
  color: var(--lf-text);
  border: 1px solid var(--lf-border-gold);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.boutique-btn-dispatch:hover {
  background: var(--lf-cream);
  border-color: var(--lf-primary);
}

.document-sheet {
  position: relative;
}

.doc-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-family: var(--lf-font-serif);
  font-size: 96px;
  letter-spacing: 12px;
  color: rgba(146, 39, 45, 0.08);
  transform: rotate(-24deg);
  z-index: 0;
}

.doc-state-banner {
  margin: -6px 0 18px;
  padding: 10px 14px;
  border-radius: var(--lf-radius-sm);
  font-size: 13px;
  border: 1px solid var(--lf-border);
  background: var(--lf-cream);
  color: var(--lf-text);
}

.doc-state-banner[data-state="emis"] {
  background: #e8f5e9;
  border-color: #c8e6c9;
  color: #1b5e20;
}

#btn-emit-doc:disabled {
  opacity: .7;
  cursor: default;
}

.invoice-editor-sidebar input:disabled,
.invoice-editor-sidebar textarea:disabled,
.invoice-editor-sidebar select:disabled {
  background: var(--lf-cream-dark);
  color: var(--lf-text-muted);
}

.docs-emis {
  margin-bottom: 18px;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  background: #fff;
}

.docs-emis summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lf-primary-dark);
}

.docs-emis-list {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--lf-border);
}

.docs-emis-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--lf-border);
  background: none;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--lf-text);
  cursor: pointer;
}

.docs-emis-item:hover {
  background: var(--lf-cream);
}

.docs-emis-num {
  font-weight: 600;
  color: var(--lf-primary-dark);
}

.docs-emis-client {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-emis-vide {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--lf-text-muted);
}

@media print {
  .doc-state-banner,
  .docs-emis {
    display: none !important;
  }
  .doc-watermark {
    color: rgba(0, 0, 0, 0.12) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.orders-sync-state {
  font-size: 12px;
  color: var(--lf-text-muted);
}

.orders-sync-state[data-etat="ok"] { color: #2e7d32; }
.orders-sync-state[data-etat="alerte"] { color: #c62828; }

.order-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.btn-livraison-date {
  font-size: 11px;
  padding: 6px 12px;
}

.btn-livraison-date:disabled {
  opacity: .5;
  cursor: default;
}

.livraison-precise {
  display: inline-block;
  font-weight: 600;
  color: var(--lf-primary-dark);
  background: var(--lf-gold-light);
  border-radius: 6px;
  padding: 2px 8px;
}

.tag-annulee { background: #f0f0f0; color: #777; }

.ml-fond {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(44, 30, 30, 0.7);
  backdrop-filter: blur(4px);
}

.ml-fond[hidden] { display: none; }

.ml-boite {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--lf-radius);
  border: 1px solid var(--lf-border-gold);
  box-shadow: var(--lf-shadow-lg);
  padding: 24px;
}

.ml-boite h3 {
  font-family: var(--lf-font-serif);
  font-size: 24px;
  color: var(--lf-primary-dark);
  margin: 0 0 2px;
}

.ml-commande {
  font-size: 13px;
  color: var(--lf-text-muted);
  margin: 0 0 16px;
}

.ml-cal {
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  padding: 10px;
}

.ml-cal-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ml-mois {
  font-family: var(--lf-font-serif);
  font-size: 19px;
  color: var(--lf-dark);
  text-transform: capitalize;
}

.ml-nav {
  width: 36px;
  height: 36px;
  border: 1px solid var(--lf-border);
  border-radius: 50%;
  background: #fff;
  color: var(--lf-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ml-nav:disabled { opacity: .35; cursor: default; }

.ml-semaine,
.ml-grille {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.ml-semaine span {
  text-align: center;
  font-size: 11px;
  color: var(--lf-text-muted);
  padding-bottom: 4px;
}

.ml-jour {
  aspect-ratio: 1 / 1;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--lf-text);
  cursor: pointer;
}

.ml-jour:hover:not(:disabled) { background: var(--lf-cream-dark); }
.ml-jour:disabled { color: #c9bfbf; cursor: default; }
.ml-jour.est-aujourdhui { border-color: var(--lf-gold); }

.ml-jour.est-choisi {
  background: var(--lf-primary);
  border-color: var(--lf-primary);
  color: #fff;
  font-weight: 600;
}

.ml-champs {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ml-champ span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--lf-text);
  margin-bottom: 6px;
}

.ml-champ select,
.ml-champ textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  padding: 9px 10px;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-sm);
  background: var(--lf-cream);
}

.ml-choix {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--lf-primary-dark);
  min-height: 1.3em;
}

.ml-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ml-espace { flex: 1; }

:root {
  --lf-primary: #A6272E;
  --lf-primary-dark: #7E2228;
  --lf-primary-light: #C1272D;
  --lf-grad: linear-gradient(90deg, #93272E 0%, #C1272D 100%);
  --lf-grad-d: linear-gradient(90deg, #7E2228 0%, #A8232A 100%);
  --lf-gold: #C98B86;
  --lf-gold-dark: #A6272E;
  --lf-gold-light: #FBF1EF;
  --lf-cream: #FBF9F5;
  --lf-cream-dark: #F3EEEA;
  --lf-dark: #2E2224;
  --lf-text: #2E2224;
  --lf-text-muted: #7F7273;
  --lf-border: #EDE6E0;
  --lf-border-gold: rgba(166, 39, 46, 0.18);
  --lf-shadow-sm: 0 1px 3px rgba(46, 34, 36, 0.06);
  --lf-shadow-md: 0 8px 24px rgba(46, 34, 36, 0.08);
  --lf-shadow-lg: 0 18px 44px rgba(46, 34, 36, 0.14);
  --lf-radius: 16px;
  --lf-radius-sm: 10px;
}

body { background: var(--lf-cream); color: var(--lf-text); font-size: 15px; line-height: 1.5; }

.lf-ico {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.lf-topbar {
  background: var(--lf-grad);
  border-bottom: 0;
  padding: 10px 24px;
  gap: 16px;
  color: #FCFAED;
  box-shadow: 0 2px 14px rgba(126, 34, 40, 0.25);
}
.lf-brand { gap: 12px; color: #FCFAED; }
.lf-brand-logo { height: 38px; width: auto; display: block; }
.lf-brand-info { border-left: 1px solid rgba(252, 250, 237, 0.35); padding-left: 12px; }
.lf-brand-info h1 {
  font-family: var(--lf-font-serif); font-size: 20px; font-weight: 500;
  letter-spacing: .04em; color: #FCFAED; margin: 0; line-height: 1.1;
}
.lf-brand-info span {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(252, 250, 237, 0.75);
}
.lf-topbar-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lf-topbar .btn-boutique-link {
  color: #FCFAED;
  background: rgba(252, 250, 237, 0.10);
  border: 1px solid rgba(252, 250, 237, 0.35);
  padding: 7px 14px; font-size: 13px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.lf-topbar .btn-boutique-link:hover { background: #FCFAED; color: var(--lf-primary); border-color: #FCFAED; }
.lf-topbar .btn-boutique-link .lf-ico { width: 16px; height: 16px; }
.business-selector-wrap {
  background: rgba(252, 250, 237, 0.12);
  border: 1px solid rgba(252, 250, 237, 0.35);
}
.business-selector-select { background: transparent; color: #FCFAED; border: 0; font-weight: 500; }
.business-selector-select option { color: var(--lf-text); }
.lf-badge-live {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(252, 250, 237, 0.35);
  background: rgba(252, 250, 237, 0.10);
  color: #FCFAED; font-size: 12px;
}
.lf-badge-live::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #E8C9A0;
}
.lf-badge-live[data-etat="ok"]::before { background: #7BD389; }
.lf-badge-live[data-etat="alerte"]::before { background: #FFB4A8; }

.lf-content-area { min-width: 0; padding: 32px 40px 56px; }

.lf-sidebar { background: #fff; border-right: 1px solid var(--lf-border); }
.lf-sidebar-title { font-size: 11px; letter-spacing: .16em; color: var(--lf-text-muted); }
.agent-nav-item { border-radius: 12px; gap: 12px; }
.agent-nav-item:hover { background: var(--lf-cream); }
.agent-nav-item.active {
  background: var(--lf-gold-light);
  border-color: rgba(166, 39, 46, 0.22);
  box-shadow: none;
}
.agent-nav-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lf-cream); border: 1px solid var(--lf-border);
  color: var(--lf-primary);
}
.agent-nav-item.active .agent-nav-icon { background: var(--lf-grad); border-color: transparent; color: #FCFAED; }
.agent-nav-name { font-size: 14px; font-weight: 500; color: var(--lf-text); }
.agent-nav-role { font-size: 12px; color: var(--lf-text-muted); }

.section-header { gap: 20px; flex-wrap: wrap; }
.section-title-wrap h2 {
  font-family: var(--lf-font-serif); font-weight: 500;
  font-size: clamp(26px, 2.6vw, 34px); color: var(--lf-dark);
}
.section-title-wrap p { font-size: 14px; color: var(--lf-text-muted); max-width: 70ch; }
.lf-titre-section {
  font-family: var(--lf-font-serif); font-weight: 500; font-size: 26px;
  color: var(--lf-dark); margin: 8px 0 18px;
}

.stats-grid { gap: 18px; }
.stat-card {
  border-radius: var(--lf-radius); border: 1px solid var(--lf-border);
  box-shadow: var(--lf-shadow-sm); padding: 20px 22px; background: #fff;
}
.stat-card-title {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lf-text-muted); font-weight: 500;
}
.stat-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lf-gold-light); color: var(--lf-primary);
}
.stat-card-value {
  font-family: var(--lf-font-serif); font-weight: 500; font-size: 34px;
  color: var(--lf-dark);
}
.stat-card-sub { font-size: 13px; color: var(--lf-text-muted); }

.btn-action-primary {
  background: var(--lf-grad); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(166, 39, 46, 0.22);
}
.btn-action-primary:hover { background: var(--lf-grad-d); }
.btn-action-secondary { border-radius: 999px; border-color: var(--lf-border); }
.btn-action-secondary:hover { border-color: var(--lf-primary); color: var(--lf-primary); }

.form-group input, .form-group select, .form-group textarea {
  border-radius: 10px; border-color: var(--lf-border); font-size: 14px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--lf-primary);
  box-shadow: 0 0 0 3px rgba(166, 39, 46, 0.12);
}

.config-container { min-width: 0; overflow: hidden; }
.config-tabs-nav { overflow-x: auto; scrollbar-width: thin; }
.config-tab-btn.active { color: var(--lf-primary); border-bottom-color: var(--lf-primary); }

.document-sheet { overflow: hidden; }
.doc-type-btn { border-radius: 999px; }
.doc-type-btn.active { background: var(--lf-grad); border-color: transparent; color: #fff; }

@media (max-width: 1180px) {
  .lf-sidebar { width: 76px; min-width: 76px; padding: 18px 10px; }
  .lf-sidebar-title, .agent-nav-info { display: none; }
  .agent-nav-item { justify-content: center; padding: 8px; }
  .lf-content-area { padding: 28px 28px 48px; }
  .lf-brand-info { display: none; }
}

@media (max-width: 760px) {
  .lf-topbar { padding: 10px 14px; flex-wrap: wrap; }
  .lf-topbar-actions { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .lf-main-layout { flex-direction: column; }
  .lf-sidebar {
    width: 100%; min-width: 0; height: auto; position: static;
    flex-direction: row; overflow-x: auto; padding: 10px 12px;
    border-right: 0; border-bottom: 1px solid var(--lf-border);
  }
  .agent-nav-item { width: auto; flex: 0 0 auto; }
  .lf-content-area { padding: 20px 16px 40px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .stat-card-value { font-size: 26px; }
}

#cockpit-orders-container { overflow-x: auto; }
@media (max-width: 1100px) {
  .invoice-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .invoice-editor-sidebar { min-width: 0; }
  .invoice-editor-sidebar .items-table-editor { display: block; overflow-x: auto; }
  .invoice-editor-sidebar button { white-space: normal; }
  #cockpit-orders-container table { min-width: 560px; }
}
@media (max-width: 900px) {
  .kanban-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #catalog-product-picker { min-width: 0; width: 100%; }
  #catalog-product-picker + button, #btn-add-from-catalog { flex: 0 0 auto; }
  div:has(> #catalog-product-picker) { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .lf-topbar-actions, .lf-sidebar { scrollbar-width: none; }
  .lf-topbar-actions::-webkit-scrollbar, .lf-sidebar::-webkit-scrollbar { display: none; }
}

.btn-action-primary .lf-ico, .btn-action-secondary .lf-ico { width: 17px; height: 17px; }
.btn-action-primary, .btn-action-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }

.lf-actions-doc { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-state-banner { border-radius: 12px; border-color: var(--lf-border); background: #fff; font-size: 13px; }
.doc-state-banner[data-state="brouillon"] { border-left: 3px solid #C98B86; }
.lf-sous-titre {
  font-family: var(--lf-font-serif); font-size: 22px; font-weight: 500;
  color: var(--lf-dark); margin: 6px 0 14px;
}
.lf-rubrique {
  font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lf-primary); margin: 0 0 12px;
}
.lf-separateur { border: 0; border-top: 1px solid var(--lf-border); margin: 22px 0; }
.lf-conversions { display: flex; gap: 8px; margin-bottom: 20px; }
.lf-conversions .btn-action-secondary { flex: 1; font-size: 13px; padding: 8px 12px; }
.doc-type-selector { gap: 6px; background: var(--lf-cream); padding: 4px; border-radius: 999px; border: 1px solid var(--lf-border); }
.doc-type-btn { border: 0; background: transparent; font-size: 13px; }
.doc-type-btn.active { box-shadow: 0 2px 8px rgba(166, 39, 46, .22); }
.docs-emis { border-radius: 12px; border-color: var(--lf-border); }
.lf-encart-catalogue {
  background: var(--lf-gold-light); border: 1px solid rgba(166, 39, 46, .14);
  border-radius: 12px; padding: 14px; margin-bottom: 16px;
}
.lf-encart-catalogue label { display: block; font-size: 12px; font-weight: 500; color: var(--lf-primary); margin-bottom: 8px; }
.lf-encart-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.lf-encart-ligne select {
  flex: 1 1 200px; min-width: 0; font-size: 14px; padding: 9px 12px;
  border: 1px solid var(--lf-border); border-radius: 10px; background: #fff;
}
.lf-encart-ligne .btn-action-primary { padding: 9px 16px; font-size: 13px; }
.items-table-editor th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lf-text-muted); font-weight: 500; }
.btn-add-item {
  border: 1px dashed rgba(166, 39, 46, .35); color: var(--lf-primary);
  background: transparent; border-radius: 12px; font-size: 13px;
}
.btn-add-item:hover { background: var(--lf-gold-light); }
.a4-preview-wrapper { background: var(--lf-cream-dark); }
.a4-actions-bar { align-items: center; }
.lf-apercu-titre { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lf-text-muted); }
.document-sheet { border-radius: 4px; box-shadow: 0 10px 30px rgba(46, 34, 36, .12); border: 0; }

.kanban-grid { gap: 18px; align-items: start; }
.kanban-col { background: #fff; padding: 16px; }
.kanban-col-header { border-bottom: 1px solid var(--lf-border); padding-bottom: 12px; margin-bottom: 14px; }
.kanban-col-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--lf-dark); }
.kanban-col-title .lf-ico { color: var(--lf-primary); }
.kanban-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  background: var(--lf-gold-light); color: var(--lf-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500;
}
#col-delivered .kanban-count { background: #EAF3EC; color: #2F6B3F; }
.kanban-body { display: flex; flex-direction: column; gap: 12px; min-height: 60px; }
.kanban-body:empty::before {
  content: attr(data-vide); display: block; text-align: center;
  padding: 22px 12px; font-size: 13px; color: var(--lf-text-muted);
  border: 1px dashed var(--lf-border); border-radius: 12px;
}
.delivery-card {
  background: var(--lf-cream); border: 1px solid var(--lf-border);
  border-radius: 12px; padding: 14px; margin: 0;
  transition: box-shadow .2s, transform .2s;
}
.delivery-card:hover { box-shadow: var(--lf-shadow-md); transform: translateY(-1px); }
.delivery-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.delivery-ref { font-size: 12px; color: var(--lf-text-muted); letter-spacing: .04em; }
.delivery-tag { font-size: 12px; border-radius: 999px; padding: 3px 10px; text-transform: none; letter-spacing: 0; font-weight: 500; text-align: right; }
.delivery-tag.tag-date { background: var(--lf-gold-light); color: var(--lf-primary); }
.delivery-tag.tag-libre { background: #fff; color: var(--lf-text-muted); border: 1px solid var(--lf-border); }
.delivery-client { font-family: var(--lf-font-serif); font-size: 19px; font-weight: 500; color: var(--lf-dark); margin-bottom: 6px; }
.delivery-items { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--lf-text); }
.delivery-items li { padding: 2px 0; }
.delivery-adresse { font-size: 13px; color: var(--lf-text-muted); margin-bottom: 12px; }
.delivery-pied { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--lf-border); }
.delivery-total { font-family: var(--lf-font-serif); font-size: 19px; color: var(--lf-dark); }
.delivery-pied .btn-action-secondary { font-size: 13px; padding: 7px 14px; background: #fff; }

.doc-type-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

.lf-large { width: 100%; margin-top: 10px; }
.lf-aide { font-size: 14px; color: var(--lf-text-muted); margin: 0 0 16px; }
.lf-rubrique .lf-ico, .lf-sous-titre .lf-ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }

.boutique-controls-bar {
  background: #fff; border: 1px solid var(--lf-border); border-radius: var(--lf-radius);
  padding: 14px 16px; gap: 14px; box-shadow: var(--lf-shadow-sm);
}
.cat-pills-wrap { gap: 6px; flex-wrap: wrap; }
.cat-pill {
  border: 1px solid var(--lf-border); background: #fff; color: var(--lf-text);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500;
}
.cat-pill:hover { border-color: var(--lf-primary); color: var(--lf-primary); }
.cat-pill.active { background: var(--lf-grad); border-color: transparent; color: #FCFAED; box-shadow: 0 2px 8px rgba(166, 39, 46, .22); }
.lf-outils-boutique { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.boutique-search-input, #boutique-sort-select {
  border: 1px solid var(--lf-border); border-radius: 999px; background: var(--lf-cream);
  padding: 8px 16px; font-size: 14px; outline: none;
}
.boutique-search-input:focus, #boutique-sort-select:focus { border-color: var(--lf-primary); box-shadow: 0 0 0 3px rgba(166, 39, 46, .12); }
.lf-compte { font-size: 13px; color: var(--lf-text-muted); padding: 0 6px; }

.boutique-grid { gap: 18px; }
.boutique-card {
  background: #fff; border: 1px solid var(--lf-border); border-radius: var(--lf-radius);
  overflow: hidden; box-shadow: var(--lf-shadow-sm); transition: box-shadow .2s, transform .2s;
}
.boutique-card:hover { box-shadow: var(--lf-shadow-md); transform: translateY(-2px); }
.boutique-card-img-wrap { background: var(--lf-cream-dark); }
.boutique-card-badge {
  background: rgba(252, 250, 237, .92); color: var(--lf-primary);
  border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; backdrop-filter: blur(4px);
}
.boutique-card-badge.is-pack { background: var(--lf-grad); color: #FCFAED; }
.boutique-card-title { font-family: var(--lf-font-serif); font-size: 20px; font-weight: 500; color: var(--lf-dark); }
.boutique-card-desc { font-size: 13px; color: var(--lf-text-muted); }
.boutique-card-footer { border-top: 1px solid var(--lf-border); gap: 10px; flex-wrap: wrap; }
.boutique-card-price { font-family: var(--lf-font-serif); font-size: 22px; color: var(--lf-dark); }
.boutique-card-tva { font-size: 12px; color: var(--lf-text-muted); }
.boutique-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.boutique-btn-add, .boutique-btn-dispatch {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; font-size: 12px; font-weight: 500; padding: 7px 12px; cursor: pointer;
}
.boutique-btn-add { background: var(--lf-grad); color: #FCFAED; border: 0; }
.boutique-btn-add:hover { background: var(--lf-grad-d); }
.boutique-btn-dispatch { background: #fff; color: var(--lf-primary); border: 1px solid var(--lf-border); }
.boutique-btn-dispatch:hover { border-color: var(--lf-primary); }
.boutique-btn-add .lf-ico, .boutique-btn-dispatch .lf-ico { width: 15px; height: 15px; }
.lf-vide {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px;
  background: #fff; border: 1px dashed var(--lf-border); border-radius: var(--lf-radius);
}
.lf-vide h4 { font-family: var(--lf-font-serif); font-size: 22px; font-weight: 500; color: var(--lf-dark); margin-bottom: 6px; }
.lf-vide p { font-size: 14px; color: var(--lf-text-muted); margin-bottom: 16px; }

.lf-theme { margin: 0; min-width: 260px; }
.lf-theme select { border-radius: 999px; background: #fff; font-weight: 500; }
.ads-subnav {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 22px;
  background: #fff; border: 1px solid var(--lf-border); border-radius: 999px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.ads-tab-btn {
  border: 0; background: transparent; color: var(--lf-text); white-space: nowrap;
  border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 500;
}
.ads-tab-btn.active { background: var(--lf-grad); color: #FCFAED; box-shadow: 0 2px 8px rgba(166, 39, 46, .22); }
.ads-builder-grid { gap: 22px; }
.builder-controls, .builder-preview {
  background: #fff; border: 1px solid var(--lf-border); border-radius: var(--lf-radius);
  padding: 24px; box-shadow: var(--lf-shadow-sm); min-width: 0;
}
.builder-preview { background: var(--lf-cream-dark); }
.builder-preview .lf-apercu-titre { margin: 0 0 14px; font-weight: 500; }
.keywords-box { background: var(--lf-gold-light); border: 1px solid rgba(166, 39, 46, .14); border-radius: 12px; padding: 14px; }
.keywords-box .lf-rubrique { display: block; margin-bottom: 8px; }
.keywords-tag {
  display: inline-block; background: #fff; color: var(--lf-primary);
  border: 1px solid rgba(166, 39, 46, .18); border-radius: 999px;
  padding: 4px 10px; margin: 0 4px 6px 0; font-size: 12px;
}
.google-ad-preview-box { background: #fff; border-radius: 12px; border: 1px solid var(--lf-border); box-shadow: var(--lf-shadow-sm); }
.lf-estimation { background: #fff; border: 1px solid var(--lf-border); border-radius: 12px; padding: 16px; margin-top: 18px; }
.lf-estimation .lf-rubrique { margin-bottom: 12px; }
.lf-estimation-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 13px; }
.lf-estimation-grille span { color: var(--lf-text-muted); }
.lf-estimation-grille strong { font-family: var(--lf-font-serif); font-size: 18px; font-weight: 500; color: var(--lf-dark); }
.insta-preview-card { border-radius: 14px; border: 1px solid var(--lf-border); box-shadow: var(--lf-shadow-md); overflow: hidden; background: #fff; }
.insta-plus { font-size: 16px; color: var(--lf-text-muted); }
.insta-icones { display: flex; gap: 14px; margin-bottom: 8px; color: var(--lf-dark); }
.insta-icones .lf-ico { width: 22px; height: 22px; }
.lf-script-carte {
  background: #fff; border: 1px solid var(--lf-border); border-radius: var(--lf-radius);
  padding: 28px; max-width: 820px; margin: 0 auto; box-shadow: var(--lf-shadow-sm);
}
.lf-script {
  background: var(--lf-cream); border-left: 3px solid var(--lf-primary); border-radius: 10px;
  padding: 20px; font-size: 14px; line-height: 1.75; white-space: pre-line; color: var(--lf-text);
}

@media (max-width: 1000px) {
  .ads-builder-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 760px) {
  .lf-theme { min-width: 0; width: 100%; }
  .cat-pills-wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cat-pill { flex: 0 0 auto; }
  .lf-outils-boutique .boutique-search-wrap { flex: 1 1 100%; }
  .boutique-search-input { width: 100%; }
  .builder-controls, .builder-preview, .lf-script-carte { padding: 18px; }
}

.lf-grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lf-carte {
  background: #fff; border: 1px solid var(--lf-border); border-radius: var(--lf-radius);
  padding: 22px; box-shadow: var(--lf-shadow-sm); min-width: 0;
}
.lf-carte + .lf-carte { margin-top: 0; }
.config-tab-content > .lf-carte { margin-top: 18px; }
.lf-carte-col { display: flex; flex-direction: column; }
.lf-encart {
  background: var(--lf-gold-light); border: 1px solid rgba(166, 39, 46, .14);
  border-radius: var(--lf-radius); padding: 22px; min-width: 0;
}
.config-tab-content > .lf-encart { margin-top: 26px; }
.lf-entete-panneau { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.lf-entete-panneau .lf-sous-titre { margin-bottom: 4px; }
.lf-actions-fin { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.lf-petit { font-size: 13px !important; padding: 6px 14px !important; }
.lf-ok { color: #2F6B3F; font-weight: 500; }
.lf-modale {
  background: #fff; border-radius: 20px; border: 0; padding: 28px;
  width: calc(100% - 32px); max-width: 500px; box-shadow: var(--lf-shadow-lg);
}

.config-container { background: #fff; border: 1px solid var(--lf-border); }
.config-tabs-nav { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--lf-border); background: var(--lf-cream); }
.config-tab-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 0; border-radius: 999px; padding: 9px 16px; background: transparent;
  color: var(--lf-text-muted); font-size: 14px; font-weight: 500;
}
.config-tab-btn:hover { color: var(--lf-primary); background: #fff; }
.config-tab-btn.active { background: var(--lf-grad); color: #FCFAED; border: 0; box-shadow: 0 2px 8px rgba(166, 39, 46, .22); }
.config-tab-btn .lf-ico { width: 17px; height: 17px; }
.config-tab-content { padding: 28px; }
.profile-grid { gap: 14px; }
.profile-card { border-radius: var(--lf-radius); border: 1px solid var(--lf-border); box-shadow: var(--lf-shadow-sm); }
.profile-card.active { border-color: rgba(166, 39, 46, .35); background: var(--lf-gold-light); box-shadow: none; }
.profile-card.active::before { background: var(--lf-grad); }

#view-stylist .lf-carte { padding: 26px; }
#note-output-text {
  font-family: var(--lf-font-serif); font-size: 19px; line-height: 1.6; font-style: italic;
  background: var(--lf-cream); border-left: 3px solid var(--lf-primary); color: var(--lf-dark);
}
#view-stylist .lf-carte p { font-size: 14px; line-height: 1.7; }
#view-stylist .lf-carte p strong { display: block; color: var(--lf-primary); font-weight: 500; margin-bottom: 2px; }

@media (max-width: 900px) {
  .lf-grille-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .config-tab-content { padding: 18px; }
  .config-tabs-nav { scrollbar-width: none; }
}
.config-tabs-nav { scrollbar-width: none; }
.config-tabs-nav::-webkit-scrollbar { display: none; }
#view-stylist .lf-carte p br { display: none; }
.profile-icone {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--lf-border); color: var(--lf-primary);
}
.profile-card.active .profile-icone { background: var(--lf-grad); color: #FCFAED; border-color: transparent; }

.docs-emis-ligne { display: flex; gap: 6px; align-items: stretch; }
.docs-emis-ligne .docs-emis-item { flex: 1; min-width: 0; }
.docs-emis-avoir {
  flex: 0 0 auto; border: 1px solid var(--lf-border); background: #fff; color: var(--lf-primary);
  border-radius: 10px; padding: 0 12px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.docs-emis-avoir:hover { border-color: var(--lf-primary); background: var(--lf-gold-light); }
#sauvegardes-etat[data-etat="ok"] { color: #2F6B3F; }
#sauvegardes-etat[data-etat="alerte"] { color: var(--lf-primary); }

.lf-recherche-produit { position: relative; flex: 1 1 220px; min-width: 0; }
.lf-recherche-produit input {
  width: 100%; font-size: 14px; padding: 9px 14px;
  border: 1px solid var(--lf-border); border-radius: 10px; background: #fff;
}
.lf-recherche-produit input:focus { outline: none; border-color: var(--lf-primary); box-shadow: 0 0 0 3px rgba(166, 39, 46, .12); }
.lf-resultats {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--lf-border); border-radius: 12px; box-shadow: var(--lf-shadow-lg);
}
.lf-resultats-cat {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--lf-text-muted); padding: 10px 10px 4px;
}
.lf-resultat {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.lf-resultat[aria-selected="true"], .lf-resultat:hover { background: var(--lf-gold-light); }
.lf-resultat-code {
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--lf-primary);
  background: #fff; border: 1px solid rgba(166, 39, 46, .2); border-radius: 6px; text-align: center; padding: 2px 0;
}
.lf-resultat-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-resultat-prix { color: var(--lf-text-muted); font-size: 13px; white-space: nowrap; }
.lf-resultats-vide { font-size: 13px; color: var(--lf-text-muted); margin: 8px 2px 0; }
.boutique-card-code {
  display: inline-block; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--lf-primary); border: 1px solid rgba(166, 39, 46, .2); border-radius: 6px; padding: 1px 7px; margin-bottom: 6px;
}

.lf-identite { border-top: 1px solid rgba(166, 39, 46, .14); margin: 22px 0 18px; padding-top: 18px; }
.lf-identite-grille { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 22px; align-items: start; }
.lf-identite-label { display: block; font-size: 13px; font-weight: 500; margin: 14px 0 8px; }
.lf-identite-label:first-child { margin-top: 0; }
.lf-logo-zone { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lf-logo-apercu {
  width: 150px; height: 64px; border: 1px dashed var(--lf-border); border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px;
}
.lf-logo-apercu img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lf-logo-apercu span { font-size: 12px; color: var(--lf-text-muted); }
.lf-logo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-logo-choisir { cursor: pointer; }
.lf-aide-petite { font-size: 12px; margin: 6px 0 0; }
.lf-couleurs { display: flex; gap: 8px; flex-wrap: wrap; }
.lf-pastille {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--c);
  box-shadow: 0 0 0 1px var(--lf-border); cursor: pointer; padding: 0; position: relative;
}
.lf-pastille.active { box-shadow: 0 0 0 2px var(--c, var(--lf-dark)); }
.lf-pastille-libre {
  background: conic-gradient(#e0474c, #e0b347, #5ab36b, #4a8fd4, #9a5bd1, #e0474c); overflow: hidden;
}
.lf-pastille-libre input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.lf-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lf-style-choix {
  text-align: left; background: #fff; border: 1px solid var(--lf-border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.lf-style-choix strong { font-size: 13px; font-weight: 500; color: var(--lf-dark); }
.lf-style-choix span { font-size: 12px; color: var(--lf-text-muted); line-height: 1.35; }
.lf-style-choix.active { border-color: var(--lf-primary); box-shadow: 0 0 0 2px rgba(166, 39, 46, .15); background: var(--lf-gold-light); }

.lf-mini-facture {
  --doc-accent: #A6272E;
  background: #fff; border-radius: 6px; box-shadow: var(--lf-shadow-md);
  aspect-ratio: 1 / 1.414; padding: 14px 12px; display: flex; flex-direction: column; gap: 9px;
}
.lf-mini-entete { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.lf-mini-logo { height: 22px; min-width: 40px; display: flex; align-items: center; }
.lf-mini-logo img { max-height: 22px; max-width: 70px; object-fit: contain; }
.lf-mini-logo:empty::before { content: ""; width: 46px; height: 7px; border-radius: 3px; background: var(--doc-accent); opacity: .85; }
.lf-mini-type { font-family: var(--lf-font-serif); font-size: 10px; letter-spacing: .14em; color: var(--doc-accent); font-weight: 600; }
.lf-mini-trait { height: 2px; background: var(--doc-accent); opacity: .7; }
.lf-mini-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lf-mini-cartes i { height: 26px; border-radius: 4px; background: #F6F1EC; }
.lf-mini-table { display: flex; flex-direction: column; gap: 4px; }
.lf-mini-table b { height: 9px; border-radius: 2px; background: var(--doc-accent); }
.lf-mini-table i { height: 6px; border-radius: 2px; background: #EEE7E1; }
.lf-mini-total { display: flex; justify-content: flex-end; margin-top: auto; }
.lf-mini-total i { width: 45%; height: 10px; border-radius: 2px; background: var(--doc-accent); opacity: .9; }
.lf-mini-facture[data-style="moderne"] .lf-mini-type { font-family: "Jost", system-ui, sans-serif; }
.lf-mini-facture[data-style="moderne"] .lf-mini-cartes i { border-radius: 8px; }
.lf-mini-facture[data-style="moderne"] .lf-mini-table b { border-radius: 6px; }
.lf-mini-facture[data-style="epure"] .lf-mini-cartes i { background: transparent; border: 1px solid #EEE7E1; }
.lf-mini-facture[data-style="epure"] .lf-mini-table b { background: transparent; border-bottom: 2px solid var(--doc-accent); border-radius: 0; }
.lf-mini-facture[data-style="epure"] .lf-mini-trait { height: 1px; }
.lf-mini-facture[data-style="epure"] .lf-mini-total i { background: transparent; border-top: 2px solid var(--doc-accent); border-radius: 0; }

.lf-modale-large { max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; }
@media (max-width: 700px) {
  .lf-identite-grille { grid-template-columns: minmax(0, 1fr); }
  .lf-mini-facture { max-width: 190px; }
  .lf-styles { grid-template-columns: minmax(0, 1fr); }
}

.document-sheet { --doc-accent: #A6272E; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-logo { display: block; max-width: 220px; max-height: 80px; object-fit: contain; margin-bottom: 10px; }
.document-sheet .doc-header { border-bottom-color: var(--doc-accent); }
.document-sheet .doc-brand-title,
.document-sheet .doc-type-badge { color: var(--doc-accent); }
.document-sheet .doc-brand-sub,
.document-sheet .doc-client-card h4,
.document-sheet .doc-payment-info h5 { color: var(--doc-accent); }
.document-sheet .doc-items-table th { background: var(--doc-accent); }
.document-sheet .grand-total { color: var(--doc-accent); border-top-color: var(--doc-accent); }

.document-sheet[data-style="moderne"] .doc-brand-title,
.document-sheet[data-style="moderne"] .doc-type-badge { font-family: "Jost", system-ui, sans-serif; letter-spacing: .06em; font-weight: 600; }
.document-sheet[data-style="moderne"] .doc-header { border-bottom-width: 4px; }
.document-sheet[data-style="moderne"] .doc-client-card { border-radius: 12px; border: 0; background: #F7F3EF; }
.document-sheet[data-style="moderne"] .doc-items-table th:first-child { border-radius: 10px 0 0 10px; }
.document-sheet[data-style="moderne"] .doc-items-table th:last-child { border-radius: 0 10px 10px 0; }
.document-sheet[data-style="moderne"] .doc-payment-info { border-radius: 12px; border: 0; background: #F7F3EF; }

.document-sheet[data-style="epure"] .doc-header { border-bottom-width: 1px; }
.document-sheet[data-style="epure"] .doc-client-card,
.document-sheet[data-style="epure"] .doc-payment-info { background: transparent; border: 0; border-top: 1px solid #E8E1DA; border-radius: 0; padding-left: 0; padding-right: 0; }
.document-sheet[data-style="epure"] .doc-items-table th {
  background: transparent; color: var(--doc-accent); border-bottom: 2px solid var(--doc-accent); border-radius: 0;
}
.document-sheet .grand-total { border-bottom-color: var(--doc-accent); }

.lf-verrou {
  position: fixed; inset: 0; z-index: 99999;
  align-items: center; justify-content: center;
  overflow-y: auto; padding: 24px 16px;
}
.lf-verrou-fond {
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .10), transparent 60%),
    linear-gradient(160deg, #7E2228 0%, #93272E 45%, #C1272D 100%);
}
.lf-verrou-contenu {
  position: relative; width: 100%; max-width: 400px; margin: auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  animation: lf-verrou-entree .5s cubic-bezier(.2, .8, .2, 1) both;
}
.lf-verrou-logo { width: 190px; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .18)); }
.lf-verrou-carte {
  width: 100%; background: #fff; border-radius: 22px; padding: 30px 28px 24px;
  box-shadow: 0 24px 60px rgba(60, 10, 15, .35); text-align: center;
}
.lf-verrou-ico {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--lf-gold-light); color: var(--lf-primary);
}
.lf-verrou-ico .lf-ico { width: 22px; height: 22px; }
.lf-verrou-titre {
  font-family: var(--lf-font-serif); font-weight: 500; font-size: 30px;
  color: var(--lf-dark); margin: 0 0 4px; letter-spacing: .01em;
}
.lf-verrou-sous-titre {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lf-text-muted); margin: 0 0 24px;
}
.lf-verrou-label { display: block; font-size: 13px; font-weight: 500; color: var(--lf-text); margin: 0 0 8px; }
#pin-confirm-wrap .lf-verrou-label { margin-top: 14px; }
.lf-verrou-champ {
  width: 100%; font-size: 20px; letter-spacing: .3em; text-align: center;
  padding: 12px 14px; border: 1px solid var(--lf-border); border-radius: 12px;
  background: var(--lf-cream); color: var(--lf-dark); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.lf-verrou-champ:focus { border-color: var(--lf-primary); box-shadow: 0 0 0 4px rgba(166, 39, 46, .12); background: #fff; }
.lf-verrou-bouton { width: 100%; margin-top: 20px; padding: 13px 20px; font-size: 15px; }
.lf-verrou-message { font-size: 13px; line-height: 1.5; min-height: 1.5em; margin: 14px 0 0; color: var(--lf-text-muted); }
.lf-verrou-message[data-etat="erreur"] { color: var(--lf-primary); font-weight: 500; }
.lf-verrou-pied { font-size: 12px; color: rgba(252, 250, 237, .75); margin: 0; text-align: center; }
.lf-verrou-carte.is-refus { animation: lf-verrou-refus .42s cubic-bezier(.36, .07, .19, .97); }

@keyframes lf-verrou-entree {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes lf-verrou-refus {
  15%, 85% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(5px); }
  45%, 55% { transform: translateX(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .lf-verrou-contenu, .lf-verrou-carte.is-refus { animation: none; }
}
@media (max-width: 420px) {
  .lf-verrou-carte { padding: 24px 20px 20px; border-radius: 18px; }
  .lf-verrou-titre { font-size: 26px; }
  .lf-verrou-logo { width: 160px; }
}

.lf-journal-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.lf-journal-filtres select, .lf-journal-filtres input { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; }
.lf-journal-cadre { max-height: 460px; overflow: auto; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 12px; background: #fff; }
.lf-journal { width: 100%; margin: 0; }
.lf-journal thead th { position: sticky; top: 0; background: #fbf7f3; z-index: 1; }
.lf-journal td { font-size: 13px; vertical-align: top; }
.lf-journal-date { white-space: nowrap; color: var(--lf-mute, #7f7273); }
.lf-journal-ip { color: var(--lf-mute, #7f7273); font-size: 11px; margin-left: 6px; }
#lf-utilisateur { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

[hidden] { display: none !important; }
.delivery-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--lf-border, #e6dcd4); }
.lf-lien-action { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12px; color: var(--lf-primary, #92272D); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lf-lien-action.is-danger { color: #8a1c1c; }
.lf-lien-action:disabled { opacity: .5; cursor: wait; }
.lf-admin { border: 1px solid var(--lf-border, #e6dcd4); border-radius: 12px; background: #fff; padding: 14px 16px; margin-bottom: 12px; }
.lf-admin-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 10px; }
.lf-admin-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--lf-primary, #92272D); color: #FCFAED; }
.lf-admin-info { font-size: 12px; color: var(--lf-mute, #7f7273); }
.lf-droits { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.lf-droit { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.lf-droit input { margin-top: 3px; accent-color: var(--lf-primary, #92272D); }
.lf-admin-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; }
.lf-admin-nouveau input[type="email"] { width: 100%; max-width: 360px; padding: 9px 12px; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 10px; font: inherit; margin-bottom: 10px; }

.lf-encyclo { margin-top: 24px; }
.lf-encyclo-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.lf-encyclo-tuile { text-align: left; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 12px; background: #fff; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; transition: border-color .2s, box-shadow .2s; }
.lf-encyclo-tuile:hover { border-color: var(--lf-primary, #92272D); box-shadow: 0 2px 10px rgba(166, 39, 46, .10); }
.lf-encyclo-tuile strong { color: var(--lf-primary-dark, #6b1f1f); font-size: 14px; }
.lf-encyclo-tuile em { font-size: 12px; color: var(--lf-mute, #7f7273); }
.lf-encyclo-tuile span { font-size: 12px; color: var(--lf-text, #423131); }
.lf-encyclo-tuile b { color: #2e7d32; font-weight: 600; }
.lf-encyclo-fiche { margin-top: 18px; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 14px; background: #fffdfb; padding: 18px 20px; }
.lf-encyclo-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.lf-encyclo-tete h4 { margin: 0; font-family: var(--lf-font-serif, serif); font-size: 24px; color: var(--lf-primary-dark, #6b1f1f); }
.lf-encyclo-tete p { margin: 2px 0 0; font-size: 13px; color: var(--lf-mute, #7f7273); }
.lf-encyclo-dl { margin: 0; display: grid; gap: 8px; }
.lf-encyclo-ligne { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; font-size: 13px; line-height: 1.5; }
.lf-encyclo-ligne dt { font-weight: 600; color: var(--lf-primary, #92272D); }
.lf-encyclo-ligne dd { margin: 0; }
.lf-encyclo-sources { margin-top: 14px; font-size: 11px; color: var(--lf-mute, #7f7273); }
@media (max-width: 600px) { .lf-encyclo-ligne { grid-template-columns: 1fr; gap: 2px; } }

.lf-mots-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 12px; }
.lf-mots-nav .btn-action-secondary { min-width: 120px; }
.lf-mots-nav .btn-action-secondary:disabled { opacity: .45; cursor: default; }
.lf-mots-compteur { font-size: 12px; color: var(--lf-mute, #7f7273); text-align: center; }

.lf-cal-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.lf-cal-tete .lf-sous-titre { margin: 0; }
.lf-cal-nav { display: flex; align-items: center; gap: 8px; }
.lf-cal-nav select { padding: 8px 12px; border: 1px solid var(--lf-border, #e6dcd4); border-radius: 10px; font: inherit; background: #fff; }
.lf-cal-nav .btn-action-secondary { min-width: 40px; padding: 6px 12px; }
.lf-cal-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 22px; }
.lf-cal-grille h4, .lf-cal-titre-idees { font-size: 13px; font-weight: 600; color: var(--lf-primary, #92272D); margin: 0 0 8px; }
.lf-cal-titre-idees { margin-top: 20px; }
.lf-cal-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-cal-fleur { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--lf-border, #e6dcd4); background: #fff; color: var(--lf-text, #423131); }
button.lf-cal-fleur { cursor: pointer; }
button.lf-cal-fleur:hover { border-color: var(--lf-primary, #92272D); }
.lf-cal-fleur.is-saison { background: #eef6ee; border-color: #cfe3cf; }
.lf-cal-fleur.is-eviter { background: #fbeeee; border-color: #efd0d0; text-decoration: line-through; text-decoration-color: rgba(138, 28, 28, .45); }
.lf-cal-note { font-size: 12px; color: var(--lf-mute, #7f7273); margin: 8px 0 0; line-height: 1.5; }
.lf-cal-evenements { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.lf-cal-idees { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lf-cal-idee { border: 1px solid var(--lf-border, #e6dcd4); border-radius: 12px; padding: 14px; background: #fffdfb; font-size: 13px; line-height: 1.5; }
.lf-cal-idee h5 { margin: 0 0 8px; font-family: var(--lf-font-serif, serif); font-size: 19px; color: var(--lf-primary-dark, #6b1f1f); }
.lf-cal-idee p { margin: 8px 0 0; }
.lf-cal-palette { color: var(--lf-mute, #7f7273); font-size: 12px; }
.lf-cal-argument { font-style: italic; color: var(--lf-primary-dark, #6b1f1f); }

.lf-ev-codes { font-size: 13px; line-height: 1.6; margin: 0 0 16px; color: var(--lf-text, #423131); }
.lf-ev-recette { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.lf-ev-recette td { padding: 4px 6px 4px 0; border-bottom: 1px dashed var(--lf-border, #e6dcd4); vertical-align: top; }
.lf-ev-recette em { color: var(--lf-mute, #7f7273); }
.lf-ev-qte { width: 28px; font-weight: 600; color: var(--lf-primary, #92272D); }
.lf-ev-role { color: var(--lf-mute, #7f7273); font-size: 11.5px; text-align: right; white-space: nowrap; }
.lf-ev-message { font-size: 12.5px; background: #fbf7f3; border-radius: 8px; padding: 8px 10px; }
.lf-ev-recette .lf-lien-action { font-size: 12.5px; }

.lf-pal-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lf-pal { border: 1px solid var(--lf-border, #e6dcd4); border-radius: 12px; padding: 12px 14px; background: #fffdfb; font-size: 13px; line-height: 1.5; }
.lf-pal h5 { margin: 8px 0 2px; font-family: var(--lf-font-serif, serif); font-size: 18px; color: var(--lf-primary-dark, #6b1f1f); }
.lf-pal p { margin: 4px 0; }
.lf-pal-nuancier { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.06); }
.lf-pal-nuancier span { flex: 1; }
.lf-details { border-top: 1px solid var(--lf-border, #e6dcd4); padding: 10px 0; font-size: 13px; line-height: 1.55; }
.lf-details summary { cursor: pointer; font-weight: 600; color: var(--lf-primary-dark, #6b1f1f); }
.lf-details p { margin: 8px 0 0; }
.lf-tech { padding: 8px 0; border-bottom: 1px dashed var(--lf-border, #e6dcd4); font-size: 13px; line-height: 1.55; }
.lf-tech h5 { margin: 0; font-size: 14px; color: var(--lf-primary, #92272D); }
.lf-tech p { margin: 6px 0 0; }
.lf-tech-etapes { margin: 8px 0 0; padding-left: 20px; }
.lf-tech-etapes li { margin-bottom: 4px; }
