:root {
  --ink: #15212a;
  --muted: #51606b;
  --soft: #eef6ff;
  --line: #cbd9e6;
  --panel: #fff;
  --accent: #0877c9;
  --accent-strong: #075d9d;
  --accent-soft: #dff0ff;
  --danger: #b42318;
  --danger-soft: #ffe6e3;
  --ok: #087443;
  --ok-soft: #dff7e8;
  --warn: #b45309;
  --warn-soft: #fff2d8;
  --focus-ring: #facc15;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-accent="blue"] { --accent: #2563eb; --accent-strong: #1d4ed8; --accent-soft: #dbeafe; }
body[data-accent="graphite"] { --accent: #3f4b53; --accent-strong: #252f35; --accent-soft: #eceff1; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f2f7fb; color: var(--ink); display: grid; grid-template-columns: 300px minmax(0, 1fr); font-size: 18px; line-height: 1.55; }
body.auth-mode { display: block; background: linear-gradient(135deg, #eef6ff 0%, #f7fbf4 52%, #fff7ed 100%); }
body.auth-mode .sidebar, body.auth-mode .topbar, body.auth-mode #searchResults { display: none !important; }
body.auth-mode .workspace { min-height: 100vh; padding: 28px; display: grid; place-items: center; }
body.auth-mode .content { width: min(1120px, 100%); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:hover, [role="button"]:hover { transform: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible, summary:focus-visible { outline: 4px solid var(--focus-ring); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 18px; background: #172026; color: white; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: white; font-weight: 900; overflow: hidden; border: 2px solid rgba(255,255,255,.32); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand strong, .brand span { display: block; }
.brand span, .shop-card span, .shop-card small { color: #b8c7c2; font-size: 13px; }
.nav { display: grid; gap: 8px; }
.nav button, .nav a { min-height: 60px; border-radius: 12px; padding: 0 13px; display: flex; align-items: center; gap: 12px; background: transparent; color: #f5fbff; text-align: left; text-decoration: none; font-size: 18px; font-weight: 900; border: 2px solid transparent; }
.nav button span, .nav a span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.10); color: white; }
.nav button.active, .nav button:hover, .nav a.active, .nav a:hover { color: white; border-color: rgba(255,255,255,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.nav button.dragging { opacity: .55; transform: scale(.98); }
.nav button.drag-over { outline: 3px solid rgba(255,255,255,.78); outline-offset: 2px; }
.nav-dashboard { background: #185adb !important; }
.nav-workshop { background: #0f8b8d !important; }
.nav-planning { background: #8a4fff !important; }
.nav-assistant { background: #0f766e !important; }
.nav-pos { background: #16803c !important; }
.nav-stock { background: #b85c00 !important; }
.nav-partsOrder { background: #ea580c !important; }
.nav-customers { background: #d63384 !important; }
.nav-invoices { background: #7c3aed !important; }
.nav-documents { background: #0891b2 !important; }
.nav-finance { background: #44546a !important; }
.nav-protocol { background: #0f766e !important; }
.nav-settings { background: #6b7280 !important; }
.shop-card { margin-top: auto; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 16px; display: grid; gap: 4px; background: rgba(255,255,255,.07); }
.shop-card strong { font-size: 30px; }
.side-panel { margin-top: auto; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 16px; display: grid; gap: 4px; background: rgba(255,255,255,.07); }
.side-panel span, .side-panel p { color: #b8c7c2; font-size: 13px; margin: 0; }
.side-panel strong { font-size: 26px; }
.workspace { min-width: 0; padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.eyebrow, .metric span, .field span, th, .panel-head p { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0; margin: 0; font-weight: 850; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
h2 { font-size: 19px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; min-width: min(650px, 58vw); justify-content: flex-end; }
.sync-status-button { min-width: 170px; padding-inline: 12px; white-space: nowrap; }
.sync-status-button.ok { background: #dcfce7; color: #166534; border-color: #86efac; }
.sync-status-button.info { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.sync-status-button.warning { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sync-status-button.danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.sync-status-button.muted { background: var(--soft); color: var(--muted); }
.search-box { flex: 1; max-width: 360px; height: 44px; border-radius: 8px; border: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.search-box input, .field input, .field select, .field textarea { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
#search { width: min(420px, 48vw); min-height: 52px; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; background: white; color: var(--ink); }
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: 0; }
.scope-select { min-height: 52px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 0 10px; font-weight: 850; }
.primary-button, .secondary-button, .icon-button, .tools button, .panel button, .modal button { min-height: 52px; border-radius: 12px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; }
.primary-button { background: var(--accent); color: white; font-weight: 800; }
.primary-button:hover { background: var(--accent-strong); }
.secondary-button, .icon-button, .tools button, .panel button, .modal button { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.danger-button { background: var(--danger-soft) !important; color: var(--danger) !important; border: 2px solid #fecaca !important; }
.danger-button:hover { background: #fecaca !important; }
button.action-confirmed,
[role="button"].action-confirmed {
  background: var(--ok-soft) !important;
  color: var(--ok) !important;
  border: 2px solid #86efac !important;
  box-shadow: inset 0 0 0 1px rgba(8, 116, 67, .16);
}
button.action-confirmed::after,
[role="button"].action-confirmed::after {
  content: attr(data-action-trace-label);
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 950;
  white-space: nowrap;
}
select.action-confirmed,
input.action-confirmed {
  color: var(--ok) !important;
  font-weight: 950;
}
.field.action-confirmed-field,
.switch.action-confirmed-field {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  box-shadow: inset 0 0 0 1px rgba(8, 116, 67, .12);
}
.action-trace-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #dcfce7;
  color: #047857;
  border: 1px solid #86efac;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 950;
}
.content { display: grid; gap: 18px; }
.login-screen { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .75fr); gap: 18px; align-items: stretch; }
.login-brand, .login-card, .login-protocol { border: 2px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 14px 34px rgba(21,33,42,.10); }
.login-brand { padding: 24px; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: center; border-left: 12px solid #0877c9; }
.login-brand img { width: 104px; height: 104px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 6px; }
.login-brand h1 { font-size: 42px; margin-bottom: 8px; }
.login-brand p { margin: 0; color: var(--muted); font-weight: 750; }
.login-card { padding: 20px; display: grid; gap: 12px; border-left: 12px solid #16a34a; }
.login-card h2 { margin: 0; font-size: 24px; }
.login-card .field { min-height: 74px; }
.login-protocol { grid-column: 1 / -1; padding: 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; border-left: 12px solid #8a4fff; }
.login-protocol article { min-height: 76px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fbfdff; display: grid; gap: 4px; align-content: start; }
.login-protocol strong { color: var(--ink); }
.login-protocol span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.metric, .panel { border: 2px solid var(--line); border-radius: 12px; background: white; padding: 18px; box-shadow: 0 8px 22px rgba(21, 33, 42, .06); }
.metric { min-height: 116px; display: grid; gap: 8px; align-content: start; }
.metric strong { font-size: 29px; line-height: 1; }
.metric small { width: fit-content; border-radius: 999px; padding: 6px 9px; background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.dashboard-metric { width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.dashboard-metric.blue { border-top: 8px solid #2563eb; }
.dashboard-metric.green { border-top: 8px solid #16a34a; }
.dashboard-metric.amber { border-top: 8px solid #d97706; }
.dashboard-metric.purple { border-top: 8px solid #7c3aed; }
.dashboard-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.12); }
.dashboard-detail-modal .modal-body { background: #f6f9fc; }
.dashboard-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 14px; background: #f8fbff; padding: 16px; }
.dashboard-detail-hero.green { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; }
.dashboard-detail-hero.amber { border-color: #fed7aa; border-left-color: #d97706; background: #fff7ed; }
.dashboard-detail-hero.purple { border-color: #ddd6fe; border-left-color: #7c3aed; background: #f5f3ff; }
.dashboard-detail-hero h3 { margin-bottom: 6px; font-size: 30px; }
.dashboard-detail-hero p:last-child { margin-bottom: 0; color: #43515a; }
.dashboard-detail-hero > strong { font-size: 42px; color: #172026; }
.dashboard-detail-list { display: grid; gap: 10px; }
.dashboard-detail-row { border: 1px solid var(--line); border-left: 8px solid #2563eb; border-radius: 10px; background: white; padding: 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto auto auto; gap: 10px; align-items: center; text-align: left; color: var(--ink); }
.dashboard-detail-row[data-action="open-order"] { cursor: pointer; }
.dashboard-detail-row[data-action="open-order"]:hover, .dashboard-detail-row button:hover { background: #f8fbff; }
.dashboard-detail-row.priority-red { border-left-color: #dc2626; }
.dashboard-detail-row.priority-amber { border-left-color: #d97706; }
.dashboard-detail-row.priority-blue { border-left-color: #2563eb; }
.dashboard-detail-row.priority-gray { border-left-color: #64748b; }
.dashboard-detail-row.revenue-row { grid-template-columns: minmax(220px, 1fr) auto auto; border-left-color: #16a34a; }
.dashboard-detail-row.sms-row { grid-template-columns: minmax(220px, .8fr) minmax(240px, 1fr) auto; border-left-color: #7c3aed; }
.dashboard-detail-row p { margin: 0; color: #43515a; overflow-wrap: anywhere; }
.finance-metric { width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.finance-metric.green { border-top: 8px solid #16a34a; }
.finance-metric.blue { border-top: 8px solid #2563eb; }
.finance-metric.amber { border-top: 8px solid #d97706; }
.finance-metric.purple { border-top: 8px solid #7c3aed; }
.finance-metric.gray { border-top: 8px solid #64748b; }
.finance-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.12); }
.finance-detail-modal .modal-body { background: #f6f9fc; }
.finance-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #bbf7d0; border-left: 12px solid #16a34a; border-radius: 14px; background: #f0fdf4; padding: 16px; }
.finance-detail-hero.blue { border-color: #bfdbfe; border-left-color: #2563eb; background: #f8fbff; }
.finance-detail-hero.amber { border-color: #fed7aa; border-left-color: #d97706; background: #fff7ed; }
.finance-detail-hero.purple { border-color: #ddd6fe; border-left-color: #7c3aed; background: #f5f3ff; }
.finance-detail-hero.gray { border-color: #cbd5e1; border-left-color: #64748b; background: #f8fafc; }
.finance-detail-hero h3 { margin-bottom: 6px; font-size: 30px; }
.finance-detail-hero p:last-child { margin-bottom: 0; color: #43515a; }
.finance-detail-hero > strong { font-size: 42px; color: #172026; text-align: right; }
.finance-detail-list { display: grid; gap: 10px; }
.finance-detail-row { border: 1px solid var(--line); border-left: 8px solid #16a34a; border-radius: 10px; background: white; padding: 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: center; }
.finance-detail-row.document-row { grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(220px, auto); border-left-color: #64748b; }
.finance-detail-row.payment-row { border-left-color: #2563eb; }
.finance-detail-row.vat-row { grid-template-columns: minmax(220px, 1fr) auto auto auto; border-left-color: #7c3aed; }
.finance-detail-row span { color: var(--muted); }
.accounting-autopilot { display: grid; gap: 12px; }
.accounting-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr); gap: 16px; align-items: center; border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 16px; }
.accounting-hero h2 { margin-bottom: 5px; font-size: 28px; }
.accounting-hero p:last-child { margin-bottom: 0; color: #43515a; }
.accounting-total { border: 1px solid #dbe5ee; border-radius: 10px; background: white; padding: 12px; display: grid; gap: 3px; }
.accounting-total span, .accounting-total small { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.accounting-total strong { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.accounting-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.accounting-control-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.accounting-control-grid article { border: 1px solid #dbe5ee; border-left: 8px solid #16a34a; border-radius: 10px; background: white; padding: 10px; display: grid; gap: 3px; }
.accounting-control-grid article.warning { border-left-color: #d97706; background: #fffaf0; }
.accounting-control-grid article.danger { border-left-color: #dc2626; background: #fff5f5; }
.accounting-control-grid article span, .accounting-readiness span, .accounting-accounts small { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.accounting-control-grid article strong { font-size: 17px; }
.accounting-readiness, .accounting-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.accounting-readiness article, .accounting-accounts span { border: 1px solid #dbe5ee; border-radius: 9px; background: #fbfdff; padding: 10px; display: grid; gap: 3px; }
.accounting-readiness strong, .accounting-accounts strong { font-size: 18px; }
.accounting-readiness small { color: #43515a; line-height: 1.35; }
.protocol-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #99f6e4; border-left: 12px solid #0f766e; border-radius: 14px; background: #f0fdfa; padding: 16px; }
.protocol-hero h2 { margin-bottom: 5px; font-size: 30px; }
.protocol-hero p:last-child { margin-bottom: 0; color: #43515a; }
.protocol-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 420px; }
.protocol-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.protocol-card { min-height: 142px; border: 1px solid var(--line); border-top: 8px solid #0f766e; border-radius: 10px; background: white; padding: 13px; display: grid; gap: 7px; align-content: start; box-shadow: 0 7px 18px rgba(21,33,42,.06); }
.protocol-card.green { border-top-color: #16a34a; }
.protocol-card.blue { border-top-color: #2563eb; }
.protocol-card.amber { border-top-color: #d97706; }
.protocol-card.purple { border-top-color: #7c3aed; }
.protocol-card span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.protocol-card strong { font-size: 18px; line-height: 1.1; }
.protocol-card p { margin: 0; color: #43515a; font-size: 14px; line-height: 1.35; }
.protocol-panel { border-left: 10px solid #0f766e; }
.protocol-steps { display: grid; gap: 8px; }
.protocol-steps article { border: 1px solid #dbe5ee; border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: start; }
.protocol-steps b { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: #ccfbf1; color: #0f766e; font-size: 18px; }
.protocol-steps strong, .protocol-checklist strong { display: block; margin-bottom: 2px; }
.protocol-steps p, .protocol-checklist p { margin: 0; color: #43515a; }
.protocol-store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.protocol-store-card { border: 1px solid #dbe5ee; border-left: 8px solid #0f766e; border-radius: 10px; background: #fbfdff; padding: 11px; display: grid; gap: 8px; }
.protocol-store-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.protocol-store-card header span { border-radius: 999px; padding: 3px 8px; background: #ccfbf1; color: #0f766e; font-weight: 950; }
.protocol-store-card div { display: flex; justify-content: space-between; gap: 8px; color: #43515a; }
.protocol-store-card div strong { color: var(--ink); }
.protocol-store-card button { min-height: 36px; border-radius: 8px; }
.protocol-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.protocol-checklist { display: grid; gap: 8px; }
.protocol-checklist article { border: 1px solid #dbe5ee; border-radius: 9px; background: #fbfdff; padding: 10px; }
.reference-panel { border-left: 8px solid #0891b2; background: #f8fbff; }
.reference-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.reference-grid span { min-width: 0; border: 1px solid #dbe5ee; border-radius: 8px; background: white; padding: 9px; display: grid; gap: 3px; }
.reference-grid strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reference-grid small { color: var(--muted); font-weight: 850; }
.assistant-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); gap: 14px; align-items: center; border: 2px solid #99f6e4; border-left: 10px solid #0f766e; border-radius: 12px; background: #f0fdfa; padding: 16px; }
.assistant-hero h2 { margin-bottom: 4px; font-size: 28px; }
.assistant-hero p:last-child { margin-bottom: 0; color: #43515a; }
.assistant-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .28fr); gap: 14px; align-items: start; }
.assistant-action-panel { border-left: 8px solid #0f766e; }
.assistant-setup-panel { border-left: 8px solid #0f766e; }
.assistant-quick-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr); gap: 12px; align-items: stretch; }
.assistant-inline-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.assistant-inline-search .field { margin: 0; }
.assistant-technical-panel { border-left: 8px solid #64748b; }
.assistant-technical-panel details { display: grid; gap: 10px; }
.assistant-technical-panel summary { cursor: pointer; color: var(--ink); font-weight: 950; }
.assistant-endpoints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assistant-endpoints.compact { margin-top: 12px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.assistant-endpoints.compact div { min-width: 0; border: 1px solid #dbe5ee; border-radius: 8px; background: #fbfdff; padding: 9px; display: grid; gap: 3px; }
.assistant-endpoints.compact span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.assistant-endpoints.compact strong { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.assistant-endpoints.compact .assistant-ringover-form { border: 1px solid #dbe5ee; border-radius: 8px; background: #fbfdff; padding: 9px; display: grid; gap: 8px; }
.assistant-ringover-form label { display: grid; gap: 6px; }
.assistant-ringover-form input { width: 100%; min-width: 0; border: 1px solid #d0dbe6; border-radius: 8px; padding: 10px; font-weight: 800; }
.assistant-ringover-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.assistant-endpoint-card { min-width: 0; border: 1px solid #dbe5ee; border-radius: 10px; background: #fbfdff; padding: 11px; display: grid; gap: 5px; }
.assistant-endpoint-card.ok { border-left: 7px solid #16a34a; }
.assistant-endpoint-card.warn { border-left: 7px solid #d97706; }
.assistant-endpoint-card.voice { border-left: 7px solid #2563eb; }
.assistant-endpoint-card span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.assistant-endpoint-card strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.assistant-integration-card { margin-top: 12px; border: 1px solid #dbe5ee; border-left: 8px solid #16a34a; border-radius: 10px; background: #fbfdff; padding: 12px; display: grid; gap: 10px; }
.assistant-integration-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.assistant-integration-card header div { display: grid; gap: 2px; }
.assistant-integration-card span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.assistant-integration-card strong { font-size: 18px; }
.assistant-integration-card em { color: #047857; font-style: normal; font-weight: 950; }
.assistant-integration-card ol { margin: 0; padding-left: 20px; color: #43515a; font-weight: 800; }
.assistant-integration-card li { margin: 3px 0; }
.assistant-search-panel { border-left: 8px solid #2563eb; }
.assistant-search-panel .form { display: grid; gap: 10px; }
.assistant-script-box { margin-top: 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #f8fbff; padding: 12px; display: grid; gap: 5px; }
.assistant-script-box.compact { margin-top: 0; }
.assistant-script-box span { color: #43515a; }
.assistant-auto-box { margin-top: 12px; border: 1px solid #bbf7d0; border-left: 7px solid #16a34a; border-radius: 10px; background: #f0fdf4; padding: 12px; display: grid; gap: 10px; }
.assistant-auto-box.voice { border-color: #bfdbfe; border-left-color: #2563eb; background: #f8fbff; }
.assistant-auto-box > strong { font-size: 16px; }
.assistant-auto-result { margin-top: 10px; border: 1px solid #dbe5ee; border-left: 7px solid #16a34a; border-radius: 9px; background: white; padding: 10px; display: grid; gap: 7px; }
.assistant-auto-result.warn { border-left-color: #d97706; background: #fffaf0; }
.assistant-auto-result header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.assistant-auto-result header div { display: grid; gap: 2px; }
.assistant-auto-result span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.assistant-auto-result strong { font-size: 20px; }
.assistant-auto-result em { color: #43515a; font-size: 12px; font-style: normal; font-weight: 900; }
.assistant-auto-result p { margin: 0; color: #17342e; font-weight: 850; }
.assistant-auto-result small { color: var(--muted); font-weight: 800; }
.assistant-events-panel { border-left: 8px solid #0f766e; }
.assistant-event-list { display: grid; gap: 10px; }
.assistant-event-card { border: 1px solid var(--line); border-left: 8px solid #64748b; border-radius: 10px; background: white; padding: 12px; display: grid; gap: 10px; }
.assistant-event-card.blue { border-left-color: #2563eb; }
.assistant-event-card.green { border-left-color: #16a34a; }
.assistant-event-card.amber { border-left-color: #d97706; }
.assistant-event-card.red { border-left-color: #dc2626; }
.assistant-event-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.assistant-event-card header div { display: grid; gap: 4px; min-width: 0; }
.assistant-event-card header strong { font-size: 19px; overflow-wrap: anywhere; }
.assistant-event-card header small { color: var(--muted); font-weight: 800; }
.assistant-event-grid { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 5px 10px; border: 1px solid #e1e9f0; border-radius: 9px; background: #fbfdff; padding: 10px; }
.assistant-event-grid span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.assistant-event-grid strong { min-width: 0; overflow-wrap: anywhere; }
.assistant-sms-audit { border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; overflow: hidden; }
.assistant-sms-audit.pending { border-color: #fed7aa; background: #fff7ed; }
.assistant-sms-audit.error { border-color: #fecaca; background: #fef2f2; }
.assistant-sms-audit summary { min-height: 38px; padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; color: #14532d; font-weight: 950; }
.assistant-sms-audit.pending summary { color: #9a3412; }
.assistant-sms-audit.error summary { color: #991b1b; }
.assistant-sms-audit summary span { text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.assistant-sms-audit summary strong { font-size: 13px; color: var(--ink); }
.assistant-sms-audit div { border-top: 1px solid rgba(15, 23, 42, .08); padding: 9px 10px 10px; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 5px 10px; background: rgba(255,255,255,.55); }
.assistant-sms-audit div span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.assistant-sms-audit div strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.assistant-event-card blockquote { margin: 0; border-left: 5px solid #0f766e; background: #f0fdfa; border-radius: 8px; padding: 10px 12px; color: #17342e; font-weight: 800; }
.assistant-context-preview { display: grid; gap: 5px; border: 1px solid #dbe5ee; border-radius: 9px; background: #fbfdff; padding: 9px; }
.assistant-context-preview span { color: #43515a; font-size: 13px; font-weight: 750; }
.assistant-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-card-actions button { min-height: 38px; border-radius: 9px; }
.assistant-context-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assistant-context-grid article, .assistant-context-columns article, .assistant-context-draft { border: 1px solid #dbe5ee; border-left: 7px solid #0f766e; border-radius: 10px; background: #fbfdff; padding: 12px; display: grid; gap: 5px; }
.assistant-context-grid span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.assistant-context-grid strong { font-size: 18px; overflow-wrap: anywhere; }
.assistant-context-grid small { color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.assistant-context-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assistant-context-columns article:nth-child(2) { border-left-color: #d97706; }
.assistant-context-columns article:nth-child(3) { border-left-color: #2563eb; }
.assistant-context-columns h3, .assistant-context-draft h3 { margin: 0; font-size: 16px; }
.assistant-context-columns ul { margin: 0; padding-left: 18px; color: #43515a; }
.assistant-context-columns li { margin: 3px 0; }
.assistant-context-draft { border-left-color: #16a34a; }
.assistant-context-draft p { margin: 0; color: #17342e; font-weight: 850; line-height: 1.5; }
.grid2, .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .selected { background: white; box-shadow: 0 1px 4px rgba(23,32,38,.12); }
.table, .table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 940px; background: white; }
th, td { padding: 15px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 16px; }
th { background: #f8faf9; }
.pill, .badge, .stock { display: inline-flex; min-height: 26px; align-items: center; border-radius: 999px; padding: 0 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill, .badge { background: #edf3f2; color: #33413d; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: #e4efff; color: #255db5; }
.badge.warning { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: var(--soft); color: var(--muted); }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.badge.gray { background: #eef2f7; color: #475569; }
.badge.priority { border: 2px solid currentColor; }
.button-row, .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { display: inline-flex; align-items: center; min-height: 27px; border-radius: 999px; padding: 0 9px; background: var(--soft); color: var(--muted); font-size: 13px; }
.quiet { color: var(--muted); line-height: 1.55; }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 24px; color: var(--muted); background: #f8faf9; text-align: center; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.timeline-item span, td span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.one-line, .name-line, .customer-contact-line, .customer-name-link, .table-customer-link, .client-link, .order-table-link { max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-contact-line, td .customer-contact-line { display: inline-grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 5px; margin-top: 0; vertical-align: middle; color: inherit; width: min(100%, 240px); }
.customer-contact-line .customer-name-link { display: inline-block; min-width: 0; }
.tiny-email-button { flex: 0 0 auto; }
.name-line, td .name-line { display: inline-block; margin-top: 0; vertical-align: middle; }
.phone-line { max-width: 100%; min-width: 0; display: inline-flex; align-items: center; width: fit-content; min-height: 26px; border-radius: 999px; padding: 0 9px; background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; font-weight: 950; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.phone-line::before { content: "Tél"; margin-right: 6px; color: #0369a1; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.contact-line { max-width: 100%; min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); vertical-align: middle; }
.email-line { min-width: 0; max-width: 100%; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-cell, .contact-cell { white-space: normal; min-width: 190px; }
.table-phone-wrap { display: block; margin-top: 5px; }
.name-cell small, .contact-cell small { display: block; max-width: 100%; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.settings-list { display: grid; gap: 12px; margin: 0; }
.settings-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.code-sample { overflow-x: auto; margin: 0; padding: 16px; border-radius: 8px; background: #172026; color: #eef8f5; line-height: 1.6; }
.warning-text { color: var(--warn); line-height: 1.5; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(440px, calc(100vw - 40px)); padding: 14px 16px; border-radius: 8px; background: var(--ink); color: white; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.danger { background: var(--danger); }
.stock.ok { background: var(--ok-soft); color: var(--ok); }
.stock.low { background: var(--danger-soft); color: var(--danger); }
.stock.warn { background: #fff2d8; color: #92400e; }
.store-pill { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 8px; background: #e0f2fe; color: #075985; font-size: 11px; font-weight: 900; white-space: nowrap; }
.siren-chip { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 8px; background: #ecfdf5; color: #047857; font-size: 11px; font-weight: 950; white-space: nowrap; }
.direction-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.direction-store-card { border: 1px solid #dbe5ee; border-left: 8px solid #0891b2; border-radius: 10px; background: #fbfdff; padding: 10px; color: var(--ink); text-align: left; display: grid; gap: 7px; box-shadow: 0 5px 14px rgba(21,33,42,.05); }
.direction-store-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.direction-store-card.integrity-warn { border-left-color: #d97706; background: #fffaf0; }
.direction-store-card.integrity-danger { border-left-color: #dc2626; background: #fff5f5; }
.direction-store-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid #e1e9f0; padding-bottom: 6px; }
.direction-store-card header strong { font-size: 17px; }
.direction-store-card header span { color: #0e7490; font-size: 12px; font-weight: 950; }
.direction-store-card div { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 850; }
.direction-store-card b { color: var(--ink); font-size: 15px; }
.direction-store-card small { color: var(--muted); font-weight: 900; }
.direction-store-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; margin-top: 2px; }
.direction-store-actions button { min-height: 44px; border-radius: 10px; padding: 0 10px; }
.integrity-card { border: 1px solid #dbe5ee; border-left: 8px solid #2563eb; border-radius: 10px; background: #fbfdff; padding: 12px; display: grid; gap: 12px; margin-bottom: 12px; }
.integrity-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.integrity-card header strong { display: block; font-size: 17px; }
.integrity-card header span { color: var(--muted); font-size: 12px; font-weight: 900; }
.integrity-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.integrity-meta div { border: 1px solid #dbe5ee; border-radius: 8px; background: white; padding: 10px; display: grid; gap: 4px; }
.integrity-meta span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.integrity-meta strong { color: var(--ink); font-size: 18px; }
.integrity-meta small { color: var(--muted); overflow-wrap: anywhere; }
.integrity-store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.integrity-store-card { border: 1px solid #dbe5ee; border-left: 8px solid #16a34a; border-radius: 10px; background: white; padding: 10px; display: grid; gap: 7px; }
.integrity-store-card.warn { border-left-color: #d97706; background: #fffaf0; }
.integrity-store-card.danger { border-left-color: #dc2626; background: #fff5f5; }
.integrity-store-card.muted { border-left-color: #94a3b8; background: #f8fafc; }
.integrity-store-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid #e2e8f0; }
.integrity-store-card header span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.integrity-store-card div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 850; }
.integrity-store-card b { color: var(--ink); font-size: 15px; }
.direction-lock-card { border-left-color: #64748b; background: #f8fafc; }
.direction-auth-modal { width: min(560px, 100%); }
.actions { display: flex; align-items: center; gap: 7px; }
.actions button { width: 32px; min-height: 32px; padding: 0; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; }
.column { min-width: 210px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; padding: 10px; }
.column h3 { display: flex; justify-content: space-between; align-items: center; }
.ticket { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; margin-bottom: 10px; }
.ticket span, .ticket small { color: var(--muted); }
.planning { display: grid; grid-template-columns: 140px repeat(6, minmax(130px, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.cell { min-height: 86px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px; background: white; }
.head, .tech { background: #f8faf9; font-weight: 800; }
.slot { width: 100%; background: var(--accent-soft) !important; color: var(--accent-strong) !important; border: 0 !important; }
.planning-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, .8fr); gap: 12px; align-items: start; border: 2px solid #dbe5ee; border-left: 9px solid #2563eb; border-radius: 12px; padding: 12px 14px; background: white; box-shadow: 0 6px 16px rgba(21, 33, 42, .05); }
.planning-hero h2 { margin-bottom: 4px; font-size: 24px; }
.planning-hero p:last-child { margin-bottom: 0; color: #43515a; font-size: 15px; }
.priority-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.priority-legend button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; border-radius: 999px; padding: 0 8px; background: #fbfdff; border: 1px solid #dbe5ee; font-weight: 850; color: #34424c; font-size: 13px; cursor: pointer; }
.priority-legend button:hover { transform: translateY(-1px); border-color: #2563eb; box-shadow: 0 6px 14px rgba(21,33,42,.10); }
.priority-legend i { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }
.priority-legend .red { background: #dc2626; }
.priority-legend .amber { background: #d97706; }
.priority-legend .blue { background: #2563eb; }
.priority-legend .gray { background: #64748b; }
.planning-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.planning-kpi { min-height: 58px; border: 1px solid var(--line); border-top: 6px solid #2563eb; text-align: left; border-radius: 10px; padding: 8px 9px; color: var(--ink); background: white; display: grid; gap: 4px; align-content: start; box-shadow: 0 5px 12px rgba(21,33,42,.05); cursor: pointer; }
.planning-kpi span { font-weight: 900; }
.planning-kpi strong { font-size: 23px; line-height: 1; }
.planning-kpi small { color: var(--muted); font-size: 12px; font-weight: 900; }
.planning-kpi:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.12); }
.planning-kpi.blue { border-top-color: #2563eb; }
.planning-kpi.amber { border-top-color: #d97706; }
.planning-kpi.red { border-top-color: #dc2626; }
.planning-kpi.green { border-top-color: #16a34a; }
.planning-kpi.purple { border-top-color: #7c3aed; }
.planning-hero-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.planning-mini-focus { min-height: 64px; width: 100%; border: 1px solid #d8c7ff; border-left: 7px solid #2563eb; border-radius: 8px; background: white; color: var(--ink); padding: 8px 9px; text-align: left; display: grid; gap: 3px; align-content: center; cursor: pointer; box-shadow: 0 4px 10px rgba(21,33,42,.05); }
.planning-mini-focus span { color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.planning-mini-focus strong { font-size: 22px; line-height: 1; }
.planning-mini-focus small { color: var(--muted); font-size: 12px; font-weight: 850; overflow-wrap: anywhere; }
.planning-mini-focus:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(21,33,42,.10); }
.planning-mini-focus.red { border-left-color: #dc2626; }
.planning-mini-focus.purple { border-left-color: #7c3aed; }
.planning-mini-focus.amber { border-left-color: #d97706; }
.planning-mini-focus.blue { border-left-color: #2563eb; }
.planning-mini-focus.muted { opacity: .72; background: #f8fbff; border-left-color: #94a3b8; }
.agenda-board { display: grid; gap: 18px; }
.agenda-band { border: 2px solid #dbe5ee; border-radius: 14px; background: white; padding: 14px; box-shadow: 0 8px 22px rgba(21, 33, 42, .06); }
.agenda-band-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.agenda-band-head h2 { margin-bottom: 0; font-size: 24px; }
.agenda-band-head span { color: var(--muted); font-weight: 850; }
.agenda-grid { display: grid; gap: 12px; align-items: stretch; overflow-x: auto; padding-bottom: 4px; }
.agenda-grid.short { grid-template-columns: 230px repeat(7, minmax(210px, 1fr)); }
.agenda-grid.medium { grid-template-columns: repeat(3, minmax(260px, 1fr)); }
.agenda-grid.long { grid-template-columns: repeat(4, minmax(230px, 1fr)); }
.agenda-column { min-width: 210px; border: 2px solid #dbe5ee; border-top: 8px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 10px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.agenda-column.late { border-top-color: #dc2626; background: #fff5f5; }
.agenda-column.today { border-top-color: #d97706; background: #fffbeb; }
.agenda-column header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.agenda-column header strong { display: block; font-size: 18px; }
.agenda-column header span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.agenda-column header b { min-width: 34px; height: 34px; border-radius: 999px; background: white; border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent-strong); }
.agenda-stack { display: grid; gap: 8px; align-content: start; }
.agenda-order { width: 100%; border: 2px solid #dbe5ee; border-left: 8px solid #2563eb; border-radius: 10px; background: white; color: var(--ink); padding: 10px; text-align: left; display: grid; gap: 5px; cursor: pointer; }
.agenda-order > button:first-child { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; display: grid; gap: 5px; width: 100%; box-shadow: none; }
.agenda-order:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.agenda-order.priority-red { border-left-color: #dc2626; }
.agenda-order.priority-amber { border-left-color: #d97706; }
.agenda-order.priority-blue { border-left-color: #2563eb; }
.agenda-order.priority-gray { border-left-color: #64748b; }
.agenda-order-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.agenda-order-top strong { font-size: 17px; }
.agenda-order-top em { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.agenda-order > span:not(.agenda-order-top) { font-weight: 900; overflow-wrap: anywhere; }
.agenda-order small { color: var(--muted); font-weight: 750; overflow-wrap: anywhere; }
.agenda-empty { min-height: 126px; width: 100%; border: 2px dashed #9fc4e8; border-radius: 10px; background: #f8fbff; color: #25455f; display: grid; gap: 5px; place-items: center; text-align: center; padding: 12px; cursor: pointer; }
.agenda-empty strong { font-size: 18px; }
.agenda-empty span { font-weight: 950; color: #075985; }
.agenda-empty small { color: var(--muted); font-weight: 850; }
.agenda-empty:hover { border-style: solid; border-color: #2563eb; background: #eef6ff; box-shadow: 0 8px 18px rgba(21,33,42,.10); transform: translateY(-1px); }
.team-panel { border-left: 12px solid #0f8b8d; background: #f0fdfa; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.team-card { border: 2px solid var(--line); border-left: 10px solid var(--tech-color, #2563eb); border-radius: 12px; background: white; padding: 12px; display: grid; gap: 10px; box-shadow: 0 8px 18px rgba(21,33,42,.05); }
.team-card.inactive { opacity: .65; background: #f8fafc; }
.team-card-main { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--ink) !important; display: grid !important; gap: 5px; justify-content: stretch !important; text-align: left; }
.team-card-main span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.team-card-main strong { font-size: 23px; line-height: 1.1; color: var(--tech-color, #2563eb); }
.team-card-main small, .team-card-meta span { color: var(--muted); font-weight: 850; overflow-wrap: anywhere; }
.team-card-meta { display: grid; gap: 5px; border-radius: 8px; background: #f8fbff; padding: 9px; }
.technician-detail-modal .modal-body { background: #f6f9fc; }
.technician-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 16px; align-items: stretch; border: 2px solid #dbeafe; border-left: 12px solid var(--tech-color, #2563eb); border-radius: 14px; background: #f8fbff; padding: 16px; }
.technician-detail-hero h3 { margin: 5px 0; font-size: 34px; color: var(--tech-color, #2563eb); }
.technician-detail-hero p { margin-bottom: 4px; color: #43515a; }
.technician-detail-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.technician-detail-kpis .metric { min-height: 96px; padding: 12px; }
.planning-tree-panel { display: grid; gap: 12px; }
.planning-tree-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.planning-tree-group { min-width: 0; border: 1px solid var(--line); border-top: 8px solid #2563eb; border-radius: 10px; background: white; box-shadow: 0 6px 16px rgba(21,33,42,.05); overflow: hidden; }
.planning-tree-group.red { border-top-color: #dc2626; }
.planning-tree-group.amber { border-top-color: #d97706; }
.planning-tree-group.green { border-top-color: #16a34a; }
.planning-tree-group.purple { border-top-color: #7c3aed; }
.planning-tree-group.gray { border-top-color: #64748b; }
.planning-tree-wide { width: 100%; }
.planning-tree-group summary { min-height: 72px; padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.planning-tree-group summary::-webkit-details-marker { display: none; }
.planning-tree-group summary span { min-width: 0; display: grid; gap: 3px; }
.planning-tree-group summary strong { overflow-wrap: anywhere; font-size: 17px; }
.planning-tree-group summary small { color: var(--muted); font-weight: 850; line-height: 1.25; }
.planning-tree-group summary b { width: 40px; height: 40px; border-radius: 999px; background: #f8fbff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent-strong); font-size: 18px; }
.planning-tree-group summary:hover { background: #f8fbff; }
.planning-tree-list, .planning-tree-nested { border-top: 1px solid var(--line); background: #f8fbff; padding: 10px; display: grid; gap: 10px; }
.planning-tree-nested { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.planning-tree-list .planning-card { box-shadow: none; }
.agenda-compact-panel { display: grid; gap: 10px; }
.agenda-compact-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.agenda-compact-list .planning-tree-group { box-shadow: none; }
.create-or-panel { border-left: 10px solid #2563eb; background: #fbfdff; }
.create-or-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.create-or-tile { min-height: 76px; border: 1px solid var(--line); border-left: 8px solid #2563eb; border-radius: 10px; background: white; color: var(--ink); padding: 10px 12px; display: grid !important; gap: 3px; align-content: center; justify-items: start; text-align: left; }
.create-or-tile span { color: var(--muted); font-size: 13px; font-weight: 950; text-transform: uppercase; }
.create-or-tile strong { font-size: 19px; line-height: 1.1; }
.create-or-tile small { color: #075d9d; font-weight: 950; }
.create-or-tile:hover, .create-or-inline:hover { border-color: #2563eb; background: #eef6ff; box-shadow: 0 6px 14px rgba(21,33,42,.08); }
.create-or-inline { width: fit-content; min-height: 42px !important; border: 1px solid #bfdbfe !important; border-radius: 10px !important; background: #eef6ff !important; color: #075d9d !important; padding: 0 12px !important; font-weight: 950 !important; }
.planning-tree-row { border: 1px solid var(--line); border-left: 8px solid #2563eb; border-radius: 10px; background: white; padding: 10px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto auto 54px; gap: 8px; align-items: center; cursor: pointer; }
.planning-tree-row:hover { background: #f8fbff; box-shadow: 0 6px 14px rgba(21,33,42,.08); }
.planning-tree-row.priority-red { border-left-color: #dc2626; }
.planning-tree-row.priority-amber { border-left-color: #d97706; }
.planning-tree-row.priority-blue { border-left-color: #2563eb; }
.planning-tree-row.priority-gray { border-left-color: #64748b; }
.planning-tree-row div { min-width: 0; display: grid; gap: 3px; }
.planning-tree-row span:not(.badge):not(.stock) { color: var(--muted); font-weight: 850; overflow-wrap: anywhere; }
.planning-tree-row .primary-button { min-height: 34px; padding: 0 10px; border-radius: 8px; }
.planning-calendar-panel { border-left: 10px solid #2563eb; background: #fbfdff; overflow: hidden; }
.planning-calendar-help { min-height: 30px; border-radius: 999px; padding: 5px 10px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 950; }
.planning-calendar-grid { display: grid; grid-template-columns: 72px repeat(var(--planning-days), minmax(166px, 1fr)); border: 1px solid #dbe5ee; border-radius: 12px; overflow: auto; background: white; }
.planning-time-head, .planning-day-head, .planning-hour, .planning-slot { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.planning-time-head, .planning-day-head { min-height: 62px; background: #f8fafc; display: grid; align-content: center; padding: 8px; }
.planning-time-head { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.planning-day-head { gap: 2px; border-top: 6px solid #94a3b8; }
.planning-day-head.today { border-top-color: #2563eb; background: #eff6ff; }
.planning-day-head strong { color: var(--ink); font-size: 15px; line-height: 1.1; text-transform: capitalize; }
.planning-day-head span { color: var(--muted); font-size: 12px; font-weight: 850; }
.planning-hour { min-height: 118px; background: #f8fafc; color: #475569; padding: 10px 8px; font-weight: 950; }
.planning-slot { min-height: 118px; padding: 7px; display: grid; gap: 6px; align-content: start; background: #ffffff; }
.planning-slot:nth-child(16n), .planning-slot:nth-child(16n + 1), .planning-slot:nth-child(16n + 2), .planning-slot:nth-child(16n + 3), .planning-slot:nth-child(16n + 4), .planning-slot:nth-child(16n + 5), .planning-slot:nth-child(16n + 6), .planning-slot:nth-child(16n + 7) { background: #fcfdff; }
.planning-slot-empty { min-height: 30px !important; width: 100%; border: 1px dashed #cbd5e1 !important; border-radius: 8px !important; background: #f8fafc !important; color: #64748b !important; padding: 0 !important; font-size: 18px; font-weight: 950; opacity: .75; }
.planning-slot-empty:hover { opacity: 1; border-color: #2563eb !important; background: #eff6ff !important; color: #1d4ed8 !important; }
.planning-or-card { width: 100%; min-height: 92px !important; border: 1px solid #cbd5e1 !important; border-left: 7px solid #2563eb !important; border-radius: 10px !important; background: white !important; color: var(--ink) !important; padding: 8px !important; display: grid !important; grid-template-columns: auto 1fr; gap: 2px 7px; align-content: start; justify-items: start; text-align: left; box-shadow: 0 4px 10px rgba(15,23,42,.06); }
.planning-or-card > button:first-child { grid-column: 1 / -1; border: 0; background: transparent; color: inherit; padding: 0; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; width: 100%; box-shadow: none; justify-items: start; }
.planning-or-card.priority-red { border-left-color: #dc2626 !important; }
.planning-or-card.priority-amber { border-left-color: #d97706 !important; }
.planning-or-card.priority-blue { border-left-color: #2563eb !important; }
.planning-or-card.priority-gray { border-left-color: #64748b !important; }
.planning-or-card:hover { border-color: #94a3b8 !important; background: #f8fbff !important; box-shadow: 0 7px 16px rgba(15,23,42,.10); }
.planning-or-time { grid-row: span 2; min-height: 26px; border-radius: 7px; padding: 3px 6px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 950; }
.planning-or-card strong { color: #0f172a; font-size: 14px; line-height: 1.1; }
.planning-or-card span:not(.planning-or-time) { max-width: 100%; color: #1f2937; font-weight: 950; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-or-card small { grid-column: 1 / -1; max-width: 100%; color: #475569; font-size: 12px; font-weight: 850; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.planning-or-card em { grid-column: 1 / -1; font-style: normal; min-height: 22px; border-radius: 999px; padding: 2px 7px; background: #f1f5f9; color: #334155; font-size: 11px; font-weight: 950; }
.planning-or-card.status-green em { background: #dcfce7; color: #166534; }
.planning-or-card.status-amber em { background: #ffedd5; color: #9a3412; }
.planning-or-card.status-blue em { background: #dbeafe; color: #1e40af; }
.planning-or-card.status-purple em { background: #ede9fe; color: #5b21b6; }
.planning-watch-panel { border-left: 10px solid #64748b; }
.planning-watch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.planning-cards { display: grid; gap: 12px; }
.planning-card { border: 2px solid #dbe5ee; border-left: 10px solid #8a4fff; border-radius: 12px; background: white; padding: 13px; display: grid; gap: 10px; }
.planning-card.priority-red, .priority-row.priority-red td:first-child { border-left-color: #dc2626; }
.planning-card.priority-amber, .priority-row.priority-amber td:first-child { border-left-color: #d97706; }
.planning-card.priority-blue, .priority-row.priority-blue td:first-child { border-left-color: #2563eb; }
.planning-card.priority-gray, .priority-row.priority-gray td:first-child { border-left-color: #64748b; }
.planning-card.danger { border-left-color: #dc2626; background: #fff5f5; }
.planning-card.today { border-left-color: #d97706; background: #fffbeb; }
.planning-card.soon { border-left-color: #2563eb; }
.planning-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.planning-card-top strong { font-size: 22px; }
.planning-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.planning-badges .badge { border: 0; cursor: pointer; }
.order-code-button, .client-link, .order-table-link, .customer-name-link { border: 0; background: transparent; color: var(--ink); padding: 0; justify-content: flex-start; text-align: left; font-weight: 950; cursor: pointer; }
.order-code-button { font-size: 22px; }
.order-table-link { min-height: 0 !important; border: 0 !important; background: transparent !important; color: var(--accent-strong) !important; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.client-link { width: fit-content; font-size: 20px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.customer-name-link { display: inline; min-height: 0 !important; border: 0 !important; background: transparent !important; color: var(--accent-strong) !important; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.customer-contact-line { display: inline-grid; grid-template-columns: minmax(0, 1fr) 42px; flex-wrap: nowrap; align-items: center; gap: 5px; max-width: 100%; }
.planning-client-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.customer-email-button { min-height: 28px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; padding: 0 9px; font-size: 12px; font-weight: 950; }
.customer-email-button:hover { background: #dbeafe; color: #1e40af; }
.tiny-email-button { width: 42px; min-width: 42px; min-height: 20px; max-height: 20px; padding: 0; border-radius: 7px; font-size: 9px; line-height: 1; justify-content: center; }
.name-cell .customer-contact-line { width: min(100%, 230px); }
.customer-detail-card .customer-contact-line { width: min(100%, 280px); }
.doc-customer-link { font-size: 18px; }
.table-customer-link { font-size: inherit; }
.client-link:hover, .order-code-button:hover, .order-table-link:hover, .customer-name-link:hover { color: var(--accent) !important; }
.planning-card h4 { margin: 0; font-size: 20px; }
.planning-detail-grid { display: grid; grid-template-columns: 92px 1fr; gap: 5px 10px; padding: 10px; border-radius: 8px; background: #f8fbff; }
.planning-detail-grid span { color: var(--muted); font-weight: 850; font-size: 13px; }
.planning-detail-grid strong { overflow-wrap: anywhere; }
.due-danger { color: #b91c1c; }
.due-today { color: #b45309; }
.due-soon { color: #1d4ed8; }
.planning-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.planning-tags span { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 0 9px; background: #edf3f8; color: #3d4d58; font-size: 13px; font-weight: 800; }
.planning-tags .waiting-part-chip, .waiting-part-chip { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 0 10px; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; font-size: 13px; font-weight: 950; }
.waiting-part-inline { display: inline-block; margin-top: 4px; color: #c2410c; font-size: 12px; font-weight: 950; }
.quick-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-status { border: 2px solid #dbeafe; border-radius: 10px; background: #f8fbff; padding: 9px; display: grid; gap: 7px; }
.quick-status span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.quick-status select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 0 9px; outline: 0; }
.quick-status select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.planning-note { margin: 0; border-left: 6px solid #8a4fff; border-radius: 8px; padding: 9px 10px; background: #f4efff; color: #3e3156; }
.waiting-part-note { margin: 0; border-left: 6px solid #f97316; border-radius: 8px; padding: 9px 10px; background: #fff7ed; color: #7c2d12; display: grid; gap: 2px; }
.waiting-part-note strong { font-size: 13px; text-transform: uppercase; }
.waiting-part-field { border-color: #fed7aa; background: #fff7ed; }
.waiting-part-field span { color: #c2410c; }
.waiting-part-modal .modal-body { background: #fff7ed; }
.non-repair-card { grid-column: 1 / -1; border: 2px solid #fecaca; border-left: 10px solid #dc2626; border-radius: 12px; background: #fff5f5; padding: 10px; display: grid; gap: 10px; }
.non-repair-card .switch { background: white; }
.non-repair-reasons { display: none; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.non-repair-card.active .non-repair-reasons { display: grid; }
.non-repair-reasons > span { grid-column: 1 / -1; color: #991b1b; font-weight: 950; text-transform: uppercase; font-size: 12px; }
.non-repair-reasons label:not(.field) { min-height: 44px; border: 1px solid #fecaca; border-radius: 8px; background: white; padding: 8px 10px; display: flex; align-items: center; gap: 8px; font-weight: 850; color: #7f1d1d; }
.non-repair-reasons input { width: 20px; height: 20px; accent-color: #dc2626; }
.non-repair-chip { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.planning-card-actions { display: grid; gap: 10px; }
.planning-card-actions div { display: flex; flex-wrap: wrap; gap: 8px; }
.planning-card-actions button { min-height: 38px; border-radius: 9px; }
.planning-table { overflow: hidden; }
.planning-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #d8c7ff; border-left: 12px solid #8a4fff; border-radius: 14px; background: #f7f3ff; padding: 16px; }
.planning-detail-hero h3 { margin-bottom: 6px; font-size: 28px; }
.planning-detail-hero p:last-child { margin-bottom: 0; color: #51436b; }
.planning-detail-hero strong { font-size: 42px; color: #6d28d9; }
.planning-detail-row { border: 1px solid var(--line); border-left: 8px solid #2563eb; border-radius: 10px; background: white; padding: 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto auto auto; gap: 10px; align-items: center; }
.priority-row[data-action="open-order"], .planning-detail-row[data-action="open-order"] { cursor: pointer; }
.priority-row[data-action="open-order"]:hover td, .planning-detail-row[data-action="open-order"]:hover { background: #f8fbff; }
.planning-detail-row.priority-red { border-left-color: #dc2626; }
.planning-detail-row.priority-amber { border-left-color: #d97706; }
.planning-detail-row.priority-blue { border-left-color: #2563eb; }
.planning-detail-row.priority-gray { border-left-color: #64748b; }
.planning-detail-row span { color: var(--muted); }
.priority-row td:first-child { border-left: 8px solid transparent; }
.order-row-actions { min-width: 430px; display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-start; }
.order-row-actions button { min-height: 38px; border-radius: 999px; padding: 0 11px; }
.order-summary { border: 2px solid #dbe5ee; border-left: 12px solid #2563eb; border-radius: 12px; padding: 14px; background: #f8fbff; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-summary.priority-red { border-left-color: #dc2626; background: #fff5f5; }
.order-summary.priority-amber { border-left-color: #d97706; background: #fffbeb; }
.order-summary.priority-blue { border-left-color: #2563eb; }
.order-summary.priority-gray { border-left-color: #64748b; }
.order-summary div { display: flex; flex-wrap: wrap; gap: 8px; }
.order-summary strong { font-size: 28px; }
.order-modal .modal-body { background: #f6f9fc; }
.order-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); gap: 16px; align-items: stretch; border: 2px solid #dbeafe; border-left: 14px solid #2563eb; border-radius: 16px; background: #f8fbff; padding: 16px; box-shadow: 0 8px 22px rgba(21, 33, 42, .08); }
.order-hero.priority-red { border-left-color: #dc2626; background: #fff5f5; }
.order-hero.priority-amber { border-left-color: #d97706; background: #fffbeb; }
.order-hero.priority-blue { border-left-color: #2563eb; }
.order-hero.priority-gray { border-left-color: #64748b; background: #f8fafc; }
.order-hero-main { display: grid; align-content: center; gap: 7px; }
.order-hero-main h3 { margin: 0; font-size: 38px; line-height: 1; }
.order-hero-main p { margin: 0; color: #43515a; font-size: 18px; }
.order-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.order-hero-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.order-hero-kpis article { min-height: 96px; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 11px; display: grid; align-content: space-between; }
.order-hero-kpis span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.order-hero-kpis strong { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.order-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 16px; align-items: start; }
.order-edit-card { border-left: 10px solid #0f8b8d; background: white; }
.order-edit-card .form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-confirmation-note { border: 1px solid #b6e4df; border-radius: 10px; background: #f0fdfa; padding: 10px 12px; color: #0f5f61; font-weight: 850; }
.order-action-panel { position: sticky; top: 12px; border: 2px solid #bfdbfe; border-radius: 14px; background: white; padding: 12px; display: grid; gap: 9px; box-shadow: 0 8px 20px rgba(21,33,42,.08); }
.order-action-panel button { width: 100%; justify-content: center; }
.order-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.order-info-card { border: 2px solid var(--line); border-radius: 14px; background: white; padding: 14px; display: grid; gap: 12px; box-shadow: 0 8px 18px rgba(21,33,42,.05); }
.order-info-card > div:first-child { min-height: 68px; border-bottom: 1px solid var(--line); padding-bottom: 10px; display: grid; align-content: center; }
.order-info-card > div:first-child span { color: var(--muted); font-size: 13px; font-weight: 950; text-transform: uppercase; }
.order-info-card h3 { margin: 0; font-size: 23px; line-height: 1.2; overflow-wrap: anywhere; }
.order-info-card dl { margin: 0; display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 8px 12px; }
.order-info-card dt { color: var(--muted); font-size: 13px; font-weight: 950; text-transform: uppercase; }
.order-info-card dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.order-inspection-card { border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; padding: 14px; display: grid; gap: 12px; }
.order-inspection-grid { display: grid; grid-template-columns: repeat(4, minmax(124px, 1fr)); gap: 12px; }
.order-inspection-grid .field.full { grid-column: 1 / -1; }
.order-inspection-card .panel-head { margin-bottom: 0; }
.order-inspection-card .panel-head p { max-width: none; }
.order-inspection-grid .field { min-height: 88px; padding: 10px 10px 12px; border-radius: 14px; justify-content: start; align-content: start; gap: 8px; box-shadow: 0 4px 12px rgba(21,33,42,.05); }
.order-inspection-grid .field:nth-child(8n + 1) { background: #eff6ff; border-color: #bfdbfe; }
.order-inspection-grid .field:nth-child(8n + 2) { background: #f5f3ff; border-color: #ddd6fe; }
.order-inspection-grid .field:nth-child(8n + 3) { background: #ecfeff; border-color: #bae6fd; }
.order-inspection-grid .field:nth-child(8n + 4) { background: #fff7ed; border-color: #fed7aa; }
.order-inspection-grid .field:nth-child(8n + 5) { background: #f0fdf4; border-color: #bbf7d0; }
.order-inspection-grid .field:nth-child(8n + 6) { background: #fefce8; border-color: #fde68a; }
.order-inspection-grid .field:nth-child(8n + 7) { background: #fff1f2; border-color: #fecdd3; }
.order-inspection-grid .field:nth-child(8n + 8) { background: #f8fafc; border-color: #cbd5e1; }
.order-inspection-grid .field span { font-size: 11px; line-height: 1.12; letter-spacing: .02em; min-height: 24px; overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
.order-inspection-grid .field select,
.order-inspection-grid .field input,
.order-inspection-grid .field textarea { min-height: 40px; font-size: 13px; line-height: 1.2; }
.order-inspection-grid .field textarea { min-height: 40px; max-height: 40px; resize: none; }
.client-card { border-left: 10px solid #d63384; }
.vehicle-card { border-left: 10px solid #8a4fff; }
.parts-card { border-left: 10px solid #16a34a; }
.sms-card { border-left: 10px solid #2563eb; }
.order-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.order-chip-list span { min-height: 32px; display: inline-flex; align-items: center; border-radius: 999px; padding: 0 10px; background: #edf7ed; color: #166534; font-weight: 900; }
.order-sms-list { display: grid; gap: 10px; }
.order-sms-list .timeline { margin-bottom: 0; }
.wide-detail { grid-template-columns: 120px 1fr; }
.cash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.pos-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr); gap: 18px; border: 2px solid #bbf7d0; border-left: 12px solid #16a34a; border-radius: 14px; background: #f0fdf4; padding: 18px; box-shadow: 0 8px 22px rgba(21,33,42,.06); }
.pos-hero h2 { margin-bottom: 6px; font-size: 30px; }
.pos-hero p:last-child { margin-bottom: 0; color: #14532d; font-size: 18px; }
.pos-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pos-kpis .metric { min-height: 96px; padding: 12px; border-top: 8px solid #16a34a; }
.pos-metric { width: 100%; text-align: left; cursor: pointer; }
.pos-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.cashier-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.scan-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 14px; }
.scan-box input { min-height: 58px; border: 3px solid #86efac; border-radius: 12px; background: white; padding: 0 15px; font-size: 22px; font-weight: 900; outline: 0; }
.scan-box input:focus { border-color: #16a34a; box-shadow: 0 0 0 5px #dcfce7; }
.manual-sale-box { border: 1px solid var(--line); border-left: 8px solid #0f8b8d; border-radius: 12px; background: #f0fdfa; padding: 12px; margin-bottom: 14px; }
.manual-sale-form { grid-template-columns: minmax(220px, 1fr) minmax(120px, .35fr) minmax(110px, .25fr) auto; align-items: end; }
.manual-sale-form .primary-button { min-height: 48px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.product { min-height: 120px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; align-content: space-between; gap: 8px; text-align: left; }
.pos-products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pos-product { border-width: 2px; border-left: 9px solid #16a34a; }
.pos-product strong { font-size: 18px; }
.pos-product small { color: var(--muted); font-weight: 900; }
.detail-tile { min-height: 166px; }
.tile-main { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--ink) !important; display: grid !important; gap: 7px; text-align: left; justify-content: stretch !important; }
.tile-main:hover strong { color: var(--accent); }
.tile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile-actions button { min-height: 38px; border-radius: 9px; padding: 0 10px; }
.cart-panel { position: sticky; top: 18px; border-left: 10px solid #16a34a; }
.cart-list { display: grid; gap: 10px; }
.cart-item { border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.cart-item span { display: block; color: var(--muted); font-size: 13px; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { min-height: 36px; width: 36px; padding: 0; border-radius: 999px; }
.cart-total { margin: 14px 0; border-top: 2px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.cart-total span { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: 13px; }
.cart-total strong { font-size: 30px; color: #166534; }
.quick-checkout-form { border: 1px solid #bbf7d0; border-left: 8px solid #16a34a; border-radius: 10px; background: #f0fdf4; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.quick-checkout-form .field { min-height: 54px; background: white; }
.quick-checkout-form .field:nth-child(3), .quick-checkout-form .field:nth-child(4), .quick-checkout-form .field:nth-child(5), .quick-checkout-form .field:nth-child(6) { grid-column: 1 / -1; }
.payment-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #bbf7d0; border-left: 12px solid #16a34a; border-radius: 14px; background: #f0fdf4; padding: 16px; }
.payment-hero.small { grid-template-columns: 1fr; }
.payment-hero h3 { margin: 4px 0; font-size: 36px; color: #166534; }
.payment-hero p { margin-bottom: 0; color: #14532d; }
.payment-hero > strong { color: #166534; font-size: 18px; }
.auto-reference-card { border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 12px; display: grid; gap: 4px; }
.auto-reference-card.full { grid-column: 1 / -1; }
.auto-reference-card.compact { padding: 10px 12px; border-left-width: 8px; border-radius: 10px; }
.auto-reference-card strong { color: #1d4ed8; font-size: 16px; }
.auto-reference-card span { color: var(--ink); font-weight: 900; overflow-wrap: anywhere; }
.stock-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr); gap: 18px; border: 2px solid #fed7aa; border-left: 12px solid #f97316; border-radius: 14px; background: #fff7ed; padding: 18px; box-shadow: 0 8px 22px rgba(21,33,42,.06); }
.stock-hero h2 { margin-bottom: 6px; font-size: 30px; }
.stock-hero p:last-child { margin-bottom: 0; color: #7c2d12; font-size: 18px; }
.stock-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stock-kpis .metric { min-height: 96px; padding: 12px; border-top: 8px solid #f97316; }
.stock-metric { width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.stock-metric.blue { border-top-color: #2563eb; }
.stock-metric.green { border-top-color: #16a34a; }
.stock-metric.amber { border-top-color: #d97706; }
.stock-metric.red { border-top-color: #dc2626; }
.stock-metric small { color: var(--muted); font-weight: 900; }
.stock-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.parts-order-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr); gap: 14px; align-items: center; border: 2px solid #fed7aa; border-left: 12px solid #ea580c; border-radius: 14px; background: #fff7ed; padding: 16px; }
.parts-order-hero h2 { margin-bottom: 5px; font-size: 30px; }
.parts-order-hero p:last-child { margin-bottom: 0; color: #43515a; }
.parts-order-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.parts-order-metric { min-height: 82px; border: 1px solid var(--line); border-top: 8px solid #ea580c; border-radius: 10px; background: white; padding: 10px; display: grid; gap: 4px; align-content: space-between; text-align: left; color: var(--ink); }
button.parts-order-metric { width: 100%; cursor: pointer; }
button.parts-order-metric:hover, button.parts-order-metric:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); outline: none; }
.parts-order-metric.red { border-top-color: #dc2626; }
.parts-order-metric.green { border-top-color: #16a34a; }
.parts-order-metric.blue { border-top-color: #2563eb; }
.parts-order-metric.amber { border-top-color: #d97706; }
.parts-order-metric span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.parts-order-metric strong { font-size: 25px; line-height: 1; }
.parts-order-metric small { color: var(--muted); font-weight: 850; }
.parts-order-store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.parts-order-store-card { border: 1px solid #fed7aa; border-left: 8px solid #ea580c; border-radius: 10px; background: #fffaf5; padding: 11px; display: grid; gap: 10px; min-width: 0; cursor: pointer; color: var(--ink); text-align: left; transition: .18s; }
.parts-order-store-card:hover, .parts-order-store-card:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); outline: none; }
.parts-order-store-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid #fed7aa; padding-bottom: 6px; }
.parts-order-store-card header strong { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; font-size: 17px; }
.parts-order-store-card header span { border-radius: 999px; padding: 3px 8px; background: #ffedd5; color: #c2410c; font-weight: 950; }
.parts-store-open { color: #c2410c; font-weight: 950; }
.parts-store-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.parts-store-cell { min-width: 0; border: 1px solid #fed7aa; border-radius: 8px; background: white; padding: 8px; display: grid; gap: 3px; color: #7c2d12; }
.parts-store-cell small { color: #7c2d12; font-size: 11px; font-weight: 950; line-height: 1.15; text-transform: uppercase; }
.parts-store-cell b { color: var(--ink); font-size: 23px; line-height: 1; }
.parts-store-cell.urgent { border-color: #fecaca; background: #fff5f5; color: #991b1b; }
.parts-store-cell.urgent small { color: #991b1b; }
.parts-store-cell.warning { border-color: #fed7aa; background: #fff7ed; }
.parts-store-cell.calm { border-color: #dbe5ee; background: #f8fbff; color: #43515a; }
.parts-store-cell.calm small { color: #43515a; }
.parts-delivery-panel { border-left: 10px solid #2563eb; }
.parts-delivery-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.parts-delivery-city-row { display: flex; flex-wrap: wrap; gap: 8px; }
.parts-delivery-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.delivery-mini { border: 1px solid #bfdbfe; border-left: 8px solid #2563eb; border-radius: 10px; background: #f8fbff; padding: 10px; display: grid; gap: 5px; min-width: 0; }
.delivery-mini strong { color: #1d4ed8; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.delivery-mini span { color: var(--ink); font-weight: 900; overflow-wrap: anywhere; }
.delivery-mini small { color: #43515a; font-weight: 850; line-height: 1.25; overflow-wrap: anywhere; }
.parts-purchase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.parts-purchase-card { border: 1px solid #dbe5ee; border-left: 8px solid #16a34a; border-radius: 10px; background: white; padding: 11px; display: grid; gap: 10px; min-width: 0; box-shadow: 0 5px 14px rgba(21,33,42,.05); }
.parts-purchase-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e5edf3; padding-bottom: 8px; }
.parts-purchase-card > header div { display: grid; gap: 2px; min-width: 0; }
.parts-purchase-card > header strong { font-size: 18px; line-height: 1.1; }
.parts-purchase-card > header span { color: var(--muted); font-weight: 850; }
.parts-purchase-list { display: grid; gap: 8px; }
.parts-purchase-line { border: 1px solid #e1e9f0; border-radius: 8px; background: #fbfdff; padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.parts-purchase-line.urgent { border-color: #fecaca; background: #fff5f5; }
.parts-purchase-line.missing { border-color: #fed7aa; background: #fff7ed; }
.parts-purchase-line.stock { border-color: #bbf7d0; background: #f0fdf4; }
.parts-purchase-line strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.parts-purchase-line small { color: #43515a; font-weight: 850; overflow-wrap: anywhere; }
.delivery-table-button { width: 100%; height: auto; min-height: 48px; border-color: #bfdbfe; background: #f8fbff; display: grid; gap: 2px; text-align: left; align-content: center; }
.delivery-table-button strong { color: #1d4ed8; }
.delivery-table-button small { color: #43515a; font-weight: 850; line-height: 1.2; white-space: normal; word-break: normal; overflow-wrap: break-word; hyphens: none; }
.delivery-preview-card { border: 1px solid #bfdbfe; border-left: 8px solid #2563eb; border-radius: 10px; background: #f8fbff; padding: 12px; display: grid; gap: 6px; }
.delivery-preview-card span { color: var(--ink); font-weight: 850; line-height: 1.35; }
.parts-order-table table { min-width: 1580px; table-layout: fixed; }
.parts-order-table th:nth-child(1), .parts-order-table td:nth-child(1) { width: 120px; }
.parts-order-table th:nth-child(2), .parts-order-table td:nth-child(2) { width: 145px; }
.parts-order-table th:nth-child(3), .parts-order-table td:nth-child(3) { width: 230px; }
.parts-order-table th:nth-child(4), .parts-order-table td:nth-child(4) { width: 210px; }
.parts-order-table th:nth-child(5), .parts-order-table td:nth-child(5) { width: 200px; }
.parts-order-table th:nth-child(6), .parts-order-table td:nth-child(6) { width: 310px; }
.parts-order-table th:nth-child(7), .parts-order-table td:nth-child(7) { width: 160px; }
.parts-order-table th:nth-child(8), .parts-order-table td:nth-child(8) { width: 130px; }
.parts-order-table th:nth-child(9), .parts-order-table td:nth-child(9) { width: 275px; }
.parts-order-table td { vertical-align: middle; }
.parts-order-table .delivery-table-button { min-width: 0; padding: 8px 10px; }
.parts-order-table .order-row-actions { min-width: 0; flex-wrap: nowrap; }
.parts-order-table .order-row-actions button { white-space: nowrap; }
.parts-store-detail-modal .modal-body { background: #f6f9fc; }
.parts-store-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); gap: 12px; border: 1px solid #fed7aa; border-left: 10px solid #ea580c; border-radius: 10px; background: #fff7ed; padding: 12px; align-items: center; }
.parts-store-detail-hero h3 { margin: 0 0 4px; font-size: 26px; }
.parts-store-detail-hero p:last-child { margin: 0; color: #7c2d12; font-weight: 850; }
.parts-store-detail-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.parts-store-detail-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 12px; align-items: start; }
.parts-store-detail-grid .panel:nth-child(3) { grid-column: 1 / -1; }
.parts-store-detail-list { display: grid; gap: 8px; }
.parts-store-detail-line { border: 1px solid #e1e9f0; border-left: 7px solid #ea580c; border-radius: 9px; background: white; padding: 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.parts-store-detail-line.ok { border-left-color: #16a34a; background: #f8fff9; }
.parts-store-detail-line.low, .parts-store-detail-line.stock-empty { border-left-color: #dc2626; background: #fffafa; }
.parts-store-detail-line.stock-low { border-left-color: #ea580c; background: #fffaf5; }
.parts-store-detail-line strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.parts-store-detail-line span, .parts-store-detail-line small { display: block; color: #43515a; font-weight: 850; overflow-wrap: anywhere; }
.parts-order-detail-hero.red { border-left-color: #dc2626; background: #fff5f5; border-color: #fecaca; }
.parts-order-detail-hero.green { border-left-color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.parts-order-detail-hero.blue { border-left-color: #2563eb; background: #f8fbff; border-color: #bfdbfe; }
.parts-order-detail-list { display: grid; gap: 12px; }
.parts-order-detail-store { border: 1px solid #dbe5ee; border-left: 8px solid #ea580c; border-radius: 10px; background: white; padding: 11px; display: grid; gap: 10px; }
.parts-order-detail-store > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #e5edf3; padding-bottom: 8px; }
.parts-order-detail-store > header div { display: grid; gap: 2px; min-width: 0; }
.parts-order-detail-store > header strong { font-size: 18px; }
.parts-order-detail-store > header span { color: var(--muted); font-weight: 850; }
.parts-order-panel { border-left: 10px solid #ea580c; }
.parts-order-row.low td:first-child { border-left: 8px solid #ea580c; }
.parts-order-row.ok td:first-child { border-left: 8px solid #16a34a; }
.stock-order-panel { border-left-color: #16a34a; }
.stock-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.stock-side { display: grid; gap: 18px; }
.stock-row td:first-child { border-left: 8px solid transparent; }
.stock-row.stock-empty td:first-child, .stock-row.stock-low td:first-child { border-left-color: #dc2626; }
.stock-row.stock-over td:first-child { border-left-color: #7c3aed; }
.stock-row.stock-ok td:first-child { border-left-color: #16a34a; }
.location-chip { display: inline-flex; align-items: center; min-height: 30px; border-radius: 8px; background: #eef6ff; color: #075985; padding: 0 10px; font-weight: 900; }
.stock-alert-list, .stock-movement-list { display: grid; gap: 10px; }
.stock-alert-list article, .stock-alert-card, .stock-movement-list article { border: 1px solid var(--line); border-left: 7px solid #f97316; border-radius: 10px; background: white; padding: 11px; display: grid; gap: 4px; text-align: left; color: var(--ink); }
.stock-alert-card { width: 100%; cursor: pointer; gap: 10px; align-content: start; min-width: 0; min-height: 112px; overflow: hidden; }
.stock-alert-card.stock-alert-empty { border-left-color: #dc2626; background: #fffafa; }
.stock-alert-card.stock-alert-low { border-left-color: #ea580c; background: #fffaf5; }
.stock-alert-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-width: 0; }
.stock-alert-top strong { min-width: 0; color: var(--ink); font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.stock-alert-top em { flex: 0 0 auto; border-radius: 999px; background: #ffedd5; color: #c2410c; padding: 4px 8px; font-size: 11px; font-style: normal; font-weight: 950; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.stock-alert-empty .stock-alert-top em { background: #fee2e2; color: #991b1b; }
.stock-alert-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stock-alert-metrics > span { min-width: 0; border: 1px solid #dbe5ee; border-radius: 8px; background: #fbfdff; padding: 8px; display: grid; gap: 2px; color: var(--ink); }
.stock-alert-metrics small { color: var(--muted); font-size: 11px; font-weight: 950; line-height: 1; text-transform: uppercase; }
.stock-alert-metrics strong { color: var(--ink); font-size: 22px; line-height: 1; }
.stock-alert-metrics b { color: #43515a; font-size: 12px; font-weight: 850; line-height: 1.2; overflow-wrap: anywhere; }
.stock-alert-meta { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.stock-alert-meta small { border-radius: 999px; background: #eef6ff; color: #075985; padding: 4px 7px; font-weight: 850; line-height: 1; overflow-wrap: anywhere; }
.stock-alert-card:hover { box-shadow: 0 8px 18px rgba(21,33,42,.10); transform: translateY(-1px); }
.stock-alert-list > article span, .stock-alert-list > article small, .stock-movement-list span, .stock-movement-list small { color: var(--muted); }
.stock-detail-modal .modal-body { background: #f6f9fc; }
.stock-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 14px; background: #f8fbff; padding: 16px; }
.stock-detail-hero.green { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; }
.stock-detail-hero.amber { border-color: #fed7aa; border-left-color: #d97706; background: #fff7ed; }
.stock-detail-hero.red { border-color: #fecaca; border-left-color: #dc2626; background: #fff5f5; }
.stock-detail-hero h3 { margin-bottom: 6px; font-size: 30px; }
.stock-detail-hero p:last-child { margin-bottom: 0; color: #43515a; }
.stock-detail-hero > strong { font-size: 42px; color: #172026; }
.stock-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 12px; }
.stock-detail-card { border: 2px solid var(--line); border-left: 10px solid #16a34a; border-radius: 12px; background: white; color: var(--ink); padding: 13px; display: grid; gap: 10px; text-align: left; cursor: pointer; }
.stock-detail-card.stock-low, .stock-detail-card.stock-empty { border-left-color: #dc2626; background: #fffafa; }
.stock-detail-card.stock-over { border-left-color: #7c3aed; }
.stock-detail-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.stock-detail-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.stock-detail-card h3 { margin: 0; font-size: 21px; }
.stock-detail-card p { margin: 0; color: #43515a; font-weight: 850; overflow-wrap: anywhere; }
.stock-detail-card small { color: var(--muted); font-weight: 900; }
.barcode-svg { width: 100%; max-width: 210px; height: 76px; fill: #111827; background: white; }
.barcode-svg text { fill: #111827; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; }
.barcode-mini { width: 132px; padding: 5px; border: 1px solid #e2eaf1; border-radius: 8px; background: white; display: grid; place-items: center; }
.barcode-mini .barcode-svg { height: 48px; }
.barcode-mini .barcode-svg text { font-size: 10px; }
.part-detail-modal .modal-body { background: #f6f9fc; }
.part-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .55fr); gap: 16px; align-items: stretch; border: 2px solid #bbf7d0; border-left: 12px solid #16a34a; border-radius: 14px; background: #f0fdf4; padding: 16px; }
.part-detail-hero.stock-low, .part-detail-hero.stock-empty { border-color: #fecaca; border-left-color: #dc2626; background: #fff5f5; }
.part-detail-hero.stock-over { border-color: #ddd6fe; border-left-color: #7c3aed; background: #f5f3ff; }
.part-detail-hero h3 { margin: 5px 0; font-size: 34px; line-height: 1.1; }
.part-detail-hero p { margin-bottom: 0; color: #43515a; }
.part-detail-barcode { border: 2px solid #dbe5ee; border-radius: 12px; background: white; padding: 12px; display: grid; gap: 6px; justify-items: center; align-content: center; text-align: center; }
.barcode-detail-button { width: 100%; min-height: 0; color: var(--ink); cursor: pointer; }
.barcode-detail-button:hover { border-color: #2563eb; box-shadow: 0 8px 18px rgba(21,33,42,.10); }
.part-detail-barcode .barcode-svg { max-width: 320px; height: 112px; }
.part-detail-barcode .barcode-svg text { display: none; }
.part-detail-barcode strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 20px; letter-spacing: 1px; }
.part-detail-barcode span { color: var(--muted); font-size: 13px; font-weight: 850; }
.part-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.part-kpi { border: 2px solid var(--line); border-top: 8px solid #16a34a; border-radius: 12px; background: white; padding: 12px; display: grid; gap: 6px; }
.part-kpi span { color: var(--muted); font-size: 13px; font-weight: 950; text-transform: uppercase; }
.part-kpi strong { font-size: 26px; line-height: 1; }
.part-kpi small { color: var(--muted); font-weight: 800; }
.part-detail-actions { flex-wrap: wrap; }
.barcode-preview-card { border-left: 10px solid #f97316; }
.barcode-help { border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 12px; display: grid; gap: 4px; }
.barcode-help strong { color: #1d4ed8; font-size: 18px; }
.barcode-help span { color: #43515a; font-weight: 850; }
.barcode-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.barcode-label { min-height: 142px; border: 2px dashed #dbe5ee; border-radius: 10px; background: white; padding: 12px; display: grid; gap: 4px; justify-items: center; align-content: center; text-align: center; break-inside: avoid; }
.barcode-label-button { width: 100%; color: var(--ink); cursor: pointer; }
.barcode-label-button:hover { border-style: solid; border-color: #2563eb; box-shadow: 0 8px 18px rgba(21,33,42,.10); transform: translateY(-1px); }
.barcode-label-inner { display: grid; gap: 4px; justify-items: center; align-content: center; text-align: center; }
.barcode-label strong { font-size: 16px; line-height: 1.2; }
.barcode-label span, .barcode-label small { color: var(--muted); font-size: 13px; font-weight: 850; }
.print-barcode-stage { display: none; }
.doc-card-status { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.doc-card { display: grid; gap: 12px; min-height: 260px; border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; box-shadow: 0 8px 22px rgba(21, 33, 42, .06); }
.doc-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.doc-type { display: inline-flex; min-height: 30px; align-items: center; border-radius: 999px; padding: 0 10px; background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.doc-card h2 { margin: 0; font-size: 24px; }
.doc-card p { margin-bottom: 0; }
.doc-card small { color: var(--muted); font-weight: 800; }
.cart-row, .total { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.total { grid-template-columns: 1fr auto; border: 0; margin: 12px 0; }
.total strong { font-size: 22px; }
.wide { width: 100%; }
.settings { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field, .switch { min-height: 68px; border: 1px solid var(--line); background: #f8faf9; border-radius: 8px; padding: 9px 11px; display: grid; gap: 6px; }
.field.full, .switch.full { grid-column: 1 / -1; }
.field textarea { min-height: 82px; resize: vertical; }
.switch { display: flex; align-items: center; font-weight: 800; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.parts-picker div { display: grid; gap: 10px; }
.parts-picker-selection { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.parts-picker-selection label { min-height: 42px; border-radius: 8px; background: white; border: 1px solid var(--line); padding: 8px 10px; display: flex; align-items: center; gap: 8px; font-weight: 800; }
.parts-picker input { width: 20px; height: 20px; accent-color: var(--accent); }
.parts-picker-empty { display: block; border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; padding: 10px 12px; color: #64748b; font-weight: 800; }
.parts-picker-free { min-height: 0 !important; background: #fffaf0 !important; border-color: #fed7aa !important; gap: 5px !important; }
.parts-picker-free span { color: #9a3412; }
.parts-picker-free textarea { min-height: 88px; background: white; }
.search-results { margin: -10px 0 18px; }
.search-panel { border-left: 12px solid #2563eb; background: #f8fbff; }
.search-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.search-result-card { border: 2px solid #dbeafe; border-radius: 12px; background: white; padding: 14px; display: grid; gap: 12px; }
.search-result-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.search-result-card header strong { display: block; font-size: 20px; }
.search-result-card header span, .search-result-vehicles span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.search-result-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.search-result-meta span { min-height: 28px; border-radius: 999px; padding: 0 9px; display: inline-flex; align-items: center; background: #eef6ff; color: #075985; font-weight: 900; font-size: 13px; }
.search-result-vehicles { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: #f8fbff; }
.client-search-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .6fr); gap: 16px; border: 2px solid #fbcfe8; border-left: 12px solid #d63384; border-radius: 14px; background: #fff5fb; padding: 16px; }
.client-search-band h2 { margin-bottom: 6px; font-size: 26px; }
.client-search-band p:last-child { margin-bottom: 0; color: #6b254d; }
.client-search-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.client-search-summary .metric { min-height: 92px; padding: 12px; border-top: 8px solid #d63384; }
.customer-metric { width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.customer-metric.clients { border-top-color: #d63384; background: #fffafd; }
.customer-metric.results { border-top-color: #2563eb; background: #f8fbff; }
.customer-metric small { color: var(--muted); font-weight: 900; }
.customer-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(21,33,42,.12); }
.customer-detail-modal .modal-body { background: #f6f9fc; }
.customer-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 2px solid #fbcfe8; border-left: 12px solid #d63384; border-radius: 14px; background: #fff5fb; padding: 16px; }
.customer-detail-hero.blue { border-color: #bfdbfe; border-left-color: #2563eb; background: #f8fbff; }
.customer-detail-hero h3 { margin-bottom: 6px; font-size: 30px; }
.customer-detail-hero p:last-child { margin-bottom: 0; color: #43515a; }
.customer-detail-hero > strong { font-size: 42px; color: #172026; }
.customer-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.customer-detail-card { border: 2px solid var(--line); border-left: 10px solid #d63384; border-radius: 12px; background: white; padding: 14px; display: grid; gap: 12px; box-shadow: 0 8px 22px rgba(21,33,42,.06); }
.customer-detail-card-clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.customer-detail-card-clickable:hover, .customer-detail-card-clickable:focus-visible { transform: translateY(-2px); border-color: #f9a8d4; box-shadow: 0 12px 26px rgba(21,33,42,.14); outline: 3px solid #fbcfe8; outline-offset: 2px; }
.customer-detail-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.customer-detail-card header strong { display: block; font-size: 20px; }
.customer-detail-card header span:not(.badge), .customer-detail-address, .customer-detail-vehicles span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.customer-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.customer-detail-meta span { min-height: 46px; border-radius: 10px; padding: 8px; display: grid; gap: 2px; background: #f8faf9; border: 1px solid var(--line); color: var(--muted); font-weight: 850; }
.customer-detail-meta strong { color: var(--ink); font-size: 19px; line-height: 1; }
.customer-detail-vehicles { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: #fff5fb; }
.customer-card-open { display: block; color: #be185d; font-size: 13px; font-weight: 900; }
.customer-detail-actions { padding-top: 2px; }
.customer-profile-panel { border: 2px solid #fbcfe8; border-left: 12px solid #d63384; border-radius: 14px; background: white; padding: 14px; }
.customer-profile-actions { justify-content: flex-end; flex-wrap: wrap; }
.customer-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.customer-profile-item { min-height: 64px; border: 1px solid var(--line); border-radius: 10px; background: #fffafd; padding: 10px; display: grid; gap: 4px; align-content: start; }
.customer-profile-item span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.customer-profile-item strong { color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.mini-orders { display: flex; flex-wrap: wrap; gap: 8px; min-width: 180px; }
.mini-order-card { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--line); border-left: 5px solid #2563eb; border-radius: 12px; background: #fff; padding: 6px; max-width: 100%; }
.mini-order-card.priority-red { border-left-color: #dc2626; }
.mini-order-card.priority-amber { border-left-color: #d97706; }
.mini-order-card.priority-blue { border-left-color: #2563eb; }
.mini-order-card.priority-gray { border-left-color: #64748b; }
.mini-order-open, .history-order-open { min-height: 32px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; padding: 0 10px; background: #f8fbff; }
.mini-order-action { min-height: 30px !important; border-radius: 999px !important; padding: 0 9px !important; font-size: 12px; }
.wide-modal { width: min(1180px, 100%); }
.history-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); gap: 16px; border: 2px solid #dbeafe; border-left: 12px solid #2563eb; border-radius: 14px; padding: 16px; background: #f8fbff; }
.history-hero h3 { margin: 8px 0 6px; font-size: 28px; }
.history-hero p { margin-bottom: 4px; color: var(--muted); }
.history-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.history-metrics .metric { min-height: 96px; padding: 12px; }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.history-list { display: grid; gap: 10px; }
.history-order, .history-doc, .history-item { width: 100%; border: 1px solid var(--line); border-left: 8px solid #2563eb; border-radius: 10px; padding: 11px; background: white; text-align: left; display: grid; gap: 8px; }
.history-order { grid-template-columns: minmax(170px, 1fr) auto auto auto auto auto minmax(120px, auto); align-items: center; }
.history-order-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.history-item-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.history-order.priority-red { border-left-color: #dc2626; }
.history-order.priority-amber { border-left-color: #d97706; }
.history-order.priority-blue { border-left-color: #2563eb; }
.history-order.priority-gray { border-left-color: #64748b; }
.history-order small, .history-doc span, .history-item span { display: block; color: var(--muted); font-size: 13px; }
.history-doc { grid-template-columns: 1fr auto auto; align-items: center; }
.email-hero { border-left-color: #8a4fff; }
.email-document-row { width: 100%; border: 1px solid var(--line); border-left: 8px solid #8a4fff; border-radius: 10px; padding: 11px; background: white; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.email-document-row span { display: block; color: var(--muted); font-size: 13px; }
.email-document-row.priority-red { border-left-color: #dc2626; }
.email-document-row.priority-amber { border-left-color: #d97706; }
.email-document-row.priority-blue { border-left-color: #2563eb; }
.email-document-row.priority-gray { border-left-color: #64748b; }
.warning-card { border-color: #f59e0b; border-left-color: #f59e0b; background: #fffbeb; }
.form-section { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.legal-block { white-space: pre-wrap; background: #f8faf9; border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--ink); line-height: 1.45; }
.legal-editor-card { border: 2px solid #bfdbfe; border-left: 10px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 14px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; align-items: start; }
.legal-editor-card.full { grid-column: 1 / -1; }
.legal-editor-head { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.legal-editor-head strong, .legal-editor-preview strong { display: block; color: #1d4ed8; font-size: 17px; }
.legal-editor-head span { display: block; color: var(--muted); margin-top: 3px; }
.legal-editor-field.field.full, .legal-editor-preview { grid-column: auto; }
.legal-editor-field { margin: 0; align-self: stretch; }
.legal-editor-field textarea { min-height: 320px; height: 100%; line-height: 1.45; }
.legal-editor-preview { display: grid; gap: 8px; border: 1px solid #dbeafe; border-radius: 10px; background: white; padding: 10px; min-height: 100%; align-content: start; }
.legal-editor-preview .legal-block { max-height: 240px; overflow: auto; background: #ffffff; }
.legal-editor-actions { grid-column: 1 / -1; justify-content: flex-start; }
.user-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.user-access-card { border: 1px solid #dbeafe; border-left: 8px solid #2563eb; border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; gap: 10px; }
.user-access-card strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.user-access-card span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.user-access-card .field { min-height: 64px; background: white; }
.protocol-user-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.protocol-user-card { border: 1px solid #dbeafe; border-left: 8px solid #2563eb; border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; gap: 4px; align-content: start; }
.protocol-user-card strong { overflow-wrap: anywhere; }
.protocol-user-card span { color: #1d4ed8; font-weight: 900; }
.protocol-user-card small { color: var(--muted); font-weight: 800; }
.settings-preview { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 14px; }
.document-preview { --doc-accent: var(--accent); border: 1px solid #cfd9e3; border-top: 8px solid var(--doc-accent); border-radius: 6px; background: white; color: #18242d; padding: 18px; display: grid; gap: 14px; overflow: hidden; min-height: 980px; align-content: start; box-shadow: 0 10px 28px rgba(21, 33, 42, .08); }
.document-preview-head { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; padding-bottom: 14px; border-bottom: 2px solid #e8eef5; }
.document-brand { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; min-width: 0; align-items: start; }
.document-brand-info { display: grid; gap: 2px; align-content: start; padding-top: 1px; }
.document-brand strong, .document-title-block h3 { display: block; margin: 0; font-size: 21px; line-height: 1.15; }
.document-brand span, .document-brand small, .document-title-block small { display: block; color: #53616b; overflow-wrap: anywhere; line-height: 1.25; }
.document-brand-info span { font-weight: 850; color: #22313a; }
.document-logo, .document-logo-placeholder { width: 76px; height: 76px; border-radius: 8px; flex: 0 0 auto; object-fit: contain; border: 1px solid #d9e3ec; background: #fff; }
.document-logo-placeholder { display: grid; place-items: center; background: var(--doc-accent); color: white; font-weight: 950; font-size: 24px; }
.document-title-block { min-width: 0; text-align: right; display: grid; gap: 4px; justify-items: end; border: 1px solid #dbe5ee; border-radius: 6px; padding: 10px 12px; background: #fbfdff; }
.document-title-block span { display: inline-flex; min-height: 28px; align-items: center; border-radius: 999px; padding: 0 10px; background: #eef6ff; color: var(--doc-accent); font-weight: 900; }
.document-title-block strong { font-size: 26px; color: var(--doc-accent); }
.document-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.document-preview-grid section { border: 1px solid #e2eaf1; border-radius: 8px; background: #f8fbff; padding: 12px; }
.document-preview h4 { margin: 0 0 8px; color: var(--doc-accent); text-transform: uppercase; font-size: 13px; letter-spacing: 0; }
.document-preview p { margin-bottom: 0; overflow-wrap: normal; word-break: normal; hyphens: none; }
.document-confirmation { border: 1px solid #b6e4df; border-radius: 8px; background: #f0fdfa; padding: 8px 10px; color: #0f5f61; font-weight: 850; }
.document-lines { width: 100%; min-width: 0; border: 1px solid #cfd9e3; border-collapse: collapse; table-layout: fixed; background: #fff; }
.document-lines th, .document-lines td { font-size: 13px; padding: 9px 10px; border: 1px solid #dbe5ee; vertical-align: top; }
.document-lines th { background: #edf2f7; color: #18242d; font-weight: 900; }
.document-lines td:first-child { overflow-wrap: anywhere; }
.doc-col-label { width: 58%; }
.doc-col-qty { width: 10%; }
.doc-col-price { width: 16%; }
.doc-col-total { width: 16%; }
.document-lines th:nth-child(2), .document-lines th:nth-child(3), .document-lines th:nth-child(4), .document-lines td:nth-child(2), .document-lines td:nth-child(3), .document-lines td:nth-child(4) { text-align: right; }
.document-totals { justify-self: end; width: min(330px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; border: 1px solid #dbe5ee; border-radius: 8px; padding: 12px; background: #fbfdff; }
.document-totals span { color: #53616b; }
.document-totals strong:last-child { color: var(--doc-accent); font-size: 22px; }
.document-note { border-left: 5px solid #ffd166; background: #fff8dc; padding: 7px 9px; border-radius: 7px; font-size: 12px; line-height: 1.28; }
.document-legal-summary { align-self: end; border: 1px solid #dbe5ee; border-left: 5px solid var(--doc-accent); border-radius: 8px; background: #fbfdff; padding: 9px 10px; }
.document-legal-summary h4 { margin-bottom: 6px; }
.document-legal-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.document-legal-list div { min-width: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px; align-items: start; border-bottom: 1px solid #edf2f7; padding-bottom: 3px; }
.document-legal-list dt { margin: 0; color: #53616b; font-size: 9.5px; font-weight: 950; text-transform: uppercase; letter-spacing: 0; white-space: nowrap; }
.document-legal-list dd { margin: 0; color: #18242d; font-size: 10px; line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: none; }
.document-footer { margin-top: auto; align-self: end; border-top: 1px solid #dbe5ee; padding-top: 6px; color: #43515a; text-align: center; font-size: 9.5px; line-height: 1.18; }
.document-footer-compact { max-width: 100%; margin: 0 auto; font-weight: 650; text-align: center; overflow-wrap: normal; word-break: normal; hyphens: none; }
.document-editor-modal .modal-body { background: #f6f9fc; }
.document-editor-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .9fr); gap: 14px; align-items: start; }
.document-editor-form { align-content: start; gap: 10px; }
.document-editor-card { border: 1px solid #dbe5ee; border-left: 8px solid #2563eb; border-radius: 10px; background: white; padding: 12px; display: grid; gap: 10px; }
.document-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.document-editor-text-grid { display: grid; gap: 10px; }
.document-editor-form .field, .document-editor-form .switch { min-height: 60px; background: white; }
#documentForm textarea[name="linesText"] { min-height: 136px; }
#documentForm textarea[name="notes"], #documentForm textarea[name="legalMentions"] { min-height: 92px; }
.document-lines-hidden { display: none !important; }
.document-lines-editor { display: grid; gap: 10px; }
.document-lines-editor-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.document-lines-editor-head strong { display: block; font-size: 16px; line-height: 1.15; }
.document-lines-editor-head span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 3px; }
.document-lines-editor-rows { display: grid; gap: 10px; }
.document-line-editor-row { border: 1px solid #dbe5ee; border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; gap: 10px; }
.document-line-editor-main { display: grid; grid-template-columns: minmax(0, 1fr) 112px 152px 132px; grid-template-areas: "label label label label" "qty price . remove"; gap: 10px; align-items: end; }
.document-line-editor-main .field { min-height: 0; }
.document-line-editor-main .field.full { grid-column: 1 / -1; }
.document-line-field-label { grid-area: label; }
.document-line-field-qty { grid-area: qty; }
.document-line-field-price { grid-area: price; }
.document-line-editor-main input { min-height: 48px; font-size: 15px; }
.document-line-remove { grid-area: remove; min-height: 48px; height: 48px; width: 100%; align-self: end; justify-self: stretch; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-size: 15px; line-height: 1.15; padding: 10px 12px; white-space: normal; }
.subtle-danger-button { border-color: #fecaca !important; background: #fff5f5 !important; color: #b42318 !important; }
.subtle-danger-button:hover { background: #ffe8e8 !important; }
.document-address-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.document-mode-card { min-height: 78px; border: 1px solid #dbe5ee; border-radius: 10px; background: #fbfdff; padding: 10px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.document-mode-card.active { border-color: #93c5fd; background: #f8fbff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.document-mode-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.document-mode-card strong { display: block; margin-bottom: 2px; font-size: 15px; }
.document-mode-card span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.document-address-config { display: grid; gap: 10px; }
.document-address-inline { border: 1px solid #dbe5ee; border-radius: 9px; background: #fbfdff; padding: 10px; display: grid; gap: 4px; }
.document-address-inline strong { font-size: 14px; }
.document-address-inline span { color: var(--muted); font-size: 13px; }
.document-preview-panel { position: sticky; top: 12px; display: grid; gap: 10px; align-self: start; }
.document-preview-panel .panel-head { margin-bottom: 0; }
.document-preview {
  min-height: 820px;
  padding: 16px;
  gap: 14px;
  box-shadow: 0 8px 18px rgba(21, 33, 42, .06);
  border-radius: 8px;
}
.document-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
  padding-bottom: 14px;
}
.document-brand {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  align-items: start;
}
.document-brand-info {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}
.document-brand strong,
.document-title-block h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}
.document-brand span,
.document-brand small,
.document-title-block small {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}
.document-logo,
.document-logo-placeholder {
  width: 68px;
  height: 68px;
  border-radius: 8px;
}
.document-title-block {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  padding: 11px 12px;
}
.document-title-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}
.document-store-chip {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f8ff;
  color: #3f4b53 !important;
  font-size: 11px !important;
  font-weight: 900;
}
.document-title-block strong {
  font-size: 24px;
  line-height: 1.1;
}
.document-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.document-preview-grid section {
  padding: 11px;
  border-radius: 8px;
  background: #fbfdff;
}
.document-preview h4 {
  margin: 0 0 7px;
  font-size: 12px;
}
.document-preview p {
  line-height: 1.45;
}
.document-lines th,
.document-lines td {
  font-size: 12.5px;
  padding: 8px 9px;
}
.document-totals {
  width: min(320px, 100%);
  gap: 6px 12px;
  padding: 11px;
  justify-self: end;
}
.document-totals strong:last-child {
  font-size: 20px;
}
.document-note {
  padding: 8px 9px;
  font-size: 11.5px;
  line-height: 1.45;
}
.document-legal-summary {
  padding: 10px;
}
.document-legal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
}
.document-legal-list div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}
.document-legal-list dt {
  font-size: 9px;
}
.document-legal-list dd {
  font-size: 9.5px;
  line-height: 1.3;
}
.document-footer {
  font-size: 9px;
}
.document-library-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid #bae6fd; border-left: 8px solid #0891b2; border-radius: 10px; background: #f0fbff; padding: 11px 13px; }
.document-library-hero h2 { margin-bottom: 3px; font-size: 22px; }
.document-library-hero p:last-child { margin-bottom: 0; color: #43515a; }
.document-library-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.document-library-summary span, .document-library-summary button { min-height: 36px; border: 1px solid #bae6fd; border-radius: 9px; padding: 6px 9px; background: white; color: #43515a; font-size: 13px; font-weight: 850; }
.document-library-summary button { cursor: pointer; text-align: left; box-shadow: 0 4px 10px rgba(14,116,144,.08); }
.document-library-summary button:hover { border-color: #0891b2; background: #ecfeff; transform: translateY(-1px); }
.document-library-summary strong { color: #0e7490; font-size: 17px; }
.document-summary-modal { --summary-accent: #2563eb; --summary-soft: #eff6ff; }
.document-summary-modal.document-summary-cyan { --summary-accent: #0891b2; --summary-soft: #ecfeff; }
.document-summary-modal.document-summary-blue { --summary-accent: #2563eb; --summary-soft: #eff6ff; }
.document-summary-modal.document-summary-green { --summary-accent: #16a34a; --summary-soft: #f0fdf4; }
.document-summary-modal.document-summary-purple { --summary-accent: #7c3aed; --summary-soft: #f5f3ff; }
.document-summary-modal.document-summary-amber { --summary-accent: #d97706; --summary-soft: #fff7ed; }
.document-summary-modal.document-summary-gray { --summary-accent: #64748b; --summary-soft: #f8fafc; }
.document-summary-modal.document-summary-pink { --summary-accent: #d63384; --summary-soft: #fff5fb; }
.document-summary-modal header { border-left: 12px solid var(--summary-accent); background: linear-gradient(90deg, var(--summary-soft), #fff); }
.document-summary-modal .modal-body { background: #f6f9fc; display: grid; gap: 10px; }
.document-summary-modal header > strong { min-width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; background: var(--summary-soft); color: var(--summary-accent); border: 1px solid color-mix(in srgb, var(--summary-accent) 32%, white); font-size: 28px; }
.document-summary-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.document-summary-tab { min-height: 46px !important; border: 1px solid #dbe5ee; border-radius: 9px !important; background: white; padding: 7px 9px !important; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; justify-content: stretch !important; color: var(--ink); text-align: left; cursor: pointer; }
.document-summary-tab span { color: #43515a; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.document-summary-tab strong { min-width: 34px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: #eef6ff; color: #2563eb; font-size: 16px; }
.document-summary-tab.cyan strong { background: #ecfeff; color: #0891b2; }
.document-summary-tab.green strong { background: #f0fdf4; color: #16a34a; }
.document-summary-tab.active, .document-summary-tab:hover { border-color: var(--summary-accent); background: var(--summary-soft); transform: translateY(-1px); }
.document-summary-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.document-summary-category { min-height: 74px !important; border: 1px solid var(--line); border-left: 8px solid #0891b2; border-radius: 9px !important; background: white; padding: 9px !important; display: grid !important; grid-template-columns: 42px minmax(0, 1fr); gap: 9px; align-items: center; text-align: left; color: var(--ink); cursor: pointer; box-shadow: 0 5px 12px rgba(21,33,42,.05); }
.document-summary-category:hover { background: #f8fbff; transform: translateY(-1px); }
.document-summary-category em { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #ecfeff; color: #0891b2; font-style: normal; font-size: 18px; font-weight: 950; }
.document-summary-category strong { display: block; font-size: 15px; line-height: 1.1; }
.document-summary-category span { display: block; color: var(--muted); font-size: 11px; font-weight: 850; margin-top: 2px; }
.document-summary-category.library-green em { background: #f0fdf4; color: #16a34a; }
.document-summary-category.library-purple em { background: #f5f3ff; color: #7c3aed; }
.document-summary-category.library-blue em { background: #eff6ff; color: #2563eb; }
.document-summary-category.library-amber em { background: #fff7ed; color: #d97706; }
.document-summary-category.library-gray em { background: #f8fafc; color: #64748b; }
.document-summary-category.library-pink em { background: #fff5fb; color: #d63384; }
.document-summary-list-card { border: 1px solid #dbe5ee; border-radius: 10px; background: white; padding: 8px; display: grid; gap: 5px; box-shadow: 0 6px 16px rgba(21,33,42,.05); }
.document-summary-modal .library-row { min-height: 42px; padding: 6px 7px; background: #fbfdff; }
.document-summary-modal .library-row strong { font-size: 12.5px; }
.document-summary-modal .library-row span { font-size: 10.5px; }
.document-summary-modal .library-actions button { min-height: 27px; padding: 0 6px; font-size: 11px; border-radius: 7px; }
.document-category-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.document-category-card { border: 1px solid var(--line); border-left: 8px solid #0891b2; border-radius: 10px; background: white; padding: 10px; display: grid; gap: 8px; box-shadow: 0 5px 14px rgba(21,33,42,.05); }
.document-category-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.document-category-card header span, .document-category-card header small { display: block; color: var(--muted); font-size: 12px; font-weight: 850; }
.document-category-card header strong { display: block; font-size: 17px; line-height: 1.1; }
.document-category-card header button { min-height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.library-green { border-left-color: #16a34a; }
.library-purple { border-left-color: #7c3aed; }
.library-blue { border-left-color: #2563eb; }
.library-amber { border-left-color: #d97706; }
.library-gray { border-left-color: #64748b; }
.library-pink { border-left-color: #d63384; }
.library-head { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(170px, 1.2fr) minmax(150px, 1fr) 105px 136px; gap: 8px; padding: 0 8px 3px; color: var(--muted); font-size: 11px; font-weight: 950; text-transform: uppercase; }
.library-list { display: grid; gap: 5px; }
.library-row { border: 1px solid #e1e9f0; border-radius: 8px; background: #fbfdff; padding: 7px 8px; display: grid; grid-template-columns: minmax(115px, .8fr) minmax(170px, 1.2fr) minmax(150px, 1fr) 105px 136px; gap: 8px; align-items: center; min-height: 48px; }
.library-row strong, .library-row span { display: block; }
.library-row strong { font-size: 13px; line-height: 1.15; }
.library-row span { color: var(--muted); font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
.library-id strong { color: #172026; }
.library-id span { font-weight: 900; color: #0e7490; }
.library-amount { text-align: right; }
.library-actions { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; }
.library-actions button { min-height: 30px; padding: 0 7px; border-radius: 7px; font-size: 12px; }
.archive-panel { border-left: 12px solid #0877c9; background: #f8fbff; }
.archive-list { display: grid; gap: 10px; }
.archive-list article { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 11px; display: grid; gap: 4px; }
.archive-list span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sms-status-card { grid-column: 1 / -1; border: 2px solid #bfdbfe; border-left: 10px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 12px; display: grid; gap: 4px; }
.sms-status-card strong { color: #1d4ed8; font-size: 17px; }
.sms-status-card span { color: var(--muted); overflow-wrap: anywhere; }
.ok-text { color: var(--ok); }
.ovh-config-card { border-color: #bbf7d0; border-left-color: #16a34a; background: #f7fff9; }
.ovh-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.ovh-status-item { border: 1px solid #d7eadc; border-radius: 10px; background: #fff; padding: 9px 10px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ovh-status-item span { color: var(--text); font-weight: 700; }
.ovh-status-item strong { font-size: 14px; }
.ovh-validation-link { width: fit-content; border: 2px solid #16a34a; border-radius: 10px; background: #fff; color: #166534; padding: 9px 12px; font-weight: 900; text-decoration: none; }
.confirm-modal { width: min(760px, 100%); }
.delete-warning { border: 2px solid #fecaca; border-left: 12px solid var(--danger); border-radius: 12px; background: #fff5f5; padding: 14px; }
.delete-warning h3 { margin-bottom: 6px; color: var(--danger); }
.delete-warning p:last-child { margin-bottom: 0; }
.planning-create-note { border: 2px solid #bfdbfe; border-left: 12px solid #2563eb; border-radius: 12px; background: #f8fbff; padding: 13px; display: grid; gap: 4px; }
.planning-create-note strong { color: #1d4ed8; font-size: 18px; }
.planning-create-note span { color: #43515a; font-weight: 850; }
.panel.flat { box-shadow: none; background: #fbfdfc; }
.assist-strip { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; border: 2px solid #ffd166; border-left: 12px solid #ffb703; border-radius: 14px; background: #fff8dc; padding: 14px 16px; color: #2b2b1f; }
.assist-strip strong { font-size: 18px; }
.assist-strip span { font-size: 17px; }
.field, .switch, input, select, textarea { font-size: 17px; }
.field, .switch { border-width: 2px; border-radius: 12px; background: #f8fbff; }
.badge { background: #e0f2fe; color: #075985; }
.stock.ok { background: #d9f99d; color: #3f6212; }
.stock.low { background: #ffe4e6; color: #be123c; }
.stock.warn { background: #ffedd5; color: #9a3412; }
.guard-fee-note { border: 1px solid #fde68a; border-left: 8px solid #f59e0b; border-radius: 10px; background: #fffbeb; padding: 10px; color: #92400e; font-weight: 850; line-height: 1.35; }
.pickup-validation-card { grid-column: 1 / -1; border: 1px solid #fde68a; border-left: 8px solid #f59e0b; border-radius: 10px; background: #fffbeb; padding: 10px; display: grid; gap: 9px; }
.pickup-validation-card.locked { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; }
.pickup-validation-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pickup-validation-head span, .pickup-validation-head small { display: block; color: var(--muted); font-weight: 850; }
.pickup-validation-head strong { display: block; color: var(--ink); font-size: 16px; }
.pickup-validation-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pickup-validation-card .field { min-height: 54px; background: white; }
.pickup-validation-card.locked .field { background: #f8fffa; }
.pickup-validation-card select:disabled, .pickup-validation-card input:disabled { color: #172026; opacity: 1; cursor: not-allowed; }
.pickup-ok-button { min-width: 58px; }
.metric:nth-child(1) { border-top: 8px solid #185adb; }
.metric:nth-child(2) { border-top: 8px solid #16a34a; }
.metric:nth-child(3) { border-top: 8px solid #f59e0b; }
.metric:nth-child(4) { border-top: 8px solid #d63384; }
.metric:nth-child(5) { border-top: 8px solid #8a4fff; }
.timeline { border-left: 4px solid var(--accent); border-radius: 8px; background: white; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px; margin-bottom: 10px; }
.timeline p { color: var(--muted); margin-bottom: 0; }
.empty { min-height: 150px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; text-align: center; color: var(--muted); background: #f8faf9; }
.empty.small { min-height: 80px; }
.modal-layer { position: fixed; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(23,32,38,.5); z-index: 30; }
.modal-layer.open { display: grid; }
.modal { width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 8px; background: white; box-shadow: 0 16px 42px rgba(23,32,38,.16); }
.modal.wide-modal { width: min(1180px, calc(100vw - 40px)); }
.modal.order-modal { width: min(1220px, calc(100vw - 40px)); }
.modal header, .modal footer { min-height: 64px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.modal footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal-body { padding: 18px; display: grid; gap: 16px; }
.panel.flat { box-shadow: none; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(560px, calc(100vw - 44px)); padding: 13px 15px; border-radius: 8px; background: #172026; color: white; opacity: 0; transform: translateY(16px); transition: .18s; pointer-events: none; z-index: 50; overflow-wrap: anywhere; }
.toast.show { opacity: 1; transform: translateY(0); }
body[data-density="compact"] th, body[data-density="compact"] td, body[data-density="compact"] .panel, body[data-density="compact"] .metric { padding: 9px 11px; }

/* Calibrage professionnel inspire de l'onglet Documents : plus compact, aligne et regulier. */
body { background: #f4f8fb; font-size: 15px; line-height: 1.42; }
.workspace { padding: 20px; }
.content { gap: 12px; }
.topbar { margin-bottom: 14px; gap: 12px; }
h1 { font-size: 24px; line-height: 1.15; }
h2 { font-size: 18px; line-height: 1.2; }
.eyebrow, .metric span, .field span, th, .panel-head p { font-size: 11px; }
.primary-button, .secondary-button, .icon-button, .tools button, .panel button, .modal button {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 11px;
  font-size: 14px;
}
.panel, .metric {
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  padding: 11px;
  box-shadow: 0 5px 14px rgba(21,33,42,.05);
}
.metrics, .grid2, .split, .planning-cards, .planning-tree-grid, .planning-tree-list, .planning-tree-nested, .agenda-compact-list, .history-list, .finance-detail-list, .dashboard-detail-list, .stock-alert-list, .stock-movement-list, .document-category-grid { gap: 8px; }
.metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric { min-height: 74px; gap: 5px; }
.metric strong { font-size: 22px; }
.metric small { padding: 4px 7px; font-size: 11px; }
.dashboard-metric.blue, .finance-metric.green, .finance-metric.blue, .finance-metric.amber, .finance-metric.purple, .finance-metric.gray, .planning-kpi,
.stock-kpis .metric, .client-search-summary .metric, .metric:nth-child(1), .metric:nth-child(2), .metric:nth-child(3), .metric:nth-child(4), .metric:nth-child(5) {
  border-top-width: 6px;
}
.planning-hero, .assistant-hero, .pos-hero, .stock-hero, .customer-detail-hero, .finance-detail-hero, .dashboard-detail-hero, .planning-detail-hero,
.order-hero, .history-hero, .stock-detail-hero, .part-detail-hero, .technician-detail-hero, .payment-hero, .document-library-hero {
  border-width: 1px;
  border-left-width: 8px;
  border-radius: 10px;
  padding: 11px 13px;
  gap: 12px;
  box-shadow: 0 5px 14px rgba(21,33,42,.05);
}
.planning-hero h2, .assistant-hero h2, .pos-hero h2, .stock-hero h2, .customer-detail-hero h3, .finance-detail-hero h3, .dashboard-detail-hero h3,
.planning-detail-hero h3, .stock-detail-hero h3, .part-detail-hero h3, .technician-detail-hero h3 {
  font-size: 22px;
  margin-bottom: 3px;
}
.planning-hero p:last-child, .assistant-hero p:last-child, .pos-hero p:last-child, .stock-hero p:last-child { font-size: 14px; }
.dashboard-detail-hero > strong, .finance-detail-hero > strong, .planning-detail-hero strong, .customer-detail-hero > strong, .stock-detail-hero > strong { font-size: 30px; }
.planning-kpis, .assistant-kpis, .stock-kpis, .pos-kpis, .history-metrics, .client-search-summary { gap: 8px; }
.planning-kpi {
  min-height: 58px;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(21,33,42,.07);
}
.planning-kpi strong { font-size: 21px; }
.planning-kpi span, .planning-kpi small { font-size: 12px; }
.planning-card, .planning-tree-group, .assistant-event-card, .agenda-band, .agenda-column, .agenda-order, .customer-detail-card, .customer-profile-panel,
.order-info-card, .order-action-panel, .stock-detail-card, .stock-alert-card, .search-panel, .sms-status-card, .planning-create-note,
.delete-warning, .archive-panel, .cart-panel, .manual-sale-form, .scan-box {
  border-width: 1px;
  border-left-width: 8px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 5px 14px rgba(21,33,42,.05);
}
.planning-card { gap: 8px; }
.planning-card-top strong { font-size: 17px; }
.planning-card h4, .customer-detail-card header strong, .order-info-card h3 { font-size: 17px; }
.planning-detail-grid { grid-template-columns: 86px 1fr; gap: 4px 8px; padding: 8px; }
.planning-detail-grid span, .planning-tags span, .customer-detail-card header span:not(.badge), .customer-detail-address, .customer-detail-vehicles span { font-size: 12px; }
.order-hero-main h3 { font-size: 28px; }
.order-hero-main p { font-size: 14px; }
.order-hero-kpis { gap: 8px; }
.order-hero-kpis article { min-height: 70px; border-radius: 8px; padding: 8px; }
.order-hero-kpis strong { font-size: 18px; }
.order-info-card > div:first-child { min-height: 48px; padding-bottom: 8px; }
.order-info-card dl { grid-template-columns: 120px minmax(0, 1fr); gap: 6px 10px; }
.order-info-card dt { font-size: 11px; }
.field, .switch {
  border-width: 1px;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
}
input, select, textarea { font-size: 14px; }
#search, .search-box { min-height: 38px; border-radius: 8px; font-size: 14px; }
th, td { padding: 9px 10px; font-size: 14px; }
table { min-width: 860px; }
.table, .table-wrap { border-radius: 8px; }
.pill, .badge, .stock { min-height: 24px; padding: 0 8px; font-size: 11px; }
.button-row, .chips, .tools { gap: 6px; }
.actions button { width: 30px; min-height: 30px; }
.dashboard-detail-row, .finance-detail-row, .planning-detail-row, .planning-tree-row, .history-order, .history-doc, .history-item, .email-document-row {
  border-radius: 8px;
  border-left-width: 6px;
  padding: 8px;
  gap: 8px;
}
.library-row { min-height: 44px; }
.modal { border-radius: 8px; }
.modal header, .modal footer { min-height: 54px; padding: 12px 14px; }
.modal-body { padding: 14px; gap: 12px; }
.one-line, .name-line, .customer-contact-line, .customer-name-link, .table-customer-link, .client-link, .order-table-link,
.agenda-order > span.name-line, .search-result-card header .name-line, .customer-detail-card header .name-line, .history-hero .name-line, .order-info-card .name-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.phone-line { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.contact-line { overflow: visible; white-space: normal; }
.customer-contact-line { display: inline-grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 5px; width: min(100%, 240px); }
.customer-contact-line .customer-name-link { min-width: 0; }
.customer-contact-line .tiny-email-button { width: 42px; min-width: 42px; min-height: 20px; max-height: 20px; padding: 0; font-size: 9px; border-radius: 7px; }
.assist-strip {
  grid-template-columns: 130px 1fr;
  border-width: 1px;
  border-left-width: 8px;
  border-radius: 10px;
  padding: 10px 12px;
}
.assist-strip strong, .assist-strip span { font-size: 14px; }
.empty { min-height: 92px; padding: 18px; }
.empty.small { min-height: 58px; }
@media (max-width: 1180px) { .metrics, .direction-grid, .protocol-grid, .protocol-store-grid, .protocol-user-grid, .parts-order-kpis, .parts-order-store-grid, .assistant-endpoints, .assistant-kpis, .assistant-context-grid, .assistant-context-columns, .planning-tree-grid, .agenda-compact-list { grid-template-columns: repeat(2, 1fr); } .grid2, .cash, .settings, .login-screen, .planning-hero, .assistant-hero, .assistant-layout, .history-hero, .history-grid, .stock-hero, .stock-layout, .parts-order-hero, .client-search-band, .order-hero, .order-workspace, .order-info-grid, .pos-hero, .cashier-layout, .part-detail-hero, .technician-detail-hero, .document-library-hero, .protocol-hero, .protocol-two-columns, .document-editor-layout { grid-template-columns: 1fr; } .login-protocol { grid-template-columns: repeat(2, minmax(0, 1fr)); } .protocol-hero-actions { justify-content: flex-start; max-width: none; } .document-library-summary { justify-content: flex-start; } .document-summary-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .library-head { display: none; } .library-row { grid-template-columns: minmax(110px, .8fr) minmax(150px, 1fr) minmax(130px, .9fr) 96px; } .library-actions { grid-column: 1 / -1; justify-content: flex-start; } .planning-hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .agenda-grid.medium, .agenda-grid.long { grid-template-columns: repeat(2, minmax(230px, 1fr)); } .order-action-panel, .cart-panel { position: static; } .order-action-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .order-edit-card .form, .pickup-validation-fields, .document-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .document-line-editor-main { grid-template-columns: minmax(0, 1fr) 100px 136px 120px; grid-template-areas: "label label label label" "qty price . remove"; } .document-preview-panel { position: static; } .legal-editor-card { grid-template-columns: 1fr; } .legal-editor-field.field.full, .legal-editor-preview { grid-column: 1 / -1; } .order-inspection-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); } }
@media (max-width: 860px) { body, .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .workspace { padding: 18px; } .topbar { align-items: stretch; flex-direction: column; } .topbar-actions { min-width: 0; width: 100%; } #search, .scope-select { width: 100%; } .search-box { max-width: none; } .form, .metrics, .direction-grid, .quick-checkout-form, .pickup-validation-fields, .document-preview-grid, .planning-kpis, .assistant-kpis, .assistant-endpoints, .assistant-event-grid, .assistant-context-grid, .assistant-context-columns, .planning-hero-actions, .planning-tree-grid, .planning-tree-nested, .history-metrics, .history-order, .history-doc, .email-document-row, .stock-kpis, .parts-order-kpis, .parts-order-store-grid, .parts-purchase-grid, .parts-delivery-search, .parts-store-detail-hero, .parts-store-detail-kpis, .parts-store-detail-grid, .client-search-summary, .dashboard-detail-row, .dashboard-detail-hero, .finance-detail-row, .finance-detail-hero, .planning-detail-row, .planning-detail-hero, .stock-detail-hero, .customer-detail-hero, .technician-detail-kpis, .quick-status-grid, .document-footer, .document-legal-list, .order-hero-kpis, .order-info-card dl, .order-action-panel, .order-edit-card .form, .order-inspection-grid, .pos-kpis, .scan-box, .manual-sale-form, .cart-item, .payment-hero, .agenda-grid.medium, .agenda-grid.long, .part-detail-grid, .document-library-kpis, .document-summary-tabs, .document-summary-category-grid, .protocol-grid, .protocol-store-grid, .protocol-user-grid, .protocol-steps article, .library-row, .login-brand, .login-protocol, .user-access-grid, .document-address-mode, .document-editor-grid { grid-template-columns: 1fr; } .agenda-band-head, .pickup-validation-head, .assistant-event-card header, .parts-purchase-card > header, .parts-purchase-line { flex-direction: column; align-items: stretch; } .search-result-card header, .customer-detail-card header, .document-category-card header { flex-direction: column; } .document-preview-head { flex-direction: column; } .document-title-block, .document-title-meta { text-align: left; justify-items: start; justify-content: flex-start; } .document-lines-editor-head { display: grid; } .document-line-editor-main { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "label label" "qty price" "remove remove"; } .document-line-remove { width: 100%; min-height: 46px; height: 46px; } .order-row-actions { min-width: 300px; } .order-hero-main h3 { font-size: 32px; } .login-brand h1 { font-size: 34px; } .legal-editor-card { grid-template-columns: 1fr; } .legal-editor-field.field.full, .legal-editor-preview, .legal-editor-actions { grid-column: 1 / -1; } }
@media (max-width: 620px) { .document-line-editor-main { grid-template-columns: 1fr; grid-template-areas: "label" "qty" "price" "remove"; } }
@media (max-width: 860px) { .order-inspection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 520px) { .order-inspection-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 860px) { .parts-store-summary, .stock-alert-metrics, .parts-purchase-line, .parts-store-detail-line { grid-template-columns: 1fr; } .stock-alert-top { flex-direction: column; } .stock-alert-top em { justify-self: start; } }
@media (max-width: 860px) { .planning-hero .planning-kpis, .agenda-compact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .planning-tree-row { grid-template-columns: 1fr; } }
@media (max-width: 1180px) { .accounting-hero, .accounting-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .accounting-hero, .accounting-control-grid, .accounting-readiness, .accounting-accounts { grid-template-columns: 1fr; } .accounting-actions { justify-content: flex-start; } }

/* 20260507 - Polissage visuel global */
:root {
  --surface-page: #f4f8fb;
  --surface-card: #ffffff;
  --surface-soft: #f8fbff;
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-soft: 0 6px 18px rgba(21, 33, 42, .06);
  --shadow-hover: 0 10px 24px rgba(21, 33, 42, .10);
}

body {
  background: linear-gradient(180deg, #f7fbfe 0%, var(--surface-page) 100%);
  font-size: 15px;
  line-height: 1.42;
}

.workspace {
  padding: 18px;
}

.content {
  gap: 14px;
}

.topbar {
  margin-bottom: 12px;
}

.sidebar {
  padding: 18px 16px;
  gap: 18px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

.nav {
  gap: 7px;
}

.nav button,
.nav a {
  min-height: 54px;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 16px;
}

.nav button span,
.nav a span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.shop-card,
.side-panel {
  border-radius: var(--radius-lg);
}

.shop-card strong,
.side-panel strong {
  font-size: 24px;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
  line-height: 1.18;
}

h3 {
  line-height: 1.18;
}

.eyebrow,
.metric span,
.field span,
th,
.panel-head p {
  font-size: 11px;
  line-height: 1.2;
}

.primary-button,
.secondary-button,
.icon-button,
.tools button,
.panel button,
.modal button {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
}

.primary-button {
  box-shadow: 0 4px 12px rgba(8, 119, 201, .16);
}

.search-box,
#search,
.scope-select {
  min-height: 40px;
  border-radius: 10px;
}

.panel,
.metric,
.document-editor-card,
.order-info-card,
.order-inspection-card,
.customer-detail-card,
.customer-profile-panel,
.history-order,
.history-doc,
.history-item,
.search-result-card,
.document-category-card,
.document-summary-list-card,
.stock-detail-card,
.stock-alert-card,
.parts-order-store-card,
.parts-purchase-card,
.assistant-event-card,
.planning-card,
.planning-tree-group,
.agenda-band,
.agenda-column,
.document-line-editor-row {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.panel,
.metric {
  border-width: 1px;
  padding: 12px;
}

.panel.flat {
  background: #fcfeff;
}

.metric {
  min-height: 82px;
  gap: 6px;
}

.metric strong {
  font-size: 22px;
}

.metric small,
.badge,
.pill,
.stock,
.chips span,
.store-pill,
.siren-chip {
  font-size: 11px;
}

.field,
.switch {
  min-height: 64px;
  border-width: 1px;
  border-radius: var(--radius-md);
  background: #fbfdff;
  padding: 10px 11px;
}

input,
select,
textarea {
  font-size: 14px;
}

.field textarea,
.parts-picker-free textarea,
.legal-editor-field textarea,
#documentForm textarea[name="notes"],
#documentForm textarea[name="legalMentions"] {
  line-height: 1.45;
}

.table,
.table-wrap {
  border-radius: var(--radius-lg);
}

table {
  min-width: 880px;
}

th,
td {
  padding: 10px 11px;
  font-size: 14px;
}

.empty {
  min-height: 110px;
  border-radius: var(--radius-lg);
}

.empty.small {
  min-height: 64px;
}

.modal {
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(23, 32, 38, .18);
}

.modal header,
.modal footer {
  min-height: 58px;
  padding: 14px 16px;
}

.modal-body {
  padding: 16px;
  gap: 14px;
}

.timeline,
.legal-block,
.document-preview-grid section,
.document-totals,
.document-note,
.document-legal-summary,
.document-address-inline,
.document-mode-card {
  border-radius: var(--radius-md);
}

.history-hero,
.customer-detail-hero,
.order-hero,
.planning-hero,
.assistant-hero,
.stock-hero,
.parts-order-hero,
.document-library-hero,
.finance-detail-hero,
.dashboard-detail-hero,
.planning-detail-hero,
.stock-detail-hero,
.part-detail-hero,
.technician-detail-hero,
.payment-hero {
  border-width: 1px;
  border-left-width: 8px;
  border-radius: 18px;
  padding: 14px 16px;
}

.customer-detail-grid,
.history-grid,
.order-info-grid,
.parts-store-detail-grid,
.document-editor-grid,
.document-preview-grid,
.protocol-two-columns,
.grid2,
.split {
  gap: 14px;
}

.customer-profile-grid,
.customer-detail-meta,
.assistant-kpis,
.planning-kpis,
.pos-kpis,
.history-metrics,
.client-search-summary,
.parts-order-kpis,
.parts-order-store-grid,
.parts-store-summary {
  gap: 10px;
}

.order-hero-main h3 {
  font-size: 30px;
}

.order-hero-main p,
.planning-hero p:last-child,
.assistant-hero p:last-child,
.stock-hero p:last-child,
.parts-order-hero p:last-child,
.pos-hero p:last-child {
  font-size: 14px;
}

.order-hero-kpis article,
.history-metrics .metric,
.planning-kpi,
.parts-order-metric,
.document-summary-category,
.document-summary-tab,
.direction-store-card,
.protocol-card,
.protocol-store-card,
.reference-grid span {
  border-radius: var(--radius-md);
}

.customer-detail-card header strong,
.search-result-card header strong,
.document-category-card header strong,
.history-hero h3,
.customer-detail-hero h3,
.planning-detail-hero h3,
.finance-detail-hero h3,
.dashboard-detail-hero h3 {
  font-size: 22px;
}

.customer-detail-card,
.customer-profile-panel,
.customer-profile-item,
.search-result-card,
.history-order,
.history-doc,
.history-item,
.email-document-row {
  padding: 12px;
}

.customer-profile-item,
.customer-detail-meta span {
  min-height: 72px;
  border-radius: var(--radius-md);
}

.history-order,
.history-doc,
.history-item,
.email-document-row,
.planning-detail-row,
.dashboard-detail-row,
.finance-detail-row {
  border-left-width: 6px;
  gap: 8px;
}

.document-editor-layout {
  gap: 16px;
}

.document-editor-card {
  padding: 14px;
}

.document-lines-editor-head {
  gap: 14px;
}

.document-line-editor-row {
  padding: 12px;
  overflow: visible;
}

.document-line-editor-main {
  grid-template-columns: minmax(0, 1fr) 96px 152px 120px;
  grid-template-areas:
    "label label label label"
    "qty price . remove";
  gap: 10px;
}

.document-line-editor-main > * {
  min-width: 0;
}

.document-line-field-label input {
  font-weight: 800;
}

.document-line-field-qty input,
.document-line-field-price input {
  text-align: left;
}

.document-line-remove {
  min-height: 46px;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.document-address-mode {
  gap: 10px;
}

.document-mode-card {
  min-height: 92px;
  padding: 12px;
  grid-template-columns: 22px minmax(0, 1fr);
}

.document-mode-card strong {
  font-size: 16px;
}

.document-mode-card span {
  font-size: 12.5px;
}

.document-preview {
  min-height: 860px;
  border-radius: 14px;
  padding: 18px;
}

.document-preview-head {
  gap: 18px;
}

.document-brand {
  grid-template-columns: 70px minmax(0, 1fr);
}

.document-logo,
.document-logo-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 12px;
}

.document-title-block {
  border-radius: 14px;
  padding: 12px 14px;
}

.document-title-block strong {
  font-size: 23px;
}

.document-preview-grid section {
  padding: 12px;
}

.document-lines th,
.document-lines td {
  padding: 9px 10px;
}

.document-totals {
  width: min(340px, 100%);
  padding: 12px;
}

.document-legal-list {
  gap: 6px 12px;
}

.document-legal-list div {
  grid-template-columns: 90px minmax(0, 1fr);
}

.legal-editor-card {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.legal-editor-field textarea {
  min-height: 260px;
}

.legal-editor-preview {
  min-height: 100%;
}

.legal-editor-preview .legal-block {
  max-height: none;
  min-height: 260px;
}

.order-inspection-card {
  padding: 16px;
}

.order-inspection-grid {
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  gap: 12px;
}

.order-inspection-grid .field {
  min-height: 94px;
  padding: 11px 11px 12px;
}

.order-inspection-grid .field span {
  font-size: 11px;
  min-height: 28px;
}

.order-inspection-grid .field select,
.order-inspection-grid .field input,
.order-inspection-grid .field textarea {
  min-height: 42px;
}

.parts-picker-selection {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.parts-picker-free textarea {
  min-height: 96px;
}

.customer-profile-actions,
.history-order-actions,
.history-item-actions,
.accounting-actions,
.protocol-hero-actions,
.document-library-summary,
.document-library-actions,
.button-row,
.tools {
  gap: 8px;
}

.toast {
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(23, 32, 38, .18);
}

@media (max-width: 1180px) {
  .document-line-editor-main {
    grid-template-columns: minmax(0, 1fr) 92px 140px 112px;
  }

  .legal-editor-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .workspace {
    padding: 16px;
  }

  .document-line-editor-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "label label"
      "qty price"
      "remove remove";
  }

  .document-line-remove {
    width: 100%;
    white-space: normal;
  }
}
@page { size: A4; margin: 10mm; }
@media print {
  html, body { width: 210mm; margin: 0 auto !important; background: white; }
  body { display: block; }
  .sidebar, .topbar, .assist-strip, .modal header, .modal footer { display: none !important; }
  .workspace, .content, #app, .panel, .modal-body { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 auto !important; display: block !important; box-shadow: none !important; border: 0 !important; background: white !important; }
  .modal-layer.open { position: static; display: block; padding: 0; margin: 0 auto; background: white; }
  .modal { box-shadow: none; max-height: none; width: 100% !important; max-width: none !important; overflow: visible; margin: 0 auto; border: 0; }
  .document-preview { width: 190mm !important; max-width: 190mm !important; min-height: 277mm; margin: 0 auto !important; padding: 8mm !important; box-shadow: none !important; border-radius: 0 !important; page-break-inside: avoid; break-inside: avoid; transform-origin: top center; }
  .document-preview-head { grid-template-columns: minmax(0, 1fr) 62mm; }
  .document-preview-grid { grid-template-columns: 1fr 1fr; }
  .document-lines { width: 100% !important; }
  .barcode-sheet { grid-template-columns: repeat(3, 1fr); }
  .barcode-label { page-break-inside: avoid; }
  body.printing-barcode > :not(.print-barcode-stage) { display: none !important; }
  body.printing-barcode .print-barcode-stage { display: block !important; padding: 0; margin: 0; background: white; color: #111827; }
  body.printing-barcode .print-barcode-single { width: 72mm; min-height: 38mm; border: 1px solid #111827; padding: 4mm; display: grid; place-items: center; break-inside: avoid; }
  body.printing-barcode .print-barcode-grid { display: grid; grid-template-columns: repeat(3, 64mm); gap: 4mm; align-items: start; }
  body.printing-barcode .print-barcode-card { min-height: 34mm; border: 1px solid #111827; padding: 3mm; display: grid; place-items: center; break-inside: avoid; page-break-inside: avoid; }
  body.printing-barcode .barcode-label-inner { display: grid; justify-items: center; gap: 1.5mm; text-align: center; }
  body.printing-barcode .barcode-svg { max-width: 58mm; height: 22mm; }
  body.printing-barcode .barcode-svg text { font-size: 10px; }
  body.printing-barcode strong { font-size: 12px; line-height: 1.15; }
  body.printing-barcode span, body.printing-barcode small { font-size: 10px; font-weight: 800; color: #111827; }
}

/* 20260508 - Reprise horizontale du bloc prestations */
.document-editor-modal.wide-modal {
  width: min(1400px, calc(100vw - 28px));
}

.document-editor-layout {
  grid-template-columns: minmax(0, 1.16fr) minmax(380px, 0.92fr) !important;
  gap: 18px;
}

.document-editor-text-grid {
  gap: 12px;
}

.document-lines-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.document-lines-editor-head > div,
.document-lines-editor-rows,
.document-line-editor-row,
.document-line-field-label,
.document-line-field-qty,
.document-line-field-price,
.document-line-editor-actions {
  min-width: 0;
}

.document-lines-editor-head .primary-button {
  min-width: 172px;
  width: auto;
  white-space: nowrap;
  justify-self: end;
}

.document-line-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
}

.document-line-field-label,
.document-line-field-qty,
.document-line-field-price,
.document-line-remove {
  grid-area: auto !important;
}

.document-line-field-label {
  width: 100%;
}

.document-line-field-label input {
  min-height: 56px;
  font-size: 16px;
  font-weight: 800;
}

.document-line-editor-actions {
  display: grid;
  grid-template-columns: minmax(88px, 112px) minmax(160px, 1fr) minmax(112px, 128px);
  gap: 12px;
  align-items: end;
  width: 100%;
}

.document-line-field-label span,
.document-line-field-qty span,
.document-line-field-price span {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.document-line-field-qty input,
.document-line-field-price input {
  min-height: 50px;
  width: 100%;
}

.document-line-remove {
  width: 100%;
  min-height: 50px;
  height: 50px;
  align-self: end;
  justify-self: stretch;
  padding: 0 14px;
  border-radius: 12px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
  min-width: 0;
}

@media (max-width: 1280px) {
  .document-editor-modal.wide-modal {
    width: min(1280px, calc(100vw - 24px));
  }

  .document-editor-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.88fr) !important;
  }

  .document-line-editor-actions {
    grid-template-columns: minmax(84px, 104px) minmax(148px, 1fr) minmax(108px, 120px);
  }
}

@media (max-width: 980px) {
  .document-editor-layout {
    grid-template-columns: 1fr !important;
  }

  .document-lines-editor-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .document-lines-editor-head .primary-button {
    min-width: 0;
    width: 100%;
    justify-self: stretch;
  }

  .document-line-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-line-remove {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .document-line-editor-actions {
    grid-template-columns: 1fr;
  }

  .document-line-remove {
    grid-column: auto;
  }
}

/* 20260508 - Réapprovisionnement horizontal */
.stock-alert-list {
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  align-items: start;
}

.stock-alert-card {
  min-height: 0;
  padding: 14px;
  gap: 12px;
}

.stock-alert-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.stock-alert-top strong {
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.stock-alert-top em {
  align-self: start;
}

.stock-alert-metrics {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.stock-alert-metrics > span {
  min-height: 92px;
  align-content: start;
  padding: 10px;
}

.stock-alert-metrics strong {
  font-size: 30px;
}

.stock-alert-metrics b {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.stock-alert-meta {
  justify-content: flex-start;
}

.stock-alert-meta small {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 980px) {
  .stock-alert-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 620px) {
  .stock-alert-list {
    grid-template-columns: 1fr;
  }

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

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