/* ==========================================================
   Client space — same look as the back office (dark sidebar, top bar,
   white cards on a light grey canvas), inside the site header and footer
   ========================================================== */
body.acc-in .qp-hero { display: none; }
body.acc-in main.qp.acc { max-width: 1320px; padding-top: 18px; }
.acc-app { --bo-bg: #f4f6fa; --bo-side: #0b1220; --bo-line: #e5e9f0; --bo-r: 14px; --bo-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px -16px rgba(15,23,42,.25);
  display: grid !important; grid-template-columns: 250px minmax(0, 1fr); gap: 0; margin-top: 8px; background: var(--bo-bg); border: 1px solid var(--bo-line); border-radius: 20px; overflow: hidden; min-height: 640px;
  box-shadow: 0 30px 70px -45px rgba(15,23,42,.55); font-size: 14px; }
.acc-app[hidden] { display: none !important; }
.acc-app .acc-side { position: sticky; top: 76px; align-self: start; height: calc(100vh - 96px); min-height: 600px; overflow-y: auto; background: var(--bo-side); color: #c7d2e5; border: 0; border-radius: 0; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.acc-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; color: #fff; }
.acc-brand img { height: 23px; width: auto; filter: brightness(0) invert(1); }
.acc-brand b { display: block; font-size: 15px; background: linear-gradient(90deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acc-brand small { color: #8291aa; font-size: 11.5px; }
.acc-app .acc-me { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 6px; }
.acc-app .acc-me b { color: #fff; font-size: 14px; } .acc-app .acc-me small { color: #8291aa; }
.acc-app .acc-av { width: 40px; height: 40px; border-radius: 50%; font-size: 15px; }
.acc-app .acc-av--sm { width: 34px; height: 34px; font-size: 13px; }
.acc-grp { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #64748b; font-weight: 700; }
.acc-app .acc-nav { display: grid; gap: 2px; grid-auto-flow: row; }
.acc-app .acc-nav button, .acc-app .acc-out { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #c7d2e5; font-weight: 500; font-size: 14px; }
.acc-app .acc-nav button svg, .acc-app .acc-out svg { opacity: .8; flex: none; }
.acc-app .acc-nav button:hover, .acc-app .acc-out:hover { background: rgba(255,255,255,.06); color: #fff; }
.acc-app .acc-nav button.on { background: linear-gradient(90deg, rgba(37,99,235,.35), rgba(37,99,235,.1)); color: #fff; box-shadow: inset 2px 0 0 #60a5fa; }
.acc-app .acc-nav .acc-cnt { margin-inline-start: auto; background: #f59e0b; color: #111; }
.acc-app .acc-out { margin-top: auto; color: #fca5a5; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; padding-top: 14px; }
.acc-shell { min-width: 0; display: flex; flex-direction: column; }
.acc-top { display: flex; align-items: center; gap: 8px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--bo-line); position: sticky; top: 64px; z-index: 5; }
.acc-top h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.acc-sp { flex: 1; }
.acc-tb { all: unset; box-sizing: border-box; position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #e8edf5; color: #0f172a; cursor: pointer; flex: none; }
.acc-tb:hover { background: #dbe3ef; }
.acc-tb--me { background: none; padding: 0; } .acc-tb--me:hover { background: none; box-shadow: 0 0 0 3px #dbeafe; }
.acc-tb__n { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e41e3f; color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; box-sizing: border-box; }
.acc-tb__n[hidden] { display: none; }
.acc-burger { display: none; font-size: 18px; }
.acc-menu { position: relative; }
.acc-dd { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 260px; background: #fff; border: 1px solid var(--bo-line); border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(15,23,42,.45); padding: 6px; z-index: 20; display: grid; }
.acc-dd[hidden] { display: none; }
.acc-dd__h { display: flex; gap: 10px; align-items: center; padding: 10px; } .acc-dd__h b { display: block; } .acc-dd__h small { color: #64748b; font-size: 12px; word-break: break-all; }
.acc-dd button { all: unset; cursor: pointer; padding: 9px 10px; border-radius: 8px; font-weight: 500; } .acc-dd button:hover { background: #f1f5f9; }
.acc-dd hr { border: 0; border-top: 1px solid var(--bo-line); margin: 4px 0; } .acc-dd__out { color: #dc2626; }
.acc-app .acc-main { padding: 22px 24px 40px; display: grid; gap: 16px; align-content: start; }
/* cards, lists, badges, buttons — like the back office */
.acc-app .acc-card { background: #fff; border: 1px solid var(--bo-line); border-radius: var(--bo-r); padding: 18px; box-shadow: var(--bo-shadow); }
.acc-app .acc-card h2 { font-size: 16px; margin: 0 0 12px; }
.acc-app .acc-doc { border-radius: 12px; padding: 12px; border-color: var(--bo-line); }
.acc-app .acc-doc__ic { width: 42px; height: 42px; border-radius: 10px; }
.acc-app .acc-btn { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.acc-app .acc-btn.ok { height: 38px; border-radius: 10px; }
.acc-app .acc-form input, .acc-app .acc-form select { height: 40px; border-radius: 10px; font-size: 14px; }
.acc-app .acc-form textarea { border-radius: 10px; font-size: 14px; }
.acc-app .acc-filters button.on { background: #0f172a; border-color: #0f172a; }
.acc-app .acc-alert { border-radius: 12px; }
/* messenger */
.acc-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: min(70vh, 640px); background: #fff; border: 1px solid var(--bo-line); border-radius: var(--bo-r); box-shadow: var(--bo-shadow); overflow: hidden; }
.acc-chat__h { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--bo-line); }
.acc-chat__h b { display: block; } .acc-chat__h small { color: #64748b; font-size: 12.5px; }
.acc-team { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #1e2a52, #2563eb); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.acc-team i { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; } .acc-team i.on { background: #22c55e; }
.acc-chat__list { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: #fafbfd; }
.acc-cm { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; } .acc-cm.me { align-self: flex-end; align-items: flex-end; }
.acc-cm .acc-bub2 { padding: 9px 13px; border-radius: 18px; background: #e9edf3; color: #0f172a; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.acc-cm.me .acc-bub2 { background: #2563eb; color: #fff; }
.acc-cm img { max-width: 240px; max-height: 260px; border-radius: 14px; display: block; cursor: zoom-in; margin-bottom: 2px; }
.acc-cm small { display: block; font-size: 11px; color: #94a3b8; margin: 2px 6px 6px; }
.acc-cm__who { font-size: 11.5px; color: #64748b; margin: 6px 0 2px 6px; }
.acc-day { align-self: center; font-size: 11.5px; color: #64748b; background: #eef2f7; padding: 3px 10px; border-radius: 999px; margin: 10px 0; }
.acc-seen { align-self: flex-end; font-size: 11.5px; color: #64748b; margin-top: 2px; }
.acc-typing { font-size: 12.5px; color: #64748b; padding: 4px 16px; min-height: 18px; background: #fafbfd; }
.acc-chat__f { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--bo-line); background: #fff; }
.acc-chat__f textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border-radius: 21px; border: 1.5px solid var(--bo-line); padding: 10px 16px; font: 500 14px Inter, sans-serif; box-sizing: border-box; }
.acc-chat__f textarea:focus { outline: none; border-color: #2563eb; }
.acc-chat__f .acc-tb { width: 42px; height: 42px; } .acc-send { background: #2563eb !important; color: #fff !important; }
.acc-chat__empty { margin: auto; text-align: center; color: #64748b; max-width: 360px; display: grid; gap: 8px; justify-items: center; }
.acc-fab { position: fixed; right: 20px; bottom: 20px; z-index: 100; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563eb, #0891b2); box-shadow: 0 16px 34px -12px rgba(37,99,235,.8); }
.acc-fab svg { width: 26px; height: 26px; } .acc-fab[hidden] { display: none; } .acc-fab .acc-tb__n { border-color: #fff; }
html[dir="rtl"] .acc-fab { right: auto; left: 20px; }
/* stacked just above the WhatsApp bubble of the site (same column, same size) */
body:has(.wa-fab) .acc-fab { bottom: 92px; }
body:has(.wa-fab__panel:not([hidden])) .acc-fab { opacity: 0; pointer-events: none; } /* the WhatsApp list opens upwards: get out of its way */
.acc-fab { transition: opacity .15s; }
@media (max-width: 900px) {
  .acc-app { grid-template-columns: 1fr; border-radius: 14px; }
  .acc-app .acc-side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 270px; height: 100vh; z-index: 90; transform: translateX(-105%); transition: transform .2s; }
  html[dir="rtl"] .acc-app .acc-side { transform: translateX(105%); }
  .acc-app.side-open .acc-side { transform: none; box-shadow: 0 0 0 100vmax rgba(15,23,42,.45); }
  .acc-burger { display: grid; } .acc-top { padding: 10px 14px; top: 56px; } .acc-top h2 { font-size: 17px; }
  .acc-app .acc-main { padding: 14px; } .acc-chat { height: calc(100vh - 220px); } .acc-cm { max-width: 90%; }
}
