/* VISUAL320_1. Additive visual layer; keep original DOM, routes and visibility. */
html.crm-visual320{--v320-brand:var(--brand,#2563eb);--v320-workspace:var(--workspace-color,#e4eeff);--v320-paper:#fff;--v320-text:#172b4d;--v320-muted:#6d7f99;--v320-line:color-mix(in srgb,var(--v320-brand) 13%,#e7ecf3);--v320-soft:color-mix(in srgb,var(--v320-brand) 5%,#fff);--v320-side:color-mix(in srgb,var(--v320-brand) 25%,#0a152c);--v320-side-end:color-mix(in srgb,var(--v320-brand) 12%,#071121);--v320-shadow:0 7px 26px #172b4d07;--v320-button-text:#fff}
html.crm-visual320[data-theme=dark]{--v320-paper:#15243b;--v320-text:#e6eefb;--v320-muted:#a4b6d0;--v320-line:#30425d;--v320-soft:#1c304e;--v320-shadow:0 8px 28px #0002}
html.crm-visual320 body{--pv-surface:var(--v320-paper);--pv-soft:var(--v320-soft);--pv-line:var(--v320-line);--pv-text:var(--v320-text);--pv-muted:var(--v320-muted);color:var(--v320-text)}
html.crm-visual320 .mv-master{--brand:var(--v320-brand)!important;--pv-surface:var(--v320-paper);--pv-soft:var(--v320-soft);--pv-line:var(--v320-line);--pv-text:var(--v320-text);--pv-muted:var(--v320-muted)}
html.crm-visual320 :is(.shell,.p280-workspace,.mv-master){background:linear-gradient(135deg,color-mix(in srgb,var(--v320-workspace) 45%,#fff),var(--v320-soft))!important}
html.crm-visual320[data-theme=dark] :is(.shell,.p280-workspace,.mv-master){background:#0c1729!important}
html.crm-visual320 :is(.sidebar,.workspace-sidebar,.p280-sidebar){--pv-text:#e1ebff;--pv-muted:#a8bad7;background:linear-gradient(160deg,var(--v320-side),var(--v320-side-end))!important;border-right:1px solid #ffffff0d;box-shadow:8px 0 30px #0a152c08}
html.crm-visual320 .sidebar :is(.brand,.brandmark,.sideuser>div:not(.avatar)){color:#e1ebff!important}
html.crm-visual320 .sidebar :is(.preview-brand strong,.preview-brand-mark,.sideuser strong,.preview-group-button,.preview-subitem,.preview-sidebar-bottom button){color:#e1ebff!important}
html.crm-visual320 .sidebar .preview-group-button{background:transparent!important}
html.crm-visual320 .sidebar .preview-group-button[aria-expanded=true]{background:#ffffff0d!important}
html.crm-visual320 .sidebar .preview-group-button span{color:inherit!important}
html.crm-visual320 .sidebar :is(.preview-brand span,.sideuser small,.preview-nav-caption){color:#a8bad7!important}
html.crm-visual320 :is(.sidebar,.p280-sidebar) :is(.preview-group-button,.preview-subitem,.navbutton,#p280Nav button){border-radius:12px!important;box-shadow:none!important}
html.crm-visual320 :is(.sidebar,.p280-sidebar) :is(.preview-subitem.selected,.navbutton.selected,#p280Nav button.active){background:var(--v320-brand)!important;color:#fff!important;box-shadow:0 5px 18px color-mix(in srgb,var(--v320-brand) 25%,transparent)!important}
html.crm-visual320 :is(.sidebar,.p280-sidebar) :is(.preview-group-button,.preview-subitem,.navbutton,#p280Nav button):hover{background:color-mix(in srgb,var(--v320-brand) 35%,var(--v320-side))!important;color:#fff!important}
html.crm-visual320 :is(.p280-sidebar-foot,.p280-welcome){background:linear-gradient(135deg,var(--v320-side),color-mix(in srgb,var(--v320-brand) 35%,#10223d))!important;border-color:#ffffff15}
html.crm-visual320 .mv-master :is(.p280-top [data-p280=theme],.p280-quick-grid .mv-quick-active,.p280-sidebar-foot button,.mv-task-form button){background:var(--v320-brand)!important;color:#fff!important}
html.crm-visual320 .mv-master :is(.p280-top [data-p280=notices],.p280-quick-grid button svg,.p280-price,.mv-summary-calculation>div){color:var(--v320-brand)!important}
html.crm-visual320 .mv-master .p280-quick-grid .mv-quick-active svg{color:#fff!important}
html.crm-visual320 .mv-plan-modal .p280-section h3>b{background:var(--v320-brand)}
html.crm-visual320 .mv-switch input[type=checkbox]:checked{background:var(--v320-brand)!important}
html.crm-visual320 .mv-monitor-stats progress{accent-color:var(--v320-brand)}
html.crm-visual320 :is(.topbar,.p280-top){background:var(--v320-paper)!important;border-bottom:1px solid var(--v320-line);box-shadow:0 3px 18px #152b4c03}
html.crm-visual320 :is(h1,h2,h3,h4){letter-spacing:-.35px}
html.crm-visual320 :is(.heading h1,.att-title h1,.cm-heading h1,.p280-page-title h1){color:var(--v320-text);letter-spacing:-.8px}
html.crm-visual320 :is(.panel,.stat,.xp-kpis>article,.cm-panel,.cm-stat,.v31-panel,.ac320-card,.u300-section,.w-panel,.i272-mail-main,.i272-google-calendar,.p280-card,.p280-plan){background:var(--v320-paper)!important;border:1px solid var(--v320-line)!important;border-radius:20px!important;box-shadow:var(--v320-shadow)!important}
html.crm-visual320 :is(.panel,.ac320-card,.p280-card){padding:22px}
html.crm-visual320 :is(.stat,.cm-stat,.xp-kpis>article){border-top:3px solid color-mix(in srgb,var(--v320-brand) 70%,var(--v320-paper))!important}
html.crm-visual320 :is(.stat .value,.xp-kpis>article>strong){color:var(--v320-text)}
html.crm-visual320 :is(button,.btn,.button,.cm-btn,.v31-button,.w-button,.ui271-button,.ac320-button){border-radius:12px;transition:box-shadow .15s,border-color .15s,background-color .15s}
html.crm-visual320 :is(.primary,.cm-btn.primary,.v31-button.primary,.ac320-button.primary,.ui271-primary,.att-new,.att-finish,button[type=submit]):not(.danger){background:linear-gradient(125deg,color-mix(in srgb,var(--v320-brand) 88%,#fff),var(--v320-brand))!important;border-color:var(--v320-brand)!important;color:var(--v320-button-text)!important;box-shadow:0 6px 17px color-mix(in srgb,var(--v320-brand) 20%,transparent)}
html.crm-visual320 :is(.secondary,.cm-btn:not(.primary):not(.danger),.v31-button:not(.primary):not(.danger),.ac320-button:not(.primary):not(.danger)){background:var(--v320-paper);border-color:var(--v320-line);color:var(--v320-text)}
html.crm-visual320 :is(button,.btn):focus-visible{outline:3px solid color-mix(in srgb,var(--v320-brand) 38%,transparent);outline-offset:3px}
html.crm-visual320 :is(button,.btn):disabled{box-shadow:none;cursor:not-allowed}
html.crm-visual320 :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=hidden],[type=file]),select,textarea){border-color:var(--v320-line);border-radius:12px;background-color:var(--v320-paper);color:var(--v320-text);box-shadow:0 2px 5px #172b4d03}
html.crm-visual320 :is(.formgrid,.v31-grid,.ac320-grid,.w-grid) :is(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=hidden],[type=file]),select,textarea){border:1px solid var(--v320-line)!important;padding:11px 12px;border-radius:12px!important;background:var(--v320-paper)!important;color:var(--v320-text)}
html.crm-visual320 :is(input,select,textarea):focus-visible{outline:2px solid color-mix(in srgb,var(--v320-brand) 25%,transparent);outline-offset:1px;border-color:var(--v320-brand)!important}
html.crm-visual320 :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--v320-brand)}
html.crm-visual320 input[type=color]{border:1px solid var(--v320-line);border-radius:10px;padding:3px}
html.crm-visual320 :is(dialog,#modal,#masterModal){border:1px solid var(--v320-line);border-radius:24px!important;box-shadow:0 24px 80px #071a3c35;background:var(--v320-paper);color:var(--v320-text)}
html.crm-visual320 dialog::backdrop{background:#0a193969;backdrop-filter:blur(3px)}
html.crm-visual320 .modalhead{border-bottom:1px solid var(--v320-line);padding-bottom:17px;margin-bottom:20px}
html.crm-visual320 .modalhead h2{color:var(--v320-text)}
html.crm-visual320 :is(.formgrid,.v31-grid,.ac320-grid){gap:18px}
html.crm-visual320 :is(th,.cm-table th){background:var(--v320-soft);color:var(--v320-muted);border-color:var(--v320-line)}
html.crm-visual320 :is(td,.cm-table td){border-color:var(--v320-line)}
html.crm-visual320 :is(.notice,.note,.cm-info,.cm-limit-box,.cm-advanced,.w-notice,.ac320-note){border-color:var(--v320-line);border-radius:14px;background:var(--v320-soft)}
html.crm-visual320 :is(.lane,.crmcolumn){border-radius:18px;border-color:var(--v320-line)}
html.crm-visual320 :is(.task,.crmcard,.cm-recipient){border-radius:14px;border-color:var(--v320-line)}
html.crm-visual320 :is(.cm-name-row,.cm-editor-footer){border-radius:18px;background:var(--v320-paper);border-color:var(--v320-line)}
html.crm-visual320 .cm-drop{border-radius:14px;background:var(--v320-soft)}
html.crm-visual320 .cm-phone{border-radius:25px;box-shadow:0 12px 32px #132b4d14}
html.crm-visual320 .cm-phone-header{background:var(--v320-brand);color:#fff}
html.crm-visual320 :is(.att-layout .chatlist,.att-layout .chatpane){background:var(--v320-paper)!important;border-radius:18px!important;box-shadow:var(--v320-shadow)}
html.crm-visual320 .att-layout.chatlayout{gap:14px;border-bottom:0}
html.crm-visual320 :is(.att-searchbar,.att-legend){padding-left:15px}
html.crm-visual320 .att-thread{padding-left:15px;background:var(--v320-paper);border-color:var(--v320-line)}
html.crm-visual320 .att-thread.selected{background:var(--v320-soft)}
html.crm-visual320 .att-thread-main{color:var(--v320-text)!important}
html.crm-visual320 :is(.att-layout .chathead,.att-layout .chatcontrols,.att-legend,.att-layout #chatMessages){background:var(--v320-paper);border-color:var(--v320-line)}
html.crm-visual320 .att-layout #chatMessages{background:linear-gradient(145deg,var(--v320-soft),var(--v320-paper))}
html.crm-visual320 .att-contact-person h2{color:var(--v320-text)}
html.crm-visual320 .att-message .bubble{background:var(--v320-soft);color:var(--v320-text);border-radius:16px}
html.crm-visual320 .att-message .bubble.out{background:color-mix(in srgb,var(--v320-brand) 13%,var(--v320-paper));color:var(--v320-text)}
html.crm-visual320 .att-layout #chatComposer{background:var(--v320-paper);border-color:var(--v320-line);border-radius:18px;box-shadow:0 4px 17px #112d4d06}
html.crm-visual320 .att-layout #chatText{background:transparent;border:0;box-shadow:none}
html.crm-visual320 .att-search input{background:transparent;box-shadow:none}
/* Personal queue/tab colors, semantic status colors, hidden states and drag controls are owned by existing modules. */
html.crm-visual320[data-platform-style=compact] :is(.panel,.ac320-card,.p280-card){padding:16px}
@media(max-width:700px){html.crm-visual320 :is(.panel,.ac320-card,.p280-card){padding:16px;border-radius:16px!important}html.crm-visual320 .att-layout.chatlayout{gap:0}html.crm-visual320 :is(dialog,#modal,#masterModal){border-radius:18px!important}}
@media(prefers-reduced-motion:reduce){html.crm-visual320 :is(button,.btn){transition:none}}
