/* Prototype-only additions on top of bibip's styles.css: the site switch bar and site colour dots.
   Everything else comes from styles.css / charts.css unchanged. */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 0 14px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.topbar-sp { flex: 1; }
.site-pop, .range-pop { min-width: 220px; padding: 6px; }
.range-pop { left: auto; right: 0; min-width: 180px; }
.site-opt { width: 100%; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
.site-opt[aria-selected="true"] { font-weight: 600; }
.site-pop .gx-opt input { margin: 0; accent-color: var(--primary); }
.gx-fb .sdot { margin-right: 4px; }
.site-check { color: var(--ink-2); }
.link-url > .td-v { font-family: var(--mono); font-size: 12px; word-break: break-all; }
/* Partner links: one card per link, the address in an input, a full-width Save that is inactive
   until the address changes. */
.link-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.link-card { display: flex; flex-direction: column; gap: 6px; }
.link-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.link-name { font-weight: 650; font-size: 15px; }
.link-meta { text-align: right; font-size: 13px; white-space: nowrap; }
.link-label { font-size: 12px; color: var(--ink-3); }
.link-input { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.link-input.mono-in { font-family: var(--mono); font-size: 13px; }
.link-input:focus { outline: 2px solid var(--ring); outline-offset: -1px; }
.link-card.dirty .link-input { border-color: var(--accent); }
.link-hint:empty { display: none; }
.link-save { width: 100%; justify-content: center; height: 44px; font-size: 14px; margin-top: 6px; }
.link-save:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 900px) { .link-cards { grid-template-columns: minmax(0, 1fr); } }
.bad-text { color: var(--bad); }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c); vertical-align: 0; margin-right: 6px; }
.sdot.c1 { --c: var(--cat-1); } .sdot.c2 { --c: var(--cat-2); } .sdot.c3 { --c: var(--cat-3); }
.site-switch .sdot { margin-right: 0; }
.cell-sub { color: var(--ink-3); font-size: 12px; }
.mt-16 { margin-top: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
tr.selected td { background: var(--surface-2); }
.proto-note { font-size: 12px; color: var(--ink-3); margin-top: 24px; }
.kpi-value small { font-size: 13px; color: var(--ink-3); font-weight: 400; }
/* Mobile (same breakpoint as bibip's mobile header): the site dropdown moves into the header,
   the hamburger gives way to a bottom bar with the main pages and "More" for the full sidebar. */
.bottomnav { display: none; }
@media (max-width: 1000px) {
  .mobilebar #nav-toggle { display: none; }
  .mobilebar .brand-sub { display: none; }
  .mobilebar #site-switch { margin-left: auto; min-width: 0; }
  .mobilebar #site-switch .gx-fb { max-width: 42vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .mobilebar #site-switch .gx-k { display: none; }
  .mobilebar .gx-fb { padding-left: 8px; padding-right: 8px; }
  .mobilebar .site-pop, .mobilebar .range-pop { left: auto; right: 0; }
  .mobilebar #range .gx-fb > .icon:first-child { display: none; }
  .topbar { display: none; }
  .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--border);
  }
  .bottomnav a, .bottomnav button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0; background: none;
    color: var(--ink-3); font: inherit; font-size: 11px; font-weight: 500; text-decoration: none; border-radius: var(--radius-md); cursor: pointer;
  }
  .bottomnav .icon { width: 20px; height: 20px; }
  .bottomnav a.active { color: var(--ink); }
  .bottomnav a.active .icon { stroke-width: 2.4; }
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .topbar-hint { display: none; } }
/* Login */
.login-card .code-input { font-family: var(--mono); letter-spacing: .3em; font-size: 18px; text-align: center; }
.login-btn { justify-content: center; height: 40px; margin-top: 4px; }
/* Sidebar "Log out" looks like the other sidebar links */
.sidenav .nav-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-md); background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.sidenav .nav-btn:hover { background: var(--surface-2); }
.promo-code { font-family: var(--mono); font-size: 16px; font-weight: 600; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.mt-8 { margin-top: 8px; }
