/* The frame every Flow site shares, laid out like LifeLenz: a slim dark icon sidebar (a tab bar
   along the bottom on phones), a white header with the page title and account menu, and a light
   working surface. Markup comes from frame.js. */
body { background: oklch(97.2% 0.006 220); }
.site-foot { padding-left: 76px; }
.rl { display: grid; grid-template-columns: 68px minmax(0, 1fr); min-height: calc(100vh - 36px); }
.rl-side { background: var(--burgundy-2); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; z-index: 30; }
.rl-logo { display: grid; place-items: center; width: 56px; height: 40px; margin-bottom: 10px; }
.rl-logo img { width: 50px; height: auto; }
.rl-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.rl-nav__item { position: relative; width: 56px; padding: 8px 0 6px; border-radius: 10px; display: grid; justify-items: center; gap: 3px; text-decoration: none; color: var(--on-burgundy-muted); transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.rl-nav__item span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.1; text-align: center; }
.rl-nav__item:hover { background: var(--burgundy-3); color: var(--on-burgundy); }
.rl-nav__item[aria-current="page"] { background: color-mix(in oklch, var(--pink) 22%, transparent); color: var(--pink); box-shadow: inset 3px 0 0 var(--pink); }
.rl-badge { position: absolute; top: 3px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--urgent); color: #fff; font-size: 0.62rem; display: grid; place-items: center; }
.rl-main { min-width: 0; display: flex; flex-direction: column; }
.rl-head { position: sticky; top: 0; z-index: 25; height: 60px; background: var(--card); border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.rl-org { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 18px; border-right: 1px solid var(--rule); }
.rl-org img { height: 30px; max-width: 90px; object-fit: contain; }
.rl-org b { display: block; font-size: 0.92rem; white-space: nowrap; }
.rl-org small { display: block; font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.rl-picker select { appearance: none; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 7px 30px 7px 10px; font-weight: 600; font-size: 0.86rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23456' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; cursor: pointer; }
.rl-title { font: 600 1.05rem/1 var(--font-body); color: var(--ink); white-space: nowrap; }
.rl-head .bell { color: var(--ink-2); width: 38px; height: 38px; }
.rl-head .bell:hover { background: var(--sunk); color: var(--ink); }
.rl-me { position: relative; }
.rl-me summary { list-style: none; cursor: pointer; border-radius: 50%; }
.rl-me summary::-webkit-details-marker { display: none; }
.rl-me .avatar { border: 2px solid var(--rule-strong); background: var(--sunk); color: var(--ink-2); }
.rl-me__menu { position: absolute; right: 0; top: 46px; min-width: 220px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: 0 18px 40px -18px oklch(20% 0.05 225 / 0.4); padding: 6px; display: grid; }
.rl-me__who { padding: 10px 12px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; display: grid; }
.rl-me__menu a, .rl-me__menu button { text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-decoration: none; font-size: 0.88rem; }
.rl-me__menu a:hover, .rl-me__menu button:hover { background: var(--sunk); }
.rl-body { padding: 16px 20px 40px; min-width: 0; }
.rl-body .page { padding: 4px 0 24px; max-width: none; }
.rl-body .page--narrow { max-width: 1040px; }
.rl-body .head h1 { display: none; } /* the title is in the header */
.rl-body .head { margin-bottom: 14px; min-height: 0; }
.notes { top: 64px; }

/* sidebar items that open a small menu (Flow Admin's Helpdesk and Rosters) */
.rl-fly { position: relative; width: 100%; display: flex; justify-content: center; }
.rl-fly > summary { list-style: none; cursor: pointer; }
.rl-fly > summary::-webkit-details-marker { display: none; }
.rl-fly[open] > summary { background: var(--burgundy-3); color: var(--on-burgundy); }
.rl-fly__menu { position: absolute; left: 62px; top: 0; min-width: 210px; z-index: 40; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: 0 18px 40px -18px oklch(20% 0.05 225 / 0.45); padding: 6px; display: grid; animation: flyin 140ms var(--ease); }
@keyframes flyin { from { opacity: 0; transform: translateX(-4px); } }
.rl-fly__menu b { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 12px 4px; }
.rl-fly__menu a, .rl-me__menu a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 0.88rem; font-weight: 500; }
.rl-fly__menu a:hover { background: var(--sunk); }
.rl-fly__menu a[aria-current="page"], .rl-me__menu a[aria-current="page"] { background: var(--pink-soft); color: var(--burgundy); }
.rl-fly__menu a span, .rl-me__menu a span { color: var(--muted); }
.rl-me__menu hr { border: 0; border-top: 1px solid var(--rule); margin: 4px 0; }
.rl-me__who .key { font-size: 0.78rem; }
.rl-head .btn { flex-shrink: 0; }

/* phones: the sidebar becomes a tab bar along the bottom */
@media (max-width: 800px) {
  .rl { grid-template-columns: minmax(0, 1fr); }
  .rl-side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 62px; flex-direction: row; padding: 0 4px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--burgundy-3); }
  .rl-logo { display: none; }
  .rl-nav { flex-direction: row; justify-content: space-around; overflow-x: auto; }
  .rl-nav__item { width: auto; min-width: 58px; flex: 1; padding: 7px 2px 5px; }
  .rl-nav__item[aria-current="page"] { box-shadow: inset 0 3px 0 var(--pink); }
  .rl-head { padding: 0 12px; gap: 10px; height: 54px; }
  .rl-org { border-right: 0; padding-right: 0; }
  .rl-org small, .rl-title { display: none; }
  .rl-body { padding: 12px 12px 90px; }
  .site-foot { padding: 10px 16px 76px; }
  .rl-picker select { max-width: 140px; }
}

@media (max-width: 800px) {
  .rl-fly__menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: 70px; }
}

/* Products launcher */
.rl-apps { position: relative; }
.rl-apps > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--burgundy); }
.rl-apps > summary::-webkit-details-marker { display: none; }
.rl-apps > summary:hover, .rl-apps[open] > summary { background: var(--sunk); }
.rl-apps__menu { position: absolute; left: 0; top: 46px; width: 280px; z-index: 50; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: 0 18px 40px -18px oklch(20% 0.05 225 / 0.45); padding: 8px; display: grid; gap: 2px; animation: flyin 140ms var(--ease); }
.rl-apps__menu > b { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 10px 4px; }
.rl-apps__menu a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.rl-apps__menu a:hover { background: var(--sunk); }
.rl-apps__menu a[aria-current="page"] { background: var(--pink-soft); }
.rl-apps__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--burgundy-2); color: #fff; flex: none; }
.rl-apps__menu a b { display: block; font-size: 0.9rem; }
.rl-apps__menu a small { display: block; color: var(--muted); font-size: 0.78rem; }

/* Confirm box (frame.js ask) */
dialog.ask { max-width: 440px; }
dialog.ask h2 { font-size: 1.05rem; margin: 0 0 6px; }
dialog.ask .sub { white-space: pre-line; margin: 0 0 6px; }
.btn--danger { background: var(--urgent, #b42318); color: #fff; border-color: transparent; }
.btn--danger:hover { filter: brightness(1.08); }
dialog.ask { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 24px)); box-shadow: 0 30px 80px -20px oklch(15% 0.05 225 / 0.55); color: var(--ink); background: var(--card, #fff); animation: flyin 140ms var(--ease, ease-out); }
dialog.ask::backdrop { background: oklch(20% 0.04 225 / 0.45); }
dialog.ask form { display: grid; gap: 16px; padding: 22px; }
dialog.ask .sub { color: var(--muted); font-size: 0.9rem; }
dialog.ask .actions { display: flex; justify-content: flex-end; gap: 8px; }
