/*
 * WeatherWire Network Operations Center
 * Matches the established WWXN brand tokens from public/assets/portal.css
 * and public/assets/style.css. No separate brand identity is introduced.
 *
 * Brand: navy #0b214d, signal blue #075be5, blue-dark #0849b5,
 * sky #008cdb, paper #f4f8ff, muted #526380, line #c9d8ee.
 * Typeface: Arial Narrow / Roboto Condensed / Segoe UI / Arial.
 * Pattern: existing WW masthead, independent NOC operations navigation.
 */
body.noc-portal {
  --noc-navy: #0b214d;
  --noc-blue: #075be5;
  --noc-blue-dark: #0849b5;
  --noc-sky: #008cdb;
  --noc-paper: #f4f8ff;
  --noc-white: #fff;
  --noc-ink: #101f40;
  --noc-muted: #526380;
  --noc-line: #c9d8ee;
  --noc-focus: #f0a313;
  --noc-danger: #9c2132;
  margin: 0;
  min-width: 360px;
  min-height: 100dvh;
  background: var(--noc-paper);
  color: var(--noc-ink);
  font: 400 15px/1.48 "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}
.noc-portal *, .noc-portal *::before, .noc-portal *::after {
  box-sizing: border-box;
}
.noc-portal a { color: var(--noc-blue-dark); }
.noc-portal :focus-visible {
  outline: 3px solid var(--noc-focus) !important;
  outline-offset: 3px;
}
.noc-skip {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--noc-white);
  color: var(--noc-ink);
}
.noc-skip:focus { top: 12px; }

/* Established WeatherWire white masthead / blue line / actual symbol. */
.noc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  min-height: 74px;
  padding: 10px clamp(16px, 2.5vw, 38px);
  background: #fff;
  border-bottom: 3px solid var(--noc-blue);
  box-shadow: 0 2px 8px #142f5615;
}
.noc-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--noc-navy) !important;
  text-decoration: none;
  flex: 0 1 auto;
}
.noc-mark:hover { text-decoration: none; }
.noc-mark img {
  display: block;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.noc-brand-lines {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.noc-brand-lines strong {
  font-size: 21px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -.6px;
  white-space: nowrap;
}
.noc-brand-lines strong span { font-size: 19px; }
.noc-brand-lines small {
  margin-top: 3px;
  color: var(--noc-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}
.noc-brand-tag {
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--noc-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
  white-space: nowrap;
}
.noc-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px 18px;
}
.noc-workspace-label {
  padding-left: 12px;
  border-left: 3px solid var(--noc-blue);
  color: var(--noc-navy);
  font-size: 13px;
  font-weight: 800;
}
.noc-workspace-label small {
  display: block;
  margin-top: 2px;
  color: var(--noc-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}
.noc-user {
  max-width: 240px;
  color: var(--noc-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.noc-switch {
  color: var(--noc-blue-dark) !important;
  font-weight: 750;
  text-decoration: none;
}
.noc-switch:hover { text-decoration: underline; }
.noc-header-actions form { margin: 0; }
.noc-header-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #9cb4d4;
  border-radius: 4px;
  background: #fff;
  color: var(--noc-blue-dark);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.noc-header-actions button:hover { background: #e8f1fe; }

/* The independent app uses a WeatherWire navy operations rail, not the
   account portal's multi-purpose navigation or the public map tabs. */
.noc-frame {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: calc(100dvh - 130px);
}
.noc-rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 24px 12px;
  background: var(--noc-navy);
  color: #fff;
}
.noc-rail nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.noc-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.noc-nav-group h2 {
  margin: 0 12px 8px;
  color: #d5e5ff;
  font: 800 15px/1.4 "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}
.noc-nav-group a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  color: #e9f3ff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  text-decoration: none;
}
.noc-nav-group a:hover {
  background: #24477b;
  border-left-color: #67cafe;
  color: #fff;
}
.noc-nav-group a[aria-current="page"] {
  background: var(--noc-blue);
  border-left-color: #67cafe;
  color: #fff;
  font-weight: 850;
}
.noc-nav-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.noc-rail-note {
  margin: auto 12px 0;
  padding-top: 24px;
  border-top: 1px solid #34527d;
  color: #d5e5ff;
  font-size: 12px;
  line-height: 1.55;
}

/* Full-width NOC operational workspace. The WW component typography,
   data tables, action buttons and forms remain available from portal.css. */
.noc-content {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  padding: clamp(24px, 3.2vw, 55px) !important;
}
.noc-content h1 {
  color: var(--noc-navy);
  font: 850 clamp(30px, 3.3vw, 48px)/1.12 "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
  letter-spacing: -1.3px;
}
.noc-content h2,
.noc-content h3 {
  color: var(--noc-navy);
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}
.noc-content .wwx-pagehead {
  border-bottom: 1px solid var(--noc-line);
}
.noc-content .wwx-pagehead p {
  max-width: 850px;
  color: var(--noc-muted);
}
.noc-content .wwx-metrics > div,
.noc-content .wwx-facts > div {
  border-top-color: var(--noc-blue);
}
.noc-content .wwx-metrics strong,
.noc-content .wwx-facts dd,
.noc-content .wwx-details dd {
  color: var(--noc-navy);
}
.noc-content .wwx-metrics span,
.noc-content .wwx-facts dt,
.noc-content .wwx-details dt {
  color: var(--noc-muted);
}
.noc-content .wwx-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  box-shadow: 0 1px 4px #122e5110;
}
.noc-content thead th {
  background: #e9f2ff;
  border-bottom: 2px solid #bfd1e9;
  color: var(--noc-navy);
}
.noc-content tbody tr:hover { background: #f8fbff; }
.noc-content tbody th { color: var(--noc-navy); }
.noc-content .wwx-operation-links a { border-color: var(--noc-line); }
.noc-content .wwx-operation-links a:hover { background: #e8f1fe; }
.noc-content .wwx-operation-links strong { color: var(--noc-navy); }
.noc-content .wwx-operation-links span { color: var(--noc-muted); }
.noc-content .wwx-noc-filter button,
.noc-content .wwx-node-filter button,
.noc-content .wwx-inline-form button {
  background: var(--noc-blue-dark);
  border-color: var(--noc-blue-dark);
  color: #fff;
}
.noc-content .wwx-noc-filter button:hover,
.noc-content .wwx-node-filter button:hover,
.noc-content .wwx-inline-form button:hover {
  background: var(--noc-blue);
}
.noc-content .wwx-action button { color: var(--noc-blue-dark); }
.noc-content .wwx-action button.wwx-danger { color: var(--noc-danger); }
.noc-content :is(input, select, textarea) { accent-color: var(--noc-blue); }

/* Staff sign-in. The NOC origin is visually related to the user portal
   without confusing its separate authentication and authorization scope. */
.noc-auth-content {
  min-height: calc(100dvh - 135px);
  padding: clamp(36px, 6vw, 82px) 20px;
}
.noc-auth-content .wwx-login {
  width: min(100%, 530px);
  margin: 0 auto;
}
.noc-auth-content .wwx-login h1 {
  color: var(--noc-navy);
  font-size: clamp(31px, 4vw, 45px);
  font-weight: 850;
  letter-spacing: -1px;
}
.noc-auth-content .wwx-login p { color: var(--noc-muted); }
.noc-auth-content .wwx-login label { color: var(--noc-navy); }
.noc-auth-content .wwx-login button {
  background: var(--noc-blue);
  border-color: var(--noc-blue);
  border-radius: 4px;
  color: #fff;
}
.noc-auth-content .wwx-login button:hover { background: var(--noc-blue-dark); }
.noc-auth-content .wwx-error { color: #8b172a !important; }
.noc-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 22px;
  min-height: 54px;
  padding: 15px clamp(16px, 2.5vw, 38px);
  border-top: 1px solid var(--noc-line);
  background: #fff;
  color: var(--noc-muted);
  font-size: 12px;
}
@media (max-width: 1060px) {
  .noc-frame { grid-template-columns: 208px minmax(0,1fr); }
  .noc-rail { padding-inline: 8px; }
  .noc-content { padding: 25px !important; }
  .noc-header-actions { gap: 8px 12px; }
}
@media (max-width: 820px) {
  .noc-frame { grid-template-columns: minmax(0,1fr); }
  .noc-rail { padding: 11px 12px; }
  .noc-rail nav { flex-direction: row; flex-wrap: wrap; gap: 5px 20px; }
  .noc-nav-group { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 3px; }
  .noc-nav-group h2 { margin: 0 8px; }
  .noc-nav-group a { min-height: 40px; padding: 8px 10px; border-left: 0; border-bottom: 3px solid transparent; border-radius: 4px; }
  .noc-nav-group a[aria-current="page"] { border-bottom-color: #67cafe; }
  .noc-rail-note { display: none; }
}
@media (max-width: 600px) {
  .noc-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .noc-header-actions { justify-content: flex-start; width: 100%; }
  .noc-workspace-label { width: 100%; }
  .noc-mark img { width: 44px; height: 44px; }
  .noc-brand-lines strong { font-size: 19px; }
  .noc-brand-lines strong span { font-size: 17px; }
  .noc-brand-lines small { font-size: 9px; }
  .noc-rail nav { display: block; }
  .noc-nav-group { display: flex; gap: 1px; padding-bottom: 10px; }
  .noc-nav-group h2 { flex-basis: 100%; margin: 5px 8px; }
  .noc-nav-group a { font-size: 13px; min-height: 38px; }
  .noc-nav-icon { width: 16px; height: 16px; }
  .noc-content { padding: 22px 14px !important; }
  .noc-content .wwx-metrics,
  .noc-content .wwx-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .noc-footer { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .noc-portal *, .noc-portal *::before, .noc-portal *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
