/* Bright, product-ready CRM shell. Shared across every workspace page. */
:root{--crm-ink:#17263c;--crm-muted:#738096;--crm-canvas:#f5f7fb;--crm-paper:#fff;--crm-line:#e7ebf2;--crm-navy:#17263c;--crm-navy-2:#223956;--crm-blue:#3868e8;--crm-blue-2:#2857d5;--crm-violet:#7259d9;--crm-emerald:#159570;--crm-shadow:0 10px 28px rgba(24,41,72,.055);--crm-shadow-sm:0 3px 12px rgba(24,41,72,.045);--crm-radius:13px;--sidebar-w:244px}
html,body{min-width:320px;background:var(--crm-canvas);color:var(--crm-ink)}body{padding:0;background:var(--crm-canvas)}.app{min-height:100vh;background:var(--crm-canvas)}.app.hidden{display:none!important}.app:not(.hidden){display:block}
/* Desktop: fixed brand and grouped sidebar, persistent search and account bar. */
.app-header{position:fixed;inset:0 auto 0 0;z-index:40;display:grid;grid-template-columns:var(--sidebar-w) minmax(180px,1fr) auto;grid-template-rows:68px 1fr;gap:0;width:100%;height:100vh;padding:0;background:transparent;color:var(--crm-ink);border:0;box-shadow:none;pointer-events:none}
.app-header::before{position:absolute;inset:0 0 auto var(--sidebar-w);height:68px;content:"";background:#fff;border-bottom:1px solid var(--crm-line);pointer-events:none}
.app-header .brand{grid-column:1;grid-row:1;display:flex;align-items:center;min-width:0;height:68px;padding:0 24px;border:0;border-bottom:1px solid var(--crm-line);background:#fff;pointer-events:auto}.app-header .brand-logo{display:block;width:132px;max-width:100%;height:38px;object-fit:contain;filter:none}
#navigation{grid-column:1;grid-row:2;display:flex;flex-direction:column;align-items:stretch;gap:20px;width:var(--sidebar-w);height:calc(100vh - 68px);min-width:0;padding:22px 13px 24px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#dbe2ed transparent;background:#fff;pointer-events:auto}#navigation .nav-group{display:flex;flex-direction:column;gap:4px}#navigation .nav-section-label{display:block;padding:0 12px 8px;color:#9aa5b5;font-size:12px;font-weight:750;letter-spacing:.11em}#navigation .nav-label-mobile{display:none}
#navigation button{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-width:0;min-height:42px;height:42px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:#56647a;font-size:12px;font-weight:560;text-align:left;white-space:nowrap;transition:background .15s ease,color .15s ease}#navigation button svg{display:block;flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#navigation button:hover{background:#f4f6fb;color:#263a5a}#navigation button.active{background:#edf2ff;color:var(--crm-blue);font-weight:700;box-shadow:inset 3px 0 0 var(--crm-blue)}
.app-header .global-search{grid-column:2;grid-row:1;align-self:center;display:flex;align-items:center;gap:9px;width:min(440px,calc(100% - 48px));height:38px;margin-left:30px;padding:0 12px;border:1px solid #e5e9f0;border-radius:9px;background:#f8f9fc;color:#738096;pointer-events:auto}.app-header .global-search input{width:100%;min-width:0;height:34px;padding:0;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:var(--crm-ink);font-size:12px}.app-header .global-search input::placeholder{color:#8c97a8}
.app-header .top-actions{grid-column:3;grid-row:1;display:flex;align-items:center;gap:15px;padding:0 24px;color:#526079;pointer-events:auto}.app-header .notification-button{position:relative;display:grid;place-items:center;width:34px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:#64728a}.app-header .notification-button:hover,.app-header .logout-button:hover{background:#f4f6fa}.app-header .notification-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.app-header .notification-button #notification-count:not([hidden]){position:absolute;top:0;right:-2px;min-width:16px;height:16px;padding:1px 4px;border-radius:20px;background:#e45865;color:#fff;font-size:12px}.app-header .top-divider{width:1px;height:28px;background:#e8ebf1}.app-header .top-profile{display:flex;align-items:center;gap:9px;min-width:0;color:#27364f}.app-header .top-profile-avatar{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border:1px solid #dce5f8;border-radius:50%;background:#edf2ff;color:#315ed0;font-size:12px;font-weight:800}.app-header .top-profile b,.app-header .top-profile small{display:block;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-header .top-profile b{font-size:12px;font-weight:700}.app-header .top-profile small{margin-top:2px;color:#8792a4;font-size:12px}.app-header .logout-button{width:30px;height:32px;border:0;border-radius:7px;background:transparent;color:#748198;font-size:16px}
.app-header .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.main{width:auto;min-width:0;min-height:100vh;margin:0 0 0 var(--sidebar-w);padding:68px 0 0;background:var(--crm-canvas)}.content{width:100%;max-width:none;min-width:0;margin:0;padding:26px clamp(20px,2.6vw,40px) 42px;overflow-x:clip}.page-head{max-width:none}.page-head h1,.page-head h2,.home-overview-header h1{color:var(--crm-ink)}.page-head .eyebrow,.home-kicker{color:var(--crm-blue)}
.primary{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff;box-shadow:none}.primary:hover{background:var(--crm-blue-2)}.panel,.card,.metric,.table-wrap{border-color:var(--crm-line);box-shadow:var(--crm-shadow-sm)}input,select,textarea{border-color:#dfe5ef}.content[data-page="customers"]{width:100%;max-width:none;padding-left:clamp(20px,2.6vw,40px);padding-right:clamp(20px,2.6vw,40px)}
/* Keep dashboard charts legible in both activity and revenue modes. */
.home-trend-svg .home-area{fill:rgba(56,104,232,.1)}.home-trend-svg .home-line-in{stroke:#3868e8}.home-trend-svg .home-line-out{stroke:#19a780}.home-trend-svg .home-line-prev{stroke:#9ca8ba}.home-trend-svg .revenue-area{fill:rgba(56,104,232,.12)}.home-trend-svg .revenue-line{fill:none;stroke:#3868e8;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.home-trend-svg circle{fill:#fff;stroke:#3868e8;stroke-width:2}.home-chart-scroll{max-width:100%;overflow-x:auto}.home-overview-header,.home-panel,.home-kpi{border-color:var(--crm-line)}
@media(max-width:1100px){:root{--sidebar-w:218px}#navigation{padding-inline:10px}.app-header .global-search{margin-left:20px}.app-header .top-actions{gap:10px;padding-inline:16px}.content{padding-inline:22px}}
@media(max-width:900px){:root{--sidebar-w:0px}.app-header{position:fixed;inset:0 0 auto;grid-template-columns:minmax(95px,1fr) minmax(130px,260px) auto;grid-template-rows:60px 42px;width:100%;height:102px;padding:0 12px;background:#fff;border-right:0;border-bottom:1px solid var(--crm-line);box-shadow:0 2px 10px rgba(24,41,72,.035)}.app-header .brand{grid-column:1;grid-row:1;height:60px;padding:0 4px;border:0}.app-header .brand-logo{width:112px;height:32px}.app-header .global-search{grid-column:2;grid-row:1;width:100%;height:35px;margin:0 8px}.app-header .top-actions{grid-column:3;grid-row:1;gap:8px;padding:0 2px}.app-header .top-profile>span:last-child,.app-header .top-divider{display:none}#navigation{grid-column:1/-1;grid-row:2;flex-direction:row;gap:0;width:calc(100vw - 24px);height:42px;margin:0;padding:0;overflow-x:auto;overflow-y:hidden;border-top:1px solid #f0f2f6;scrollbar-width:none}#navigation::-webkit-scrollbar{display:none}#navigation .nav-group{display:contents}#navigation .nav-section-label{display:none}#navigation button{flex:0 0 auto;width:auto;min-height:38px;height:38px;justify-content:center;gap:7px;padding:0 12px;border-radius:8px;font-size:12px}#navigation button svg{width:16px;height:16px;flex-basis:16px}#navigation button.active{box-shadow:inset 0 -2px 0 var(--crm-blue)}.main{min-height:calc(100vh - 102px);margin:0;padding:102px 0 0}.content{padding:20px 18px 34px}}
@media(max-width:560px){.app-header{grid-template-columns:minmax(84px,1fr) minmax(100px,1.2fr) auto;padding:0 9px}.app-header .brand-logo{width:94px}.app-header .global-search{height:33px;margin:0 5px;padding:0 8px}.app-header .global-search input{font-size:12px}.app-header .top-actions{gap:4px}.app-header .notification-button{width:30px}.app-header .top-profile-avatar{width:28px;height:28px;flex-basis:28px}.app-header .logout-button{font-size:14px}#navigation{width:calc(100vw - 18px)}#navigation button{gap:6px;padding:0 10px;font-size:12px}.main{padding-top:102px}.content{padding:16px 12px 28px}.page-head{gap:10px}}
/* Inbox reply composer: keep it visible independently of the page-shell grid. */
@media(min-width:821px){.content[data-page="inbox"]{box-sizing:border-box;height:calc(100vh - 68px);padding:12px 18px;overflow:hidden}.content[data-page="inbox"]>.messages-page{height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr);gap:12px}.content[data-page="inbox"] .inbox-shell{height:auto;min-height:0;min-width:0}}
@media(max-width:820px){.content[data-page="inbox"]{box-sizing:border-box;height:calc(100vh - 102px);padding:8px 10px;overflow:hidden}.content[data-page="inbox"]>.messages-page{height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr);gap:8px}}
.messages-page .thread{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;position:relative;min-height:0;overflow:hidden}
.messages-page .thread .messages{grid-row:2;min-height:0;overflow-y:auto;padding-bottom:16px}
.messages-page .thread .compose-area{grid-row:3;min-width:0;padding:0 12px 12px;border-top:1px solid #e7ebf2;background:#fff}.messages-page .thread .inbox-reply-composer{grid-row:auto;position:static!important;inset:auto!important;z-index:2;display:flex!important;visibility:visible!important;flex:none!important;box-sizing:border-box;width:auto!important;min-width:0;min-height:58px;margin:0!important;padding:8px 10px!important;border:1px solid #dfe5ef!important;border-radius:12px!important;background:#fff!important;box-shadow:0 4px 14px rgba(24,41,72,.08)!important;opacity:1!important}
.messages-page .inbox-reply-composer input[name="body"]{display:block!important;visibility:visible!important;flex:1 1 auto;min-width:0;height:40px;opacity:1!important}
.messages-page .inbox-reply-composer .primary{display:inline-flex!important;visibility:visible!important;flex:0 0 auto;min-width:74px;min-height:40px;align-items:center;justify-content:center}
.instagram-share-card{display:flex;align-items:center;gap:11px;max-width:430px;margin-top:8px;padding:12px;border:1px solid #e3e8f0;border-radius:11px;background:#fff;color:#27364f;text-decoration:none}.instagram-share-icon{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:#fff0f3;color:#cf3f76;font-size:24px}.instagram-share-copy{display:grid;gap:3px;min-width:0;flex:1}.instagram-share-copy b{font-size:12px}.instagram-share-copy small{overflow:hidden;color:#7b879a;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.instagram-share-card>strong{flex:0 0 auto;color:#3868e8;font-size:12px}.instagram-share-card:hover{border-color:#b8c8f5;background:#f9faff}
@media(max-width:820px){.messages-page .thread .compose-area{padding:0 8px 8px}.messages-page .inbox-shell.has-selection .thread{position:relative!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;height:calc(100svh - 132px);min-height:320px;overflow:hidden}.messages-page .thread .inbox-reply-composer{inset:auto!important;min-height:54px;padding:6px 8px!important}.messages-page .thread .messages{padding-bottom:12px}}
@media(max-width:430px){.messages-page .thread .inbox-reply-composer{inset:auto!important;gap:5px;padding:5px!important}.messages-page .inbox-reply-composer .primary{min-width:58px;padding-inline:8px;font-size:12px}}

