/* GOULAA — readable product UI, shared by the client and administration. */
:root {


  --radius:12px; --radius-lg:16px;
   
  --sidebar:264px; --topbar:76px;
  --fs-page:30px; --fs-section:18px; --fs-body:14px; --fs-label:14px; --fs-meta:13px; --fs-kpi:30px;
  --fw-title:700; --fw-ui:600; --fw-text:500;
  --h-control:44px; --h-btn:42px; --h-btn-sm:36px; --h-row:52px;
}
body { font-size:var(--fs-body); font-weight:500; line-height:1.6; }
h1,h2,h3,h4 { font-weight:700; letter-spacing:-.025em; }
b,strong { font-weight:700; }
.small,.hint { font-size:13px; line-height:1.6; }
.muted { color:var(--muted); }
.sidebar { background:var(--surface-alt); border-right:1px solid color-mix(in srgb,var(--on-contrast) 7%,transparent); }
.brand { min-height:90px; padding:24px 22px; border-bottom:1px solid color-mix(in srgb,var(--on-contrast) 9%,transparent); }
.nav { padding:18px 14px; }
.nav .nav-section { font-size:11px; font-weight:700; letter-spacing:.08em; margin:18px 0 8px; color:var(--muted); }
.nav a { min-height:46px; border-radius:8px; padding:11px 13px; margin-bottom:4px; color:var(--muted); font-size:14px; font-weight:600; gap:12px; }
.nav a svg { width:19px; height:19px; opacity:1; }
.nav a:hover { background:color-mix(in srgb,var(--surface) 6%,transparent); color:var(--on-contrast); }
.nav a.active { background:var(--contrast-surface); color:var(--on-contrast); box-shadow:inset 3px 0 var(--shadow-color); font-weight:700; }
.nav a.active svg { color:var(--accent); }
.sidebar-foot { padding:18px; border-top:1px solid color-mix(in srgb,var(--on-contrast) 12%,transparent); color:var(--muted); }
.brand .wordmark small { color:var(--muted); font-weight:500; }
.topbar { min-height:76px; height:auto; padding:16px 30px; background:var(--surface); border-bottom:1px solid var(--line); box-shadow:none; gap:16px; }
.crumb { font-size:14px; font-weight:700; color:var(--navy); }
.avatar { border-radius:12px; background:var(--surface-alt); color:var(--teal-700); font-weight:600; }
.wa-pill { height:34px; border-radius:8px; padding:7px 12px; background:var(--surface-alt); border:1px solid var(--line); font-size:12px; font-weight:600; }
.wa-pill.on { color:var(--success); background:var(--surface-alt); border-color:var(--line); }
.wa-pill.wait { background:var(--surface-alt); color:var(--brown); }
@media (max-width:640px) { .wa-pill span { display:inline; } .topbar .crumb { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .topbar .spacer { display:none; } }
.content { padding:30px; max-width:1600px; width:100%; margin:0 auto; }
.page-head { margin-bottom:27px; gap:18px; }
.page-head .eyebrow, .eyebrow { font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--teal-700); }
.page-head h1 { font-size:30px; letter-spacing:-.035em; line-height:1.25; margin:8px 0 10px; }
.page-head p { max-width:760px; font-size:14px; font-weight:500; line-height:1.65; color:var(--muted); }
.card { border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-sm); background:var(--surface); overflow:hidden; }
.card-head { padding:19px 22px; min-height:64px; border-color:var(--line); gap:14px; }
.card-head h2,.card-head h3 { font-size:16px; font-weight:700; letter-spacing:-.02em; }
.card-body { padding:22px; }
.btn { border-radius:8px; height:42px; font-size:14px; padding:0 16px; font-weight:600; }
.btn-sm { height:36px; padding:0 12px; font-size:13px; }
.btn-icon { width:42px; padding:0; flex:none; }
.btn-primary { background:var(--teal); box-shadow:0 3px 8px color-mix(in srgb,var(--shadow-color) 13%,transparent); }
.btn-ghost { border-color:var(--line); background:var(--surface); }
.btn-ghost:hover { border-color:var(--line-strong); background:var(--surface); }
.input, .select, .textarea { border-radius:8px; border-color:var(--line-strong); font-size:14px; font-weight:500; min-height:44px; }
.input::placeholder,.textarea::placeholder { color:var(--muted); opacity:1; }
.field > label,.label { font-size:14px; font-weight:600; color:var(--ink); }
.input:focus, .select:focus, .textarea:focus { border-color:var(--teal-600); box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 10%,transparent); }
.badge { border-radius:6px; font-size:12px; font-weight:600; padding:4px 9px; gap:6px; letter-spacing:0; height:auto; min-height:25px; line-height:1.3; }
.section-title { margin-top:24px; margin-bottom:14px; font-size:16px; font-weight:700; }
.section-title small { font-size:13px; font-weight:500; }
.task-grid { gap:14px; }
.task { padding:20px; border-color:var(--line); transition:border-color .15s,box-shadow .15s; }
.task:hover { border-color:var(--line-strong); box-shadow:var(--shadow); transform:none; }
.task-ico, .kpi-ico { border-radius:12px; width:42px; height:42px; }
.task-value { font-size:32px; font-weight:700; letter-spacing:-.035em; line-height:1.3; }
.task-label,.kpi-label,.kpi .kpi-label { font-size:14px; font-weight:600; color:var(--ink-2); line-height:1.45; }
.task-sub,.kpi-sub { font-size:13px; font-weight:500; color:var(--muted); line-height:1.55; }
.kpi3, .kpi { padding:22px; position:relative; }
.kpi-value,.kpi .kpi-value { font-size:30px; letter-spacing:-.035em; margin:10px 0 7px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
.task-value,.kpi-value,.wa-overview b { font-variant-numeric:tabular-nums; }
.kpi-grid { gap:14px; }
.meter { height:5px; border-radius:8px; background:var(--surface-alt); }
.meter i { border-radius:8px; background:var(--teal); }
.table th { padding:15px 18px; font-size:12px; letter-spacing:.03em; background:var(--surface-alt); color:var(--ink-2); font-weight:700; border-color:var(--line); }
.table td { padding:15px 18px; font-size:14px; border-color:var(--line); }
.table tbody tr:hover { background:var(--surface); }
.list-rows > li > a { padding:18px 22px; border-color:var(--line); font-size:14px; }
.empty { padding:38px 24px; font-size:14px; line-height:1.7; }
.empty > svg { width:30px; height:30px; color:var(--muted); }
.alert, .setup-strip { border-radius:10px; font-size:14px; line-height:1.65; padding:16px 18px; box-shadow:none; }
.hub-bar { background:var(--surface); border-color:var(--line); padding:0; }
.hub-tabs { padding:0 30px; gap:22px; }
.hub-tabs a { height:48px; padding:15px 0; font-size:14px; font-weight:600; }
.seg { background:var(--surface-alt); border-color:var(--line); border-radius:10px; padding:4px; }
.seg button { border-radius:7px; font-size:13px; font-weight:600; min-height:34px; }
.seg button.active { box-shadow:0 2px 5px color-mix(in srgb,var(--shadow-color) 6%,transparent); }
.chart .axis { font-size:12px; font-weight:500; fill:var(--muted); }
.legend { font-size:13px; font-weight:500; }
.dashboard-welcome { padding:26px 28px; border:1px solid var(--line); border-left:4px solid var(--teal); border-radius:12px; background:var(--surface); position:relative; overflow:hidden; }
.dashboard-welcome h1 { font-size:30px; }
.dashboard-welcome > div { position:relative; z-index:1; }
.dashboard-welcome::after { content:none; }
.wa-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) minmax(150px,.8fr); border:1px solid var(--line); background:var(--surface); border-radius:16px; margin:0 0 24px; overflow:hidden; }
.wa-overview > div { display:flex; align-items:center; gap:14px; padding:22px; border-right:1px solid var(--line); }
.wa-overview > div:last-child { border:0; }
.wa-overview b { display:block; font-size:30px; font-weight:700; line-height:1.2; letter-spacing:-.025em; }
.wa-overview div > span:not(.wa-summary-icon) { display:block; font-size:13px; font-weight:500; color:var(--muted); margin-top:7px; }
.wa-summary-icon { display:grid; place-items:center; width:42px; height:42px; background:var(--surface-alt); color:var(--navy); border-radius:12px; flex:none; }
.wa-summary-icon svg { width:19px; height:19px; }
.wa-summary-icon.good { background:var(--surface-alt); color:var(--success); }
.wa-overview .wa-plan { flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; background:var(--surface); }
.wa-plan b { font-size:16px; letter-spacing:0; }
.wa-plan a { font-size:13px; font-weight:600; display:inline-flex; align-items:center; gap:6px; }
.wa-plan a svg { width:12px; height:12px; }
.wa-center-grid { display:grid; grid-template-columns:300px minmax(0,1fr); align-items:start; gap:22px; }
.wa-directory { position:sticky; top:calc(var(--topbar) + 66px); }
.wa-directory .card-head { min-height:48px; padding:12px 16px; gap:10px; }
.wa-directory .card-head h2 { font-size:14px; }
.live-label { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--success); white-space:nowrap; }
.live-label i, .status-dot { width:5px; height:5px; background:currentColor; display:inline-block; border-radius:50%; flex:none; }
.wa-search { padding:12px 12px 4px; }
.wa-search .input { width:100%; min-height:36px; height:36px; padding:7px 10px; font-size:13px; line-height:20px; background:var(--surface-alt); }
.wa-account-list { padding:8px; display:flex; flex-direction:column; gap:6px; max-height:60vh; overflow:auto; }
.wa-account { display:flex; align-items:center; gap:8px; padding:10px; min-height:64px; width:100%; border:1px solid transparent; background:var(--surface); text-align:left; border-radius:8px; font:inherit; cursor:pointer; }
.wa-account[hidden] { display:none; }
.wa-account:hover { background:var(--surface); }
.wa-account.selected { border-color:var(--accent); background:var(--surface-alt); box-shadow:inset 3px 0 var(--teal); }
.wa-account-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:8px; color:var(--teal-700); background:var(--surface-alt); flex:none; }
.wa-account-icon svg { width:15px; height:15px; }
.wa-account-copy { min-width:0; flex:1; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 8px; }
.wa-account-copy > b, .wa-account-copy > span { display:block; }
.wa-account-copy > b { grid-column:1 / -1; font-size:13px; font-weight:700; line-height:1.45; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wa-account-copy > span { font-size:12px; margin:0; line-height:20px; }
.wa-account-copy [data-phone] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wa-account-copy .badge { margin:0; min-height:20px; padding:2px 6px; font-size:11px; gap:4px; }
.wa-account-arrow { display:flex; flex:none; }
.wa-account-arrow svg { width:12px; height:12px; color:var(--muted); }
.wa-directory-foot { margin:0; padding:10px 14px; border-top:1px solid var(--line); font-size:12px; line-height:1.5; }
#waDetail { scroll-margin-top:calc(var(--topbar) + 68px); }
.wa-connect-layout { display:grid; grid-template-columns:250px minmax(0,1fr); align-items:center; gap:28px; }
.wa-qr-frame { width:250px; height:250px; border:1px solid var(--line); border-radius:18px; background:var(--surface); padding:5px; display:grid; place-items:center; }
.wa-qr-frame.connected { background:var(--surface-alt); border-color:var(--line); }
.wa-qr-image { width:240px; height:240px; object-fit:contain; border-radius:12px; background:var(--surface); }
.wa-qr-placeholder { display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center; padding:20px; }
.wa-qr-placeholder > svg { width:45px; height:45px; color:var(--teal-700); }
.wa-qr-placeholder b { font-size:16px; }
.wa-qr-placeholder .small { font-size:13px; }
.wa-qr-placeholder .pair-code { font-size:22px; letter-spacing:.12em; }
.wa-connect-help h3 { font-size:20px; letter-spacing:-.025em; line-height:1.35; margin:8px 0 10px; }
.wa-connect-help > p { font-size:14px; }
.wa-scan-steps { padding:0; margin:19px 0; list-style:none; display:flex; flex-direction:column; gap:13px; }
.wa-scan-steps li { display:flex; align-items:flex-start; gap:12px; font-size:14px; color:var(--ink-2); }
.wa-scan-steps li > span { width:28px; height:28px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; font-size:13px; font-weight:700; color:var(--teal-700); background:var(--surface-alt); flex:none; }
.wa-actions { margin:18px 0 12px; gap:8px; }
.wa-actions .btn { font-size:13px; padding:0 13px; }
#waPairForm { align-items:flex-end; margin-top:15px; }
#waError { margin-top:16px; }
.wa-meta { border-top:1px solid var(--line); margin-top:24px; padding-top:18px; }
.wa-meta > summary { cursor:pointer; font-size:13px; font-weight:600; color:var(--ink-2); min-height:44px; padding:11px 0; }
.wa-meta > summary svg { width:15px; height:15px; vertical-align:middle; margin-right:5px; }
.wa-meta > p { margin:12px 0; }
.wa-cloud-panel { margin-top:20px; }
.wa-cloud-panel .page-head { display:none; }
.wa-cloud-panel .dash-cols { grid-template-columns:1fr; }
.wa-cloud-panel .dash-cols > .stack:last-child { display:none; }
.wa-option { display:flex; align-items:center; gap:13px; padding:16px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.wa-option:first-child { padding-top:0; }
.wa-option:last-child { border:0; padding-bottom:0; }
.wa-option b { display:block; font-size:14px; font-weight:700; margin-bottom:4px; }
.wa-option .small { font-size:13px; line-height:1.6; }
.wa-option-icon { width:36px; height:36px; border-radius:10px; background:var(--surface-alt); color:var(--navy); display:grid; place-items:center; flex:none; }
.wa-option-icon svg { width:17px; height:17px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.switch { width:46px; height:26px; }
.switch span::after { width:20px; height:20px; }
.switch input:checked + span::after { transform:translateX(20px); }
.switch input:disabled + span { opacity:.65; }
:focus-visible { outline:2px solid var(--teal-700); outline-offset:3px; }
@media (min-width:1001px) and (max-width:1500px) { .kpi .kpi-value { font-size:26px; } }
@media (max-width:1280px) { .wa-center-grid { grid-template-columns:290px minmax(0,1fr); } .wa-connect-layout { grid-template-columns:1fr; } .wa-qr-frame { margin:0 auto; } }
@media (max-width:1000px) { .content { padding:24px; } .topbar { padding:16px 24px; } .wa-overview { grid-template-columns:repeat(2,minmax(0,1fr)); } .wa-overview > div:nth-child(2) { border-right:0; } .wa-overview > div:nth-child(-n+2) { border-bottom:1px solid var(--line); } .wa-center-grid { grid-template-columns:1fr; } .wa-directory { position:static; } .wa-account-list { flex-direction:row; overflow-x:auto; } .wa-account { min-width:230px; } .wa-connect-layout { grid-template-columns:250px minmax(0,1fr); } }
@media (max-width:640px) {
  :root { --topbar:68px; }
  .content { padding:22px 16px; } .topbar { min-height:68px; padding:12px 16px; gap:8px; }
  .topbar .crumb { font-size:13px; }
  .wa-pill { font-size:11px; padding:6px 9px; }
  .page-head h1,.dashboard-welcome h1 { font-size:26px; }
  .page-head { margin-bottom:22px; align-items:flex-start; } .page-head > .row { width:100%; }
  .page-head .eyebrow,.eyebrow { font-size:11px; }
  .dashboard-welcome { padding:22px; }
  .card-head,.card-body { padding:20px; } .card-head { flex-wrap:wrap; }
  .btn { min-height:44px; } .btn-sm { min-height:36px; } .btn-icon { width:40px; min-height:40px; }
  .input,.select,.textarea,.wa-search .input { font-size:16px; }
  .wa-overview > div { padding:18px 14px; gap:10px; }
  .wa-summary-icon { width:34px; height:34px; } .wa-summary-icon svg { width:18px; height:18px; }
  .wa-overview b { font-size:26px; } .wa-overview div > span:not(.wa-summary-icon) { font-size:12px; }
  .wa-plan b { font-size:14px; } .wa-plan a { font-size:12px; }
  .wa-account-list { flex-direction:column; max-height:none; overflow:visible; }
  .wa-account { min-width:0; }
  .wa-search .input { height:40px; min-height:40px; }
  .wa-directory-foot { display:none; }
  .wa-connect-layout { grid-template-columns:1fr; gap:24px; } .wa-center-grid { gap:18px; }
  .hub-tabs { padding:0 16px; gap:24px; }
  .wa-option .switch { flex:none; } .wa-option-icon { display:none; }
}
@media (max-width:360px) { .topbar .avatar { display:none; } .wa-overview > div { gap:8px; padding:16px 12px; } .wa-summary-icon { display:none; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Management layout shared by both workspaces. */
:root { --sidebar:252px; --sidebar-mini:76px; --topbar:64px; --fs-page:28px; }
.shell { grid-template-columns:var(--sidebar) minmax(0,1fr); }
.shell .sidebar { background:var(--sidebar-bg); color:var(--sidebar-ink); border:0; }
.sidebar-heading { display:flex; align-items:center; gap:6px; min-height:84px; padding:12px 14px; border-bottom:1px solid color-mix(in srgb,var(--on-contrast) 10%,transparent); }
.shell .sidebar .brand { padding:0; min-height:0; border:0; flex:1; gap:9px; }
.shell .sidebar .brand img { width:30px; height:30px; object-fit:contain; }
.shell .sidebar .wordmark { font-size:12px; color:var(--on-contrast); letter-spacing:.01em; }
.shell .sidebar .wordmark b { color:var(--brand-teal); }
.shell .sidebar .wordmark small { color:var(--sidebar-muted); font-size:10px; margin-top:4px; font-weight:500; }
.sidebar-toggle { width:28px; height:30px; border:0; border-radius:6px; padding:5px; color:var(--sidebar-muted); background:transparent; cursor:pointer; flex:none; }
.sidebar-toggle svg { width:18px; height:18px; }
.sidebar-toggle:hover { background:var(--sidebar-active); color:var(--on-contrast); }
.shell .nav { padding:12px; gap:0; scrollbar-width:thin; scrollbar-color:var(--sidebar-active) transparent; }
.shell .nav .nav-section { font-size:10px; font-weight:700; letter-spacing:.1em; margin:14px 0 6px; padding:8px 12px 4px; color:var(--sidebar-muted); }
.shell .nav a { min-height:42px; margin-bottom:3px; border-radius:8px; padding:10px 12px; font-size:13px; line-height:1.45; font-weight:500; color:var(--sidebar-ink); gap:11px; }
.shell .nav a svg { width:18px; height:18px; flex:none; }
.shell .nav a:hover { background:var(--sidebar-active); color:var(--on-contrast); }
.shell .nav a.active { background:var(--sidebar-active); color:var(--on-contrast); font-weight:600; box-shadow:inset 3px 0 var(--brand-teal); }
.shell .nav a.active::before { display:none; }
.shell .nav a.active svg { color:var(--brand-teal); }
.shell .nav a .count { font-size:11px; }
.sidebar-foot { color:var(--sidebar-muted); padding:16px; }
.sidebar-foot .plan-box { background:var(--sidebar-active); color:var(--sidebar-ink); border-radius:9px; }
.sidebar-foot b { color:var(--on-contrast); }
.sidebar .admin-tag { background:var(--sidebar-active); color:var(--sidebar-ink); margin:14px 18px 0; border-radius:6px; font-size:10px; padding:5px 9px; }
.sidebar .admin-tag svg { color:var(--brand-teal); }
.topbar { min-height:64px; height:64px; padding:12px 26px; gap:12px; background:var(--surface); }
.topbar .crumb { font-size:14px; font-weight:600; }
.topbar .btn-icon { width:34px; height:34px; min-height:34px; }
.topbar .avatar { width:32px; height:32px; font-size:12px; }
.content { padding:26px; }
.page-head h1,.dashboard-welcome h1 { font-size:28px; }
.dashboard-welcome { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:22px 24px; }
.dashboard-welcome::after { content:none; }
.page-head p { font-size:13px; }
.page-head .eyebrow,.eyebrow { font-size:11px; }
.card { background:var(--surface); border-color:var(--line); }
.card-head h2,.card-head h3 { font-size:15px; }
.card-head { min-height:60px; padding:16px 20px; }
.card-body { padding:20px; }
.kpi3,.kpi { padding:20px; }
.kpi-value,.kpi .kpi-value { font-size:28px; }
.kpi-label,.task-label,.kpi .kpi-label { font-size:13px; }
.kpi-sub,.task-sub { font-size:12px; }
.task-value { font-size:27px; }
.btn { font-size:13px; height:40px; }
.btn-sm { font-size:12px; height:32px; }
.input,.select,.textarea { font-size:14px; }
.section-title { font-size:15px; }
.section-heading { display:flex; gap:16px; justify-content:space-between; align-items:center; margin:26px 0 16px; }
.section-heading h2 { font-size:17px; margin-bottom:3px; }
.analytics-grid { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(260px,1fr); gap:16px; }
.analytics-grid > .card { min-width:0; }
.dashboard-analytics { margin-bottom:24px; }
.chart-note { font-size:11px; color:var(--muted); margin:12px 0 0; }
.chart-legend { display:flex; flex-wrap:wrap; gap:6px 12px; padding-bottom:10px; }
.chart-legend button { display:inline-flex; gap:7px; align-items:center; border:0; background:transparent; color:var(--ink-2); font:inherit; font-size:12px; padding:5px 2px; cursor:pointer; }
.chart-legend button[aria-pressed="false"] { opacity:.5; text-decoration:line-through; }
.chart-legend i,.distribution-legend i { display:inline-block; width:8px; height:8px; border-radius:2px; flex:none; }
.activity-line svg { width:100%; display:block; }
.activity-line .grid-line { stroke:var(--line); stroke-dasharray:3 4; }
.activity-line .axis { fill:var(--muted); font-size:11px; }
.chart-data summary { cursor:pointer; color:var(--muted); font-size:11px; padding:7px 0; }
.chart-data .table-wrap { max-height:260px; }
.distribution-legend { display:grid; gap:9px; margin:14px 0 0; }
.distribution-legend > div { display:flex; justify-content:space-between; font-size:12px; }
.distribution-legend span { display:flex; gap:8px; align-items:center; color:var(--ink-2); }
#requestsChart > .row { justify-content:center; padding:6px 0 8px; }
.task-grid { margin-bottom:24px; }
.icon-link { display:grid; place-items:center; width:30px; height:30px; border-radius:7px; color:var(--muted); }
.icon-link:hover { background:var(--surface-hover); color:var(--accent); }
.icon-link svg { width:17px; height:17px; }
.navigation-tooltip { position:fixed; z-index:1000; padding:8px 12px; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:8px; box-shadow:var(--shadow); font-size:13px; font-weight:600; pointer-events:none; white-space:nowrap; }
.nav-backdrop { display:none; }
.bubble.agent { background:var(--contrast-surface); color:var(--on-contrast); }
.bubble.agent .by { color:var(--brand-teal); }
.wa-pill.on { color:var(--success); background:var(--success-bg); border-color:var(--success-line); }
.wa-pill.wait { color:var(--warning); background:var(--warning-bg); }
.wa-account.selected { background:var(--accent-bg); border-color:var(--accent-line); }
.wa-qr-frame.connected { background:var(--success-bg); border-color:var(--success-line); }
.wa-qr-image { background:var(--on-contrast); }
.wa-summary-icon.good { background:var(--success-bg); color:var(--success); }
.live-label { color:var(--success); }
.wa-account-icon,.wa-option-icon { background:var(--surface-hover); }
.wa-overview,.wa-account { background:var(--surface); }
.wa-plan,.wa-search .input { background:var(--surface-alt); }
.wa-account:hover,.table tbody tr:hover { background:var(--surface-hover); }
.table th { background:var(--surface-alt); }
.input,.select,.textarea,.btn-ghost { background:var(--surface); }
.btn-ghost:hover { background:var(--surface-hover); }
.btn-primary { color:var(--on-brand); }
.task-ico.red { color:var(--danger); background:var(--danger-bg); }
.task-ico.orange { color:var(--warning); background:var(--warning-bg); }
.task-ico.teal { color:var(--accent); background:var(--accent-bg); }
.task.is-orange { border-color:var(--warning-line); }
.task.is-red { border-color:var(--danger-line); }
.top-progress { background:var(--brand-teal); }
.nav .count { color:var(--on-brand); }
.plan-number-quota { display:flex; gap:8px; align-items:center; font-size:13px; font-weight:600; color:var(--accent); padding:12px 0; border-block:1px solid var(--line); margin:8px 0; }
.plan-number-quota svg { width:17px; height:17px; }
.onboard::after { display:none; }
.help-card b { color:var(--ink); }
.f-bar i { background:var(--brand-teal); }
.loyal-track > i { background:var(--brand-teal); }
.loyal-track > span { color:var(--ink-2); }
.loyal-track > span.on { color:var(--ink); }
.wa-top { background:var(--contrast-surface); }
.file-ext { background:var(--info-bg); color:var(--info); }
.week .wh.today b,.slot.active,.ostep.done .n,.conv-item .unread,.fx-n,.g-n,.check.done .dot { color:var(--on-brand); }
.wp-fb .wa { background:var(--success-bg); color:var(--success); }
.btn:focus-visible { outline:2px solid var(--accent); outline-offset:3px; box-shadow:none; }
@media (min-width:961px) {
  .shell.nav-collapsed { grid-template-columns:var(--sidebar-mini) minmax(0,1fr); }
  .shell.nav-collapsed .sidebar-heading { flex-direction:column; justify-content:center; gap:7px; padding:12px 0; }
  .shell.nav-collapsed .sidebar .brand { padding:0; flex:0; }
  .shell.nav-collapsed .wordmark,.shell.nav-collapsed .sidebar-foot,.shell.nav-collapsed .admin-tag,.shell.nav-collapsed .nav-section { display:none; }
  .shell.nav-collapsed .nav { padding:12px; }
  .shell.nav-collapsed .nav a { width:52px; min-height:44px; justify-content:center; padding:11px; position:relative; }
  .shell.nav-collapsed .nav a > span { display:none; }
  .shell.nav-collapsed .nav a .count { display:block; position:absolute; top:2px; right:1px; font-size:9px; min-width:14px; padding:1px 4px; }
  .shell.nav-collapsed .nav a .count.hidden { display:none; }
}
@media (max-width:1100px) { .analytics-grid { grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr); } .content { padding:22px; } }
@media (max-width:960px) {
  .shell { grid-template-columns:minmax(0,1fr); }
  .shell .sidebar { width:252px; z-index:100; visibility:hidden; transform:translateX(-100%); transition:transform .2s ease; }
  .shell.nav-open .sidebar { visibility:visible; transform:translateX(0); }
  .sidebar-toggle { display:none; }
  .shell.nav-open .nav-backdrop { display:block; position:fixed; inset:0; z-index:90; background:var(--overlay); border:0; }
  .shell.nav-open .main { pointer-events:none; }
  .analytics-grid { grid-template-columns:minmax(0,1fr) minmax(230px,.8fr); }
}
@media (max-width:700px) { .analytics-grid { grid-template-columns:1fr; } .section-heading { align-items:flex-start; flex-direction:column; gap:12px; } }
@media (max-width:640px) {
  :root { --topbar:60px; }
  .topbar { min-height:60px; height:60px; padding:10px 12px; gap:7px; }
  .topbar .avatar,.topbar .me-name { display:none; }
  .topbar .crumb { font-size:12px; }
  .topbar .theme-toggle { width:32px; height:34px; }
  .topbar .row { gap:4px!important; }
  .wa-pill { font-size:10px; padding:5px 8px; height:32px; }
  .content { padding:20px 16px; }
  .page-head h1,.dashboard-welcome h1 { font-size:24px; }
  .dashboard-welcome { padding:20px; }
  .card-head,.card-body { padding:18px; }
  .input,.select,.textarea { font-size:16px; }
  .btn { min-height:40px; }
  .section-heading .seg { width:100%; display:flex; } .section-heading .seg button { flex:1; }
  .kpi-value,.kpi .kpi-value { font-size:26px; }
}
@media (max-width:360px) { .topbar .crumb { display:none; } .topbar .wa-pill { margin-right:auto; } }
@media (min-width:380px) and (max-width:640px) {
  .client-surface .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .client-surface .kpi3 { padding:16px; }
  .client-surface .kpi-label { font-size:12px; min-height:36px; }
  .client-surface .kpi-sub { font-size:11px; }
}

/* Motion is started by navigation, never by a passive DOM refresh. */
#page > *, .grid > .card, .chart svg path, .chart svg rect:not([data-i]) { animation:none; }
.chart [data-chart-bar] { transform-box:fill-box; transform-origin:center bottom; }
.meter > i, .hbar .track i { transform-origin:left center; }
.top-progress { box-shadow:none; }
button.is-busy, a.is-busy { display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:progress; pointer-events:none; }
.btn.is-busy { opacity:1; filter:none; }
.is-busy > span:not(.btn-spin) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.is-busy .btn-spin { width:14px; height:14px; }
.seg button.is-busy { position:relative; }
.seg button.is-busy > span:not(.btn-spin) { visibility:hidden; }
.seg button.is-busy .btn-spin { position:absolute; left:calc(50% - 7px); }
@media (prefers-reduced-motion:no-preference) {
  .shell { transition:grid-template-columns .25s cubic-bezier(.2,.8,.2,1); }
  .btn,.seg button,.theme-toggle,.sidebar-toggle { transition:background .18s,border-color .18s,box-shadow .18s,transform .18s; }
  .btn:active:not(:disabled),.theme-toggle:active,.sidebar-toggle:active { transform:scale(.97); }
  .card.task,.card.kpi3,.card.kpi,.wa-account { transition:transform .23s cubic-bezier(.2,.8,.2,1),border-color .2s,box-shadow .2s; }
  .task-ico,.nav a .ico { transition:transform .2s; }
  .nav a { transition:background .18s,color .18s,box-shadow .18s; }
  .modal { animation:dialog-enter .24s cubic-bezier(.16,1,.3,1); }
  .skeleton,.bell-skel i,.bell-skel b,.bell-skel span { animation:content-pulse 1.5s ease-in-out infinite; }
  @media (hover:hover) and (pointer:fine) {
    .card.task:hover,.card.kpi3:hover,.card.kpi:hover { transform:translateY(-3px); border-color:var(--line-strong); box-shadow:var(--shadow); }
    .task:hover .task-ico { transform:scale(1.08); }
    .nav a:hover .ico { transform:translateX(2px); }
    .wa-account:hover { transform:translateX(3px); }
    .btn:hover:not(:disabled):not(.is-busy) { transform:translateY(-1px); }
    .btn:active:not(:disabled) { transform:translateY(0) scale(.97); }
  }
}
@keyframes dialog-enter { from { opacity:0; transform:translateY(12px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes content-pulse { 0%,100% { opacity:.5; } 50% { opacity:1; } }
/* Exit keyframes are managed by motion.js so removal follows completion. */
.is-closing,.is-closing > .modal,.is-closing > .drawer,.is-closing > img { animation:none!important; }
.chart-tooltip { position:fixed; z-index:1000; pointer-events:none; max-width:min(320px,calc(100vw - 20px)); padding:11px 13px; border:1px solid var(--line-strong); border-radius:10px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow-lg); font-size:12px; line-height:1.5; }
.chart-tooltip > strong { display:block; margin-bottom:6px; font-size:12px; }
.chart-tooltip-row { display:flex; align-items:center; gap:8px; padding:2px 0; }
.chart-tooltip-row i { width:8px; height:8px; flex:none; border-radius:3px; background:var(--accent); }
.chart-tooltip-row span { flex:1; min-width:0; }
.chart-tooltip-row b { font-variant-numeric:tabular-nums; white-space:nowrap; }
[data-chart-values]:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.chart rect.chart-point-active { fill:color-mix(in srgb,var(--accent) 9%,transparent); }
.gauge-v { pointer-events:none; }
.gauge circle[data-chart-values] { pointer-events:visibleStroke; }
.inbox-account-switcher { padding:12px 14px 10px; border-bottom:1px solid var(--line); background:var(--surface); }
.inbox-section-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.inbox-section-title b { font-size:14px; letter-spacing:-.2px; }
.inbox-account-control { display:flex; align-items:center; gap:9px; padding:8px 9px; border:1px solid var(--accent-line); border-radius:10px; background:var(--accent-bg); }
.inbox-account-icon { display:grid; place-items:center; width:30px; height:30px; flex:none; border-radius:8px; color:var(--accent); background:var(--surface); }
.inbox-account-icon svg { width:18px; height:18px; }
.inbox-account-control > div { min-width:0; flex:1; }
.inbox-account-control label { display:block; margin-bottom:1px; font-size:10px; font-weight:600; color:var(--muted); }
.inbox-account-control select { display:block; width:100%; border:0; background:transparent; color:var(--ink); font:650 12px/1.5 var(--font); cursor:pointer; padding:2px 0; text-overflow:ellipsis; }
.inbox-account-control select option { color:var(--ink); background:var(--surface); }
.inbox-account-control:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.inbox-account-meta { display:flex; justify-content:space-between; gap:8px; padding-top:7px; min-height:24px; color:var(--muted); font-size:10.5px; }
.account-connection { display:inline-flex; align-items:center; gap:5px; font-weight:600; }
.account-connection i { width:5px; height:5px; border-radius:50%; background:var(--muted); }
.account-connection.connected { color:var(--success); }
.account-connection.connected i { background:var(--success); }
.inbox-list-summary { display:flex; justify-content:space-between; padding:8px 14px; color:var(--muted); font-size:11px; border-bottom:1px solid var(--line); }
.inbox-list-summary span { color:var(--ink-2); font-variant-numeric:tabular-nums; }
.conv-account-label { display:flex; align-items:center; gap:4px; margin-top:5px; color:var(--accent); font-size:10px; font-weight:600; }
.conv-account-label svg { width:11px; height:11px; }
.conv-account-label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conv-item:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.inbox-switch-loading { display:flex; align-items:center; gap:8px; padding:24px 14px; color:var(--muted); font-size:12px; }
.inbox-welcome { margin:auto; padding:32px; max-width:420px; }
.inbox-welcome b { color:var(--ink); font-size:15px; }
.inbox-welcome span { line-height:1.7; }

/* Enterprise palette and compact product rhythm. */
:root { --sidebar:232px; --sidebar-mini:64px; --topbar:56px; --fs-body:13px; --fs-label:13px; --fs-meta:12px; --fs-page:25px; --h-control:38px; --h-btn:36px; --h-btn-sm:30px; --h-row:44px; }
body { font-family:var(--font); font-size:13px; line-height:1.55; }
[data-module] { --module:var(--module-service); --module-bg:var(--module-service-bg); --module-solid:var(--module-service-solid); }
[data-module="technical"] { --module:var(--module-technical); --module-bg:var(--module-technical-bg); --module-solid:var(--module-technical-solid); }
[data-module="complaints"] { --module:var(--module-complaints); --module-bg:var(--module-complaints-bg); --module-solid:var(--module-complaints-solid); }
[data-module="satisfaction"] { --module:var(--module-satisfaction); --module-bg:var(--module-satisfaction-bg); --module-solid:var(--module-satisfaction-solid); }
[data-module="digital"] { --module:var(--module-digital); --module-bg:var(--module-digital-bg); --module-solid:var(--module-digital-solid); }
.shell .sidebar { border-right:1px solid var(--line); }
.sidebar-heading { min-height:68px; padding:12px; border-color:var(--line); }
.shell .sidebar .brand img { filter:var(--brand-logo-filter); width:27px; height:27px; }
.shell .sidebar .wordmark { color:var(--ink); font-size:11px; letter-spacing:.02em; }
.shell .sidebar .wordmark b { color:var(--brand-blue); }
.shell .sidebar .wordmark small { color:var(--muted); font-size:10px; }
.shell .nav { padding:8px; }
.shell .nav .nav-section { margin:10px 0 3px; padding:4px 10px; font-size:9px; letter-spacing:.11em; }
.shell .nav a { min-height:35px; padding:8px 10px; margin-bottom:2px; font-size:12px; gap:9px; border-radius:6px; }
.shell .nav a svg { width:17px; height:17px; color:var(--module); }
.shell .nav a:hover { background:var(--surface-hover); color:var(--ink); }
.shell .nav a.active { background:var(--module-bg); color:var(--module); box-shadow:inset 3px 0 var(--module-solid); }
.shell .nav a.active svg { color:var(--module); }
.sidebar-foot { padding:12px; border-color:var(--line); }
.sidebar-foot .plan-box { border:1px solid var(--line); background:var(--surface-alt); color:var(--ink-2); padding:10px; }
.sidebar-foot b { color:var(--ink)!important; }
.sidebar .admin-tag { background:var(--purple-bg); color:var(--purple); margin:0 12px 4px; padding:3px 7px; font-size:9px; }
.sidebar-toggle:hover { color:var(--accent); }
.topbar { height:56px; min-height:56px; padding:10px 24px; gap:12px; }
.crumb { font-size:13px; font-weight:600; }
.content { padding:22px 24px; }
.page-head { gap:16px; margin-bottom:20px; }
.page-head h1,.dashboard-welcome h1 { font-size:25px; line-height:1.25; margin:5px 0 7px; }
.page-head p { font-size:13px; line-height:1.55; }
.page-head .eyebrow { color:var(--module,var(--accent)); font-size:10px; }
.dashboard-welcome { padding:0 0 20px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
.card { border-radius:10px; box-shadow:var(--shadow-sm); }
.card-head { min-height:48px; padding:12px 16px; gap:10px; }
.card-head h2,.card-head h3 { font-size:14px; }
.card-body { padding:16px; }
.btn { height:36px; min-height:36px; border-radius:6px; padding:0 12px; font-size:12px; gap:7px; }
.btn-sm { height:30px; min-height:30px; padding:0 10px; font-size:11px; }
.btn-icon { width:36px; padding:0; }
.btn-primary { background:var(--brand-blue); color:var(--on-brand); box-shadow:var(--shadow-sm); }
.btn-dark { background:var(--contrast-surface); }
.input,.select { height:38px; min-height:38px; font-size:13px; padding:0 10px; border-radius:6px; }
.textarea { font-size:13px; min-height:90px; border-radius:6px; }
.field > label,.label { font-size:12px; }
.small,.hint { font-size:12px; }
.badge { font-size:10px; min-height:21px; padding:3px 7px; gap:4px; border-radius:5px; }
.kpi3,.kpi { padding:16px; border-top:3px solid var(--chart-2); }
.kpi3:nth-child(2),.kpi:nth-child(2) { border-top-color:var(--chart-1); }
.kpi3:nth-child(3),.kpi:nth-child(3) { border-top-color:var(--chart-4); }
.kpi3:nth-child(4),.kpi:nth-child(4) { border-top-color:var(--chart-3); }
.kpi-value,.kpi .kpi-value,.kpi3 .kpi-value { font-size:26px; margin:8px 0 5px; }
.kpi-label,.task-label { font-size:12px; }
.kpi-sub,.task-sub { font-size:11px; }
.task { padding:15px; gap:12px; }
.task-ico,.kpi-ico { width:34px; height:34px; border-radius:8px; }
.task-value { font-size:24px; }
.section-title { margin-top:20px; margin-bottom:12px; font-size:14px; }
.section-heading { margin:22px 0 12px; }
.section-heading h2 { font-size:15px; }
.table th { padding:10px 14px; font-size:10px; }
.table td { padding:11px 14px; font-size:12px; }
.list-rows > li > a { padding:12px 16px; font-size:12px; }
.seg { padding:3px; border-radius:7px; }
.seg button { min-height:30px; font-size:12px; border-radius:5px; }
.hub-tabs { padding:0 24px; gap:20px; }
.hub-tabs a { height:40px; padding:11px 0; font-size:12px; }
.avatar { width:30px; height:30px; border-radius:8px; background:var(--accent-bg); color:var(--accent); }
.wa-pill { height:30px; padding:5px 9px; font-size:11px; }
.wa-overview { border-radius:10px; margin-bottom:18px; }
.wa-overview > div { padding:16px; gap:10px; }
.wa-overview b { font-size:25px; }
.wa-overview .wa-plan b { font-size:14px; }
.wa-summary-icon { width:32px; height:32px; border-radius:8px; background:var(--cyan-bg); color:var(--cyan); }
.wa-center-grid { grid-template-columns:280px minmax(0,1fr); gap:16px; }
.wa-connect-help h3 { font-size:18px; }
.wa-scan-steps { gap:10px; margin:15px 0; }
.wa-scan-steps li,.wa-connect-help > p { font-size:13px; }
.wa-option { padding:12px 0; }
.wa-option b { font-size:13px; }
.wa-option .small { font-size:12px; }
.wa-account.selected { background:var(--cyan-bg); border-color:var(--cyan-line); box-shadow:inset 3px 0 var(--brand-cyan); }
.wa-account-icon { color:var(--cyan); background:var(--cyan-bg); }
.module-shelf { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:0 0 22px; }
.module-card { display:flex; align-items:center; gap:10px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); transition:transform .2s,border-color .2s; }
.module-card:hover { text-decoration:none; border-color:var(--module-solid); transform:translateY(-2px); }
.module-card > .module-icon { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; color:var(--module); background:var(--module-bg); flex:none; }
.module-icon svg { width:17px; height:17px; }
.module-card b,.module-card strong { display:block; font-size:12px; line-height:1.35; }
.module-card small { display:block; color:var(--muted); font-size:10px; margin-top:3px; }
.module-tag { color:var(--module); background:var(--module-bg); padding:4px 8px; border-radius:5px; font-size:11px; font-weight:600; }
@media(min-width:961px) { .shell.nav-collapsed .nav { padding:8px; } .shell.nav-collapsed .nav a { width:48px; min-height:38px; } }
@media(max-width:1200px) { .module-shelf { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:1000px) { .wa-center-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:640px) {
  .content { padding:18px 14px; } .topbar { padding:8px 12px; }
  .page-head h1,.dashboard-welcome h1 { font-size:22px; }
  .page-head > .row { width:auto; } .page-head .btn { min-height:38px; }
  .input,.select,.textarea { font-size:16px; min-height:40px; }
  .btn { min-height:40px; } .btn-sm { min-height:36px; }
  .card-head,.card-body { padding:14px; }
  .module-shelf { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .module-card { padding:10px; gap:8px; }
  .module-card:last-child { grid-column:1/-1; }
  .wa-overview > div { padding:13px; }
}

/* Abonnements : prix calculé et cadeau distinct des encaissements. */
.subscription-manager .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.subscription-quote { border:1px solid var(--line); background:var(--surface-hover); border-radius:10px; padding:12px; display:grid; gap:6px; }
.subscription-quote strong { font-size:21px; color:var(--text); }
.subscription-manager [hidden] { display:none!important; }
@media(max-width:600px) { .subscription-manager .form-grid { grid-template-columns:1fr; } }

.notification-history { margin-top:16px; }
.notification-history .card-head p { margin:5px 0 0; font-weight:400; }
.notification-history .select { min-width:110px; }
.bell-item:disabled { cursor:default; opacity:.7; }

.tenant-assignment { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tenant-assignment h3 { grid-column:1/-1; margin:0!important; }
.tenant-assignment button { justify-self:start; }
@media(max-width:600px) { .tenant-assignment { grid-template-columns:1fr; } }

@media(max-width:600px) {
  .notification-history .table-wrap { overflow:visible; }
  .notification-history .table,.notification-history .table tbody { display:block; min-width:0; }
  .notification-history .table thead { display:none; }
  .notification-history .table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:10px; border-bottom:1px solid var(--line); }
  .notification-history .table td { display:block; min-width:0; border:0; padding:0; white-space:normal; }
  .notification-history .table td:first-child,.notification-history .table td[data-label="Action"] { grid-column:1/-1; }
  .notification-history .table td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:10px; margin-bottom:5px; }
  .notification-history .select { width:100%; min-width:0; }
}
