/* Weekly admin jobs (admin.js). App colour tokens, so light and dark follow. */
.ad { padding-bottom: 96px; max-width: 980px; }
.ad-h1 { font-size: 28px; margin: 6px 0 0; letter-spacing: -.02em; }
.ad-h { margin: 4px 0 6px; overflow-wrap: anywhere; }
.ad-box { padding: 4px 16px; margin-top: 12px; }
.ad-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ad-wrap .pill { flex: 0 1 auto; }
.ad-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.ad-dangerfill { background: var(--danger); color: #fff; }
.ad-list { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; }
.ad-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); cursor: pointer; min-width: 0; }
.ad-row:first-child { border-top: 0; }
.ad-row > span, .ad-grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ad-row b, .ad-grow b { font-weight: 600; overflow-wrap: anywhere; }
.ad-row small, .ad-grow small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ad-row input { flex: none; width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.ad-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.ad-item:first-child { border-top: 0; }
.ad-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.ad-in { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); min-width: 0; }
.ad-filters .ad-in[type=search] { flex: 1 1 220px; }
.ad-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 10px 0; }
.ad-chk input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.ad-form { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; }
.ad-field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.ad-field .ad-in { font-weight: 400; }
.ad-group { padding: 10px 16px 14px; }
.ad-rule { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.ad-rule:first-child { border-top: 0; }
.ad-val { display: flex; gap: 6px; flex: 1 1 180px; min-width: 0; }
.ad-val .ad-in { flex: 1; }
.ad-num { max-width: 80px; }
.ad-undo { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; gap: 14px; align-items: center; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.ad-undo .link { color: var(--bar); font-weight: 600; }
@media (min-width: 1000px) { .ad-undo { bottom: 24px; } }
.ad-say { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }

/* Select mode (app.js): tick books on any list, then act on all of them at once.
   The bar reuses .selbar (app.css); colours mix from the theme tokens so both themes work. */
#selbar2 > div { gap: 6px; }
#selbar2 .sel-acts { width: max-content; max-width: 100%; margin: 0 auto; }
#selbar2 .sel-acts > span:first-child { white-space: nowrap; }
#selbar2 .sel-b { background: transparent; color: var(--bg); border: 1px solid color-mix(in oklab, var(--bg) 35%, transparent); padding: 7px 11px; }
#selbar2 .sel-b:disabled { opacity: .45; }
#selbar2 .sel-x { width: 34px; height: 34px; color: var(--bg); flex: none; }
#selbar2 .sel-start { background: none; box-shadow: none; padding: 0; justify-content: flex-end; max-width: none; }
#selbar2 .sel-start .sel-b { background: var(--ink); color: var(--bg); border: none; box-shadow: var(--shadow); padding: 10px 18px; opacity: .92; }
/* On a big screen there is no tab bar: the idle Select button sits quietly in the corner,
   and the open action bar keeps to the lower middle like the Kobo page's bar. */
body.desk #selbar2 { bottom: 24px; padding-right: 24px; }
body.selmode #app a[href^="#/book/"], body.selmode #app [data-act="bundle"] { cursor: default; }
/* Picked: a slim ring drawn just inside the cover's own edge (an outline paints above the
   cover art and never gets clipped by a scrolling row), plus a tick in the corner.
   Nothing moves or shrinks, so titles stay lined up with the tiles beside them. */
#app .sel-picked .cover { outline: 2.5px solid var(--accent); outline-offset: -2.5px; }
#app .sel-picked .cover::before { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
/* A picked series stack: ring and tick only on the front cover */
#app .sel-picked .bstack .cover { outline: none; }
#app .sel-picked .bstack .cover::before { display: none; }
#app .sel-picked .bstack .cover:last-of-type { outline: 2.5px solid var(--accent); outline-offset: -2.5px; }
#app .sel-picked .bstack .cover:last-of-type::before { display: flex; }

/* Tidy up rows (admin.js drawTidy) */
a.ad-item.ad-link { color: var(--ink); text-decoration: none; align-items: center; }
.ad-chev { color: var(--muted); font-size: 22px; line-height: 1; flex: none; }
