:root {
  --ops-red: #b51f35;
  --ops-red-dark: #8e1527;
  --ops-red-soft: #fff0f2;
  --ops-gold: #ffcf22;
  --ops-gold-soft: #fff6c9;
  --ops-ink: #292929;
  --ops-muted: #66645f;
  --ops-line: #dedbd2;
  --ops-paper: #fff;
  --ops-bg: #f6f5f1;
  --ops-good: #1e6638;
  --ops-warning: #8a5b00;
  --ops-danger: #9c2736;
  --ops-header-height: 72px;
  --ops-radius: 12px;
  --ops-shadow: 0 10px 28px rgba(41, 41, 41, .07);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.ops-header,
.ops-header * { box-sizing: border-box; }

.ops-header {
  position: sticky;
  top: 0;
  z-index: 500;
  min-height: var(--ops-header-height);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 9px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid var(--ops-line);
  background: rgba(255, 255, 255, .98);
  color: var(--ops-ink);
  box-shadow: 0 7px 22px rgba(41, 41, 41, .07);
  font: 14px/1.25 Inter, "Segoe UI", Arial, sans-serif;
}

.ops-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.ops-brand-logo {
  display: block;
  width: 96px;
  max-height: 50px;
  object-fit: contain;
  border-radius: 5px;
}

.ops-brand-fallback {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--ops-red);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.ops-brand-copy { min-width: 0; }
.ops-brand-copy > span,
.ops-context > span {
  display: block;
  color: var(--ops-red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.ops-brand-copy > strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  white-space: nowrap;
}

.ops-context {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--ops-line);
}
.ops-context > strong {
  display: block;
  max-width: 430px;
  margin-top: 3px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.ops-identity { margin-right: 3px; text-align: right; }
.ops-identity > strong,
.ops-identity > span { display: block; }
.ops-identity > strong { font-size: 12px; }
.ops-identity > span {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 10px;
  text-transform: capitalize;
}
.ops-logout { margin: 0; }
.ops-control {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: #fff;
  color: #45433f;
  font: 750 12px/1.2 Inter, "Segoe UI", Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.ops-control:hover { border-color: var(--ops-red); color: var(--ops-red); }

.ops-account-menu { display: none; margin-left: auto; position: relative; }
.ops-account-menu > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  max-width: 150px;
  padding: 8px 11px;
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  color: var(--ops-ink);
  font-weight: 800;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.ops-account-summary-label { display: none; }
.ops-account-summary-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-account-menu > summary::-webkit-details-marker { display: none; }
.ops-account-menu[open] > summary { border-color: var(--ops-red); }
.ops-account-menu > div {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 210px;
  padding: 7px;
  border: 1px solid var(--ops-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--ops-shadow);
}
.ops-menu-identity,
.ops-account-menu a,
.ops-account-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ops-ink);
  font: 750 12px/1.3 Inter, "Segoe UI", Arial, sans-serif;
  text-align: left;
  text-decoration: none;
}
.ops-menu-identity { color: var(--ops-muted); font-size: 10px; }
.ops-account-menu a:hover,
.ops-account-menu button:hover { background: var(--ops-red-soft); color: var(--ops-red-dark); }
.ops-account-menu form { margin: 0; }

.ops-header a:focus-visible,
.ops-header button:focus-visible,
.ops-header summary:focus-visible {
  outline: 3px solid rgba(255, 207, 34, .8);
  outline-offset: 2px;
}

.ops-header--hub { min-height: 94px; }
.ops-header--hub .ops-brand-logo { width: 136px; max-height: 70px; }
.ops-header--hub .ops-brand-copy > strong { font-size: 19px; }

/* Protected static applications served by app_wrapper.php. */
.ops-header + .app { min-height: calc(100vh - var(--ops-header-height)); }
.ops-header + .app .sidebar {
  top: var(--ops-header-height);
  height: calc(100vh - var(--ops-header-height));
}
.ops-header + .app .main > .topbar { top: var(--ops-header-height); }
.ops-header + .wrap { padding-top: 20px; }
.ops-header + .wrap .report-auth-controls { display: none; }

@media (max-width: 900px) {
  .ops-brand-copy > strong { display: none; }
  .ops-context { padding-left: 13px; }
}

@media (max-width: 680px) {
  :root { --ops-header-height: 62px; }
  .ops-header { gap: 10px; padding: 7px 10px; }
  .ops-brand-logo { width: 74px; max-height: 44px; }
  .ops-brand-copy { display: none; }
  .ops-context { padding-left: 10px; }
  .ops-context > strong { max-width: 42vw; font-size: 13px; }
  .ops-account--desktop { display: none; }
  .ops-account-menu { display: block; }
  .ops-account-menu > summary { max-width: 112px; }
  .ops-account-summary-name { display: block; }
  .ops-header--hub { min-height: var(--ops-header-height); }
  .ops-header--hub .ops-brand-logo { width: 88px; max-height: 48px; }
}

@media (max-width: 460px) {
  .ops-account-summary-name { display: none; }
  .ops-account-summary-label { display: block; }
  .ops-account-menu > summary { max-width: none; }
}

@media print {
  .ops-header { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ops-header *, .ops-header *::before, .ops-header *::after { scroll-behavior: auto !important; transition: none !important; }
}
