:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --border: #d9e2ee;
  --ink: #142033;
  --green: #0f8f63;
  --blue: #2563eb;
  --amber: #c77700;
  --red: #dc2626;
  --violet: #6d28d9;
  --shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

/* Historique unifié client : CallKom + boîte mail */
.communication-loading,.communication-history{margin:20px 0;border:1px solid #d9e2ec;border-radius:18px;background:linear-gradient(145deg,#fff,#f8fafc);overflow:hidden}
.communication-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px 14px;border-bottom:1px solid #e7edf3}
.communication-history-head h3{margin:3px 0 4px}.communication-history-head p{margin:0;color:#64748b}
.communication-warning{padding:7px 10px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:.78rem;font-weight:800}
.communication-filters{display:flex;gap:8px;flex-wrap:wrap;padding:12px 22px;background:#f8fafc;border-bottom:1px solid #e7edf3}
.communication-filter{border:1px solid #d7e0ea;background:#fff;color:#334155;border-radius:999px;padding:8px 12px;font:inherit;font-size:.82rem;font-weight:750;cursor:pointer}
.communication-filter b{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;border-radius:10px;background:#eef2f7;font-size:.72rem}
.communication-filter.active{border-color:#6958dc;background:#5b50e0;color:#fff;box-shadow:0 6px 18px rgba(91,80,224,.2)}
.communication-filter.active b{background:rgba(255,255,255,.2)}
.communication-list{max-height:590px;overflow:auto;padding:4px 22px 10px}
.communication-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:flex-start;gap:13px;padding:16px 0;border-bottom:1px solid #e7edf3}
.communication-row:last-child{border-bottom:0}.communication-row[hidden]{display:none}
.communication-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#eef2ff;color:#4f46e5;font-size:1.05rem;font-weight:900}
.communication-row.incoming .communication-icon{background:#ecfdf5;color:#047857}.communication-row.outgoing .communication-icon{background:#fff7ed;color:#c2410c}
.communication-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#64748b;font-size:.78rem}
.communication-meta strong{color:#172033;font-size:.88rem}.communication-meta time{font-variant-numeric:tabular-nums}
.communication-ticket{display:inline-flex;padding:3px 7px;border-radius:999px;background:#edf2f7;color:#475569;font-weight:700}
.communication-ticket.exact{background:#dcfce7;color:#166534}.communication-ticket.general{background:#f1f5f9;color:#64748b}
.communication-copy h4{margin:7px 0 4px;color:#172033;font-size:.95rem}.communication-copy p{margin:6px 0 0;color:#475569;line-height:1.55;white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){.communication-history-head{padding:17px 16px}.communication-filters{padding:10px 16px;overflow-x:auto;flex-wrap:nowrap}.communication-list{padding:2px 16px 8px;max-height:none}.communication-row{grid-template-columns:38px minmax(0,1fr)}.communication-row>.btn{grid-column:2;justify-self:start}.communication-icon{width:34px;height:34px}.communication-meta{gap:5px}.communication-copy p{font-size:.9rem}}

/* Approvisionnement d'un ticket : suivi fournisseur privé + état lisible en un coup d'œil. */
.ticket-parts-panel{margin:18px 0;padding:18px;border:1px solid #cfdbea;border-radius:16px;background:linear-gradient(135deg,#fbfdff,#f4f8ff);box-shadow:0 10px 30px rgba(39,69,112,.06)}
.ticket-parts-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.ticket-parts-head h3,.ticket-parts-panel h3{margin:3px 0 4px}.ticket-parts-head p{margin:0;max-width:760px}
.ticket-parts-panel .po-item{border-radius:12px;background:#fff}.po-item-main{gap:4px}.po-supplier-track{display:block;margin-top:5px;font-size:12px;line-height:1.35}.po-supplier-track.ok{color:#087443}.po-supplier-track.active{color:#155fc7}.po-supplier-track.bad{color:#b42334}.po-supplier-track.muted{color:var(--muted)}
@media(max-width:760px){.ticket-parts-head{flex-direction:column}.ticket-parts-panel{padding:13px}.ticket-parts-panel .po-item{align-items:flex-start}.ticket-parts-panel .po-item-right{width:100%;justify-content:flex-start;flex-wrap:wrap}}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: #eef2f7; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; box-shadow: var(--shadow); }
.brand { margin-bottom: 18px; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 0; line-height: 1.1; }
.brand p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.brand-sidebar { margin: 0 0 8px; padding: 7px 4px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-sidebar h1 { color: #fff; font-size: 19px; }
.brand-sidebar p { color: #a6b3c3; }

.field { display: grid; gap: 6px; margin-bottom: 10px; }
.field label, .check { font-size: 12px; font-weight: 750; color: #334155; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.field input, .field textarea, .field select, .search, .inline-form input, .mini-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .search:focus, .inline-form input:focus, .mini-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.category-manager {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
}
.category-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 10px;
}
.category-manager-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.category-manager-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.category-manager-row,
.category-manager-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.category-manager-row.is-duplicate input {
  border-color: #fecaca;
  background: #fff1f2;
}
.category-manager-add {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.btn {
  min-height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.btn.small { min-height: 30px; padding: 0 9px; font-size: 12px; }
.btn.square { width: 36px; padding: 0; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.warn { background: var(--amber); border-color: var(--amber); color: #1c1200; }
.btn.ghost { background: transparent; }

.app { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.app.density-compact .content { padding: 10px; }
.app.density-compact .panel { padding: 10px; }
.app.density-compact .btn { min-height: 32px; }
.app.density-compact td, .app.density-compact th { padding: 6px 8px; }
.sidebar { background: #101827; color: #fff; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 100vh; height: 100vh; position: sticky; top: 0; }
.nav { display: grid; gap: 12px; align-content: start; flex: 1; overflow: auto; padding-right: 2px; }
.nav-section { display: grid; gap: 5px; }
.nav-section > span { color: #7f8da3; font-size: 11px; font-weight: 850; text-transform: uppercase; padding: 0 10px 3px; }
.nav button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  border-radius: 8px;
  min-height: 38px;
  padding: 0 11px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 750;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-badge { min-width: 22px; min-height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 950; }
.nav-badge[hidden] { display: none !important; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; display: grid; gap: 10px; color: #94a3b8; }
.sidebar-link { min-height: 36px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; text-decoration: none; display: flex; align-items: center; padding: 0 11px; font-weight: 800; }
.sidebar-footer small { line-height: 1.45; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 58px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 10px; }
.topbar h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.userbar { display: flex; align-items: center; gap: 10px; }
.client-live-chip {
  position: relative;
  max-width: 320px;
  min-height: 40px;
  border: 1px solid rgba(32,217,242,.32);
  border-radius: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(32,217,242,.12), rgba(59,130,246,.10));
  color: var(--ink);
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.client-live-chip.hot {
  border-color: rgba(255, 92, 120, .68);
  box-shadow: 0 0 0 4px rgba(255, 92, 120, .12), 0 12px 28px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
}
.client-live-chip:not(.idle) {
  padding-left: 28px;
}
.client-live-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.client-live-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.client-live-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.client-live-chip b {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}
.client-live-chip:not(.idle)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.16);
}
.desktop-notify-btn {
  min-height: 40px;
  white-space: nowrap;
}
.desktop-notify-btn.enabled {
  border-color: rgba(34,197,94,.35);
  background: #dcfce7;
  color: #166534;
}
.desktop-notify-btn.blocked {
  border-color: rgba(225,29,72,.24);
  background: #fff1f2;
  color: #be123c;
}
.notify-settings-card {
  border: 1px solid rgba(123,151,176,.28);
  border-radius: 12px;
  padding: 12px;
  background: #f8fcff;
}
.notify-settings-card p {
  margin: 4px 0 10px;
  color: var(--muted);
}
.client-activity-feed { display: grid; gap: 9px; }
.client-activity-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
  display: grid;
  gap: 5px;
}
.client-activity-row div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.client-activity-row span,
.client-activity-row time,
.client-activity-row p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.client-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.client-activity-summary div,
.client-presence-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(32,217,242,.08), rgba(47,111,214,.05));
  padding: 10px;
}
.client-activity-summary span,
.client-presence-card span,
.client-presence-card small,
.client-activity-meta {
  color: var(--muted);
  font-size: 12px;
}
.client-activity-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}
.client-activity-section {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.client-presence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.client-presence-card {
  display: grid;
  gap: 5px;
}
.client-presence-card div {
  display: grid;
  gap: 2px;
}
.client-presence-card p {
  margin: 0;
  font-weight: 850;
}
.client-activity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
}
.client-activity-filters button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 850;
  cursor: pointer;
}
.client-activity-filters button.active,
.client-activity-filters button:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #001421;
}
.client-activity-row .client-activity-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  justify-content: stretch;
}
.client-activity-row .client-activity-main div {
  display: grid;
  justify-content: stretch;
  gap: 3px;
  min-width: 0;
}
.activity-kind {
  min-width: 74px;
  min-height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  font-size: 11px !important;
  font-weight: 950;
  color: #073348 !important;
  background: rgba(32,217,242,.18);
}
.activity-kind.support { color: #8a1231 !important; background: #ffe2eb; }
.activity-kind.documents { color: #663c00 !important; background: #fff1cf; }
.activity-kind.account { color: #0d5f3b !important; background: #dcf8ea; }
.client-activity-row .client-activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.client-activity-row .client-activity-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content { padding: 16px; overflow: auto; flex: 1; }
.app-footer { min-height: 44px; border-top: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; color: var(--muted); font-size: 12px; }
.app-footer a { color: var(--ink); font-weight: 800; text-decoration: none; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 12px; align-items: start; margin-top: 12px; }
.dashboard-workspace { grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); }
.accounting-workspace, .mailing-workspace, .admin-workspace { grid-template-columns: 380px minmax(0, 1fr); }
.support-workspace { grid-template-columns: minmax(0, 1fr) 360px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  min-width: 0;
}
.panel.loading, .panel.error { min-height: 120px; display: grid; place-items: center; }
.panel-main { overflow: hidden; }
.side-panel { position: sticky; top: 74px; max-height: calc(100vh - 92px); overflow: auto; }
.panel h3, .detail-main h3, .detail-side h3 { margin: 0 0 11px; font-size: 14px; letter-spacing: 0; }
.panel h4, .kanban-card h4 { margin: 0; letter-spacing: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.toolbar, .actions-row, .link-grid { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { justify-content: flex-end; }
.actions-row { margin-bottom: 12px; }
.search { min-width: min(320px, 100%); }

.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ticket-photo-proof {
  border: 1px solid #c8dceb;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0 16px;
  background: linear-gradient(135deg, #f8fcff, #eef8ff);
}
.ticket-photo-proof.missing { border-color: #f7bf70; background: linear-gradient(135deg, #fffaf0, #f8fcff); }
.proof-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.proof-head h4 { margin: 2px 0 4px; font-size: 18px; }
.proof-head p { margin: 0; color: #59708b; }
.proof-status {
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
  white-space: nowrap;
}
.proof-status.ok { background: #dcfce7; color: #15803d; }
.proof-status.warn { background: #ffedd5; color: #9a3412; }
.photo-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-stage-card {
  border: 1px solid #d5e4f1;
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.82);
  min-width: 0;
}
.photo-stage-card.has-photo { border-color: #93c5fd; }
.photo-stage-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.photo-stage-title span { color: #6b7f98; font-weight: 800; font-size: 13px; }
.photo-thumb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 74px; }
.ticket-photo-thumb {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d8e6f2;
  background: #f8fbff;
}
.ticket-photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.ticket-photo-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0f172a;
}
.ticket-photo-thumb figcaption {
  padding: 6px 7px;
  font-size: 12px;
  color: #41566e;
  line-height: 1.25;
}
.icon-danger {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #fb7185;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
}
.photo-empty {
  grid-column: 1 / -1;
  border: 1px dashed #bfd4e8;
  border-radius: 12px;
  display: grid;
  place-items: center;
  min-height: 74px;
  color: #7890aa;
  font-weight: 800;
}
.camera-upload { margin-top: 8px; width: 100%; justify-content: center; cursor: pointer; }
.camera-upload input { display: none; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 13px; min-height: 80px; display: grid; align-content: center; gap: 6px; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 750; }
.stat strong { font-size: 24px; line-height: 1.1; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #475569; text-align: left; font-size: 11px; text-transform: uppercase; border-bottom: 1px solid var(--border); padding: 9px; }
td { border-bottom: 1px solid #edf2f7; padding: 9px; vertical-align: top; }
tr:hover td { background: #f8fafc; }
.right { text-align: right; }
.muted { color: var(--muted); }

.pill { display: inline-flex; align-items: center; min-height: 22px; border-radius: 7px; padding: 0 8px; font-size: 11px; font-weight: 850; border: 1px solid transparent; white-space: nowrap; }
.pill.new, .pill.draft { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.pill.diagnostic, .pill.sent { background: #fef3c7; color: #a16207; border-color: #fde68a; }
.pill.waiting_client, .pill.overdue { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.pill.waiting_part { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.pill.repairing, .pill.accepted { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.pill.ready, .pill.paid { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.pill.credit_note { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.pill.irreparable { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.pill.delivered, .pill.cancelled, .pill.refused, .pill.expired, .pill.archived { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.priority { display: inline-flex; align-items: center; min-height: 20px; border-radius: 7px; padding: 0 7px; font-size: 10px; font-weight: 850; background: #f1f5f9; color: #475569; }
.priority.high, .priority.urgent { background: #fee2e2; color: #b91c1c; }
.priority.low { background: #ecfdf5; color: #047857; }
.notify-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 7px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid transparent;
}
.notify-pill.on { background: rgba(25,217,140,.14); color: #8bf0c3; border-color: rgba(25,217,140,.28); }
.notify-pill.off { background: rgba(255,92,120,.14); color: #ffa7b6; border-color: rgba(255,92,120,.28); }
.notify-check {
  border: 1px solid rgba(32,217,242,.16);
  border-radius: 8px;
  background: rgba(32,217,242,.06);
  padding: 10px 12px;
}

.kanban { display: grid; grid-template-columns: repeat(5, minmax(248px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kanban-column { background: var(--panel-soft); border: 1px solid var(--border); border-radius: 8px; min-height: 410px; display: flex; flex-direction: column; min-width: 0; }
.kanban-column header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px; border-bottom: 1px solid var(--border); }
.kanban-column header h4 { font-size: 13px; }
.kanban-column header span { min-width: 24px; min-height: 22px; display: grid; place-items: center; border-radius: 7px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 850; }
.kanban-list { display: grid; gap: 8px; padding: 9px; align-content: start; min-width: 0; overflow: hidden; }
.kanban-card { background: #fff; border: 1px solid #dbe3ee; border-left: 4px solid #94a3b8; border-radius: 8px; padding: 10px; box-shadow: 0 1px 2px rgba(15,23,42,.04); display: grid; gap: 8px; min-width: 0; overflow: hidden; }
.kanban-card.priority-high, .kanban-card.priority-urgent { border-left-color: var(--red); }
.kanban-card.priority-low { border-left-color: var(--green); }
.kanban-card.type-order { border-left-color: var(--violet); }
.kanban-card h4 { font-size: 13px; line-height: 1.25; }
.kanban-card p { margin: 0; font-size: 12px; line-height: 1.35; }
.kanban-card.overdue { box-shadow: 0 0 0 1px rgba(220,38,38,.28), 0 12px 28px rgba(220,38,38,.08); }
.kanban-card.is-compact { gap: 6px; }
.card-line { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; min-width: 0; }
.card-line > strong, .card-line > .client-link { min-width: 0; overflow-wrap: anywhere; }
.card-line > span { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; max-width: 48%; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.card-title-row h4 { min-width: 0; overflow-wrap: anywhere; }
.card-footer { display: grid; grid-template-columns: 1fr; gap: 7px; align-items: stretch; min-width: 0; }
.card-primary-actions { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(86px, .55fr); gap: 6px; min-width: 0; }
.card-primary-actions .btn { width: 100%; min-width: 0; padding-left: 7px; padding-right: 7px; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.card-actions.secondary { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
.card-actions .btn { width: 100%; min-width: 0; justify-content: center; overflow: hidden; padding-left: 6px; padding-right: 6px; text-overflow: ellipsis; white-space: nowrap; }
.card-actions .danger-action { grid-column: auto; }
.view-more { font-weight: 900; }
.mini-select { width: 100%; min-width: 0; min-height: 30px; padding: 5px 7px; font-size: 12px; }
.ticket-type, .deadline-pill, .equipment-tag, .planning-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.ticket-type.repair { background: rgba(37,99,235,.12); color: #bfdbfe; border: 1px solid rgba(37,99,235,.24); }
.ticket-type.order { background: rgba(109,40,217,.16); color: #ddd6fe; border: 1px solid rgba(109,40,217,.28); }
.ticket-type.archived { background: rgba(148,163,184,.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,.3); }
.deadline-pill { background: rgba(251,191,36,.12); color: #f8d47b; border: 1px solid rgba(251,191,36,.28); }
.deadline-pill.overdue { background: rgba(220,38,38,.18); color: #ffb4c0; border-color: rgba(220,38,38,.32); }
.deadline-pill.soft { background: rgba(148,163,184,.12); color: #cbd5e1; border-color: rgba(148,163,184,.28); }
.deadline-pill.soon { background: rgba(246,178,61,.16); color: #ffd89a; border-color: rgba(246,178,61,.34); }
.deadline-pill.review { background: rgba(25,217,140,.12); color: #9ff4cb; border-color: rgba(25,217,140,.25); }
.deadline-pill.review-pending { background: rgba(32,217,242,.13); color: #99f5ff; border-color: rgba(32,217,242,.28); }
.planning-pill { margin-top: 4px; background: rgba(32,217,242,.13); color: #99f5ff; border: 1px solid rgba(32,217,242,.3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.planning-pill.planned { background: rgba(47,111,214,.16); color: #b7d0ff; border-color: rgba(47,111,214,.32); }
.planning-pill.in_progress { background: rgba(37,99,235,.16); color: #bcd5ff; border-color: rgba(37,99,235,.34); }
.planning-pill.done { background: rgba(18,128,82,.16); color: #9be7c4; border-color: rgba(18,128,82,.32); }
.planning-pill.cancelled { background: rgba(148,163,184,.16); color: #d6dde8; border-color: rgba(148,163,184,.32); }
.planning-pill.past { background: rgba(255,92,120,.14); color: #ffa7b6; border-color: rgba(255,92,120,.28); }
.equipment-tag { flex: 0 0 auto; background: rgba(251,191,36,.16); color: #ffd38a; border: 1px solid rgba(251,191,36,.24); max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.ticket-doc-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  min-width: 0;
}
.ticket-doc-strip.compact {
  margin-top: 4px;
}
.ticket-doc-chip {
  min-height: 24px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
  padding: 2px 7px;
  background: rgba(148,163,184,.12);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
button.ticket-doc-chip {
  cursor: pointer;
}
.ticket-doc-chip strong,
.ticket-doc-chip em,
.ticket-doc-chip small {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-doc-chip strong {
  max-width: 96px;
  color: inherit;
}
.ticket-doc-chip em {
  max-width: 78px;
  opacity: .9;
}
.ticket-doc-chip small,
.ticket-doc-chip b {
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 5px;
  background: rgba(255,255,255,.12);
  color: inherit;
  font-size: 9px;
}
.ticket-doc-chip .quote-decision-time {
  min-height: 18px;
  max-width: none;
  padding: 0 7px;
  letter-spacing: 0;
  text-transform: none;
}
.ticket-doc-chip .quote-decision-time.accepted { background: rgba(22, 163, 74, .15); }
.ticket-doc-chip .quote-decision-time.refused { background: rgba(225, 29, 72, .13); }
.ticket-doc-chip.quote { background: rgba(184,108,255,.15); color: #dec5ff; border-color: rgba(184,108,255,.32); }
.ticket-doc-chip.invoice { background: rgba(32,217,242,.13); color: #9cf5ff; border-color: rgba(32,217,242,.3); }
.ticket-doc-chip.invoice.sent,
.ticket-doc-chip.invoice.overdue { background: rgba(246,178,61,.16); color: #ffd38a; border-color: rgba(246,178,61,.34); }
.ticket-doc-chip.invoice.paid,
.ticket-doc-chip.quote.accepted { background: rgba(25,217,140,.14); color: #9ff4cb; border-color: rgba(25,217,140,.28); }
.ticket-doc-chip.quote.refused,
.ticket-doc-chip.quote.expired,
.ticket-doc-chip.quote.cancelled,
.ticket-doc-chip.quote.archived,
.ticket-doc-chip.invoice.cancelled { background: rgba(255,92,120,.14); color: #ffa7b6; border-color: rgba(255,92,120,.28); }
.ticket-doc-strip.empty-doc span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.alert-dot {
  width: 32px;
  min-height: 30px;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  color: var(--muted);
  font-weight: 950;
}
.alert-dot.danger { background: rgba(220,38,38,.18); border-color: rgba(220,38,38,.38); color: #ffb4c0; }
.kanban-check, .kanban-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  font-weight: 850;
}
.ticket-sort { width: auto; min-width: 150px; }
.production-table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.production-table { min-width: 1120px; }
.production-table th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.production-table tr.row-overdue td { background: rgba(220,38,38,.06); }
.production-table tr.row-archived td { opacity: .78; background: rgba(148,163,184,.05); }
.production-table .mini-select { min-width: 128px; }
.table-actions { white-space: nowrap; }
.table-actions .btn { margin: 0 0 4px 4px; }
.admin-users-table tr.user-inactive{opacity:.68;background:#f3f4f4}.admin-users-table tr.user-inactive td:first-child{text-decoration:line-through}.user-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:850}.user-status.active{background:#e3f7ec;color:#117149}.user-status.inactive{background:#eceeee;color:#606965}.user-active-field{padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}.user-active-field>label{display:flex;align-items:flex-start;gap:10px}.user-active-field input{width:auto;margin-top:3px}.user-active-field span,.user-active-field strong,.user-active-field small{display:block}.user-active-field small{margin-top:3px;color:var(--muted);font-weight:400}
.rma-workspace { display: grid; gap: 12px; }
.request-workspace { display: grid; gap: 12px; }
.request-payload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.request-payload-grid div { background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: 8px; padding: 9px; min-width: 0; }
.request-payload-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.request-payload-grid strong { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.rma-filters { justify-content: space-between; }
.rma-filters .search { flex: 1 1 360px; }
.rma-table { overflow-x: auto; }
.rma-table table { min-width: 1050px; }

/* RMA : classement, filtres et pagination */
.rma-filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(150px, .7fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-soft, rgba(255,255,255,.55));
}
.rma-filter-panel .field { margin: 0; min-width: 0; }
.rma-filter-panel input,
.rma-filter-panel select { width: 100%; margin: 0; }
.rma-spam-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.rma-spam-toggle input { width: auto; margin: 0; }
.rma-filter-actions { display: flex; gap: 8px; justify-content: flex-end; }
.rma-pagination { margin: 0; }
.rma-table { border: 1px solid var(--border); border-radius: 10px; }
.rma-table table { min-width: 1220px; }
.rma-table th { position: sticky; top: 0; z-index: 1; background: var(--panel); white-space: nowrap; }
.rma-table tbody tr:hover td { background: rgba(32,217,242,.045); }
.rma-table tr.rma-row-spam td { opacity: .66; background: rgba(148,163,184,.06); }

/* Demandes et RMA encore jamais ouverts : visibles immédiatement depuis la notification. */
.request-table tr.admin-unread-row td,
.rma-table tr.admin-unread-row td {
  background: linear-gradient(90deg, rgba(109, 40, 217, .13), rgba(37, 99, 235, .07));
  border-top-color: rgba(109, 40, 217, .32);
  border-bottom-color: rgba(109, 40, 217, .32);
}
.request-table tr.admin-unread-row td:first-child,
.rma-table tr.admin-unread-row td:first-child {
  box-shadow: inset 4px 0 0 var(--violet);
}
.request-table tr.admin-unread-row:hover td,
.rma-table tr.admin-unread-row:hover td {
  background: linear-gradient(90deg, rgba(109, 40, 217, .19), rgba(37, 99, 235, .11));
}
.admin-unread-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 8px 5px 0;
  padding: 3px 8px;
  border: 1px solid rgba(109, 40, 217, .3);
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(109, 40, 217, .2);
}
.rma-table .empty-state { display: grid; gap: 5px; place-items: center; padding: 28px; text-align: center; }
.rma-table .empty-state span { color: var(--muted); }

@media (max-width: 1050px) {
  .rma-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rma-filter-search { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .rma-filter-panel { grid-template-columns: 1fr; }
  .rma-filter-search { grid-column: auto; }
  .rma-filter-actions { display: grid; grid-template-columns: 1fr; }
  .rma-filter-actions .btn { width: 100%; }
}
.rma-map-panel {
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 18%, rgba(32,217,242,.18), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,248,255,.95));
  box-shadow: 0 16px 38px rgba(15,23,42,.08);
}
.rma-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.rma-map-head h3 { margin: 2px 0 4px; font-size: 20px; }
.rma-map-head p { margin: 0; max-width: 780px; }
.rma-map-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: baseline;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
}
.rma-map-stats strong { font-size: 24px; line-height: 1; color: #0f2748; }
.rma-map-stats span { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.rma-map-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(280px, .42fr);
  gap: 12px;
}
.rma-real-map-shell {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 14px;
  background: #e8f5ff;
}
.rma-real-map {
  width: 100%;
  height: 360px;
  min-height: 360px;
}
.rma-real-map .leaflet-heatmap-layer { pointer-events: none; }
.rma-real-map .leaflet-tile-pane { filter: saturate(0.15) brightness(1.06); }
.rma-heat-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  background: var(--surface, #fff);
}
.rma-heat-legend i {
  display: block;
  flex: 1;
  min-width: 30px;
  max-width: 160px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1764ce, #00a6a0, #f2cc35, #ed7824, #d42e28);
}
@media (max-width: 560px) {
  .rma-real-map-shell { min-height: 280px; }
  .rma-real-map { height: 280px; min-height: 280px; }
  .rma-heat-legend { font-size: 11px; gap: 8px; }
}
.rma-real-map-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 320px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
  padding: 18px;
}
.rma-leaflet-count {
  display: grid !important;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  margin-left: -18px !important;
  margin-top: -18px !important;
  border: 3px solid #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #20d9f2, #3b82f6);
  color: #061524;
  box-shadow: 0 12px 26px rgba(15,23,42,.22), 0 0 0 7px rgba(32,217,242,.13);
}
.rma-leaflet-count span {
  font-size: 14px;
  font-weight: 950;
}
.rma-leaflet-count.cluster-md { width: 44px !important; height: 44px !important; margin-left: -22px !important; margin-top: -22px !important; }
.rma-leaflet-count.cluster-lg { width: 54px !important; height: 54px !important; margin-left: -27px !important; margin-top: -27px !important; }
.rma-leaflet-count.cluster-xl { width: 66px !important; height: 66px !important; margin-left: -33px !important; margin-top: -33px !important; }
.rma-map-popup {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: #0f172a;
}
.rma-map-popup strong { font-size: 14px; }
.rma-map-popup span { color: #64748b; font-size: 12px; }
.rma-map-popup button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #20d9f2;
  color: #061524;
  font-weight: 900;
  cursor: pointer;
}
.leaflet-container {
  font: inherit;
}
body.modal-open .rma-real-map,
body.modal-open .leaflet-container,
body.modal-open .leaflet-pane,
body.modal-open .leaflet-top,
body.modal-open .leaflet-bottom,
body.modal-open .leaflet-control-container {
  z-index: 0 !important;
}
.rma-map-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 330px;
  overflow: auto;
}
.rma-map-row {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,.78);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.rma-map-row:hover { border-color: rgba(32,217,242,.48); background: #fff; }
.rma-map-row strong { font-size: 13px; overflow-wrap: anywhere; }
.rma-map-row span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.rma-map-empty,
.rma-map-missing {
  border: 1px dashed rgba(148,163,184,.42);
  border-radius: 10px;
  padding: 11px;
  color: var(--muted);
  background: rgba(255,255,255,.58);
  font-size: 12px;
}
.rma-map-missing { display: grid; gap: 3px; border-color: rgba(251,191,36,.55); color: #92400e; }
.link-button { border: 0; background: transparent; padding: 0; color: inherit; font-weight: 900; text-align: left; cursor: pointer; }
.link-button:hover { color: var(--blue); }
.client-link { color: var(--ink); }
.client-link:hover { color: var(--blue); text-decoration: underline; }
.deadline-warning { display: inline-block; margin-top: 4px; color: var(--red); font-size: 11px; font-weight: 850; }

@media (max-width: 920px) {
  .rma-map-head,
  .rma-map-layout { grid-template-columns: 1fr; }
  .rma-map-head { display: grid; }
  .rma-map-stats { width: 100%; grid-template-columns: auto 1fr auto 1fr; }
  .rma-map-canvas { min-height: 280px; }
  .rma-map-list { max-height: 260px; }
}

@media (max-width: 560px) {
  .rma-map-panel { padding: 10px; border-radius: 12px; }
  .rma-map-head h3 { font-size: 17px; }
  .rma-map-stats { grid-template-columns: auto 1fr; }
  .rma-map-canvas { min-height: 240px; }
  .rma-map-marker { width: 34px; height: 34px; }
  .rma-map-city { font-size: 9px; }
}

.ops-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(32,217,242,.13), rgba(184,108,255,.08)),
    var(--panel);
}
.ops-hero h3 { margin: 2px 0 5px; font-size: 22px; }
.ops-hero p { margin: 0; }
.ops-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ops-workspace {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.25fr) minmax(280px, .75fr);
  gap: 12px;
  align-items: start;
}
.ops-alert-list,
.team-task-list {
  display: grid;
  gap: 9px;
}
.ops-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255,255,255,.04);
}
.ops-alert.warning { border-left-color: var(--amber); }
.ops-alert.danger { border-left-color: var(--red); }
.ops-alert.info { border-left-color: var(--cyan); }
.ops-alert span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.ops-alert strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.ops-alert p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.ops-alert-actions {
  display: grid;
  gap: 6px;
  min-width: 96px;
}
.team-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
}
.team-task.urgent,
.team-task.high,
.team-task.late { border-left-color: var(--red); }
.team-task.blocked { border-left-color: var(--amber); }
.team-task.done { opacity: .72; border-left-color: var(--green); }
.team-task-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.team-task-main > span {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.team-task-main strong {
  overflow-wrap: anywhere;
}
.team-task-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.team-task-main small {
  color: var(--muted);
  font-weight: 800;
}
.team-task-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.team-task-actions .mini-select,
.team-task-actions .btn {
  width: 100%;
  min-width: 0;
}
.team-task-form textarea {
  min-height: 90px;
}

.autopilot-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(32,217,242,.16), rgba(75,141,255,.09)),
    var(--panel);
}
.autopilot-hero h3 { margin: 2px 0 5px; font-size: 24px; }
.autopilot-hero p { margin: 0; }
.autopilot-live {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 8px;
  min-width: 240px;
}
.autopilot-live .btn { grid-column: 1 / -1; margin-top: 6px; }
.live-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34,197,94,.14);
}
.autopilot-live small { color: var(--muted); }
.autopilot-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.15fr) minmax(260px, .72fr);
  gap: 12px;
  align-items: start;
}
.autopilot-action-list,
.autopilot-ticket-list {
  display: grid;
  gap: 9px;
}
.autopilot-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255,255,255,.04);
}
.autopilot-action.warning { border-left-color: var(--amber); }
.autopilot-action.danger { border-left-color: var(--red); }
.autopilot-action-main { min-width: 0; display: grid; gap: 4px; }
.autopilot-action-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.autopilot-action-main strong,
.autopilot-ticket-title {
  overflow-wrap: anywhere;
}
.autopilot-action-main p,
.autopilot-action-main small {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}
.autopilot-action-main p { font-size: 12px; }
.autopilot-action-main small { font-weight: 800; }
.autopilot-action-buttons {
  display: grid;
  gap: 6px;
  min-width: 86px;
}
.autopilot-ticket {
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255,255,255,.04);
  display: grid;
  gap: 7px;
}
.autopilot-ticket.late { border-left-color: var(--red); }
.autopilot-ticket-line,
.autopilot-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.autopilot-ticket p,
.autopilot-ticket ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}
.autopilot-ticket ul { padding-left: 18px; }
.difficulty {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 7px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(75,141,255,.14);
  color: #9cc2ff;
  border: 1px solid rgba(75,141,255,.28);
}
.autopilot-table-panel { margin-top: 12px; }
.autopilot-table { overflow-x: auto; }
.autopilot-table table { min-width: 980px; }
.autopilot-agent {
  margin-bottom: 12px;
  border-color: rgba(59,130,246,.26);
}
.autopilot-agent.loading-soft { opacity: .72; }
.autopilot-agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.autopilot-agent-head h3 { margin: 2px 0 5px; font-size: 20px; }
.autopilot-agent-head p { margin: 0; }
.autopilot-agent-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.autopilot-agent-grid {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(260px, 1fr) minmax(320px, 1.15fr);
  gap: 12px;
  align-items: start;
}
.autopilot-agent-settings {
  display: grid;
  gap: 8px;
}
.autopilot-run-current {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
  display: grid;
  gap: 6px;
}
.autopilot-run-current p,
.autopilot-run-current span {
  margin: 0;
  color: var(--muted);
}
.autopilot-run-list {
  display: grid;
  gap: 7px;
}
.autopilot-chat {
  margin-bottom: 12px;
  border-color: rgba(32,217,242,.34);
  background:
    linear-gradient(135deg, rgba(32,217,242,.10), rgba(75,141,255,.07)),
    var(--panel);
}
.autopilot-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.autopilot-chat-head h3 { margin: 2px 0 5px; font-size: 21px; }
.autopilot-chat-head p { margin: 0; }
.autopilot-chat-log {
  max-height: 620px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}
.autopilot-chat-bubble {
  width: min(980px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255,255,255,.04);
  display: grid;
  gap: 8px;
}
.autopilot-chat-bubble.user {
  margin-left: auto;
  width: min(760px, 88%);
  background: rgba(32,217,242,.12);
  border-color: rgba(32,217,242,.28);
}
.autopilot-chat-bubble.error { border-color: rgba(239,68,68,.42); }
.autopilot-chat-bubble.thinking { opacity: .78; }
.autopilot-chat-bubble strong { overflow-wrap: anywhere; }
.autopilot-chat-bubble p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.autopilot-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}
.autopilot-chat-form textarea {
  min-height: 58px;
  resize: vertical;
}
.autopilot-candidates {
  display: grid;
  gap: 8px;
}
.autopilot-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
}
.autopilot-candidate span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.autopilot-candidate p { margin-top: 4px; }
.autopilot-candidate-actions {
  display: grid;
  gap: 6px;
  min-width: 96px;
}
.autopilot-answer {
  display: grid;
  gap: 10px;
}
.agent-answer-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid rgba(32,217,242,.25);
  border-radius: 8px;
  padding: 10px;
  background: rgba(32,217,242,.08);
}
.agent-answer-summary span {
  grid-column: 1 / -1;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.agent-answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.agent-answer-grid > div,
.agent-message-ready,
.agent-linked-strip {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  padding: 10px;
}
.agent-answer-grid h4,
.agent-message-ready h4 {
  margin: 0 0 8px;
}
.agent-answer-grid ul,
.agent-answer-grid ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}
.agent-linked-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.agent-message-ready {
  display: grid;
  gap: 8px;
  border-left: 5px solid var(--green);
}
.agent-message-ready > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.agent-message-ready pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text);
  line-height: 1.45;
}
.autopilot-coach {
  margin-bottom: 12px;
  border-color: rgba(32,217,242,.28);
  background:
    linear-gradient(135deg, rgba(32,217,242,.09), rgba(184,108,255,.08)),
    var(--panel);
}
.autopilot-coach-loading,
.autopilot-coach-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.autopilot-coach h3 { margin: 2px 0 5px; font-size: 21px; }
.autopilot-coach h4 { margin: 0 0 8px; }
.autopilot-coach p { margin: 0; color: var(--muted); line-height: 1.42; }
.coach-warning { display: block; margin-top: 6px; color: var(--amber); font-weight: 900; }
.autopilot-coach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.coach-card-list {
  display: grid;
  gap: 8px;
}
.coach-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--cyan);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
}
.coach-card.decision { border-left-color: var(--amber); }
.coach-card.message { border-left-color: var(--green); }
.coach-card div:first-child {
  display: grid;
  gap: 2px;
}
.coach-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.coach-card strong { overflow-wrap: anywhere; }
.coach-card small {
  color: var(--muted);
  line-height: 1.35;
}
.coach-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.coach-card-actions {
  display: flex !important;
  gap: 6px;
  flex-wrap: wrap;
}
.autopilot-coach-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.autopilot-coach-bottom strong { display: block; margin-bottom: 7px; }
.autopilot-coach-bottom p { margin: 0 0 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.form-grid .wide, .wide { grid-column: 1 / -1; }
.settings-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.settings-menu {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.settings-menu h3,
.settings-module h3 { margin: 0; }
.settings-menu p,
.settings-module-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.settings-menu nav {
  display: grid;
  gap: 8px;
}
.settings-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}
.settings-menu nav a:hover {
  border-color: rgba(32,217,242,.55);
  background: rgba(32,217,242,.10);
}
.settings-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.settings-module {
  scroll-margin-top: 112px;
  display: grid;
  gap: 14px;
}
.settings-module-head {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.settings-inline-help,
.settings-test-result {
  border: 1px solid rgba(32,217,242,.22);
  border-radius: 8px;
  background: rgba(32,217,242,.08);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.settings-inline-help span {
  color: var(--muted);
  line-height: 1.4;
}
.settings-test-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 14px;
}
.settings-test-grid h4 {
  margin: 0 0 10px;
}
.settings-test-ok,
.settings-test-error {
  display: grid;
  gap: 3px;
  font-weight: 800;
}
.settings-test-ok strong { color: #047857; }
.settings-test-error strong { color: #be123c; }
.settings-test-ok span,
.settings-test-error span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.line-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(126px, 160px) 70px minmax(150px, 210px) 76px 38px; gap: 7px; margin-bottom: 9px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: rgba(255,255,255,.03); }
.line-price-cell { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 6px; }
.line-price-cell select { padding-left: 8px; padding-right: 8px; }
.line-row .line-detail { grid-column: 1 / 4; min-height: 54px; resize: vertical; }
.line-preview {
  grid-column: 4 / -1;
  border: 1px solid rgba(32,217,242,.18);
  border-radius: 8px;
  background: rgba(32,217,242,.06);
  padding: 8px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  align-content: center;
}
.line-preview strong { color: var(--text); font-size: 12px; }
.line-type-select { min-width: 0; font-weight: 850; }
.line-kind-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 7px 4px 0;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid #bae6fd;
  background: #ecfeff;
  color: #075985;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.line-kind-chip.product { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.document-totals-preview {
  margin: 2px 0 9px;
  border: 1px solid rgba(25,217,140,.24);
  border-radius: 8px;
  background: rgba(25,217,140,.08);
  padding: 9px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 900;
}
.document-totals-preview span { color: var(--muted); }
.document-totals-preview b { color: var(--text); }
.document-totals-preview strong { color: #19d98c; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 5000; background: rgba(15, 23, 42, .52); padding: 18px; display: grid; place-items: center; backdrop-filter: none; }
.modal { width: min(1180px, 100%); max-height: min(880px, calc(100vh - 36px)); overflow: auto; background: #fff; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 18px 44px rgba(15, 23, 42, .22); padding: 16px; contain: layout paint; }
.status-confirm-backdrop { z-index: 5010; background: rgba(4, 10, 20, .74); backdrop-filter: none; }
.status-confirm-modal { width: min(620px, 100%); }
.status-note-preview { border: 1px solid rgba(32,217,242,.24); background: rgba(32,217,242,.08); border-radius: 8px; padding: 12px; display: grid; gap: 5px; }
.status-note-preview strong { color: var(--text); }
.status-note-preview span { color: var(--muted); line-height: 1.45; }
.security-seal-box {
  border: 1px solid rgba(37,99,235,.22);
  background: rgba(37,99,235,.06);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 9px;
}
.security-seal-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.security-seal-card {
  margin: 0 0 12px;
  border: 1px solid rgba(22,163,74,.28);
  border-left: 5px solid #16a34a;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ecfdf5;
  display: grid;
  gap: 4px;
}
.security-seal-card.empty-seal {
  border-color: rgba(148,163,184,.28);
  border-left-color: #94a3b8;
  background: #f8fafc;
}
.security-seal-card span { color: var(--text); font-weight: 850; }
.security-seal-card small { color: var(--muted); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 3px 0 0; font-size: 20px; letter-spacing: 0; }
.modal-loading-panel { min-height: 220px; display: grid; place-items: center; color: var(--muted); font-weight: 850; }
.eyebrow { display: block; color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 12px; align-items: start; }
.detail-grid.compact { grid-template-columns: minmax(0, 1fr) 320px; }
.detail-main, .detail-side { min-width: 0; content-visibility: auto; contain-intrinsic-size: 620px; }
.detail-side { background: var(--panel-soft); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.two-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini-list { display: grid; gap: 7px; margin-bottom: 12px; }
.mini-item { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 8px; padding: 9px; text-align: left; display: grid; gap: 5px; }
.mini-document { gap: 8px; }
.mini-item-main { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; display: grid; gap: 5px; cursor: pointer; }
.mini-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.mini-item strong { font-size: 13px; }
.mini-item span { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-item small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.mini-document .quote-decision-time {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}
.mini-document .quote-decision-time.accepted { color: #166534; background: #dcfce7; }
.mini-document .quote-decision-time.refused { color: #be123c; background: #ffe4e6; }
.support-linked-tickets { display: grid; gap: 8px; margin: 12px 0; }
.support-linked-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-linked-head strong { font-size: 13px; }
.support-linked-head span { min-width: 24px; min-height: 22px; display: grid; place-items: center; border-radius: 7px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 900; }
.support-ticket-link { gap: 8px; }
.support-ticket-link .ticket-doc-strip { margin-top: 0; }
.relation-box { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.relation-box p { margin: 6px 0; color: var(--muted); }
.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 7px;
  padding: 0 9px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.account-chip.active { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.account-chip.missing { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.relation-box.account-status.active {
  background: rgba(22, 163, 74, .08);
  border-color: rgba(22, 163, 74, .28);
}
.relation-box.account-status.missing {
  background: rgba(245, 158, 11, .10);
  border-color: rgba(245, 158, 11, .32);
}
.danger-zone {
  margin-top: 12px;
  border: 1px solid rgba(220, 38, 38, .26);
  border-radius: 8px;
  padding: 10px;
  background: rgba(220, 38, 38, .06);
  display: grid;
  gap: 6px;
}
.danger-zone strong { color: var(--red); }
.danger-zone p { margin: 0; }
.signature-admin.accepted { border-color: rgba(25,217,140,.32); background: rgba(25,217,140,.08); }
.signature-admin.refused,
.signature-admin.cancelled { border-color: rgba(255,92,120,.32); background: rgba(255,92,120,.08); }
.quote-ack-callout {
  margin-top: 10px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: rgba(20, 184, 166, .10);
  padding: 10px;
  display: grid;
  gap: 7px;
}
.quote-ack-callout p { margin: 0; color: var(--muted); }
.timeline { display: grid; gap: 8px; margin-bottom: 10px; }
.event { border-left: 3px solid #cbd5e1; padding: 0 0 0 10px; }
.event.client_info { border-left-color: var(--green); background: rgba(15, 143, 99, .06); padding: 8px 10px; border-radius: 8px; }
.event.client_reply { border-left-color: #b45309; background: rgba(245, 158, 11, .10); padding: 8px 10px; border-radius: 8px; }
.event.status { border-left-color: var(--blue); }
.event span { color: var(--muted); font-size: 11px; font-weight: 750; }
.event strong { display: block; font-size: 12px; margin-top: 2px; }
.event p { margin: 3px 0 0; color: #334155; font-size: 13px; }
.support-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.support-column { background: var(--panel-soft); border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 340px; }
.support-column header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-column h4 { margin: 0; font-size: 13px; }
.support-column header span { min-width: 24px; min-height: 22px; display: grid; place-items: center; border-radius: 7px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 850; }
.support-card { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 8px; padding: 10px; text-align: left; display: grid; gap: 6px; }
.support-card strong { font-size: 13px; line-height: 1.3; }
.support-card small, .support-card p { color: var(--muted); margin: 0; font-size: 12px; line-height: 1.35; }
.event.admin { border-left-color: var(--blue); }
.event.client { border-left-color: var(--green); }
.support-read-receipt {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  border: 1px solid rgba(100, 116, 139, .2);
  background: #f8fafc;
  color: #475569;
}
.event .support-read-receipt { margin-top: 7px; }
.mini-item .support-read-receipt { margin-top: 5px; }
.support-read-receipt.read {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.support-read-receipt.unread {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.cash-hero .toolbar input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.cash-certification-box {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-left: 5px solid #2563eb;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(34,211,238,.08));
  color: var(--text);
  display: grid;
  gap: 5px;
}
.cash-certification-box strong { font-size: 1rem; }
.cash-certification-box span {
  color: var(--muted);
  line-height: 1.45;
}
.cash-closure-box {
  margin: 12px 0;
  padding: 13px 15px;
  border: 1px solid rgba(245,158,11,.28);
  border-left: 5px solid #f59e0b;
  border-radius: 16px;
  background: #fff7ed;
  display: grid;
  gap: 4px;
}
.cash-closure-box.closed {
  border-color: rgba(22,163,74,.28);
  border-left-color: #16a34a;
  background: #ecfdf5;
}
.cash-closure-box span { color: var(--muted); }
.cash-compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.cash-control {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 12px;
  display: grid;
  gap: 5px;
}
.cash-control span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}
.cash-control.ok span { background: #dcfce7; color: #166534; }
.cash-control.warn span { background: #fff7ed; color: #9a3412; }
.cash-control p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}
.cash-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.cash-method-card span {
  color: var(--muted);
  font-weight: 700;
}
.cash-ledger-hash {
  display: inline-flex;
  max-width: 160px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(15,23,42,.06);
  color: #0f172a;
  font-size: .78rem;
  white-space: nowrap;
}
.payment-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
}
@media (max-width: 980px) {
  .payment-modal-grid { grid-template-columns: 1fr; }
}
.client-info-form {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.mail-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; align-items: start; }
.mail-folders { position: static; display: grid; gap: 10px; align-self: start; }
.mail-list { overflow-x: auto; }
.mail-side-head, .mail-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mail-side-head h3, .mail-list-head h3 { margin: 2px 0 0; }
.mail-folder-tools { display: grid; gap: 8px; }
.mail-message { display: grid; gap: 12px; }
.mail-frame { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 8px; background: #fff !important; color-scheme: light; }
.mail-ai-box {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(32,217,242,.10), rgba(59,130,246,.07));
  display: grid;
  gap: 10px;
}
.mail-ai-head,
.mail-ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mail-ai-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.mail-ai-local {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}
.mail-ai-actions select {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 850;
}
.mail-folder-list { display: grid; gap: 7px; max-height: calc(100vh - 300px); overflow: auto; padding-right: 3px; }
.mail-folder { border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); border-radius: 8px; padding: 9px 10px; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.mail-folder.active { border-color: var(--cyan); box-shadow: inset 3px 0 0 var(--cyan); }
.mail-folder span:first-child { min-width: 0; display: grid; gap: 3px; }
.mail-folder strong, .mail-folder small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folder small { color: var(--muted); }
.folder-counts { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.folder-counts b, .folder-counts em { min-width: 24px; min-height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-style: normal; font-weight: 900; }
.folder-counts b { background: var(--red); color: #fff; }
.folder-counts em { background: rgba(148,163,184,.14); color: var(--muted); }
.segmented { border: 1px solid var(--border); border-radius: 8px; padding: 3px; display: inline-flex; gap: 3px; background: rgba(255,255,255,.04); }
.segmented button { border: 0; min-height: 30px; border-radius: 6px; padding: 0 10px; background: transparent; color: var(--muted); font-weight: 850; }
.segmented button.active { background: var(--cyan); color: #06101c; }
.mail-row { cursor: pointer; }
.mail-row:hover td { background: rgba(32,217,242,.08); }
.mail-actions { white-space: nowrap; }
.mail-table tr.unread td { background: rgba(32,217,242,.07); }
.mail-table tr.unread strong { color: #fff; }
.mail-state { display: inline-flex; min-height: 22px; align-items: center; border-radius: 999px; padding: 0 8px; margin: 0 4px 4px 0; font-size: 11px; font-weight: 900; white-space: nowrap; }
.mail-state.unseen { background: rgba(32,217,242,.16); color: #9af6ff; }
.mail-state.seen { background: rgba(25,217,140,.12); color: #a7f3d0; }
.mail-state.answered { background: rgba(109,40,217,.18); color: #ddd6fe; }
.mail-state.pending { background: rgba(246,178,61,.13); color: #ffd89a; }
.mail-state.flagged { background: rgba(255,92,120,.16); color: #ffb8c4; }
.mail-log-panel { display: grid; gap: 12px; }
.mail-log-head { align-items: flex-start; }
.mail-log-head p { margin: 4px 0 0; }
.mail-log-count {
  min-width: 92px;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--panel-soft);
}
.mail-log-count strong { font-size: 24px; line-height: 1; }
.mail-log-count span { color: var(--muted); font-size: 11px; font-weight: 850; }
.mail-log-filters { justify-content: space-between; }
.mail-log-filters .search { flex: 1 1 260px; }
.mail-log-table { overflow-x: auto; }
.mail-log-table table { min-width: 980px; }
.mail-log-type {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 7px;
  padding: 0 8px;
  background: rgba(32,217,242,.13);
  color: #93f2ff;
  border: 1px solid rgba(32,217,242,.22);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.mail-log-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.mail-log-body {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 14px;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.mail-preview-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.mail-preview-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mail-preview-head strong { font-size: 13px; }
.mail-preview-head span { color: var(--muted); font-size: 12px; font-weight: 750; }
.mail-preview-frame {
  display: block;
  width: 100%;
  height: min(620px, 62vh);
  border: 0;
  background: #fff;
}
.mail-log-raw {
  margin-top: 10px;
}
.mail-log-raw summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  font-size: 13px;
}
.accounting-hero { border: 1px solid var(--border); border-radius: 8px; background: linear-gradient(135deg, #101827 0%, #142033 52%, #0f766e 100%); color: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.accounting-hero h3 { margin: 2px 0 6px; font-size: 21px; }
.accounting-hero .muted, .accounting-hero .eyebrow { color: #cbd5e1; }
.accounting-export-toolbar { align-items: stretch; }
.month-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.month-export input {
  min-height: 38px;
  width: 144px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
}
.accounting-pulse { margin-top: 12px; }
.bank-panel { display: grid; gap: 10px; }
.bank-actions { display: grid; gap: 8px; }
.notice-box { border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 8px; padding: 10px; font-size: 12px; line-height: 1.45; }
.notice-box.ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.client-import-result {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.client-import-result > strong,
.client-import-sample {
  grid-column: 1 / -1;
}
.client-import-result > span,
.client-import-sample span {
  display: block;
  border: 1px solid rgba(22,101,52,.18);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,.7);
  font-weight: 800;
}
.client-import-sample {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}
.client-import-sample strong {
  display: block;
}
.indy-export-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(32,217,242,.08));
}
.indy-export-box > p {
  margin-bottom: 12px;
}
.indy-export-box .panel-head strong {
  color: var(--text);
  font-size: 20px;
}
.indy-table {
  margin-top: 8px;
}
.payment-report-box {
  border: 1px solid #bdd8ff;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,.10), rgba(16,185,129,.08));
}
.payment-report-total {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.payment-report-total strong {
  color: var(--ink);
  font-size: 21px;
}
.payment-day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 8px;
}
.payment-day-strip span {
  min-width: 140px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,.82);
  display: grid;
  gap: 2px;
  font-weight: 850;
}
.payment-day-strip small {
  color: var(--muted);
}
.payment-report-table {
  margin-top: 8px;
}
.accounting-main { overflow-x: auto; }
.acct-chart { border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: #fff; margin-bottom: 12px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.acct-months { height: 180px; display: grid; grid-template-columns: repeat(12, minmax(28px, 1fr)); gap: 9px; align-items: end; }
.acct-month { height: 100%; min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 6px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 800; }
.acct-bars { height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--border); }
.acct-bars i { width: 8px; min-height: 4px; border-radius: 999px 999px 0 0; display: block; }
.rev { background: #0ea5e9; }
.exp { background: #f59e0b; }
.vat { background: #10b981; }
.accounting-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bank-transactions td { vertical-align: middle; }
.bank-transactions tr.needs-review td { background: #fffbeb; }
.money-in { color: var(--green); font-weight: 950; }
.money-out { color: var(--red); font-weight: 950; }
.admin-subtitle { margin: 8px 0 0; border-top: 1px solid var(--border); padding-top: 12px; }
.email-test-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.email-test-form {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: rgba(32,217,242,.05);
}
.form-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.email-test-preview {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}
.email-test-preview.empty,
.email-test-preview.loading,
.email-test-preview.error {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}
.email-test-preview.error {
  color: var(--red);
}
.email-test-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.email-test-head strong {
  display: block;
  overflow-wrap: anywhere;
}
.email-test-head > span {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.email-test-iframe {
  width: 100%;
  min-height: 460px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color-scheme: light;
}
.monitor-content { display: grid; gap: 12px; }
.monitor-hero { border: 1px solid var(--border); border-radius: 8px; background: rgba(32,217,242,.06); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.monitor-hero h3 { margin: 2px 0 5px; font-size: 22px; }
.monitor-status { min-height: 38px; border-radius: 999px; padding: 0 14px; display: inline-grid; place-items: center; font-weight: 950; }
.monitor-status.ok { background: rgba(25,217,140,.14); color: #9ff4cb; }
.monitor-status.bad { background: rgba(255,92,120,.16); color: #ffb8c4; }
.monitor-grid { grid-template-columns: minmax(0, 1fr) 390px; margin-top: 0; }
.monitor-metric { overflow: hidden; }
.monitor-metric small { color: var(--muted); font-size: 11px; font-weight: 800; }
.monitor-metric.danger { border-color: rgba(255,92,120,.42); }
.monitor-charts { align-items: stretch; }
.monitor-chart-card { display: grid; gap: 10px; min-height: 260px; }
.monitor-chart-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.monitor-chart-head h3 { margin: 0 0 4px; }
.monitor-chart-head b { border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; color: var(--cyan); font-size: 12px; }
.monitor-chart-svg { width: 100%; height: 160px; overflow: visible; }
.monitor-chart-svg line { stroke: rgba(255,255,255,.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.monitor-chart-svg polyline { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 8px rgba(32,217,242,.18)); }
.monitor-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 850; }
.monitor-legend span { display: inline-flex; align-items: center; gap: 6px; }
.monitor-legend i { width: 18px; height: 4px; border-radius: 999px; display: inline-block; }
.sparkline { width: 100%; height: 40px; margin-top: 5px; }
.sparkline polyline { fill: none; stroke: var(--cyan); stroke-width: 3; vector-effect: non-scaling-stroke; }
.monitor-list { display: grid; gap: 8px; }
.monitor-row { border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.04); }
.monitor-row div { min-width: 0; display: grid; gap: 4px; }
.monitor-row strong { overflow-wrap: anywhere; }
.monitor-row span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.monitor-row b { flex: 0 0 auto; font-size: 11px; border-radius: 999px; padding: 5px 8px; }
.monitor-row.ok b { background: rgba(25,217,140,.14); color: #9ff4cb; }
.monitor-row.bad b { background: rgba(255,92,120,.16); color: #ffb8c4; }
.host-health-monitor,
.local-ai-monitor { display: grid; gap: 12px; }
.monitor-database-block { display:grid; gap:10px; border-top:1px solid var(--border); padding-top:12px; }
.database-health-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
.total-monitor-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.total-monitor-projects { align-items: start; }
.total-monitor-list { max-height: 610px; overflow: auto; padding-right: 2px; }
.total-monitor-list .monitor-row { align-items: flex-start; }
.monitor-row-main { min-width: 0; display: grid; gap: 5px; }
.monitor-row-main small { color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.monitor-detail-tags { display: flex !important; flex-wrap: wrap; gap: 5px !important; }
.monitor-detail-tags i { border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.035); padding: 3px 7px; color: var(--muted); font-style: normal; font-size: 10px; font-weight: 850; }
.monitor-storage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.monitor-storage-card { min-width: 0; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.035); padding: 12px; display: grid; gap: 12px; }
.monitor-storage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.monitor-storage-head > div { min-width: 0; display: grid; gap: 4px; }
.monitor-storage-head strong,
.monitor-storage-head span { overflow-wrap: anywhere; }
.monitor-storage-head span,
.monitor-storage-card small { color: var(--muted); font-size: 11px; }
.monitor-storage-head b { flex: 0 0 auto; color: var(--cyan); font-size: 11px; }
.monitor-storage-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.monitor-storage-metrics span { border-top: 1px solid var(--border); padding-top: 7px; color: var(--muted); font-size: 11px; display: grid; gap: 3px; }
.monitor-storage-metrics strong { color: var(--ink); font-size: 12px; }
.monitor-storage-bar { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.monitor-storage-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.mini-item.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.empty { border: 1px dashed #cbd5e1; border-radius: 8px; color: var(--muted); padding: 11px; font-size: 13px; text-align: center; }
.alert { border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

#noticeRoot { position: fixed; right: 16px; bottom: 16px; z-index: 5020; display: grid; gap: 8px; }
.notice { border-radius: 8px; padding: 10px 12px; color: #fff; background: var(--ink); box-shadow: var(--shadow); font-weight: 750; }
.notice.error { background: var(--red); }
.notice.quote {
  background: linear-gradient(135deg, #10b981, #22d3ee);
  color: #061523;
  border: 1px solid rgba(6, 21, 35, .12);
}
.notice.has-action {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 32px));
}
.notice.has-action span { line-height: 1.25; }
.notice.has-action button {
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.82);
  color: #061523;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.notice.has-action button:hover { background: #fff; }

@media (max-width: 1180px) {
  .workspace, .ops-workspace, .autopilot-grid, .accounting-workspace, .mailing-workspace, .admin-workspace, .support-workspace, .dashboard-workspace, .mail-layout, .monitor-grid { grid-template-columns: 1fr; }
  .email-test-grid { grid-template-columns: 1fr; }
  .accounting-split { grid-template-columns: 1fr; }
  .side-panel { position: static; max-height: none; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .total-monitor-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .monitor-storage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-ticket-row { grid-template-columns: minmax(240px, 1fr) minmax(150px, .55fr) minmax(160px, .55fr) minmax(250px, .75fr); }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; display: block; padding: 10px; min-height: 0; height: auto; }
  .brand-sidebar { display: none; }
  .nav { display: flex; gap: 6px; overflow-x: auto; }
  .nav-section { display: contents; }
  .nav-section > span, .sidebar-footer { display: none; }
  .nav button { flex: 0 0 auto; min-height: 34px; padding: 0 10px; }
  .topbar { min-height: 54px; padding: 0 12px; }
  .topbar h2 { font-size: 16px; }
  .userbar .muted { display: none; }
  .content { padding: 12px; }
  .total-monitor-projects,
  .monitor-charts { grid-template-columns: 1fr; }
  .total-monitor-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-hero { align-items: stretch; flex-direction: column; }
  .ops-hero, .autopilot-hero { align-items: stretch; flex-direction: column; }
  .ops-hero-actions .btn, .autopilot-live .btn { width: 100%; }
  .autopilot-agent-head { flex-direction: column; }
  .autopilot-agent-actions { width: 100%; }
  .autopilot-agent-actions .btn { flex: 1 1 160px; }
  .autopilot-agent-grid { grid-template-columns: 1fr; }
  .autopilot-chat-head { flex-direction: column; }
  .autopilot-chat-form { grid-template-columns: 1fr; }
  .autopilot-chat-form .btn { width: 100%; }
  .autopilot-chat-bubble.user { width: 100%; }
  .autopilot-candidate { grid-template-columns: 1fr; }
  .autopilot-candidate-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-answer-summary,
  .agent-answer-grid { grid-template-columns: 1fr; }
  .autopilot-coach-loading, .autopilot-coach-head { flex-direction: column; }
  .autopilot-coach-grid, .autopilot-coach-bottom { grid-template-columns: 1fr; }
  .ops-alert, .team-task, .autopilot-action { grid-template-columns: 1fr; }
  .ops-alert-actions, .autopilot-action-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-task-actions { grid-template-columns: 1fr; }
  .dashboard-ticket-row { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .dashboard-ticket-main,
  .dashboard-ticket-actions { grid-column: 1 / -1; }
  .dashboard-ticket-actions { justify-content: flex-start; }
  .receivable-card { grid-template-columns: 1fr; }
  .receivable-amount,
  .receivable-actions { justify-items: start; justify-content: flex-start; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .summary-grid, .detail-grid, .detail-grid.compact, .two-lists, .form-grid, .photo-stage-grid { grid-template-columns: 1fr; }
  .category-manager-head,
  .category-manager-row,
  .category-manager-add { grid-template-columns: 1fr; }
  .category-manager-head { display: grid; }
  .category-manager-list { grid-template-columns: 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .toolbar { justify-content: stretch; }
  .toolbar .btn, .toolbar .search, .toolbar .segmented { width: 100%; }
  .toolbar .segmented { overflow-x: auto; }
  .toolbar .segmented button { flex: 1 0 auto; }
  .month-export { width: 100%; flex-direction: column; align-items: stretch; }
  .month-export input { width: 100%; }
  .client-import-result { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4, minmax(250px, 82vw)); }
  .support-board { grid-template-columns: repeat(4, minmax(250px, 82vw)); }
  .kanban-column { min-height: 330px; }
  .line-row { grid-template-columns: 1fr minmax(112px, 140px) 60px 80px 66px 36px; }
  .line-row .line-detail { grid-column: 1 / -1; }
  table { min-width: 640px; }
  .panel, .detail-main { overflow-x: auto; }
  .modal-backdrop { padding: 10px; align-items: stretch; }
  .modal { max-height: calc(100vh - 20px); padding: 12px; }
  .modal-head { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .line-row { grid-template-columns: 1fr; gap: 5px; }
  .line-row input { padding-left: 7px; padding-right: 7px; }
  .card-footer { grid-template-columns: 1fr; }
  .dashboard-ticket-row { grid-template-columns: 1fr; }
  .dashboard-ticket-actions .btn,
  .receivable-actions .btn { flex: 1 1 118px; }
  .app-footer { flex-direction: column; align-items: center; text-align: center; padding: 10px 12px; }
  .actions-row .btn, .link-grid .btn { width: 100%; }
  .stat strong { font-size: 20px; }
}

/* Atelier Electro high-tech direction */
:root {
  --bg: #060a12;
  --panel: #0e1624;
  --panel-soft: #111d2e;
  --text: #edf5ff;
  --muted: #91a0b8;
  --border: #213149;
  --ink: #21d7ef;
  --cyan: #20d9f2;
  --pink: #ef4bd8;
  --green: #19d98c;
  --blue: #4b8dff;
  --amber: #f6b23d;
  --red: #ff5c78;
  --violet: #b86cff;
  --shadow: 0 18px 55px rgba(0, 0, 0, .35);
}

body {
  background:
    linear-gradient(rgba(32, 217, 242, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 217, 242, .04) 1px, transparent 1px),
    radial-gradient(circle at 70% 20%, rgba(32, 217, 242, .12), transparent 36%),
    #060a12;
  background-size: 58px 58px, 58px 58px, auto, auto;
  color: var(--text);
}

.public-home { min-height: 100vh; color: var(--text); overflow-x: hidden; }
.public-strip {
  min-height: 42px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(90deg, #9b2cff, #22d8f4);
  color: #07101d;
  font-weight: 850;
}
.public-strip span { font-weight: 650; max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.public-nav {
  max-width: 1760px;
  margin: 0 auto;
  min-height: 88px;
  padding: 0 7vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(5, 9, 17, .78);
  border-bottom: 1px solid rgba(32, 217, 242, .1);
}
.public-brand { display: flex; align-items: center; gap: 14px; }
.public-brand > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}
.public-brand strong { display: block; font-size: 19px; }
.public-brand small { color: var(--cyan); font-size: 11px; font-weight: 850; }
.public-nav nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.public-nav a { color: #b8c2d5; text-decoration: none; font-weight: 750; }
.public-nav a:hover { color: var(--cyan); }
.public-hero {
  max-width: 1760px;
  margin: 0 auto;
  padding: 52px 7vw 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 660px);
  gap: 56px;
  align-items: center;
}
.public-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 26px;
}
.public-copy h1 {
  margin: 0;
  max-width: 880px;
  font-size: 68px;
  line-height: 1.07;
}
.public-copy h1 span {
  display: block;
  color: #8cf7ff;
}
.public-copy p {
  max-width: 760px;
  margin: 28px 0 0;
  color: #c8d2e2;
  font-size: 22px;
  line-height: 1.55;
}
.public-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.public-metrics {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 42px;
  padding-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.public-metrics div { display: grid; gap: 7px; }
.public-metrics strong { color: var(--cyan); font-size: 24px; }
.public-metrics span { color: var(--muted); font-size: 13px; font-weight: 750; }
.public-contact {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto 34px;
  border: 1px solid rgba(32,217,242,.14);
  border-radius: 8px;
  background: rgba(14,22,36,.72);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  padding: 16px;
  font-size: 13px;
}
.public-contact strong { color: #f4f8ff; }
.public-diagnostic { position: relative; }
.diag-badge {
  position: absolute;
  right: 28px;
  top: -26px;
  z-index: 2;
  border: 1px solid rgba(32, 217, 242, .25);
  border-radius: 8px;
  background: #0d1626;
  color: #eaf7ff;
  padding: 16px 20px;
  font-weight: 900;
  box-shadow: var(--shadow);
}
.diag-card {
  min-height: 640px;
  border: 1px solid rgba(32, 217, 242, .22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 29, 46, .92), rgba(8, 13, 24, .96));
  box-shadow: inset 0 0 55px rgba(32, 217, 242, .07), var(--shadow);
  padding: 38px;
  display: grid;
  align-content: start;
  gap: 22px;
}
.diag-status { color: var(--muted); font-weight: 850; font-size: 12px; }
.diag-status span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}
.diag-card h2 { margin: 0; font-size: 24px; }
.diag-card p { color: #b9c5d7; line-height: 1.55; margin: 0; }
.public-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0 14px;
}
.public-tabs button {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: #aab6c9;
  font-weight: 900;
}
.public-tabs button.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06101c;
  box-shadow: 0 0 22px rgba(32,217,242,.24);
}
.public-form { margin-top: 4px; }
.msg.error { color: var(--red); }

.app { background: rgba(6, 10, 18, .78); }
.sidebar {
  background: #080f1d;
  border-right: 1px solid rgba(32,217,242,.12);
  box-shadow: 18px 0 55px rgba(0,0,0,.24);
}
.brand-sidebar { border-bottom-color: rgba(32,217,242,.14); }
.brand-sidebar h1 { color: #f7fbff; }
.brand-sidebar p { color: var(--cyan); }
.nav-section > span { color: #65758f; }
.nav button { color: #b7c2d5; }
.nav button.active, .nav button:hover {
  background: rgba(32,217,242,.12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--cyan);
}
.sidebar-link { border-color: rgba(32,217,242,.18); }
.main { background: rgba(7, 11, 20, .72); }
.topbar, .app-footer {
  background: rgba(9, 15, 27, .94);
  border-color: var(--border);
}
.app-footer { justify-content: center; text-align: center; flex-wrap: wrap; }
.content { background: transparent; }
.panel, .stat, .detail-side, .mini-item, .relation-box, .support-card {
  background: rgba(14, 22, 36, .94);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
}
.relation-box.signature-admin.accepted { border-color: rgba(25,217,140,.32); background: rgba(25,217,140,.08); }
.relation-box.signature-admin.refused,
.relation-box.signature-admin.archived,
.relation-box.signature-admin.cancelled { border-color: rgba(255,92,120,.32); background: rgba(255,92,120,.08); }
.panel h3, .detail-main h3, .detail-side h3, .panel h4 { color: #f4f8ff; }
.field label, .check { color: #b9c5d7; }
.field input, .field textarea, .field select, .search, .inline-form input, .mini-select {
  background: #08111f;
  color: var(--text);
  border-color: #263852;
}
.field input:focus, .field textarea:focus, .field select:focus, .search:focus, .inline-form input:focus, .mini-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(32,217,242,.16);
}
.btn {
  background: #0b1526;
  color: #e8f1ff;
  border-color: #2a3b55;
}
.btn:hover { border-color: rgba(32,217,242,.55); }
.btn.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #05101d;
  box-shadow: 0 0 22px rgba(32,217,242,.2);
}
.btn.green { background: var(--green); border-color: var(--green); color: #04130d; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.warn { background: var(--amber); border-color: var(--amber); color: #1c1200; }
.btn.ghost { background: transparent; color: #dce8f7; }
.muted, .mini-item span, .relation-box p, .event span { color: var(--muted); }
.stat { min-height: 86px; }
.stat span { color: var(--muted); }
.stat strong { color: #f8fbff; }
th { color: #9fb0c8; border-bottom-color: var(--border); }
td { border-bottom-color: rgba(255,255,255,.07); }
tr:hover td { background: rgba(32,217,242,.05); }
.empty {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.12);
  color: var(--muted);
}
.empty.compact { padding: 8px; text-align: left; }
.alert {
  background: rgba(246,178,61,.1);
  border-color: rgba(246,178,61,.35);
  color: #ffd89a;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.tickets-workspace, .docs-workspace { margin-top: 0; }
.kanban-tools { justify-content: space-between; }
.kanban {
  grid-template-columns: repeat(4, minmax(278px, 1fr));
  gap: 12px;
  padding-bottom: 10px;
}
.kanban-column {
  background: rgba(9, 17, 30, .96);
  border-color: rgba(32,217,242,.12);
  min-height: 510px;
}
.kanban-column.pickup { border-color: rgba(251,191,36,.22); background: rgba(24, 18, 8, .96); }
.kanban-column header { border-bottom-color: rgba(32,217,242,.12); }
.kanban-column header span {
  background: rgba(32,217,242,.12);
  color: var(--cyan);
}
.kanban-card {
  background: #0d1728;
  border-color: #253852;
  border-left-color: var(--cyan);
  color: var(--text);
}
.kanban-card.priority-high { border-left-color: var(--amber); }
.kanban-card.priority-urgent { border-left-color: var(--red); }
.kanban-card.priority-low { border-left-color: var(--green); }
.kanban-card.type-order { border-left-color: var(--violet); }
.kanban-card.archived { opacity: .78; border-left-color: #94a3b8; }
.production-table-wrap { border-color: rgba(32,217,242,.14); background: rgba(9, 17, 30, .96); }
.production-table th { background: #09111e; }
.production-table tr.row-overdue td { background: rgba(255,92,120,.08); }
.production-table tr.row-archived td { background: rgba(148,163,184,.06); }
.link-button:hover { color: var(--cyan); }
.deadline-warning { color: #ff9aac; }
.card-footer { grid-template-columns: 1fr; }
.modal-backdrop { background: rgba(0, 0, 0, .58); backdrop-filter: none; }
.modal {
  background: #0b1322;
  border-color: rgba(32,217,242,.22);
  color: var(--text);
  box-shadow: 0 22px 58px rgba(0,0,0,.42);
}
.modal-head { border-bottom-color: var(--border); }
.modal-backdrop.status-confirm-backdrop { background: rgba(4, 10, 20, .78); z-index: 5010; }
.status-confirm-modal { width: min(620px, 100%); }
.status-note-preview {
  background: rgba(32,217,242,.08);
  border-color: rgba(32,217,242,.24);
}
.eyebrow { color: var(--cyan); }
.document-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}
.invoice-bank-box {
  margin: 14px 0;
  border: 1px solid rgba(25,217,140,.28);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: rgba(25,217,140,.08);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.invoice-cancel-box {
  margin: 14px 0;
  border: 1px solid #fecaca;
  border-left: 5px solid #e11d48;
  border-radius: 8px;
  background: #fff1f2;
  color: #102039;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.invoice-cancel-box.credit {
  border-color: #c7d2fe;
  border-left-color: #6366f1;
  background: #eef2ff;
}
.invoice-cancel-box.legal-lock {
  border-color: #bae6fd;
  border-left-color: #0891b2;
  background: #f0f9ff;
}
.invoice-cancel-box h3 { margin: 0; }
.invoice-cancel-box p { margin: 0; color: #475569; }
.invoice-bank-box h3 { margin: 2px 0 4px; }
.invoice-bank-box p { margin: 0; color: var(--muted); }
.invoice-bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.invoice-bank-grid p {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  padding: 9px;
  display: grid;
  gap: 4px;
}
.invoice-bank-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.invoice-bank-grid b {
  color: var(--text);
  overflow-wrap: anywhere;
}
.invoice-bank-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-top-shell .invoice-bank-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #102039;
}
.admin-top-shell .invoice-bank-grid p {
  background: #ffffff;
  border-color: #d8e6f2;
}
.admin-top-shell .invoice-bank-grid b { color: #102039; }
.quote-validity-panel {
  margin: 12px 0 14px;
  border: 1px solid rgba(245,158,11,.32);
  border-left: 5px solid #f59e0b;
  border-radius: 8px;
  background: rgba(245,158,11,.10);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
}
.quote-validity-panel h4 { margin: 2px 0 6px; font-size: 18px; }
.quote-validity-panel p { margin: 0; color: var(--muted); line-height: 1.45; }
.quote-accepted-panel {
  border-color: rgba(15, 118, 110, .30);
  border-left-color: #0f766e;
  background: rgba(20, 184, 166, .10);
}
.pill.quote-ack {
  margin-top: 5px;
  background: #ccfbf1;
  color: #115e59;
  border-color: #99f6e4;
}
.quote-validity-list {
  display: grid;
  gap: 8px;
}
.quote-validity-list article {
  border: 1px solid rgba(245,158,11,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}
.quote-validity-list article strong,
.quote-validity-list article span { min-width: 0; overflow-wrap: anywhere; }
.quote-validity-list article span { color: var(--muted); font-size: 13px; }
.quote-validity-list article div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; grid-row: span 2; }
.admin-top-shell .quote-validity-panel {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #102039;
}
.admin-top-shell .quote-validity-list article {
  background: #ffffff;
  border-color: #fed7aa;
}
.admin-top-shell .quote-validity-panel p,
.admin-top-shell .quote-validity-list article span { color: #64748b; }
.admin-top-shell .quote-accepted-panel {
  background: #ecfdf5;
  border-color: #99f6e4;
}
.admin-top-shell .quote-accepted-panel .quote-validity-list article {
  border-color: #99f6e4;
}
@media (max-width: 780px) {
  .quote-validity-panel { grid-template-columns: 1fr; }
  .quote-validity-list article { grid-template-columns: 1fr; }
  .quote-validity-list article div { grid-row: auto; justify-content: stretch; }
  .quote-validity-list article .btn { flex: 1; }
}
.client-picker { position: relative; }
.selected-client {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(32,217,242,.18);
  background: rgba(32,217,242,.06);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}
.selected-client.empty { color: var(--muted); border-style: dashed; background: rgba(255,255,255,.03); }
.selected-client span { color: var(--muted); font-size: 12px; }
.client-results {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.client-result {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid #263852;
  border-radius: 8px;
  background: #08111f;
  color: var(--text);
  padding: 10px;
}
.client-result:hover { border-color: var(--cyan); }
.client-result strong { color: inherit; }
.client-result span { color: var(--muted); font-size: 12px; }
.admin-top-shell .client-result {
  background: #fff;
  border-color: #cddceb;
  color: #102039;
}
.admin-top-shell .client-result:hover {
  background: #eef9ff;
  border-color: #20d9f2;
}
.admin-top-shell .client-result span { color: #5f728a; }
.equipment-other-field[hidden] { display: none !important; }
.client-picker-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.company-results {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.company-result {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.company-result:hover { border-color: var(--cyan); }
.company-result span,
.company-result small {
  color: var(--muted);
  font-size: 12px;
}
.admin-top-shell .company-result {
  background: #fff;
  border-color: #cddceb;
  color: #102039;
}
.admin-top-shell .company-result span,
.admin-top-shell .company-result small { color: #5f728a; }
.inline-create {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(32,217,242,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.pill.new, .pill.draft { background: rgba(75,141,255,.16); color: #9cc2ff; border-color: rgba(75,141,255,.3); }
.pill.diagnostic, .pill.sent { background: rgba(246,178,61,.16); color: #ffd28c; border-color: rgba(246,178,61,.32); }
.pill.waiting_client, .pill.overdue { background: rgba(255,92,120,.14); color: #ff9aac; border-color: rgba(255,92,120,.28); }
.pill.waiting_part { background: rgba(246,178,61,.16); color: #ffd28c; border-color: rgba(246,178,61,.32); }
.pill.repairing, .pill.accepted { background: rgba(184,108,255,.16); color: #d5b5ff; border-color: rgba(184,108,255,.3); }
.pill.ready, .pill.paid { background: rgba(25,217,140,.14); color: #7ff0bd; border-color: rgba(25,217,140,.28); }
.pill.credit_note { background: rgba(99,102,241,.16); color: #c7d2fe; border-color: rgba(99,102,241,.34); }
.pill.irreparable { background: rgba(255,92,120,.16); color: #ffa7b6; border-color: rgba(255,92,120,.32); }
.pill.delivered, .pill.cancelled, .pill.refused, .pill.expired, .pill.archived { background: rgba(145,160,184,.14); color: #c9d3e2; border-color: rgba(145,160,184,.25); }

@media (max-width: 1180px) {
  .public-hero { grid-template-columns: 1fr; }
  .public-copy h1 { font-size: 52px; }
  .diag-card { min-height: 0; }
  .document-modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .public-strip { align-items: center; flex-direction: column; padding: 9px 14px; gap: 2px; text-align: center; }
  .public-nav { padding: 14px; min-height: auto; align-items: center; flex-direction: column; text-align: center; }
  .public-brand { justify-content: center; }
  .public-nav nav { justify-content: center; gap: 10px; width: 100%; }
  .public-hero { padding: 18px 14px 38px; gap: 28px; align-items: start; }
  .public-diagnostic { order: -1; width: min(100%, 460px); margin: 0 auto; }
  .public-copy { text-align: center; }
  .public-copy p { margin-left: auto; margin-right: auto; }
  .public-actions { justify-content: center; }
  .public-copy h1 { font-size: 42px; }
  .public-copy p { font-size: 18px; }
  .public-metrics { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .diag-badge { position: static; display: flex; width: fit-content; margin: 0 auto 10px; }
  .diag-card { padding: 20px; min-height: 0; text-align: left; }
  .mini-stats { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4, minmax(270px, 84vw)); }
  .card-footer { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .public-strip { min-height: 34px; padding: 7px 12px; }
  .public-strip span { display: none; }
  .public-nav { gap: 10px; padding: 12px; }
  .public-brand small { display: none; }
  .public-nav a, .public-nav .btn { min-height: 34px; }
  .public-copy h1 { font-size: 34px; }
  .public-tabs { grid-template-columns: 1fr; }
  .public-actions .btn, .public-nav .btn { width: 100%; }
  .public-nav nav a { width: 100%; }
  .public-auth-card .form-grid { grid-template-columns: 1fr; }
  .diag-badge { padding: 10px 14px; }
  .diag-card { padding: 14px; gap: 12px; }
  .diag-card .diag-status, .diag-card > p { display: none; }
  .diag-card h2 { font-size: 21px; }
  .public-tabs { margin: 6px 0 8px; }
  .public-form .field { margin-bottom: 7px; }
  .line-row { grid-template-columns: 1fr; }
}

/* Admin top navigation refresh */
.admin-top-shell {
  display: block;
  min-height: 100vh;
}
.admin-top-shell .main {
  min-height: 100vh;
}
.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "brand tools"
    "nav nav";
  align-items: center;
  gap: 10px 16px;
  padding: 12px 18px 10px;
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
}
.admin-brand {
  grid-area: brand;
  display: grid;
  gap: 2px;
  min-width: 190px;
}
.admin-brand strong {
  color: #f8fbff;
  font-size: 18px;
  line-height: 1;
}
.admin-brand span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
}
.admin-mobile-menu {
  grid-area: mobile;
  display: none;
  min-height: 38px;
  border: 1px solid rgba(32,217,242,.28);
  border-radius: 8px;
  background: rgba(32,217,242,.12);
  color: var(--text);
  padding: 0 12px;
  font-weight: 950;
  cursor: pointer;
}
.top-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  padding: 0;
}
.top-nav button,
.top-nav .nav-more-toggle {
  min-height: 36px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: #cbd5e1;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}
.top-nav button.active,
.top-nav button:hover,
.top-nav .nav-more-toggle.active,
.top-nav .nav-more-toggle:hover {
  background: rgba(32,217,242,.14);
  border-color: rgba(32,217,242,.42);
  color: #fff;
  box-shadow: 0 0 20px rgba(32,217,242,.1);
}
.top-nav .nav-more {
  position: relative;
}
.nav-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: 220px;
  padding: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(32,217,242,.18);
  border-radius: 8px;
  background: #0b1322;
  box-shadow: 0 22px 60px rgba(0,0,0,.42);
}
.nav-more-menu[hidden] {
  display: none !important;
}
.nav-more-menu button {
  justify-content: space-between;
  width: 100%;
}
.admin-userbar {
  grid-area: tools;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.admin-page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.process-quick-btn {
  flex: 0 0 178px;
  width: 178px;
  min-height: 52px;
  margin-left: clamp(22px, 4vw, 76px);
  margin-right: clamp(18px, 3vw, 54px);
  border: 1px solid rgba(32,217,242,.55);
  border-radius: 14px;
  padding: 8px 18px;
  display: grid;
  gap: 1px;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.38), transparent 32%),
    linear-gradient(135deg, #20d9f2 0%, #3fa0ff 58%, #4389ff 100%);
  color: #061524;
  box-shadow: 0 18px 46px rgba(32,217,242,.30);
  cursor: pointer;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
  isolation: isolate;
}
.process-quick-btn span { font-size: 18px; }
.process-quick-btn strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.process-quick-btn:hover,
.process-quick-btn.active {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(32,217,242,.38);
}
.global-search {
  position: relative;
  flex: 1 1 300px;
  min-width: 240px;
  max-width: 380px;
}
.global-search > input {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}
.global-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.search-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.search-filter input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--cyan);
}
.search-filter.archive {
  border-color: rgba(246,178,61,.30);
}
.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 75;
  max-height: min(520px, calc(100vh - 140px));
  overflow: auto;
  border: 1px solid rgba(32,217,242,.22);
  border-radius: 8px;
  background: #0b1322;
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  padding: 7px;
  display: grid;
  gap: 6px;
}
.global-search-results[hidden] {
  display: none !important;
}
.global-search-row {
  width: 100%;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.global-search-row:hover,
.global-search-row:focus {
  border-color: var(--cyan);
  outline: 0;
  background: rgba(32,217,242,.10);
}
.search-kind,
.search-status {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  background: rgba(32,217,242,.15);
  color: #a6f6ff;
}
.search-kind.ticket { background: rgba(246,178,61,.16); color: #ffd89a; }
.search-kind.client { background: rgba(25,217,140,.14); color: #9ff4cb; }
.search-kind.document { background: rgba(184,108,255,.16); color: #dfc7ff; }
.search-kind.support { background: rgba(255,92,120,.16); color: #ffb8c4; }
.search-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.search-main strong,
.search-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.search-status {
  background: rgba(148,163,184,.13);
  color: var(--muted);
}
.global-search-empty {
  padding: 13px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}
.global-search-empty small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 12px;
}
.home-intro {
  display: grid;
  align-content: center;
  gap: 8px;
}
.home-intro h3 {
  margin: 0;
  font-size: 26px;
}
.home-intro p {
  max-width: 560px;
  font-size: 15px;
}
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.home-action {
  min-height: 92px;
  border: 1px solid rgba(32,217,242,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}
.home-action strong {
  font-size: 18px;
}
.home-action span {
  color: var(--muted);
  font-size: 13px;
}
.home-action.primary {
  background: linear-gradient(135deg, rgba(32,217,242,.96), rgba(72,132,255,.9));
  border-color: rgba(32,217,242,.95);
  color: #04101c;
}
.home-action.primary span {
  color: rgba(4,16,28,.78);
}
.home-action:hover {
  transform: translateY(-1px);
  border-color: rgba(32,217,242,.44);
}

/* Accueil opérationnel : les actions client et le travail du jour avant les listes. */
.dashboard-command-center {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(520px, 1.28fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
  padding: 20px 54px 20px 22px;
  border: 1px solid #173a58;
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 20%, rgba(32,217,242,.17), transparent 32%),
    linear-gradient(135deg, #122334, #172b3e 58%, #123145);
  color: #f8fbff;
  box-shadow: 0 14px 34px rgba(15, 41, 64, .14);
}
.dashboard-command-copy { display: grid; gap: 6px; min-width: 0; }
.dashboard-command-copy .eyebrow { color: #83eaff; }
.dashboard-command-copy h2 { margin: 0; font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.035em; }
.dashboard-command-copy p { margin: 0; max-width: 570px; color: #c8d8e8; font-weight: 650; line-height: 1.5; }
.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.dashboard-quick-action {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-content: center;
  padding: 11px;
  border: 1px solid rgba(199, 226, 247, .18);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #f7fbff;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.dashboard-quick-action > span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #75e9ff;
  font-size: 18px;
  font-weight: 950;
}
.dashboard-quick-action strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dashboard-quick-action small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #adc4d8; font-size: 10.5px; font-weight: 700; }
.dashboard-quick-action:hover { transform: translateY(-2px); border-color: rgba(117,233,255,.58); background: rgba(255,255,255,.12); }
.dashboard-quick-action.primary { border-color: #67ddef; background: linear-gradient(135deg, #28d9ed, #55a8ff); color: #062139; }
.dashboard-quick-action.primary > span { background: rgba(255,255,255,.4); color: #062139; }
.dashboard-quick-action.primary small { color: #17445d; }
.dashboard-refresh {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #dff8ff;
  font-size: 19px;
  cursor: pointer;
}
.dashboard-refresh:hover { background: rgba(255,255,255,.16); }

.dashboard-attention-panel { margin-bottom: 12px; }
.dashboard-updated { color: var(--muted); font-weight: 750; }
.dashboard-attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.dashboard-attention-card {
  --attention: #64748b;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #d6e3ee;
  border-left: 4px solid var(--attention);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.dashboard-attention-card:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(35, 67, 96, .09); }
.dashboard-attention-card.is-clear { opacity: .62; border-left-color: #a9b8c5; }
.dashboard-attention-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--attention) 12%, white); color: var(--attention); font-size: 17px; font-weight: 950; }
.dashboard-attention-copy { display: grid; gap: 3px; min-width: 0; }
.dashboard-attention-copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-attention-copy small { color: var(--muted); font-size: 10.5px; font-weight: 700; line-height: 1.3; }
.dashboard-attention-card > b { min-width: 34px; color: var(--attention); font-size: 25px; text-align: right; }
.tone-blue { --attention: #2877d4; }
.tone-amber { --attention: #d17a00; }
.tone-purple { --attention: #7254cc; }
.tone-cyan { --attention: #078aa3; }
.tone-red { --attention: #cf455b; }
.tone-green { --attention: #178654; }

.dashboard-today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.dashboard-planning-list { display: grid; gap: 8px; }
.dashboard-planning-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d8e5ef;
  border-left: 4px solid #4b8ed8;
  border-radius: 9px;
  background: #fbfdff;
}
.dashboard-planning-row.status-in_progress { border-left-color: #d17a00; background: #fffaf0; }
.dashboard-planning-row.status-done { border-left-color: #24a268; background: #f2fbf7; }
.dashboard-planning-time { display: grid; justify-items: center; padding-right: 9px; border-right: 1px solid #dbe7f0; }
.dashboard-planning-time strong { font-size: 15px; }
.dashboard-planning-time span { color: var(--muted); font-size: 10px; font-weight: 750; }
.dashboard-planning-main { display: grid; gap: 3px; min-width: 0; }
.dashboard-planning-main > strong, .dashboard-planning-main > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-planning-main > strong { font-size: 13px; }
.dashboard-planning-main > small { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.dashboard-planning-actions { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.dashboard-planning-empty { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 20px; border: 1px dashed #b9cfdf; border-radius: 11px; background: #f7fbfe; text-align: center; }
.dashboard-planning-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #e3f5fb; color: #087c99; font-size: 22px; }
.dashboard-planning-empty > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-planning-empty .toolbar { justify-content: center; margin-top: 4px; }

.dashboard-open-total { color: #31506b; font-size: 13px; }
.dashboard-flow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dashboard-flow-card {
  --attention: #64748b;
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 4px 8px;
  padding: 11px;
  border: 1px solid #d8e5ef;
  border-top: 3px solid var(--attention);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.dashboard-flow-card:hover { background: #f2f8fc; border-color: var(--attention); }
.dashboard-flow-card > span { align-self: center; font-size: 12px; font-weight: 850; }
.dashboard-flow-card > strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--attention); font-size: 27px; }
.dashboard-flow-card > small { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.dashboard-attention-reason { padding: 3px 7px; border-radius: 999px; background: #eaf3fb; color: #2d5f88; font-size: 10px; font-weight: 950; white-space: nowrap; }
.dashboard-attention-reason.rank-0, .dashboard-attention-reason.rank-1 { background: #ffe3e8; color: #a51e39; }
.dashboard-attention-reason.rank-2 { background: #fff0cf; color: #875000; }
.dashboard-attention-reason.rank-3 { background: #dcf7e8; color: #147447; }

@media (max-width: 1180px) {
  .dashboard-command-center { grid-template-columns: 1fr; }
  .dashboard-today-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .dashboard-command-center { padding: 17px 48px 17px 17px; }
  .dashboard-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-planning-row { grid-template-columns: 52px minmax(0, 1fr); }
  .dashboard-planning-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 7px; border-top: 1px solid #dbe7f0; }
}
@media (max-width: 520px) {
  .dashboard-command-copy p { font-size: 12px; }
  .dashboard-quick-actions, .dashboard-attention-grid, .dashboard-flow-grid { grid-template-columns: 1fr; }
  .dashboard-quick-action { min-height: 68px; }
  .dashboard-attention-card { min-height: 66px; }
  .dashboard-attention-panel .panel-head, .dashboard-planning-panel .panel-head, .dashboard-flow-panel .panel-head { align-items: flex-start; }
  .dashboard-updated { display: none; }
  .dashboard-planning-row { grid-template-columns: 46px minmax(0, 1fr); padding: 9px 8px; }
  .dashboard-planning-actions .btn { flex: 1 1 105px; }
}
.simple-stat-grid {
  margin-bottom: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.service-admin-panel {
  margin-bottom: 12px;
  border-color: #a5f3fc;
  background: linear-gradient(135deg, #ffffff, #eef9ff);
}

.service-admin-list {
  display: grid;
  gap: 8px;
}

.service-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d7e5f1;
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}

.service-admin-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-admin-row strong {
  color: var(--ink);
}

.service-admin-row span,
.service-admin-row small {
  color: var(--muted);
  font-weight: 750;
}

.service-admin-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-ticket-list,
.receivable-list {
  display: grid;
  gap: 10px;
}
.dashboard-ticket-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(150px, .65fr) minmax(170px, .72fr);
  gap: 10px 14px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
  min-width: 0;
}
.dashboard-ticket-main,
.dashboard-ticket-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.dashboard-ticket-top,
.dashboard-ticket-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.dashboard-ticket-top strong {
  font-size: 14px;
}
.dashboard-ticket-title {
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.dashboard-ticket-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.dashboard-ticket-sub .planning-pill {
  margin-top: 0;
  max-width: 100%;
}
.dashboard-ticket-meta > span,
.receivable-main span,
.receivable-main small,
.receivable-amount span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.dashboard-ticket-meta strong,
.dashboard-ticket-meta small,
.receivable-main strong,
.receivable-main span,
.receivable-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-ticket-meta small {
  color: var(--muted);
  font-weight: 750;
}
.dashboard-ticket-actions,
.receivable-actions,
.receivable-state {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.dashboard-ticket-actions {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid #dbe8f3;
}
.dashboard-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.dash-action {
  min-height: 30px;
  border: 1px solid #c9d9e7;
  border-radius: 8px;
  background: #f8fbfe;
  color: var(--ink);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.dash-action:hover {
  border-color: #7fb3d7;
  background: #eef7ff;
}
.dash-action.primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-color: transparent;
  color: #031426;
}
.dash-action.blue {
  background: #e8f2ff;
  border-color: #bdd8ff;
  color: #1554ad;
}
.dash-action.green {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.dash-action.warn {
  background: #fff7d6;
  border-color: #fde68a;
  color: #92400e;
}
.receivable-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .04);
}
.receivable-main,
.receivable-amount {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.receivable-main strong {
  font-size: 13px;
}
.receivable-amount {
  justify-items: end;
}
.receivable-amount strong {
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
}
.receivable-state {
  justify-content: flex-start;
}
.receivable-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: 7px;
  border-top: 1px solid #dbe8f3;
}

.support-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.support-attachment {
  width: 118px;
  border: 1px solid rgba(123,151,176,.34);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  color: inherit;
  overflow: hidden;
  text-decoration: none;
}
.support-attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e8f0;
}
.support-attachment span {
  display: block;
  padding: 6px 7px;
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .dashboard-workspace { grid-template-columns: 1fr; }
  .dashboard-ticket-row { grid-template-columns: minmax(240px, 1fr) minmax(150px, .55fr) minmax(160px, .55fr); }
}

@media (max-width: 820px) {
  .service-admin-row { grid-template-columns: 1fr; }
  .service-admin-actions { justify-content: flex-start; }
  .dashboard-ticket-row { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .dashboard-ticket-main,
  .dashboard-ticket-actions { grid-column: 1 / -1; }
  .dashboard-ticket-actions { justify-content: flex-start; }
  .receivable-card { grid-template-columns: 1fr; }
  .receivable-amount,
  .receivable-actions { justify-items: start; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .dashboard-ticket-row { grid-template-columns: 1fr; }
  .dash-action { flex: 1 1 118px; }
}

@media (max-width: 1180px) {
  .admin-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "tools"
      "nav";
    align-items: stretch;
  }
  .admin-brand {
    min-width: 0;
    justify-items: center;
    text-align: center;
  }
  .admin-userbar {
    min-width: 0;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
  }
  .global-search {
    flex: 1 1 360px;
    max-width: none;
  }
  .top-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 820px) {
  .admin-header {
    padding: 10px;
    gap: 9px;
  }
  .top-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    flex-wrap: initial;
    overflow: visible;
  }
  .top-nav button,
  .top-nav .nav-more-toggle {
    width: 100%;
    min-height: 36px;
    padding: 0 8px;
  }
  .top-nav .nav-more {
    width: 100%;
    grid-column: 1 / -1;
  }
  .top-nav .nav-more-toggle {
    width: 100%;
  }
  .nav-more-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-userbar {
    flex-wrap: wrap;
  }
  .admin-userbar h2 {
    width: 100%;
  }
  .global-search {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
  }
  .global-search-results {
    max-height: min(420px, calc(100vh - 170px));
  }
  .global-search-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .search-status {
    grid-column: 2;
    justify-self: start;
  }
  .home-hero,
  .home-actions {
    grid-template-columns: 1fr;
  }
  .home-intro {
    text-align: center;
  }
  .home-action {
    min-height: 76px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .admin-brand strong {
    font-size: 17px;
  }
  .top-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-userbar .btn {
    flex: 1 1 110px;
  }
  .global-search-row {
    grid-template-columns: 1fr;
  }
  .search-kind,
  .search-status {
    justify-self: start;
  }
  .search-status {
    grid-column: auto;
  }
  .nav-more-menu {
    grid-template-columns: 1fr;
  }
  .home-intro h3 {
    font-size: 22px;
  }
}

/* Softer, clearer admin direction */
body:has(.admin-top-shell) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(246,251,255,.94)),
    radial-gradient(circle at 12% 0%, rgba(18,200,223,.22), transparent 32%),
    radial-gradient(circle at 95% 8%, rgba(236,72,153,.12), transparent 30%),
    #eef7ff;
  color: #132238;
}
.admin-top-shell {
  --bg: #eef7ff;
  --panel: #ffffff;
  --panel-soft: #f7fbff;
  --text: #132238;
  --muted: #64748b;
  --border: #cfe0ef;
  --ink: #0f2342;
  --cyan: #12c8df;
  --pink: #ec4899;
  --green: #16a34a;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #8b5cf6;
  --shadow: 0 18px 45px rgba(34, 74, 116, .12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.92)),
    radial-gradient(circle at 10% 0%, rgba(18,200,223,.22), transparent 34%),
    radial-gradient(circle at 96% 10%, rgba(236,72,153,.13), transparent 32%),
    #eef7ff;
  color: var(--text);
}
.admin-top-shell .main,
.admin-top-shell .content {
  background: transparent;
}
.admin-header,
.admin-top-shell .topbar,
.admin-top-shell .app-footer {
  background: rgba(255,255,255,.9);
  border-color: rgba(148,163,184,.22);
  color: var(--text);
  backdrop-filter: blur(16px);
}
.admin-header {
  box-shadow: 0 12px 34px rgba(28,62,100,.12);
}
.admin-brand strong,
.admin-userbar h2,
.admin-top-shell .panel h3,
.admin-top-shell .detail-main h3,
.admin-top-shell .detail-side h3,
.admin-top-shell .panel h4 {
  color: #102039;
}
.admin-brand span,
.admin-top-shell .eyebrow {
  color: #0891b2;
}
.top-nav button,
.top-nav .nav-more-toggle,
.admin-userbar .btn,
.admin-top-shell .btn {
  background: #fff;
  color: #18304d;
  border-color: rgba(148,163,184,.26);
  box-shadow: 0 6px 16px rgba(30,64,105,.06);
}
.top-nav button.active,
.top-nav button:hover,
.top-nav .nav-more-toggle.active,
.top-nav .nav-more-toggle:hover {
  background: linear-gradient(135deg, #19d3e6, #4f8df7);
  border-color: transparent;
  color: #061524;
  box-shadow: 0 10px 24px rgba(18,200,223,.22);
}
.nav-more-menu {
  background: #ffffff;
  border-color: rgba(148,163,184,.24);
  box-shadow: 0 18px 48px rgba(28,62,100,.16);
}
.admin-top-shell .panel,
.admin-top-shell .stat,
.admin-top-shell .detail-side,
.admin-top-shell .mini-item,
.admin-top-shell .relation-box,
.admin-top-shell .support-card,
.admin-top-shell .kanban-column,
.admin-top-shell .support-column,
.admin-top-shell .mail-folder,
.admin-top-shell .monitor-row,
.admin-top-shell .acct-chart,
.admin-top-shell .modal {
  background: rgba(255,255,255,.96);
  border-color: rgba(148,163,184,.24);
  color: var(--text);
  box-shadow: var(--shadow);
}
.admin-top-shell .panel-main {
  border-color: rgba(18,200,223,.24);
}
.home-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,250,255,.96)),
    radial-gradient(circle at 90% 18%, rgba(236,72,153,.16), transparent 30%);
  border-color: rgba(18,200,223,.3);
}
.home-intro h3 {
  color: #102039;
}
.home-action {
  background: #ffffff;
  border-color: rgba(148,163,184,.28);
  color: #102039;
}
.home-action:nth-child(2) { border-left: 5px solid var(--blue); }
.home-action:nth-child(3) { border-left: 5px solid var(--green); }
.home-action:nth-child(4) { border-left: 5px solid var(--amber); }
.home-action:nth-child(5) { border-left: 5px solid var(--pink); }
.home-action.primary {
  background: linear-gradient(135deg, #20d9f2, #60a5fa);
  color: #061524;
}
.admin-top-shell .ops-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(229,246,255,.97)),
    radial-gradient(circle at 88% 10%, rgba(236,72,153,.14), transparent 34%);
}
.admin-top-shell .autopilot-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(225,247,253,.98)),
    radial-gradient(circle at 85% 10%, rgba(59,130,246,.16), transparent 36%);
}
.admin-top-shell .autopilot-coach {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(232,246,255,.98)),
    radial-gradient(circle at 92% 12%, rgba(184,108,255,.13), transparent 34%);
  border-color: rgba(32,217,242,.24);
}
.admin-top-shell .autopilot-chat {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(226,247,252,.98)),
    radial-gradient(circle at 88% 8%, rgba(32,217,242,.14), transparent 34%);
  border-color: rgba(32,217,242,.26);
}
.admin-top-shell .autopilot-agent {
  background: #ffffff;
  border-color: rgba(148,163,184,.28);
}
.admin-top-shell .autopilot-run-current {
  background: #f8fcff;
  border-color: rgba(148,163,184,.28);
}
.admin-top-shell .ops-alert,
.admin-top-shell .team-task,
.admin-top-shell .autopilot-action,
.admin-top-shell .autopilot-ticket,
.admin-top-shell .coach-card,
.admin-top-shell .autopilot-chat-bubble,
.admin-top-shell .autopilot-candidate,
.admin-top-shell .agent-answer-grid > div,
.admin-top-shell .agent-message-ready,
.admin-top-shell .agent-linked-strip {
  background: #ffffff;
  border-color: rgba(148,163,184,.28);
  color: #132238;
}
.admin-top-shell .autopilot-chat-bubble.user,
.admin-top-shell .agent-answer-summary {
  background: #e9fbff;
  border-color: rgba(32,217,242,.35);
  color: #102039;
}
.admin-top-shell .email-test-form,
.admin-top-shell .email-test-preview {
  background: #f8fcff;
  border-color: rgba(148,163,184,.28);
  color: #132238;
}
.admin-top-shell .ops-alert p,
.admin-top-shell .ops-alert span,
.admin-top-shell .autopilot-action-main p,
.admin-top-shell .autopilot-action-main small,
.admin-top-shell .autopilot-action-main span,
.admin-top-shell .autopilot-ticket p,
.admin-top-shell .autopilot-ticket ul,
.admin-top-shell .autopilot-coach p,
.admin-top-shell .autopilot-chat-bubble p,
.admin-top-shell .autopilot-candidate span,
.admin-top-shell .agent-answer-grid ul,
.admin-top-shell .agent-answer-grid ol,
.admin-top-shell .coach-card span,
.admin-top-shell .coach-card small,
.admin-top-shell .coach-card ol,
.admin-top-shell .team-task-main p,
.admin-top-shell .team-task-main small {
  color: #64748b;
}
.admin-top-shell .agent-message-ready pre {
  color: #102039;
}
.admin-top-shell .difficulty {
  background: #e8f0ff;
  color: #1d4ed8;
  border-color: #c7d8ff;
}
.admin-top-shell .stat {
  min-height: 92px;
  position: relative;
  overflow: hidden;
}
.admin-top-shell .stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--cyan);
}
.admin-top-shell .stat:nth-child(2)::before { background: var(--blue); }
.admin-top-shell .stat:nth-child(3)::before { background: var(--amber); }
.admin-top-shell .stat:nth-child(4)::before { background: var(--green); }
.admin-top-shell .stat span,
.admin-top-shell .muted,
.admin-top-shell .mini-item span,
.admin-top-shell .relation-box p,
.admin-top-shell .event span {
  color: #64748b;
}
.admin-top-shell .stat strong {
  color: #102039;
}
.admin-top-shell .btn.primary,
.admin-top-shell .segmented button.active {
  background: linear-gradient(135deg, #20d9f2, #60a5fa);
  border-color: transparent;
  color: #061524;
}
.admin-top-shell .btn.green { background: #22c55e; border-color: #22c55e; color: #052e16; }
.admin-top-shell .btn.blue { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.admin-top-shell .btn.warn { background: #fbbf24; border-color: #fbbf24; color: #3a2500; }
.admin-top-shell .btn.red { background: #fb7185; border-color: #fb7185; color: #fff; }
.admin-top-shell input,
.admin-top-shell select,
.admin-top-shell textarea,
.admin-top-shell .search,
.admin-top-shell .mini-select {
  background: #fff;
  color: #132238;
  border-color: #cbddea;
}
.admin-top-shell input:focus,
.admin-top-shell select:focus,
.admin-top-shell textarea:focus,
.admin-top-shell .search:focus {
  border-color: #20c7dd;
  box-shadow: 0 0 0 3px rgba(32,199,221,.16);
}
.admin-top-shell th {
  background: #f1f7fc;
  color: #466078;
  border-bottom-color: #d8e6f2;
}
.admin-top-shell td {
  border-bottom-color: #e6eef6;
}
.admin-top-shell .production-table-wrap,
.admin-top-shell .mail-list,
.admin-top-shell .mail-message,
.admin-top-shell .bank-panel,
.admin-top-shell .indy-export-box {
  background: rgba(255,255,255,.96);
  border-color: rgba(148,163,184,.24);
}
.admin-top-shell .indy-export-box {
  background:
    linear-gradient(135deg, rgba(255,251,235,.98), rgba(238,251,255,.98));
}
.admin-top-shell .mail-ai-box {
  background: linear-gradient(135deg, #eefbff, #f4f8ff);
  border-color: #b9dced;
}
.admin-top-shell .mail-ai-head strong,
.admin-top-shell .mail-ai-actions select {
  color: #102039;
}
.admin-top-shell .mail-state.unseen { background: #e0f7fb; color: #0e7490; }
.admin-top-shell .mail-state.seen { background: #dcfce7; color: #166534; }
.admin-top-shell .mail-state.answered { background: #ede9fe; color: #6d28d9; }
.admin-top-shell .mail-state.pending { background: #fef3c7; color: #92400e; }
.admin-top-shell .mail-state.flagged { background: #ffe4e6; color: #be123c; }
.admin-top-shell .mail-log-type { background: #e0f7fb; color: #0e7490; border-color: #bae6fd; }
.admin-top-shell .mail-log-count { background: #f8fcff; }
.admin-top-shell .mail-log-body { background: #ffffff; color: #102039; }
.admin-top-shell .kanban-column.todo { background: #fff7ed; border-color: #fed7aa; }
.admin-top-shell .kanban-column.waiting { background: #fffbeb; border-color: #fde68a; }
.admin-top-shell .kanban-column.progress { background: #eff6ff; border-color: #bfdbfe; }
.admin-top-shell .kanban-column.pickup { background: #fff7ed; border-color: #fdba74; }
.admin-top-shell .kanban-column.done { background: #ecfdf5; border-color: #bbf7d0; }
.admin-top-shell .kanban-column header span {
  background: rgba(255,255,255,.78);
  color: #334155;
}
.admin-top-shell .kanban-card {
  background: #ffffff;
  border-color: rgba(148,163,184,.28);
  color: #132238;
}
.admin-top-shell .ticket-type.repair { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.admin-top-shell .ticket-type.order { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.admin-top-shell .deadline-pill { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.admin-top-shell .deadline-pill.overdue { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.admin-top-shell .deadline-pill.review,
.admin-top-shell .deadline-pill.review-pending { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.admin-top-shell .planning-pill { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.admin-top-shell .planning-pill.planned { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.admin-top-shell .planning-pill.in_progress { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.admin-top-shell .planning-pill.done { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.admin-top-shell .planning-pill.cancelled { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.admin-top-shell .planning-pill.past { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.admin-top-shell .equipment-tag { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.admin-top-shell .ticket-doc-chip {
  background: #f1f5f9;
  color: #475569;
  border-color: #dbe5ef;
}
.admin-top-shell .ticket-doc-chip.quote { background: #f3e8ff; color: #6d28d9; border-color: #e9d5ff; }
.admin-top-shell .ticket-doc-chip.invoice { background: #e0f7fb; color: #0e7490; border-color: #a5f3fc; }
.admin-top-shell .ticket-doc-chip.invoice.sent,
.admin-top-shell .ticket-doc-chip.invoice.overdue { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.admin-top-shell .ticket-doc-chip.invoice.paid,
.admin-top-shell .ticket-doc-chip.quote.accepted { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.admin-top-shell .ticket-doc-chip.quote.refused,
.admin-top-shell .ticket-doc-chip.quote.expired,
.admin-top-shell .ticket-doc-chip.quote.cancelled,
.admin-top-shell .ticket-doc-chip.quote.archived,
.admin-top-shell .ticket-doc-chip.invoice.cancelled { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.admin-top-shell .ticket-doc-chip small,
.admin-top-shell .ticket-doc-chip b {
  background: rgba(255,255,255,.72);
}
.admin-top-shell .pill.new,
.admin-top-shell .pill.draft { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.admin-top-shell .pill.ready,
.admin-top-shell .pill.paid { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.admin-top-shell .pill.credit_note { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.admin-top-shell .pill.irreparable { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.admin-top-shell .pill.waiting_client,
.admin-top-shell .pill.overdue { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.admin-top-shell .pill.waiting_part { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.admin-top-shell .pill.repairing,
.admin-top-shell .pill.accepted { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
.admin-top-shell .empty {
  background: rgba(255,255,255,.72);
  border-color: #cbddea;
  color: #64748b;
}
.admin-top-shell .modal-backdrop {
  background: rgba(15, 37, 61, .35);
}
.admin-top-shell .modal {
  color: #132238;
}

.process-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid rgba(32,217,242,.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(32,217,242,.13), rgba(67,137,255,.10)), var(--panel);
  box-shadow: 0 18px 42px rgba(15,23,42,.12);
}
.process-hero h3 { margin: 3px 0 8px; font-size: 28px; }
.process-hero p { margin: 0; max-width: 760px; color: var(--muted); }
.process-hero-stats {
  min-width: 150px;
  min-height: 92px;
  border: 1px solid rgba(32,217,242,.24);
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(255,255,255,.55);
  padding: 12px;
  gap: 8px;
}
.process-hero-stats strong { font-size: 34px; color: var(--text); line-height: 1; }
.process-hero-stats span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.process-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.process-lane {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 150px;
}
.process-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.process-lane-head strong {
  color: var(--text);
  font-size: 15px;
}
.process-lane-head span {
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f3ff;
  color: #2563eb;
  font-weight: 950;
}
.process-lane-card {
  width: 100%;
  border: 1px solid #cbddea;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,248,255,.86));
  padding: 11px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15,23,42,.07);
}
.process-lane-card:hover {
  transform: translateY(-1px);
  border-color: rgba(32,217,242,.56);
}
.process-lane-card span {
  color: #087f95;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.process-lane-card strong {
  color: var(--text);
  font-size: 16px;
}
.process-lane-card small,
.process-lane-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.process-card {
  display: grid;
  gap: 13px;
  align-content: start;
  border: 1px solid rgba(148,163,184,.24);
  border-top: 5px solid var(--cyan);
  border-radius: 14px;
  background: var(--panel);
  padding: 18px;
  min-height: 440px;
  box-shadow: 0 18px 42px rgba(15,23,42,.10);
}
.process-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.process-card header span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(32,217,242,.12);
  color: #087f95;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.process-card h3 { margin: 8px 0 0; font-size: 26px; }
.process-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.process-status-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(32,217,242,.20);
  border-radius: 12px;
  background: rgba(32,217,242,.07);
  padding: 10px;
}
.process-status-line strong {
  color: #087f95;
  font-size: 13px;
  text-transform: uppercase;
}
.process-status-line span {
  color: var(--text);
  font-weight: 850;
  line-height: 1.35;
}
.process-progress {
  height: 9px;
  border-radius: 999px;
  background: rgba(148,163,184,.20);
  overflow: hidden;
}
.process-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20d9f2, #4389ff);
}
.process-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.process-progress-label strong { color: var(--text); }
.process-lock {
  border: 1px solid rgba(245,158,11,.28);
  border-radius: 11px;
  background: rgba(245,158,11,.10);
  color: #92400e;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
}
.process-blueprint {
  border: 1px solid rgba(67,137,255,.18);
  border-radius: 12px;
  background: rgba(67,137,255,.06);
  padding: 10px 12px;
  color: var(--muted);
  line-height: 1.45;
}
.process-blueprint summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 950;
}
.process-checklist {
  display: grid;
  gap: 9px;
}
.process-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 10px;
  align-items: start;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.55);
  cursor: pointer;
}
.process-check input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: #20d9f2;
}
.process-check input:disabled,
.process-ticket-review :disabled {
  cursor: not-allowed;
  opacity: .62;
}
.process-check span {
  line-height: 1.35;
  font-weight: 850;
}
.process-check small {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.process-check.done {
  border-color: rgba(25,217,140,.32);
  background: rgba(25,217,140,.08);
}
.process-check.done span {
  color: #0f766e;
}
.process-ticket-reviews {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(148,163,184,.22);
  padding-top: 12px;
}
.process-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.process-ticket-head strong {
  color: var(--text);
  font-size: 15px;
}
.process-ticket-head span {
  border-radius: 999px;
  background: rgba(32,217,242,.14);
  color: #087f95;
  padding: 4px 9px;
  font-weight: 950;
  font-size: 12px;
}
.process-ticket-review {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(148,163,184,.26);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  padding: 10px;
}
.process-ticket-review.done {
  border-color: rgba(25,217,140,.34);
  background: rgba(25,217,140,.08);
}
.process-ticket-main {
  display: grid;
  gap: 3px;
}
.process-ticket-main .linklike {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.process-ticket-main .linklike:hover { color: #0ea5e9; }
.process-ticket-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.process-ticket-fields {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) auto minmax(150px, 1fr);
  gap: 8px;
}
.process-ticket-fields select,
.process-ticket-fields input,
.process-ticket-fields textarea {
  min-width: 0;
  border: 1px solid #cbddea;
  border-radius: 10px;
  background: rgba(255,255,255,.86);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-weight: 800;
}
.process-ticket-fields textarea {
  grid-column: 1 / -1;
  min-height: 64px;
  resize: vertical;
}
.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.process-ticket-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.process-ticket-actions small {
  color: var(--muted);
  font-weight: 850;
}
.process-card footer {
  margin-top: auto;
  border-top: 1px solid rgba(148,163,184,.22);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.process-blue { border-top-color: #4389ff; }
.process-pink { border-top-color: #e84aa8; }
.process-green { border-top-color: #19d98c; }
.process-cyan { border-top-color: #20d9f2; }
.process-orange { border-top-color: #f6b23d; }
.process-note-panel { margin-top: 14px; }

@media (max-width: 820px) {
  .admin-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand mobile"
      "tools tools"
      "nav nav";
    align-items: center;
    padding: 9px 10px;
    gap: 8px;
  }
  .admin-brand {
    justify-items: start;
    text-align: left;
  }
  .admin-brand strong {
    font-size: 17px;
  }
  .admin-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    color: #062033;
    background: linear-gradient(135deg, rgba(32,217,242,.92), rgba(72,132,255,.86));
    border-color: rgba(32,217,242,.62);
    box-shadow: 0 8px 22px rgba(32, 116, 160, .18);
  }
  .admin-userbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    justify-items: stretch;
  }
  .admin-userbar .btn {
    min-height: 38px;
  }
  .admin-userbar > .btn,
  .admin-userbar > a.btn {
    width: 100%;
    order: 2;
  }
  .admin-userbar .global-search,
  .admin-userbar .client-live-chip,
  .admin-userbar .process-quick-btn {
    grid-column: 1 / -1;
  }
  .admin-userbar .process-quick-btn {
    order: 0;
    width: 100%;
    min-height: 46px;
  }
  .admin-userbar .global-search {
    order: 1;
  }
  .admin-userbar .client-live-chip {
    order: 2;
  }
  .top-nav {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    transition: max-height .18s ease, opacity .14s ease, padding .18s ease, border-color .18s ease;
  }
  .admin-header.mobile-nav-open .top-nav {
    max-height: min(58vh, 430px);
    opacity: 1;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(123,151,176,.34);
    border-radius: 8px;
    background: rgba(247,251,255,.98);
    box-shadow: 0 16px 34px rgba(28,62,100,.14);
  }
  .top-nav button,
  .top-nav .nav-more-toggle {
    min-height: 42px;
  }
  .top-nav .nav-more {
    grid-column: 1 / -1;
  }
  .nav-more-menu {
    max-height: 42vh;
    overflow: auto;
  }
  .admin-top-shell .content {
    padding: 10px;
  }
  .home-hero {
    gap: 14px;
  }
  .client-live-chip {
    max-width: none;
    width: 100%;
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
    order: 2;
  }
  .client-live-chip:not(.idle) {
    padding-left: 34px;
  }
  .client-live-chip:not(.idle)::before {
    left: 15px;
    top: 18px;
  }
  .client-activity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-activity-row .client-activity-main {
    grid-template-columns: 1fr;
  }
  .activity-kind {
    width: max-content;
  }
  .process-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .process-hero h3 {
    font-size: 23px;
  }
  .process-hero-stats {
    min-height: 74px;
    min-width: 0;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-workflow {
    grid-template-columns: 1fr;
  }
  .process-card {
    min-height: 0;
    padding: 15px;
  }
  .process-ticket-fields {
    grid-template-columns: 1fr;
  }
  .process-ticket-fields textarea {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .admin-top-shell .dashboard-workspace {
    gap: 12px;
  }
  .admin-top-shell .dashboard-workspace .panel {
    overflow: visible;
  }
  .admin-top-shell .dashboard-workspace table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }
  .admin-top-shell .dashboard-workspace thead {
    display: none;
  }
  .admin-top-shell .dashboard-workspace tbody,
  .admin-top-shell .dashboard-workspace tr,
  .admin-top-shell .dashboard-workspace td {
    display: block;
    width: 100%;
  }
  .admin-top-shell .dashboard-workspace tr {
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d8e6f2;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(34, 74, 116, .08);
  }
  .admin-top-shell .dashboard-workspace td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 6px 0;
    text-align: right;
  }
  .admin-top-shell .dashboard-workspace td::before {
    flex: 0 0 88px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
  }
  .admin-top-shell .dashboard-workspace td[colspan] {
    display: block;
    text-align: center;
    color: #64748b;
  }
  .admin-top-shell .dashboard-workspace td[colspan]::before {
    content: none;
  }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(1)::before { content: "Ticket"; }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(2)::before { content: "Client"; }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(3)::before { content: "Matériel"; }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(4)::before { content: "Statut"; }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(5)::before { content: "MAJ"; }
  .admin-top-shell .dashboard-workspace .panel:first-child td:nth-child(6)::before { content: "Actions"; }
  .admin-top-shell .dashboard-workspace .panel:nth-child(2) td:nth-child(1)::before { content: "Numéro"; }
  .admin-top-shell .dashboard-workspace .panel:nth-child(2) td:nth-child(2)::before { content: "Client"; }
  .admin-top-shell .dashboard-workspace .panel:nth-child(2) td:nth-child(3)::before { content: "Total"; }
  .admin-top-shell .dashboard-workspace .panel:nth-child(2) td:nth-child(4)::before { content: "Statut"; }
  .admin-top-shell .dashboard-workspace .panel:nth-child(2) td:nth-child(5)::before { content: "Date"; }
  .admin-top-shell .dashboard-workspace td:first-child {
    display: block;
    text-align: left;
  }
  .admin-top-shell .dashboard-workspace td:first-child::before {
    display: block;
    margin-bottom: 4px;
  }
  .admin-top-shell .dashboard-workspace td.right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .admin-top-shell .dashboard-workspace td.right::before {
    flex-basis: 100%;
    margin-bottom: 2px;
  }
  .admin-top-shell .dashboard-workspace td.right .btn {
    flex: 1 1 88px;
    justify-content: center;
  }
  .admin-top-shell .dashboard-workspace td[colspan]::before {
    content: none !important;
  }
}

/* Balanced admin theme: less bright, still readable */
.login {
  background:
    linear-gradient(180deg, rgba(224,237,247,.96), rgba(214,227,238,.98)),
    #dce9f3;
}
.login-card {
  background: #f7fbff;
  border-color: #b9ccdc;
  box-shadow: 0 16px 36px rgba(35,67,96,.12);
}
body:has(.admin-top-shell) {
  background:
    linear-gradient(180deg, rgba(224,237,247,.96), rgba(214,227,238,.98)),
    #dce9f3;
  color: #102036;
}
.admin-top-shell {
  --bg: #dce9f3;
  --panel: #f7fbff;
  --panel-soft: #edf5fb;
  --text: #102036;
  --muted: #556b84;
  --border: #b9ccdc;
  --ink: #10243d;
  --cyan: #0aaec4;
  --pink: #cf3f97;
  --green: #128052;
  --blue: #2f6fd6;
  --amber: #f2a51d;
  --red: #d93655;
  --violet: #7c4dd8;
  --shadow: 0 16px 36px rgba(35,67,96,.12);
  background:
    linear-gradient(180deg, rgba(224,237,247,.9), rgba(214,227,238,.96)),
    #dce9f3;
}
.admin-header,
.admin-top-shell .topbar,
.admin-top-shell .app-footer {
  background: rgba(238,246,251,.96);
  border-color: rgba(123,151,176,.3);
}
.admin-top-shell .panel,
.admin-top-shell .stat,
.admin-top-shell .detail-side,
.admin-top-shell .mini-item,
.admin-top-shell .relation-box,
.admin-top-shell .support-card,
.admin-top-shell .kanban-column,
.admin-top-shell .support-column,
.admin-top-shell .mail-folder,
.admin-top-shell .monitor-row,
.admin-top-shell .acct-chart,
.admin-top-shell .modal {
  background: rgba(247,251,255,.97);
  border-color: rgba(123,151,176,.32);
  box-shadow: var(--shadow);
}
.home-hero,
.admin-top-shell .indy-export-box {
  background: linear-gradient(135deg, rgba(244,250,255,.98), rgba(226,240,248,.98));
}
.top-nav button,
.top-nav .nav-more-toggle,
.admin-userbar .btn,
.admin-top-shell .btn {
  background: #f8fcff;
  border-color: rgba(123,151,176,.34);
}
.nav-more-menu {
  background: #f7fbff;
  border-color: rgba(123,151,176,.34);
}
.admin-top-shell .global-search-results {
  background: #f7fbff;
  border-color: rgba(123,151,176,.34);
  box-shadow: 0 18px 48px rgba(28,62,100,.18);
}
.admin-top-shell .search-filter {
  background: #f8fcff;
  border-color: rgba(123,151,176,.34);
  color: #405975;
}
.admin-top-shell .search-filter.archive {
  border-color: rgba(246,178,61,.40);
}
.admin-top-shell .global-search-row {
  background: #ffffff;
  border-color: rgba(123,151,176,.26);
  color: #102036;
}
.admin-top-shell .global-search-row:hover,
.admin-top-shell .global-search-row:focus {
  background: #ecfbff;
  border-color: #0aaec4;
}
.admin-top-shell .search-main small,
.admin-top-shell .global-search-empty {
  color: #556b84;
}
.admin-top-shell .search-status {
  background: #edf5fb;
  color: #405975;
}
.admin-top-shell .search-kind.ticket { background: #fff3df; color: #9a5d00; }
.admin-top-shell .search-kind.client { background: #e8f8f1; color: #12683f; }
.admin-top-shell .search-kind.document { background: #f1e9ff; color: #6d28d9; }
.admin-top-shell .search-kind.support { background: #ffe8ee; color: #be123c; }
.admin-top-shell input,
.admin-top-shell select,
.admin-top-shell textarea,
.admin-top-shell .search,
.admin-top-shell .mini-select {
  background: #f9fcff;
  border-color: #b9ccdc;
}
.admin-top-shell th {
  background: #e8f2f9;
  color: #405975;
}
.admin-top-shell td {
  border-bottom-color: #d7e4ee;
}
.admin-top-shell .production-table-wrap,
.admin-top-shell .mail-list,
.admin-top-shell .mail-message,
.admin-top-shell .bank-panel {
  background: rgba(247,251,255,.97);
  border-color: rgba(123,151,176,.32);
}
.admin-top-shell .kanban-column.todo { background: #fff3df; border-color: #f5cf92; }
.admin-top-shell .kanban-column.waiting { background: #fff8e7; border-color: #efd783; }
.admin-top-shell .kanban-column.progress { background: #e9f2ff; border-color: #afc7f0; }
.admin-top-shell .kanban-column.pickup { background: #fff4e5; border-color: #e8b66d; }
.admin-top-shell .kanban-column.done { background: #e8f8f1; border-color: #a9d9c1; }
.admin-top-shell .kanban-card {
  background: #f8fcff;
  border-color: rgba(123,151,176,.34);
}
.admin-top-shell .empty {
  background: rgba(238,246,251,.82);
  border-color: rgba(123,151,176,.34);
}
.admin-top-shell .modal-backdrop {
  background: rgba(15, 32, 54, .56);
}

@media (max-width: 640px) {
  .admin-top-shell .dashboard-workspace tr {
    background: #f7fbff;
    border-color: rgba(123,151,176,.34);
  }
}

.planning-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.planning-hero h3 { margin: 2px 0 6px; }
.planning-hero p { margin: 0; }
.planning-hero-actions,
.planning-toolbar,
.planning-item-actions,
.planning-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.planning-toolbar {
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(123,151,176,.28);
}
.planning-toolbar .inline-field {
  min-width: 150px;
  margin-bottom: 0;
}
.planning-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 9px;
}
.planning-status-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.planning-status-chip.status-planned,
.planning-status-select.status-planned {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.planning-status-chip.status-in_progress,
.planning-status-select.status-in_progress {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.planning-status-chip.status-done,
.planning-status-select.status-done {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.planning-status-chip.status-cancelled,
.planning-status-select.status-cancelled {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}
.planning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 10px;
  align-items: start;
}
.planning-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(142px, 1fr));
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.planning-day {
  height: clamp(360px, calc(100vh - 238px), 620px);
  min-height: 0;
  background: #f8fcff;
  border: 1px solid rgba(123,151,176,.32);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.planning-day.today {
  border-color: rgba(10,174,196,.55);
  box-shadow: 0 0 0 3px rgba(10,174,196,.08);
}
.planning-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px;
  background: linear-gradient(135deg, #edf8ff, #f8fcff);
  border-bottom: 1px solid rgba(123,151,176,.24);
}
.planning-day header span {
  display: block;
  color: #0a8fa3;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.planning-day header strong {
  color: #102036;
  font-size: 12px;
}
.planning-day header em {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #dff6fb;
  color: #0a8fa3;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}
.planning-day-list {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 7px;
  min-width: 0;
  overflow: auto;
  flex: 1;
}
.planning-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(123,151,176,.34);
  border-left: 4px solid #2f6fd6;
  border-radius: 8px;
  padding: 7px;
  box-shadow: 0 4px 10px rgba(35,67,96,.06);
}
.planning-item.priority-urgent,
.planning-item.priority-high { border-left-color: #d93655; }
.planning-item.priority-low { border-left-color: #128052; }
.planning-item.status-planned {
  border-left-color: #2f6fd6;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}
.planning-item.status-in_progress {
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, #ffffff, #f5f3ff);
}
.planning-item.status-done {
  border-left-color: #128052;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  opacity: .9;
}
.planning-item.status-cancelled {
  border-left-color: #94a3b8;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  opacity: .72;
}
.planning-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.planning-item-head strong {
  color: #102036;
  font-size: 12px;
}
.planning-item-head span:not(.planning-status-chip) {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e8f2f9;
  color: #405975;
  font-size: 10px;
  font-weight: 900;
}
.planning-item h4 {
  margin: 0;
  color: #102036;
  font-size: 12px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.planning-item p {
  margin: 0;
  color: #556b84;
  font-size: 10.5px;
  line-height: 1.22;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.planning-details {
  display: none;
}
.planning-meta {
  justify-content: space-between;
  color: #405975;
  font-size: 10px;
  font-weight: 850;
}
.planning-item-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.planning-item-actions .btn,
.planning-item-actions .mini-select {
  flex: initial;
  min-width: 0;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}
.planning-side {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
}
.planning-side h3 {
  margin: 0;
  color: #102036;
  font-size: 15px;
}
.planning-side hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(123,151,176,.28);
}
.planning-users,
.planning-ticket-pool {
  display: grid;
  gap: 6px;
}
.planning-ticket-pool {
  max-height: min(420px, calc(100vh - 420px));
  overflow: auto;
  padding-right: 2px;
}
.client-table-wrap {
  overflow: auto;
  border: 1px solid rgba(123,151,176,.28);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.client-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
  padding: 10px 12px;
  background: rgba(238,246,251,.9);
  border: 1px solid rgba(123,151,176,.28);
  border-radius: 10px;
}
.client-pagination strong {
  color: #102036;
}
.client-pagination span {
  color: #556b84;
  font-size: 13px;
}
.client-pagination-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pager-gap {
  color: #556b84;
  font-weight: 900;
  padding: 0 2px;
}
.admin-top-shell .btn:disabled,
.admin-top-shell button:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
}
.admin-top-shell .planning-panel,
.admin-top-shell .planning-side {
  background: rgba(247,251,255,.97);
  border: 1px solid rgba(123,151,176,.32);
  border-radius: 10px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.admin-top-shell .planning-stats {
  gap: 8px;
  margin: 8px 0;
}
.admin-top-shell .planning-stats .stat {
  min-height: 58px;
  padding: 9px 12px;
}
.admin-top-shell .planning-stats .stat strong {
  font-size: 22px;
}

@media (max-width: 1180px) {
  .planning-layout {
    grid-template-columns: 1fr;
  }
  .planning-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .planning-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .planning-hero-actions .btn,
  .planning-toolbar .btn,
  .planning-toolbar .field,
  .planning-toolbar .segmented {
    width: 100%;
  }
  .planning-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .planning-day {
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .planning-day-list {
    max-height: none;
    overflow: visible;
  }
  .planning-item-actions {
    grid-template-columns: 1fr;
  }
  .client-pagination,
  .client-pagination-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .client-pagination-actions .btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .line-row {
    grid-template-columns: minmax(150px, 1fr) minmax(112px, 140px) 62px minmax(142px, 190px) 66px 36px;
  }
  .line-row .line-detail {
    grid-column: 1 / 4;
  }
  .line-preview {
    grid-column: 4 / -1;
  }
}

@media (max-width: 560px) {
  .line-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .line-price-cell {
    grid-template-columns: minmax(0, 1fr) 74px;
  }
  .line-row .line-detail,
  .line-preview {
    grid-column: 1 / -1;
  }
  .document-totals-preview {
    justify-content: flex-start;
  }
}

.support-context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.support-context-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eaf7ff;
  color: #075985;
  font-weight: 900;
  font-size: .78rem;
}

.support-context-pill.sav_warranty { background: #ecfdf3; color: #047857; }
.support-context-pill.store,
.support-context-pill.store_purchase,
.support-context-pill.store_reserve,
.support-context-pill.store_question { background: #fff7ed; color: #9a3412; }

.support-context-detail-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.support-context-detail {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
  text-align: left;
  color: inherit;
}

.support-context-detail span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.store-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.store-admin-card img,
.store-admin-image-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f7ff, #f4e8ff);
  display: grid;
  place-items: center;
  color: #31506e;
  font-weight: 900;
}

.store-admin-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.store-admin-head,
.store-admin-meta,
.store-admin-stats,
.store-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.store-admin-head strong {
  font-size: 1.05rem;
}

.store-admin-meta span,
.store-admin-stats span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef6ff;
  color: #244767;
  font-weight: 800;
}

.store-reservation-admin {
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff7ed;
  color: #9a3412;
  display: grid;
  gap: 2px;
}

.store-reservation-admin strong {
  color: #7c2d12;
}

.store-reservation-admin span {
  color: #9a3412;
  font-weight: 800;
}

.form-message {
  min-height: 0;
  color: #b42318;
  font-weight: 800;
  line-height: 1.4;
}

.form-message:not(:empty) {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
}

.form-message.success:not(:empty) {
  color: #067647;
  border-color: #bbf7d0;
  background: #ecfdf3;
}
/* Tarifs accueil */
.price-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-left: 6px solid #22c7e8;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 199, 232, .14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(235,246,255,.88));
}
.price-hero h3 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 3vw, 40px);
}
.price-hero p {
  max-width: 820px;
  margin: 0;
  color: #4c6381;
}
.price-hero-actions,
.price-actions,
.price-toolbar,
.price-selectors,
.price-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.price-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.price-sidebar {
  position: sticky;
  top: 126px;
}
.price-call-flow {
  display: grid;
  gap: 6px;
  margin: 14px 0 18px;
  color: #5b6f8a;
}
.price-call-flow strong {
  color: #071b34;
}
.price-filter-block {
  display: grid;
  gap: 8px;
}
.price-filter-block h4 {
  margin: 4px 0;
}
.price-filter-block button {
  border: 1px solid #c8d8ea;
  background: #f8fbff;
  color: #10233c;
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.price-filter-block button.active {
  border-color: #22c7e8;
  background: linear-gradient(135deg, #24d3ea, #4f8cff);
  color: #061428;
}
.price-main {
  min-width: 0;
}
.price-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}
.price-toolbar input {
  flex: 1 1 420px;
  min-width: 220px;
}
.price-selectors {
  margin-bottom: 12px;
}
.price-selectors label {
  display: grid;
  gap: 5px;
  min-width: 220px;
  color: #60738e;
  font-weight: 800;
}
.price-result-head {
  justify-content: space-between;
  padding: 10px 0 14px;
  color: #60738e;
}
.price-result-head strong {
  color: #071b34;
}
.price-cards {
  display: grid;
  gap: 14px;
}
.price-card {
  border: 1px solid #cfe0f2;
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 45px rgba(25, 58, 92, .08);
}
.price-card.inactive {
  opacity: .62;
}
.price-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 14px;
}
.price-path {
  display: block;
  color: #0786a2;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.price-card-title h3 {
  margin: 0 0 5px;
  font-size: clamp(20px, 2vw, 28px);
}
.price-card-title p {
  margin: 0;
  color: #60738e;
}
.price-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.price-amounts div {
  border: 1px solid #d6e5f4;
  background: #f8fbff;
  border-radius: 14px;
  padding: 12px;
}
.price-amounts span {
  display: block;
  color: #6a7f99;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.price-amounts strong {
  display: block;
  margin-top: 4px;
  color: #061428;
  font-size: 18px;
}
.price-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.price-info-grid div {
  border: 1px solid #dbe8f6;
  background: rgba(255,255,255,.72);
  border-radius: 14px;
  padding: 12px;
}
.price-info-grid strong {
  display: block;
  margin-bottom: 4px;
}
.price-info-grid p {
  margin: 0;
  color: #516782;
}
.price-actions {
  justify-content: flex-end;
  border-top: 1px solid #deebf7;
  margin-top: 14px;
  padding-top: 12px;
}
.price-edit-form textarea {
  min-height: 110px;
}
.receipts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}
.receipt-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.receipts-workspace {
  align-items: start;
}
.receipt-help-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(14,165,233,.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(59,130,246,.08));
  color: var(--text);
}
.receipt-help-box strong {
  white-space: nowrap;
}
.receipt-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.receipt-steps span {
  padding: 7px 10px;
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.receipt-list {
  display: grid;
  gap: 12px;
}
.receipt-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(250px, 360px) minmax(190px, 240px) auto;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 36px rgba(15,23,42,.06);
}
.receipt-card-main {
  display: grid;
  gap: 10px;
}
.receipt-card-titleline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.receipt-card-titleline strong {
  display: block;
  font-size: 17px;
  color: var(--text);
}
.receipt-card-titleline .muted {
  display: block;
  margin-top: 4px;
}
.receipt-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.receipt-card-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(226,232,240,.72);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}
.receipt-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.receipt-money-grid div {
  padding: 10px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 14px;
  background: rgba(248,250,252,.86);
}
.receipt-money-grid span,
.receipt-money-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.receipt-money-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--text);
}
.receipt-vat-box {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(245,158,11,.28);
  background: rgba(255,247,237,.9);
  color: #92400e;
}
.receipt-vat-box.ok {
  border-color: rgba(16,185,129,.28);
  background: rgba(236,253,245,.9);
  color: #047857;
}
.receipt-vat-box span {
  color: inherit;
  opacity: .78;
  font-weight: 800;
  font-size: 13px;
}
.receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 130px;
}
.receipt-empty {
  padding: 18px;
}
.ok-text {
  color: #059669;
}
.warn-text {
  color: #b45309;
}
.receipt-ai-card {
  padding: 18px;
  border: 1px solid rgba(14,165,233,.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240,253,250,.92), rgba(239,246,255,.92));
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
}
.receipt-ai-card h3 {
  margin: 4px 0 8px;
}
.receipt-flags {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245,158,11,.35);
  background: rgba(255,247,237,.86);
  color: #92400e;
  font-weight: 800;
}
.receipt-flags.ok {
  border-color: rgba(16,185,129,.28);
  background: rgba(236,253,245,.86);
  color: #047857;
}
.receipt-text {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.receipt-detail .toolbar.vertical {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 980px) {
  .receipt-card {
    grid-template-columns: 1fr;
  }
  .receipt-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .receipt-actions .btn {
    flex: 1 1 140px;
  }
  .receipt-help-box {
    grid-template-columns: 1fr;
  }
  .settings-shell {
    grid-template-columns: 1fr;
  }
  .settings-menu {
    position: static;
  }
  .settings-menu nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-test-grid {
    grid-template-columns: 1fr;
  }
  .price-hero,
  .price-card-main {
    display: block;
  }
  .price-hero-actions {
    margin-top: 14px;
  }
  .price-layout {
    grid-template-columns: 1fr;
  }
  .price-sidebar {
    position: static;
  }
  .price-amounts,
  .price-info-grid {
    grid-template-columns: 1fr;
  }
  .price-toolbar input,
  .price-selectors label {
    min-width: 100%;
  }
  .price-actions {
    justify-content: stretch;
  }
  .price-actions .btn {
    flex: 1 1 160px;
  }
  .receipts-hero {
    grid-template-columns: 1fr;
  }
  .receipt-hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .settings-menu nav {
    grid-template-columns: 1fr;
  }
  .settings-module {
    gap: 10px;
  }
  .settings-module .form-grid {
    grid-template-columns: 1fr;
  }
  .receipt-help-box {
    display: grid;
  }
}

.receipt-vat-decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 12px;
  align-items: stretch;
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.receipt-vat-decision strong { display: block; font-size: 15px; margin: 2px 0 6px; }
.receipt-vat-decision p { margin: 0; color: var(--muted); line-height: 1.45; }
.receipt-vat-decision.recoverable { border-color: #86efac; background: linear-gradient(135deg, #f0fdf4, #ecfeff); }
.receipt-vat-decision.blocked { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed, #fff1f2); }
.receipt-vat-choice {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
}
.receipt-vat-choice span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.receipt-vat-choice b { font-size: 20px; color: var(--ink); overflow-wrap: anywhere; }
.receipt-vat-choice small { color: var(--muted); font-weight: 750; }
@media (max-width: 760px) {
  .receipt-vat-decision { grid-template-columns: 1fr; }
}

/* Final admin theme pass: Atelier Electro command-center, not a clone */
body:has(.admin-top-shell) {
  background:
    linear-gradient(90deg, rgba(18, 126, 153, .055) 1px, transparent 1px),
    linear-gradient(180deg, #eef5f8 0%, #f7fafc 42%, #edf3f6 100%) !important;
  background-size: 46px 46px, auto;
  color: #142132;
}

body:has(.admin-top-shell) .admin-top-shell {
  --bg: #f2f7fa;
  --panel: #ffffff;
  --panel-soft: #f6fafc;
  --text: #142132;
  --ink: #0f1f33;
  --muted: #637386;
  --border: #d6e3ec;
  --cyan: #13b8d1;
  --blue: #2563eb;
  --green: #16a36d;
  --amber: #d89016;
  --red: #e0445e;
  --violet: #5865f2;
  --shadow: 0 14px 34px rgba(24, 48, 77, .10);
  background: transparent !important;
}

body:has(.admin-top-shell) .admin-header {
  background: rgba(247, 251, 253, .97) !important;
  border-bottom: 1px solid rgba(88, 112, 135, .22) !important;
  box-shadow: 0 14px 34px rgba(24, 48, 77, .12) !important;
  backdrop-filter: blur(18px);
}

body:has(.admin-top-shell) .admin-brand {
  padding-left: 13px;
  border-left: 4px solid #13b8d1;
}
body:has(.admin-top-shell) .admin-brand strong {
  color: #112237 !important;
  letter-spacing: -.02em;
}
body:has(.admin-top-shell) .admin-brand span {
  color: #0e91a7 !important;
  letter-spacing: .01em;
}

body:has(.admin-top-shell) .top-nav {
  border-top: 1px solid rgba(88, 112, 135, .12);
  gap: 7px;
}

body:has(.admin-top-shell) .top-nav button,
body:has(.admin-top-shell) .top-nav .nav-more-toggle,
body:has(.admin-top-shell) .admin-userbar .btn,
body:has(.admin-top-shell) #desktopNotifyBtn {
  background: #ffffff !important;
  border-color: #d5e2eb !important;
  color: #20344d !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(24, 48, 77, .055) !important;
}

body:has(.admin-top-shell) .top-nav button:hover,
body:has(.admin-top-shell) .top-nav .nav-more-toggle:hover,
body:has(.admin-top-shell) .admin-userbar .btn:hover,
body:has(.admin-top-shell) #desktopNotifyBtn:hover {
  background: #eefbff !important;
  border-color: #84d8e7 !important;
  color: #0f2a3c !important;
  transform: translateY(-1px);
}

body:has(.admin-top-shell) .top-nav button.active,
body:has(.admin-top-shell) .top-nav .nav-more-toggle.active {
  background: linear-gradient(135deg, #13b8d1 0%, #3f8df6 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(19, 184, 209, .22) !important;
}

body:has(.admin-top-shell) .nav-badge {
  background: #f0526f !important;
  color: #fff !important;
  box-shadow: 0 5px 12px rgba(240, 82, 111, .24) !important;
}

body:has(.admin-top-shell) .process-quick-btn {
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.42), transparent 30%),
    linear-gradient(135deg, #112237 0%, #14566a 55%, #13b8d1 100%) !important;
  border-color: rgba(19, 184, 209, .52) !important;
  color: #ffffff !important;
  border-radius: 13px !important;
  box-shadow: 0 15px 32px rgba(17, 34, 55, .20) !important;
}
body:has(.admin-top-shell) .process-quick-btn strong {
  color: rgba(255,255,255,.78) !important;
}

body:has(.admin-top-shell) .global-search > input {
  background: #ffffff !important;
  border: 2px solid #9fb2c4 !important;
  color: #142132 !important;
  border-radius: 11px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 18px rgba(24,48,77,.05) !important;
}
body:has(.admin-top-shell) .global-search > input::placeholder { color: #738397 !important; }
body:has(.admin-top-shell) .global-search > input:focus {
  border-color: #13b8d1 !important;
  box-shadow: 0 0 0 4px rgba(19,184,209,.14), 0 8px 20px rgba(24,48,77,.08) !important;
}

body:has(.admin-top-shell) .search-filter {
  background: #f6fafc !important;
  border-color: #d5e2eb !important;
  color: #40566d !important;
}
body:has(.admin-top-shell) .search-filter input { accent-color: #13b8d1; }
body:has(.admin-top-shell) .search-filter.archive { border-color: rgba(216, 144, 22, .42) !important; }

body:has(.admin-top-shell) .nav-more-menu,
body:has(.admin-top-shell) .global-search-results {
  background: #ffffff !important;
  border-color: #cfe0ea !important;
  color: #20344d !important;
  box-shadow: 0 24px 56px rgba(24,48,77,.18) !important;
}
body:has(.admin-top-shell) .global-search-row {
  background: #fbfdfe !important;
  border-color: #dae7ef !important;
  color: #142132 !important;
}
body:has(.admin-top-shell) .global-search-row:hover,
body:has(.admin-top-shell) .global-search-row:focus {
  background: #eefbff !important;
  border-color: #13b8d1 !important;
}
body:has(.admin-top-shell) .search-status { background: #eef3f7 !important; color: #52657a !important; }
body:has(.admin-top-shell) .search-kind.ticket { background: #fff6df !important; color: #9c650f !important; }
body:has(.admin-top-shell) .search-kind.client { background: #e9fbf2 !important; color: #13704c !important; }
body:has(.admin-top-shell) .search-kind.document { background: #edf3ff !important; color: #2559b6 !important; }
body:has(.admin-top-shell) .search-kind.support { background: #fff0f3 !important; color: #bd294b !important; }

body:has(.admin-top-shell) .client-live-chip {
  background: #ecfbf4 !important;
  border-color: #bee8d1 !important;
  color: #23503c !important;
  box-shadow: 0 10px 24px rgba(22,163,109,.08) !important;
}

body:has(.admin-top-shell) .panel,
body:has(.admin-top-shell) .stat,
body:has(.admin-top-shell) .detail-side,
body:has(.admin-top-shell) .mini-item,
body:has(.admin-top-shell) .relation-box,
body:has(.admin-top-shell) .support-card,
body:has(.admin-top-shell) .kanban-column,
body:has(.admin-top-shell) .support-column,
body:has(.admin-top-shell) .mail-folder,
body:has(.admin-top-shell) .monitor-row,
body:has(.admin-top-shell) .acct-chart,
body:has(.admin-top-shell) .modal {
  background: rgba(255,255,255,.96) !important;
  border-color: #d8e5ee !important;
  box-shadow: 0 14px 34px rgba(24,48,77,.08) !important;
}

body:has(.admin-top-shell) th,
body:has(.admin-top-shell) .table-head {
  background: #eaf3f8 !important;
  color: #38536c !important;
}
body:has(.admin-top-shell) td { border-bottom-color: #dce8f0 !important; }

body:has(.admin-top-shell) .btn.primary,
body:has(.admin-top-shell) .home-action.primary,
body:has(.admin-top-shell) .dash-action.primary {
  background: linear-gradient(135deg, #13b8d1 0%, #3f8df6 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(19,184,209,.20) !important;
}
body:has(.admin-top-shell) .btn.blue,
body:has(.admin-top-shell) .dash-action.blue {
  background: #eaf3ff !important;
  border-color: #c8dcff !important;
  color: #2058b4 !important;
}
body:has(.admin-top-shell) .btn.green,
body:has(.admin-top-shell) .dash-action.green {
  background: #e7f8ef !important;
  border-color: #bdebd2 !important;
  color: #116843 !important;
}
body:has(.admin-top-shell) .btn.warn,
body:has(.admin-top-shell) .dash-action.warn {
  background: #fff5dd !important;
  border-color: #f3d28a !important;
  color: #87590a !important;
}

@media (max-width: 1180px) {
  body:has(.admin-top-shell) .top-nav { display: none !important; }
  body:has(.admin-top-shell) .admin-header.mobile-nav-open .top-nav { display: grid !important; }
}

@media (max-width: 640px) {
  body:has(.admin-top-shell) .admin-userbar {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  body:has(.admin-top-shell) .process-quick-btn {
    width: auto;
    min-height: 42px;
    padding: 6px 12px;
  }
  body:has(.admin-top-shell) .global-search {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    order: 3;
  }
  body:has(.admin-top-shell) .global-search > input {
    min-height: 42px;
    font-size: 14px;
  }
  body:has(.admin-top-shell) .global-search-filters,
  body:has(.admin-top-shell) .client-live-chip,
  body:has(.admin-top-shell) #desktopNotifyBtn,
  body:has(.admin-top-shell) .admin-userbar .btn[href="/suivi"],
  body:has(.admin-top-shell) .admin-userbar .btn[onclick="openUiSettings()"] {
    display: none !important;
  }
  body:has(.admin-top-shell) #logoutBtn {
    width: auto;
    min-height: 42px;
    padding: 0 14px;
    justify-self: end;
  }
}
.bl-page{display:grid;gap:18px}.bl-hero{position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding:30px;border:1px solid rgba(91,80,224,.22);border-radius:22px;background:linear-gradient(135deg,#171d35 0%,#24205d 56%,#0f7d73 145%);color:#fff;box-shadow:0 18px 46px rgba(28,35,77,.16)}.bl-hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-80px;top:-120px;border:1px solid rgba(255,255,255,.18);box-shadow:0 0 0 34px rgba(255,255,255,.025),0 0 0 74px rgba(255,255,255,.02)}.bl-hero>div{position:relative;z-index:1}.bl-hero h2{font-size:clamp(28px,4vw,46px);margin:4px 0 8px}.bl-hero p{max-width:760px;margin:0;color:rgba(255,255,255,.76);font-size:15px;line-height:1.65}.bl-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.bl-metric{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--panel);min-width:0}.bl-metric span,.bl-metric small{display:block;color:var(--muted)}.bl-metric strong{display:block;font-size:30px;line-height:1.1;margin:8px 0 4px;color:var(--ink)}.bl-controls{display:grid;grid-template-columns:minmax(260px,1fr) 220px 220px auto;align-items:center;gap:12px}.bl-controls input,.bl-controls select{width:100%;margin:0}.bl-table-panel{padding:0;overflow:hidden}.bl-table{margin:0}.bl-table td{vertical-align:middle}.bl-source{display:grid;gap:3px;min-width:210px}.bl-source a{color:var(--primary);font-size:12px;word-break:break-all}.bl-source small{color:var(--muted)}.bl-status{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eef1f7;color:#43506a;font-size:11px;font-weight:800;white-space:nowrap}.bl-published{background:#dcf8e9;color:#087249}.bl-negotiating,.bl-contacted{background:#fff0d5;color:#9a5500}.bl-submitted,.bl-account_created{background:#e9e5ff;color:#5142b8}.bl-rejected,.bl-avoid{background:#ffe5e7;color:#a32436}.bl-tier{display:inline-grid;place-items:center;min-width:34px;padding:5px 7px;border-radius:8px;font-weight:900;background:#eef1f7}.tier-A\\+,.tier-A{background:#dff7ed;color:#087249}.tier-B{background:#fff0d5;color:#935700}.bl-da{display:block;margin-top:4px;color:var(--muted)}.bl-score{width:84px;height:6px;background:#e7eaf1;border-radius:999px;overflow:hidden}.bl-score i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5b50e0,#18a58e)}.bl-form{margin-top:14px}.bl-checks{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.bl-checks label{display:flex;gap:6px;align-items:center}.bl-checks input{width:auto}.bl-modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin:18px 0}.bl-history{border-top:1px solid var(--line);padding-top:16px}.bl-history>div{display:grid;grid-template-columns:150px 110px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.bl-history time,.bl-history p{color:var(--muted);margin:0;font-size:12px}
@media(max-width:1100px){.bl-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.bl-controls{grid-template-columns:1fr 1fr}.bl-search{grid-column:1/-1}}
@media(max-width:680px){.bl-hero{align-items:flex-start;flex-direction:column;padding:22px}.bl-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.bl-controls{grid-template-columns:1fr}.bl-search{grid-column:auto}.bl-history>div{grid-template-columns:1fr}.bl-table-panel{overflow:auto}.bl-table{min-width:900px}}
/* Prospection B2B */
.prospect-page { display:grid; gap:18px; }
.prospect-hero {
  position:relative; overflow:hidden; display:flex; align-items:flex-end;
  justify-content:space-between; gap:24px; padding:30px;
  border:1px solid #d8e0ea; border-radius:24px;
  background:
    radial-gradient(circle at 88% 16%,rgba(43,202,157,.2),transparent 32%),
    linear-gradient(135deg,#0e2231 0%,#102d40 54%,#123b3d 100%);
  color:#fff; box-shadow:0 18px 48px rgba(15,35,50,.18);
}
.prospect-hero::after {
  content:""; position:absolute; width:260px; height:260px; right:-95px; bottom:-145px;
  border:1px solid rgba(255,255,255,.17); border-radius:50%;
  box-shadow:0 0 0 28px rgba(255,255,255,.035),0 0 0 56px rgba(255,255,255,.025);
}
.prospect-hero > * { position:relative; z-index:1; }
.prospect-hero h2 { margin:4px 0 10px; font-size:clamp(29px,4vw,46px); letter-spacing:-.04em; }
.prospect-hero p { max-width:760px; margin:0; color:#d6e6eb; line-height:1.65; }
.prospect-hero .eyebrow { color:#76e4c4; }
.prospect-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.prospect-metric {
  min-height:118px; padding:18px; border:1px solid #dfe6ed; border-radius:18px;
  background:linear-gradient(145deg,#fff,#f7fafb); box-shadow:0 8px 24px rgba(35,55,72,.06);
}
.prospect-metric span,.prospect-metric small { display:block; color:#687b8b; }
.prospect-metric strong { display:block; margin:6px 0 2px; color:#122a3a; font-size:31px; }
.prospect-controls { display:grid; grid-template-columns:minmax(240px,1.4fr) minmax(190px,.7fr) minmax(180px,.7fr) auto; gap:12px; align-items:center; }
.prospect-controls .toolbar { grid-column:1/-1; justify-content:flex-end; }
.prospect-table-panel { padding:0; overflow:hidden; }
.prospect-table th { white-space:nowrap; }
.prospect-table td { vertical-align:top; }
.prospect-company,.prospect-contact { display:grid; gap:4px; min-width:180px; }
.prospect-company strong { color:#172d3b; font-size:15px; }
.prospect-company small { color:#70808b; }
.prospect-contact a { color:#126f72; font-weight:700; font-size:13px; }
.prospect-need { max-width:330px; margin:0; color:#4f626e; line-height:1.48; }
.prospect-score { color:#0f856e; font-size:21px; }
.prospect-status {
  display:inline-flex; align-items:center; width:max-content; padding:6px 9px;
  border-radius:999px; background:#edf2f5; color:#415764; font-weight:800; font-size:11px;
}
.prospect-status.status-qualified,.prospect-status.status-ready { background:#e7f7f1; color:#08705d; }
.prospect-status.status-email_sent,.prospect-status.status-form_submitted,.prospect-status.status-contacted { background:#eaf1ff; color:#315aa5; }
.prospect-status.status-replied,.prospect-status.status-interested,.prospect-status.status-meeting,.prospect-status.status-won { background:#dcf9e8; color:#087243; }
.prospect-status.status-do_not_contact,.prospect-status.status-invalid_contact,.prospect-status.status-not_interested { background:#fff0f0; color:#a63f4a; }
.prospect-form { margin-top:16px; }
.prospect-form .wide { grid-column:1/-1; }
.prospect-dnc { align-self:end; }
.prospect-dnc label { display:flex; gap:9px; align-items:center; min-height:46px; }
.prospect-modal-actions { display:flex; flex-wrap:wrap; gap:9px; padding:18px 0; border-top:1px solid #e4e9ee; border-bottom:1px solid #e4e9ee; }
.prospect-history { display:grid; gap:10px; margin-top:18px; }
.prospect-history > div { display:grid; grid-template-columns:140px 170px 1fr; gap:12px; padding:12px 0; border-top:1px solid #edf0f2; }
.prospect-history time { color:#71818c; font-size:12px; }
.prospect-history p { margin:0; white-space:pre-wrap; }
@media (max-width:1100px) {
  .prospect-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .prospect-controls { grid-template-columns:1fr 1fr; }
}
@media (max-width:720px) {
  .prospect-hero { align-items:flex-start; flex-direction:column; padding:22px; }
  .prospect-metrics { grid-template-columns:1fr 1fr; }
  .prospect-metric { min-height:96px; padding:14px; }
  .prospect-controls { grid-template-columns:1fr; }
  .prospect-history > div { grid-template-columns:1fr; gap:3px; }
}
.intent-shell{display:grid;gap:18px}.intent-hero{display:grid;grid-template-columns:1fr auto;gap:28px;align-items:center;background:linear-gradient(125deg,#151d2e,#282060);color:#fff}.intent-hero h2{margin:6px 0 8px;font-size:clamp(25px,3vw,38px)}.intent-hero p{margin:0;max-width:760px;color:#dbe3ff}.intent-summary{display:grid;grid-template-columns:auto auto;gap:3px 12px;align-items:center;min-width:190px}.intent-summary strong{font-size:30px;color:#8fe3ff}.intent-summary span{font-size:12px;color:#dbe3ff}.intent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.intent-card{background:#fff;border:1px solid #dce4ef;border-radius:16px;padding:20px;box-shadow:0 8px 28px rgba(30,55,90,.07)}.intent-card-head{display:flex;justify-content:space-between;align-items:center}.intent-index{font-size:12px;font-weight:900;color:#66758d;letter-spacing:.15em}.intent-live{font-size:10px;font-weight:900;color:#138a56}.intent-card h3{font-size:21px;margin:14px 0 3px}.intent-focus{margin:0 0 17px;color:#64748b}.intent-campaign{border-left:3px solid #5258db;padding:8px 12px;background:#f5f6ff}.intent-campaign small,.intent-campaign strong{display:block}.intent-campaign small{color:#69728a}.intent-keywords{display:flex;gap:7px;flex-wrap:wrap;margin:17px 0}.intent-keywords span{font-size:11px;background:#eef3f8;color:#334155;border-radius:999px;padding:6px 9px}.intent-actions{display:flex;gap:8px;flex-wrap:wrap}.intent-note code{display:block;overflow:auto;padding:12px;background:#111827;color:#d8f3ff;border-radius:8px;margin:10px 0}.intent-note p{margin-bottom:0;color:#64748b}@media(max-width:850px){.intent-hero{grid-template-columns:1fr}.intent-grid{grid-template-columns:1fr}}@media(max-width:500px){.intent-card{padding:16px}.intent-actions .btn{flex:1}.intent-summary{min-width:0}}
.bl-verification_required,.bl-blocked{background:#fff0d5;color:#915400}.bl-rejected_quality,.bl-missing{background:#ffe8e8;color:#9d2939}.bl-proof-details{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}.bl-proof-details a{color:var(--primary);font-weight:700}.bl-proof-details small{color:var(--muted)}

/* Suivi IA locale : cinq indicateurs alignes sur grand ecran, puis repli lisible. */
.local-ai-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media (max-width:1300px) {
  .local-ai-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .local-ai-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:540px) {
  .local-ai-stats { grid-template-columns:1fr; }
}

/* Surveillance totale : lecture dense sur desktop, cartes fluides sur mobile. */
@media (max-width:1300px) {
  .total-monitor-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .monitor-storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .database-health-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .total-monitor-projects,
  .monitor-charts { grid-template-columns:1fr; }
  .total-monitor-list { max-height:none; overflow:visible; }
}
@media (max-width:620px) {
  .monitor-hero,
  .monitor-storage-head { align-items:flex-start; flex-direction:column; }
  .total-monitor-stats,
  .monitor-storage-grid,
  .database-health-stats { grid-template-columns:1fr; }
  .monitor-storage-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .monitor-row { align-items:flex-start; }
  .monitor-detail-tags { margin-top:2px; }
}
/* Information prioritaire du portail client */
.client-banner-settings {
  gap: 10px;
  padding: 18px;
  border: 1px solid #f4c66b;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf7, #fff8e7);
}

.client-banner-settings-head,
.client-banner-settings-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.client-banner-settings-head > div {
  display: grid;
  gap: 3px;
}

.client-banner-settings-head select,
.client-banner-ack-option select {
  width: auto;
  min-width: 150px;
}

.client-banner-settings textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.client-banner-ack-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.client-banner-ack-summary {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ead9ad;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}

.client-banner-ack-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-banner-ack-kpis span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #274766;
  font-size: 12px;
}

.client-banner-ack-summary ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-banner-ack-summary li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid #eee7d7;
  font-size: 12px;
}

.client-banner-ack-summary li span {
  color: #64748b;
  text-align: right;
}

@media (max-width: 760px) {
  .client-banner-settings-head,
  .client-banner-settings-foot,
  .client-banner-ack-summary li {
    align-items: stretch;
    flex-direction: column;
  }

  .client-banner-settings-head select,
  .client-banner-ack-option select {
    width: 100%;
  }

  .client-banner-ack-summary li span {
    text-align: left;
  }
}

/* Validation des réponses forum avant publication */
.forum-ai-head { align-items: flex-start; }
.forum-ai-summary { margin-bottom: 18px; }
.forum-ai-rules { margin-bottom: 24px; border-top: 4px solid var(--primary, #5b4ce6); }
.forum-ai-rules textarea,
.forum-ai-card textarea { min-height: 150px; line-height: 1.55; resize: vertical; }
.forum-ai-queue { display: grid; gap: 16px; }
.forum-ai-card { display: grid; gap: 16px; border-left: 4px solid #f59e0b; }
.forum-ai-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.forum-ai-card-head h3 { margin: 5px 0; max-width: 950px; }
.forum-ai-request { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2, rgba(15, 23, 42, .035)); }
.forum-ai-request p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.55; }
.forum-ai-actions { justify-content: flex-end; margin-top: 0; }
.forum-ai-error { margin: 0; padding: 10px 12px; color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; border-radius: 10px; }
@media (max-width: 760px) {
  .forum-ai-card-head { display: grid; }
  .forum-ai-card-head .btn { justify-self: start; }
  .forum-ai-actions { justify-content: stretch; }
  .forum-ai-actions .btn { width: 100%; }
}
/* Agent de travail local -------------------------------------------------- */
.work-agent-page{display:grid;grid-template-columns:285px minmax(0,1fr);gap:18px;height:calc(100vh - 142px);min-height:650px}
.work-agent-page .panel{margin:0}.work-agent-sidebar{display:flex;flex-direction:column;padding:16px;overflow:hidden;background:linear-gradient(180deg,#121716 0%,#0d1110 100%);border-color:#34413c;color:#f8f4ee}
.work-agent-thread-list{display:flex;flex-direction:column;gap:7px;overflow:auto;margin:16px -6px;padding:0 6px;flex:1}
.work-agent-thread{appearance:none;border:1px solid transparent;border-radius:13px;background:transparent;color:#c9d2ce;text-align:left;padding:12px;cursor:pointer;display:grid;gap:5px;transition:.18s ease}
.work-agent-thread:hover{background:#1b2421;border-color:#34413c}.work-agent-thread.active{background:linear-gradient(135deg,rgba(211,136,86,.2),rgba(211,136,86,.06));border-color:#9f6744;color:#fff}
.work-agent-thread strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-agent-thread span{font-size:10px;color:#97a49f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.work-agent-local-card{border-top:1px solid #2f3936;padding:14px 4px 2px;display:flex;align-items:center;gap:10px}.work-agent-local-card div{display:grid}.work-agent-local-card strong{font-size:12px}.work-agent-local-card small{color:#8fa099;font-size:10px;margin-top:2px}
.work-agent-live-dot{width:10px;height:10px;border-radius:50%;background:#38d88f;box-shadow:0 0 0 5px rgba(56,216,143,.1),0 0 18px rgba(56,216,143,.6)}
.work-agent-memory-card{appearance:none;width:100%;border:1px solid #3c4843;border-radius:13px;background:#18201d;color:#f4efe7;padding:11px 10px;margin:0 0 8px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;text-align:left;cursor:pointer}.work-agent-memory-card:hover{border-color:#bb7951;background:#1d2824}.work-agent-memory-card>span{width:30px;height:30px;border-radius:9px;background:#2a3531;color:#efa06d;display:grid;place-items:center;font-size:17px}.work-agent-memory-card div{display:grid;gap:2px}.work-agent-memory-card strong{font-size:11px}.work-agent-memory-card small{font-size:9px;color:#8fa099}.work-agent-memory-card b{font-size:9px;color:#efa06d;text-transform:uppercase;letter-spacing:.08em}
.work-agent-chat{padding:0;display:flex;flex-direction:column;min-width:0;overflow:hidden;background:#f7f4ee}
.work-agent-chat-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 22px;border-bottom:1px solid #ded8cd;background:rgba(255,255,255,.64)}.work-agent-chat-head h2{margin:3px 0 0;font-size:21px}.work-agent-chat-head select{min-width:190px}
.work-agent-safety{margin:14px 20px 0;padding:11px 14px;border:1px solid #d7b99e;border-radius:13px;background:linear-gradient(90deg,#fff6ed,#fffaf4);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;color:#4e392d}.work-agent-safety>span{width:34px;height:34px;border-radius:11px;background:#d68453;color:white;display:grid;place-items:center}.work-agent-safety strong,.work-agent-safety p{display:block;margin:0}.work-agent-safety p{font-size:11px;color:#776356;margin-top:2px}.work-agent-safety>b{font-size:11px;color:#9a5935}
.work-agent-stream{flex:1;min-height:0;overflow:auto;padding:26px 24px 18px;scroll-behavior:smooth}.work-agent-message{display:flex;align-items:flex-start;gap:11px;max-width:920px;margin:0 auto 22px}.work-agent-message.user{flex-direction:row-reverse}.work-agent-message.system{opacity:.9}
.work-agent-avatar{width:34px;height:34px;border-radius:11px;flex:0 0 34px;background:#1d2623;color:#f3a672;display:grid;place-items:center;font-weight:900;font-size:11px;box-shadow:0 5px 16px rgba(25,30,28,.16)}.work-agent-message.user .work-agent-avatar{background:#d98758;color:#fff}.work-agent-message.system .work-agent-avatar{background:#e6dfd3;color:#496056}
.work-agent-bubble{max-width:min(780px,88%);min-width:180px;background:#fff;border:1px solid #ddd8cf;border-radius:4px 16px 16px 16px;padding:14px 16px;box-shadow:0 8px 28px rgba(33,42,38,.06)}.work-agent-message.user .work-agent-bubble{background:#1b2321;color:#f8f5ef;border-color:#1b2321;border-radius:16px 4px 16px 16px}.work-agent-message.system .work-agent-bubble{background:#f0ece4;border-style:dashed}
.work-agent-message-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:7px}.work-agent-message-head strong{font-size:12px}.work-agent-message-head time{font-size:10px;color:#8a938f}.work-agent-copy{font-size:14px;line-height:1.62;overflow-wrap:anywhere}.work-agent-message-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px;padding-top:9px;border-top:1px solid #ebe6dd}.work-agent-message-meta span{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#78827d;background:#f3f0ea;border-radius:99px;padding:4px 7px}
.work-agent-welcome{max-width:760px;margin:60px auto;text-align:center}.work-agent-orb{width:82px;height:82px;margin:0 auto 20px;border-radius:28px;display:grid;place-items:center;color:#f4b082;font-size:34px;background:radial-gradient(circle at 32% 28%,#414b47,#151b19 68%);box-shadow:0 22px 65px rgba(28,39,34,.24),inset 0 0 0 1px #69736e}.work-agent-welcome h3{font-size:25px;margin:0 0 9px}.work-agent-welcome>p{color:#68736d;max-width:590px;margin:0 auto;line-height:1.55}.work-agent-suggestions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:22px}.work-agent-suggestions button{border:1px solid #d2c9bc;background:#fff;border-radius:99px;padding:9px 13px;color:#504c45;cursor:pointer}.work-agent-suggestions button:hover{border-color:#c87849;color:#a55329}
.work-agent-actions{max-width:920px;margin:28px auto 4px}.work-agent-actions-title{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;color:#806b5d;font-size:11px;text-transform:uppercase;letter-spacing:.09em;margin-bottom:12px}.work-agent-actions-title span{height:1px;background:#ddd3c7}
.work-agent-action{display:grid;grid-template-columns:38px minmax(0,1fr);gap:12px;background:#fff;border:1px solid #d8c7b8;border-left:4px solid #d98758;border-radius:14px;padding:14px;margin-bottom:10px}.work-agent-action.done{border-left-color:#29a56d}.work-agent-action.failed{border-left-color:#d14d57}.work-agent-action.rejected{border-left-color:#8e9893;opacity:.78}.work-agent-action-icon{width:34px;height:34px;border-radius:10px;background:#fff0e4;color:#ba6738;display:grid;place-items:center;font-weight:900}.work-agent-action-head{display:flex;justify-content:space-between;gap:15px;align-items:start}.work-agent-action h4{margin:2px 0 0}.work-agent-action p{font-size:12px;color:#626a66}.work-agent-action code{display:block;padding:8px 10px;border-radius:8px;background:#f3f0eb;font-size:10px;overflow-wrap:anywhere}.work-agent-action .toolbar{margin-top:12px}.work-agent-action details{margin-top:10px}.work-agent-action pre{white-space:pre-wrap;max-height:300px;overflow:auto;background:#131817;color:#dfe8e4;padding:12px;border-radius:9px;font-size:11px}
.work-agent-composer{margin:0 20px 18px;border:1px solid #cbbcad;background:#fff;border-radius:17px;padding:10px 11px;box-shadow:0 14px 35px rgba(37,44,41,.1)}.work-agent-composer textarea{border:0!important;box-shadow:none!important;resize:none;width:100%;min-height:48px;padding:6px 7px;background:transparent}.work-agent-compose-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #eee8df;padding-top:8px}.work-agent-compose-foot>span{font-size:10px;color:#8b918e}.work-agent-compose-foot .btn{border-radius:11px}.work-agent-thinking{display:flex;align-items:center;gap:6px;color:#65706b}.work-agent-thinking i{width:7px;height:7px;border-radius:50%;background:#cf7e4d;animation:workAgentPulse 1.2s infinite}.work-agent-thinking i:nth-child(2){animation-delay:.15s}.work-agent-thinking i:nth-child(3){animation-delay:.3s}.work-agent-thinking span{margin-left:6px;font-size:12px}@keyframes workAgentPulse{0%,70%,100%{opacity:.25;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
.work-agent-change-preview{margin-top:12px;border:1px solid #e2d8cb;border-radius:12px;background:#faf7f2;overflow:hidden}.work-agent-change-preview summary{padding:10px 12px;cursor:pointer;font-weight:700;color:#6c4a36}.work-agent-change-preview>pre{margin:0;border:0;border-top:1px solid #e2d8cb;border-radius:0;max-height:340px}.work-agent-diff{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #e2d8cb}.work-agent-diff section+section{border-left:1px solid #e2d8cb}.work-agent-diff strong{display:block;padding:8px 10px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#85786e}.work-agent-diff pre{margin:0;border:0;border-radius:0;max-height:340px;white-space:pre-wrap}.work-agent-diff section:first-child pre{background:#fff3f1}.work-agent-diff section:last-child pre{background:#f1fbf4}@media(max-width:760px){.work-agent-diff{grid-template-columns:1fr}.work-agent-diff section+section{border-left:0;border-top:1px solid #e2d8cb}}
.work-agent-memory-add{border:1px solid #dbc7b5;border-radius:14px;background:#fffaf5;margin:0 0 16px;overflow:hidden}.work-agent-memory-add>summary{padding:13px 15px;cursor:pointer;font-weight:800;color:#9e5934}.work-agent-memory-add form{padding:0 15px 15px}.work-agent-memory-list{display:grid;gap:10px;max-height:58vh;overflow:auto;padding-right:4px}.work-agent-memory-list article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start;border:1px solid #ded7cc;border-radius:14px;padding:14px;background:#fff}.work-agent-memory-list h4{margin:3px 0 6px}.work-agent-memory-list p{margin:0;color:#56615c;white-space:pre-wrap;line-height:1.5}.work-agent-memory-list small{display:block;margin-top:8px;color:#89928e}.work-agent-memory-list .toolbar{justify-content:flex-end}
@media(max-width:900px){.work-agent-page{grid-template-columns:1fr;height:auto;min-height:0}.work-agent-sidebar{max-height:215px}.work-agent-thread-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(180px,75%);overflow-x:auto;overflow-y:hidden}.work-agent-local-card{display:none}.work-agent-chat{min-height:calc(100vh - 260px)}.work-agent-chat-head{align-items:flex-start;flex-direction:column}.work-agent-chat-head .toolbar{width:100%}.work-agent-chat-head select{min-width:0;flex:1}.work-agent-safety{grid-template-columns:auto 1fr}.work-agent-safety>b{display:none}.work-agent-stream{padding:20px 12px}.work-agent-composer{margin:0 10px 10px}.work-agent-compose-foot>span{display:none}.work-agent-message{gap:7px}.work-agent-bubble{max-width:calc(100% - 41px)}}
.work-agent-media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,280px));gap:12px;margin-top:14px}
.work-agent-media{position:relative;display:flex;min-height:150px;padding:0;overflow:hidden;flex-direction:column;border:1px solid rgba(174,112,70,.28);border-radius:16px;background:#111815;color:inherit;text-align:left;cursor:zoom-in}
.work-agent-media img{display:block;width:100%;height:210px;object-fit:cover;background:#101411}
.work-agent-media small{display:block;width:100%;padding:9px 12px;color:#74695f;background:#faf7f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.work-agent-media-loading{display:grid;min-height:150px;place-items:center;color:#8d8175;background:#f2ede4}
.work-agent-image-modal{display:grid;gap:16px;justify-items:center}.work-agent-image-modal img{display:block;max-width:min(86vw,1100px);max-height:72vh;border-radius:16px;box-shadow:0 25px 80px rgba(0,0,0,.25)}
.work-agent-image-preview{display:flex;gap:10px;flex-wrap:wrap;padding:10px 12px 0}.work-agent-image-preview article{position:relative;display:flex;align-items:center;gap:8px;max-width:240px;padding:5px 34px 5px 5px;border:1px solid rgba(174,112,70,.28);border-radius:12px;background:#f5efe6}.work-agent-image-preview img{width:46px;height:46px;object-fit:cover;border-radius:8px}.work-agent-image-preview span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem}.work-agent-image-preview button{position:absolute;right:7px;top:50%;translate:0 -50%;border:0;background:transparent;font-size:1.25rem;cursor:pointer;color:#8c5e43}
.work-agent-composer.dragover{outline:2px dashed #bd7b52;outline-offset:4px;background:#fff9f1}
.work-agent-compose-foot>div{display:flex;align-items:center;gap:12px}.work-agent-attach{border:1px solid rgba(174,112,70,.34);border-radius:10px;padding:8px 11px;background:#f7f1e8;color:#8e5838;font-weight:800;cursor:pointer}
@media(max-width:700px){.work-agent-media-grid{grid-template-columns:1fr}.work-agent-media img{height:auto;max-height:320px}.work-agent-compose-foot>div>span{display:none}}

/* Accès direct au copilote sur téléphone : réservé au compte propriétaire. */
.work-agent-mobile-shortcut{display:none}
@media(max-width:900px){
  .work-agent-mobile-shortcut{
    position:fixed;
    left:max(14px,env(safe-area-inset-left,0px));
    bottom:calc(16px + env(safe-area-inset-bottom,0px));
    z-index:4500;
    min-height:52px;
    padding:6px 15px 6px 7px;
    border:1px solid rgba(226,154,105,.58);
    border-radius:18px;
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:#fff8f1;
    background:linear-gradient(135deg,#18211e 0%,#28342f 58%,#70472f 140%);
    box-shadow:0 14px 38px rgba(11,18,15,.32),0 0 0 1px rgba(255,255,255,.05) inset;
    font:inherit;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  .work-agent-mobile-shortcut>span{
    width:38px;
    height:38px;
    border-radius:13px;
    display:grid;
    place-items:center;
    color:#26170f;
    background:linear-gradient(145deg,#f2ad7c,#d77e49);
    box-shadow:0 6px 18px rgba(215,126,73,.34);
    font-size:20px;
  }
  .work-agent-mobile-shortcut>strong{font-size:13px;letter-spacing:.01em;white-space:nowrap}
  .work-agent-mobile-shortcut:active{transform:translateY(1px) scale(.98)}
  .work-agent-mobile-shortcut[hidden]{display:none!important}
}
.va-twilio-oneclick{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:18px 0;padding:18px 20px;border:1px solid rgba(71,132,255,.28);border-radius:18px;background:linear-gradient(135deg,rgba(65,110,255,.1),rgba(124,58,237,.08))}.va-twilio-oneclick strong{display:block;font-size:16px}.va-twilio-oneclick p{margin:5px 0 0;color:var(--muted,#64748b);max-width:720px}.va-twilio-oneclick .btn{flex:0 0 auto}.field label em{font-style:normal;font-weight:500;color:var(--muted,#64748b);font-size:.78em}@media(max-width:720px){.va-twilio-oneclick{align-items:stretch;flex-direction:column}.va-twilio-oneclick .btn{width:100%}}

/* Certificats d'irreparabilite ------------------------------------------ */
.irrep-page{display:grid;gap:16px}.irrep-hero{position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding:28px 30px;border:1px solid rgba(189,112,67,.34);border-radius:22px;color:#f7f2eb;background:linear-gradient(128deg,#151a18 0%,#252d29 62%,#79482e 150%);box-shadow:0 18px 45px rgba(23,32,28,.16)}.irrep-hero:after{content:"";position:absolute;width:320px;height:320px;right:-155px;top:-195px;border-radius:50%;border:1px solid rgba(241,173,128,.28);box-shadow:0 0 0 34px rgba(241,173,128,.045),0 0 0 78px rgba(241,173,128,.025)}.irrep-hero>div,.irrep-hero>.btn{position:relative;z-index:1}.irrep-hero h2{margin:4px 0 8px;font-size:clamp(27px,4vw,43px);letter-spacing:-.035em}.irrep-hero p{max-width:770px;margin:0;color:#c5cec9;line-height:1.65}.irrep-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.irrep-stats>div{display:grid;gap:3px;padding:15px 17px;border:1px solid var(--border);border-radius:15px;background:var(--panel)}.irrep-stats strong{font-size:25px;color:var(--ink)}.irrep-stats span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.irrep-list-panel{padding:0!important;overflow:hidden}.irrep-list-panel>.panel-head{padding:17px 18px 5px}.irrep-list{display:grid}.irrep-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 17px;border-top:1px solid var(--border)}.irrep-row:hover{background:rgba(190,123,78,.045)}.irrep-row-main{appearance:none;border:0;background:transparent;color:inherit;display:grid;grid-template-columns:140px minmax(190px,.8fr) minmax(260px,1.3fr) auto;align-items:center;gap:18px;width:100%;padding:0;text-align:left;cursor:pointer}.irrep-row-main>span{min-width:0}.irrep-row-main strong,.irrep-row-main small{display:block;overflow:hidden;text-overflow:ellipsis}.irrep-row-main small{margin-top:3px;color:var(--muted);white-space:nowrap;font-size:11px}.irrep-number{font-weight:900;letter-spacing:.03em;color:#b96d42}.irrep-row-actions{display:flex;gap:6px}.irrep-status{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;background:#eeeae3;color:#6c6a66}.irrep-status.ready{background:#fff0d7;color:#91540d}.irrep-status.issued{background:#dcf6e8;color:#08734a}.irrep-empty{padding:46px 20px;text-align:center}.irrep-empty strong{font-size:18px}.irrep-empty p{color:var(--muted)}.irrep-legal-note{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:13px 16px;border:1px solid #e3d2c5;border-radius:14px;background:#fff9f3;color:#6d513e}.irrep-legal-note span{font-size:12px;line-height:1.5}.modal:has(.irrep-editor){width:min(1320px,100%);padding:0}.irrep-modal-head{position:sticky;top:0;z-index:5;padding:18px 20px 14px;margin:0;background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}.irrep-modal-head h2{font-size:24px}.irrep-modal-head p{margin:5px 0 0;max-width:720px}.irrep-editor{display:grid;gap:0;padding:0 20px 20px}.irrep-editor-section{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;padding:25px 0;border-bottom:1px solid var(--border)}.irrep-section-title{display:grid;grid-template-columns:36px 1fr;gap:10px;align-content:start;position:sticky;top:94px}.irrep-section-title>span{display:grid;place-items:center;width:32px;height:32px;border:1px solid #d2a98e;border-radius:10px;color:#ac633b;font-size:10px;font-weight:900}.irrep-section-title h3{margin:1px 0 4px;font-size:15px}.irrep-section-title p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}.irrep-editor textarea{min-height:105px;line-height:1.55}.irrep-files{display:grid;gap:8px}.irrep-file{display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}.irrep-file-icon{display:grid;place-items:center;width:35px;height:35px;border-radius:9px;background:#fff0e5;color:#a85a31;font-size:10px;font-weight:900}.irrep-file strong,.irrep-file small{display:block}.irrep-file small{margin-top:2px;color:var(--muted);font-size:10px}.irrep-file-empty{padding:13px;border:1px dashed var(--border);border-radius:11px;color:var(--muted)}.irrep-dropzone{display:grid;justify-items:center;gap:5px;margin-top:10px;padding:22px;border:1px dashed #c89675;border-radius:14px;background:#fffaf5;color:#6f4934;cursor:pointer}.irrep-dropzone input{position:absolute;opacity:0;pointer-events:none}.irrep-dropzone span{color:var(--muted);font-size:11px;text-align:center}.irrep-pending{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.irrep-pending span{padding:6px 9px;border-radius:999px;background:#efe8df;color:#665447;font-size:10px}.irrep-ai-box{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 12px;padding:17px 18px;border:1px solid #c7d6d0;border-radius:15px;background:linear-gradient(120deg,#f1f7f4,#fffaf4)}.irrep-ai-box h3{margin:3px 0}.irrep-ai-box p{margin:4px 0 0;max-width:790px;color:#64716b;font-size:12px;line-height:1.5}.irrep-certify{display:flex;align-items:flex-start;gap:11px;padding:15px 17px;border:1px solid #d7af94;border-radius:14px;background:#fff7f0;cursor:pointer}.irrep-certify input{width:19px;height:19px;margin-top:2px;accent-color:#ac623a}.irrep-certify strong,.irrep-certify small{display:block}.irrep-certify small{margin-top:4px;color:#7b6659}.irrep-editor-actions{position:sticky;bottom:-1px;z-index:4;display:flex;align-items:center;gap:8px;margin:15px -20px -20px;padding:13px 20px;border-top:1px solid var(--border);background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}.irrep-editor-actions .irrep-delete{margin-left:auto}.irrep-issued-proof{display:grid;gap:5px;margin:18px 0;padding:15px;border:1px solid #a8d8c2;border-radius:13px;background:#effaf4;color:#146444}.irrep-issued-proof span{font-family:monospace;font-size:10px;overflow-wrap:anywhere}
@media(max-width:980px){.irrep-row-main{grid-template-columns:115px minmax(160px,1fr) auto}.irrep-row-main>span:nth-child(3){display:none}.irrep-editor-section{grid-template-columns:1fr}.irrep-section-title{position:static}.irrep-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.irrep-hero{align-items:stretch;flex-direction:column;padding:22px}.irrep-hero .btn{width:100%}.irrep-row{grid-template-columns:1fr}.irrep-row-main{grid-template-columns:1fr auto;gap:7px}.irrep-row-main>span:nth-child(2){grid-column:1/-1;grid-row:2}.irrep-row-actions{display:grid;grid-template-columns:1fr 1fr}.irrep-row-actions .btn{width:100%}.irrep-stats{gap:7px}.irrep-stats>div{padding:12px}.irrep-editor{padding:0 12px 14px}.irrep-modal-head{padding:15px 12px 12px}.irrep-file{grid-template-columns:35px minmax(0,1fr)}.irrep-file .btn{width:100%}.irrep-ai-box{align-items:stretch;flex-direction:column}.irrep-editor-actions{margin:13px -12px -14px;padding:11px 12px;display:grid;grid-template-columns:1fr}.irrep-editor-actions .irrep-delete{margin:0}.irrep-legal-note{grid-template-columns:1fr}}

/* Planning equipe & pointages ------------------------------------------ */
.staff-schedule-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:27px 30px;border-color:rgba(202,132,89,.3);background:linear-gradient(128deg,#18211e 0%,#27322d 64%,#7b4d32 145%);color:#fff8f1}.staff-schedule-hero:after{content:"";position:absolute;right:-110px;top:-165px;width:310px;height:310px;border:1px solid rgba(236,166,118,.22);border-radius:50%;box-shadow:0 0 0 38px rgba(236,166,118,.04),0 0 0 80px rgba(236,166,118,.025)}.staff-schedule-hero>div{position:relative;z-index:1}.staff-schedule-hero h2{margin:4px 0 7px;font-size:clamp(27px,3vw,41px);letter-spacing:-.035em}.staff-schedule-hero p{max-width:780px;margin:0;color:#cbd4cf;line-height:1.6}.staff-owner-lock{flex:0 0 235px;display:grid;grid-template-columns:42px 1fr;gap:2px 11px;align-items:center;padding:15px 17px;border:1px solid rgba(239,174,129,.3);border-radius:16px;background:rgba(7,12,10,.34);backdrop-filter:blur(8px)}.staff-owner-lock>span{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e89d6d;color:#241610}.staff-owner-lock strong{font-size:12px}.staff-owner-lock small{color:#adbbb4}.staff-owner-lock.employee>span{background:#d4e3dc}.staff-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:15px 17px}.staff-toolbar-nav{display:flex;gap:6px}.staff-toolbar .inline-field{min-width:170px;margin:0}.staff-period-label{display:flex;justify-content:center;align-items:center;gap:9px;margin:2px 0;color:var(--muted);font-size:12px}.staff-period-label strong{color:var(--ink)}.staff-employee-board{padding:0;overflow:hidden}.staff-summary-card{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:18px 20px;border-bottom:1px solid var(--border);background:linear-gradient(100deg,rgba(233,155,105,.08),rgba(255,255,255,0))}.staff-summary-card h3{margin:3px 0 0;font-size:20px}.staff-summary-metrics{display:flex;gap:8px}.staff-summary-metrics>span{display:grid;min-width:105px;padding:9px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);text-align:center}.staff-summary-metrics small{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}.staff-summary-metrics strong{margin-top:2px;font-size:15px}.staff-summary-metrics .positive strong{color:#0b7c50}.staff-summary-metrics .negative strong{color:#bd3e3e}.staff-summary-actions{display:flex;gap:7px}.staff-week-grid{display:grid;grid-template-columns:repeat(5,minmax(190px,1fr));overflow-x:auto}.staff-day-cell{min-width:190px;padding:13px;border-right:1px solid var(--border);background:var(--panel)}.staff-day-cell:last-child{border-right:0}.staff-day-cell.today{background:linear-gradient(180deg,rgba(231,148,94,.1),rgba(255,255,255,0) 48%)}.staff-day-cell>header{display:flex;justify-content:space-between;align-items:center;min-height:44px;padding:0 2px 9px}.staff-day-cell>header span,.staff-day-cell>header strong{display:block;text-transform:capitalize}.staff-day-cell>header span{font-size:11px;color:var(--muted)}.staff-day-cell>header strong{font-size:13px}.staff-day-cell>header em{padding:4px 7px;border-radius:999px;background:#f0a06c;color:#24150d;font-style:normal;font-size:8px;font-weight:900;text-transform:uppercase}.staff-day-block{position:relative;display:grid;align-content:start;min-height:128px;margin-top:8px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--soft)}.staff-day-block.attendance{background:#f7faf8}.staff-day-block.running{border-color:#39a975;box-shadow:0 0 0 2px rgba(57,169,117,.08)}.staff-day-block.empty{border-style:dashed;background:transparent}.staff-day-block small,.staff-day-block strong,.staff-day-block span,.staff-day-block em{display:block}.staff-day-block small{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}.staff-day-block strong{margin-top:6px;font-size:15px}.staff-day-block span{margin-top:4px;color:var(--muted);font-size:10px}.staff-day-block em{margin-top:7px;color:#a35d35;font-size:9px;font-style:normal;font-weight:900;text-transform:uppercase}.staff-day-block p{margin:9px 0 20px;color:var(--muted);font-size:10px;line-height:1.45}.staff-edit-button{position:absolute;right:10px;bottom:8px;padding:3px 0;border:0;border-bottom:1px solid #b76c41;background:transparent;color:#a65d36;font:inherit;font-size:9px;font-weight:900;text-transform:uppercase;cursor:pointer}.staff-audit summary{cursor:pointer;font-weight:800}.staff-audit-list{display:grid;margin-top:13px;border-top:1px solid var(--border)}.staff-audit-list article{display:grid;grid-template-columns:minmax(160px,.7fr) minmax(260px,1fr) auto;gap:13px;padding:9px 0;border-bottom:1px solid var(--border);font-size:11px}.staff-audit-list span,.staff-audit-list small{color:var(--muted)}.staff-modal-warning{display:grid;margin:0 0 14px;padding:12px 14px;border-left:4px solid #d47c49;border-radius:10px;background:#fff5ed}.staff-modal-warning strong,.staff-modal-warning span{display:block}.staff-modal-warning span{margin-top:3px;color:#765f52;font-size:11px}.staff-edit-form .form-actions{display:flex;justify-content:flex-end;gap:8px}
.staff-day-block.location-cfa{border:2px solid #4d7dcc;background:linear-gradient(145deg,#edf4ff,#dfeaff);box-shadow:inset 5px 0 0 #2f68c5}.staff-day-block.location-company{border-color:#8bc5a4;background:linear-gradient(145deg,#f3fbf6,#eaf7ef)}.staff-location-badge{display:inline-flex!important;width:max-content;margin-top:6px;padding:3px 8px;border-radius:999px;color:#fff;font-size:9px;text-transform:uppercase;letter-spacing:.08em}.staff-location-badge.cfa{background:#2f68c5}.staff-location-badge.company{background:#27805a}.staff-break-detail{padding:5px 7px;border-radius:7px;background:#fff5df;color:#855614!important;font-weight:750}.staff-pointing-done{align-self:center;padding:6px 9px;border-radius:999px;background:#e7f6ee;color:#14734d;font-size:10px;font-weight:800}.staff-modal-warning.tracked{border-left-color:#2f68c5;background:#eef4ff}.staff-modal-warning.tracked span{color:#385981}
@media(max-width:1100px){.staff-schedule-hero{align-items:stretch;flex-direction:column}.staff-owner-lock{flex:0 0 auto}.staff-summary-card{align-items:flex-start;flex-wrap:wrap}.staff-summary-metrics{order:3;width:100%}.staff-summary-metrics>span{flex:1}.staff-summary-actions{margin-left:auto}}
@media(max-width:720px){.staff-schedule-hero{padding:21px}.staff-schedule-hero p{font-size:12px}.staff-toolbar{display:grid;grid-template-columns:1fr}.staff-toolbar-nav{display:grid;grid-template-columns:1fr 1fr 1fr}.staff-toolbar .inline-field{width:100%}.staff-toolbar>.btn{width:100%}.staff-summary-card{display:grid;padding:15px}.staff-summary-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;margin:0}.staff-summary-metrics{display:grid;grid-template-columns:repeat(3,1fr)}.staff-summary-metrics>span{min-width:0;padding:8px 5px}.staff-week-grid{display:flex;scroll-snap-type:x mandatory}.staff-day-cell{flex:0 0 82vw;scroll-snap-align:start}.staff-audit-list article{grid-template-columns:1fr}.staff-edit-form .form-actions{display:grid;grid-template-columns:1fr}.staff-edit-form .form-actions .btn{width:100%}}

.staff-contract-caption{display:block;margin-top:4px;color:var(--muted);font-size:10px}.staff-week-alert{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;font-size:9px;font-weight:850;white-space:nowrap}.staff-week-alert.ok{background:#e7f6ee;color:#14734d}.staff-week-alert.under{background:#fff4df;color:#9b6014}.staff-week-alert.over{background:#fdebea;color:#ad3f3b}.staff-contract-form{display:grid;gap:18px}.staff-contract-rules{padding:16px;border:1px solid var(--border);border-radius:15px;background:var(--soft)}.staff-template-editor{padding:17px;border:1px solid var(--border);border-radius:15px;background:var(--panel)}.staff-template-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.staff-template-head h3{margin:2px 0 0}.staff-template-days{display:grid;gap:7px}.staff-template-days article{display:grid;grid-template-columns:115px 95px 95px 85px 115px minmax(140px,1fr);gap:8px;align-items:end;padding:9px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}.staff-template-days label{display:grid;gap:4px;color:var(--muted);font-size:9px}.staff-template-days input,.staff-template-days select{width:100%}.staff-day-toggle{align-self:center!important;display:flex!important;align-items:center;gap:7px!important;color:var(--ink)!important}.staff-day-toggle input{width:auto}.staff-template-total{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding:11px 13px;border-radius:11px}.staff-template-total.valid{background:#e8f7ef;color:#126e49}.staff-template-total.invalid{background:#fff1df;color:#975c18}.staff-plan-preview{display:grid;gap:9px;margin-top:16px;padding:17px;border:1px solid #8dc8ad;border-radius:15px;background:#eef9f3}.staff-plan-preview h3,.staff-plan-preview p{margin:0}.staff-plan-preview p{color:#4f675b;font-size:11px}.staff-plan-preview .btn{justify-self:start}
.staff-month-button{border-color:#bf7449!important;background:linear-gradient(135deg,#fff4ec,#f8dfcf)!important;color:#783f21!important;font-weight:900!important}.staff-month-preview{gap:14px}.staff-month-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.staff-month-counts span{display:grid;padding:10px;border:1px solid rgba(37,128,85,.2);border-radius:11px;background:rgba(255,255,255,.72);color:#4e6258;font-size:10px;text-align:center}.staff-month-counts strong{font-size:20px;color:#176b49}.staff-month-users,.staff-month-warning ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.staff-month-users li,.staff-month-warning li{display:flex;justify-content:space-between;gap:15px;padding:9px 11px;border-radius:9px;background:rgba(255,255,255,.7);font-size:11px}.staff-month-users li span,.staff-month-warning li span{color:#5a6d63;text-align:right}.staff-month-users b{color:#2b69c9}.staff-month-warning{padding:12px;border-left:4px solid #cf7b40;border-radius:10px;background:#fff3e7;color:#845021}.staff-month-warning p{margin:3px 0 8px;color:#845f45}.staff-month-preview .form-actions{display:flex;gap:8px;justify-content:flex-end}
@media(max-width:1050px){.staff-template-days article{grid-template-columns:100px repeat(4,85px) minmax(130px,1fr)}.staff-summary-card{position:relative}.staff-week-alert{order:4}}
@media(max-width:720px){.staff-summary-actions{grid-template-columns:1fr}.staff-week-alert{white-space:normal}.staff-template-head{align-items:stretch;flex-direction:column}.staff-template-days article{grid-template-columns:1fr 1fr}.staff-day-toggle,.staff-day-task{grid-column:1/-1}.staff-template-total{align-items:flex-start;flex-direction:column}.staff-plan-preview .btn{width:100%}.staff-month-counts{grid-template-columns:1fr}.staff-month-users li,.staff-month-warning li{align-items:flex-start;flex-direction:column}.staff-month-users li span,.staff-month-warning li span{text-align:left}.staff-month-preview .form-actions{display:grid}.staff-month-preview .form-actions .btn{width:100%}}

.staff-change-day{display:grid;width:100%;margin:8px 0 0;padding:9px 11px;border:1px solid #d7b08f;border-radius:11px;background:#fff8f1;color:#7b4527;text-align:left;cursor:pointer}.staff-change-day span{font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.staff-change-day strong{margin-top:3px;font-size:10px}.staff-change-day.new{border-style:dashed;background:transparent;color:#a65d36}.staff-change-day.status-approved{border-color:#8fc9ac;background:#edf9f2;color:#16724c}.staff-change-day.status-rejected{border-color:#e5aaa7;background:#fff2f1;color:#a73d39}.staff-change-day.status-cancelled{border-color:var(--border);background:var(--soft);color:var(--muted)}
.staff-change-requests{padding:0;overflow:hidden}.staff-change-head{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:20px 22px;border-bottom:1px solid var(--border);background:linear-gradient(100deg,rgba(229,145,92,.08),transparent)}.staff-change-head h2{margin:3px 0 5px;font-size:23px}.staff-change-head p{margin:0;color:var(--muted);font-size:11px}.staff-change-list{display:grid;gap:9px;padding:14px}.staff-change-card{padding:14px 16px;border:1px solid var(--border);border-left:4px solid #d98250;border-radius:14px;background:var(--panel)}.staff-change-card.status-approved{border-left-color:#3d9e72}.staff-change-card.status-rejected{border-left-color:#c84c48}.staff-change-card.status-cancelled{border-left-color:#9ba19e;opacity:.82}.staff-change-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.staff-change-card h3{margin:2px 0 0;font-size:15px}.staff-change-card>header em{padding:5px 8px;border-radius:999px;background:#fff0e4;color:#99562f;font-size:9px;font-style:normal;font-weight:900}.staff-change-card.status-approved>header em{background:#e7f7ee;color:#16724c}.staff-change-card.status-rejected>header em{background:#fdebea;color:#a73d39}.staff-change-card>p{margin:10px 0 7px;color:var(--ink);font-size:11px;line-height:1.55}.staff-change-card>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:9px;border-top:1px solid var(--border)}.staff-change-card>footer small{color:var(--muted)}.staff-change-flow{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;margin-top:12px;padding:11px;border-radius:12px;background:var(--soft)}.staff-change-flow span{display:grid;gap:3px}.staff-change-flow small{color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.staff-change-flow strong{font-size:11px}.staff-change-flow b{color:#cb7950}.staff-change-impact{display:block;color:#8a6049;font-weight:800}.staff-change-decision{display:grid;gap:3px;margin-top:9px;padding:9px 11px;border-radius:10px;background:#f3f6f4;font-size:10px}.staff-change-decision span{color:var(--muted)}.staff-change-history{border-top:1px solid var(--border)}.staff-change-history>summary{padding:13px 18px;cursor:pointer;color:var(--muted);font-size:11px;font-weight:850}
.staff-change-form{margin-bottom:13px}.staff-change-preview{display:grid;gap:12px;margin-top:14px;padding:16px;border:1px solid #d4ae91;border-radius:15px;background:#fffaf5}.staff-change-week-impact{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.staff-change-week-impact>span{display:grid;gap:3px;padding:10px;border:1px solid #eaded4;border-radius:11px;background:#fff}.staff-change-week-impact small{color:var(--muted);font-size:8px;font-weight:850;text-transform:uppercase}.staff-change-week-impact strong{font-size:14px}.staff-change-week-impact .valid{border-color:#9dcdb6;background:#eff9f4;color:#14734d}.staff-change-week-impact .warning{border-color:#e7c38d;background:#fff7e9;color:#945b19}.staff-change-warnings{display:grid;gap:4px;padding:11px 13px;border-left:4px solid #dc915d;border-radius:9px;background:#fff3e8;font-size:10px}.staff-change-warnings span{color:#795844}.staff-change-submit{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:11px;padding:13px;border-radius:12px;background:#edf7f2}.staff-change-submit p{margin:0;color:#51675c;font-size:10px}.staff-change-reason{margin-top:13px;padding:14px;border:1px solid var(--border);border-radius:13px;background:var(--soft)}.staff-change-reason p{margin:7px 0 0;line-height:1.6}.staff-change-reason.decision{border-color:#a8ccb9;background:#f0f8f4}.staff-change-decision-form{display:grid;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}
@media(max-width:720px){.staff-change-head{align-items:stretch;flex-direction:column}.staff-change-head .btn{width:100%}.staff-change-flow{grid-template-columns:1fr}.staff-change-flow b{transform:rotate(90deg);justify-self:center}.staff-change-week-impact{grid-template-columns:1fr}.staff-change-card>footer,.staff-change-submit{align-items:stretch;flex-direction:column}.staff-change-card>footer .btn,.staff-change-submit .btn{width:100%}.staff-change-decision-form .form-actions{display:grid;grid-template-columns:1fr}.staff-change-decision-form .btn{width:100%}}
/* Registre Véhicules — espace atelier cloisonné */
.vehicle-hero{border-left:4px solid #2dd4bf;background:linear-gradient(125deg,#101827 0%,#173a37 62%,#0f766e 125%);color:#fff}
.vehicle-stats{margin-bottom:16px}
.vehicle-register{overflow:hidden}
.vehicle-filters{display:grid;grid-template-columns:minmax(260px,2fr) minmax(180px,1fr) minmax(180px,1fr) auto auto;gap:10px;align-items:center;margin-bottom:16px}
.vehicle-filters input,.vehicle-filters select{width:100%;min-height:42px;border:1px solid #d8dee9;border-radius:10px;padding:9px 11px;background:#fff;color:#172033}
.vehicle-table td{vertical-align:top}
.vehicle-table td>strong,.vehicle-table td>small{display:block}
.vehicle-table td>small{color:#6b7280;margin-top:4px;max-width:260px;line-height:1.35}
.vehicle-row.urgent{background:#fff7ed}
.vehicle-row.urgent td:first-child{border-left:4px solid #ea580c}
.vehicle-priority{display:block;margin-top:6px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#9a3412}
.vehicle-priority.high{color:#c2410c}.vehicle-priority.urgent{color:#b91c1c}
.vehicle-form .form-section-title{display:flex;align-items:baseline;gap:10px;border-bottom:1px solid #dce5e7;padding:16px 0 8px;margin-top:4px;color:#123a3a}
.vehicle-form .form-section-title strong{font-size:16px}.vehicle-form .form-section-title span{font-size:12px;color:#6b7280}
.vehicle-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.vehicle-detail-grid section{border:1px solid #dbe7e6;border-radius:14px;padding:14px;background:#f8fbfb;min-height:108px}
.vehicle-detail-grid section>span{display:block;color:#64748b;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}
.vehicle-detail-grid section>strong{display:block;color:#142328}.vehicle-detail-grid section>p{margin:7px 0 0;color:#64748b;line-height:1.4}
.vehicle-detail-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:14px 0}
.vehicle-detail-notes>div{border-left:3px solid #14b8a6;padding-left:13px}.vehicle-detail-notes p{white-space:pre-wrap;margin:6px 0 0;line-height:1.55}
.vehicle-detail-columns{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(340px,1.15fr);gap:14px}
.vehicle-events{display:flex;flex-direction:column;gap:10px;max-height:400px;overflow:auto}
.vehicle-event{display:grid;grid-template-columns:120px 1fr;gap:12px;border-left:3px solid #99f6e4;padding:8px 10px;background:#f8fafc;border-radius:0 10px 10px 0}
.vehicle-event>span{font-size:12px;color:#64748b}.vehicle-event strong{margin-right:8px}.vehicle-event p{margin:5px 0 0;white-space:pre-wrap}
.vehicle-danger-zone{margin-top:18px;padding-top:12px;border-top:1px dashed #fecaca;text-align:right}
@media(max-width:1000px){.vehicle-filters{grid-template-columns:1fr 1fr}.vehicle-filters input{grid-column:1/-1}.vehicle-detail-grid{grid-template-columns:1fr 1fr}.vehicle-detail-columns{grid-template-columns:1fr}}
@media(max-width:680px){.vehicle-filters{grid-template-columns:1fr}.vehicle-filters input{grid-column:auto}.vehicle-detail-grid,.vehicle-detail-notes{grid-template-columns:1fr}.vehicle-event{grid-template-columns:1fr}.vehicle-table{min-width:980px}.vehicle-hero{align-items:flex-start}.vehicle-hero .toolbar{width:100%}.vehicle-hero .toolbar .btn{flex:1}}

/* Véhicules — planning, documents indépendants et paramètres */
.vehicle-tabs{display:flex;gap:6px;margin:12px 0 18px;padding:6px;border:1px solid #d6e5e3;border-radius:15px;background:#f6fbfa;overflow:auto}.vehicle-tabs button{min-height:39px;padding:8px 15px;border:0;border-radius:10px;background:transparent;color:#506663;font:inherit;font-size:11px;font-weight:850;white-space:nowrap;cursor:pointer}.vehicle-tabs button.active{background:#0f766e;color:#fff;box-shadow:0 7px 18px rgba(15,118,110,.18)}
.vehicle-planning-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px;padding:13px 16px}.vehicle-planning-toolbar>div:nth-child(2){display:grid;text-align:center}.vehicle-planning-toolbar>div:nth-child(2) strong{font-size:16px}.vehicle-planning-toolbar>p{max-width:340px;margin:0;color:#60706e;font-size:11px}
.vehicle-calendar{display:grid;grid-template-columns:58px repeat(6,minmax(180px,1fr));min-width:1180px;height:720px;border:1px solid #d4e3e1;border-radius:16px;background:#fff;overflow:hidden}.vehicle-calendar>aside{position:relative;margin-top:49px;border-right:1px solid #dce8e7}.vehicle-calendar>aside span{position:absolute;right:8px;transform:translateY(-50%);color:#758582;font-size:10px}.vehicle-calendar-day{min-width:180px;border-right:1px solid #dce8e7}.vehicle-calendar-day:last-child{border-right:0}.vehicle-calendar-day>header{display:flex;align-items:center;justify-content:space-between;height:49px;padding:0 10px;border-bottom:1px solid #dce8e7;text-transform:capitalize}.vehicle-calendar-day>header strong{font-size:11px}.vehicle-calendar-day>header button{display:grid;place-items:center;width:27px;height:27px;border:0;border-radius:8px;background:#e7f5f3;color:#0f766e;cursor:pointer}.vehicle-calendar-day.today>header{background:#e9f8f5;color:#0d615a}.vehicle-calendar-track{position:relative;height:671px;background:linear-gradient(180deg,rgba(240,253,250,.62),rgba(255,255,255,0))}.vehicle-hour-line{position:absolute;left:0;right:0;border-top:1px solid #e5edec;pointer-events:none}.vehicle-appointment{position:absolute;left:5px;right:5px;z-index:2;display:grid;align-content:start;gap:2px;min-height:34px;padding:7px 8px;border:1px solid #75b9b2;border-left:4px solid #0f766e;border-radius:8px;background:#e5f5f3;color:#173a37;text-align:left;overflow:hidden;cursor:pointer}.vehicle-appointment:hover{z-index:4;box-shadow:0 10px 25px rgba(15,118,110,.2)}.vehicle-appointment b,.vehicle-appointment span,.vehicle-appointment small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vehicle-appointment b{font-size:10px}.vehicle-appointment span,.vehicle-appointment small{font-size:9px}.vehicle-appointment small{color:#55716e}.vehicle-appointment.status-completed{border-color:#5fa77e;border-left-color:#16834f;background:#e9f7ef}.vehicle-appointment.status-cancelled,.vehicle-appointment.status-no_show{border-color:#d9a2a0;border-left-color:#ba4945;background:#fbedec;opacity:.76}.vehicle-mobile-agenda{display:none}
.vehicle-accounting-lock{display:grid;grid-template-columns:46px 1fr;gap:12px;align-items:center;margin:0 0 16px;padding:14px 16px;border:1px solid #fdba74;border-left:5px solid #ea580c;border-radius:14px;background:#fff7ed}.vehicle-accounting-lock>span{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#ffedd5;font-size:20px}.vehicle-accounting-lock strong,.vehicle-accounting-lock p{display:block;margin:0}.vehicle-accounting-lock p{margin-top:3px;color:#795c49;font-size:11px;line-height:1.45}.vehicle-doc-lines{display:grid;gap:7px;margin-bottom:8px}.vehicle-doc-line{display:grid;grid-template-columns:minmax(220px,1fr) 90px 120px 38px;gap:7px}.vehicle-doc-line input{min-width:0}.vehicle-settings-form{padding:20px}.vehicle-settings-form .form-section-title{display:flex;align-items:baseline;gap:10px;margin:7px 0 2px;padding:10px 0 7px;border-bottom:1px solid #d6e5e3}.vehicle-settings-form .form-section-title span{color:#6c7f7c;font-size:10px}.vehicle-linked-documents{display:grid;gap:6px;margin-top:20px;padding-top:14px;border-top:1px solid #dce7e5}.vehicle-linked-document{display:grid;grid-template-columns:1fr auto auto;gap:8px;padding:9px 10px;border:1px solid #d7e4e2;border-radius:10px;background:#f8fbfb;text-align:left;cursor:pointer}.vehicle-linked-document small{color:#61716f}.vehicle-call-history{margin-top:14px}.vehicle-call-card{margin-top:9px;padding:13px 15px;border:1px solid #d7e4e2;border-left:4px solid #0f766e;border-radius:12px;background:#f9fcfb}.vehicle-call-card header{display:flex;justify-content:space-between;gap:12px}.vehicle-call-card header span,.vehicle-call-card p{color:#657572;font-size:10px}.vehicle-call-card>div{margin-top:8px;white-space:pre-wrap;line-height:1.5}.vehicle-call-card details{margin-top:9px}.vehicle-call-card summary{cursor:pointer;color:#0f766e;font-size:10px;font-weight:850}.vehicle-call-card pre{max-height:300px;padding:11px;border-radius:9px;background:#16201f;color:#eaf6f4;white-space:pre-wrap;overflow:auto;font:10px/1.55 ui-monospace,monospace}
@media(max-width:1200px){.vehicle-calendar{overflow:visible}.vehicle-planning-toolbar{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:760px){
  #content:has(.vehicle-tabs){padding:8px;overflow-x:hidden}
  .vehicle-hero{gap:14px;padding:16px;border-left-width:3px;border-radius:14px}
  .vehicle-hero h3{font-size:22px}.vehicle-hero p{font-size:12px;line-height:1.5}
  .vehicle-hero .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
  .vehicle-hero .toolbar .btn{width:100%;min-height:44px;padding:9px 8px;white-space:normal}
  .vehicle-hero .toolbar .btn:only-child{grid-column:1/-1}
  .vehicle-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0 14px;padding:7px;overflow:visible;border-radius:14px}
  .vehicle-tabs button{display:grid;place-items:center;min-height:46px;padding:8px 6px;font-size:10px;line-height:1.25;white-space:normal;text-align:center}
  .vehicle-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.vehicle-stats>article,.vehicle-stats>.stat{min-width:0}
  .vehicle-register{padding:10px;overflow:visible}
  .vehicle-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
  .vehicle-filters input,.vehicle-filters select{grid-column:1/-1;min-height:46px;font-size:16px}
  .vehicle-filters .btn{width:100%;min-height:44px}
  .vehicle-register .table-scroll,.vehicle-table+.table-scroll,.vehicle-table{overflow:visible}
  .vehicle-table{display:block;width:100%;min-width:0!important;border:0;background:transparent}
  .vehicle-table thead{display:none}.vehicle-table tbody{display:grid;gap:10px;width:100%}
  .vehicle-table tr{display:grid;width:100%;padding:12px;border:1px solid #d7e4e2;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(24,54,50,.055)}
  .vehicle-table tr.vehicle-row.urgent{border-left:4px solid #ea580c;background:#fffaf5}
  .vehicle-row.urgent td:first-child{border-left:0}
  .vehicle-table td{display:grid;grid-template-columns:minmax(92px,34%) minmax(0,1fr);align-items:start;gap:3px 9px;width:100%;padding:8px 0!important;border:0!important;border-bottom:1px solid #e8efee!important;overflow-wrap:anywhere}
  .vehicle-table td:last-child{border-bottom:0!important}
  .vehicle-table td[data-label]::before{content:attr(data-label);grid-column:1;grid-row:1/span 4;color:#71807e;font-size:9px;font-weight:900;letter-spacing:.055em;line-height:1.35;text-transform:uppercase}
  .vehicle-table td>*{grid-column:2}.vehicle-table td>small{max-width:none;margin-top:2px;white-space:normal}
  .vehicle-table td.table-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding-top:10px!important}
  .vehicle-table td.table-actions::before{grid-column:1/-1;grid-row:auto}
  .vehicle-table td.table-actions>*{grid-column:auto;width:100%;min-height:42px}
  .vehicle-table td.table-actions .btn:nth-of-type(3):last-child{grid-column:1/-1}
  .vehicle-table td[colspan]{display:block;padding:0!important;border:0!important}.vehicle-table td[colspan]::before{content:none}
  .vehicle-planning-toolbar{display:grid;gap:12px;padding:12px;margin-bottom:10px}
  .vehicle-planning-toolbar .toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;order:2}
  .vehicle-planning-toolbar .toolbar .btn{min-width:0;min-height:43px;padding:8px 5px;font-size:10px;white-space:normal}
  .vehicle-planning-toolbar>div:nth-child(2){order:1;text-align:left}.vehicle-planning-toolbar>p{order:3;max-width:none;line-height:1.5}
  .vehicle-calendar{display:none}.vehicle-mobile-agenda{display:grid;gap:10px}
  .vehicle-mobile-day{overflow:hidden;border:1px solid #d7e4e2;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(24,54,50,.055)}
  .vehicle-mobile-day>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-bottom:1px solid #e5edec;background:#f8fbfb;text-transform:capitalize}
  .vehicle-mobile-day.today{border-color:#77bdb5}.vehicle-mobile-day.today>header{background:#e9f8f5}
  .vehicle-mobile-day>header div{display:grid;gap:2px}.vehicle-mobile-day>header span{color:#70807d;font-size:9px;font-weight:850;letter-spacing:.055em;text-transform:uppercase}.vehicle-mobile-day>header strong{font-size:13px}
  .vehicle-mobile-day>header .btn{min-height:40px;padding:8px 11px}
  .vehicle-mobile-slots{display:grid;padding:4px 10px 8px}
  .vehicle-mobile-appointment{display:grid;grid-template-columns:48px minmax(0,1fr) 18px;align-items:center;gap:9px;width:100%;min-height:64px;padding:10px 2px;border:0;border-bottom:1px solid #e8efee;background:transparent;color:#173a37;text-align:left;cursor:pointer}
  .vehicle-mobile-appointment:last-child{border-bottom:0}.vehicle-mobile-time{display:grid;gap:2px;color:#0f766e;font-size:13px;font-weight:900}.vehicle-mobile-time small{color:#71807e;font-size:9px;font-weight:750}.vehicle-mobile-copy{display:grid;min-width:0;gap:2px}.vehicle-mobile-copy b,.vehicle-mobile-copy span,.vehicle-mobile-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vehicle-mobile-copy b{font-size:12px}.vehicle-mobile-copy span,.vehicle-mobile-copy small{color:#627370;font-size:10px}.vehicle-mobile-chevron{color:#0f766e;font-size:24px}.vehicle-mobile-empty{margin:0;padding:17px 4px;color:#71807e;font-size:11px;text-align:center}
  .vehicle-accounting-lock{grid-template-columns:1fr;gap:8px;padding:13px}.vehicle-accounting-lock>span{width:38px;height:38px}
  .vehicle-settings-form{padding:13px}.vehicle-form .form-section-title,.vehicle-settings-form .form-section-title{align-items:flex-start;flex-direction:column;gap:3px;padding-top:13px}
  .vehicle-doc-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:7px;padding:9px;border:1px solid #dce7e5;border-radius:11px;background:#f8fbfb}
  .vehicle-doc-line input:first-child{grid-column:1/-1}.vehicle-doc-line .btn{width:44px;min-width:44px;padding:0}
  .vehicle-linked-document{grid-template-columns:minmax(0,1fr) auto}.vehicle-linked-document small{grid-column:1/-1}
  .vehicle-call-card{padding:12px}.vehicle-call-card header{display:grid;gap:3px}.vehicle-call-card pre{font-size:9px}
  .vehicle-detail-grid,.vehicle-detail-notes,.vehicle-detail-columns{grid-template-columns:1fr}.vehicle-detail-grid section{min-height:0}.vehicle-event{grid-template-columns:1fr;gap:5px}
  .vehicle-danger-zone{text-align:left}.vehicle-danger-zone .btn{width:100%;white-space:normal}
  .modal-backdrop:has(#vehicleRecordForm),.modal-backdrop:has(#vehicleAppointmentForm),.modal-backdrop:has(#vehicleDocumentForm),.modal-backdrop:has(.vehicle-detail-grid){padding:0;align-items:stretch}
  .modal:has(#vehicleRecordForm),.modal:has(#vehicleAppointmentForm),.modal:has(#vehicleDocumentForm),.modal:has(.vehicle-detail-grid){width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:12px;padding-bottom:max(18px,env(safe-area-inset-bottom))}
  .modal:has(#vehicleRecordForm) .modal-head,.modal:has(#vehicleAppointmentForm) .modal-head,.modal:has(#vehicleDocumentForm) .modal-head,.modal:has(.vehicle-detail-grid) .modal-head{position:sticky;top:-12px;z-index:8;margin:-12px -12px 12px;padding:14px 12px 11px;background:rgba(255,255,255,.97);box-shadow:0 1px 0 #dce7e5}
  .modal:has(.vehicle-detail-grid) .modal-head .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}.modal:has(.vehicle-detail-grid) .modal-head .toolbar .btn{width:100%;min-height:42px;padding:8px 5px;white-space:normal}
  #vehicleRecordForm input,#vehicleRecordForm select,#vehicleRecordForm textarea,#vehicleAppointmentForm input,#vehicleAppointmentForm select,#vehicleAppointmentForm textarea,#vehicleDocumentForm input,#vehicleDocumentForm select,#vehicleDocumentForm textarea,.vehicle-settings-form input,.vehicle-settings-form select,.vehicle-settings-form textarea{width:100%;min-width:0;min-height:46px;font-size:16px}
  #vehicleRecordForm .actions,#vehicleAppointmentForm .actions{display:grid;grid-template-columns:1fr;gap:8px}#vehicleRecordForm .actions .btn,#vehicleAppointmentForm .actions .btn{width:100%;min-height:45px;white-space:normal}
}
@media(max-width:390px){.vehicle-table td{grid-template-columns:82px minmax(0,1fr)}.vehicle-hero .toolbar{grid-template-columns:1fr}.vehicle-hero .toolbar .btn{grid-column:auto}.vehicle-mobile-day>header{align-items:stretch;flex-direction:column}.vehicle-mobile-day>header .btn{width:100%}}
