/* CRANACH shared brand layer v1.0.0. Geometry and business state remain source-owned. */
@font-face{font-family:"CRANACH UI";src:url("/cranach-ui/dm-sans-variable.ttf") format("truetype");font-style:normal;font-weight:100 1000;font-display:swap}
:root{--cranach-ink:#26211d;--cranach-stone:#e9e0d5;--cranach-sand:#e1d8c8;--cranach-bg:#f6f3ee;--cranach-surface:#fffdf9;--cranach-line:#dcd5cb;--cranach-muted:#736b63;--cranach-success:#32674c;--cranach-danger:#a43e35;--cranach-warning:#8a5a1f;--cranach-info:#3d627b;--cranach-font:"CRANACH UI","Microsoft YaHei","PingFang SC",system-ui,sans-serif;--ink:var(--cranach-ink)!important;--muted:var(--cranach-muted)!important;--green:var(--cranach-ink)!important;--teal:var(--cranach-ink)!important;--deep:var(--cranach-ink)!important;--dark:var(--cranach-ink)!important;--olive:var(--cranach-ink)!important;--lime:var(--cranach-sand)!important;--green2:#eee7dd!important;--pale:#eee7dd!important;--line:var(--cranach-line)!important;--bg:var(--cranach-bg)!important;--paper:var(--cranach-bg)!important;--white:var(--cranach-surface)!important;--amber:var(--cranach-warning)!important;--orange:var(--cranach-warning)!important;--red:var(--cranach-danger)!important;--radius:9px!important;--shadow:0 12px 35px #26211d0d!important}
html,body{font-family:var(--cranach-font)!important;font-size:14px!important;color:var(--cranach-ink)!important;background:var(--cranach-bg)!important}
button,input,select,textarea{font-family:var(--cranach-font)!important}
h1,h2,h3,h4{font-family:var(--cranach-font)!important;color:var(--cranach-ink);letter-spacing:.025em}
button,input,select,textarea,a{outline-offset:3px}
:focus-visible{outline:2px solid #7a5b36!important;outline-offset:3px!important}
input:not([type=checkbox]):not([type=radio]),select,textarea{color:var(--cranach-ink)!important;border:1px solid #bdb5aa!important;border-radius:5px!important;background-color:var(--cranach-surface);font-size:13px!important;line-height:1.5!important}
input:focus,select:focus,textarea:focus{border-color:#7a5b36!important;box-shadow:0 0 0 2px #7a5b3614!important}
button{border-radius:5px!important}
button.primary,.btn.primary,.button:not(.secondary):not(.danger),.btn-primary,button[type=submit]:not(.danger){background:var(--cranach-ink)!important;color:#fafafa!important;border-color:var(--cranach-ink)!important}
button.primary:hover,.btn.primary:hover,.button:not(.secondary):not(.danger):hover{background:#44382e!important;border-color:#44382e!important}
button.secondary,.button.secondary,.btn.secondary,button.quiet,.quiet{color:var(--cranach-ink)!important;background:transparent!important;border-color:#bdb5aa!important}
button.danger,.button.danger,.btn.danger{color:#fff!important;background:var(--cranach-danger)!important;border-color:var(--cranach-danger)!important}
button:disabled{opacity:.48!important;cursor:not-allowed!important}
aside.sidebar,body>aside,.sidebar{background:var(--cranach-ink)!important;color:#fafafa!important;border-color:var(--cranach-ink)!important;box-shadow:none!important}
.sidebar .workspace,.sidebar .local-tag,.sidebar .sidebar-bottom,.sidebar .sidefoot,.sidebar .edition{color:#d9cfc0!important;background:transparent!important;border-color:#6b6054!important}
.sidebar small,.sidebar .nav-label,.sidebar .navlabel,body>aside .rail-label,body>aside .rail-bottom{color:#c4b8a6!important}
.sidebar nav button,.sidebar .nav button,body>aside nav button{color:#e7dfd2!important;background:transparent!important;border-color:transparent!important}
.sidebar nav button.active,.sidebar .nav button.active,body>aside nav button.active{color:#26211d!important;background:#e1d8c8!important;box-shadow:none!important}
.sidebar nav button:hover:not(.active),.sidebar .nav button:hover:not(.active),body>aside nav button:hover:not(.active){color:#fff!important;background:#443a31!important}
.sidebar .active .ico,.sidebar .active svg{color:#26211d!important}
.nav-group-title,.nav-group-toggle{color:inherit}
.panel,.card,.kpi,.account-card,.auth-card,.authbox,.auth-box,.login,.quote-sheet,.summary-strip,.settings-card{background-color:var(--cranach-surface)!important;border-color:var(--cranach-line)!important;border-radius:9px!important;box-shadow:0 2px 12px #26211d03!important}
.kpi.featured,.featured.kpi{background:#26211d!important;border-color:#26211d!important;color:#fafafa!important}
.kpi.featured h2,.kpi.featured h3,.kpi.featured .kpi-value{color:#fafafa!important}
.kpi.featured small,.kpi.featured .kpi-label{color:#dfd2bf!important}
.kpi.featured .progress{background:#5b5045}.kpi.featured .progress i{background:#e1d8c8}
th{background:#eee8df!important;color:#62584e!important;border-color:var(--cranach-line)!important}
td{border-color:#e7e0d7!important}td.name{color:#26211d!important}
tbody tr:hover{background:#f8f4ed}
.notice,.boundary,.auth-role-notice{background:#efe8dd!important;border-color:#d4c8b7!important;color:#615243!important}
.notice.warning,.warning-banner,.pill.warn,.badge.demo,.pill.demo,.demo-banner,.badge.warning,.pill.amber{color:var(--cranach-warning)!important;background:#fbf2e0!important;border-color:#dfc69b!important}
.form-error,.error:not(:empty),.error-banner{color:var(--cranach-danger)!important;background:#f9eeeb!important;border-color:#d8b7b0!important}
.pill,.badge,.status-tag,.local-tag{background:#eee7dd!important;color:#594c3f!important;border-color:#d6c9b8!important}
.pill.success,.badge.success,.status.success,.success-banner,.pill.green,.badge.green,.badge.ok,.pill.ok{color:var(--cranach-success)!important;background:#edf4ee!important;border-color:#bbcebf!important}
.pill.danger,.badge.danger,.status.danger,.pill.red,.badge.red,.pill.error,.badge.error,.badge.bad,.pill.bad{color:var(--cranach-danger)!important;background:#f9eeeb!important;border-color:#d8b7b0!important}
.eyebrow,.breadcrumb,.breadcrumbs{color:#807060!important}
.avatar,.user-chip,.icon,.mark{background-color:#e9e0d5!important;color:#44362b!important}
.stage-node.current,.toggle button.selected,.tab.active,.tabs button.active{background:#26211d!important;color:#fafafa!important;border-color:#26211d!important}
.stage-node.reached{background:#e9e0d5!important;color:#534537!important}
/* Native chart/risk colors remain source-owned; never override inline warning colors. */
.app-header,.topbar{border-color:var(--cranach-line)!important}
dialog{border-color:var(--cranach-line)!important;background:var(--cranach-surface)!important;box-shadow:0 20px 90px #26211d2b!important}
dialog::backdrop{background:#26211d66!important}
#toast{background:#26211d!important;color:#fafafa!important}
/* Brand lockups: master wordmark stays intact; module marks are independent. */
.cranach-brand-slot{display:block!important;letter-spacing:normal!important;height:auto!important;min-width:0!important;white-space:normal!important}
.cranach-original-identity{display:none!important}
.cranach-identity{display:flex!important;flex-direction:column!important;gap:17px!important;margin:0!important;padding:0!important;letter-spacing:normal!important;line-height:1.4!important;text-align:left!important;color:#26211d!important}
.cranach-wordmark{display:block!important;width:142px!important;height:auto!important;max-width:100%!important;object-fit:contain!important;object-position:left center!important;filter:brightness(0)!important;margin:0!important;padding:0!important}
.cranach-module{display:flex!important;align-items:center!important;gap:10px!important;margin:0!important;min-width:0!important;color:inherit!important}
.cranach-module-mark{width:29px!important;height:29px!important;flex:0 0 29px!important;margin:0!important;filter:none!important}
.cranach-module-copy{display:grid!important;gap:4px!important;margin:0!important;color:inherit!important}
.cranach-module-name{display:block!important;font:600 13px/1.45 var(--cranach-font)!important;letter-spacing:.04em!important;color:inherit!important;margin:0!important}
.cranach-module-label{display:block!important;font:500 8px/1.4 var(--cranach-font)!important;letter-spacing:.13em!important;color:#84715e!important;margin:0!important}
.sidebar .cranach-identity,body>aside .cranach-identity{color:#f6efe5!important}
.sidebar .cranach-wordmark,body>aside .cranach-wordmark{filter:brightness(0) invert(1)!important}
.sidebar .cranach-module-mark,body>aside .cranach-module-mark{filter:brightness(0) invert(1)!important;opacity:.9}
.sidebar .cranach-module-label,body>aside .cranach-module-label{color:#c4b8a6!important}
.cranach-auth-identity{margin-bottom:28px!important}
.auth-card>.auth-logo-img,.auth-card>.auth-system,.authbox>.mark,.authbox>.eyebrow{display:none!important}
.authpage,.auth-gate,#auth-gate,.auth-overlay{background:var(--cranach-bg)!important}
.auth-card h1,.authbox h1,.auth-box h2,.login h1{font-size:25px!important;letter-spacing:.02em!important}
.cranach-auth-page{display:grid!important;place-content:center!important;min-height:100vh!important;margin:0!important;padding:24px!important}
.cranach-auth-panel{width:min(440px,calc(100vw - 48px))!important;max-width:none!important;background:var(--cranach-surface)!important;border:1px solid var(--cranach-line)!important;border-radius:9px!important;margin:0!important;padding:36px!important}
.cranach-auth-panel label{display:grid;gap:8px;margin:16px 0 8px}
.cranach-auth-panel input{box-sizing:border-box;width:100%;padding:11px}
.cranach-auth-panel button[type=submit],.cranach-auth-panel form>button{width:100%;padding:12px;margin-top:16px;background:#26211d!important;color:#fafafa!important;border:1px solid #26211d!important}
.cranach-auth-panel p{font-size:12px;line-height:1.9;color:var(--cranach-muted)}
.cranach-auth-panel h1{font-size:23px!important;line-height:1.5!important}
html[data-cranach-service=budget] .cranach-auth-panel>small{display:none!important}
.app-header .cranach-identity{flex-direction:row!important;align-items:center!important;gap:20px!important}
.app-header .cranach-wordmark{width:118px!important}
.app-header .cranach-module-mark{width:26px!important;height:26px!important;flex-basis:26px!important}
.cranach-app-icon{width:25px!important;height:25px!important;display:block!important;margin-bottom:12px!important;object-fit:contain!important}
@media(max-width:720px){.cranach-wordmark{width:126px!important}.cranach-module-name{font-size:12px!important}.cranach-identity{gap:12px!important}.cranach-brand-slot{max-width:100%!important}.cranach-auth-panel{padding:26px!important}}
@media print{.cranach-identity{break-inside:avoid}.cranach-wordmark{filter:brightness(0)!important}html,body{background:white!important}}

/* v2: native pages, authentication, dialogs and management tools share the same palette. */
:root{color-scheme:light;accent-color:var(--cranach-ink);--dark-green:var(--cranach-ink)!important;--accent:var(--cranach-ink)!important;--accent-light:var(--cranach-stone)!important}
body{background:var(--cranach-bg)!important;color:var(--cranach-ink)!important}
button,.btn,.button{background-color:var(--cranach-surface);color:var(--cranach-ink);border-color:var(--cranach-line)!important;font-weight:500;transition:background-color .15s,border-color .15s}
.btn:not(.secondary):not(.quiet):not(.danger):not(.outline):not(.ghost),button.primary,button[type=submit],.button:not(.secondary):not(.danger){background:var(--cranach-ink)!important;color:#fafafa!important;border-color:var(--cranach-ink)!important}
.btn.secondary,.btn.outline,.button.secondary,button.outline,.icon-button,.text-button{background:var(--cranach-surface)!important;color:var(--cranach-ink)!important;border-color:var(--cranach-line)!important}
button:hover:not(:disabled),.btn:hover:not(:disabled){filter:brightness(.96)}
input[type=checkbox],input[type=radio],progress{accent-color:var(--cranach-ink)!important}
p,label,legend,.helper,.muted,.crumb,.breadcrumb,.subtle,.footerhint,.filter-note{color:var(--cranach-muted)}
a{color:var(--cranach-ink)}
.rail{background:var(--cranach-ink)!important;color:#e1d8c8!important}
.rail-links button{background:transparent!important;color:#e1d8c8!important;border:0!important}
.rail-links button.active{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important}
.sidebar nav button,.sidebar .nav button,body>aside nav button{background:transparent!important;color:#e7dfd2!important}
.sidebar nav button.active,.sidebar .nav button.active,body>aside nav button.active{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important}
.auth-card,.authbox,.auth-box,.panel.login{border-radius:9px!important;background:var(--cranach-surface)!important;border:1px solid var(--cranach-line)!important;box-shadow:0 15px 55px #26211d0c!important}
.auth-gate,.authpage,.auth-overlay{background:var(--cranach-bg)!important}
.stat,.metric,.summary-card,.stat-card,.drawer,.drawerhead,.drawerbody,.drawercontent,.drawerfoot,.dialog,.dialoghead,.dialogbody,.dialogfoot,.dialog-head,.dialog-body,.dialog-foot,.modal,.modal-head,.modal-body,.modal-foot,.popover,.dropdown-menu{background-color:var(--cranach-surface)!important;color:var(--cranach-ink);border-color:var(--cranach-line)!important}
.topbar,.app-header,.toolbar,.filters,.project-bar,.project-actions,.table-toolbar{border-color:var(--cranach-line)!important}
.intro,.sourcecard pre,.empty,.skeleton,.infobox,.detail-note{background-color:#eee8df!important;border-color:var(--cranach-line)!important;color:#62584e!important}
.chip,.localflag,.badge:not(.danger):not(.success):not(.warning){background-color:#eee7dd!important;color:#594c3f!important;border-color:#d6c9b8!important}
.statvalue,.kpi-value,.metric-value,.card a,.tablewrap a{color:var(--cranach-ink)!important}
.tabs button.active,.tab.active,.segmented button.active,.toggle button.selected{background:var(--cranach-ink)!important;color:#fafafa!important}
html[data-cranach-service=brand] body>main:not(.shell),html[data-cranach-tool=true] body{max-width:1240px;margin:0 auto;padding:36px 28px;line-height:1.8}
html[data-cranach-tool=true] h1{font-size:27px;margin:0 0 12px}
html[data-cranach-tool=true] table{width:100%;border-collapse:collapse;background:var(--cranach-surface);margin:20px 0}
html[data-cranach-tool=true] td,html[data-cranach-tool=true] th{padding:13px 16px;text-align:left;border-bottom:1px solid var(--cranach-line)}
html[data-cranach-tool=true] button{padding:9px 14px;border:1px solid var(--cranach-line);cursor:pointer}
html[data-cranach-tool=true] .cranach-identity{margin-bottom:30px!important}
@media(max-width:750px){.sidebar .cranach-wordmark{width:38px!important}.sidebar .cranach-module-copy{display:none!important}.sidebar .cranach-identity{gap:14px!important}.sidebar .cranach-module{justify-content:center}.sidebar .cranach-brand-slot{padding:0!important}}

/* Budget planning panels express structure with stone/sand, not the previous green palette. */
.growth-engine,.growth-engine:nth-child(2),.growth-foundation,.strategy-logic>div,.strategy-reference>div,.decision-card,.initiative-tab,.review-timeline article{background:var(--cranach-surface)!important;border-color:var(--cranach-line)!important;color:var(--cranach-ink)!important}
.growth-engine:nth-child(2),.growth-foundation{background:#eee8df!important}
.growth-engine strong,.growth-foundation strong,.initiative-tab,.strategy-logic p{color:var(--cranach-ink)!important}
.growth-engine>span,.growth-engine small,.growth-loop,.growth-foundation span,.strategy-logic span,.strategy-logic small,.strategy-reference small,.initiative-tab small{color:var(--cranach-muted)!important}
.decision-badge,.initiative-tab.selected{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important;border-color:#b9a991!important}
.nav-group-items,.nav-items{border-color:#766957!important}.nav-group-title,.nav-group-toggle{color:#e1d8c8!important}

/* Explicit emphasis and navigation states keep text legible on every source layout. */
.stat.emphasis{background:var(--cranach-ink)!important;color:#fafafa!important;border-color:var(--cranach-ink)!important}
.stat.emphasis .stat-value,.stat.emphasis .value,.stat.emphasis strong,.stat.emphasis h3{color:#fafafa!important}
.stat.emphasis p,.stat.emphasis small,.stat.emphasis .stat-label,.stat.emphasis .stat-note{color:#dfd2bf!important}
.sidebar .lw-menu-group>summary{color:#e1d8c8!important;background:transparent!important}
.sidebar .lw-menu-group.has-current>summary,.sidebar .lw-submenu a.active{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important}
.sidebar .lw-submenu a{color:#e1d8c8!important}.sidebar .lw-submenu{border-color:#766957!important}
.sidebar .lw-create .btn.primary{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important}
.intro{background:#eee8df!important}.flowstep i{background:#eee8df!important;color:#62584e!important}

.stat-value,.statvalue,.kpi-value,.metric-value,.ops-stat strong{font-family:var(--cranach-font)!important}
html[data-cranach-service=brand] .control-notice,html[data-cranach-service=brand] .hub-notice{background:#eee8df!important;color:#62584e!important;border-color:var(--cranach-line)!important}
.sidebar .lw-create button.btn.primary{background:var(--cranach-sand)!important;color:var(--cranach-ink)!important;border-color:var(--cranach-sand)!important}

.cranach-language-control{position:fixed;right:18px;bottom:16px;z-index:10020;display:flex;align-items:center;gap:10px;padding:7px 10px;background:#fffdf9;border:1px solid #dcd5cb;border-radius:8px;box-shadow:0 3px 16px #26211d12;color:#26211d;font:12px/1.5 var(--cranach-font)}.cranach-language-control label{margin:0!important;color:#62584e!important;white-space:nowrap}.cranach-language-control select{width:auto!important;margin:0!important;padding:5px 24px 5px 8px!important;min-width:90px}@media print{.cranach-language-control{display:none!important}}
/* CRM v21 administration uses native links, including the new price maintenance route. */
html[data-cranach-service=crm] .sidebar nav a{color:#e1d8c8!important}
html[data-cranach-service=crm] .sidebar nav a.active{background:#e1d8c8!important;color:#26211d!important}
html[data-cranach-service=crm] .sidebar nav h2{color:#c4b8a6!important}

/* CRM chrome v1: scoped presentation; business values and permissions stay source-owned. */
html[data-cranach-service=crm] .sidebar .lw-create{background:var(--cranach-ink)!important;border:0!important;box-shadow:none!important;padding:0 0 18px!important;margin:0 0 3px!important}
html[data-cranach-service=crm] .sidebar #nav .lw-create button.btn.primary{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:44px!important;padding:11px 12px!important;border:1px solid var(--cranach-sand)!important;border-radius:6px!important;background:var(--cranach-sand)!important;color:var(--cranach-ink)!important;box-shadow:none!important;font-size:13px!important;font-weight:600!important;line-height:1.5!important;letter-spacing:.015em!important}
html[data-cranach-service=crm] .sidebar #nav .lw-create button.btn.primary:hover{background:var(--cranach-stone)!important;border-color:var(--cranach-stone)!important}
html[data-cranach-service=crm] .topbar .header-titles{min-width:0}
html[data-cranach-service=crm] .topbar .top-right{gap:18px;min-width:0}
html[data-cranach-service=crm] .topbar .user-chip{display:flex!important;align-items:center!important;gap:10px!important;min-width:0;max-width:270px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--cranach-ink)!important}
html[data-cranach-service=crm] .topbar .user-chip .avatar{display:grid!important;place-items:center!important;flex:0 0 34px!important;width:34px!important;height:34px!important;padding:0!important;border:0!important;border-radius:50%!important;background:var(--cranach-stone)!important;color:var(--cranach-ink)!important;font-family:var(--cranach-font)!important;font-size:14px!important;font-weight:600!important;line-height:1!important;text-transform:uppercase}
html[data-cranach-service=crm] .topbar .user-chip>div{display:flex!important;flex-direction:column;gap:3px;min-width:0;max-width:220px;background:transparent!important}
html[data-cranach-service=crm] #user-name{display:block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px!important;font-weight:600!important;line-height:1.4!important;color:var(--cranach-ink)!important}
html[data-cranach-service=crm] #user-role{display:block;margin:0!important;font-size:11px!important;font-weight:400!important;line-height:1.4!important;color:var(--cranach-muted)!important}
html[data-cranach-service=crm] .topbar #date-label{font-size:11px;white-space:nowrap}
@media(max-width:1100px){html[data-cranach-service=crm] .topbar #date-label{display:none}html[data-cranach-service=crm] #user-name{max-width:180px}html[data-cranach-service=crm] .topbar .top-right{gap:14px}}
@media(max-width:900px){html[data-cranach-service=crm] .topbar{height:auto;min-height:78px;flex-wrap:wrap;gap:12px;padding:14px 20px}html[data-cranach-service=crm] .topbar .header-titles{flex:1 1 180px}html[data-cranach-service=crm] .topbar .top-right{flex:1 1 auto;justify-content:flex-end;flex-wrap:wrap;gap:12px}html[data-cranach-service=crm] #user-name{max-width:160px}}
@media(max-width:600px){html[data-cranach-service=crm] .topbar{padding:12px 14px;gap:10px}html[data-cranach-service=crm] .topbar .top-right{justify-content:flex-start;gap:10px}html[data-cranach-service=crm] .topbar .mg-workspace-switch{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1 1 100%;width:100%;max-width:100%;margin-right:0}html[data-cranach-service=crm] .topbar .mg-workspace-switch a{white-space:normal;overflow-wrap:anywhere;text-align:center;padding:5px}html[data-cranach-service=crm] #user-name{max-width:140px;font-size:12px!important}html[data-cranach-service=crm] #user-role{font-size:10px!important}html[data-cranach-service=crm] .topbar .user-chip .avatar{flex-basis:30px!important;width:30px!important;height:30px!important}html[data-cranach-service=crm] .sidebar #nav .lw-create button.btn.primary{padding:10px 7px!important;font-size:12px!important}}
