/* The app's top bar (design: "App top bar" row of the design canvas), at the dashboard's scale. Self-contained:
   every rule is under .tb so it sits on any page. */
.tb { position: sticky; top: 0; z-index: 30; flex: none; background: #f7f6f2; border-bottom: 1px solid #e7e5e0; color: #1c1917;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 13px; }
.tb * { box-sizing: border-box; }
.tb-in { max-width: 1040px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 12px; }
.tb-brand { flex: none; font-size: 15px; font-weight: 700; color: #1c1917; text-decoration: none; }
.tb-search { flex: 1 1 auto; max-width: 400px; margin: 0 auto; position: relative; }
.tb-search label { position: relative; display: block; }
.tb-search label > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.tb-search input { width: 100%; font: inherit; font-size: 13px; padding: 7px 12px 7px 34px; border: 1px solid #d6d3cd; border-radius: 6px; background: #fff; color: #1c1917; }
.tb-search input:focus { outline: none; border: 2px solid #0f766e; padding: 6px 11px 6px 33px; }
.tb-search input:disabled { background: #f1efe9; }
.tb-icon { flex: none; position: relative; width: 36px; height: 36px; border-radius: 6px; border: none; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #1c1917; }
.tb-icon:hover { background: #efede7; }
.tb-icon[aria-expanded="true"] { background: #e3f0ee; color: #0f5f58; }
.tb-icon:focus-visible, .tb-me:focus-visible, .tb-pop a:focus-visible, .tb-pop button:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.tb-badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #0f766e; color: #fff;
  font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.tb-wrap { flex: none; position: relative; }
.tb-me { font: inherit; cursor: pointer; min-height: 36px; max-width: 220px; padding: 0 10px; border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: #1c1917; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.tb-me:hover { background: #efede7; }
.tb-me[aria-expanded="true"] { background: #e3f0ee; color: #0f5f58; }
.tb-me .tb-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-me .tb-person { display: none; }
.tb-searchbtn { display: none; }
/* Upload PO: opens the file picker (a label around the hidden input) */
.tb-upload { position: relative; min-height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid #d6d3cd; background: #fff; color: #1c1917;
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tb-upload:hover { background: #efede7; }
.tb-upload:focus-within { outline: 2px solid #0f766e; outline-offset: 2px; }
.tb-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tb-upload.busy { opacity: .6; pointer-events: none; }
.tb-uperr { right: 0; width: 280px; padding: 12px 14px; font-size: 13px; color: #9f1239; }

/* the panels that open from it */
.tb-pop { position: absolute; top: calc(100% + 8px); background: #fff; border: 1px solid #e7e5e0; border-radius: 8px; box-shadow: 0 12px 32px rgba(28,25,23,.1);
  display: flex; flex-direction: column; overflow: hidden; animation: tb-in .14s ease-out; }
@keyframes tb-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tb-pop a { color: #1c1917; text-decoration: none; }
.tb-results { left: 0; width: min(460px, 92vw); padding: 6px 0; max-height: min(70vh, 520px); overflow-y: auto; }
.tb-group { padding: 8px 16px 3px; font-size: 11px; font-weight: 600; color: #57534e; }
.tb-group + .tb-row { margin-top: 0; }
.tb-results .tb-group:not(:first-child) { border-top: 1px solid #e7e5e0; margin-top: 4px; padding-top: 10px; }
.tb-row { padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.tb-row:hover, .tb-row:focus { background: #f1efe9; outline: none; }
.tb-row .tb-two { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tb-row .tb-two span:last-child, .tb-meta { font-size: 11px; color: #57534e; }
.tb-mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #57534e; }
.tb-pill { flex: none; padding: 1px 8px; border-radius: 99px; font-size: 11px; background: #f1efe9; color: #44403c; }
.tb-pill.review { background: #fff7e6; color: #92400e; }
.tb-pill.reviewed { background: #edf5ef; color: #3f6b4c; }
.tb-pill.automatic { background: #e3f0ee; color: #0f5f58; }
.tb-empty { padding: 14px 16px; font-size: 13px; color: #57534e; }
.tb-notes { right: -100px; width: min(380px, 92vw); }
.tb-head { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7e5e0; font-size: 14px; font-weight: 600; }
.tb-head button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: #0f5f58; font-size: 12px; font-weight: 400; text-decoration: underline; }
.tb-list { max-height: min(60vh, 440px); overflow-y: auto; }
.tb-note { padding: 11px 16px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid #e7e5e0; color: #44403c; }
.tb-note:last-child { border-bottom: none; }
.tb-note:hover, .tb-note:focus { background: #f7f6f2; outline: none; }
.tb-note .tb-dot { flex: none; margin-top: 6px; width: 7px; height: 7px; border-radius: 99px; }
.tb-note.unread .tb-dot { background: #0f766e; }
.tb-note .tb-two { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tb-note .tb-two b { font-weight: 400; font-size: 13px; color: #44403c; }
.tb-note.unread .tb-two b { font-weight: 600; color: #1c1917; }
.tb-help { right: -110px; width: min(340px, 92vw); }
.tb-sec { padding: 13px 16px; display: flex; flex-direction: column; gap: 7px; border-bottom: 1px solid #e7e5e0; }
.tb-sec:last-child { border-bottom: none; }
.tb-sec b { font-size: 14px; }
.tb-sec p { margin: 0; font-size: 12.5px; line-height: 1.55; color: #44403c; }
.tb-soon { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #78716c; }
.tb-tag { flex: none; padding: 1px 7px; border-radius: 99px; background: #f1efe9; color: #57534e; font-size: 10px; font-weight: 500; }
.tb-tours { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.tb-tour { font: inherit; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border: none; border-radius: 6px; background: transparent; text-align: left; font-size: 13px; color: #1c1917; }
.tb-tour:hover { background: #f1efe9; }
.tb-tour[aria-busy="true"] { opacity: .6; cursor: progress; }
.tb-play { flex: none; width: 26px; height: 26px; border-radius: 99px; background: #e3f0ee; color: #0f5f58; display: inline-flex; align-items: center; justify-content: center; }
.tb-tour:hover .tb-play { background: #0f766e; color: #fff; }
.tb-menu { right: 0; width: 250px; padding: 5px 0; }
.tb-who { padding: 8px 16px 10px; display: flex; flex-direction: column; gap: 1px; border-bottom: 1px solid #e7e5e0; margin-bottom: 5px; overflow-wrap: anywhere; }
.tb-who b { font-size: 13px; } .tb-who span { font-size: 12px; color: #57534e; }
/* every account-menu item (topbar.js menuItem): link, button or Coming soon all share one look */
.tb-item { font: inherit; width: 100%; text-align: left; border: none; background: none; text-decoration: none; cursor: pointer; box-sizing: border-box; min-height: 48px; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #1c1917; }
.tb-item:not(.off):hover, .tb-item:not(.off):focus-visible { background: #e3f0ee; color: #0f5f58; outline: none; }
.tb-item .tb-two { display: flex; flex-direction: column; gap: 1px; }
.tb-item.off { color: #78716c; cursor: default; }
/* dev tools: never shown to customers; the warning yellow and a wrench mark them */
.tb-dev { margin-top: 5px; background: #fff7e6; color: #92400e; justify-content: flex-start; }
.tb-dev.tb-item:hover, .tb-dev.tb-item:focus-visible { background: #fdeccf; color: #92400e; }
.tb-dev .tb-two { flex: 1; }
.tb-dev .tb-meta { color: #92400e; opacity: .85; }
.tb-dev .tb-tag { background: #92400e; color: #fff7e6; }
.tb-dev[data-armed] { background: #fbe0b3; font-weight: 600; }
.tb-out { margin: 5px 0 0; border-top: 1px solid #e7e5e0; padding-top: 5px; }

/* phone: icons only; search opens across the bar */
@media (max-width: 700px) {
  .tb-in { padding: 6px 12px; gap: 2px; }
  .tb-brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-search { display: none; }
  .tb-searchbtn { display: inline-flex; }
  .tb-me { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .tb-icon { width: 44px; height: 44px; }
  .tb-upload { width: 44px; min-height: 44px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .tb-upload .tb-uplabel { display: none; }
  .tb-me .tb-company, .tb-me .tb-chev { display: none; }
  .tb-me .tb-person { display: inline; }
  .tb.searching .tb-search { display: block; max-width: none; margin: 0; }
  .tb.searching .tb-brand, .tb.searching .tb-wrap, .tb.searching .tb-searchbtn { display: none; }
  .tb-notes, .tb-help { position: fixed; top: 52px; left: 8px; right: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .tb-pop { animation: none; } }
