/*
 * The site header and footer: shared by the app and Setup (Django admin), so
 * they look identical everywhere. Self-contained: no variables or classes from
 * app.css or the admin's stylesheets, and specific enough to beat both.
 */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("brand/hanken-grotesk-latin-wght-normal.c501f578bf3f.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
header.nb-header, footer.nb-footer {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #181a32; color: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
header.nb-header *, footer.nb-footer * { box-sizing: border-box; }
.nb-wrap { max-width: 1400px; margin: 0 auto; }

/* Header */
header.nb-header { border-bottom: 4px solid #c4d82e; font-size: 15px; }
header.nb-header .nb-wrap { display: flex; align-items: center; gap: 12px 24px; padding: 12px 20px; flex-wrap: wrap; }
header.nb-header a.nb-brand { display: block; flex-shrink: 0; line-height: 0; opacity: 1; }
header.nb-header a.nb-brand img { height: 40px; width: 171px; min-width: 171px; display: block; }
header.nb-header nav.nb-menu { display: flex; gap: 6px 18px; flex-wrap: wrap; flex: 1 1 320px; margin: 0; padding: 0; }
header.nb-header nav.nb-menu a, header.nb-header nav.nb-menu a:link, header.nb-header nav.nb-menu a:visited {
  color: #fff; opacity: .85; text-decoration: none; white-space: nowrap; font-weight: 400; font-size: 15px; border: 0; padding: 0; }
header.nb-header nav.nb-menu a:hover { opacity: 1; text-decoration: underline; color: #fff; }
header.nb-header nav.nb-menu a[aria-current="page"] { opacity: 1; font-weight: 700; box-shadow: inset 0 -3px 0 #c4d82e; padding-bottom: 2px; }
/* Estate and Compliance dropdowns */
header.nb-header details.nb-drop { position: relative; }
header.nb-header details.nb-drop > summary { list-style: none; cursor: pointer; color: #fff; opacity: .85; white-space: nowrap;
  font-size: 15px; display: inline-flex; align-items: center; gap: 5px; }
header.nb-header details.nb-drop > summary::-webkit-details-marker { display: none; }
header.nb-header details.nb-drop > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
header.nb-header details.nb-drop[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
header.nb-header details.nb-drop > summary:hover, header.nb-header details.nb-drop[open] > summary { opacity: 1; }
header.nb-header details.nb-drop > summary:focus-visible { outline: 2px solid #c4d82e; outline-offset: 3px; border-radius: 3px; }
header.nb-header details.nb-drop > summary.current { opacity: 1; font-weight: 700; box-shadow: inset 0 -3px 0 #c4d82e; padding-bottom: 2px; }
header.nb-header .nb-drop-menu { position: absolute; top: calc(100% + 10px); left: -14px; z-index: 50; min-width: 240px;
  background: #fff; border: 1px solid #d6d7dd; border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 26, 50, .22);
  padding: 6px; display: grid; }
header.nb-header nav.nb-menu .nb-drop-menu a, header.nb-header nav.nb-menu .nb-drop-menu a:link,
header.nb-header nav.nb-menu .nb-drop-menu a:visited { color: #181a32; opacity: 1; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
header.nb-header nav.nb-menu .nb-drop-menu a:hover { background: #f2f7f7; text-decoration: none; color: #014751; }
header.nb-header nav.nb-menu .nb-drop-menu a[aria-current="page"] { box-shadow: none; background: #f2f7f7; color: #014751; font-weight: 700; padding-bottom: 8px; }
/* Round icon buttons (search, help) and the account menu: all 36px high, like the Report button */
header.nb-header .nb-tools { display: flex; gap: 8px; align-items: center; }
header.nb-header .nb-icon, header.nb-header .nb-icon:link, header.nb-header .nb-icon:visited {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(241, 242, 242, .45); background: transparent; color: #fff; cursor: pointer; padding: 0;
  font: 700 17px/1 inherit; text-decoration: none; opacity: 1; }
header.nb-header .nb-icon svg { width: 17px; height: 17px; }
header.nb-header .nb-icon:hover { background: rgba(255, 255, 255, .12); }
header.nb-header .nb-icon:focus-visible, header.nb-header .nb-avatar:focus-visible { outline: 2px solid #c4d82e; outline-offset: 2px; }
header.nb-header details.nb-user { position: relative; }
header.nb-header .nb-avatar { list-style: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: #c4d82e; color: #181a32; font-weight: 700; font-size: 14px; letter-spacing: .02em;
  cursor: pointer; user-select: none; }
header.nb-header .nb-avatar::-webkit-details-marker { display: none; }
header.nb-header .nb-avatar { position: relative; }
header.nb-header .nb-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #b42318; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center; box-shadow: 0 0 0 2px #181a32; }
header.nb-header .nb-waiting { display: grid; padding: 4px 0 6px; border-bottom: 1px solid #d6d7dd; margin-bottom: 4px; }
header.nb-header .nb-waiting small { padding: 2px 12px; color: #4f5165; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
header.nb-header details.nb-user[open] .nb-avatar { box-shadow: 0 0 0 3px rgba(196, 216, 46, .45); }
header.nb-header .nb-user-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 240px;
  background: #fff; border: 1px solid #d6d7dd; border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 26, 50, .22);
  padding: 6px; display: grid; }
header.nb-header .nb-user-who { padding: 8px 12px 10px; border-bottom: 1px solid #d6d7dd; margin-bottom: 4px; color: #181a32; }
header.nb-header .nb-user-who b { display: block; font-size: 15px; }
header.nb-header .nb-user-who small { display: block; font-size: 13px; color: #4f5165; }
header.nb-header .nb-user-menu a, header.nb-header .nb-user-menu a:link, header.nb-header .nb-user-menu a:visited,
header.nb-header .nb-user-menu button { display: block; text-align: left; color: #181a32; opacity: 1; font: inherit; font-size: 15px;
  padding: 8px 12px; border-radius: 8px; text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; }
header.nb-header .nb-user-menu a:hover, header.nb-header .nb-user-menu button:hover { background: #f2f7f7; color: #014751; }
header.nb-header .nb-user-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid #d6d7dd; }
header.nb-header a.nb-invoices { padding-top: 6px; padding-bottom: 6px; }

/* The search pop-up */
dialog.nb-search-dialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto;
  box-shadow: 0 24px 64px rgba(24, 26, 50, .35); font-family: "Hanken Grotesk", system-ui, sans-serif; color: #181a32; }
dialog.nb-search-dialog::backdrop { background: rgba(24, 26, 50, .45); }
dialog.nb-search-dialog form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #d6d7dd; margin: 0; }
dialog.nb-search-dialog form svg { width: 20px; height: 20px; flex: none; color: #4f5165; }
dialog.nb-search-dialog input { flex: 1; border: 0; font: inherit; font-size: 18px; outline: none; padding: 4px 0; background: transparent; color: #181a32; }
dialog.nb-search-dialog .nb-search-close { border: 1px solid #d6d7dd; background: #f2f7f7; border-radius: 6px; font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer; color: #4f5165; }
dialog.nb-search-dialog p { margin: 0; padding: 10px 16px 14px; font-size: 13px; color: #4f5165; }
header.nb-header a.nb-invoices, header.nb-header a.nb-invoices:link, header.nb-header a.nb-invoices:visited {
  display: inline-block; background: #c4d82e; color: #181a32; border: 1px solid #c4d82e; border-radius: 999px;
  padding: 8px 18px; font-weight: 600; font-size: 15px; line-height: 1.5; text-decoration: none; opacity: 1; }
header.nb-header a.nb-invoices:hover { background: #d3e34f; border-color: #d3e34f; color: #181a32; text-decoration: none; }
header.nb-header a.nb-invoices { white-space: nowrap; }
header.nb-header .nb-short { display: none; }
header.nb-header a.nb-invoices[aria-current="page"] { box-shadow: 0 0 0 3px rgba(196, 216, 46, .45); }
header.nb-header label.nb-year { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0;
  color: #81cbf1; font-size: 13px; font-weight: 600; float: none; width: auto; }
header.nb-header label.nb-year select { font: inherit; font-size: 15px; height: auto; background: #181a32; color: #fff;
  border: 1px solid rgba(241, 242, 242, .35); border-radius: 8px; padding: 3px 8px; margin: 0; }
header.nb-header form.nb-logout { margin: 0; display: block; }
header.nb-header form.nb-logout button { font: inherit; font-size: 15px; font-weight: 600; line-height: 1.5; text-transform: none;
  background: #fff; color: #014751; border: 1px solid #014751; border-radius: 999px; padding: 3px 12px; margin: 0; cursor: pointer; height: auto; }
header.nb-header form.nb-logout button:hover { background: #f2f7f7; }

/* Footer */
footer.nb-footer { color: #f1f2f2; font-size: 13px; margin-top: 32px; }
footer.nb-footer .nb-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px 20px; }
footer.nb-footer a, footer.nb-footer a:link, footer.nb-footer a:visited { color: #fff; text-decoration: none; font-weight: 600; }
footer.nb-footer a:hover { text-decoration: underline; }
footer.nb-footer img.nb-footer-logo { height: 22px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; vertical-align: middle; margin-right: 10px; }
footer.nb-footer .nb-footer-muted { color: rgba(241, 242, 242, .72); }

@media print { header.nb-header, footer.nb-footer { display: none; } }

/* Test site (staging) banner: impossible to miss, on every page including Setup */
.test-site-banner { background: repeating-linear-gradient(-45deg, #ffd23f, #ffd23f 14px, #f5c400 14px, #f5c400 28px);
  color: #181a32; font: 700 14px/1.2 system-ui, sans-serif; text-align: center; padding: 8px 12px; letter-spacing: .03em; }
/* Seven menu items: tighten the spacing on mid-size screens so they stay on one line */
@media (max-width: 1320px) and (min-width: 1000px) {
  header.nb-header .nb-wrap { gap: 10px 14px; flex-wrap: nowrap; }
  header.nb-header nav.nb-menu { gap: 6px 12px; flex-wrap: nowrap; }
  header.nb-header nav.nb-menu a, header.nb-header details.nb-drop > summary { font-size: 14px; white-space: nowrap; }
  header.nb-header .nb-logout button { white-space: nowrap; }
  /* A shorter Report button so the menu stays on one line */
  header.nb-header .nb-long { display: none; }
  header.nb-header .nb-short { display: inline; }
}
.test-site-banner button { margin-left: 12px; font: 600 12px/1 system-ui, sans-serif; padding: 4px 9px; border-radius: 999px;
  border: 1px solid #181a32; background: rgba(255, 255, 255, .7); color: #181a32; cursor: pointer; }

/* Insight IT support visit: shown to every member of staff while it's open */
.support-banner { background: #1d4e89; color: #fff; padding: 8px 16px; font-size: 14px; display: flex; flex-wrap: wrap;
                  align-items: center; justify-content: center; gap: 6px 14px; text-align: center; }
.support-banner form { margin: 0; display: inline; }
.support-banner button { background: #fff; color: #1d4e89; border: 0; border-radius: 999px; padding: 3px 12px;
                         font: inherit; font-weight: 600; cursor: pointer; }

/* Agreements to sign or review: administrators only */
.agreement-banner { background: #fff4e5; color: #8a5300; padding: 7px 16px; font-size: 14px; text-align: center; }
.agreement-banner a { color: inherit; font-weight: 700; margin-left: 10px; }

/* After an update, until staff open What's new */
.whatsnew-banner { background: #e7f3ec; color: #1f6b4a; padding: 7px 16px; font-size: 14px; text-align: center; }
.whatsnew-banner a { color: inherit; font-weight: 700; margin-left: 6px; }
.nb-footer-muted a { color: inherit; }

/* Phones: a compact header and the bottom tab bar (templates/estate/_tabbar.html), in the app and in Setup */
nav.tabbar { display: none; }
@media (max-width: 760px) {
  header.nb-header nav.nb-menu, header.nb-header .nb-hide-phone { display: none !important; }
  header.nb-header .nb-wrap { padding: 8px 12px; flex-wrap: nowrap; justify-content: space-between; }
  header.nb-header a.nb-brand img { height: 34px; width: 146px; min-width: 146px; }
  nav.tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #181a32; border-top: 3px solid #c4d82e; padding-bottom: env(safe-area-inset-bottom); }
  nav.tabbar a, nav.tabbar a:link, nav.tabbar a:visited { color: #fff; opacity: .8; text-decoration: none; text-align: center; font-size: 11.5px; padding: 7px 2px 8px; }
  nav.tabbar a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
  nav.tabbar a[aria-current="page"] { opacity: 1; color: #c4d82e; font-weight: 700; }
  nav.tabbar .tab-more > summary { list-style: none; cursor: pointer; color: #fff; opacity: .8; text-align: center; font-size: 11.5px; padding: 7px 2px 8px; }
  nav.tabbar .tab-more > summary::-webkit-details-marker { display: none; }
  nav.tabbar .tab-more > summary svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }
  nav.tabbar .tab-more[open] > summary, nav.tabbar .tab-more > summary.current { opacity: 1; color: #c4d82e; }
  nav.tabbar .tab-more > summary.current { font-weight: 700; }
  nav.tabbar .tab-more-menu { position: fixed; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); min-width: 200px;
    background: #fff; border: 1px solid #d6d7dd; border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 26, 50, .25); padding: 6px; display: grid; }
  nav.tabbar .tab-more-menu a, nav.tabbar .tab-more-menu a:link, nav.tabbar .tab-more-menu a:visited,
  nav.tabbar .tab-more-menu button { display: block; text-align: left; color: #181a32; opacity: 1; font: inherit; font-size: 16px;
    font-weight: 600; padding: 12px 14px; border-radius: 8px; text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; }
  nav.tabbar .tab-more-menu a:hover, nav.tabbar .tab-more-menu button:hover { background: #f2f7f7; }
  nav.tabbar .tab-more-menu hr { border: 0; border-top: 1px solid #d6d7dd; margin: 4px 0; }
  nav.tabbar .tab-more-menu form { margin: 0; border-top: 1px solid #d6d7dd; margin-top: 4px; padding-top: 4px; }
}
@media print { nav.tabbar { display: none !important; } }

/* View as (estate/impersonate.py): an administrator seeing SiteHub as someone else */
.view-as-banner { background: #5b2a86; color: #fff; padding: 8px 16px; font-size: 14px; display: flex; flex-wrap: wrap;
                  align-items: center; justify-content: center; gap: 6px 14px; text-align: center; }
.view-as-banner form { margin: 0; display: inline; }
.view-as-banner button { background: #fff; color: #5b2a86; border: 0; border-radius: 999px; padding: 4px 14px;
                         font: inherit; font-weight: 700; cursor: pointer; }
/* Small laptops and tablets in landscape (1000–1120px): a little tighter so everything stays on one line */
@media (max-width: 1120px) and (min-width: 1000px) {
  header.nb-header .nb-wrap { padding-left: 14px; padding-right: 14px; gap: 10px; }
  header.nb-header a.nb-brand img { height: 34px; width: 146px; min-width: 146px; }
  header.nb-header nav.nb-menu { gap: 6px 10px; }
  header.nb-header .nb-tools { gap: 6px; }
}
