/* Shared CRM design system. Public marketing pages keep their own styling. */
html[data-crm-theme=light]{--crm-bg:#f3f5f2;--crm-surface:#fff;--crm-soft:#f6f8f5;--crm-ink:#1b3229;--crm-muted:#65776e;--crm-line:#dfe6df;--crm-gold:#987d44;--crm-action:#1d4839;--crm-action-ink:#fff;--crm-shadow:0 5px 24px #1b322907;--crm-hover:#edf2ec;--crm-focus:#ac925c;--crm-danger:#a52e41}
html[data-crm-theme=dark]{--crm-bg:#111a17;--crm-surface:#18231e;--crm-soft:#1c2a23;--crm-ink:#e9eee6;--crm-muted:#a3b2a7;--crm-line:#2c3b32;--crm-gold:#c5b17e;--crm-action:#c6b17e;--crm-action-ink:#14251c;--crm-shadow:0 8px 26px #00000015;--crm-hover:#26372d;--crm-focus:#c6b17e;--crm-danger:#ffacb6}
.app-shell{background:var(--crm-bg)!important;color:var(--crm-ink)!important;font-family:'DM Sans',system-ui,sans-serif!important;font-size:13px;isolation:isolate}
html[data-crm-theme=light] .app-shell{color-scheme:light;--color-slate-950:#f5f7f3;--color-slate-900:#fff;--color-slate-800:#dfe6df;--color-slate-700:#becbc0;--color-slate-600:#7f9284;--color-slate-500:#687f6e;--color-slate-400:#546d5c;--color-slate-300:#3d5847;--color-slate-200:#294534;--color-slate-100:#1b3229;--color-amber-200:#876926;--color-amber-300:#876926;--color-amber-400:#9d7d37;--color-amber-500:#b49b63}
html[data-crm-theme=dark] .app-shell{color-scheme:dark;--color-slate-950:#111a17;--color-slate-900:#18231e;--color-slate-800:#2c3b32;--color-slate-700:#46594b;--color-slate-600:#7a8d7d;--color-slate-500:#9cae9e;--color-slate-400:#a9b8aa;--color-slate-300:#c5d0c4;--color-slate-200:#dde5d9;--color-slate-100:#eef2e9}
.app-shell .workspace{background:var(--crm-bg)}.app-shell .workspace-main{background:none!important;padding:28px clamp(18px,2.5vw,40px)!important;max-width:1720px;scrollbar-gutter:stable}.app-shell h1,.app-shell h2,.app-shell h3{color:var(--crm-ink)}.app-shell .crm-heading{margin-bottom:24px;align-items:center}.app-shell .crm-heading h1,.app-shell .access-admin-heading h1{font-family:'DM Sans',sans-serif;font-weight:500;font-size:29px;letter-spacing:-1px;line-height:1.2;margin:8px 0 10px}.app-shell .access-eyebrow{color:var(--crm-gold);font-size:9px;letter-spacing:.14em;font-weight:600}
.app-shell :where(.crm-heading p,.crm-modal p,.crm-modal label,.access-editor label,.owner-filters label,.owner-editor label,.owner-card p,.owner-card small,.crm-caption,.proposal-route,.executive-description){color:var(--crm-muted)!important;line-height:1.65}
.crm-topbar{height:76px;min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:12px 28px!important;border-bottom:1px solid var(--crm-line)!important;background:var(--crm-surface)!important;position:relative;z-index:60;box-shadow:0 2px 12px #132c1a03}.crm-topbar-brand{display:flex;align-items:center;gap:14px;flex-shrink:0}.crm-topbar .brand-link{width:176px;display:flex;flex-direction:column;gap:3px}.crm-topbar .brand-logo{width:158px;height:27px;object-fit:contain}.crm-topbar .brand-caption{font-size:6px;letter-spacing:.22em;color:var(--crm-muted)}html[data-crm-theme=light] .crm-topbar .brand-logo{filter:brightness(.67)}
.crm-topbar-search{display:flex;align-items:center;gap:10px;flex:1;max-width:480px;min-width:160px;background:var(--crm-soft);border:1px solid var(--crm-line);border-radius:11px;padding:11px 14px;color:var(--crm-muted);text-align:left;font-size:12px}.crm-topbar-search kbd{margin-left:auto;font-size:10px;padding:2px 5px;border:1px solid var(--crm-line);border-radius:4px}.crm-topbar-actions{display:flex;align-items:center;gap:18px;flex-shrink:0}.crm-theme-toggle{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--crm-line);padding:9px 11px;border-radius:9px;font-size:11px;color:var(--crm-muted);background:var(--crm-surface)}.crm-theme-toggle:hover{background:var(--crm-hover)}
.crm-account{position:relative}.crm-avatar-button{display:flex;align-items:center;gap:10px;text-align:left;color:var(--crm-muted);border-radius:12px;padding:3px}.crm-avatar{width:37px;height:37px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#294f3b,#18362b);color:#eadcb7;border:1px solid #b49b634d;font-weight:600;font-size:14px}.crm-account-label{display:flex;flex-direction:column;gap:3px;max-width:190px}.crm-account-label strong{font-size:12px;font-weight:500;color:var(--crm-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-account-label small{font-size:10px;color:var(--crm-muted)}.crm-account-menu{position:absolute;right:0;top:calc(100% + 14px);width:260px;max-width:85vw;background:var(--crm-surface);border:1px solid var(--crm-line);border-radius:14px;box-shadow:0 16px 50px #0002;overflow:hidden;z-index:200}.crm-account-menu-heading{padding:18px;display:flex;flex-direction:column;gap:5px;border-bottom:1px solid var(--crm-line)}.crm-account-menu-heading strong{color:var(--crm-ink);font-size:13px}.crm-account-menu-heading small{color:var(--crm-muted);font-size:11px}.crm-account-menu button{width:100%;display:flex;align-items:center;gap:10px;padding:15px 18px;font-size:12px;color:var(--crm-danger)}.crm-account-menu button:hover{background:var(--crm-hover)}.crm-account-menu p{padding:12px;color:var(--crm-danger);font-size:12px}
.app-shell .app-sidebar{background:var(--crm-surface)!important;border-right:1px solid var(--crm-line)!important}.app-shell .workspace-label{padding:24px 19px 12px;gap:7px}.app-shell .workspace-label span{font-size:8px;color:var(--crm-gold);letter-spacing:.25em}.app-shell .workspace-label strong{font-family:'DM Sans',sans-serif;font-size:15px;font-weight:500;color:var(--crm-ink)}.app-shell .sidebar-toggle{color:var(--crm-muted);border-color:var(--crm-line)}.app-shell .crm-nav-group{margin:14px 0 8px}.app-shell .crm-nav-parent{border:0!important;background:transparent!important;color:var(--crm-muted);text-transform:uppercase;font-size:9px;letter-spacing:.12em;padding:8px 11px!important;min-height:31px}.app-shell .crm-nav-parent>svg:last-child{display:block;opacity:.65}.app-shell .crm-subnav{border-left:0;padding-left:0;margin:0}.app-shell .crm-subnav button,.app-shell .administration-nav>button{display:flex;align-items:center;gap:10px;width:100%;min-height:37px;padding:9px 12px;border:1px solid transparent;border-radius:8px;color:var(--crm-muted);font-size:12px;margin:2px 0;transition:background .15s,color .15s}.app-shell .crm-subnav button:hover,.app-shell .administration-nav>button:hover{background:var(--crm-hover);color:var(--crm-ink)}.app-shell .app-sidebar button[aria-current=page]{background:var(--crm-hover)!important;box-shadow:inset 2px 0 var(--crm-gold);border-color:transparent!important;color:var(--crm-ink);font-weight:600}.app-shell .administration-heading{color:var(--crm-muted);font-size:9px;letter-spacing:.12em}.app-shell .administration-nav{border-color:var(--crm-line)}.sidebar-footer{padding:18px 20px;border-top:1px solid var(--crm-line);background:var(--crm-surface);color:var(--crm-muted);font-size:10px;letter-spacing:.03em}.sidebar-footer strong{display:block;color:var(--crm-gold);font-weight:500;letter-spacing:.2em;font-size:8px;margin-bottom:6px}
.app-shell :where(.crm-summary>div,.owner-card,.operational-card,.agenda-day,.access-table,.access-editor,.crm-modal,.development-unit-fields,.owner-editor-section,.owner-document-editor,.contact-timeline article,.crm-confirm,.crm-empty){background:var(--crm-surface)!important;color:var(--crm-ink)!important;border-color:var(--crm-line)!important;border-radius:13px;box-shadow:var(--crm-shadow)}.app-shell .crm-modal{border:1px solid var(--crm-line);padding:27px}.app-shell .crm-modal-backdrop{background:#0a1a13a8;backdrop-filter:blur(7px)}.app-shell .crm-modal h2,.app-shell .owner-card h2{font-family:'DM Sans',sans-serif;font-size:19px;font-weight:500;color:var(--crm-ink)}.app-shell .owner-category{color:var(--crm-gold)}.app-shell .owner-card{padding:24px;gap:12px}.app-shell :where(.crm-summary strong,.development-metrics strong,.access-table td strong,.proposal-facts strong){color:var(--crm-ink)}
.app-shell :where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),select,textarea){background:var(--crm-soft)!important;color:var(--crm-ink)!important;border-color:var(--crm-line)!important;border-radius:9px!important;font-size:12px}.app-shell :where(input,select,textarea)::placeholder{color:var(--crm-muted);opacity:.8}.app-shell :where(input,select,textarea):focus{border-color:var(--crm-focus)!important;outline:2px solid color-mix(in srgb,var(--crm-focus) 17%,transparent);outline-offset:1px}.app-shell button:focus-visible,.app-shell a:focus-visible{outline:2px solid var(--crm-focus);outline-offset:3px}.app-shell input[type=checkbox]{accent-color:var(--crm-action)}
.app-shell .access-primary{background:var(--crm-action)!important;color:var(--crm-action-ink)!important;border:1px solid var(--crm-action)!important;border-radius:9px;padding:10px 16px;font-size:12px;font-weight:500;box-shadow:0 3px 10px #12382412}.app-shell .access-primary:hover{filter:brightness(1.07)}.app-shell .access-table{overflow-x:auto;border:1px solid var(--crm-line)}.app-shell .access-table th{background:var(--crm-soft);color:var(--crm-muted);font-size:10px;font-weight:500;letter-spacing:.05em;border-color:var(--crm-line)}.app-shell .access-table td{border-color:var(--crm-line);color:var(--crm-ink);font-size:12px}.app-shell .access-table tr:hover td{background:var(--crm-soft)}.app-shell :where(.crm-workspace,.access-admin) button:not([class]){border:1px solid var(--crm-line);border-radius:8px;padding:8px 12px;color:var(--crm-ink);background:var(--crm-soft);font-size:12px}.app-shell .crm-tools,.app-shell .crm-search,.app-shell .crm-view-toggle{border-color:var(--crm-line);color:var(--crm-muted)}.app-shell .crm-chip{background:var(--crm-soft);color:var(--crm-muted);border-color:var(--crm-line)}.app-shell .crm-empty{padding:28px;text-align:center;color:var(--crm-muted)!important;box-shadow:none}
.app-shell .proposal-privacy{background:var(--crm-soft);border-color:var(--crm-line)}.app-shell .proposal-privacy p,.app-shell .proposal-privacy label{color:var(--crm-muted)}.app-shell .proposal-privacy summary,.app-shell .owner-editor-section h3{color:var(--crm-gold)}.app-shell .owner-editor-section p,.app-shell .crm-caption{color:var(--crm-muted)}.app-shell .crm-modal footer{border-color:var(--crm-line)}.app-shell .access-error{color:var(--crm-danger)!important}
html[data-crm-theme=light] .app-shell .text-white{color:var(--crm-ink)!important}html[data-crm-theme=light] .app-shell [class*=text-emerald-],html[data-crm-theme=light] .app-shell [class*=text-green-]{color:#196b4b!important}html[data-crm-theme=light] .app-shell [class*=text-amber-]{color:#8b6929!important}html[data-crm-theme=light] .app-shell [class*=text-rose-],html[data-crm-theme=light] .app-shell [class*=text-red-]{color:#af3445!important}html[data-crm-theme=light] .app-shell [class*=text-sky-],html[data-crm-theme=light] .app-shell [class*=text-blue-]{color:#286388!important}html[data-crm-theme=light] .app-shell svg text{fill:var(--crm-muted)}
html[data-crm-theme] .access-page{background:radial-gradient(ellipse at top,#b8a16a12,transparent 65%),var(--crm-bg);color:var(--crm-ink)}html[data-crm-theme] .access-card{background:var(--crm-surface);border-color:var(--crm-line);box-shadow:var(--crm-shadow)}html[data-crm-theme] .access-card :where(p,label,small,footer){color:var(--crm-muted)}html[data-crm-theme] .access-card input{background:var(--crm-soft);border-color:var(--crm-line);color:var(--crm-ink)}html[data-crm-theme] .access-card .access-primary{background:var(--crm-action);color:var(--crm-action-ink)}html[data-crm-theme=light] .access-logo{filter:brightness(.67)}
@media(min-width:901px){.app-shell .app-sidebar{width:232px;flex:0 0 232px}.app-shell .app-sidebar.is-collapsed{width:74px;flex-basis:74px}.app-shell .app-sidebar.is-collapsed .sidebar-footer{padding:16px 6px}.app-shell .app-sidebar.is-collapsed .sidebar-footer span{display:none}}
@media(max-width:1000px){.crm-account-label{display:none}.crm-topbar{gap:20px;padding:12px 20px!important}.crm-topbar-search{max-width:380px}.crm-topbar .brand-link{width:155px}}
@media(max-width:680px){.crm-topbar{height:66px;min-height:66px;padding:10px 14px!important;gap:12px}.crm-topbar .brand-link{width:115px}.crm-topbar .brand-logo{width:110px;height:23px}.crm-topbar .brand-caption{display:none}.crm-topbar-search{width:35px;min-width:35px;flex:0 0 35px;border:0;background:none;padding:7px}.crm-topbar-search span,.crm-topbar-search kbd,.crm-theme-toggle span{display:none}.crm-topbar-actions{gap:9px}.crm-theme-toggle{padding:8px}.crm-avatar-button>svg{display:none}.crm-avatar{width:34px;height:34px}.crm-topbar-brand{gap:8px}.app-shell .workspace-main{padding:20px 16px!important}.app-shell .crm-heading h1{font-size:25px}.app-shell .crm-heading{align-items:flex-start}.app-shell .crm-modal{padding:20px}.app-shell .crm-modal-backdrop{padding:12px}}
@media(prefers-reduced-motion:reduce){.app-shell *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.app-shell .crm-search{display:flex;align-items:center;gap:12px;padding:12px 15px;margin-bottom:18px;background:var(--crm-surface)!important;border:1px solid var(--crm-line)!important;border-radius:10px;color:var(--crm-muted)}.app-shell .crm-search input{flex:1;width:100%;min-width:0;border:0!important;background:transparent!important;padding:2px 0;min-height:23px;outline:0}.app-shell .crm-search:focus-within{border-color:var(--crm-focus)!important}
.app-shell :where(.crm-tag-card,.crm-kanban>section,.crm-deal-card,.kb-welcome,.kb-rule,.kb-rule-editor,.kb-condition,.contact-legacy-address,.checkin-qr-panel,.checkin-scan-panel,.checkin-location,.agenda-calendar,.agenda-appointment,.proposal-trade,.development-metrics>div,.academy-card,.academy-classroom aside,.academy-lesson-editor,.site-editor-controls,.site-block-row,.site-inline-inspector,.visit-config,.visit-result,.visit-history,.visit-stops>li,.duty-structure,.duty-calendar,.duty-slots>article,.duty-simulation,.goal-card,.campaign-card,.goals-kpis,.private-chat-messages,.private-chat-messages article){background:var(--crm-surface)!important;border-color:var(--crm-line)!important;color:var(--crm-ink)!important;box-shadow:var(--crm-shadow)}.app-shell :where(.contact-editor>header,.development-editor>header){background:var(--crm-surface)!important;border-color:var(--crm-line)!important}.app-shell :where(.duty-calendar-grid>button,.duty-facilities>button){background:var(--crm-soft)!important;color:var(--crm-ink)!important;border-color:var(--crm-line)!important}.app-shell :where(.duty-calendar-grid>button[aria-pressed=true],.agenda-grid>button[aria-pressed=true],.duty-facilities>button[aria-pressed=true],.crm-view-toggle button[aria-pressed=true]){background:var(--crm-hover)!important;color:var(--crm-ink)!important;border-color:var(--crm-gold)!important}.app-shell .executive-dashboard>.grid:first-of-type>div{background:var(--crm-surface)!important;border-color:var(--crm-line)!important;box-shadow:var(--crm-shadow)}.app-shell .executive-masthead{border-color:var(--crm-line)}.app-shell .executive-masthead h1{font-family:'DM Sans',sans-serif;font-size:30px;font-weight:500;color:var(--crm-ink)}.app-shell :where(.crm-tag-card p,.crm-deal-card p,.visit-config p,.visit-result p,.visit-history p,.goal-card p,.campaign-card p,.kb-rule p,.kb-rule-editor p,.agenda-day p,.academy-card p){color:var(--crm-muted)!important}

.app-shell .workspace-main{min-width:0}@media(max-width:900px){.app-shell .workspace{position:relative;padding-left:64px}.app-shell .app-sidebar{position:absolute;inset:0 auto 0 0;height:100%;width:64px;z-index:50;flex:none}.app-shell .app-sidebar.is-collapsed{width:64px}.app-shell .app-sidebar.is-open{width:244px;box-shadow:14px 0 35px #0002}.app-shell .app-sidebar.is-collapsed .sidebar-footer{padding:14px 4px}.app-shell .app-sidebar.is-collapsed .sidebar-footer span{display:none}.crm-topbar .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;color:var(--crm-muted);padding:4px;border:0;background:none}.app-shell .workspace-main{max-width:100%}}@media(max-width:680px){.app-shell .access-fields{grid-template-columns:1fr!important}}

.app-shell .goals-kpis{padding:18px 22px!important;margin-bottom:22px}.app-shell .goals-kpis h2{font-family:'DM Sans',sans-serif!important;font-size:18px!important;font-weight:500;margin:8px 0}.app-shell .goals-kpis p,.app-shell .goals-kpis small{color:var(--crm-muted)!important;font-size:12px;line-height:1.6}.app-shell :where(.workspace-main,.app-sidebar .overflow-y-auto){scrollbar-width:thin;scrollbar-color:var(--crm-line) transparent}.access-card{position:relative}.auth-theme-switch{position:absolute;right:18px;top:15px;padding:5px 8px;border:1px solid var(--crm-line);border-radius:6px;font-size:10px;color:var(--crm-muted);background:var(--crm-soft)}

.app-shell .fixed.inset-0.z-50{z-index:100}
