/* FinCal API site header: brand left, links centred, account avatar right.
   One stylesheet for the server-rendered pages (templates/_site_header.html) and the static pages
   (app/site_bar.js). Every colour pair sets text and background together. */
.site-header { background-image: linear-gradient(to right, #003366, #005090); color: #ffffff; position: relative; z-index: 60;
               font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.site-header-inner { max-width: 80rem; margin: 0 auto; padding: 0.5rem 1.25rem; min-height: 3.25rem;
                     display: flex; align-items: center; gap: 1.5rem; }
.hdr-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: #ffffff; font-weight: 700; font-size: 1.125rem;
             letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.hdr-brand:hover { opacity: 0.9; }
.hdr-nav { flex: 1; display: flex; justify-content: center; align-items: center; gap: 0.25rem 1.5rem; }
.hdr-link { color: #ffffff; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 0.25rem 0.125rem;
            font: inherit; font-size: 0.9375rem; font-weight: 500; text-decoration: none; opacity: 0.92; cursor: pointer; }
.hdr-link:hover { opacity: 1; border-bottom-color: rgba(255, 255, 255, 0.6); }
.hdr-link.is-current { opacity: 1; font-weight: 600; border-bottom-color: #ffffff; }
.hdr-spacer { flex: 1; }
.hdr-signin { background: #ffffff; color: #003366; font-weight: 600; font-size: 0.875rem; padding: 0.375rem 1.1rem;
              border-radius: 9999px; text-decoration: none; }
.hdr-signin:hover { background: #e5edf6; color: #003366; }

/* Account avatar and menu */
.acct-menu { position: relative; margin-left: auto; }
.acct-menu > summary { list-style: none; cursor: pointer; display: block; border-radius: 9999px; }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-avatar { display: block; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: #d1d5db; color: #6b7280;
               border: 2px solid rgba(255, 255, 255, 0.75); overflow: hidden; }
.acct-menu > summary:hover .acct-avatar, .acct-menu[open] > summary .acct-avatar { border-color: #ffffff; }
.acct-menu > summary:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.acct-panel { position: absolute; right: 0; top: calc(100% + 0.6rem); width: 18rem; max-width: calc(100vw - 1.5rem);
              background: #ffffff; color: #1f2937; border: 1px solid #e5e7eb; border-radius: 0.875rem;
              box-shadow: 0 10px 25px rgba(15, 30, 51, 0.25); padding: 0.5rem 0; }
.acct-who { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem 0.875rem; }
.acct-who .acct-avatar { width: 2.75rem; height: 2.75rem; flex: none; border-color: #e5e7eb; }
.acct-who-label { font-size: 0.75rem; color: #6b7280; }
.acct-who-email { font-size: 0.9375rem; font-weight: 600; color: #111827; word-break: break-all; }
.acct-item { display: flex; width: 100%; align-items: center; padding: 0.5rem 1rem; background: #ffffff; color: #374151;
             font: inherit; font-size: 0.9375rem; text-align: left; text-decoration: none; border: 0; cursor: pointer; }
.acct-item:hover { background: #f3f4f6; color: #003366; }
.acct-item.is-current { color: #003366; font-weight: 600; }
.acct-panel form { margin: 0; }
.acct-sep { height: 1px; background: #e5e7eb; margin: 0.375rem 0; }
.acct-foot { display: flex; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem 0.375rem; font-size: 0.8125rem; color: #6b7280; }
.acct-foot a { color: #6b7280; text-decoration: none; }
.acct-foot a:hover { color: #003366; text-decoration: underline; }
.acct-mobile { display: none; }

/* Live status pill */
.hdr-status { display: inline-flex; align-items: center; gap: 0.45rem; color: #ffffff; font-size: 0.8125rem; font-weight: 500;
              text-decoration: none; padding: 0.2rem 0.7rem; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 9999px; white-space: nowrap; }
.hdr-status:hover { background: rgba(255, 255, 255, 0.12); }
.hdr-dot { width: 0.55rem; height: 0.55rem; border-radius: 9999px; background: #9ca3af; display: inline-block; }
.hdr-status.operational .hdr-dot { background: #34d399; }
.hdr-status.attention .hdr-dot { background: #fbbf24; }
.hdr-status.outage .hdr-dot { background: #f87171; }

/* Phones: links move into the account menu and rows become finger-sized */
@media (max-width: 760px) {
  .hdr-nav { display: none; }
  .hdr-status span { display: none; }
  .hdr-status { padding: 0.35rem 0.5rem; margin-left: auto; }
  .hdr-status + .acct-menu { margin-left: 0.75rem; }
  .hdr-spacer { display: none; }
  .site-header-inner { padding: 0.5rem 1rem; }
  .acct-mobile { display: block; }
  .acct-desk { display: none; }
  .acct-item { min-height: 2.75rem; }
}
