/* Manager's top bar: compact, always visible, with one search for everything. */
:root{--admin-header-h:56px;--admin-tabs-h:50px}
.header{position:sticky;top:0;z-index:60}
.header .header__in{height:var(--admin-header-h);gap:14px}
.header .brand{font-size:.875rem;white-space:nowrap}
.admin-header-actions{display:flex;align-items:center;gap:8px}
.admin-tools{display:flex;align-items:center;gap:8px}
.admin-tools[hidden],.admin-search[hidden]{display:none}
.header .admin-header-actions a{white-space:nowrap;font-size:.875rem}
.header .admin-header-actions button,.header .admin-tools button{min-height:38px;padding:7px 14px;font-size:.875rem;font-weight:650;white-space:nowrap}
.header #refresh,.header [data-sound-toggle]{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.22)}
.header #refresh:hover,.header [data-sound-toggle]:hover{background:rgba(255,255,255,.2)}
.header [data-sound-toggle][aria-pressed="true"]{background:#fff;color:var(--ink)}

.admin-search{position:relative;flex:1 1 380px;max-width:520px;min-width:0}
.admin-search input{width:100%;min-height:40px;padding:8px 14px 8px 38px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.1);color:#fff;font-size:.9375rem}
.admin-search input::placeholder{color:rgba(255,255,255,.62)}
.admin-search input:focus{outline:0;background:#fff;color:var(--ink);border-color:#fff;box-shadow:0 0 0 3px rgba(227,6,19,.3)}
.admin-search input:focus::placeholder{color:var(--muted)}
.admin-search-icon{position:absolute;left:13px;top:50%;width:17px;height:17px;transform:translateY(-50%);color:rgba(255,255,255,.7);pointer-events:none}
.admin-search input:focus~.admin-search-icon{color:var(--muted)}
.admin-search-hint{position:absolute;right:12px;top:50%;transform:translateY(-50%);padding:1px 7px;border:1px solid rgba(255,255,255,.3);border-radius:6px;color:rgba(255,255,255,.7);font-size:.75rem;pointer-events:none}
.admin-search input:focus~.admin-search-hint{display:none}
.admin-search-results{position:absolute;left:0;right:0;top:calc(100% + 8px);max-height:min(70vh,460px);overflow:auto;padding:6px;border:1px solid var(--line);border-radius:16px;background:var(--white);color:var(--ink);box-shadow:0 22px 50px rgba(18,19,24,.22)}
.admin-search-results[hidden]{display:none}
.admin-search-title{margin:6px 10px 4px;color:var(--muted);font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.admin-search-empty{padding:16px 12px;color:var(--muted);font-size:.875rem}
.admin-search-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 10px;border:0;border-radius:12px;background:transparent;color:var(--ink);text-align:left;font-weight:400}
.admin-search-row:hover,.admin-search-row.is-active{background:var(--soft)}
.admin-search-avatar{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:var(--red);color:#fff;font-size:.875rem;font-weight:700}
.admin-search-copy{display:grid;min-width:0}
.admin-search-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9375rem}
.admin-search-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.8125rem}
.admin-search-copy .admin-search-match{color:var(--red);font-weight:600}

.admin-toast{position:fixed;left:50%;bottom:22px;z-index:90;max-width:min(92vw,420px);padding:12px 18px;border-radius:14px;border:1px solid rgba(255,255,255,.16);background:#1d2026;color:#fff;font-size:.9375rem;font-weight:600;box-shadow:0 14px 34px rgba(0,0,0,.28);opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:opacity .2s,transform .2s}
.admin-toast.show{opacity:1;transform:translate(-50%,0)}

/* The page title and the section title repeat what the tabs already say: keep them for screen readers only. */
.page>#app>.intro,.admin-category-head{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.page{margin-top:14px}
.admin-tabs{top:calc(var(--admin-header-h) + 8px);margin-bottom:16px}
.admin-tabs .admin-tab{min-height:48px;padding:13px 2px 10px}
.admin-workspace{scroll-margin-top:calc(var(--admin-header-h) + 8px)}
@media(min-width:801px){
 .admin-customer-context{top:calc(var(--admin-header-h) + var(--admin-tabs-h) + 14px)}
 .admin-workspace:has(.admin-customer-context:not([hidden])) :is(.admin-card,form){scroll-margin-top:calc(var(--admin-header-h) + var(--admin-tabs-h) + 130px)}
 .client-directory{top:calc(var(--admin-header-h) + var(--admin-tabs-h) + 24px);max-height:calc(100vh - var(--admin-header-h) - var(--admin-tabs-h) - 44px)}
}
.admin-card,form{scroll-margin-top:calc(var(--admin-header-h) + var(--admin-tabs-h) + 24px)}

@media(max-width:800px){
 .header .header__in{width:calc(100% - 24px);gap:8px;flex-wrap:wrap;height:auto;padding:8px 0}
 .header .brand{font-size:.8125rem}
 .admin-search{order:3;flex:1 1 100%;max-width:none}
 .admin-search-hint{display:none}
 .header .admin-header-actions a{display:none}
 .header .admin-header-actions{margin-left:auto}
 .header .admin-tools button{padding:7px 10px}
 .header [data-sound-label]{display:none}
 .header{position:static}
 .admin-tabs{top:8px}
 .admin-tabs .admin-tab{min-height:50px;padding-top:13px}
}
