/* Zoeken rechtsboven (Kwin 2026-11-02): "zoeken alleen rechtsboven, alleen open als je op het glas-icoontje drukt, dan kun je daarboven typen".
   Pages have no search field of their own any more. The magnifier in the top bar opens one search bar over the top bar;
   on a list it filters that list, elsewhere the results show right under the bar. Loaded last, so it wins without !important wars. */
#mainApp .topbar{position:relative}
html body #mainApp#mainApp .topbar .top-actions>#globalSearchButton#globalSearchButton{display:inline-grid!important;place-items:center!important;flex:0 0 40px!important;width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important;gap:0!important}
html body #mainApp#mainApp .topbar .top-actions>#globalSearchButton#globalSearchButton::after{content:none!important;display:none!important}
html body #mainApp#mainApp .topbar .top-actions>#globalSearchButton .icon{width:20px;height:20px}

/* The bar sits over the top bar. Phone: the whole width. Computer: on the right, the page title stays readable. */
.header-search[hidden]{display:none!important}
.header-search{position:absolute;z-index:6;top:50%;left:16px;right:16px;transform:translateY(-50%);display:flex;align-items:center;gap:12px;height:44px}
/* Hide what the bar covers (opacity: an icon inside can carry its own visibility). The phone's + lives in the top bar too and stays. */
html body #mainApp#mainApp .topbar.is-searching>.top-actions>:not(#quickNew){opacity:0!important;pointer-events:none!important}
html body #mainApp#mainApp .header-search>.icon{position:absolute;z-index:1;left:14px;top:50%;width:18px;height:18px;margin-top:-9px;color:#ffffffcc!important;stroke:currentColor;pointer-events:none}
html body #mainApp#mainApp .header-search input{flex:1 1 auto;min-width:0;height:44px;margin:0;padding:0 14px 0 40px;border:0!important;border-radius:999px!important;background:#ffffff2e!important;color:#fff!important;font-size:16px!important;font-weight:500;line-height:44px;box-shadow:none!important;outline:0!important;-webkit-appearance:none;appearance:none}
html body #mainApp#mainApp .header-search input::placeholder{color:#ffffffb8;opacity:1}
html body #mainApp#mainApp .header-search input:focus{background:#ffffff3d!important}
html body #mainApp#mainApp .header-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
html body #mainApp#mainApp .header-search-close{flex:0 0 auto;height:44px;min-height:44px;padding:0 2px;border:0!important;background:transparent!important;box-shadow:none!important;color:#fff!important;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
@media(max-width:820px){
  html body #mainApp#mainApp .topbar.is-searching>.top-left{opacity:0!important;pointer-events:none!important}
}
@media(min-width:821px){
  html body #mainApp#mainApp .topbar.is-searching>.top-actions>#quickNew{opacity:0!important;pointer-events:none!important}
  .header-search{left:auto;right:24px;width:min(520px,calc(100% - 260px))}
}

/* Results for "everything" (screens without a list): right under the bar. Phone: fills the screen; computer: a card under the bar. */
.header-search-panel[hidden]{display:none!important}
.header-search-panel{position:fixed;z-index:70;top:var(--header-search-top,64px);left:0;right:0;bottom:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:12px 16px calc(24px + env(safe-area-inset-bottom,0px));background:var(--calm-surface,#fff);color:var(--calm-ink,#1B1F23);border-radius:24px 24px 0 0}
@media(min-width:821px){
  .header-search-panel{left:auto;right:24px;bottom:auto;width:520px;max-height:min(70vh,560px);margin-top:8px;padding:12px 16px 16px;border:1px solid var(--calm-line,#ECEEF0);border-radius:20px;box-shadow:0 24px 60px rgba(15,25,20,.18)}
}
.header-search-panel .global-search-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px 8px;padding:0 16px}
.header-search-panel .global-search-chips::-webkit-scrollbar{display:none}
.header-search-panel .global-search-chips button{flex:none;min-height:36px;padding:0 14px;border:1px solid var(--calm-line,#ECEEF0);border-radius:999px;background:transparent;color:var(--calm-muted,#667179);font:inherit;font-size:14px;font-weight:600}
.header-search-panel .global-search-chips button[aria-pressed="true"]{background:var(--calm-ink,#1B1F23);border-color:var(--calm-ink,#1B1F23);color:var(--calm-surface,#fff)}
.header-search-panel .global-search-hint{margin:8px 2px;font-size:14px;color:var(--calm-muted,#5E6870)}
.header-search-panel .global-search-group{margin-top:8px}
.header-search-panel .global-search-group h3{margin:0 0 4px;font-size:12px;font-weight:650;text-transform:uppercase;letter-spacing:.06em;color:var(--calm-muted,#5E6870)}
.header-search-panel .global-search-item{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:52px;padding:8px 2px;border:0;border-top:1px solid var(--calm-hair,#EEF0F2);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.header-search-panel .global-search-group h3+.global-search-item{border-top:0}
.header-search-panel .global-search-item>span{display:flex;flex-direction:column;min-width:0}
.header-search-panel .global-search-item>span strong{overflow:hidden;font-size:15px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.header-search-panel .global-search-item>span span{font-size:13px;color:var(--calm-muted,#5E6870)}
.header-search-panel .global-search-value{font-variant-numeric:tabular-nums;white-space:nowrap}
.header-search-panel mark{background:#FFF0B3;color:inherit;border-radius:3px}
html[data-theme="dark"] .header-search-panel mark{background:#5A4A12}
html[data-theme="dark"] .header-search-panel{background:var(--dk-surface,#1A1F23);color:var(--dk-ink,#E9EDEF)}

/* Netjes (same round, Kwin 2026-11-02 "alle schermen netjes, ook de zijschermpjes"): small things that broke the one look. */
/* Choice lists in sheets (factuur/kosten acties): readable titles like every other list, not 12/10 px. */
html body #modalRoot .action-list .action-row{min-height:52px;padding:10px 14px}
html body #modalRoot .action-list .action-row .action-text strong{font-size:15px;font-weight:600;line-height:1.3}
html body #modalRoot .action-list .action-row .action-text span{font-size:13px;line-height:1.35}
/* Instellingen > a section on the phone: the title stands on the colour, so it is white like every page title there. */
@media(max-width:820px){
  html body #mainApp#mainApp #settingsCenter h2[id^="settings-title-"]{color:#fff!important}
}
/* Section headings inside a settings section all the same size (they were 14 and 16 px mixed). */
html body #mainApp#mainApp #settingsCenter .settings-center-block>h3,html body #mainApp#mainApp #settingsCenter .fb-give h3{font-size:15px;font-weight:650}
/* A4 preview: scale from the top-left corner in the stylesheet too, not only inline, so WebKit never shows it shifted while the inline style catches up. */
#modalRoot #reportPreviewFrame{transform-origin:0 0}
