:root { --itop-h: calc(56px + env(safe-area-inset-top, 0px)); }
html { overscroll-behavior-y: none; }
body { padding-top: var(--itop-h) !important; }
header.itop {
  position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; z-index: 1000 !important;
  height: var(--itop-h) !important; min-height: 0 !important; box-sizing: border-box !important; margin: 0 !important;
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 0.6rem !important;
  padding: env(safe-area-inset-top, 0px) max(1.1rem, calc((100% - 28rem) / 2 + 1.1rem)) 0 !important;
  background: #000 !important; border: 0 !important; border-bottom: 1px solid #1f1f1f !important;
  backdrop-filter: none !important; transform: translateZ(0); will-change: transform;
  font-family: var(--font, "Helvetica Neue", Helvetica, Arial, sans-serif);
}
@media (min-width: 768px) {
  header.itop { padding-left: max(1.5rem, calc((100% - min(64rem, 94vw)) / 2 + 1.5rem)) !important; padding-right: max(1.5rem, calc((100% - min(64rem, 94vw)) / 2 + 1.5rem)) !important; }
}
header.itop .brand {
  display: flex !important; align-items: center !important; gap: 0.45rem !important; min-height: 44px; margin: 0 !important; padding: 0 !important;
  font: 700 0.68rem/1 var(--font, "Helvetica Neue", Helvetica, Arial, sans-serif) !important; letter-spacing: 0.14em !important;
  text-transform: uppercase !important; color: #fff !important; text-decoration: none !important; opacity: 1 !important; flex: none; white-space: nowrap;
}
header.itop .brand img { width: 1.45rem !important; height: 1.45rem !important; border-radius: 0 !important; display: block; }
header.itop .top-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 1; min-width: 0; margin: 0; }
header.itop .quote-link { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.35rem 0.55rem; border: 1px solid #3a3a3a; border-radius: 999px; color: #fff; text-decoration: none; white-space: nowrap; }
header.itop .quote-link.has-items { border-color: #fff; }
header.itop .quote-badge[hidden] { display: none; }
header.itop .quote-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15rem; height: 1.15rem; margin-left: 0.25rem; padding: 0 0.3rem; border-radius: 999px; background: #fff; color: #000; font-size: 0.65rem; }
header.itop .acct-btn { position: static !important; margin: 0 -0.45rem 0 0 !important; }
/* the ADMIN button: identical everywhere */
.itop-admin {
  flex: none; display: inline-flex; align-items: center; justify-content: center; height: 2rem; margin: 0; padding: 0 0.85rem;
  background: #fbbf24 !important; color: #000 !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important;
  font: 700 0.72rem/1 system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif !important; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none !important; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.itop-admin:disabled { opacity: 0.6; }
.itop-name {
  flex: 0 1 auto; min-width: 0; max-width: 11rem; height: 2rem; box-sizing: border-box; display: inline-flex; align-items: center; padding: 0 0.7rem;
  background: #111; color: #fff; border: 1px solid #fbbf24; border-radius: 999px; font: 600 0.72rem/1 system-ui, -apple-system, Arial, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: calc(2rem - 2px);
}
/* owner view-as pill: same shape as the Quote pill, name stays title case so "Pags" / account names read naturally */
.itop-viewas {
  flex: 0 1 auto; min-width: 0; max-width: 11rem; height: 2rem; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0 0.7rem;
  background: transparent; color: #fff; border: 1px solid #3a3a3a; border-radius: 999px; box-shadow: none;
  font: 700 0.65rem/1 var(--font, "Helvetica Neue", Helvetica, Arial, sans-serif); letter-spacing: 0.06em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.itop-viewas:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* phone while logged in as a customer: account button shows the icon only so name + ADMIN fit */
@media (max-width: 520px) {
  header.itop.is-imp .acct-label,
  header.itop.is-owner .acct-label { display: none; }
  header.itop.is-imp .itop-name { max-width: 7.5rem; }
  header.itop.is-owner .itop-viewas { max-width: 6.5rem; }
  header.itop.is-imp .top-actions,
  header.itop.is-owner .top-actions { gap: 0.35rem; }
}

/* account picker (owner view-as + multi-account customers). z-index above the fixed header. */
.pick-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:flex-start;justify-content:center;z-index:2000;padding:6vh 16px;overflow:auto}
.pick-box{background:#fff;color:#111;border-radius:14px;max-width:460px;width:100%;padding:22px;box-shadow:0 10px 40px rgba(0,0,0,.25)}
.pick-box h2{margin:0 0 6px;color:#111;font-size:1.15rem}
.pick-search{width:100%;color:#111;background:#fff;box-sizing:border-box;padding:12px;font-size:16px;border:1px solid #ccc;border-radius:10px;margin:8px 0}
.pick-count{font-size:13px;margin:4px 0 8px}
.pick-list{list-style:none;margin:0 0 12px;padding:0;max-height:55vh;overflow:auto}
.pick-btn{display:block;color:#111;width:100%;text-align:left;background:#f6f6f6;border:1px solid #e3e3e3;border-radius:10px;padding:12px 14px;margin:0 0 8px;cursor:pointer;font:inherit}
.pick-btn:hover,.pick-btn.current{border-color:#111;background:#fff}
.pick-name{display:block;font-weight:600}
.pick-email{display:block;font-size:13px;color:#666}
.pick-box .muted{color:#555}
.pick-actions{display:flex;flex-direction:column;gap:0.55rem;align-items:stretch}
.pick-back{
  display:inline-flex;align-items:center;justify-content:center;height:2.2rem;margin:0;padding:0 0.9rem;
  background:transparent;color:#111;border:1px solid #111;border-radius:999px;cursor:pointer;
  font:700 0.78rem/1 system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
}
.pick-box .btn.ghost, .pick-box .acct-wide{
  display:inline-flex;align-items:center;justify-content:center;width:100%;height:2.2rem;margin:0;padding:0 0.9rem;
  background:transparent;color:#111;border:1px solid #ccc;border-radius:999px;cursor:pointer;
  font:700 0.78rem/1 system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
}
/* pages that used other headers/buttons: hidden in favour of the one top menu */
.adm-yb, .adm-back-link, .imp-bar { display: none !important; }
/* jobs board: its own header becomes a plain title row under the top menu (logo already in the menu) */
.adm-skin-board .site-header { position: static !important; top: auto !important; padding-top: 0.45rem !important; }
.adm-skin-board .site-header .lockup { display: none !important; }
/* jobs board: its own header becomes a plain title row under the top menu (logo already in the menu) */
.adm-skin-board .site-header { position: static !important; top: auto !important; padding-top: 0.45rem !important; }
.adm-skin-board .site-header .lockup { display: none !important; }
