/* Marketing, Bowranda Report (js/leadreports.js). Uses the shared tokens, so light and dark both follow styles.css. */
.lrpage { --lr-bar: var(--blue-btn); }
.lrctl { margin-bottom: 16px; }
.lrrow { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; }
.lrper { flex: 1 1 420px; }
.lrbrand { flex: 0 1 200px; }
.lrbrand select { width: 100%; }
.lrcustom { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); }
.lrcustom .fld { flex: 0 1 190px; }
.lrcustom .formact { margin: 22px 0 0; }

.lrhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lrperiod { font-size: 0.9375rem; }
.lracts { display: flex; flex-wrap: wrap; gap: 8px; }
.lracts .btn .ic { width: 16px; height: 16px; }
.lrwarn, .lrout { display: flex; gap: 8px; align-items: flex-start; font-size: 0.875rem; color: var(--grey-ink); background: var(--tint-amber); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; }
.lrout { background: var(--surface2); margin-top: 16px; }
.lrwarn .ic, .lrout .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }

.lrtiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.lrtile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-1); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lrtk { font-size: 0.875rem; font-weight: 600; color: var(--grey-ink); }
.lrtile b { font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.lrts { font-size: 0.75rem; color: var(--muted); }
.lrtile.t-good { border-left: 4px solid var(--good); }
.lrtile.t-blue { border-left: 4px solid var(--blue-btn); }

.lrchart { margin-bottom: 16px; }
.lrplot { display: flex; gap: 8px; height: 220px; padding: 8px 0 26px; }
.lraxis { position: relative; width: 28px; flex: none; }
.lraxis span { position: absolute; right: 0; transform: translateY(50%); font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrbars { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 2px; min-width: 0; border-bottom: 1px solid var(--input); }
.lrgrid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--divider); pointer-events: none; }
.lrcol { position: relative; flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.lrbar { position: relative; display: block; width: 100%; max-width: 44px; min-height: 0; background: var(--lr-bar); border-radius: 4px 4px 0 0; }
.lrbar.zero { background: transparent; }
.lrbar em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 2px; white-space: nowrap; font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--grey-ink); font-variant-numeric: tabular-nums; }
.lrcol small { position: absolute; top: 100%; margin-top: 6px; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.lrcol:hover .lrbar:not(.zero) { background: var(--blue-hover); }
.lrbars.many .lrbar em { display: none; }
.lrbars.many .lrcol:nth-of-type(even) small { visibility: hidden; }
.lrbars.many .lrcol:hover .lrbar em { display: block; }

.lrtable { margin-top: 12px; }
.lrtable summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--link); min-height: 32px; display: inline-flex; align-items: center; }
.lrtable summary:focus-visible { outline: 2px solid var(--blue-btn); outline-offset: 2px; border-radius: 4px; }
.lrtable .lrt { margin-top: 8px; max-width: 360px; }

.lrgridb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lrbox { min-width: 0; }
.lrnote { margin: 4px 0 12px; }
.lrt { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lrt th, .lrt td { padding: 7px 0; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
.lrt thead th { font-size: 0.75rem; font-weight: 700; color: var(--muted); padding-top: 0; }
.lrt tbody th { font-weight: 500; color: var(--ink); padding-right: 12px; }
.lrt tr:last-child th, .lrt tr:last-child td { border-bottom: 0; }
.lrt .num { text-align: right; width: 56px; font-variant-numeric: tabular-nums; }
.lrt tbody td.num:last-child { color: var(--muted); }
.lrname { display: block; overflow-wrap: anywhere; }
.lrmeter { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--divider); overflow: hidden; }
.lrmeter i { display: block; height: 100%; background: var(--lr-bar); border-radius: 2px; }
.lrdim th, .lrdim td { color: var(--muted); }
.lrdim .lrmeter i { background: var(--input); }

/* Where leads came from: channel > platform > campaign */
.lrdrillbox { margin-bottom: 16px; }
.lrdrillbox .sechd { margin-bottom: 6px; }
.lrdrillbox .lracts { align-items: center; gap: 4px 16px; }
.lrchk { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 0.875rem; font-weight: 500; }
.lrchk input { width: 18px; height: 18px; }
.lrdwrap { overflow-x: auto; }
.lrdrill { min-width: 320px; }
.lrdrill .lrbyc { width: 44px; min-width: 44px; padding-left: 6px; font-size: 0.8125rem; }
.lrdrill thead .lrbyc { white-space: nowrap; }
.lrdrill tbody td.num:last-child { color: inherit; }
.lrind { display: block; }
.lrd1 .lrind { padding-left: 22px; }
.lrd2 .lrind { padding-left: 44px; }
.lrd0 th { font-weight: 700; }
.lrtw { display: inline-flex; align-items: flex-start; gap: 4px; min-height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lrtw .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }
.lrtw:hover .lrname { text-decoration: underline; }
.lrtw:focus-visible { outline: 2px solid var(--blue-btn); outline-offset: 2px; border-radius: 4px; }
.lrd0 .lrind > .lrname, .lrd1 .lrind > .lrname, .lrd2 .lrind > .lrname { padding-left: 20px; }
@media (max-width: 760px) { .lrd1 .lrind { padding-left: 14px; } .lrd2 .lrind { padding-left: 28px; } }

@media (max-width: 1100px) { .lrtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1101px) { .lrtiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } } /* the KAM activity page has six tiles */
@media (max-width: 760px) {
  .lrgridb { grid-template-columns: 1fr; }
  .lrtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lrtile { padding: 12px; }
  .lrtile b { font-size: 1.375rem; }
  .lrtile:first-child { grid-column: 1 / -1; }
  .lrbars .lrcol:nth-of-type(even) small { visibility: hidden; }
  .lrbars.many .lrcol small { visibility: hidden; }
  .lrbars.many .lrcol:nth-of-type(4n+1) small { visibility: visible; }
  .lrplot { height: 200px; }
  .lrhead .lracts { width: 100%; }
  .lracts .btn { flex: 1 1 0; }
  .lrcustom .fld { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: no-preference) { .lrbar { transition: height 0.2s ease; } }
@media (forced-colors: active) { .lrbar, .lrmeter i { background: CanvasText; } }

/* Settings, Access: the Marketing column makes five columns, so on phones keep words whole and let the card scroll sideways */
@media (max-width: 640px) {
  .acct th, .acct td { overflow-wrap: normal; word-break: normal; }
  .acct thead th { font-size: 0.75rem; }
  .acct tbody th b { font-size: 0.8125rem; }
}

/* Calm pass: leads page (same header and quiet empties as the other pages) */
.ldpage .small, .rppage .small { font-size: 0.875rem; }
.rplated { margin-bottom: 16px; }
.rplated > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 2px; font-weight: 600; font-size: 0.9375rem; color: var(--ink); list-style: none; }
.rplated > summary::-webkit-details-marker { display: none; }
.rplated > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 4px; }
.rplated[open] > summary::before { transform: rotate(45deg); }
.rplated > summary .n { color: var(--red); font-weight: 700; }
.rplated > summary:focus-visible { outline: 2px solid var(--blue-btn); outline-offset: 2px; border-radius: 4px; }
.rplated > .lrbox { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .rplated > summary::before { transition: none; } }
.lrbox > .sechd { margin-bottom: 0; }
.lrbox > .sechd .btn.small { min-height: 36px; }
/* Marketing results: stacked bars (10 Oct 2026) */
.lrstack { display: flex; height: 10px; margin-top: 6px; border-radius: 5px; overflow: hidden; background: var(--divider); }
.lrstack i { display: block; height: 100%; min-width: 3px; }
.k-paid { background: var(--blue-btn); }
.k-organic { background: var(--good); }
.k-wz { background: var(--good); }
.k-nal { background: var(--input); }
.k-new { background: var(--blue-btn); }
.lrlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 10px; font-size: 0.8125rem; color: var(--muted); }
.lrlegend span { display: inline-flex; align-items: center; gap: 6px; }
.lrlegend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lrbig { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.lrbig b { font-size: 2rem; line-height: 1; }
.lrbig span { color: var(--muted); font-size: 0.875rem; }
.lrvis th[scope="row"] { width: 60%; }
.lrcamp td b { font-size: 1rem; }
@media (forced-colors: active) { .lrstack i, .lrlegend i { forced-color-adjust: none; } }

/* Bowranda Report: Bowranda blue (#1480C4) and the logo, on top of the shared tokens. Solid blue behind white text uses the deeper #0F6DAA (5.5:1). */
.lrbw { --bw: #1480C4; --bw-solid: #0F6DAA; --bw-solid-hover: #0D5F96; --bw-ink: #0E5E92; --bw-hover: #0F6DAA; --lr-bar: var(--bw); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lrbw { --bw: #2E93D6; --bw-ink: #8CCBF2; --bw-hover: #4AA5E0; } }
:root[data-theme="dark"] .lrbw { --bw: #2E93D6; --bw-ink: #8CCBF2; --bw-hover: #4AA5E0; }
.lrhero { display: flex; align-items: center; gap: 12px 24px; padding: 18px 24px; margin-bottom: 12px; border-radius: var(--r-card); background: linear-gradient(100deg, #0C5A8F 0%, #1480C4 100%); color: #fff; box-shadow: var(--sh-2); }
.lrhero-logo { display: block; flex: none; width: 96px; height: auto; }
.lrhero-text { min-width: 0; }
.lrhero h1 { margin: 0; color: #fff; font-size: 1.75rem; }
.lrhero .lede { margin: 4px 0 0; color: rgba(255, 255, 255, 0.92); font-size: 0.9375rem; }
.lrhero + .tabs, .lrhero + nav.tabs { margin-bottom: 16px; }
.lrbw .rptabs .tab[aria-current="page"] { color: var(--bw-ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--bw); }
.lrbw .btn.primary { background: var(--bw-solid); border-color: var(--bw-solid); color: #fff; }
.lrbw .btn.primary:hover { background: var(--bw-solid-hover); border-color: var(--bw-solid-hover); }
.lrbw .btn.primary:disabled { opacity: 0.55; }
.lrbw .sechead::before { content: ""; display: inline-block; width: 4px; height: 1em; margin-right: 8px; border-radius: 2px; background: var(--bw); vertical-align: -0.12em; }
.lrbw .lrtile { border-top: 3px solid var(--bw); }
.lrbw .lrtile.t-good { border-top-color: var(--good); border-left: 1px solid var(--line); }
.lrbw .lrtile.t-blue { border-left: 1px solid var(--line); }
.lrbw .lrtile b { color: var(--bw-ink); }
.lrbw .lrtile:first-child { background: var(--bw-solid); border-color: var(--bw-solid); }
.lrbw .lrtile:first-child .lrtk, .lrbw .lrtile:first-child b { color: #fff; }
.lrbw .lrtile:first-child .lrts { color: rgba(255, 255, 255, 0.88); }
.lrbw .lrcol:hover .lrbar:not(.zero) { background: var(--bw-hover); }
.lrbw .k-paid, .lrbw .k-new { background: var(--bw); }
.lrbw .lrtable summary { color: var(--bw-ink); }
@media (max-width: 760px) {
  .lrhero { padding: 14px 16px; gap: 10px 14px; }
  .lrhero-logo { width: 64px; }
  .lrhero h1 { font-size: 1.375rem; }
}
@media print { .lrhero { background: #1480C4; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (forced-colors: active) { .lrhero { border: 1px solid CanvasText; } .lrhero h1, .lrhero .lede { color: CanvasText; } }
