/* Book Marked Tales team studio: sign-in, password and welcome pages (public) and the team admin page (this PC only).
   Brand (Kevin 2026-10-02: "brand this for BookMarked Tales"), from H:\Claude\BookMarkedTales\brand\README.md and the app's
   "Navy" theme: navy #0D1A40 book, teal #157D87 ribbon (bright #1FA6B1 on navy), cream #FAF9F6 page.
   Libre Caslon Text = "Book Marked" and headings, Great Vibes = "Tales", Atkinson Hyperlegible = body. */
:root {
  --bg: #0A1230; --bg2: #0E1838; --panel: #142046; --panel2: #1B2953; --line: #2B3B6A;
  --ink: #FAF9F6; --dim: #B7C0D4; --faint: #7F8AA6;
  --teal: #1FA6B1; --teal2: #3CC0C9; --on-teal: #061A24; --teal-d: #157D87; --navy: #0D1A40; --cream: #FAF9F6;
  --red: #FF8A80; --green: #4FD1A5;
  --display: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --script: 'Great Vibes', 'Segoe Script', cursive;
  --body: 'Atkinson Hyperlegible', 'Helvetica Neue', Arial, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.5 var(--body); }
a { color: var(--teal2); }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 19px; margin: 0 0 10px; }
small { color: var(--dim); font-weight: 400; }
label { display: block; font-weight: 700; margin: 16px 0 6px; }
input, select { width: 100%; font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 13px; }
input::placeholder { color: var(--faint); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---- the wordmark: the mark, "Book Marked" in Caslon, "Tales" in teal script (as in the app's header) ---- */
.tbrand { display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; color: var(--ink); }
.tbrand img { width: 58px; height: 58px; border-radius: 12px; flex: none; }
.wm { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.wm1 { font: 700 27px/1 var(--display); color: var(--ink); letter-spacing: -.01em; }
.wm2 { font: 400 42px/1 var(--script); color: var(--teal); margin-top: -4px; }
/* the logo's rule-and-star line under "Tales" */
.teyebrow { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; color: var(--teal2); font: 700 12px/1 var(--body);
  letter-spacing: .22em; text-transform: uppercase; }
.teyebrow::before, .teyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--teal-d)); }
.teyebrow::after { background: linear-gradient(90deg, var(--teal-d), transparent); }
.teyebrow i { font-style: normal; font-size: 13px; letter-spacing: 0; }

/* ---- public pages ---- */
.tpage { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, #17295c 0%, transparent 60%), var(--bg); }
.tshell { width: 100%; max-width: 440px; }
.tshell.wide { max-width: 760px; }
.thead { text-align: center; margin-bottom: 22px; }
.tbox { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.tbtn { display: inline-block; margin-top: 22px; width: 100%; text-align: center; text-decoration: none; font: 700 17px/1 var(--display);
  color: var(--on-teal); background: var(--teal); border: 0; border-radius: 8px; padding: 14px 16px; cursor: pointer; }
.tbtn:hover { background: var(--teal2); }
.terr { background: #3A1622; border: 1px solid #7A2A3A; color: #ffd2cc; border-radius: 8px; padding: 10px 12px; margin: 0 0 6px; }
.tnote { color: var(--dim); font-size: 14px; margin: 18px 0 0; text-align: center; }
.tfoot { color: var(--faint); font-size: 13px; text-align: center; margin-top: 18px; }
.ttiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; margin-top: 20px; }
.ttile { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; text-decoration: none; color: var(--ink);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.ttile:hover { border-color: var(--teal); }
.ttile img { width: 52px; height: 52px; border-radius: 10px; }
.ttile b { display: block; font: 700 19px/1.2 var(--display); color: var(--ink); margin-bottom: 6px; }
.ttile span { color: var(--dim); font-size: 14px; }
.ttile.main { border-color: var(--teal-d); }
.ttile.main b { color: var(--teal2); }

/* ---- admin page ---- */
.adm { max-width: 1180px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 36px) 60px; }
.adm > header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.adm > header .tbrand { justify-content: flex-start; }
.adm > header .tbrand img { width: 46px; height: 46px; }
.adm > header .wm1 { font-size: 23px; }
.adm > header .wm2 { font-size: 36px; }
.adm > header .tag { color: var(--teal2); font: 700 12px var(--body); letter-spacing: .22em; text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 16px; }
.adm > header p { margin: 0; color: var(--dim); flex-basis: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.btn { font: 700 14px/1 var(--display); color: var(--ink); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--teal); }
.btn.gold { background: var(--teal); color: var(--on-teal); border-color: var(--teal); }
.btn.gold:hover { background: var(--teal2); }
.btn.danger { color: #ffd2cc; border-color: #7A2A3A; }
.btn:disabled { opacity: .5; cursor: default; }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--dim); font-weight: 700; font-size: 13px; }
td b { font-family: var(--display); }
td .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-block; font: 700 12px var(--body); padding: 3px 9px; border-radius: 999px; background: var(--panel2); color: var(--dim); }
.pill.on { background: rgba(79, 209, 165, .16); color: #9ee9cf; }
.pill.off { background: rgba(255, 138, 128, .16); color: #ffc2bb; }
.pill.gold { background: rgba(31, 166, 177, .18); color: var(--teal2); }
.form4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0 14px; }
.secret { font: 700 20px/1.3 "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; color: var(--cream); background: var(--bg);
  border: 1px dashed var(--teal); border-radius: 8px; padding: 12px 14px; margin: 10px 0; word-break: break-all; }
.url { font: 14px "Cascadia Mono", Consolas, monospace; word-break: break-all; }
.feed { max-height: 460px; overflow: auto; font-size: 13px; }
.feed div { padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.feed time { color: var(--dim); }
.feed .bad { color: #ffb0a6; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--teal);
  padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: calc(100vw - 32px); }
@media (max-width: 700px) {
  .feed div { grid-template-columns: 1fr; gap: 2px; }
  .adm > header .tag { border-left: 0; padding-left: 0; }
  .wm1 { font-size: 23px; } .wm2 { font-size: 36px; } .tbrand img { width: 48px; height: 48px; }
}

/* ---- admin: setting a person's password (Kevin 2026-10-02) ---- */
.pwrow { display: flex; gap: 8px; }
.pwrow input { flex: 1; min-width: 0; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 14px 0 0; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
dialog { width: min(460px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
dialog::backdrop { background: rgba(10, 18, 48, .78); }
dialog h2 { margin-top: 0; }

/* ---- admin: click a name to copy their sign-in message (Kevin 2026-10-02) ---- */
.namebtn { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: var(--ink); font: 700 15px/1.3 var(--display);
  text-align: left; border-bottom: 1px dashed var(--teal-d); }
.namebtn:hover { color: var(--teal2); border-bottom-color: var(--teal2); }
.namebtn span { font-size: 12px; opacity: .7; }
textarea { width: 100%; font: 14px/1.5 var(--body); color: var(--ink); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 13px; resize: vertical; }
textarea:focus { outline: 2px solid var(--teal); outline-offset: 2px; }

/* "hidden" must win over display rules like label.check { display: flex } */
[hidden] { display: none !important; }

/* ---- sign-in / password pages: the eye button that shows the password (2026-10-02) ---- */
.pwbox { position: relative; }
.pwbox input { padding-right: 50px; }
.pwbox .eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 6px;
  background: transparent; color: var(--dim); cursor: pointer; display: grid; place-items: center; padding: 0; }
.pwbox .eye:hover { color: var(--teal2); background: var(--panel2); }
.pwbox .eye[aria-pressed="true"] { color: var(--teal2); }

/* ---- My profile (2026-10-02) ---- */
.avrow { display: flex; gap: 18px; align-items: center; margin: 6px 0 4px; }
.bigav { width: 96px; height: 96px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: var(--navy); border: 3px solid var(--teal); color: var(--teal2); font: 700 40px/1 var(--display); }
.bigav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tbtn.line { width: auto; margin-top: 0; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); padding: 11px 16px; font-size: 15px; }
.tbtn.line:hover { border-color: var(--teal); background: var(--panel2); }
.tlink { background: none; border: 0; color: var(--teal2); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; margin-left: 10px; }
.tok { background: rgba(79, 209, 165, .14); border: 1px solid rgba(79, 209, 165, .45); color: #b8f0dc; border-radius: 6px; padding: 10px 12px; margin: 0 0 6px; }
/* the admin page's people list: a small picture beside each name */
.pav { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; border: 2px solid var(--teal-d); }
.pav.ini { display: inline-grid; place-items: center; background: var(--navy); color: var(--teal2); font: 700 13px/1 var(--display); }
@media (max-width: 480px) { .avrow { flex-direction: column; align-items: flex-start; } }

/* Access dropdown per person (2026-10-04) */
.rolesel { min-width: 128px; padding: 6px 8px; font-size: 13px; }

/* Keep me signed in (2026-10-07) */
.tdim { color: var(--dim); font-weight: 400; }

/* ---- Book Bounty Reports pages (2026-10-13): the same pages in Book Bounty's light look (book-bounty.com: navy #123f5a,
   blue #2880b2, coral #fa5050, pale blue page), with its logo. page(brand="bb") puts "bb" on <body>. ---- */
.tpage.bb { --bg: #eef4f9; --bg2: #f6fafd; --panel: #ffffff; --panel2: #f6fafd; --line: #d5dee7; --ink: #123f5a; --dim: #4f6680;
  --faint: #6b7f95; --teal: #2880b2; --teal2: #1e6390; --on-teal: #ffffff; --teal-d: #9fc4dc; --red: #d23c3c; --green: #0a7d4f;
  --display: 'Poppins', 'Segoe UI', system-ui, sans-serif; --body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light; color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #e3effc 0%, transparent 60%), var(--bg); }
.tpage.bb .bblogo { width: 190px; height: auto; border-radius: 0; }
.tpage.bb .teyebrow { color: var(--teal); }
.tpage.bb .tbox { border-radius: 16px; box-shadow: 0 18px 44px rgba(18, 63, 90, .12); }
.tpage.bb .tbtn { font-family: var(--display); font-weight: 600; border-radius: 10px; }
.tpage.bb .tbtn:hover { background: var(--teal2); }
.tpage.bb .terr { background: #fdecec; border-color: #f3b9b9; color: #8a1f1f; }
.tpage.bb .ttile { background: var(--panel2); }
.tpage.bb .ttile img { border-radius: 10px; background: #fff; }
.tpage.bb .ttile b { font-weight: 600; }
