/* TidyOne V11.9 - shared workspace navigation */
:root{--mn-nav-blue:#2563EB;--mn-nav-blue-light:#EFF6FF;--mn-nav-purple:#7C3AED;--mn-nav-purple-light:#F3E8FF;--mn-nav-navy:#0F172A;--mn-nav-muted:#64748B;--mn-nav-border:#E2E8F0;--mn-nav-surface:#fff}
#mn-desktop-nav{position:fixed;inset:0 auto 0 0;width:260px;background:var(--mn-nav-surface);border-right:1px solid var(--mn-nav-border);z-index:1200;display:flex;flex-direction:column;padding:22px 0 16px;overflow-y:auto;font-family:Inter,system-ui,sans-serif}
#mn-desktop-nav *{box-sizing:border-box}
.mnx-logo{padding:0 22px;margin-bottom:18px;display:flex;align-items:center;gap:10px;font-size:24px;font-weight:800;color:var(--mn-nav-navy);text-decoration:none;letter-spacing:-.5px}.mnx-logo img{width:34px;height:34px;border-radius:10px;display:block;box-shadow:0 5px 14px rgba(15,23,42,.14)}.mnx-logo .mnx-wordmark{color:var(--mn-nav-navy)}.mnx-logo .mnx-wordmark strong{color:var(--mn-nav-blue);font-weight:800}
.mnx-switch{display:flex;background:#F1F5F9;border-radius:12px;padding:5px;gap:4px;margin:0 16px 14px}.mnx-switch .ws-btn{flex:1;border:0;background:transparent;padding:9px 5px;border-radius:8px;font:700 11px Inter;color:var(--mn-nav-muted);cursor:pointer;white-space:nowrap}.mnx-switch .ws-btn.active-personal{background:#fff;color:var(--mn-nav-blue);box-shadow:0 2px 8px rgba(0,0,0,.08)}.mnx-switch .ws-btn.active-ong{background:linear-gradient(135deg,var(--mn-nav-purple),#5B21B6);color:#fff;box-shadow:0 3px 10px rgba(124,58,237,.22)}
.mnx-add{margin:0 12px 9px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--mn-nav-blue),#1D4ED8);color:#fff;padding:12px 14px;display:flex;align-items:center;gap:11px;font:800 14px Inter;cursor:pointer;box-shadow:0 6px 16px rgba(37,99,235,.2);text-align:left}.mnx-add:hover{transform:translateY(-1px)}.mnx-add-plus{width:25px;height:25px;border-radius:8px;background:rgba(255,255,255,.18);display:grid;place-items:center;font-size:20px;line-height:1}
.mnx-navlink{margin:2px 12px;padding:11px 13px;border-radius:10px;color:var(--mn-nav-muted);text-decoration:none;display:flex;align-items:center;gap:12px;font:600 13px Inter}.mnx-navlink svg{width:19px;height:19px;flex:0 0 auto}.mnx-navlink:hover{background:#F8FAFC;color:var(--mn-nav-navy)}.mnx-navlink.active{background:var(--mn-nav-blue-light);color:var(--mn-nav-blue);font-weight:800}.mn-association #mn-desktop-nav .mnx-navlink.active{background:var(--mn-nav-purple-light);color:var(--mn-nav-purple)}
.mnx-pro-link{margin-top:8px!important;border:1px solid #DDD6FE!important;background:linear-gradient(135deg,#FAF5FF,#EFF6FF)!important;color:#6D28D9!important;font-weight:800!important}.mnx-pro-link:hover{border-color:#A78BFA!important;box-shadow:0 5px 14px rgba(124,58,237,.12)}.mnx-pro-link b{margin-left:auto;background:#7C3AED;color:#fff;border-radius:999px;padding:3px 6px;font:800 8px Inter;letter-spacing:.04em}
.mnx-section{padding:10px 24px 4px;color:#94A3B8;font:800 9px Inter;text-transform:uppercase;letter-spacing:.09em}.mnx-spacer{flex:1;min-height:12px}
.mnx-profile{margin:10px 12px 0;padding-top:12px;border-top:1px solid var(--mn-nav-border);position:relative}.mnx-profile-btn{width:100%;border:0;background:transparent;border-radius:10px;padding:9px 10px;display:flex;align-items:center;gap:10px;font:700 12px Inter;color:var(--mn-nav-navy);cursor:pointer;text-align:left}.mnx-profile-btn:hover{background:#F8FAFC}.mnx-profile-btn img{width:30px;height:30px;border-radius:50%;object-fit:cover}.mnx-profile-menu{display:none;position:absolute;left:0;right:0;bottom:52px;background:#fff;border:1px solid var(--mn-nav-border);border-radius:12px;padding:6px;box-shadow:0 12px 28px rgba(15,23,42,.15)}.mnx-profile-menu.open{display:block}.mnx-profile-menu a,.mnx-profile-menu button{width:100%;border:0;background:transparent;text-decoration:none;color:var(--mn-nav-navy);padding:10px;border-radius:8px;font:600 12px Inter;display:flex;gap:8px;cursor:pointer;text-align:left}.mnx-profile-menu a:hover,.mnx-profile-menu button:hover{background:#F8FAFC}.mnx-profile-menu button{color:#DC2626}
#mn-mobile-nav{display:none}
#mn-mobile-workspace-switch{display:none}
#mnx-add-overlay{position:fixed;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(4px);z-index:2400;display:none;align-items:flex-end;justify-content:center;padding:12px;font-family:Inter,system-ui,sans-serif}#mnx-add-overlay.open{display:flex}.mnx-sheet{background:#fff;width:min(620px,100%);border-radius:22px 22px 15px 15px;padding:19px;box-shadow:0 18px 45px rgba(15,23,42,.23)}.mnx-sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.mnx-sheet-head h3{margin:0;color:var(--mn-nav-navy);font-size:20px}.mnx-sheet-close{width:34px;height:34px;border:0;border-radius:50%;background:#F1F5F9;font-size:22px;cursor:pointer}.mnx-sheet p{margin:5px 0 15px;color:var(--mn-nav-muted);font-size:12px}.mnx-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mnx-action{border:1px solid var(--mn-nav-border);background:#fff;border-radius:13px;padding:13px;display:flex;align-items:center;gap:11px;text-align:left;cursor:pointer;color:var(--mn-nav-navy);font-family:Inter}.mnx-action:hover{background:#F8FAFC;border-color:#BFDBFE}.mnx-action-ico{width:39px;height:39px;border-radius:11px;background:var(--mn-nav-blue-light);display:grid;place-items:center;font-size:19px;flex:0 0 auto}.mn-association .mnx-action-ico{background:var(--mn-nav-purple-light)}.mnx-action strong{display:block;font-size:13px}.mnx-action small{display:block;color:var(--mn-nav-muted);font-size:10px;margin-top:2px}

/* V11.3 workspace visibility contract.
   Anything explicitly marked Association-only must never leak into Personal. */
.nav-association-only{display:none!important}
.mn-association .nav-association-only{display:block!important}
.mn-association .nav-personal-only{display:none!important}

/* V10.1 layout fix: the shared fixed navigation must not disable page scrolling
   or make the content 100vw + the 260px sidebar. */
html{max-width:100%;overflow-x:hidden}
.main-content,.main-content *{box-sizing:border-box}
.main-content{min-width:0}
.main-content>*,.cards-grid,.bottom-grid,.docs-grid{min-width:0;max-width:100%}

@media(min-width:769px){
  body{
    padding-left:260px!important;
    display:block!important;
    width:100%!important;
    max-width:100vw!important;
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    box-sizing:border-box!important;
  }
  .main-content{
    margin-left:0!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:100vh!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  #mn-mobile-nav{display:none!important}
  #mn-mobile-workspace-switch{display:none!important}
}

/* Keep laptop-sized screens comfortable instead of forcing wide card grids. */
@media(min-width:769px) and (max-width:1180px){
  .main-content{padding-left:28px!important;padding-right:28px!important}
  .cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .bottom-grid{grid-template-columns:1fr!important}
  .actions-panel,.top-action-bar,.header{flex-wrap:wrap!important;gap:16px!important}
  .docs-grid{grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))!important}
}

@media(max-width:768px){
  body{
    padding-left:0!important;
    padding-bottom:84px!important;
    display:block!important;
    width:100%!important;
    max-width:100vw!important;
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    box-sizing:border-box!important;
  }
  .main-content{
    margin-left:0!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:100vh!important;
    overflow:visible!important;
    box-sizing:border-box!important;
    padding-bottom:112px!important;
  }
  #mn-desktop-nav{display:none!important}
  #mn-mobile-workspace-switch{display:flex!important;position:sticky;top:8px;z-index:2150;margin:8px 12px 4px;padding:5px;gap:4px;background:rgba(241,245,249,.96);backdrop-filter:blur(10px);border:1px solid var(--mn-nav-border);border-radius:13px;box-shadow:0 5px 18px rgba(15,23,42,.08);font-family:Inter,system-ui,sans-serif}
  #mn-mobile-workspace-switch .ws-btn{flex:1;border:0;background:transparent;padding:9px 8px;border-radius:9px;font:800 11px Inter;color:var(--mn-nav-muted);cursor:pointer;white-space:nowrap}
  #mn-mobile-workspace-switch .ws-btn.active-personal{background:#fff;color:var(--mn-nav-blue);box-shadow:0 2px 8px rgba(15,23,42,.08)}
  #mn-mobile-workspace-switch .ws-btn.active-ong{background:linear-gradient(135deg,var(--mn-nav-purple),#5B21B6);color:#fff;box-shadow:0 3px 10px rgba(124,58,237,.22)}
  #mn-mobile-nav{position:fixed;left:0;right:0;bottom:0;height:72px;padding:5px 8px max(5px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--mn-nav-border);box-shadow:0 -4px 18px rgba(15,23,42,.08);z-index:2200;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;align-items:end;font-family:Inter,system-ui,sans-serif}
  .mnx-mobile-link{height:58px;text-decoration:none;color:var(--mn-nav-muted);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;font:700 9px Inter;border-radius:11px;min-width:0}
  .mnx-mobile-link svg{width:21px;height:21px}
  .mnx-mobile-link.active{color:var(--mn-nav-blue);background:var(--mn-nav-blue-light)}
  .mn-association .mnx-mobile-link.active{color:var(--mn-nav-purple);background:var(--mn-nav-purple-light)}
  .mnx-mobile-add-wrap{height:62px;display:flex;align-items:flex-start;justify-content:center}
  .mnx-mobile-add{width:58px;height:58px;border-radius:50%;border:5px solid #fff;background:linear-gradient(135deg,var(--mn-nav-blue),#1D4ED8);color:#fff;font-size:31px;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 20px rgba(37,99,235,.32);transform:translateY(-17px)}
  .mn-association .mnx-mobile-add{background:linear-gradient(135deg,var(--mn-nav-purple),#5B21B6);box-shadow:0 8px 20px rgba(124,58,237,.3)}
  .mnx-actions{grid-template-columns:1fr}
  .mnx-sheet{padding:17px}
}


/* ===== V10.9 hard layout guard =====
   Prevent legacy page CSS / wide content from escaping the viewport. */
html,body{max-width:100%!important;overflow-x:hidden!important}
.main-content{min-width:0!important;max-width:100%!important;overflow-x:hidden!important}
.main-content>*{min-width:0!important;max-width:100%!important}
.main-content img,.main-content video,.main-content canvas{max-width:100%!important;height:auto}
.main-content table{max-width:100%!important}
.cards-grid,.bottom-grid,.docs-grid,.price-compare-grid,.upgrade-grid,.actions-panel,.actions-btns,.top-action-bar,.header,.page-head,.v8-grid,.v8-form-row{min-width:0!important;max-width:100%!important}
.actions-btns,.top-action-bar,.header,.page-head{flex-wrap:wrap!important}
@media(min-width:769px){
  body{padding-left:260px!important;margin:0!important;width:100%!important;max-width:100vw!important;display:block!important;overflow-x:hidden!important;overflow-y:auto!important}
  .main-content{margin-left:0!important;width:100%!important;max-width:100%!important;min-height:100vh!important;height:auto!important;overflow-x:hidden!important;overflow-y:visible!important}
}
@media(max-width:768px){
  body{padding-left:0!important;width:100%!important;max-width:100vw!important;overflow-x:hidden!important}
  .main-content{margin-left:0!important;width:100%!important;max-width:100%!important;overflow-x:hidden!important}
}

/* V11.1 active association identity / multi-association selector */
.mnx-org-context{margin:-5px 16px 11px;min-width:0}.mnx-org-name{display:block;padding:7px 9px;border:1px solid #E9D5FF;background:#FAF5FF;color:#6D28D9;border-radius:9px;font:700 11px Inter;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mnx-org-label{display:block;color:#94A3B8;font:700 9px Inter;text-transform:uppercase;letter-spacing:.05em;margin:0 0 4px 2px}.mnx-org-select{width:100%;min-width:0;border:1px solid #DDD6FE;background:#fff;color:#5B21B6;border-radius:9px;padding:7px 8px;font:700 11px Inter;outline:none}.mnx-org-select:focus{border-color:#A78BFA;box-shadow:0 0 0 3px #F3E8FF}

/* V11.9 — persistent TidyOne page brand + Association share */
#mnx-page-brand{position:sticky;top:0;z-index:1180;height:58px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--mn-nav-border);display:flex;align-items:center;gap:12px;padding:0 24px;font-family:Inter,system-ui,sans-serif;box-sizing:border-box}
.mnx-page-brand-home{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--mn-nav-navy);font:800 18px Inter;letter-spacing:-.35px;min-width:max-content}.mnx-page-brand-home img{width:31px;height:31px;object-fit:contain;border-radius:9px}.mnx-page-brand-home strong{color:#38A7F5;font-weight:800}.mnx-page-brand-context{display:flex;align-items:center;gap:8px;min-width:0}.mnx-page-workspace{font:800 10px Inter;color:var(--mn-nav-muted);background:#F1F5F9;padding:5px 8px;border-radius:999px;text-transform:uppercase;letter-spacing:.04em}.mn-association .mnx-page-workspace{background:var(--mn-nav-purple-light);color:var(--mn-nav-purple)}.mnx-page-org-name{font:700 12px Inter;color:var(--mn-nav-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}.mnx-global-share{margin-left:auto;border:0;border-radius:10px;background:linear-gradient(135deg,#38A7F5,#2563EB);color:#fff;display:flex;align-items:center;gap:7px;padding:9px 12px;font:800 12px Inter;cursor:pointer;box-shadow:0 5px 14px rgba(37,99,235,.18)}.mnx-global-share svg{width:17px;height:17px}.mnx-global-share:hover{transform:translateY(-1px)}
.mnx-share-overlay{position:fixed;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(5px);z-index:2600;display:none;align-items:flex-end;justify-content:center;padding:12px;font-family:Inter,system-ui,sans-serif}.mnx-share-overlay.open{display:flex}.mnx-share-sheet{background:#fff;width:min(520px,100%);border-radius:22px 22px 15px 15px;padding:19px;box-shadow:0 18px 45px rgba(15,23,42,.23)}.mnx-share-sheet p{margin:7px 0 16px;color:var(--mn-nav-muted);font-size:12px}.mnx-share-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.mnx-share-actions button{border:1px solid var(--mn-nav-border);background:#fff;border-radius:14px;padding:14px 8px;display:flex;flex-direction:column;align-items:center;gap:7px;font:800 12px Inter;color:var(--mn-nav-navy);cursor:pointer}.mnx-share-actions button:hover{background:#F8FAFC;border-color:#BFDBFE}.mnx-share-actions button:first-child{font-size:20px}.mnx-share-actions button span{font-size:11px}
@media(max-width:768px){
 #mnx-page-brand{height:54px;padding:0 13px;gap:8px}.mnx-page-brand-home{font-size:16px}.mnx-page-brand-home img{width:29px;height:29px}.mnx-page-brand-context{flex:1;justify-content:flex-start;min-width:0}.mnx-page-workspace{font-size:9px;padding:4px 7px}.mnx-page-org-name{display:none}.mnx-global-share{padding:8px 10px}.mnx-global-share span{display:none}
 #mn-mobile-workspace-switch{top:58px!important}
 .mnx-share-actions{grid-template-columns:repeat(3,1fr)}
}
/* V12.0 — AI document notification badge */
.mnx-navlink{position:relative}.mnx-doc-ai-badge{margin-left:auto;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;display:inline-grid;place-items:center;font-size:9px;line-height:1;font-weight:900}.mnx-ai-doc-notice{position:fixed;right:18px;bottom:18px;z-index:4500;display:flex;align-items:center;gap:10px;max-width:330px;border:1px solid #c4b5fd;background:rgba(255,255,255,.97);box-shadow:0 16px 40px rgba(15,23,42,.22);border-radius:15px;padding:11px 13px;text-align:left;color:#0f172a;cursor:pointer;font-family:Inter,sans-serif}.mnx-ai-doc-notice>span:first-child{font-size:22px}.mnx-ai-doc-notice strong{display:block;font-size:11px}.mnx-ai-doc-notice small{display:block;color:#64748b;font-size:9px;margin-top:2px}.mnx-ai-doc-notice>b{margin-left:auto;font-size:18px;color:#7c3aed}@media(max-width:760px){.mnx-ai-doc-notice{left:12px;right:12px;bottom:82px;max-width:none}}

/* V12.1 premium icon treatment */
.mnx-switch .ws-btn,.mnx-mobile-workspace-switch .ws-btn{display:flex;align-items:center;justify-content:center;gap:6px}
.mnx-switch .ws-btn svg,.mnx-mobile-workspace-switch .ws-btn svg{width:15px;height:15px;flex:0 0 auto}
.mnx-profile-menu a,.mnx-profile-menu button{display:flex!important;align-items:center!important;gap:8px!important}
.mnx-profile-menu svg{width:15px!important;height:15px!important;flex:0 0 auto}
.mnx-action-ico{display:grid!important;place-items:center!important}.mnx-action-ico svg{width:20px!important;height:20px!important}
.mnx-ai-doc-notice>span:first-child svg{width:18px;height:18px}

/* V12.2 — premium share icons */
.mnx-share-actions button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mnx-share-actions button{font-size:13px}.mnx-share-actions button span{font-size:12px}
/* V12.11 quick contact */
.mnx-quick-overlay{position:fixed;inset:0;z-index:2600;background:rgba(15,23,42,.58);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:16px;font-family:Inter,system-ui,sans-serif}.mnx-quick-card{width:min(500px,100%);background:#fff;border-radius:20px;padding:20px;box-shadow:0 20px 60px rgba(15,23,42,.25)}.mnx-quick-card .mnx-sheet-head{align-items:flex-start;margin-bottom:14px}.mnx-quick-card .mnx-sheet-head p{margin:4px 0 0;color:#64748B;font-size:12px}.mnx-quick-card label{display:flex;flex-direction:column;gap:6px;font:800 12px Inter;color:#0F172A;margin-top:11px}.mnx-quick-input{width:100%;border:1px solid #CBD5E1;border-radius:10px;padding:11px 12px;font:500 14px Inter;background:#fff;color:#0F172A}.mnx-quick-input:focus{outline:none;border-color:#8B5CF6;box-shadow:0 0 0 3px #F3E8FF}.mnx-quick-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.mnx-quick-actions button{border-radius:10px;padding:10px 13px;font:800 13px Inter;cursor:pointer}.mnx-qc-cancel{background:#fff;border:1px solid #E2E8F0;color:#0F172A}.mnx-qc-save{border:0;background:#7C3AED;color:#fff}.mnx-qc-save:disabled{opacity:.6;cursor:not-allowed}@media(max-width:520px){.mnx-quick-actions{display:grid;grid-template-columns:1fr 1fr}.mnx-quick-actions button{width:100%}}


/* V12.13 — workspace preboot + centered, viewport-safe overlays */
html.tidyone-app-booting body{opacity:0!important}
body{transition:opacity .12s ease}
@media (prefers-reduced-motion:reduce){body{transition:none!important}}

/* Center dialogs in the usable work area (to the right of the desktop sidebar). */
@media(min-width:769px){
  body > .modal-overlay,
  body > .modal,
  body > .doc-share-modal,
  body > .gallery-modal,
  #mnx-add-overlay,
  .mnx-share-overlay,
  .mnx-quick-overlay{
    padding-left:276px!important;
    padding-right:16px!important;
    box-sizing:border-box!important;
  }
}
@media(max-width:768px){
  body > .modal-overlay,
  body > .modal,
  body > .doc-share-modal,
  body > .gallery-modal,
  #mnx-add-overlay,
  .mnx-share-overlay,
  .mnx-quick-overlay{
    padding-left:14px!important;
    padding-right:14px!important;
    box-sizing:border-box!important;
  }
}
body > .modal-overlay > .modal-box,
body > .modal-overlay > .modal,
body > .modal > .modal-card,
.mnx-quick-card,
.mnx-sheet,
.mnx-share-sheet{
  max-height:calc(100dvh - 32px)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  max-width:calc(100vw - 32px);
}
@media(min-width:769px){
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet{max-width:calc(100vw - 292px)}
}

/* V13.0 — mobile-safe forms + correctly centered quick dialogs */
@media(min-width:769px){
  .mnx-quick-overlay{left:260px!important;padding-left:16px!important}
}
@media(max-width:760px){
  /* Do not cover form submit buttons with the global "AI document pending" notice. */
  .mnx-ai-doc-notice{top:64px!important;bottom:auto!important;left:10px!important;right:10px!important;max-width:none!important;padding:9px 11px!important}
  body:has(.modal-overlay[style*="display: flex"]) .mnx-ai-doc-notice,
  body:has(.modal.open) .mnx-ai-doc-notice,
  body:has(.mnx-quick-overlay.open) .mnx-ai-doc-notice{display:none!important}
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .mnx-quick-card,.mnx-sheet,.mnx-share-sheet{
    max-height:calc(100dvh - 104px)!important;
    padding-bottom:calc(22px + env(safe-area-inset-bottom))!important;
  }
  .modal-actions,.ai-review-actions,.mnx-quick-actions{
    position:sticky;bottom:0;background:#fff;padding-top:10px;padding-bottom:calc(8px + env(safe-area-inset-bottom));z-index:4
  }
}


/* V13.1 — modal priority on mobile.
   Workspace switch + bottom navigation must never float above a form/review dialog. */
@media(max-width:768px){
  body:has(#modal-ai-review[style*="display: flex"]) #mn-mobile-workspace-switch,
  body:has(#modal-ai-review[style*="display: flex"]) #mn-mobile-nav,
  body:has(.modal.open) #mn-mobile-workspace-switch,
  body:has(.modal.open) #mn-mobile-nav,
  body:has(.modal-overlay[style*="display: flex"]) #mn-mobile-workspace-switch,
  body:has(.modal-overlay[style*="display: flex"]) #mn-mobile-nav,
  body:has(.gallery-modal.open) #mn-mobile-workspace-switch,
  body:has(.gallery-modal.open) #mn-mobile-nav{
    visibility:hidden!important;
    pointer-events:none!important;
  }
}

/* V13.1 — floating AI reminder must not cover form actions. */
@media(max-width:768px){
  body:has(#modal-ai-review[style*="display: flex"]) .mnx-ai-doc-notice,
  body:has(.modal.open) .mnx-ai-doc-notice,
  body:has(.modal-overlay[style*="display: flex"]) .mnx-ai-doc-notice,
  body:has(.gallery-modal.open) .mnx-ai-doc-notice{
    display:none!important;
  }
}


/* V13.2 — fixed desktop profile + elegant in-frame popup scrollbars */
@media(min-width:769px){
  #mn-desktop-nav{padding-bottom:0!important;}
  .mnx-profile{
    position:sticky!important;
    bottom:0;
    z-index:8;
    margin:10px 0 0!important;
    padding:12px 12px 16px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.94),#fff 24%);
    border-top:1px solid var(--mn-nav-border);
    box-shadow:0 -10px 22px rgba(15,23,42,.045);
  }
  .mnx-profile-menu{left:12px!important;right:12px!important;bottom:68px!important;}
}

:is(
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .v12-modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet,
  .doc-share-card,
  .doc-share-sheet,
  .gallery-side,
  .gallery-stage,
  .v12-crop-stage,
  .v12-email-value.body
){
  scrollbar-width:thin;
  scrollbar-color:rgba(100,116,139,.55) transparent;
  scrollbar-gutter:stable;
}
:is(
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .v12-modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet,
  .doc-share-card,
  .doc-share-sheet,
  .gallery-side,
  .gallery-stage,
  .v12-crop-stage,
  .v12-email-value.body
)::-webkit-scrollbar{width:9px;height:9px}
:is(
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .v12-modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet,
  .doc-share-card,
  .doc-share-sheet,
  .gallery-side,
  .gallery-stage,
  .v12-crop-stage,
  .v12-email-value.body
)::-webkit-scrollbar-track{
  background:transparent;
  margin-block:12px;
}
:is(
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .v12-modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet,
  .doc-share-card,
  .doc-share-sheet,
  .gallery-side,
  .gallery-stage,
  .v12-crop-stage,
  .v12-email-value.body
)::-webkit-scrollbar-thumb{
  background:rgba(100,116,139,.46);
  border:2px solid transparent;
  background-clip:padding-box;
  border-radius:999px;
}
:is(
  body > .modal-overlay > .modal-box,
  body > .modal-overlay > .modal,
  body > .modal > .modal-card,
  .v12-modal-card,
  .mnx-quick-card,
  .mnx-sheet,
  .mnx-share-sheet,
  .doc-share-card,
  .doc-share-sheet,
  .gallery-side,
  .gallery-stage,
  .v12-crop-stage,
  .v12-email-value.body
)::-webkit-scrollbar-thumb:hover{background:rgba(71,85,105,.68);background-clip:padding-box}

/* V13.4 — the compact page brand is mobile-only. Desktop already has the full sidebar brand. */
@media(min-width:769px){
  #mnx-page-brand{display:none!important}
}

/* V13.4.1 — quick scan/upload from the global Add button */
.mnx-quick-scan-overlay{position:fixed;inset:0;z-index:2750;background:rgba(15,23,42,.62);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:16px;font-family:Inter,system-ui,sans-serif}
.mnx-quick-scan-card{width:min(560px,100%);background:#fff;border:1px solid var(--mn-nav-border);border-radius:22px;padding:20px;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.mnx-quick-scan-card .mnx-sheet-head{align-items:flex-start}.mnx-quick-scan-card .mnx-sheet-head p{margin:5px 0 0;color:var(--mn-nav-muted);font-size:12px;line-height:1.5;max-width:430px}
.mnx-quick-scan-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}
.mnx-quick-scan-actions>button{min-width:0;border:1px solid var(--mn-nav-border);background:#fff;color:var(--mn-nav-navy);border-radius:15px;padding:15px;display:flex;align-items:center;gap:12px;text-align:left;font-family:Inter;cursor:pointer}
.mnx-quick-scan-actions>button:hover{background:#F8FAFC;border-color:#BFDBFE}.mnx-quick-scan-actions>button:disabled{opacity:.55;cursor:wait}
.mnx-quick-scan-actions strong{display:block;font-size:13px}.mnx-quick-scan-actions small{display:block;margin-top:3px;color:var(--mn-nav-muted);font-size:10px;line-height:1.4}
.mnx-quick-scan-status{display:none;margin-top:12px;padding:10px 12px;border-radius:11px;background:#EFF6FF;border:1px solid #BFDBFE;color:#1D4ED8;font:700 12px Inter}.mnx-quick-scan-status.show{display:block}.mnx-quick-scan-status.busy:before{content:'•';display:inline-block;margin-right:7px;animation:mnxPulse 1s ease-in-out infinite}@keyframes mnxPulse{50%{opacity:.25}}
@media(max-width:560px){.mnx-quick-scan-overlay{align-items:flex-end;padding:10px}.mnx-quick-scan-card{border-radius:22px 22px 15px 15px;padding:17px}.mnx-quick-scan-actions{grid-template-columns:1fr}.mnx-quick-scan-actions>button{min-height:72px}}

/* V13.5.37 — contextual Help Center link for Personal workspace */
.mnx-context-guide{margin-left:auto;display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #BFDBFE;border-radius:10px;background:#EFF6FF;color:#1D4ED8;text-decoration:none;font:800 11px Inter,system-ui,sans-serif;white-space:nowrap;box-shadow:0 3px 10px rgba(37,99,235,.08);transition:transform .16s ease,background .16s ease,border-color .16s ease}
.mnx-context-guide svg{width:15px;height:15px;flex:0 0 auto}.mnx-context-guide:hover{background:#DBEAFE;border-color:#93C5FD;transform:translateY(-1px)}
.mnx-context-guide-short{display:none}
html[data-theme="dark"] .mnx-context-guide{background:#102A46;color:#A9CEFF;border-color:#315E8B;box-shadow:none}
html[data-theme="dark"] .mnx-context-guide:hover{background:#173A60;color:#EAF4FF;border-color:#4F8DFF}
@media(max-width:900px){.mnx-context-guide-full{display:none}.mnx-context-guide-short{display:inline}}
@media(max-width:520px){.mnx-context-guide{padding:7px 8px;font-size:10px}.mnx-context-guide-short{display:inline}.mnx-context-guide svg{width:16px;height:16px}}


/* V13.5.37.2 — visible contextual guide card for Personal and both nonprofit modes */
.mnx-personal-guide-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:14px;margin:10px 0 24px;padding:14px 16px;border:1px solid #BFDBFE;border-radius:16px;background:linear-gradient(135deg,#EFF6FF 0%,#F8FBFF 62%,#EEF2FF 100%);color:#0F172A;text-decoration:none;box-shadow:0 7px 22px rgba(37,99,235,.08);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;font-family:Inter,system-ui,sans-serif}
.mnx-personal-guide-card:hover{transform:translateY(-1px);border-color:#60A5FA;box-shadow:0 10px 26px rgba(37,99,235,.13)}
.mnx-personal-guide-icon{width:46px;height:46px;border-radius:13px;background:#DBEAFE;color:#1D4ED8;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.mnx-personal-guide-icon svg{width:23px;height:23px}
.mnx-personal-guide-copy{display:flex;flex-direction:column;min-width:0;gap:3px}.mnx-personal-guide-copy small{font-size:9px;line-height:1.2;font-weight:900;letter-spacing:.08em;color:#2563EB}.mnx-personal-guide-copy strong{font-size:14px;line-height:1.3;color:#0F172A}.mnx-personal-guide-copy>span{font-size:12px;line-height:1.45;color:#475569}
.mnx-personal-guide-cta{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;padding:9px 11px;border-radius:10px;background:#2563EB;color:#fff;font-size:11px;font-weight:900}.mnx-personal-guide-cta b{font-size:16px;line-height:1}
html[data-theme="dark"] .mnx-personal-guide-card{background:linear-gradient(135deg,#0E223A 0%,#102A46 60%,#172554 100%);border-color:#315E8B;color:#EAF4FF;box-shadow:none}
html[data-theme="dark"] .mnx-personal-guide-card:hover{border-color:#4F8DFF;background:linear-gradient(135deg,#102A46 0%,#173A60 60%,#1E3A8A 100%)}
html[data-theme="dark"] .mnx-personal-guide-icon{background:#173A60;color:#A9CEFF}html[data-theme="dark"] .mnx-personal-guide-copy small{color:#7DB4FF}html[data-theme="dark"] .mnx-personal-guide-copy strong{color:#F8FBFF}html[data-theme="dark"] .mnx-personal-guide-copy>span{color:#C8D8EA}html[data-theme="dark"] .mnx-personal-guide-cta{background:#2563EB;color:#fff}
body.mn-association .mnx-personal-guide-card{border-color:#DDD6FE;background:linear-gradient(135deg,#FAF5FF 0%,#F8F7FF 58%,#F5F3FF 100%);box-shadow:0 7px 22px rgba(124,58,237,.08)}
body.mn-association .mnx-personal-guide-card:hover{border-color:#A78BFA;box-shadow:0 10px 26px rgba(124,58,237,.14)}
body.mn-association .mnx-personal-guide-icon{background:#EDE9FE;color:#6D28D9}
body.mn-association .mnx-personal-guide-copy small{color:#7C3AED}
body.mn-association .mnx-personal-guide-cta{background:#7C3AED;color:#fff}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-card{background:linear-gradient(135deg,#21143A 0%,#241747 58%,#312E81 100%);border-color:#5B4B86;color:#F5F3FF;box-shadow:none}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-card:hover{border-color:#8B5CF6;background:linear-gradient(135deg,#29194A 0%,#31205A 58%,#3730A3 100%)}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-icon{background:#3B2A5F;color:#DDD6FE}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-copy small{color:#C4B5FD}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-copy strong{color:#FAF5FF}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-copy>span{color:#DDD6FE}
html[data-theme="dark"] body.mn-association .mnx-personal-guide-cta{background:#7C3AED;color:#fff}
@media(max-width:760px){.mnx-personal-guide-card{grid-template-columns:40px minmax(0,1fr);gap:11px;margin:8px 0 18px;padding:13px}.mnx-personal-guide-icon{width:40px;height:40px;border-radius:11px}.mnx-personal-guide-icon svg{width:20px;height:20px}.mnx-personal-guide-copy strong{font-size:13px}.mnx-personal-guide-copy>span{font-size:11px}.mnx-personal-guide-cta{grid-column:1/-1;justify-content:center;width:100%;padding:9px 10px}}


/* V13.5.40 — mobile compact AI shortcuts. They replace the large floating notice. */
.mnx-mobile-quick-actions{display:none}
@media(max-width:768px){
  .mnx-ai-doc-notice{display:none!important}
  .mnx-mobile-quick-actions{position:fixed;right:12px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:2380;display:flex;flex-direction:column;align-items:flex-end;gap:9px;font-family:Inter,system-ui,sans-serif;pointer-events:none}
  .mnx-mobile-doc-wrap{position:relative;pointer-events:auto}
  .mnx-mobile-quick-btn{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;position:relative;text-decoration:none;cursor:pointer;box-sizing:border-box;pointer-events:auto;transition:transform .16s ease,box-shadow .16s ease;border:1px solid rgba(255,255,255,.72)}
  .mnx-mobile-quick-btn:active{transform:scale(.95)}
  .mnx-mobile-quick-btn svg{width:21px;height:21px;stroke:currentColor}
  .mnx-mobile-doc-fab{background:linear-gradient(145deg,#F59E0B,#EA580C);color:#fff;box-shadow:0 10px 26px rgba(234,88,12,.34)}
  .mnx-mobile-doc-fab>b{position:absolute;right:-4px;top:-5px;min-width:21px;height:21px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:#fff;color:#9A3412;border:2px solid #FED7AA;box-shadow:0 3px 9px rgba(15,23,42,.18);font:900 9px/1 Inter}
  .mnx-mobile-ai-shortcut{background:linear-gradient(145deg,#2563EB,#7C3AED);color:#fff;box-shadow:0 10px 26px rgba(79,70,229,.35)}
  .mnx-mobile-ai-dot{position:absolute;right:4px;bottom:4px;width:8px;height:8px;border-radius:50%;background:#A7F3D0;border:2px solid #fff}
  .mnx-mobile-quick-popover{display:none;position:absolute;right:0;bottom:58px;width:min(286px,calc(100vw - 30px));padding:13px 14px;border-radius:16px;background:#fff;border:1px solid #FED7AA;box-shadow:0 18px 44px rgba(15,23,42,.22);color:#0F172A;text-align:left}
  .mnx-mobile-quick-popover.open{display:block;animation:mnxQuickPop .15s ease-out}
  @keyframes mnxQuickPop{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
  .mnx-mobile-quick-kicker{display:block;color:#C2410C;font:900 9px/1.2 Inter;letter-spacing:.08em;margin-bottom:4px}
  .mnx-mobile-quick-popover strong{display:block;font-size:13px;line-height:1.3}
  .mnx-mobile-quick-popover small{display:block;margin-top:4px;color:#64748B;font-size:10.5px;line-height:1.45}
  .mnx-mobile-quick-popover a{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 10px;border-radius:10px;background:#FFF7ED;color:#C2410C;border:1px solid #FED7AA;text-decoration:none;font:900 11px Inter}
  .mnx-mobile-quick-popover a span{font-size:15px}
  html[data-theme="dark"] .mnx-mobile-quick-popover{background:#0F2235;color:#F8FAFC;border-color:#9A5B21;box-shadow:0 18px 44px rgba(0,0,0,.42)}
  html[data-theme="dark"] .mnx-mobile-quick-popover small{color:#B8CADC}
  html[data-theme="dark"] .mnx-mobile-quick-popover a{background:#3B2413;color:#FED7AA;border-color:#9A5B21}
  body:has(#modal-ai-review[style*="display: flex"]) .mnx-mobile-quick-actions,
  body:has(.modal.open) .mnx-mobile-quick-actions,
  body:has(.modal-overlay[style*="display: flex"]) .mnx-mobile-quick-actions,
  body:has(.gallery-modal.open) .mnx-mobile-quick-actions,
  body:has(.mnx-quick-overlay.open) .mnx-mobile-quick-actions{display:none!important}
}
