/* COMMUNITE MOBILE · Premium 2.0 — design-only enhancements */
:root{--cm2-brand:#811b3b;--cm2-brand-deep:#54182c;--cm2-bright:#cf4261;--cm2-panel:#fff;--cm2-ink:#3a2431;--cm2-muted:#8a7280;--cm2-outline:#ebdce2;--cm2-ease:cubic-bezier(.22,1,.36,1)}
:focus-visible{outline:3px solid #c7527c;outline-offset:3px}
html{scroll-behavior:smooth}
.workspace{background:radial-gradient(1000px 600px at 90% -160px,#f3e7ec 0,transparent 70%),#faf7f9!important}
main#main{background:transparent!important}
.page-heading{padding:4px 0 1px}
.page-heading h1{font-size:clamp(25px,2.4vw,36px);letter-spacing:-.06em!important}
.dashboard-topline{background:linear-gradient(90deg,#fff9fb,transparent);padding:9px 12px;border-left:3px solid #a73b5c;border-radius:0 11px 11px 0}
.eyebrow{letter-spacing:.12em!important}
.panel,.metric-card,.cm-compare-card,.cm-trend-panel,.stock-valuation-panel,.premium-work-card{border-radius:18px!important}
.panel{background:var(--cm2-panel)}
.dashboard-grid>.panel,.cm-compare-card,.metric-card{box-shadow:0 5px 18px rgba(65,16,37,.045),0 18px 46px rgba(65,16,37,.02)!important}
.hero-summary{position:relative;overflow:hidden;box-shadow:0 18px 45px rgba(91,22,47,.19)!important;background:linear-gradient(125deg,#69172f 0%,#a22c4c 55%,#bd4160 100%)!important}
.hero-summary:before{content:"";position:absolute;right:-4%;top:-80%;width:65%;height:230%;transform:rotate(29deg);background:linear-gradient(90deg,transparent,#ffffff10,transparent);pointer-events:none}
.hero-summary .hero-text,.hero-summary .hero-metrics{position:relative;z-index:2}
.hero-summary .hero-text h2{font-size:clamp(27px,3vw,42px);font-variant-numeric:tabular-nums}
.metric-card{position:relative;overflow:hidden;background:linear-gradient(155deg,#fff,#fffafd)!important}
.metric-card:before{content:"";position:absolute;left:18px;top:0;width:35px;height:3px;background:#bd5774;border-radius:0 0 6px 6px;opacity:.7}
.metric-card .metric-label{line-height:1.55!important}
.metric-card>strong{font-variant-numeric:tabular-nums}
.cm-compare-card{background:linear-gradient(145deg,#fff,#fffbfd)!important}
.cm-compare-card:hover,.metric-card:hover{border-color:#e3b8c8!important}
.cm-trend-panel{background:linear-gradient(150deg,#fff,#fff9fb)!important}
.cm-trend-bars{border-bottom:1px solid #e9dce1;padding-bottom:2px}
.cm-trend-track{background:linear-gradient(180deg,#fcf3f7,#f7e8ee)!important}
.cm-trend-track i{transition:filter .2s ease}
.cm-trend-item:hover .cm-trend-track i{filter:brightness(1.17)}
.quick-action{border:1px solid #f0dfe6!important;box-shadow:0 7px 24px rgba(94,34,55,.055)!important;transition:transform .2s var(--cm2-ease),box-shadow .2s ease,border-color .2s}
.quick-action:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(94,34,55,.085)!important;border-color:#dca3b6!important}
.sidebar .nav-link.active{position:relative;box-shadow:inset 0 0 0 1px #b95e7938!important}
.sidebar .nav-link.active:before{content:"";position:absolute;left:0;top:25%;height:50%;width:3px;border-radius:6px;background:#fff;opacity:.92}
.sidebar .nav-link{border-radius:11px!important}
body.cm-sidebar-compact .sidebar .nav-link.active:before{left:2px}
.sidebar .nav-link:not(.active):hover{background:#ffffff14!important}
.sidebar .nav-link.active:hover{transform:none}
.sidebar .nav-secondary-label{letter-spacing:.12em}
.topbar{box-shadow:0 1px 0 rgba(104,43,67,.075),0 11px 32px rgba(53,28,37,.024)!important}
.cm-filter-panel{background:linear-gradient(145deg,#fff,#fffafd)!important}
.cm-filter-advanced{transition:border-color .2s ease}
.cm-filter-advanced[open]{border-color:#dca6b9}
.cm-filter-advanced>summary{user-select:none;transition:background .2s}
.cm-filter-extra{animation:cm2-enter .18s var(--cm2-ease)}
@keyframes cm2-enter{from{opacity:.4;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.cm-active-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 0 17px}
.cm-active-filters>strong{font-size:10px;letter-spacing:.05em;color:#8a6275}
.cm-filter-chip{background:#fcecf2;color:#8b2a4b;border:1px solid #ecc6d2;display:inline-flex;gap:6px;align-items:center;max-width:100%;padding:7px 10px;border-radius:100px;font-size:10px;font-weight:700;overflow-wrap:anywhere}
.cm-filter-chip em{font-style:normal;color:#7e6170}
.cm-table-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid #f0e5e9;background:#fffafb}
.cm-table-heading>strong{font-size:12px;color:#673149}
.cm-table-heading small{font-size:10px;color:#9b7f8b}
.table-scroll table{min-width:100%}
.table-scroll thead th{font-weight:800!important;letter-spacing:.035em!important;text-transform:none;font-size:10px!important}
.table-scroll tbody td{font-size:11px;line-height:1.65}
.table-scroll tbody tr{transition:background .12s ease}
.table-scroll .record-link{font-weight:750}
.empty-state{padding:46px 22px!important}
.empty-state .empty-symbol{width:66px;height:66px;margin:0 auto 14px;display:grid;place-items:center;border-radius:19px;background:#fff1f5;color:#a53a5b;border:1px solid #efd2dc;font-size:28px}
.empty-state h3{font-size:18px;letter-spacing:-.025em}
.empty-state p{max-width:380px;margin:8px auto 15px!important;line-height:1.8}
.form-layout .main-form{border-radius:20px!important}
.main-form .field input,.main-form .field select,.main-form .field textarea{border-radius:11px!important;transition:border-color .18s,box-shadow .18s}
.main-form .field :is(input,select,textarea):focus{border-color:#ba5f7a!important;box-shadow:0 0 0 3px #b13d6320!important}
.cm-form-tips{border:1px solid #efdce3;margin:0 24px 18px;border-radius:13px;background:#fffbfd}
.cm-form-tips>summary{padding:13px 16px;cursor:pointer;font-weight:800;font-size:11px;color:#852b4c}
.cm-form-tips>p{padding:0 16px 14px;margin:0;color:#846a77;font-size:11px;line-height:1.8}
.cm-form-tips[open]{border-color:#dca7b7}

/* Accessible theme control at top right of search. */
.cm-theme-toggle{display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;background:#fff7fa;border:1px solid #eddbe2;border-radius:12px;color:#8a2b4d;font-size:20px;cursor:pointer;transition:transform .2s var(--cm2-ease),background .2s}
.cm-theme-toggle:hover{background:#ffe9f1;transform:translateY(-2px)}

/* Contextual new-operation launcher — hidden from read-only users. */
.cm-quick-launch{position:fixed;bottom:27px;right:24px;z-index:36;filter:drop-shadow(0 8px 22px rgba(78,16,42,.15))}
.cm-quick-launch>summary{display:flex;align-items:center;gap:9px;cursor:pointer;list-style:none;background:linear-gradient(135deg,#8c2144,#b83f60);color:white;border:1px solid #ffffff31;padding:12px 16px;border-radius:100px;font-weight:800;font-size:12px;box-shadow:inset 0 1px #ffffff36;transition:transform .2s ease}
.cm-quick-launch>summary::-webkit-details-marker{display:none}
.cm-quick-launch>summary:hover{transform:translateY(-2px)}
.cm-quick-launch .cm-fab-plus{font-size:22px;font-weight:400;line-height:1}
.cm-quick-launch[open] .cm-fab-plus{transform:rotate(45deg)}
.cm-quick-launch-menu{position:absolute;right:0;bottom:calc(100% + 10px);width:226px;padding:9px;background:white;border:1px solid #eed6df;border-radius:17px;box-shadow:0 15px 45px #571d3631;display:grid;gap:3px;animation:cm2-enter .18s var(--cm2-ease)}
.cm-quick-launch-menu a{display:flex;gap:11px;align-items:center;padding:11px 12px;border-radius:10px;color:#63304a;text-decoration:none;font-size:12px;font-weight:800}
.cm-quick-launch-menu a:hover{background:#fff0f5;color:#8d294c}
.cm-quick-launch-menu svg{width:19px;height:19px;flex:0 0 19px;color:#a53657;fill:none;stroke:currentColor}
.cm-fab-plus{display:inline-block;transition:transform .2s ease}

/* Mobile bottom navigation: real PWA single-hand experience. */
.cm-mobile-nav{display:none}
@media(max-width:800px){
  .cm-mobile-nav{position:fixed;z-index:36;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;gap:1px;min-height:65px;padding:7px max(7px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));background:#ffffffef;backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%);box-shadow:0 -7px 30px rgba(72,22,44,.10);border-top:1px solid #ead6de}
  .cm-mobile-nav :is(a,button){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;padding:7px 2px 5px;border:0;border-radius:13px;background:transparent;text-decoration:none;color:#927b85;font:750 10px Manrope,sans-serif;cursor:pointer;line-height:1.1}
  .cm-mobile-nav :is(a,button).active{background:#ffeff4;color:#842848}
  .cm-mobile-nav .cm-bottom-icon{height:21px;width:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .cm-mobile-nav .cm-bottom-label{white-space:nowrap}
  .cm-mobile-nav .cm-bottom-icon use{pointer-events:none}
  main#main{padding-bottom:calc(105px + env(safe-area-inset-bottom))!important}
  .cm-quick-launch{bottom:calc(90px + env(safe-area-inset-bottom));right:15px}
  .cm-quick-launch>summary{padding:12px 13px;border-radius:16px}
  .cm-quick-launch .cm-fab-name{display:none}
  .cm-theme-toggle{flex-basis:34px;width:34px;height:34px}
  .topbar-primary{gap:7px!important}
  .page-heading{gap:11px;align-items:flex-start}
  .page-heading .button-row{gap:6px}
  .cm-table-heading{padding:12px 14px}
  .form-layout .main-form{width:100%}
  .main-form :is(input,select,textarea){font-size:16px!important}
  .cm-form-tips{margin:0 14px 12px}
}
@media(min-width:801px){.cm-mobile-nav{display:none!important}}
@media(max-width:390px){.cm-mobile-nav :is(a,button){font-size:9px}.cm-mobile-nav .cm-bottom-icon{width:19px;height:19px}.cm-quick-launch{right:11px}}

/* Opt-in night mode: scoped to authenticated workspaces, not login. */
html.cm-dark .workspace{--bg:#17141b;--ink:#f4e8ee;--muted:#b99faa;--line:#42323e;--red:#e58ba8;--red-dark:#bf6485;--red-light:#35212e;background:radial-gradient(950px 550px at 90% -100px,#392331 0,transparent 70%),#17141b!important;color:#f5eaf0;color-scheme:dark}
html.cm-dark .workspace main#main{background:transparent!important;color:#f5eaf0}
html.cm-dark .sidebar{background:#211a24!important;border-color:#47343f!important;color:#f5eaf0!important}
html.cm-dark .sidebar .nav-link{color:#ead4df!important}
html.cm-dark .sidebar .nav-link:not(.active):hover{background:#ffffff0e!important}
html.cm-dark .sidebar .nav-link.active{background:#74304a!important;color:#fff!important}
html.cm-dark .sidebar :is(.sidebar-label,.nav-secondary-label,.sidebar-foot,.brand-copy,.user-block,.account-links){color:#ddc2cf!important}
html.cm-dark .topbar{background:#211a24f5!important;border-color:#45303e!important}
html.cm-dark .workspace :is(.panel,.metric-card,.cm-compare-card,.cm-trend-panel,.premium-work-card,.stock-valuation-panel,.quick-action,.cm-filter-panel,.dashboard-date-banner,.dashboard-fx-indicator,.report-strip){background:#261e29!important;border-color:#473642!important;color:#f5e8ef!important;box-shadow:0 6px 18px #0a070b20!important}
html.cm-dark .workspace :is(.panel-header,.cm-table-heading){background:#2b222e!important;border-color:#473642!important}
html.cm-dark .workspace :is(h1,h2,h3,h4,.cm-compare-head h2,.cm-compare-head h3,.cm-filter-title,.cm-table-heading strong,.metric-card>strong,.cm-compare-card>strong,.stock-valuation-stat strong,.panel strong,.quick-action strong){color:#f8edf3!important}
html.cm-dark .workspace :is(p,small,.fine-print,.cm-compare-head p,.cm-trend-hint,.cm-filter-subtitle,.metric-label,.cm-compare-card>small,.page-heading p,.cm-filter-heading){color:#c0a8b4}
html.cm-dark .workspace :is(.eyebrow,.heading-dot,.record-link,.cm-filter-advanced summary){color:#f1a0b8!important}
html.cm-dark .workspace :is(.button.secondary,.cm-theme-toggle,.cm-date-presets button,.cm-quick-launch-menu){background:#352838!important;color:#f5e6ee!important;border-color:#62475a!important}
html.cm-dark .workspace :is(.button.secondary,.cm-date-presets button):hover{background:#463044!important}
html.cm-dark .workspace :is(input,select,textarea){background:#302633!important;border-color:#584557!important;color:#f7eaf1!important;color-scheme:dark}
html.cm-dark .workspace :is(input,select,textarea)::placeholder{color:#a88b9d}
html.cm-dark .workspace :is(.cm-filter-advanced,.cm-form-tips){background:#2e2430!important;border-color:#523947!important}
html.cm-dark .workspace .cm-filter-advanced>summary:hover{background:#3a2937}
html.cm-dark .workspace :is(.cm-filter-chip,.empty-symbol){background:#503043!important;color:#f5cfde!important;border-color:#775068!important}
html.cm-dark .workspace .table-scroll :is(table,tbody,thead,th,td){color:#ecdce6;border-color:#493946!important}
html.cm-dark .workspace .table-scroll thead th{background:#392a38!important;color:#ead4df!important}
html.cm-dark .workspace .table-scroll tbody tr:nth-child(even){background:#2d2430!important}
html.cm-dark .workspace .table-scroll tbody tr:hover{background:#442b3c!important}
html.cm-dark .workspace .cm-table-heading{background:#302433!important}
html.cm-dark .workspace .cm-trend-track{background:#3c2b3a!important}
html.cm-dark .workspace :is(.working-date-summary,.cm-live-time,.date-picker,.topbar-global-search){background:#302532!important;color:#f5e9ef!important;border-color:#564354!important}
html.cm-dark .workspace .cm-live-time strong{color:#ffc9d9!important}
html.cm-dark .workspace .dashboard-topline{background:linear-gradient(90deg,#342330,transparent)}
html.cm-dark .workspace :is(.tabs a,.text-link,.subtle-link){color:#e8b3c5}
html.cm-dark .workspace .tabs a.selected{background:#5e2a41!important;color:#fff!important}
html.cm-dark .cm-mobile-nav{background:#251e29f2;color:#efdae5;border-color:#514050}
html.cm-dark .cm-mobile-nav :is(a,button){color:#c3a9b6}
html.cm-dark .cm-mobile-nav :is(a,button).active{background:#5a2d44;color:#fff}
html.cm-dark .cm-quick-launch-menu{background:#2e2430;border-color:#594052}
html.cm-dark .cm-quick-launch-menu a{color:#f1dce6}
html.cm-dark .cm-quick-launch-menu a:hover{background:#493248}
html.cm-dark .workspace .notice:not(.error){background:#382d39;color:#f1dfe8}
html.cm-dark .workspace .hero-summary{background:linear-gradient(120deg,#7d2043,#a03b61)!important;color:white!important}
html.cm-dark .workspace .hero-summary :is(h2,strong,span,p,small){color:#fff!important}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.quick-action,.cm-theme-toggle,.cm-quick-launch>summary,.cm-filter-extra,.cm-quick-launch-menu{animation:none!important;transition:none!important;transform:none!important}}
@media print{.cm-mobile-nav,.cm-quick-launch,.cm-theme-toggle{display:none!important}}

/* Keep modal navigation visually in front of other floating controls. */
@media(max-width:800px){body.menu-open .cm-mobile-nav,body.menu-open .cm-quick-launch{opacity:0;pointer-events:none}}
/* Distinct but restrained signal for outstanding notifications. */
.topbar-notifications:has(.notification-count:not([hidden]))>summary{border-color:#d7a3b4!important;box-shadow:0 0 0 3px rgba(173,56,93,.07)!important}
html.cm-dark .workspace .cm-active-filters>strong{color:#eac3d3}
