/* SNT Dashboards. #F4F3EF is the reports' own page and outspace color, so loading and letterboxing blend in;
   #2A78D6 is the reports' button blue. */
:root { color-scheme: light; --bar: 44px; --blue: #2A78D6; --blue-dark: #1F5FAD; --ink: #323130; --ink2: #52514E; --line: #E1E0D9; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #F4F3EF;
  color: var(--ink);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* The bar: the dashboards this viewer can open, then Reset, ? and full screen. */
#bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar);
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0 8px 0 16px;
  box-sizing: border-box;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
#brand {
  align-self: center;
  margin-right: 14px;
  color: #605E5C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
#tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
#tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  color: var(--ink2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tab:hover, .tab:focus-visible { color: var(--blue); background: #F3F8FD; outline: none; }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab .ext { font-size: 12px; opacity: 0.75; }

#tools { display: flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 8px; }

/* Reset: labeled, white with the reports' blue outline at rest, solid blue once the viewer has clicked or filtered something. */
#reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px 0 11px;
  border: 1.5px solid var(--blue);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--blue);
  font: 600 14px/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#reset:hover, #reset:focus-visible { background: #EAF2FC; }
#reset.on { background: var(--blue); color: #FFFFFF; }
#reset.on:hover, #reset.on:focus-visible { background: var(--blue-dark); border-color: var(--blue-dark); }
#reset[hidden] { display: none; }
#reset svg { width: 16px; height: 16px; }
#reset svg, #helpbox .pill svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#helpbox .pill svg { width: 12px; height: 12px; vertical-align: -1px; }

#help, #fs {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #F4F3EF;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s;
}
#help { font: 600 16px/30px "Segoe UI", system-ui, sans-serif; }
#fs { padding: 6px; }
#help:hover, #help:focus-visible, #fs:hover, #fs:focus-visible { background: #E8E6DF; }
#fs[hidden] { display: none; }
#fs svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#fs .exit { display: none; }
#fs.on .enter { display: none; }
#fs.on .exit { display: inline; }

/* One container per dashboard opened so far; switching back is instant and keeps where you were. */
#views { position: fixed; top: var(--bar); left: 0; right: 0; bottom: 0; }
.view { position: absolute; inset: 0; }
.view[hidden] { display: none; }
.view iframe { border: 0; display: block; }

#status {
  position: fixed;
  top: var(--bar);
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #F4F3EF;
  z-index: 1;
}
#status[hidden] { display: none; }
#status .card { max-width: 440px; text-align: center; }
#msg { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
#detail { margin: 0 0 14px; color: #605E5C; }
#detail:empty { display: none; }
.nowrap { white-space: nowrap; }
#retry, #switch {
  font: inherit;
  margin: 0 4px;
  padding: 6px 16px;
  border: 1px solid #8A8886;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
#switch { border-color: var(--blue); background: var(--blue); color: #FFFFFF; }
#switch[hidden], #retry[hidden] { display: none; }

/* The getting-around card. */
#helpbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(11, 11, 11, 0.28);
  z-index: 3;
}
#helpbox[hidden] { display: none; }
#helpbox li[hidden] { display: none; }
#helpbox .panel {
  max-width: 500px;
  padding: 20px 24px 18px;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
#helpbox h2 { margin: 0 0 10px; font-size: 18px; }
#helpbox ul { margin: 0 0 16px; padding-left: 18px; }
#helpbox li { margin: 0 0 8px; }
#helpbox .pill {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: #EAF2FC;
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}
#helpbox .pill.off { border-color: #C9C7C0; background: #FFFFFF; color: #9E9C96; }
#helpok {
  display: block;
  margin-left: auto;
  padding: 6px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #FFFFFF;
  font: 600 14px "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
#helpok:hover, #helpok:focus-visible { background: var(--blue-dark); }

/* Phones: drop the name, keep the tabs and tools. */
@media (max-width: 640px) {
  #bar { padding-left: 8px; }
  #brand { display: none; }
  .tab { padding: 0 10px; font-size: 14px; }
  #reset span { display: none; }
  #reset { padding: 0 7px; }
}
