/* Rooftop sidebar and app frame */
:root { --rs-w: 236px; --rs-wc: 64px; --rs-bg: #FFFFFF; --rs-line: #E1E5EE; --rs-ink: #1B2333; --rs-muted: #5B6475; --rs-brand: #1F3A93; --rs-soft: #E8ECF7; --rs-hover: #F1F4FA; }
html.rs-on body { padding-left: var(--rs-w); transition: padding-left .18s ease; }
html.rs-on.rs-collapsed body { padding-left: var(--rs-wc); }
/* the old row of tabs across the top: the sidebar does its job now (the buttons stay in the page; the sidebar presses them) */
html.rs-on nav.lp-stabs { display: none !important; }

.rs { position: fixed; z-index: 15; /* under every pop-up box the page opens (they start at 20); nothing else overlaps it */ left: 0; top: 0; bottom: 0; width: var(--rs-w); background: var(--rs-bg); border-right: 1px solid var(--rs-line);
  display: flex; flex-direction: column; font: 14px Roboto, "Segoe UI", Arial, sans-serif; color: var(--rs-ink); transition: width .18s ease; overflow: hidden; }
html.rs-collapsed .rs { width: var(--rs-wc); }
.rs-brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--rs-line); min-height: 58px; }
.rs-mark { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--rs-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.rs-gname { font-weight: 600; font-size: 14.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-main, .rs-bottom { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; }
.rs-main { overflow-y: auto; }
.rs-bottom { border-top: 1px solid var(--rs-line); }
.rs-sp { flex: 1; }
.rs-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--rs-ink); white-space: nowrap; position: relative; }
.rs-item:hover { background: var(--rs-hover); }
.rs-item:focus-visible { outline: 2px solid var(--rs-brand); outline-offset: -2px; }
.rs-item.on { background: var(--rs-soft); color: var(--rs-brand); font-weight: 600; }
.rs-item.on::before { content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rs-brand); }
.rs-item.has-on { color: var(--rs-brand); font-weight: 600; }
.rs-ic { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rs-lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rs-chev { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--rs-muted); stroke-width: 1.8; transition: transform .15s; padding: 2px; border-radius: 4px; }
.rs-chev:hover { background: var(--rs-line); }
.rs-grp.open > .rs-item .rs-chev { transform: rotate(90deg); }
.rs-kids { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px 20px; padding-left: 12px; border-left: 1px solid var(--rs-line); }
.rs-grp.open > .rs-kids { display: flex; }
.rs-kid { padding: 6px 10px; font-size: 13.5px; color: var(--rs-muted); }
.rs-kid.on { color: var(--rs-brand); }
.rs-kid.on::before { left: -13px; }
.rs-foot { border-top: 1px solid var(--rs-line); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.rs-foot .rs-item { color: var(--rs-muted); font-size: 13px; }
.rs-by { padding: 6px 10px 2px; font-size: 11.5px; color: var(--rs-muted); white-space: nowrap; }
html.rs-collapsed .rs-col .rs-ic { transform: rotate(180deg); }

/* collapsed: icons only */
html.rs-collapsed .rs .rs-lbl, html.rs-collapsed .rs .rs-chev, html.rs-collapsed .rs .rs-gname, html.rs-collapsed .rs .rs-kids, html.rs-collapsed .rs .rs-by { display: none; }
html.rs-collapsed .rs-brand { justify-content: center; padding-left: 0; padding-right: 0; }
html.rs-collapsed .rs-item { justify-content: center; padding: 9px 0; }

/* phone and narrow windows: the menu slides in from a button */
.rs-burger, .rs-scrim { display: none; }
@media (max-width: 760px) {
  html.rs-on body, html.rs-on.rs-collapsed body { padding-left: 0; }
  .rs, html.rs-collapsed .rs { width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 10px 40px rgba(17, 24, 39, .25); z-index: 89; }
  html.rs-collapsed .rs .rs-lbl, html.rs-collapsed .rs .rs-gname, html.rs-collapsed .rs .rs-by { display: initial; }
  html.rs-collapsed .rs .rs-chev { display: block; }
  html.rs-collapsed .rs-item { justify-content: flex-start; padding: 8px 10px; }
  html.rs-mopen .rs { transform: none; }
  .rs-col { display: none !important; }
  .rs-burger { display: grid; place-items: center; position: fixed; z-index: 85; left: 10px; top: 10px; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--rs-line); background: #fff; color: var(--rs-ink); box-shadow: 0 2px 8px rgba(17, 24, 39, .12); }
  .rs-burger .rs-ic { width: 20px; height: 20px; }
  html.rs-mopen .rs-burger { display: none; }
  html.rs-mopen .rs-scrim { display: block; position: fixed; inset: 0; z-index: 88; background: rgba(17, 24, 39, .35); }
  html.rs-on body { padding-top: 50px; }
}
@media print { .rs, .rs-burger, .rs-scrim { display: none !important; } html.rs-on body { padding-left: 0 !important; } }
/* the page's footer bar starts beside the sidebar */
html.rs-on .app-foot { left: var(--rs-w); }
html.rs-on.rs-collapsed .app-foot { left: var(--rs-wc); }
@media (max-width: 760px) { html.rs-on .app-foot, html.rs-on.rs-collapsed .app-foot { left: 0; } }
/* the demo "Viewing as" switch sits beside the sidebar, not under it */
html.rs-on #rooftop-demo-as { left: calc(var(--rs-w) + 12px); }
html.rs-on.rs-collapsed #rooftop-demo-as { left: calc(var(--rs-wc) + 12px); }
@media (max-width: 760px) { html.rs-on #rooftop-demo-as, html.rs-on.rs-collapsed #rooftop-demo-as { left: 12px; } }

/* Edit menu */
.rs.rs-editing .rs-main { overflow-y: auto; }
.rs-ehead { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 10px; border-bottom: 1px solid var(--rs-line); margin-bottom: 6px; }
.rs-ehead b { font-size: 14px; }
.rs-ehead label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rs-muted); }
.rs-ehead select { flex: 1; font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--rs-line); border-radius: 6px; min-width: 0; }
.rs-ehead small { color: var(--rs-muted); font-size: 11.5px; line-height: 1.35; white-space: normal; }
.rs-erow { display: flex; align-items: center; gap: 8px; padding: 5px 4px 5px 8px; border-radius: 8px; }
.rs-erow:hover { background: var(--rs-hover); }
.rs-erow.kid { padding-left: 18px; font-size: 13px; color: var(--rs-muted); }
.rs-erow.off .rs-lbl { text-decoration: line-through; color: #A3AAB8; }
.rs-erow.off .rs-ic { opacity: .4; }
.rs-ekids { display: flex; flex-direction: column; border-left: 1px solid var(--rs-line); margin-left: 18px; }
.rs-ebtns { display: inline-flex; gap: 1px; flex: none; }
.rs-ebtns button { all: unset; width: 20px; height: 22px; text-align: center; border-radius: 5px; cursor: pointer; color: var(--rs-muted); font-size: 12px; }
.rs-ebtns button:hover { background: var(--rs-soft); color: var(--rs-brand); }
.rs-ebtns button[disabled] { opacity: .25; cursor: default; }
.rs-ebtns button[data-ehide][aria-pressed="false"] { color: var(--rs-brand); }
.rs-ein { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--rs-brand); border-radius: 5px; }
.rs-efoot { display: flex; gap: 6px; align-items: center; padding: 10px 4px 2px; }
.rs-efoot span { flex: 1; }
.rs-ebtn { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--rs-line); border-radius: 7px; background: #fff; cursor: pointer; }
.rs-ebtn.primary { background: var(--rs-brand); border-color: var(--rs-brand); color: #fff; }
.rs-toast { position: absolute; left: 8px; right: 8px; bottom: 70px; background: #1B2333; color: #fff; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; white-space: normal; }

/* ---------- the sidebar is the way around (Oct 31, 2026) ---------- */
/* the group name opens the group menu (Year shown, the owner's tools) */
.rs-brand { width: 100%; border: 0; border-bottom: 1px solid var(--rs-line); background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rs-brand:hover { background: var(--rs-hover); }
.rs-brand:focus-visible { outline: 2px solid var(--rs-brand); outline-offset: -2px; }
.rs-bchev { flex: none; width: 16px; height: 16px; margin-left: auto; fill: none; stroke: var(--rs-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.rs-collapsed .rs-bchev { display: none; }
html.rs-on:not(.phone) .app-menu > h1 { display: none; } /* on a phone the top row keeps the group, My List and Messages beside the menu button */
html.rs-on:not(.phone) #app-menu-pop { position: fixed; top: var(--rs-menu-top, 64px); left: var(--rs-menu-left, 16px); z-index: 9000; }
/* My List and Messages, above Dashboard */
.rs-acts { display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 6px; border-bottom: 1px solid var(--rs-line); }
.rs-acts[hidden] { display: none; }
.rs-act { position: relative; }
.rs-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; background: #C0392B; color: #fff; font: 700 11.5px/20px Roboto, Arial, sans-serif; text-align: center; }
.rs-hl { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #1E8449; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #CFD6E4; cursor: pointer; margin-left: 6px; }
.rs-hl[data-state="warn"] { background: #E08A00; }
.rs-hl[data-state="bad"] { background: #C0392B; }
.rs-hl + .rs-badge { margin-left: auto; }
.rs-act .rs-hl:only-of-type:not(:last-child) { margin-left: 6px; }
html.rs-collapsed .rs-badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
html.rs-collapsed .rs-hl { position: absolute; bottom: 4px; right: 8px; margin: 0; }
html.rs-on:not(.phone) .lp-titlerow .ml-btn, html.rs-on:not(.phone) #app-msgs { display: none !important; }
/* the dashboards: the sidebar picks the dashboard, so its row of dashboard buttons goes; each dashboard's own views
   (Overview, Product Advisors, Finance Managers, Pre-Sold; Internet / Phone / Coaching) take that place, bigger */
html.rs-on .db-nav .dl-sub { display: none !important; }
html.rs-on .db-nav .db-views { margin: 0; padding: 4px; border: 1px solid #D5DBE7; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(27, 35, 51, .05); align-items: center; }
html.rs-on .db-views button { font: 600 15px Roboto, Arial, sans-serif; color: #3A4458; padding: 9px 20px; margin: 0; border: 0; border-radius: 9px; }
html.rs-on .db-views button:hover { color: var(--brand, #1F3A93); background: #EEF2FB; }
html.rs-on .db-views button[aria-selected="true"] { color: #fff; background: var(--brand, #1F3A93); border: 0; box-shadow: 0 2px 6px rgba(31, 58, 147, .28); }
html.rs-on .db-views .dbv { gap: 4px; }
html.rs-on .db-views .dbv-ps { margin: 0 6px 0 0; padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
html.rs-on .db-views .dbv-ps:hover { background: #E8F5EC; color: #1E8449; }
html.rs-on .lp-ptabs { padding: 4px; gap: 4px; border-radius: 12px; border-color: #D5DBE7; background: #fff; box-shadow: 0 1px 2px rgba(27, 35, 51, .05); }
html.rs-on .lp-ptab { font-size: 15px; font-weight: 600; padding: 9px 20px; border-radius: 9px; color: #3A4458; }
html.rs-on .lp-ptab + .lp-ptab::before { display: none; }
html.rs-on .lp-ptab[aria-selected="true"] { color: #fff; background: var(--brand, #1F3A93); box-shadow: 0 2px 6px rgba(31, 58, 147, .28); }
html.rs-on.phone .db-views button, html.rs-on.phone .lp-ptab { font-size: 13.5px; padding: 8px 12px; }
/* the page's top row held the group name, My List and Messages: with those in the sidebar it folds away (the Year chip
   keeps it when you're looking at another year) */
html.rs-on:not(.phone) .lp-titlerow:not(:has(.app-yr-chip:not([hidden]))) { height: 0; min-height: 0; margin: 0; padding: 0; border: 0; overflow: visible; }
html.rs-on:not(.phone) .lp-titlerow:not(:has(.app-yr-chip:not([hidden]))) > :not(.app-menu) { display: none !important; }
html.rs-on .db-nav:not(:has(> :not([hidden]):not(.dl-sub))) { display: none !important; }
html.rs-on:not(.phone) #app-menu-pop { width: max-content; max-width: min(340px, calc(100vw - 32px)); }

/* the menu's sections (Oct 31, 2026): the logs, then the reports a little apart, then the
   Delivery Calendar on its own in green: a tool people use, not a page they read */
.rs-grp:has(> [data-rs="operating"], > [data-rs="reports"]) { margin-top: 10px; }
.rs-grp:has(> [data-rs="calendar"]) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rs-line); }
.rs-item[data-rs="calendar"] { background: #E8F5EC; color: #1E6B3A; font-weight: 600; box-shadow: inset 0 0 0 1px #BFE3CB; }
.rs-item[data-rs="calendar"] svg { stroke: #1E8449; }
.rs-item[data-rs="calendar"]:hover { background: #D7EFDF; }
.rs-item[data-rs="calendar"].on { background: #1E8449; color: #fff; box-shadow: none; }
.rs-item[data-rs="calendar"].on svg { stroke: #fff; }
.rs-item[data-rs="calendar"].on::before { background: #1E8449; }
html.rs-collapsed .rs-grp:has(> [data-rs="calendar"]) { padding-top: 8px; margin-top: 8px; }
