/* corporate-ui.css - "Corporate" look for the whole app. ADD-ON ONLY: nothing in the app is changed or removed.
   It is switched on by <html class="corp"> (set in index.html unless the user chose Classic with the button in the top bar).
   To switch it off for everybody: delete the <link href="corporate-ui.css"> line in index.html - the app returns to the old look. */
html.corp{--brand:#0E5A55;--brand-dark:#0A423E;--brand-pale:#E3F1EF;--navy:#0F2433;--bg:#F1F4F8;--line:#E2E8F0;--line2:#CBD5E1;--ink:#0F1F2E;--muted:#5B6B7B;--side:#0C202F}
html.corp body{background:#F1F4F8;color:#0F1F2E;letter-spacing:-.003em}
html.corp ::selection{background:#BFE3DE;color:#08302C}

/* ---------- sidebar ---------- */
html.corp .app-sidebar{background:linear-gradient(185deg,#0F2A3C 0%,#0A1B28 100%)!important;border-right:0!important;box-shadow:2px 0 16px rgba(8,24,36,.28)!important;color:#D5E0EA!important;padding-top:16px!important}
html.corp .app-sidebar>div:first-child{padding:0 16px 14px!important;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:12px}
html.corp .app-sidebar>div:first-child img{background:#fff;border-radius:9px;padding:4px 8px;height:34px;box-sizing:content-box}
html.corp .app-sidebar>div:first-child>div{color:#fff!important;font-weight:700!important;letter-spacing:.2px;font-size:14px!important}
html.corp .app-sidebar>div:first-child>span{color:#8FA6B8!important}
html.corp .app-sidebar>div:nth-child(2){padding:0 12px 10px!important}
html.corp .app-sidebar input{background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.14)!important;color:#fff!important;border-radius:9px!important}
html.corp .app-sidebar input::placeholder{color:#8FA6B8!important}
html.corp .app-sidebar input:focus{background:rgba(255,255,255,.12)!important;border-color:#2DD4BF!important;box-shadow:0 0 0 3px rgba(45,212,191,.18)!important}
html.corp .app-sidebar-list{scrollbar-color:#35506A transparent;padding:0 6px 24px!important}
html.corp .app-sidebar-list>div{background:transparent!important;border-left:0!important;border-radius:10px!important;margin:6px 6px 8px!important;padding-bottom:2px!important}
html.corp .app-sidebar-list>div>div:first-child{color:#7F97AB!important;padding:8px 12px 6px!important;font-size:10.5px!important;letter-spacing:1.1px!important;font-weight:700!important}
html.corp .app-sidebar-list>div>div:first-child span{color:inherit!important}
html.corp .app-sidebar a{color:#CFDBE6!important;border-left:0!important;border-radius:9px!important;padding:8px 12px!important;margin:1px 0!important;font-size:13.2px!important;font-weight:500!important;position:relative}
html.corp .app-sidebar a span{opacity:.95!important}
html.corp .app-sidebar a:hover,html.corp .app-sidebar button:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
html.corp .app-sidebar a:not([style*="background: transparent"]){background:linear-gradient(90deg,rgba(45,212,191,.24),rgba(45,212,191,.07))!important;color:#fff!important;font-weight:650!important;box-shadow:inset 3px 0 0 #2DD4BF}
html.corp .app-sidebar button{color:#CFDBE6!important}

/* ---------- top bar and page ---------- */
html.corp .app-shell>div[style*="flex: 1 1 0%"]>div:first-child{background:#fff!important;border-bottom:1px solid #E2E8F0!important;padding:11px 26px!important;box-shadow:0 1px 3px rgba(15,36,51,.06)}
html.corp .app-shell>div[style*="flex: 1 1 0%"]>div:first-child>div:first-child>div:last-child{font-size:18px!important;font-weight:700!important;letter-spacing:-.015em!important;color:#0F1F2E}
html.corp .app-shell>div[style*="flex: 1 1 0%"]>div:nth-child(2){padding:22px 26px!important;background:#F1F4F8}
html.corp button[aria-label="Help"]{border-radius:20px!important;background:#E3F1EF!important;border-color:#B7DAD5!important;color:#0E5A55!important}

/* ---------- buttons ---------- */
html.corp .ui-btn{border-radius:9px!important;padding:8px 15px!important;font-size:13px!important;font-weight:600!important;letter-spacing:.1px!important;box-shadow:0 1px 2px rgba(15,36,51,.07)!important;border-color:#CBD5E1}
html.corp .ui-btn:not(:disabled):hover{filter:none;background-color:#F1F5F9;border-color:#94A3B8}
html.corp .ui-btn[style*="background: rgb(20, 79, 75)"],html.corp .ui-btn[style*="background: rgb(15, 118, 110)"]{background:linear-gradient(180deg,#127068,#0E5A55)!important;border-color:#0A4A45!important;color:#fff!important}
html.corp .ui-btn[style*="background: rgb(20, 79, 75)"]:not(:disabled):hover,html.corp .ui-btn[style*="background: rgb(15, 118, 110)"]:not(:disabled):hover{filter:brightness(1.08)}

/* ---------- cards, fields, tables ---------- */
html.corp div[style*="border-radius: 10px"][style*="border: 1px solid"][style*="background: rgb(255, 255, 255)"],html.corp div[style*="border-radius: 12px"][style*="border: 1px solid"][style*="background: rgb(255, 255, 255)"],html.corp div[style*="border-radius: 8px"][style*="border: 1px solid"][style*="background: rgb(255, 255, 255)"]{border-color:#E2E8F0!important;box-shadow:0 1px 2px rgba(15,36,51,.05),0 8px 22px rgba(15,36,51,.05)!important}
html.corp input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),html.corp select,html.corp textarea{border-radius:8px!important}
html.corp input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,html.corp select:focus,html.corp textarea:focus{box-shadow:0 0 0 3px rgba(14,90,85,.16)!important}
html.corp table{font-size:13px}
html.corp th{background:#EDF2F7;color:#475569;font-size:10.8px;letter-spacing:.7px;font-weight:700;border-bottom:1px solid #CBD5E1;padding:10px 12px}
html.corp td{padding:10px 12px;border-bottom:1px solid #EAEFF4}
html.corp tbody tr:nth-child(even){background:#F9FBFD}
html.corp tbody tr:hover{background:#EAF4F3}

/* ---------- small things ---------- */
html.corp *{scrollbar-color:#B6C4D0 transparent}
#sm-skin{border:1px solid #CBD5E1;background:#fff;color:#334155;border-radius:20px;padding:3px 11px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
#sm-skin:hover{background:#F1F5F9}
html.corp #sm-skin{border-color:#B7DAD5;background:#E3F1EF;color:#0E5A55}
@media (max-width:820px){html.corp .app-shell>div[style*="flex: 1 1 0%"]>div:first-child{padding:10px 14px!important}html.corp .app-shell>div[style*="flex: 1 1 0%"]>div:nth-child(2){padding:14px!important}#sm-skin{display:none}}
@media print{html.corp .app-sidebar{box-shadow:none!important}#sm-skin{display:none}}

/* Mobile: floating buttons (version chip, NOTES tab, team chat) stay out of the way of the content. Add-on only. */
@media (max-width:820px){
 div[title="What's new in this app"]{left:50%!important;bottom:4px!important;transform:translateX(-50%) scale(.85);transform-origin:center bottom;opacity:.55!important;transition:opacity .25s;white-space:nowrap}
 div[title^="Notes (Alt+N)"]{transform:translateX(24px);transition:transform .25s,opacity .25s}
 div[title="Team chat"]{transition:opacity .25s}
 html.sm-scr div[title="What's new in this app"]{opacity:0!important;pointer-events:none}
 html.sm-scr div[title^="Notes (Alt+N)"]{transform:translateX(40px);opacity:.5}
 html.sm-scr div[title="Team chat"]{opacity:.35}
}

/* ---------- Dashboard polish (look only; add-on, nothing removed) ---------- */
@keyframes smUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
html.corp .dash-hdr{background:rgba(241,244,248,.93)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:10px 0 12px!important;border-bottom:1px solid #E2E8F0}
html.corp .dash-hdr>div:first-child>div:first-child{font-size:22px!important;letter-spacing:-.02em!important;color:#0F1F2E}
html.corp .dash-hdr>div:first-child>div:nth-child(2){font-size:12.5px!important;line-height:1.5;color:#5B6B7B!important;margin-top:2px}
html.corp .dash-hdr select{border-radius:10px!important;background-color:#fff!important;border:1px solid #CBD5E1!important;font-weight:550}
html.corp .dash-kpi{border-radius:14px!important;box-shadow:0 1px 2px rgba(15,36,51,.05),0 6px 16px rgba(15,36,51,.06)!important;animation:smUp .35s ease both}
html.corp .dash-kpi:hover{box-shadow:0 2px 4px rgba(15,36,51,.06),0 12px 26px rgba(15,36,51,.12)!important}
html.corp .dash-kpi-v{font-variant-numeric:tabular-nums;letter-spacing:-.025em}
html.corp .dash-panel{border-radius:14px!important;box-shadow:0 1px 2px rgba(15,36,51,.05),0 6px 16px rgba(15,36,51,.05)!important;animation:smUp .4s ease both}
html.corp .dash-panel>div:first-child>div:first-child>div:first-child{font-size:15px!important;font-weight:700!important;letter-spacing:-.01em}
html.corp .dz-head{margin-bottom:12px}
html.corp .dz-title{font-size:16px;letter-spacing:-.01em}
html.corp .dz-grid{gap:12px}
html.corp .dz-tile{border-radius:14px;box-shadow:0 1px 2px rgba(15,36,51,.06),0 4px 12px rgba(15,36,51,.06);animation:smUp .35s ease both}
html.corp .dz-tile::before{width:4px}
html.corp .dz-n{font-size:28px;letter-spacing:-.02em}
html.corp .dz-more{border-radius:12px;background:#fff}
html.corp .dash-root div[style*="padding: 10px 14px"][style*="margin-bottom: 10px"]{border-radius:12px!important;box-shadow:0 1px 2px rgba(15,36,51,.05)}
@media (prefers-reduced-motion:reduce){html.corp .dash-kpi,html.corp .dash-panel,html.corp .dz-tile{animation:none}}

@media (max-width:640px){
 html.corp .dash-hdr{position:static!important;border-bottom:0;padding:4px 0 8px!important;background:transparent!important;-webkit-backdrop-filter:none;backdrop-filter:none}
 html.corp .dash-hdr>div:first-child{flex:1 1 100%}
 html.corp .dash-hdr>div:first-child>div:first-child{font-size:20px!important}
 html.corp .dash-hdr>div:last-child{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%}
 html.corp .dash-hdr>div:last-child select,html.corp .dash-hdr>div:last-child input[type=date]{width:100%!important;min-width:0!important;padding:9px 10px!important;font-size:14px!important}
 html.corp .dash-hdr>div:last-child>label,html.corp .dash-hdr>div:last-child>span{grid-column:1/-1;font-size:12.5px!important}
 html.corp .dash-hdr>div:last-child>label{margin:0;gap:8px!important}
 html.corp .dz-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 html.corp .dz-tile{padding:10px 8px 10px 13px;gap:8px;align-items:flex-start}
 html.corp .dz-ic{flex:0 0 32px;height:32px;font-size:16px}
 html.corp .dz-bad .dz-ic{animation:none}
 html.corp .dz-n{font-size:23px}
 html.corp .dz-l{font-size:11.5px;line-height:1.28}
 html.corp .dz-go,html.corp .dz-tag{display:none}
 html.corp .dz-title{font-size:15px}
 html.corp .dash-root div[style*="padding: 10px 14px"][style*="margin-bottom: 10px"]{padding:9px 12px!important;font-size:13px;line-height:1.45}
}

/* ---------- Sidebar: groups vs menu items (Update: easy to tell apart). ADD-ON ONLY - appended at the end, nothing above is changed.
   Before: the Corporate look removed every group's own colour and gave all group titles + menu items nearly the same grey-white.
   Now: each group has its own colour (taken from the app: --gc-rgb is set by corporate-ui.js), a solid coloured TITLE BAR in bold capitals, and the menu items under it are smaller, lighter, indented with a thin guide line. ---------- */
html.corp .app-sidebar-list>div{background:rgba(var(--gc-rgb,127,151,171),.10)!important;border-left:4px solid rgb(var(--gc-rgb,127,151,171))!important;border-radius:0 12px 12px 0!important;margin:12px 8px 12px 0!important;padding-bottom:6px!important;overflow:hidden}
html.corp .app-sidebar-list>div>div:first-child{background:rgba(var(--gc-rgb,127,151,171),.38)!important;color:#fff!important;font-size:12px!important;letter-spacing:1.3px!important;font-weight:800!important;text-transform:uppercase;padding:10px 12px 10px 14px!important;margin-bottom:4px;border-bottom:1px solid rgba(var(--gc-rgb,127,151,171),.55);text-shadow:0 1px 1px rgba(0,0,0,.25)}
html.corp .app-sidebar-list>div>div:first-child:hover{background:rgba(var(--gc-rgb,127,151,171),.5)!important}
html.corp .app-sidebar-list>div>div:first-child>span:last-child{font-size:12px!important;opacity:1;color:#fff}
html.corp .app-sidebar-list>div>div:first-child>span:last-child span{font-size:11px!important}
html.corp .app-sidebar-list>div a{margin:1px 6px 1px 14px!important;padding:7px 10px 7px 12px!important;font-size:13px!important;font-weight:400!important;color:#B6C6D5!important;border-left:1px solid rgba(255,255,255,.14)!important;border-radius:0 8px 8px 0!important;text-transform:none;letter-spacing:0}
html.corp .app-sidebar-list>div a:hover{background:rgba(255,255,255,.09)!important;color:#fff!important;border-left-color:rgba(var(--gc-rgb,127,151,171),1)!important}
html.corp .app-sidebar-list>div a:not([style*="background: transparent"]){font-weight:700!important;border-left:3px solid #2DD4BF!important;margin-left:12px!important}
@media (max-width:820px){html.corp .app-sidebar-list>div>div:first-child{font-size:12.5px!important;padding:12px 12px 12px 14px!important}html.corp .app-sidebar-list>div a{padding:10px 10px 10px 12px!important}}

/* ---------- Sidebar groups in the CLASSIC look (light sidebar). Same idea as above: coloured title bar + indented items. ADD-ON ONLY. ---------- */
html:not(.corp) .app-sidebar-list>div{background:rgba(var(--gc-rgb,127,151,171),.08)!important;border-left:4px solid rgb(var(--gc-rgb,127,151,171))!important;border-radius:0 12px 12px 0!important;margin:12px 8px 12px 0!important;padding-bottom:6px!important;overflow:hidden}
html:not(.corp) .app-sidebar-list>div>div:first-child{background:rgba(var(--gc-rgb,127,151,171),.24)!important;color:#0F1F2E!important;font-size:12px!important;letter-spacing:1.2px!important;font-weight:800!important;padding:10px 12px 10px 14px!important;margin-bottom:4px;border-bottom:1px solid rgba(var(--gc-rgb,127,151,171),.45)}
html:not(.corp) .app-sidebar-list>div>div:first-child:hover{background:rgba(var(--gc-rgb,127,151,171),.34)!important}
html:not(.corp) .app-sidebar-list>div>div:first-child>span:last-child{font-size:12px!important;opacity:1}
html:not(.corp) .app-sidebar-list>div a{margin:1px 6px 1px 14px!important;padding:7px 10px 7px 12px!important;font-size:13px!important;font-weight:400!important;border-left:1px solid rgba(var(--gc-rgb,127,151,171),.5)!important;border-radius:0 8px 8px 0!important}
html:not(.corp) .app-sidebar-list>div a:not([style*="background: transparent"]){font-weight:700!important;border-left:3px solid rgb(var(--gc-rgb,127,151,171))!important;margin-left:12px!important}

/* ---------- Tab rows inside pages (e.g. Meta & Lead Sources: main tabs + sub tabs). Works in Corporate and Classic. ADD-ON ONLY.
   corporate-ui.js marks every row of tabs with .tabrow-1 (main tabs) or .tabrow-2 (tabs inside a main tab) -
   main tabs = solid "pill" bar with a filled active tab; sub tabs = smaller, grey, underlined, with a guide line on the left. ---------- */
.tabrow-1{display:flex!important;flex-wrap:wrap;gap:6px!important;background:#E8EEF4;padding:5px;border-radius:12px;width:fit-content;max-width:100%;margin-bottom:16px!important;border:1px solid #D5DEE8;box-sizing:border-box}
.tabrow-1>span{font-size:13.5px!important;padding:7px 13px!important;border-radius:9px;border-bottom:0!important;color:#41546A!important;font-weight:500!important;background:transparent;white-space:nowrap}
.tabrow-1>span:hover{background:rgba(255,255,255,.75)}
.tabrow-1>span:not([style*="border-bottom: 2px solid transparent"]){background:#144F4B!important;color:#fff!important;font-weight:700!important;box-shadow:0 2px 6px rgba(15,36,51,.25)}
.tabrow-2,.tabrow-3{display:flex!important;flex-wrap:wrap;gap:2px!important;margin:0 0 16px 2px!important;padding:0 0 0 12px;border-left:3px solid #94A3B8;border-bottom:1px solid #DDE5EC}
.tabrow-2>span,.tabrow-3>span{font-size:12.5px!important;padding:6px 11px!important;color:#64748B!important;font-weight:500!important;border-bottom-width:3px!important;margin-bottom:-1px;white-space:nowrap}
.tabrow-2>span:hover,.tabrow-3>span:hover{background:#F1F5F9;color:#0F1F2E!important}
.tabrow-2>span:not([style*="border-bottom: 2px solid transparent"]),.tabrow-3>span:not([style*="border-bottom: 2px solid transparent"]){color:#0F1F2E!important;font-weight:700!important;border-bottom-color:#0E7C86!important}
.tabrow-3>span{font-size:12px!important}
@media (max-width:820px){.tabrow-1>span{padding:9px 12px!important}.tabrow-2>span,.tabrow-3>span{padding:8px 10px!important}}
