/* Shared top bar for every page. Loaded together with site-header.js. */
.site-header {
  --bar: #0B2F57; /* matches the home page hero (--navy in styles.css) */
  position: sticky; top: 0; z-index: 50;
  background: var(--bar); color: #fff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  box-shadow: 0 6px 20px -12px rgba(0,0,0,.35);
}
.site-header * { box-sizing: border-box; }
.site-header .bar {
  background: none;
  max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 24px;
  display: flex; align-items: center; gap: 36px;
}
.site-header .logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em;
}
.site-header .logo img {
  /* The PNG has a white background, so it sits on a white tile (its navy half would vanish on the bar). */
  width: 44px; height: 36px; padding: 4px 5px; object-fit: contain;
  background: #fff; border-radius: 8px; display: block;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; opacity: .88;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: opacity .15s, border-color .15s;
}
.site-header nav a:hover { opacity: 1; }
.site-header nav a[aria-current="page"] { opacity: 1; border-bottom-color: #85B7EB; }
.site-header .actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.site-header .icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  background: none; border: 0; color: #fff; cursor: pointer; transition: background .15s;
}
.site-header .icon-btn:hover { background: rgba(255,255,255,.1); }
.site-header .icon-btn svg { width: 22px; height: 22px; }
.site-header .cta {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap;
  padding: 7px 16px; border: 2px solid #fff; border-radius: 8px; background: rgba(255,255,255,.14);
  transition: background .15s;
}
.site-header .cta:hover { background: rgba(255,255,255,.26); }
/* Signed in: the person's first name sits under "Dashboard" in glowing neon green, uppercase. */
.site-header .cta.has-name {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 16px 5px; line-height: 1.15;
}
.site-header .cta-name {
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 400; letter-spacing: .09em; text-transform: uppercase;
  color: #39FF14;
  text-shadow: 0 0 3px #39FF14, 0 0 9px rgba(57,255,20,.75), 0 0 18px rgba(57,255,20,.45);
}
/* Logout sits beside Dashboard: same height, outlined only so Dashboard stays the main button. */
.site-header .logout-btn {
  align-self: stretch; display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; cursor: pointer; background: transparent; border-color: rgba(255,255,255,.55);
}
.site-header .logout-btn:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.site-header .logout-icon { display: none; width: 18px; height: 18px; }
.site-header .menu-btn { display: none; }

/* "Are you sure you want to log out?" popup (appended to <body> by site-header.js) */
dialog.tec-confirm {
  width: min(92vw, 400px); margin: auto; padding: 24px 26px; color: #0F172A; background: #fff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; border: 0; border-top: 5px solid #0B2F57;
  border-radius: 18px; box-shadow: 0 24px 64px -16px rgba(15,23,42,.5);
}
dialog.tec-confirm::backdrop { background: rgba(15,23,42,.6); backdrop-filter: blur(3px); }
dialog.tec-confirm h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
dialog.tec-confirm p { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: #475569; }
.tec-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tec-confirm-actions button {
  font: inherit; font-size: 15px; font-weight: 700; padding: 10px 20px; border-radius: 10px; cursor: pointer;
}
.tec-confirm-actions button:disabled { opacity: .7; cursor: progress; }
.tec-confirm .tec-cancel { color: #0F172A; background: #fff; border: 1.5px solid #CBD5E1; }
.tec-confirm .tec-cancel:hover:not(:disabled) { background: #F1F5F9; }
.tec-confirm .tec-ok { color: #fff; background: #B91C1C; border: 0; }
.tec-confirm .tec-ok:hover:not(:disabled) { filter: brightness(1.1); }
.tec-confirm button:focus-visible { outline: 3px solid #85B7EB; outline-offset: 2px; }

/* Phones & small tablets: nav collapses into a menu */
@media (max-width: 760px) {
  .site-header .bar { padding: 0 12px 0 16px; gap: 12px; height: 60px; }
  .site-header .logo { font-size: 16px; }
  .site-header .logo img { width: 40px; height: 32px; }
  .site-header .actions { gap: 4px; }
  .site-header .cta { padding: 6px 12px; font-size: 13.5px; margin-left: 4px; }
  .site-header .cta.has-name { padding: 3px 12px 4px; }
  .site-header .cta-name { font-size: 10px; max-width: 100px; }
  .site-header .menu-btn { display: grid; }
  .site-header nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px 16px 14px; background: var(--bar);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,.5);
  }
  .site-header.open nav { display: flex; }
  .site-header nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header nav a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.1); color: #85B7EB; }
}
/* Narrow phones: stack the name on two lines so the bar never overflows */
@media (max-width: 440px) {
  .site-header .logo { gap: 8px; }
  .site-header .logo span { font-size: 14px; line-height: 1.15; max-width: 88px; }
  .site-header .icon-btn { width: 36px; height: 36px; }
  .site-header .cta { padding: 6px 10px; }
  .site-header .cta.has-name { padding: 3px 10px 4px; }
  .site-header .cta-name { max-width: 84px; }
  /* Not enough room for the word: Logout becomes an icon-only button (still announced as "Log out") */
  .site-header .logout-btn { padding: 6px 9px; }
  .site-header .logout-label { display: none; }
  .site-header .logout-icon { display: block; }
}

/* ---------- Shared footer (site-footer.js) ---------- */
/* Pages lay out as a column so the footer sits at the bottom even on short pages. */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main, body > .page { flex: 1 0 auto; }
.site-footer {
  margin-top: auto; padding: 28px 16px; text-align: center;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 14px; line-height: 1.6; color: #475569;
  background: #F6F8FB; border-top: 1px solid #E2E8F0;
}
.site-footer a { color: #334155; font-weight: 600; }
.site-footer a:hover { color: #0F172A; }
@media print { .site-footer { display: none; } }

/* ---------- Phone friendliness (every page) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video { max-width: 100%; }
body { overflow-wrap: break-word; }   /* long emails and links wrap instead of pushing the page wider */
button, select, summary, [role="button"] { touch-action: manipulation; }   /* no double-tap zoom delay on controls */
/* On touchscreens, small links and buttons get a comfortable (about 44px) tap area without changing how they look */
@media (hover: none) and (pointer: coarse) {
  .site-header .logo { padding: 6px 0; }
  .site-header nav a { min-height: 44px; display: flex; align-items: center; }
  .site-footer a { display: inline-block; padding: 12px 6px; }
  .linkish { padding: 12px 4px !important; min-height: 44px; }
  .pw-toggle { padding: 12px 10px !important; min-height: 44px; }
  .info { position: relative; }
  .info::after { content: ""; position: absolute; inset: -11px; }
  .tags input { min-height: 40px; }
}

