/* Add client v3 drawer (js/add-client.js). Scoped to .acx inside the shared #v2drawer.
   Tokens follow the approved design: ink #16171C / #43464E / #5F6570, lines #E8E9EC, inputs 44px radius 10 on #F4F6FB,
   primary #1C2B23, accent tint #FBFDEB, focus ring 2px white + 2px #4f5b93. Spacing on the 4/8/12/16/24 scale. */
body.v2-active #v2drawer .acx { display: flex; flex-direction: column; gap: 24px; padding-bottom: 24px; color: #16171C; }
body.v2-active #v2drawer .acx-sec { display: flex; flex-direction: column; gap: 8px; }
body.v2-active #v2drawer .acx-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.v2-active #v2drawer .acx-lbl, body.v2-active #v2drawer .acx-h { margin: 0; font-size: 13px; font-weight: 600; color: #16171C; line-height: 18px; }
body.v2-active #v2drawer .acx-lbl-sub, body.v2-active #v2drawer .acx-muted { font-weight: 400; color: #5F6570; font-size: 12px; }
body.v2-active #v2drawer .acx-hint { font-size: 12px; line-height: 16px; color: #5F6570; }
body.v2-active #v2drawer .acx-err { font-size: 12px; line-height: 16px; color: #bb2b25; }
body.v2-active #v2drawer .acx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.v2-active #v2drawer .acx-ic { flex: none; }
body.v2-active #v2drawer .acx-ic-mute { color: #5F6570; }

body.v2-active #v2drawer .acx-in { height: 44px; box-sizing: border-box; border: 1px solid #898E98; border-radius: 10px; background: #F4F6FB; color: #16171C; font: inherit; font-size: 14px; padding: 0 12px; min-width: 0; }
body.v2-active #v2drawer .acx-in::placeholder { color: #6B7180; }
body.v2-active #v2drawer .acx-in:hover { border-color: #5F6570; }
body.v2-active #v2drawer .acx-in[aria-invalid="true"] { border-color: #bb2b25; }
body.v2-active #v2drawer .acx button:focus-visible, body.v2-active #v2drawer .acx input:focus-visible, body.v2-active #v2drawer .acx select:focus-visible, body.v2-active #v2drawer .acx-foot button:focus-visible, body.v2-active #v2drawer .acx [tabindex="-1"]:focus-visible { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #4f5b93; }
body.v2-active #v2drawer .acx-field { width: 100%; }
body.v2-active #v2drawer .acx-select { appearance: auto; padding-right: 8px; }

body.v2-active #v2drawer .acx-site { display: flex; align-items: center; gap: 8px; height: 44px; box-sizing: border-box; border: 1px solid #898E98; border-radius: 10px; background: #F4F6FB; padding: 0 10px 0 12px; }
body.v2-active #v2drawer .acx-site:hover { border-color: #5F6570; }
body.v2-active #v2drawer .acx-site:focus-within { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #4f5b93; }
body.v2-active #v2drawer .acx-site.acx-site-err { border-color: #bb2b25; }
body.v2-active #v2drawer .acx-site .acx-in { flex: 1; height: 42px; border: 0; background: transparent; padding: 0; }
body.v2-active #v2drawer .acx-site .acx-in:focus-visible { box-shadow: none; }
body.v2-active #v2drawer .acx-site-state:empty { display: none; }
body.v2-active #v2drawer .acx-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
body.v2-active #v2drawer .acx-chip .acx-ic { width: 13px; height: 13px; }
body.v2-active #v2drawer .acx-chip-ok { background: #E7F4EC; color: #186A3B; }
body.v2-active #v2drawer .acx-chip-busy { background: #F0F1F3; color: #1C2B23; }
@keyframes acx-spin { to { transform: rotate(360deg); } }
body.v2-active #v2drawer .acx-spin { animation: acx-spin 1s linear infinite; }

body.v2-active #v2drawer .acx-note { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px; border-radius: 10px; font-size: 13px; line-height: 18px; }
body.v2-active #v2drawer .acx-note > span { flex: 1; }
body.v2-active #v2drawer .acx-note-err { background: #FDECEA; color: #8C1D18; }
body.v2-active #v2drawer .acx-note-warn { background: #FFF4E0; color: #6B4200; }
body.v2-active #v2drawer .acx-note-info { background: #EEF2FB; color: #2C3A6B; }
body.v2-active #v2drawer .btn.acx-btn-sm { height: 32px; padding: 0 12px; white-space: nowrap; flex: none; }

body.v2-active #v2drawer .acx-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
body.v2-active #v2drawer .acx-how li { display: flex; gap: 12px; }
body.v2-active #v2drawer .acx-how-n { flex: none; width: 24px; height: 24px; border-radius: 12px; background: #F0F1F3; color: #43464E; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
body.v2-active #v2drawer .acx-how li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
body.v2-active #v2drawer .acx-how-t { font-size: 14px; font-weight: 600; }
body.v2-active #v2drawer .acx-how-d { font-size: 13px; color: #43464E; }
body.v2-active #v2drawer .acx-alt { display: flex; gap: 16px; }
body.v2-active #v2drawer .acx-link { background: none; border: 0; padding: 0; color: #1d62b8; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 4px; }
body.v2-active #v2drawer .acx-link:hover { text-decoration: underline; }

body.v2-active #v2drawer .acx-skel { display: flex; gap: 12px; align-items: center; }
body.v2-active #v2drawer .acx-skel > div { display: flex; flex-direction: column; gap: 8px; flex: 1; }
body.v2-active #v2drawer .acx-sk { display: block; border-radius: 6px; background: linear-gradient(90deg, #EEF0F4 0, #F7F8FA 50%, #EEF0F4 100%); background-size: 400px 100%; animation: acx-sh 1.2s linear infinite; }
body.v2-active #v2drawer .acx-sk-logo { width: 34px; height: 34px; border-radius: 8px; }
body.v2-active #v2drawer .acx-sk-l1 { height: 44px; } body.v2-active #v2drawer .acx-sk-l2 { height: 12px; width: 60%; }
@keyframes acx-sh { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

body.v2-active #v2drawer .acx-id { flex-direction: row; align-items: flex-start; gap: 12px; }
body.v2-active #v2drawer .acx-id-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
body.v2-active #v2drawer .acx-logo { flex: none; width: 34px; height: 34px; border-radius: 8px; margin-top: 26px; object-fit: contain; background: #FFFFFF; border: 1px solid #E8E9EC; box-sizing: border-box; }
body.v2-active #v2drawer .acx-logo-mono { display: inline-flex; align-items: center; justify-content: center; background: #F0F1F3; color: #43464E; font-weight: 600; font-size: 14px; }

body.v2-active #v2drawer .acx-seg { display: flex; flex-wrap: wrap; gap: 8px; }
body.v2-active #v2drawer .acx-seg .acx-opt { flex: 1 1 auto; }
body.v2-active #v2drawer .acx-opt { height: 36px; padding: 0 8px; text-align: center; border: 1px solid #C9CDD4; border-radius: 6px; background: #FFFFFF; color: #16171C; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
body.v2-active #v2drawer .acx-opt:hover { background: #F4F6FB; }
body.v2-active #v2drawer .acx-opt.on { border-color: #1C2B23; background: #FBFDEB; box-shadow: inset 0 0 0 1px #1C2B23; }

body.v2-active #v2drawer .acx-svcs { border: 1px solid #E8E9EC; border-radius: 10px; overflow: hidden; }
body.v2-active #v2drawer .acx-svc { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; box-sizing: border-box; background: #FFFFFF; }
body.v2-active #v2drawer .acx-svc + .acx-svc { border-top: 1px solid #F0F1F3; }
body.v2-active #v2drawer .acx-svc.on { background: #FBFDEB; }
body.v2-active #v2drawer .acx-svc input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #1C2B23; flex: none; }
body.v2-active #v2drawer .acx-mono { flex: none; width: 28px; height: 28px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; }
body.v2-active #v2drawer .acx-mono-ga { background: #E8F0FE; color: #1A57B5; } body.v2-active #v2drawer .acx-mono-ma { background: #E7F0FF; color: #0650C2; }
body.v2-active #v2drawer .acx-mono-seo { background: #E7F4EC; color: #186A3B; } body.v2-active #v2drawer .acx-mono-so { background: #FCE8F3; color: #9C2463; } body.v2-active #v2drawer .acx-mono-wb { background: #F0F1F3; color: #43464E; }
body.v2-active #v2drawer .acx-svc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
body.v2-active #v2drawer .acx-svc-t { font-size: 14px; font-weight: 500; }
body.v2-active #v2drawer .acx-svc-sub { font-size: 12px; color: #43464E; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v2-active #v2drawer .acx-pick { height: 36px; max-width: 220px; font-size: 13px; }

body.v2-active #v2drawer .acx-goal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 140px); gap: 8px; }
body.v2-active #v2drawer .acx-money { position: relative; display: flex; }
body.v2-active #v2drawer .acx-money .acx-in { width: 100%; padding-left: 28px; font-variant-numeric: tabular-nums; }
body.v2-active #v2drawer .acx-cur { position: absolute; left: 12px; top: 0; line-height: 44px; font-size: 14px; color: #5F6570; pointer-events: none; }

body.v2-active #v2drawer .acx-team { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.v2-active #v2drawer .acx-person { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 4px; border: 1px solid #E8E9EC; border-radius: 16px; font-size: 13px; }
body.v2-active #v2drawer .acx-av { width: 24px; height: 24px; border-radius: 12px; background: #1C2B23; color: #FFFFFF; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
body.v2-active #v2drawer .acx-people { margin: 0; padding: 8px 12px; border: 1px solid #E8E9EC; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
body.v2-active #v2drawer .acx-check { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; cursor: pointer; }
body.v2-active #v2drawer .acx-check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #1C2B23; flex: none; }
body.v2-active #v2drawer .acx-read { padding: 12px; border: 1px solid #E8E9EC; border-radius: 10px; }
body.v2-active #v2drawer .acx-read > span { display: flex; flex-direction: column; gap: 2px; }
body.v2-active #v2drawer .acx-read-t { font-size: 14px; font-weight: 500; }

body.v2-active #v2drawer .acx-foot { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid #E8E9EC; background: #FFFFFF; position: sticky; bottom: 0; }
body.v2-active #v2drawer .acx-foot-note { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; color: #5F6570; }
body.v2-active #v2drawer .acx-foot .btn { white-space: nowrap; }
body.v2-active #v2drawer .btn.acx-create[aria-disabled="true"], body.v2-active #v2drawer .btn.acx-create[aria-disabled="true"]:hover { background: #E8E9EC; border-color: #E8E9EC; color: #5F6570; cursor: not-allowed; }
body.v2-active #v2drawer .acx-create .acx-ic { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }

body.v2-active #v2drawer .acx-done-t { font-size: 15px; font-weight: 600; }
body.v2-active #v2drawer .acx-list { border: 1px solid #E8E9EC; border-radius: 10px; }
body.v2-active #v2drawer .acx-li { display: flex; align-items: center; gap: 12px; padding: 12px; }
body.v2-active #v2drawer .acx-li + .acx-li { border-top: 1px solid #F0F1F3; }
body.v2-active #v2drawer .acx-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.v2-active #v2drawer .acx-li-t { font-size: 14px; font-weight: 500; }
body.v2-active #v2drawer .acx-dot { flex: none; width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
body.v2-active #v2drawer .acx-dot .acx-ic { width: 12px; height: 12px; stroke-width: 3; }
body.v2-active #v2drawer .acx-dot-ok { background: #E7F4EC; color: #186A3B; } body.v2-active #v2drawer .acx-dot-todo { background: #F0F1F3; color: #5F6570; } body.v2-active #v2drawer .acx-dot-run { background: #EEF2FB; color: #2C3A6B; }

@media (max-width: 640px) {
  body.v2-active #v2drawer .acx-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.v2-active #v2drawer .acx-goal { grid-template-columns: minmax(0, 1fr); }
  body.v2-active #v2drawer .acx-foot { padding: 12px 16px; flex-wrap: wrap; }
  body.v2-active #v2drawer .acx-foot-note { flex-basis: 100%; }
  body.v2-active #v2drawer .acx-foot .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { body.v2-active #v2drawer .acx-spin, body.v2-active #v2drawer .acx-sk { animation: none; } }

body.v2-active #v2drawer #acxRest { display: flex; flex-direction: column; gap: 24px; }
body.v2-active #v2drawer #acxRest:empty { display: none; }
/* the shared drawer paints a focus ring on every focused element (!important); the site field rings its box instead */
body.v2-active:not(.v2-pointer) #v2drawer .acx-site .acx-in:focus-visible { box-shadow: none !important; }
/* the shared drawer rule `#v2drawer .btn:hover { background: var(--hover-tint) }` also hits primary buttons, leaving white
   text on a near-white fill (found on the Staging preview, 11 Nov 2026). Inside this drawer the primary keeps its fill. */
body.v2-active #v2drawer .acx-foot .btn.btn-primary:not([aria-disabled="true"]):hover { background: #2b3d33; border-color: #2b3d33; color: #FFFFFF; filter: none; }

/* Import clients (js/add-client.js, window.ImportClients). Same tokens as Add client; table per the approved design. */
body.v2-active #v2drawer .imx-tabs { display: flex; gap: 20px; padding: 0 24px; border-bottom: 1px solid #E8E9EC; }
body.v2-active #v2drawer .imx-tabs[hidden] { display: none; }
body.v2-active #v2drawer .imx-tabs [role="tab"] { height: 44px; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: #5F6570; cursor: pointer; border-radius: 4px 4px 0 0; }
body.v2-active #v2drawer .imx-tabs [role="tab"]:hover { color: #16171C; }
body.v2-active #v2drawer .imx-tabs [role="tab"][aria-selected="true"] { color: #16171C; font-weight: 600; box-shadow: inset 0 -2px 0 #16171C; }
body.v2-active #v2drawer .imx-tabs [role="tab"]:focus-visible { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #4f5b93; }
body.v2-active #v2drawer .imx { gap: 16px; }
body.v2-active #v2drawer .imx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
body.v2-active #v2drawer .imx-chips { display: flex; gap: 6px; }
body.v2-active #v2drawer .imx-chip { height: 32px; padding: 0 12px; border-radius: 9999px; border: 1px solid #C9CDD4; background: #FFFFFF; color: #16171C; font: inherit; font-size: 13px; cursor: pointer; }
body.v2-active #v2drawer .imx-chip:hover:not([disabled]) { background: #F4F6FB; }
body.v2-active #v2drawer .imx-chip[aria-pressed="true"] { border-color: #16171C; background: #E8FF6B; font-weight: 600; }
body.v2-active #v2drawer .imx-chip[disabled] { color: #898E98; cursor: not-allowed; }
body.v2-active #v2drawer .imx-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #4f5b93; }
body.v2-active #v2drawer .imx-table { border: 1px solid #E8E9EC; border-radius: 12px; overflow: hidden; }
body.v2-active #v2drawer .imx-tr { display: grid; grid-template-columns: 36px minmax(0, 1.2fr) minmax(0, 1.3fr) 156px; gap: 12px; align-items: center; min-height: 56px; padding: 6px 16px; background: #FFFFFF; }
body.v2-active #v2drawer .imx-csv .imx-tr { grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr); }
body.v2-active #v2drawer .imx-sp { text-align: right; }
body.v2-active #v2drawer .imx-th > :nth-child(4) { text-align: right; }
body.v2-active #v2drawer .imx-spend { font-weight: 500; font-variant-numeric: tabular-nums; }
body.v2-active #v2drawer .imx-zero, body.v2-active #v2drawer .imx-off .imx-spend { color: #5F6570; }
body.v2-active #v2drawer .imx-sk-s { display: inline-block; width: 64px; height: 14px; border-radius: 4px; vertical-align: middle; }
body.v2-active #v2drawer .imx-tr + .imx-tr { border-top: 1px solid #F0F1F3; }
body.v2-active #v2drawer .imx-tr:not(.imx-th):hover { background: #FAFBFC; }
body.v2-active #v2drawer .imx-th { min-height: 0; padding: 10px 16px; background: #FAFBFC; border-bottom: 1px solid #E8E9EC; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5F6570; }
body.v2-active #v2drawer .imx-off { background: #FAFBFC; }
body.v2-active #v2drawer .imx-off .imx-t { color: #5F6570; }
body.v2-active #v2drawer .imx-cb { width: 18px; height: 18px; margin: 0; accent-color: #1C2B23; cursor: pointer; }
body.v2-active #v2drawer .imx-cb[disabled] { cursor: not-allowed; }
body.v2-active #v2drawer .imx-acc { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.v2-active #v2drawer .imx-two { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.v2-active #v2drawer .imx-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2-active #v2drawer .imx-becomes { display: flex; align-items: center; gap: 6px; min-width: 0; }
body.v2-active #v2drawer .imx-becomes .imx-t { font-weight: 600; }
body.v2-active #v2drawer .imx-tag { flex: none; font-size: 11px; font-weight: 600; border-radius: 9999px; padding: 1px 8px; line-height: 16px; }
body.v2-active #v2drawer .imx-tag-new { color: #186A3B; background: #E7F4EC; }
body.v2-active #v2drawer .imx-tag-merged { color: #1B4F9C; background: #E7F0FB; }
body.v2-active #v2drawer .imx-tag-existing { color: #43464E; background: #F0F1F3; }
body.v2-active #v2drawer .imx-tag-skip { color: #7A4B00; background: #FBF0DE; }
body.v2-active #v2drawer .imx-tag-bad { color: #8C1D18; background: #FDECEA; }
body.v2-active #v2drawer .imx-drop { border: 1.5px dashed #898E98; border-radius: 12px; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: #FAFBFC; color: #16171C; }
body.v2-active #v2drawer .imx-drop .acx-ic { color: #43464E; }
body.v2-active #v2drawer .imx-drop-sm { flex-direction: row; justify-content: space-between; padding: 12px 16px; text-align: left; }
body.v2-active #v2drawer .imx-drop-on { border-color: #1C2B23; background: #FBFDEB; }
body.v2-active #v2drawer .imx-drop-s { color: #43464E; font-size: 13px; }
body.v2-active #v2drawer .imx-drop-b { display: flex; gap: 8px; margin-top: 8px; }
body.v2-active #v2drawer .imx-drop-sm .imx-drop-b { margin-top: 0; }
body.v2-active #v2drawer .imx-pick { position: relative; cursor: pointer; }
body.v2-active #v2drawer .imx-pick:focus-within { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #4f5b93; }
body.v2-active #v2drawer .imx-file { font-size: 13px; color: #43464E; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v2-active #v2drawer .imx-load { display: flex; flex-direction: column; gap: 8px; }
body.v2-active #v2drawer .imx-sk { height: 56px; border-radius: 8px; }
body.v2-active #v2drawer .acx-dot-bad { background: #FDECEA; color: #8C1D18; }
@media (max-width: 640px) {
  body.v2-active #v2drawer .imx-tr { grid-template-columns: 32px minmax(0, 1fr); }
  body.v2-active #v2drawer .imx-tr > :nth-child(3), body.v2-active #v2drawer .imx-tr > :nth-child(4) { grid-column: 2; text-align: left; }
  body.v2-active #v2drawer .imx-th > :nth-child(3), body.v2-active #v2drawer .imx-th > :nth-child(4) { display: none; }
  body.v2-active #v2drawer .imx-drop-sm { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { body.v2-active #v2drawer .imx-sk, body.v2-active #v2drawer .imx-sk-s { animation: none; } }
