/* Rethink stage 4 (navnew.js, cmdk.js): the owner's menu, More sheet, bell
   panel, search sheet and notification settings. Behind CONFIG.NAV_NEW: every
   rule is scoped to markup only navnew.js draws, or to .d2-navnew / .nv-on /
   .nv-setbox, which it sets only while the switch is on. */
:root {
  --nv-bg: #F4F4EF; --nv-card: #fff; --nv-line: #E3E3DC; --nv-ink: #111; --nv-mute: #73736D; --nv-soft: #ECECE5;
  --nv-y: #F5C500; --nv-pill: #FFF4B9; --nv-red: #D6362B;
  --nv-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

/* ---- desktop and iPad: the six items and the folded groups ---------------------- */
html.tp-desk2 #d2-sidebar.d2-navnew .d2-primary .d2-item { height: 32px; font-size: 14px; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-group:not(.d2-primary) { margin-top: 2px; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-primary + .d2-group { margin-top: 18px; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-glabel { height: 30px; font: 500 13.5px/1 var(--nv-font); color: #6f6f68; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-glabel .d2-chev { opacity: 1; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-gitems .d2-item { padding-left: 30px; font-size: 13.5px; }
html.tp-desk2 #d2-sidebar.d2-navnew .d2-gitems .d2-ico,
html.tp-desk2 #d2-sidebar.d2-navnew .d2-gitems .d2-holly-tile { display: none; }
html.tp-ipad.tp-desk2 #d2-sidebar.d2-navnew .d2-primary .d2-item { height: 40px; font-size: 17px; }
html.tp-ipad.tp-desk2 #d2-sidebar.d2-navnew .d2-glabel { height: 38px; font-size: 15px; }
html.tp-ipad.tp-desk2 #d2-sidebar.d2-navnew .d2-gitems .d2-item { height: 38px; font-size: 15px; }

/* ---- the bell's panel (desktop popover; phone sheet) --------------------------- */
.nv-np { font-family: var(--nv-font); color: var(--nv-ink); }
#d2-layer .d2-pop.nv-pop { padding: 0; max-height: calc(100vh - 80px); overflow-y: auto; }
.nv-np:not(.is-phone) { padding: 16px 0 6px; }
.nv-nhead { display: flex; align-items: center; gap: 8px; padding: 0 18px 6px; }
.nv-nhead h2 { flex: 1 1 auto; margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.nv-np.is-phone .nv-nhead { padding: 0 2px 4px; }
.nv-np.is-phone .nv-nhead h2 { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.nv-link { border: 0; background: none; color: var(--nv-mute); font: 500 13px var(--nv-font); cursor: pointer; padding: 6px 4px; }
.nv-np.is-phone .nv-link { font-size: 16px; }
.nv-icon { border: 0; background: none; color: var(--nv-mute); width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (hover: hover) { .nv-icon:hover, .nv-link:hover { color: var(--nv-ink); } }
.nv-nsec { margin: 12px 18px 4px; font-size: 12.5px; font-weight: 600; color: var(--nv-mute); }
.nv-np.is-phone .nv-nsec { margin: 18px 4px 8px; font-size: 16px; }
.nv-nsec.is-you { color: var(--nv-mute); }
.nv-np.is-phone .nv-nsec.is-you { color: var(--nv-red); }
.nv-ncard { display: flex; flex-direction: column; }
.nv-np.is-phone .nv-ncard { background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 16px; overflow: hidden; }
.nv-nrow { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 15px; border-left: 3px solid var(--nv-red); }
.nv-np.is-phone .nv-nrow { padding: 12px 14px 12px 13px; }
.nv-np.is-phone .nv-nrow + .nv-nrow { border-top: 1px solid var(--nv-line); }
.nv-nmain, .nv-imain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; color: inherit; }
.nv-nmain b, .nv-imain b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.nv-nmain span, .nv-imain span { font-size: 12.5px; color: var(--nv-mute); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-np.is-phone .nv-nmain b, .nv-np.is-phone .nv-imain b { font-size: 16px; }
.nv-np.is-phone .nv-nmain span, .nv-np.is-phone .nv-imain span { font-size: 14px; }
.nv-ntime { flex: 0 0 auto; font-size: 12px; color: var(--nv-mute); }
.nv-btn { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 9px 14px; font: 600 15px var(--nv-font); cursor: pointer; }
.nv-btn.is-k { background: var(--nv-ink); color: #fff; }
.nv-irow { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 9px 18px; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.nv-np.is-phone .nv-irow { padding: 13px 14px; }
.nv-np.is-phone .nv-irow + .nv-irow, .nv-np.is-phone .nv-kids + .nv-irow { border-top: 1px solid var(--nv-line); }
@media (hover: hover) { .nv-irow:hover, .nv-nrow:hover, .nv-krow:hover { background: rgba(0, 0, 0, .03); } }
.nv-iico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--nv-soft); color: #4a4a45; display: inline-flex; align-items: center; justify-content: center; }
.nv-iico svg { width: 16px; height: 16px; }
.nv-np.is-phone .nv-iico { background: none; flex-basis: 24px; width: 24px; }
.nv-np.is-phone .nv-iico svg { width: 20px; height: 20px; }
.nv-irow .nv-imain b { font-weight: 500; }
.nv-irow.is-unread .nv-imain b { font-weight: 650; }
.nv-udot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--nv-y); }
.nv-kids { display: flex; flex-direction: column; padding: 0 0 6px 60px; }
.nv-krow { border: 0; background: none; text-align: left; padding: 6px 18px 6px 0; display: flex; flex-direction: column; gap: 1px; cursor: pointer; font-family: inherit; color: inherit; }
.nv-krow b { font-size: 13px; font-weight: 500; }
.nv-krow.is-unread b { font-weight: 650; }
.nv-krow span { font-size: 12px; color: var(--nv-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-more-link { align-self: flex-start; border: 0; background: none; color: var(--nv-mute); font: 500 13px var(--nv-font); padding: 8px 18px; cursor: pointer; }
.nv-np.is-phone .nv-more-link { font-size: 15px; padding: 12px 4px 0; }
.nv-nfoot { margin: 8px 0 0; padding: 12px 18px 6px; border-top: 1px solid var(--nv-line); font-size: 12.5px; color: var(--nv-mute); }
.nv-np.is-phone .nv-nfoot { border: 0; text-align: center; font-size: 14px; padding: 18px 0 0; }
.nv-empty { margin: 4px 18px 8px; font-size: 13px; color: var(--nv-mute); }
.nv-np.is-phone .nv-empty { margin: 4px; font-size: 15px; }

.nv-psheet { display: none; position: fixed; inset: 0; z-index: 2200; }
.nv-psheet.open { display: block; }
.nv-pscrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); }
.nv-ppanel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow-y: auto; background: var(--nv-bg); border-radius: 22px 22px 0 0;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .14); }
.nv-grab { width: 40px; height: 5px; border-radius: 3px; background: #CFCFC8; margin: 2px auto 14px; }

/* ---- the phone: More (p-owner-more) --------------------------------------------- */
.mobile-more-sheet.nv-on .mobile-more-header,
.mobile-more-sheet.nv-on .mobile-more-groups,
.mobile-more-sheet.nv-on .mobile-more-footer { display: none !important; }
.mobile-more-sheet:not(.nv-on) #nv-more { display: none; }
.mobile-more-sheet.nv-on .mobile-more-panel { background: var(--nv-bg); max-height: 92vh; padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); }
.nv-more { font-family: var(--nv-font); color: var(--nv-ink); }
.nv-mtitle { margin: 4px 2px 12px; font-size: 32px; font-weight: 750; letter-spacing: -.02em; }
.nv-msearch { width: 100%; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: #E8E8E1; color: #8a8a82; font: 400 17px var(--nv-font); cursor: pointer; text-align: left; }
.nv-mcard { margin-top: 12px; background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 16px; overflow: hidden; }
.nv-mtop { display: grid; grid-template-columns: 1fr 1fr; }
.nv-mtop > .nv-mrow:only-child { grid-column: 1 / -1; }   /* rethink 15a: the admin's one top row (Work) */
.nv-mtop .nv-mrow + .nv-mrow { border-top: 0; border-left: 1px solid var(--nv-line); }
.nv-mhead { margin: 18px 6px 0; font-size: 15px; font-weight: 600; color: var(--nv-mute); }
.nv-mrow { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border: 0; background: none; cursor: pointer; font: 400 17px var(--nv-font); color: var(--nv-ink); text-align: left; }
.nv-mrow + .nv-mrow { border-top: 1px solid var(--nv-line); }
.nv-mico { flex: 0 0 24px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: #2b2b28; }
.nv-mico svg { width: 22px; height: 22px; }
.nv-mico .d2-ico, .nv-mico .d2-holly-tile { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.nv-mlbl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-mbadge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--nv-red); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nv-mchev { color: #a3a39b; display: inline-flex; }
.nv-mprofile { width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 6px 14px; border: 0; background: none; font: 400 17px var(--nv-font); color: var(--nv-mute); cursor: pointer; text-align: left; }
.nv-mav { width: 30px; height: 30px; border-radius: 50%; background: var(--nv-y); color: var(--nv-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nv-msignout { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--nv-mute); font: 500 15px var(--nv-font); padding: 8px; cursor: pointer; }

/* ---- the phone: search sheet ------------------------------------------------------ */
.nv-psearch { display: none; position: fixed; inset: 0; z-index: 2300; background: var(--nv-bg); font-family: var(--nv-font); color: var(--nv-ink);
  padding: calc(10px + env(safe-area-inset-top)) 16px 20px; overflow-y: auto; }
.nv-psearch.open { display: block; }
.nv-ps-bar { display: flex; align-items: center; gap: 10px; }
.nv-ps-field { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; background: #E8E8E1; color: #8a8a82; }
.nv-ps-field input { flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none; font: 400 17px var(--nv-font); color: var(--nv-ink); }
.nv-psearch .nv-ps-field input:focus, .nv-psearch .nv-ps-field input:focus-visible { outline: none; box-shadow: none; border: 0; }
.nv-ps-field:focus-within { box-shadow: 0 0 0 2px rgba(17, 17, 17, .18); }
.nv-ps-cancel { border: 0; background: none; font: 500 17px var(--nv-font); color: var(--nv-ink); padding: 8px 2px; cursor: pointer; }
.nv-ps-head { margin: 18px 4px 6px; font-size: 14px; font-weight: 600; color: var(--nv-mute); }
.nv-ps-row { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--nv-line); background: none; text-align: left; font: 400 17px var(--nv-font); color: var(--nv-ink); cursor: pointer; }
.nv-ps-lbl { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-ps-meta { flex: 0 1 auto; font-size: 14px; color: var(--nv-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-ps-meta.is-hot { color: var(--nv-red); }
/* desk2's palette for the owner: plain group names, and a client waiting on you shows red. */
html.tp-desk2 #d2-layer .d2-palette-wrap.nv-on .d2-kicker { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
html.tp-desk2 #d2-layer .d2-palette-wrap.nv-on .d2-pal-meta.is-hot { color: var(--nv-red); font-weight: 600; }

/* ---- notification settings -------------------------------------------------------- */
.nv-set { font-family: var(--nv-font); color: var(--nv-ink); }
.nv-set-t { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.nv-set-s { margin: 4px 0 18px; font-size: 14px; color: var(--nv-mute); }
.nv-set-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .nv-set-grid { grid-template-columns: minmax(0, 1fr); } }
.nv-scard { background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 14px; padding: 16px 18px; }
.nv-set-side { display: flex; flex-direction: column; gap: 14px; }
.nv-scard h3 { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.nv-scard p { margin: 0; font-size: 13.5px; color: var(--nv-mute); line-height: 1.45; }
.nv-st-h, .nv-st-r { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; align-items: center; }
.nv-st-h { padding: 2px 0 10px; border-bottom: 1px solid var(--nv-line); font-size: 13px; font-weight: 600; color: var(--nv-mute); }
.nv-st-h span:not(:first-child), .nv-st-c { text-align: center; }
.nv-st-sec { margin: 16px 0 4px; font-size: 13px; font-weight: 600; color: var(--nv-mute); }
.nv-st-r { min-height: 44px; border-bottom: 1px solid #EFEFE9; }
.nv-st-l { font-size: 14.5px; }
.nv-st-note { grid-column: 2 / 4; text-align: center; font-size: 13px; color: var(--nv-mute); }
.nv-st-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--nv-mute); }
.nv-sw { position: relative; width: 40px; height: 24px; border: 0; border-radius: 12px; background: #E3E3DC; cursor: pointer; padding: 0; vertical-align: middle; transition: background .15s; }
.nv-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.nv-sw.is-on { background: var(--nv-ink); }
.nv-sw.is-on::after { transform: translateX(16px); }
.nv-sw.is-locked { opacity: .45; cursor: default; }
#d2-notifset.nv-setbox .d2s-browser, #d2-notifset.nv-setbox #nv-set-more .d2h-card { margin: 0; }
#nv-set-more { display: flex; flex-direction: column; gap: 14px; }
#nv-set-more:empty { display: none; }

.nv-pset { display: none; position: fixed; inset: 0; z-index: 2250; background: var(--nv-bg); overflow-y: auto; padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom)); }
.nv-pset.open { display: block; }
.nv-pset-nav { display: flex; justify-content: flex-end; padding: 8px 0; }
.nv-set.is-phone .nv-set-t { font-size: 30px; }
.nv-set.is-phone .nv-set-main, .nv-set.is-phone > .nv-st { background: var(--nv-card); }
.nv-set.is-phone .nv-st { background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 16px; padding: 12px 14px; }
.nv-set.is-phone .nv-st-h, .nv-set.is-phone .nv-st-r { grid-template-columns: minmax(0, 1fr) 62px 62px; }
.nv-set.is-phone .nv-st-h { font-size: 12px; }
.nv-set.is-phone .nv-st-l { font-size: 16px; }
.nv-set.is-phone .nv-scard { margin-top: 14px; }

/* ============================================================================
   Rethink 15a, iPad pass (t-owner-*): the icon-only sidebar. Only on an iPad in
   landscape, only with the new menu (desk2's applyRail adds html.d2-rail), only
   until the sidebar button opens it out. Icons, the pale-yellow active pill, and
   the name on a long press or hover. The new menu's rows are 44pt on iPad.
   ============================================================================ */
html.tp-ipad.tp-desk2 #d2-sidebar.d2-navnew .d2-item { height: auto; min-height: 44px; }
@media (min-width: 769px) and (orientation: landscape) {
  html.tp-ipad.tp-desk2.d2-rail:has(#d2-sidebar.d2-navnew) { --d2-side: 68px; }
  html.tp-ipad.tp-desk2.d2-rail #d2-sidebar.d2-navnew { overflow: visible; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-logo { flex-direction: column; justify-content: center; gap: 4px; height: auto; flex: 0 0 auto; padding: calc(10px + env(safe-area-inset-top)) 0 8px; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-logo img { display: none; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-scroll { overflow: visible; padding: 4px 8px 16px; -webkit-mask-image: none; mask-image: none; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-group:not(.d2-primary) { display: none; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-item { position: relative; justify-content: center; width: 52px; height: 52px; min-height: 52px; padding: 0; margin: 0 0 6px; border-radius: 14px; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-lbl { position: absolute; left: 58px; top: 50%; transform: translateY(-50%); z-index: 50; display: none; padding: 6px 10px; border-radius: 8px;
    background: #111; color: #fff; font-size: var(--d2-t-14, 14px); font-weight: 600; white-space: nowrap; overflow: visible; pointer-events: none; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-item:active .d2-lbl,
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-item:focus-visible .d2-lbl { display: block; }
  @media (hover: hover) { html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-item:hover .d2-lbl { display: block; } }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-item { -webkit-touch-callout: none; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-badge:not([hidden]) { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--d2-y); color: var(--d2-ink); font-size: 11px; font-weight: 700; justify-content: center; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-you { justify-content: center; padding: 8px 0 10px; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-acct { flex: 0 0 auto; justify-content: center; width: 52px; padding: 0; }
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-acct-main,
  html.tp-ipad.tp-desk2.d2-rail .d2-navnew .d2-acct-gear { display: none; }
}
.nv-np.is-phone .nv-ncard .nv-more-link { display: flex; align-items: center; width: 100%; min-height: 48px; margin: 0; padding: 0 16px; border-top: 1px solid #EFEFE9; font-weight: 600; }   /* rethink 17 */

/* ---- Rethink 18: All notifications as a full page (navnew.js allHtml). The phone's page in
   #view-nvall, and desk2's Notifications page on desktop and iPad, in the bell's own card look. */
.nv-np.nv-all { padding: 4px 16px 32px; background: var(--nv-bg); }
.nv-np.nv-all.is-desk { max-width: 760px; margin: 0 auto; padding: 28px 32px 40px; background: none; }
.nv-np.nv-all .nv-nhead { padding: 0 0 2px; }
.nv-np.nv-all .nv-nhead h2 { font-size: 34px; line-height: 1.15; }
.nv-np.nv-all .nv-link { min-height: 44px; padding: 0 6px; }
.nv-np.nv-all .nv-icon { width: 44px; height: 44px; }
.nv-np.nv-all .nv-allsub { margin: 2px 0 6px; font-size: 15.5px; color: var(--nv-mute); }
.nv-np.nv-all .nv-allnav { display: flex; align-items: center; margin: 0 0 2px; }
.nv-np.nv-all .nv-allback { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -6px; padding: 0 4px; border: 0; background: none; font: 600 17px var(--nv-font); color: var(--nv-ink); cursor: pointer; }
.nv-np.nv-all .nv-nrow, .nv-np.nv-all .nv-irow { min-height: 60px; box-sizing: border-box; }
.nv-np.nv-all .nv-btn { min-height: 44px; }
.nv-np.nv-all .nv-kids { padding: 0 0 8px 52px; }
.nv-np.nv-all .nv-krow { min-height: 44px; justify-content: center; padding: 6px 14px 6px 0; }
.nv-np.nv-all .nv-krow b { font-size: 14.5px; }
.nv-np.nv-all .nv-krow span { font-size: 13px; }
.nv-np.nv-all.is-pg { background: none; }
.view.nv-allview { background: none; }
.nv-np.nv-all .nv-allgrow { flex: 1; }
.nv-np.nv-all .nv-allnav .nv-link { font-size: 16px; white-space: nowrap; }
.nv-np.nv-all .nv-allnav .nv-icon { margin-right: -8px; }
.nv-np.nv-all .nv-allsub + .nv-nsec { margin-top: 14px; }
