/* Shared CRM presentation. CAEWebApp remains responsible for its controls and commands. */
:root {
    --crm-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --crm-shell-ink: #193e43;
    --crm-shell-muted: #5c716f;
    --crm-shell-accent: #176b58;
    --crm-shell-border: #dce7e2;
    --crm-shell-background: #f5f8f6;
    --theme-c: #193e43;
    --theme-c-d: #5c716f;
    --theme-bg: #fff;
    --theme-bg-a: #eef5f1;
    --theme-bg-aa: #e2eee7;
    --theme-border: #dce7e2;
    --theme-primaryc: #176b58;
    --theme-primarybg: #176b58;
    --theme-primarybg-a: #125744;
    --theme-primarybg-aa: #104b3c;
    --theme-primarybg-c: #fff;
    --theme-navbar-bg: #fff;
    --theme-navbar-c: #193e43;
    --theme-navbar-iconinvert: 0;
    --theme-button-c: #193e43;
    --theme-button-bg: #fff;
    --theme-button-bg-a: #eef5f1;
    --theme-button-default-bg: #176b58;
    --theme-button-default-bg-a: #125744;
    --theme-button-default-c: #fff;
}
html { font-size: 16px; }
body, button, input, select, textarea, table { font-family: var(--crm-font); }
body:has(.crm-shell) { margin: 0; background: var(--crm-shell-background); color: var(--crm-shell-ink); }
body:has(.crm-shell) > #WA_NavBar,
body:has(.crm-shell) > #WA_NavBar + div { display: none; }
.crm-shell { --crm-sidebar-width: 232px; --crm-topbar-height: 72px; font-family: var(--crm-font); font-size: 1rem; line-height: 1.5; }
.crm-shell *, .crm-shell *::before, .crm-shell *::after { box-sizing: border-box; }
.crm-shell [hidden] { display: none !important; }
.crm-shell a { color: var(--crm-shell-accent); }
.crm-shell :focus-visible { outline: 3px solid #32836d; outline-offset: 3px; }
.crm-shell button { font: inherit; }
.crm-skip-link { position: fixed; z-index: 1000; left: 1rem; top: -6rem; padding: .8rem 1.2rem; background: white; border: 1px solid var(--crm-shell-accent); border-radius: 8px; }
.crm-skip-link:focus { top: 1rem; }
.crm-topbar { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--crm-topbar-height); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 28px 0 16px; border-bottom: 1px solid var(--crm-shell-border); background: #fff; }
.crm-brand-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crm-shell .crm-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--crm-shell-ink); text-decoration: none; flex-shrink: 0; }
.crm-brand > img { width: 57px; height: 26px; object-fit: cover; }
.crm-brand > span { padding-left: 12px; border-left: 1px solid var(--crm-shell-border); font-size: .85rem; font-weight: 700; line-height: 1.3; letter-spacing: .03em; }
.crm-brand small { display: block; margin-top: 3px; font-size: .65rem; font-weight: 400; letter-spacing: 0; color: var(--crm-shell-muted); }
.crm-shell-icon-button { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--crm-shell-ink); cursor: pointer; text-decoration: none; }
.crm-shell-icon-button:hover { background: #eef5f1; }
.crm-shell-icon-button img { width: 20px; height: 20px; opacity: .75; }
.crm-topbar-tools { display: flex; align-items: center; gap: 20px; min-width: 0; }
.crm-shell .crm-scope-bar { position: relative; display: flex; flex-wrap: nowrap; gap: 7px; padding: 0; border: 0; background: transparent; font-family: var(--crm-font); color: var(--crm-shell-ink); }
.crm-scope-icon { width: 17px; height: 17px; opacity: .6; }
.crm-shell .crm-scope-bar select { min-width: 94px; min-height: 38px; padding: .4rem .55rem; border: 1px solid var(--crm-shell-border); border-radius: 8px; color: var(--crm-shell-ink); background-color: #f8fbf9; font-size: .83rem; font-weight: 600; }
.crm-shell .crm-scope-bar strong { font-size: .85rem; }
.crm-shell #crm-scope-message { position: absolute; top: calc(100% + 12px); right: 0; width: min(350px, calc(100vw - 32px)); margin: 0; padding: 14px 16px; border: 1px solid #e7cda4; border-radius: 9px; background: #fff8ec; color: #744e1f; box-shadow: 0 6px 24px #193e4314; }
.crm-account-button { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--crm-shell-ink); text-align: left; cursor: pointer; }
.crm-account-button:hover { background: #f2f7f4; }
.crm-avatar { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #d7e6dd; border-radius: 50%; background: #edf5ef; color: #236148; font-size: .78rem; font-weight: 650; }
.crm-account-info { display: grid; gap: 1px; min-width: 0; }
.crm-account-info strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; }
.crm-account-info small { color: var(--crm-shell-muted); font-size: .7rem; }
.crm-account-chevron { width: 15px; height: 15px; opacity: .6; }
.crm-sidebar { position: fixed; top: var(--crm-topbar-height); bottom: 0; left: 0; z-index: 90; width: var(--crm-sidebar-width); display: flex; flex-direction: column; overflow-y: auto; padding: 27px 15px 16px; background: #fff; border-right: 1px solid var(--crm-shell-border); }
.crm-nav-group + .crm-nav-group { margin-top: 30px; padding-top: 22px; border-top: 1px solid #edf2ee; }
.crm-nav-group-label { margin: 0 12px 13px; color: #647975; font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.crm-shell .crm-nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 4px 0; padding: 10px 12px; border-radius: 8px; color: #3d5654; font-size: .875rem; font-weight: 450; text-decoration: none; white-space: nowrap; }
.crm-nav-link img { flex: 0 0 19px; width: 19px; height: 19px; opacity: .65; }
.crm-shell .crm-nav-link:hover { color: #175b48; background: #f3f7f4; }
.crm-shell .crm-nav-link[aria-current="page"] { color: #155c46; background: #e8f2eb; font-weight: 650; }
.crm-nav-link[aria-current="page"] img { opacity: .85; }
.crm-sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 30px 12px 2px; color: #6a7e77; font-size: .7rem; white-space: nowrap; }
.crm-status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #83a792; }
.crm-sidebar-close { display: none; }
.crm-sidebar-collapsed { --crm-sidebar-width: 76px; }
.crm-sidebar-collapsed .crm-sidebar { padding-inline: 12px; }
.crm-sidebar-collapsed .crm-nav-link { justify-content: center; padding-inline: 0; }
.crm-sidebar-collapsed .crm-nav-group-label, .crm-sidebar-collapsed .crm-nav-link span, .crm-sidebar-collapsed .crm-sidebar-footer { display: none; }
.crm-workspace { min-height: 100dvh; margin-left: var(--crm-sidebar-width); padding: calc(var(--crm-topbar-height) + 36px) clamp(24px, 3vw, 52px) 32px; }
.crm-workspace:focus { outline: none; }
.crm-breadcrumbs { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 1440px; margin: -12px auto 22px; color: var(--crm-shell-muted); font-size: .78rem; }
.crm-back-button { width: 32px; height: 32px; flex-basis: 32px; padding: 7px; }
.crm-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; min-width: 0; padding: 0; margin: 0; list-style: none; }
.crm-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.crm-breadcrumbs li + li::before { content: "/"; margin: 0 10px; color: #9aaca4; }
.crm-breadcrumbs a, .crm-breadcrumbs button { padding: 0; border: 0; background: transparent; color: var(--crm-shell-muted); font: inherit; text-decoration: none; cursor: pointer; }
.crm-breadcrumbs a:hover, .crm-breadcrumbs button:hover { color: var(--crm-shell-accent); text-decoration: underline; }
.crm-breadcrumbs [aria-current] { color: #2e5149; }

/* One visual vocabulary for all existing page compositions and framework dialogs. */
.crm-shell .crm-page, .crm-shell .crm-auth-shell, .crm-record-dialog {
    --crm-ink: var(--crm-shell-ink);
    --crm-muted: var(--crm-shell-muted);
    --crm-accent: var(--crm-shell-accent);
    --crm-border: var(--crm-shell-border);
    font-family: var(--crm-font);
}
.crm-shell .crm-page { width: 100%; max-width: 1440px; margin: 0 auto 36px; padding: 0; border-radius: 0; background: transparent; }
.crm-shell .crm-page-narrow { max-width: 52rem; }
.crm-shell .crm-page h1 { font-size: clamp(1.7rem, 2.2vw, 2rem); letter-spacing: -.035em; font-weight: 650; }
.crm-shell .crm-page-header { margin-bottom: 28px; align-items: flex-start; }
.crm-shell .crm-eyebrow, .crm-shell .crm-campaign-kicker { color: #627c70; font-size: .67rem; letter-spacing: .1em; font-weight: 600; }
.crm-shell .crm-intro { margin-top: .65rem; font-size: .93rem; }
.crm-shell .crm-page .crm-button, .crm-shell .crm-page button.WA_Button, .crm-shell .crm-page a.WA_Button { border-radius: 8px; font-family: var(--crm-font); }
.crm-shell .crm-page .crm-button:not(.crm-button-secondary):hover { background: #125744; border-color: #125744; }
.crm-shell .crm-page .crm-button-secondary, .crm-shell .crm-framework button.WA_Button, .crm-shell .crm-framework a.WA_Button { border-color: #cfddd4; }
.crm-shell .crm-page .crm-button-secondary:hover, .crm-shell .crm-framework button.WA_Button:hover, .crm-shell .crm-framework a.WA_Button:hover { background-color: #edf5ef; border-color: #85ac98; }
.crm-shell .crm-framework .WA_RecordTable > tbody > tr > td { border-color: var(--crm-shell-border); }
.crm-shell .crm-framework .WA_RecordTable > thead > tr > th, .crm-shell .crm-framework .WA_RecordTable > tbody > tr > th, .crm-shell .crm-table thead { background: #f0f5f2; }
.crm-shell .crm-framework .WA_RecordTable > thead > tr > th, .crm-shell .crm-framework .WA_RecordTable > tbody > tr > th { color: #4f6a5e; font-family: var(--crm-font); font-weight: 600; }
.crm-shell .crm-framework .crm-art-region, .crm-shell .crm-table-scroll { background: white; border-color: var(--crm-shell-border); border-radius: 12px; }
.crm-shell #crm_companies .WA_RecordTable > tbody > tr > td:nth-child(4) { min-width: 7rem; overflow-wrap: normal; }
.crm-shell #crm_users .WA_RecordTable > tbody > tr > td:first-child { min-width: 9rem; }
.crm-shell #crm_users .WA_RecordTable > tbody > tr > td:nth-child(3) { min-width: 7rem; overflow-wrap: normal; }
.crm-shell #crm_users .WA_RecordTable > tbody > tr > td:nth-child(4) { min-width: 12rem; }
.crm-shell #crm_users .WA_RecordTable > tbody > tr > td:nth-child(6) { white-space: nowrap; }
.crm-record-dialog :focus-visible { outline: 3px solid #32836d; outline-offset: 2px; }
.crm-record-dialog > tbody > tr > td > .WA_NavBar { background-color: #f2f7f3 !important; }
.WA_Content:has(> .WA_SelectAction_Title) { min-width: 230px; padding: 6px; border: 1px solid var(--crm-shell-border); border-radius: 12px !important; box-shadow: 0 12px 36px #183e4324 !important; }
.WA_Content > .WA_SelectAction_Title { padding: 10px 12px 12px; border: 0; border-bottom: 1px solid var(--crm-shell-border); color: var(--crm-shell-muted); font-size: .78rem; font-weight: 600; text-align: left; }
.WA_Content > .WA_SelectAction_Button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 7px; color: var(--crm-shell-ink); font-size: .875rem; }
.WA_Content > .WA_SelectAction_Button:hover { background: #edf5ef; }
.WA_Content > .WA_SelectAction_Button img { width: 18px; height: 18px; margin: 0; opacity: .7; }
.WA_Content > .WA_SelectAction_Button.WithImages { padding-left: 12px; }
.WA_Content > .WA_SelectAction_Button.WithImages > img.WA_InlineIcon { position: static; }
.WA_Content > .WA_SelectAction_Button.Cancel { border-top: 1px solid var(--crm-shell-border); border-radius: 0; color: var(--crm-shell-muted); justify-content: center; }
.crm-shell .crm-card, .crm-shell .crm-record-card, .crm-shell .crm-overview-card { border-color: var(--crm-shell-border); border-radius: 12px; }
.crm-shell .crm-company-tabs .WA_TabSelector { border-bottom: 1px solid var(--crm-shell-border); padding-bottom: 0; }
.crm-shell .crm-company-tabs .WA_TabSelector > button.WA_Button { background: transparent; border-radius: 0; }
.crm-shell .crm-page .crm-campaign-list-intro { background: #edf5ef; border-color: #d6e5db; }
.crm-shell .crm-campaign-list-intro .crm-campaign-kicker { margin: 0 0 .25rem; font-size: .72rem; letter-spacing: .035em; font-weight: 500; }
.crm-shell .crm-campaign-prepare .crm-campaign-step { box-shadow: none; }
.crm-shell .crm-campaign-prepare .crm-campaign-step > summary { min-height: 76px; }
.crm-shell .crm-campaign-prepare .crm-campaign-summary { position: sticky; top: calc(var(--crm-topbar-height) + 24px); }
.crm-shell-public .crm-workspace { margin-left: 0; padding-top: var(--crm-topbar-height); }
.crm-shell-public .crm-brand-area { padding-left: 12px; }
.crm-shell .crm-auth-shell { min-height: calc(100dvh - var(--crm-topbar-height) - 32px); background: transparent; }
.crm-shell .crm-auth-panel { box-shadow: 0 12px 42px #294d3510; }
body.crm-drawer-open { overflow: hidden; }

@media (max-width: 1100px) {
    .crm-shell { --crm-sidebar-width: 210px; }
    .crm-shell.crm-sidebar-collapsed { --crm-sidebar-width: 76px; }
    .crm-topbar { padding-right: 20px; }
    .crm-account-info strong { max-width: 140px; }
    .crm-workspace { padding-inline: 24px; }
}
@media (min-width: 801px) and (max-width: 1180px) {
    .crm-shell .crm-campaign-prepare .crm-campaign-workspace { grid-template-columns: minmax(0, 1fr); }
    .crm-shell .crm-campaign-prepare .crm-campaign-summary { position: static; }
}
@media (max-width: 800px) {
    .crm-shell { --crm-topbar-height: 64px; --crm-sidebar-width: 260px; }
    .crm-topbar { padding: 0 12px; gap: 8px; }
    .crm-brand-area { gap: 6px; }
    .crm-brand { gap: 8px; }
    .crm-brand > img { width: 49px; height: 24px; }
    .crm-brand > span { padding-left: 8px; font-size: .78rem; }
    .crm-brand small { display: none; }
    .crm-topbar-tools { gap: 8px; }
    .crm-account-info, .crm-account-chevron, .crm-scope-icon { display: none; }
    .crm-account-button { padding: 4px; }
    .crm-avatar { width: 33px; height: 33px; }
    .crm-sidebar { z-index: 120; top: 0; width: min(290px, calc(100vw - 48px)); padding-top: 16px; visibility: hidden; transform: translateX(-100%); box-shadow: 8px 0 40px #173e431c; }
    .crm-sidebar-open .crm-sidebar { visibility: visible; transform: translateX(0); }
    .crm-sidebar-close { display: inline-flex; align-self: flex-end; margin-bottom: 18px; }
    .crm-sidebar-backdrop { position: fixed; inset: 0; z-index: 110; border: 0; background: #183b4260; cursor: pointer; }
    .crm-workspace { margin-left: 0; padding: calc(var(--crm-topbar-height) + 24px) 20px 24px; }
    .crm-breadcrumbs { margin-top: -6px; margin-bottom: 18px; font-size: .75rem; }
    .crm-shell .crm-page-header { gap: 16px; margin-bottom: 24px; }
    .crm-shell .crm-campaign-prepare .crm-campaign-summary { position: static; }
    .crm-shell #crm-scope-message { position: fixed; top: calc(var(--crm-topbar-height) + 8px); left: 14px; right: 14px; width: auto; }
}
@media (max-width: 480px) {
    .crm-workspace { padding-inline: 14px; }
    .crm-topbar { padding-inline: 8px; }
    .crm-brand-area { gap: 2px; }
    .crm-shell .crm-brand { gap: 5px; }
    .crm-brand > img { width: 42px; }
    .crm-brand > span { font-size: .72rem; padding-left: 5px; }
    .crm-shell .crm-scope-bar select { min-width: 84px; font-size: .78rem; padding-inline: 5px; }
    .crm-topbar-tools { gap: 4px; }
    .crm-shell .crm-page-header { flex-direction: column; align-items: stretch; }
    .crm-shell .crm-page-header > .WA_ActionBar { justify-content: flex-start; }
    .crm-shell .crm-auth-shell { padding: 28px 0; }
    .crm-shell .crm-auth-panel { padding: 24px; }
}
@media print {
    .crm-topbar, .crm-sidebar, .crm-skip-link, .crm-sidebar-backdrop { display: none !important; }
    .crm-workspace { margin: 0; padding: 0; }
}
