/* ComponentERP beta: UX batch D (T2861 / T2863): top-bar search + Recent, dashboard cap notes */
.ux27d-tools{display:flex;align-items:center;gap:8px;min-width:0}
.ux27d-search,.ux27d-recent{position:relative}
.ux27d-field{position:relative;display:flex;align-items:center}
.ux27d-field>svg{position:absolute;left:9px;color:var(--muted);pointer-events:none}
.ux27d-field input{width:clamp(180px,24vw,320px);min-height:32px;padding:5px 30px 5px 30px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--text)}
.ux27d-field input:focus{outline:2px solid var(--blue);outline-offset:-1px;background:var(--panel)}
.ux27d-field input::-webkit-search-cancel-button{display:none}
.ux27d-field kbd{position:absolute;right:8px;font:11px/16px inherit;padding:0 5px;border:1px solid var(--line);border-radius:4px;color:var(--muted);background:var(--panel);pointer-events:none}
.ux27d-field input:focus+kbd,.ux27d-field input:not(:placeholder-shown)+kbd{display:none}
.ux27d-search-open{display:none;padding:4px 8px}
.ux27d-recent>button{display:inline-flex;align-items:center;gap:5px;padding:4px 8px}
.ux27d-pop{left:0;right:auto;width:min(440px,calc(100vw - 24px));max-height:min(70vh,560px);overflow:auto;padding:6px 0;text-align:start}
.ux27d-recent .ux27d-pop{left:auto;right:0}
[dir=rtl] .ux27d-pop{left:auto;right:0}
[dir=rtl] .ux27d-recent .ux27d-pop{right:auto;left:0}
.ux27d-msg{margin:0;padding:10px 14px;color:var(--muted)}
.ux27d-hint{padding-bottom:2px}
.ux27d-fail{color:var(--text)}
.ux27d-group+.ux27d-group{border-top:1px solid var(--line);margin-top:4px;padding-top:4px}
.ux27d-ghead{padding:6px 14px 3px;font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--muted)}
.ux27d-opt{display:flex;align-items:baseline;gap:10px;padding:6px 14px;cursor:pointer;min-width:0}
.ux27d-opt:hover,.ux27d-opt.is-active{background:light-dark(#e8f2fd,#203a57)}
.ux27d-opt.is-active{box-shadow:inset 3px 0 var(--blue)}
.ux27d-otitle{font-weight:600;white-space:nowrap}
.ux27d-osub{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ux27d-more{display:block;width:100%;text-align:start;border:0;background:none;color:var(--blue);padding:6px 14px;min-height:0}
.ux27d-more:hover{text-decoration:underline}
.ux27d-link{border:0;background:none;color:var(--blue);padding:0;min-height:0;cursor:pointer;text-decoration:underline}
.ux27d-rhead{display:flex;justify-content:space-between;align-items:center;padding:6px 14px 8px;border-bottom:1px solid var(--line)}
.ux27d-rlist{list-style:none;margin:0;padding:4px 0}
.ux27d-rlist a{display:grid;grid-template-columns:auto auto 1fr auto;gap:8px;align-items:baseline;padding:6px 14px;color:var(--text);text-decoration:none}
.ux27d-rlist a:hover,.ux27d-rlist a:focus-visible{background:light-dark(#e8f2fd,#203a57);outline:none;box-shadow:inset 3px 0 var(--blue)}
.ux27d-rtype{font-size:11px;color:var(--muted);white-space:nowrap}
.ux27d-rnum{font-weight:600;white-space:nowrap}
.ux27d-rco{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ux27d-rtime{font-size:11px;color:var(--muted);white-space:nowrap}
/* #5: "first 100 of 1,413" under a capped dashboard count */
.ux27d-cap{display:block;font-size:10px;font-weight:400;color:var(--muted);line-height:1.2;white-space:nowrap}
.dashboard-operation-heading .ux27d-cap{display:inline;margin-inline-start:4px}
@media (max-width:1100px){.ux27d-label{display:none}.ux27d-field input{width:clamp(150px,20vw,240px)}}
/* phone: a search icon; tapping it opens a full-width field under the top bar */
@media (max-width:760px){
 .ux27d-tools{gap:2px}
 /* room for the search icon: the dark-mode switch shows only the current mode (tap still toggles) */
 .header-tools .theme-toggle{width:40px;justify-content:center}
 .header-tools .theme-toggle[aria-checked="false"] .theme-moon,.header-tools .theme-toggle[aria-checked="true"] .theme-sun{display:none}
 .header-tools .theme-toggle[aria-checked="true"]::before{transform:none}
 .ux27d-recent{display:none}
 .ux27d-search-open{display:inline-flex}
 .ux27d-field{display:none}
 .ux27d-open .ux27d-field{display:flex;position:fixed;left:8px;right:8px;top:52px;z-index:60;box-shadow:0 8px 24px #0003;border-radius:6px}
 .ux27d-open .ux27d-field input{width:100%;background:var(--panel);min-height:40px;font-size:16px}
 .ux27d-search .ux27d-pop{position:fixed;left:8px;right:8px;top:98px;width:auto}
 .ux27d-recent .ux27d-pop{position:fixed;left:8px;right:8px;top:52px;width:auto}
}

/* T2954 (Mike 10/22): red box around overdue due dates (prospecting next contact + overdue dated tasks) */
:root{--due-amber:light-dark(#b45309,#fbbf24)}
.dashboard-prospect-table td[data-overdue],.dashboard-task-date.is-overdue{box-shadow:inset 0 0 0 2px light-dark(#dc2626,#f87171);color:var(--due-amber);font-weight:700;border-radius:4px}
.dashboard-prospecting .dashboard-section-title h2 .dash-server-count{color:var(--due-amber);font-weight:700}
