/* Shared visual system. Loaded after the legacy module styles. */
:root{
  --sidebar-width:232px;--topbar-height:68px;
  --ink:#192b45;--muted:#637389;--soft:#f5f7fa;--line:#e1e7ef;
  --shadow:0 4px 18px rgba(22,43,72,.045);
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:84px}
body{font-size:13px;line-height:1.5;background:#f5f7fa}
button,input,select,textarea{font-family:inherit}
button{touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:2px solid #2473bc;outline-offset:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none!important;outline-offset:0!important}
.workspace,.view-container,.page-heading>div,.card,.form-grid>*{min-width:0}
.view-container{padding:24px clamp(18px,2vw,32px);background:#f5f7fa}
.page-heading{gap:16px;margin-bottom:20px;align-items:center}
.page-heading h2{font-size:24px;line-height:1.25;font-weight:650;letter-spacing:-.025em;margin:5px 0 7px;overflow-wrap:anywhere}
.page-heading p{font-size:13px;line-height:1.6;max-width:760px}
.eyebrow{font-size:10px;font-weight:700;letter-spacing:.12em;line-height:1.5}
.page-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px}
.primary-button,.secondary-button{font-size:12px;font-weight:650;border-radius:9px;min-height:38px;padding:8px 14px;box-shadow:none}
.primary-button:hover,.secondary-button:hover{transform:none}
.text-button{font-size:12px;font-weight:650}
.card{border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}
.card-heading{padding:16px 18px;gap:12px;align-items:center}
.card-heading h3{font-size:15px;line-height:1.35;font-weight:650;margin:3px 0 0}
.card-heading p,.muted-copy{font-size:12px;line-height:1.6}
.status-pill,.priority-pill,.tag{font-size:11px;line-height:1.35;font-weight:600;box-shadow:none}

/* Workspace shell: bounded controls leave room for the page title. */
.sidebar{background:linear-gradient(180deg,#0b203e,#102d50);box-shadow:none}
.sidebar-brand{height:80px;padding:16px;gap:12px}
.sidebar-brand img{width:72px}.sidebar-brand strong{font-size:13px}.sidebar-brand span{font-size:10px}
.nav-link{min-height:43px!important;font-size:12px!important;border-radius:9px!important;font-weight:500}
.nav-link.active{font-weight:650;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.nav-link.active:before{background:#4386cf}
.nav-link .nav-icon{width:28px!important;height:28px!important;flex-basis:28px!important;border-radius:8px!important}
.sidebar-footer button{min-height:42px!important}
.topbar{height:var(--topbar-height);padding:0 24px;gap:16px;box-shadow:none;background:rgba(255,255,255,.97)}
.topbar-context{min-width:0;max-width:none;flex:1}.topbar-context>div{flex:1 1 130px;min-width:100px}.topbar-context h1{font-size:18px;font-weight:650;line-height:1.3}
.engagement-picker{min-width:140px;width:190px;max-width:220px;margin-left:8px;flex:0 1 190px;border-radius:9px;background:#f4f7fb;box-shadow:none}
.topbar-context span{font-size:10px}.topbar-actions{gap:8px;flex:0 1 auto}
.global-search{width:clamp(170px,18vw,280px);flex:0 1 280px;min-width:0;height:38px;border-radius:9px}
.global-search input{font-size:12px}.global-search kbd{font-size:10px}
.profile-button{min-width:0;width:auto;max-width:180px;height:40px;padding-left:12px;gap:8px}
.profile-copy strong{font-size:12px}.profile-copy small{font-size:10px}.avatar{box-shadow:none}
.quick-add{min-width:0;height:38px;padding:0 12px;font-size:12px}
.notification-button{width:38px;height:38px;box-shadow:none}

/* Dashboard, tasks, people and operational lists share one density. */
.metric-grid{gap:12px}.metric-card{padding:16px;min-height:112px}
.metric-card:before{width:3px;opacity:.8}.metric-value{font-size:25px;font-weight:650;line-height:1.2;margin-top:12px}
.metric-label{font-size:12px;line-height:1.4}.metric-trend{font-size:10px;font-weight:600}
.dashboard-grid,.dashboard-column{gap:16px}
.engagement-hero h2{font-size:22px;font-weight:650}.engagement-hero p{font-size:13px;line-height:1.6}
.engagement-banner h3{font-size:18px;font-weight:650}.engagement-banner p{font-size:13px;line-height:1.6}
.summary-chip strong{font-size:21px;font-weight:650}
.activity-copy,.team-copy strong,.primary-cell strong{font-size:12px;line-height:1.5}
.activity-time,.team-copy span,.primary-cell span,.due-date small{font-size:11px;line-height:1.4}
.activity-row{padding:13px 16px}.list-stack{padding:8px;gap:6px}
.filter-bar{gap:9px;flex-wrap:wrap}.filter-search{min-width:160px}
.filter-search input,.select-control{font-size:12px}
.filter-search,.select-control{min-height:40px;border-radius:9px}
.table-wrap{max-width:100%;overflow-x:auto;border-radius:12px;box-shadow:none}
.data-table th{font-size:10px;font-weight:700;letter-spacing:.06em;padding:12px 14px}
.data-table td{font-size:12px;line-height:1.5;padding:13px 14px}
.row-view-button,.due-date strong{font-size:12px}
.profile-main,.settings-card{border-radius:13px}
.settings-grid,.profile-grid,.control-grid{gap:16px}
.people-hub-page,.people-hub-toolbar,.people-hub-tabs{min-width:0;max-width:100%}
.people-hub-page{grid-template-columns:minmax(0,1fr)}
.people-hub-page>*{min-width:0}
.people-hub-tab{white-space:normal;min-width:0}.people-hub-tab small{font-size:11px;overflow-wrap:anywhere}
.people-hub-tab>span:first-child{font-size:12px}
.card-heading>div{min-width:0}.card-heading h3{overflow-wrap:anywhere}
.control-card-note{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.control-access-card>.card-heading{margin:0 0 12px;width:100%}
.task-command-value{font-size:25px;font-weight:650}.task-command-label{font-size:12px;font-weight:650}.task-command-copy{font-size:11px;line-height:1.5}

/* Forms and dialogs keep readable labels and predictable control sizes. */
.form-grid{gap:16px}
.form-field label,.modal-form label{font-size:12px;font-weight:600;line-height:1.5}
.form-field input,.form-field select,.form-field textarea,
.modal-form input:not([type=checkbox]):not([type=radio]):not([type=file]),.modal-form select,.modal-form textarea{
  min-width:0;max-width:100%;font-size:13px;line-height:1.5;min-height:42px;border-radius:9px;
}
.app-modal{max-width:calc(100vw - 40px);max-height:calc(100dvh - 48px);border-radius:16px;box-shadow:0 24px 80px rgba(14,31,55,.2)}
.app-modal header,.detail-drawer header{padding:18px 22px}
.app-modal h2,.detail-drawer h2{font-size:20px;font-weight:650;line-height:1.3}
.modal-body,.drawer-body{padding:22px}.modal-actions{gap:10px;flex-wrap:wrap}
.modal-actions button{min-height:42px;height:auto}

/* Inbox and conversations retain their existing interaction layouts. */
.gmail-shell,.chat-layout{border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}
.gmail-searchbar{border-radius:9px;background:#f3f6fa}
.gmail-row{min-height:48px}.gmail-row-sender{font-size:12px}.gmail-row-subject{font-size:13px}.gmail-row-snippet{font-size:12px}
.gmail-row-date{font-size:11px}.gmail-rail-item{font-size:12px}
.chat-msg-body{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.chat-main,.gmail-main,.chat-composer{min-width:0}
.chat-input{font-size:13px}.chat-channel-item{font-size:12px}

/* Festive catalogue follows the same scale as the rest of the workspace. */
.diwali-hero{min-height:290px}.diwali-hero-copy{padding:30px 28px;width:56%}
.diwali-hero h2{font-size:clamp(28px,2.5vw,36px);font-weight:650;line-height:1.14}
.diwali-hero p{font-size:13px;max-width:460px;margin-top:14px}
.diwali-preview-line>span{font-size:10px;letter-spacing:.15em}.diwali-preview-line>b{font-size:9px}
.diwali-hero-copy>small{font-size:10px;line-height:1.5}
.diwali-primary-cta,.diwali-secondary-cta,.diwali-select-btn{font-size:12px;font-weight:650;min-height:40px}
.diwali-section-heading h3,.diwali-subpage-head h2{font-size:22px;font-weight:650}
.diwali-section-heading p,.diwali-subpage-head p{font-size:12px;line-height:1.6}
.diwali-gift-grid{gap:16px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
.diwali-gift-card{border-radius:12px;box-shadow:var(--shadow)}
.diwali-gift-copy{padding:15px 16px 12px;gap:7px}
.diwali-gift-copy h4{font-size:15px;font-weight:650;line-height:1.35}
.diwali-gift-copy p{font-size:12px;line-height:1.6}.diwali-gift-copy small{font-size:11px;line-height:1.5;font-weight:500}
.diwali-gift-category{font-size:10px;font-weight:600;min-height:24px;box-shadow:none}
.diwali-select-btn{margin:0 16px 16px}.diwali-guidance p{font-size:12px;line-height:1.6}.diwali-guidance button{font-size:11px}
.diwali-module-nav button{font-size:12px;min-height:42px}
.diwali-admin-gift-main strong{font-size:14px}.diwali-admin-gift-main p{font-size:12px}.diwali-admin-gift-main small{font-size:11px}

/* Sign-in is a calm part of the same visual system. */
.brand-copy h1{font-size:clamp(32px,3vw,44px);font-weight:650;line-height:1.15}
.brand-lead{font-size:15px;line-height:1.7;margin:20px 0 28px}
.login-logo{width:140px;margin-bottom:32px}.login-card{border-radius:16px;padding:32px;box-shadow:0 12px 40px rgba(22,43,72,.08)}
.login-card h2{font-size:25px;font-weight:650}.login-card label{font-size:12px}.login-help{font-size:13px}
.field-shell{height:46px}.login-button{height:46px}

@media(min-width:1600px){
  .view-container{max-width:1660px;margin-inline:auto;padding:28px 36px}
  .diwali-gift-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(min-width:1025px) and (max-width:1250px){
  :root{--sidebar-width:216px}.topbar{padding-inline:18px;gap:10px}
  .global-search{width:180px;flex-basis:180px}.profile-button{max-width:145px}
  .quick-add span{display:none}.quick-add{width:38px;padding:0}
  .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1024px){
  .sidebar{width:min(288px,88vw)}.sidebar-brand{padding-right:48px}
  .sidebar-close{display:grid}.topbar-context{min-width:0}
  .global-search{width:200px;flex-basis:200px}.profile-button{max-width:155px}
}
@media(min-width:761px) and (max-width:900px){
  .quick-add span{display:none}.quick-add{width:38px;padding:0}
  .profile-copy{display:none}.profile-button{max-width:44px;padding:0;border:0}
  .diwali-gift-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  :root{--topbar-height:64px}
  body{font-size:13px}.view-container{padding:18px 14px calc(90px + env(safe-area-inset-bottom));min-width:0}
  .topbar{padding:0 10px;gap:6px}.topbar-left{gap:4px;flex:1 1 auto;min-width:0}
  .topbar-context{min-width:0;max-width:none}.topbar-context h1{font-size:16px}.topbar-context span{font-size:10px}
  .topbar-context>div{min-width:0}.engagement-picker{min-width:0;width:auto;max-width:100%;margin-left:0;flex:1 1 auto}
  .topbar-actions{flex:0 0 auto;gap:4px}
  .global-search{width:36px;min-width:36px;height:40px;flex:0 0 36px;padding:0;border:0}
  .quick-add{width:36px;min-width:36px;height:40px;padding:0}.quick-add span{display:none}
  .profile-button{width:36px;min-width:0;max-width:36px;padding:0;border:0}.profile-copy,.profile-button>svg{display:none}
  .notification-button{width:36px;height:40px}.avatar{width:32px;height:32px;flex-basis:32px}
  .nav-link{min-height:46px!important;font-size:13px!important}
  .page-heading{align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:18px}
  .page-heading>div:first-child{flex:1 1 220px}.page-heading h2{font-size:21px}.page-heading p{font-size:12px}
  .page-actions{max-width:100%;justify-content:flex-start;flex-wrap:wrap}
  .page-actions .primary-button{width:auto;min-height:42px;height:auto;padding:9px 12px}
  .page-actions .secondary-button{display:inline-flex;min-height:42px;height:auto;padding:9px 12px}
  .card-heading{padding:14px 16px;flex-wrap:wrap}.card-heading h3{font-size:15px}.card-heading p{font-size:12px}
  .metric-card{padding:14px;min-height:110px}.metric-value{font-size:23px}.metric-label{font-size:11px}
  .dashboard-grid,.dashboard-column,.profile-grid,.settings-grid{gap:12px}
  .task-command-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;padding:0;gap:10px}
  .task-command-card{min-height:112px;padding:14px}.task-command-card:last-child{grid-column:1/-1}
  .task-filter-chips{flex-wrap:wrap;overflow:visible}
  .control-data-card .card-heading{flex-wrap:wrap;max-width:100%}
  .engagement-hero h2{font-size:20px}.engagement-hero p,.engagement-banner p{font-size:12px}
  .table-wrap{overflow-x:auto}.data-table{min-width:0;width:100%}
  .data-table td{padding:0;font-size:12px;overflow-wrap:anywhere;min-width:0}
  .data-table td[data-label]:before{font-size:10px;letter-spacing:.05em}
  .data-table .primary-cell strong{font-size:13px}.data-table tr{padding:14px;gap:12px}
  .filter-search{min-width:100%}.select-control{font-size:13px;min-height:44px}
  .form-grid,.modal-form .form-grid{grid-template-columns:minmax(0,1fr)}
  .form-field label,.modal-form label{font-size:12px}
  .form-field input,.form-field select,.form-field textarea,.modal-form input:not([type=checkbox]):not([type=radio]):not([type=file]),.modal-form select,.modal-form textarea,
  .field-shell input,.chat-input,.gmail-searchbar input,.filter-search input{font-size:16px;min-height:44px}
  .app-modal{max-width:100%;width:100%;max-height:calc(100dvh - 16px);border-radius:18px 18px 0 0}
  .app-modal header,.detail-drawer header{padding:16px}.app-modal h2,.detail-drawer h2{font-size:19px}
  .modal-body,.drawer-body{padding:16px 16px calc(20px + env(safe-area-inset-bottom))}
  .modal-actions{gap:8px}.modal-actions button{flex:1 1 auto;min-height:44px}
  .mobile-nav{height:calc(68px + env(safe-area-inset-bottom));padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -3px 16px rgba(22,43,72,.05)}
  .mobile-nav button{font-size:9px;gap:4px;min-height:44px}.mobile-nav button svg{width:20px;height:20px}
  .notification-panel{max-height:calc(100dvh - 84px)}
  .chat-layout:not(.chat-dm-mode){min-height:380px;height:calc(100dvh - 180px);max-height:none}
  .chat-msg-body{font-size:14px}.chat-send-btn{min-height:44px;min-width:44px}
  .gmail-row{min-height:58px}.gmail-row-subject{font-size:13px}.gmail-row-sender{font-size:12px}
  .gmail-shell,.chat-layout{border-radius:12px}
  .diwali-hero{min-height:0;padding-top:190px;background-size:auto,auto 210px}
  .diwali-hero-copy{width:100%;padding:18px 20px 24px}
  .diwali-hero h2{font-size:29px;line-height:1.15}.diwali-hero p{font-size:13px}
  .diwali-hero-actions{display:flex;flex-wrap:wrap;gap:8px}.diwali-hero-actions button{min-height:44px;padding:10px 14px}
  .diwali-gift-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .diwali-section-heading{align-items:flex-start;flex-wrap:wrap}.diwali-section-heading h3{font-size:20px}
  .diwali-select-btn{min-height:44px}.diwali-guidance{grid-template-columns:22px minmax(0,1fr)}.diwali-guidance button{grid-column:2;justify-self:start}
  .login-form-panel{padding:24px 16px;min-height:100dvh;height:auto}.login-screen{height:auto;min-height:100dvh}
  .login-card{padding:26px 22px}.login-card h2{font-size:24px}.field-shell{height:48px}
}
@media(max-width:560px){.diwali-gift-grid{grid-template-columns:minmax(0,1fr)!important}.diwali-gift-copy h4{font-size:16px}}
@media(max-width:380px){.topbar .quick-add{display:none}.mobile-nav button{font-size:8px}.view-container{padding-inline:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* V9 targeted header refinement: premium engagement picker + clean form focus */
/* Form controls should not draw the detached blue browser-style rectangle. */
.field-shell:focus-within,
.form-field input:focus,.form-field select:focus,.form-field textarea:focus,
.modal-form input:focus,.modal-form select:focus,.modal-form textarea:focus,
.global-search:focus-within,
.filter-search:focus-within{
  box-shadow:none!important;
}
.field-shell:focus-within{border-color:#8eaed3!important}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus,
.modal-form input:focus,.modal-form select:focus,.modal-form textarea:focus{border-color:#8eaed3!important}

/* The visual shortcut chip is intentionally hidden; Ctrl/Cmd+K continues to work. */
#searchShortcut{display:none!important}

/* Desktop: give the switcher breathing room and keep it away from the search block. */
@media(min-width:1101px){
  .topbar-context{justify-content:flex-start!important;gap:18px!important}
  .topbar-context>div{flex:0 1 clamp(300px,31vw,510px)!important;min-width:220px!important}
  .engagement-picker{margin-left:0!important;width:300px!important;max-width:300px!important;flex:0 0 300px!important}
}

.engagement-picker{
  position:relative;
  padding:0!important;
  min-height:0;
  border-radius:13px!important;
  background:linear-gradient(145deg,#f8faff 0%,#eef4ff 100%)!important;
  border:1px solid #c8d8f2!important;
  box-shadow:0 5px 18px rgba(27,66,124,.07)!important;
  overflow:visible;
  cursor:default!important;
}
.engagement-picker:hover{border-color:#a9c2e7!important;box-shadow:0 7px 20px rgba(27,66,124,.1)!important}
.engagement-picker:focus-within{border-color:#9bb9df!important;box-shadow:0 7px 20px rgba(27,66,124,.1)!important}
.engagement-picker.is-open{border-color:#8eadd6!important;background:#fff!important}
.engagement-picker-button{
  width:100%;min-width:0;height:100%;min-height:58px;
  display:grid;grid-template-columns:36px minmax(0,1fr) 20px;align-items:center;gap:11px;
  padding:7px 12px;border:0;border-radius:inherit;background:transparent;color:#192b45;text-align:left;cursor:pointer;
}
.engagement-picker-button:disabled{cursor:default}
.engagement-picker-button:focus-visible{outline:none!important}
.engagement-picker-icon{width:36px!important;height:36px!important;border-radius:11px!important;box-shadow:0 6px 14px rgba(33,88,190,.22)!important}
.engagement-picker-icon svg{width:16px!important;height:16px!important}
.engagement-picker-text{display:grid!important;gap:2px!important;min-width:0!important}
.engagement-picker-text small{font-size:9px!important;line-height:1.15!important;letter-spacing:.095em!important;color:#6c7ea2!important;margin:0!important}
.engagement-picker-text strong{font-size:12px;line-height:1.25;font-weight:760;color:#1b2b46;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.engagement-picker-caret{transition:transform .18s ease!important}
.engagement-picker.is-open .engagement-picker-caret{transform:rotate(180deg)!important}
.engagement-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)!important}
.engagement-picker-menu{
  position:absolute;z-index:130;left:0;top:calc(100% + 9px);width:min(390px,calc(100vw - 32px));
  padding:7px;border:1px solid #d6e0ee;border-radius:15px;background:rgba(255,255,255,.985);
  box-shadow:0 24px 55px rgba(25,52,92,.18),0 3px 10px rgba(25,52,92,.06);
  backdrop-filter:blur(18px) saturate(145%);transform-origin:top left;
  animation:engagementMenuIn .16s ease-out;
}
@keyframes engagementMenuIn{from{opacity:0;transform:translateY(-4px) scale(.985)}to{opacity:1;transform:none}}
.engagement-picker-menu.hidden{display:none!important}
.engagement-picker-option{
  width:100%;min-height:58px;display:grid;grid-template-columns:34px minmax(0,1fr) 20px;align-items:center;gap:10px;
  padding:8px 10px;border:0;border-radius:11px;background:transparent;color:#1d304b;text-align:left;cursor:pointer;transition:background .14s ease,transform .14s ease;
}
.engagement-picker-option:hover,.engagement-picker-option:focus-visible{background:#f1f6fd;outline:none!important}
.engagement-picker-option:active{transform:scale(.995)}
.engagement-picker-option.is-selected{background:linear-gradient(135deg,#edf4ff,#f7f9ff)}
.engagement-option-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#e7effb;color:#22549a;font-size:11px;font-weight:800}
.engagement-picker-option.is-selected .engagement-option-mark{background:linear-gradient(135deg,#135ec2,#6c4ee9);color:#fff}
.engagement-option-copy{display:grid;gap:2px;min-width:0}
.engagement-option-copy small{font-size:8px!important;line-height:1.2;color:#7b8ba1;text-transform:uppercase;letter-spacing:.07em;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.engagement-option-copy strong{font-size:12px;line-height:1.3;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.engagement-option-check{width:20px;height:20px;display:grid;place-items:center;color:transparent}
.engagement-option-check svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.engagement-picker-option.is-selected .engagement-option-check{color:#1761bd}

@media(max-width:1100px) and (min-width:761px){.engagement-picker{display:none!important}}
@media(max-width:760px){
  .engagement-picker{width:min(51vw,238px)!important;max-width:100%!important;flex:0 1 auto!important;margin-left:0!important;border-radius:11px!important}
  .engagement-picker-button{min-height:42px;grid-template-columns:28px minmax(0,1fr) 16px;gap:7px;padding:4px 8px}
  .engagement-picker-icon{width:28px!important;height:28px!important;border-radius:9px!important}
  .engagement-picker-icon svg{width:13px!important;height:13px!important}
  .engagement-picker-text small{font-size:7px!important}
  .engagement-picker-text strong{font-size:10.5px}
  .engagement-picker-menu{position:fixed;left:10px;right:10px;top:calc(var(--topbar-height) + 7px);width:auto;max-height:min(58dvh,430px);overflow:auto;border-radius:14px;transform-origin:top center}
  .engagement-picker-option{min-height:56px}
}
@media(max-width:420px){
  .engagement-picker{width:min(48vw,190px)!important}
  .engagement-picker-text small{display:none!important}
  .engagement-picker-button{grid-template-columns:26px minmax(0,1fr) 14px;gap:6px;padding-inline:7px}
  .engagement-picker-icon{width:26px!important;height:26px!important}
}

/* V10 targeted engagement switcher polish — compact desktop + visible mobile */
@media(min-width:1101px){
  .topbar-context{gap:12px!important}
  .topbar-context>div:first-of-type{
    flex:0 1 clamp(220px,22vw,350px)!important;
    min-width:190px!important;
  }
  .engagement-picker{
    width:228px!important;
    max-width:228px!important;
    flex:0 0 228px!important;
    margin-left:0!important;
  }
}

.engagement-picker{
  border-radius:11px!important;
  background:linear-gradient(145deg,#f9fbff 0%,#f1f5fc 100%)!important;
  border-color:#cfdaea!important;
  box-shadow:0 2px 8px rgba(27,66,124,.045)!important;
}
.engagement-picker:hover{
  border-color:#adc3e1!important;
  box-shadow:0 5px 14px rgba(27,66,124,.08)!important;
}
.engagement-picker.is-open{
  border-color:#9db8dc!important;
  box-shadow:0 6px 18px rgba(27,66,124,.10)!important;
}
.engagement-picker-button{
  min-height:46px!important;
  grid-template-columns:30px minmax(0,1fr) 16px!important;
  gap:8px!important;
  padding:5px 9px!important;
}
.engagement-picker-icon{
  width:30px!important;
  height:30px!important;
  border-radius:9px!important;
  box-shadow:0 4px 10px rgba(33,88,190,.18)!important;
}
.engagement-picker-icon svg{width:14px!important;height:14px!important}
.engagement-picker-text{gap:1px!important}
.engagement-picker-text small{
  font-size:7.5px!important;
  letter-spacing:.09em!important;
  color:#7585a0!important;
}
.engagement-picker-text strong{
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:720!important;
}
.engagement-picker-caret svg{width:13px!important;height:13px!important}

/* Premium dropdown: smaller, calmer, and more deliberate than the V9 menu. */
.engagement-picker-menu{
  top:calc(100% + 7px)!important;
  width:min(330px,calc(100vw - 24px))!important;
  padding:6px!important;
  border-radius:13px!important;
  border-color:#d9e2ee!important;
  background:rgba(255,255,255,.99)!important;
  box-shadow:0 18px 42px rgba(24,48,84,.16),0 2px 7px rgba(24,48,84,.05)!important;
}
.engagement-picker-option{
  position:relative;
  min-height:50px!important;
  grid-template-columns:30px minmax(0,1fr) 18px!important;
  gap:9px!important;
  padding:7px 9px!important;
  border-radius:9px!important;
}
.engagement-picker-option:hover,.engagement-picker-option:focus-visible{
  background:#f4f7fc!important;
}
.engagement-picker-option.is-selected{
  background:#edf4fd!important;
  box-shadow:inset 0 0 0 1px rgba(42,98,170,.07)!important;
}
.engagement-picker-option.is-selected:before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:#2b6cb5;
}
.engagement-option-mark{
  width:30px!important;
  height:30px!important;
  border-radius:8px!important;
  font-size:10px!important;
  background:#e9eff8!important;
}
.engagement-picker-option.is-selected .engagement-option-mark{
  background:linear-gradient(135deg,#1c64b7,#5b50da)!important;
}
.engagement-option-copy small{font-size:7.5px!important;letter-spacing:.065em!important}
.engagement-option-copy strong{font-size:11.5px!important;font-weight:680!important}
.engagement-option-check svg{width:14px!important;height:14px!important}

/* Mobile: old V6 rule hides every div inside .topbar-context. Explicitly restore only the picker. */
@media(max-width:760px){
  .topbar-context>.engagement-picker{
    display:flex!important;
    width:min(42vw,168px)!important;
    max-width:168px!important;
    min-width:118px!important;
    flex:0 1 168px!important;
    margin-left:0!important;
  }
  .engagement-picker-button{
    min-height:38px!important;
    grid-template-columns:25px minmax(0,1fr) 12px!important;
    gap:6px!important;
    padding:4px 7px!important;
  }
  .engagement-picker-icon{
    width:25px!important;
    height:25px!important;
    border-radius:8px!important;
  }
  .engagement-picker-icon svg{width:12px!important;height:12px!important}
  .engagement-picker-text small{display:none!important}
  .engagement-picker-text strong{font-size:9.5px!important}
  .engagement-picker-caret svg{width:11px!important;height:11px!important}
  .engagement-picker-menu{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:calc(var(--topbar-height) + 6px)!important;
    width:auto!important;
    max-height:min(58dvh,420px)!important;
    overflow:auto!important;
    border-radius:13px!important;
    padding:6px!important;
  }
  .engagement-picker-option{min-height:52px!important}
}
@media(max-width:420px){
  .topbar-context>.engagement-picker{
    width:min(39vw,146px)!important;
    max-width:146px!important;
    min-width:110px!important;
    flex-basis:146px!important;
  }
  .engagement-picker-button{
    grid-template-columns:23px minmax(0,1fr) 11px!important;
    gap:5px!important;
    padding-inline:6px!important;
  }
  .engagement-picker-icon{width:23px!important;height:23px!important}
  .engagement-picker-text strong{font-size:9px!important}
}
@media(max-width:360px){
  .topbar-context>.engagement-picker{
    width:124px!important;
    min-width:104px!important;
    max-width:124px!important;
    flex-basis:124px!important;
  }
}

/* v11: one visual-viewport coordinate system for mobile editors. */
@media(max-width:760px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=button]):not([type=submit]),textarea,[contenteditable="true"]{font-size:16px!important}
  body.mobile-keyboard-open .mobile-nav{display:none!important}
  body.mobile-keyboard-open .app-modal,
  body.mobile-keyboard-open .app-modal.modal-wide,
  body.mobile-keyboard-open .app-modal.modal-task-assign,
  body.mobile-keyboard-open .app-modal.modal-diwali-claim{
    top:calc(var(--app-vv-top,0px) + 8px)!important;bottom:auto!important;
    left:0!important;transform:none!important;width:100%!important;
    height:auto!important;max-height:calc(var(--app-vvh,100dvh) - 16px)!important;
    border-radius:14px;scroll-behavior:auto;overflow-y:auto;
  }
  body.mobile-keyboard-open .detail-drawer{top:var(--app-vv-top,0px);bottom:auto;height:var(--app-vvh,100dvh);max-height:var(--app-vvh,100dvh)}
  body.mobile-keyboard-open .modal-body{max-height:none!important}
  body.mobile-keyboard-open .modal-actions{position:static!important}
  body.mobile-keyboard-open .chat-dm-mode.chat-dm-mobile-chat,
  body.mobile-keyboard-open .chat-channel-mode.chat-channel-mobile-chat{top:var(--app-vv-top,0px)!important}
  body.mobile-keyboard-open .view-container{scroll-behavior:auto;overflow-anchor:none}
  .login-screen,.login-form-panel{min-height:100svh}
}

/* V14 targeted fix — Task Assignment modal must have one reliable scroll surface. */
.app-modal.modal-task-assign{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  max-height:min(88dvh,860px)!important;
}
.app-modal.modal-task-assign>header{
  flex:0 0 auto!important;
}
.app-modal.modal-task-assign .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  touch-action:pan-y;
}
.app-modal.modal-task-assign .task-assign-form{
  min-height:100%;
}
.app-modal.modal-task-assign .modal-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:6!important;
  margin-bottom:0!important;
  background:rgba(255,255,255,.98)!important;
  backdrop-filter:blur(10px);
}
@media(max-width:760px){
  .app-modal.modal-task-assign{
    height:min(94dvh,var(--app-vvh,94dvh))!important;
    max-height:min(94dvh,var(--app-vvh,94dvh))!important;
    overflow:hidden!important;
  }
  .app-modal.modal-task-assign .modal-body{
    flex:1 1 0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    padding-bottom:0!important;
  }
  .app-modal.modal-task-assign .modal-actions{
    bottom:0!important;
    padding:10px 14px calc(12px + env(safe-area-inset-bottom))!important;
  }
}
@media(max-width:760px){
  body.mobile-keyboard-open .app-modal.modal-task-assign{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  body.mobile-keyboard-open .app-modal.modal-task-assign .modal-body{
    flex:1 1 0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
  }
  body.mobile-keyboard-open .app-modal.modal-task-assign .modal-actions{
    position:sticky!important;
    bottom:0!important;
  }
}

/* V15 engagement menu — contained scroll, premium hierarchy, no background scroll */
html.engagement-menu-open,
body.engagement-menu-open{
  overscroll-behavior:none!important;
}
body.engagement-menu-open{
  overflow:hidden!important;
}

.engagement-picker-menu{
  width:min(410px,calc(100vw - 28px))!important;
  max-height:min(72dvh,590px,calc(100dvh - var(--topbar-height) - 18px))!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #d9e3f0!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.995)!important;
  box-shadow:0 26px 62px rgba(20,45,82,.20),0 5px 16px rgba(20,45,82,.08)!important;
  backdrop-filter:blur(20px) saturate(150%)!important;
}
.engagement-menu-head{
  min-height:64px;
  padding:13px 14px 12px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid #e8edf4;
  background:linear-gradient(180deg,#fbfdff 0%,#f7faff 100%);
}
.engagement-menu-head>div{display:grid;gap:2px;min-width:0}
.engagement-menu-head span:first-child{
  color:#1b2d49;
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.01em;
}
.engagement-menu-head small{
  margin:0!important;
  color:#7d8ba0;
  font-size:8.5px!important;
  line-height:1.3;
  font-weight:650;
}
.engagement-menu-badge{
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid #d7e3f2;
  border-radius:999px;
  background:#eef5ff;
  color:#3f5f88!important;
  font-size:7px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase;
}
.engagement-picker-list{
  max-height:min(calc(72dvh - 65px),525px,calc(100dvh - var(--topbar-height) - 83px));
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
  scrollbar-gutter:stable;
  padding:7px;
}
.engagement-picker-list::-webkit-scrollbar{width:7px}
.engagement-picker-list::-webkit-scrollbar-track{background:transparent}
.engagement-picker-list::-webkit-scrollbar-thumb{background:#cfd9e7;border:2px solid transparent;background-clip:padding-box;border-radius:999px}
.engagement-picker-list::-webkit-scrollbar-thumb:hover{background:#b9c8dc;border:2px solid transparent;background-clip:padding-box}

.engagement-picker-option{
  min-height:54px!important;
  grid-template-columns:34px minmax(0,1fr) 24px!important;
  gap:10px!important;
  padding:8px 10px!important;
  margin:1px 0;
  border:1px solid transparent!important;
  border-radius:11px!important;
  background:#fff!important;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .12s ease!important;
}
.engagement-picker-option:hover,
.engagement-picker-option:focus-visible{
  background:#f7faff!important;
  border-color:#e1e9f4!important;
  box-shadow:0 4px 12px rgba(34,67,110,.055)!important;
}
.engagement-picker-option.is-selected{
  background:linear-gradient(135deg,#eef5ff 0%,#f8faff 100%)!important;
  border-color:#cfdff3!important;
  box-shadow:0 5px 14px rgba(32,75,132,.08)!important;
}
.engagement-picker-option.is-selected:before{
  top:9px!important;
  bottom:9px!important;
  width:3px!important;
  background:linear-gradient(180deg,#1768c4,#6754df)!important;
}
.engagement-option-mark{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,#eef3fa,#e5edf8)!important;
  color:#4e6480!important;
  font-size:10px!important;
  box-shadow:inset 0 0 0 1px rgba(69,95,128,.04);
}
.engagement-picker-option.is-selected .engagement-option-mark{
  background:linear-gradient(135deg,#1767c1,#6651e2)!important;
  color:#fff!important;
  box-shadow:0 5px 12px rgba(56,83,184,.22)!important;
}
.engagement-option-copy{gap:3px!important}
.engagement-option-copy small{
  width:max-content;
  max-width:100%;
  padding:2px 5px;
  border-radius:5px;
  background:#f0f4f9;
  color:#718198!important;
  font-size:7.3px!important;
  line-height:1.25!important;
  letter-spacing:.055em!important;
  font-weight:800!important;
}
.engagement-picker-option.is-selected .engagement-option-copy small{
  background:#ddeafb;
  color:#42658f!important;
}
.engagement-option-copy strong{
  color:#2b3c55!important;
  font-size:11.5px!important;
  line-height:1.3!important;
  font-weight:700!important;
}
.engagement-option-check{
  width:22px!important;
  height:22px!important;
  border-radius:50%;
  background:transparent;
}
.engagement-picker-option.is-selected .engagement-option-check{
  color:#fff!important;
  background:#2868b8;
}
.engagement-option-check svg{width:12px!important;height:12px!important}

@media(max-width:760px){
  .engagement-picker-menu{
    left:8px!important;
    right:8px!important;
    top:calc(var(--topbar-height) + 6px)!important;
    width:auto!important;
    max-height:min(68dvh,520px,calc(100dvh - var(--topbar-height) - 16px))!important;
    border-radius:15px!important;
  }
  .engagement-menu-head{min-height:58px;padding:11px 12px 10px 13px}
  .engagement-menu-head span:first-child{font-size:11.5px}
  .engagement-menu-head small{font-size:8px!important}
  .engagement-menu-badge{font-size:6.5px!important;padding:4px 7px}
  .engagement-picker-list{
    max-height:min(calc(68dvh - 59px),461px,calc(100dvh - var(--topbar-height) - 75px))!important;
    padding:6px;
  }
  .engagement-picker-option{
    min-height:52px!important;
    grid-template-columns:32px minmax(0,1fr) 22px!important;
    gap:9px!important;
    padding:7px 9px!important;
  }
  .engagement-option-mark{width:32px!important;height:32px!important}
  .engagement-option-copy strong{font-size:11px!important}
}

/* V16 Mail — cross-engagement recipient UX, history-only suggestions */
.app-modal.modal-mail .recipient-picker{position:relative;overflow:visible!important}
.app-modal.modal-mail .recipient-input{min-width:150px;width:auto!important;outline:none!important}
.mail-recipient-suggestions{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 5px);max-height:228px;overflow-y:auto;overscroll-behavior:contain;background:#fff;border:1px solid #dfe6f0;border-radius:12px;padding:5px;box-shadow:0 14px 34px rgba(19,45,83,.16);scrollbar-width:thin;scrollbar-color:#c7d2e2 transparent}
.mail-recipient-suggestions.hidden{display:none!important}
.mail-recipient-suggestions::-webkit-scrollbar{width:6px}.mail-recipient-suggestions::-webkit-scrollbar-track{background:transparent}.mail-recipient-suggestions::-webkit-scrollbar-thumb{background:#c7d2e2;border-radius:99px}
.mail-recipient-suggestion{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;border:0;background:transparent;text-align:left;padding:8px;border-radius:9px;cursor:pointer;color:#173052}
.mail-recipient-suggestion:hover,.mail-recipient-suggestion:focus-visible{background:#f1f6fd;outline:none}
.mail-recipient-suggestion-avatar{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(145deg,#e7f0fd,#dbe8fb);color:#0756a5;font-size:11px;font-weight:850}
.mail-recipient-suggestion>span:last-child{display:grid;gap:2px;min-width:0}.mail-recipient-suggestion strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mail-recipient-suggestion small{font-size:9px;color:#7b8799}
.mail-recent-contacts{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 0 8px!important;border-bottom:1px solid #edf0f4}
.mail-recent-contacts>span{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#75839a;margin-right:2px}
.mail-recent-contacts .mail-quick-contact{max-width:180px;min-height:30px;padding:5px 9px;border-radius:9px;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#f6f9fd;border-color:#dfe7f2;color:#164b84}
.mail-recent-contacts .mail-quick-contact:hover{background:#edf5ff;border-color:#c9dcf4}
.app-modal.modal-mail .modal-body{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c5cfdd transparent}
.app-modal.modal-mail .modal-body::-webkit-scrollbar{width:6px}.app-modal.modal-mail .modal-body::-webkit-scrollbar-track{background:transparent}.app-modal.modal-mail .modal-body::-webkit-scrollbar-thumb{background:#c5cfdd;border-radius:99px}
.app-modal.modal-mail input[name="subject"]{display:block;width:100%;min-width:0;box-sizing:border-box;padding-right:4px!important;overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){
  .mail-recipient-suggestions{position:absolute;left:0;right:0;top:calc(100% + 5px);max-height:min(240px,34dvh);border-radius:14px;z-index:560}
  .mail-recent-contacts{display:none}
  .app-modal.modal-mail .recipient-input{min-width:120px;font-size:16px!important}
}
