/* pp-ui.css - shared look of the new app screens (owner-approved mockups, 2026-10).
   Colour tokens for light and dark; components used by every app (login, staff, portal pages,
   reader, admin, cleaner). Theme: <html data-theme="light|dark|auto">, auto follows the device. */

:root, [data-theme="light"] {
  --bg: #f1f3f5; --card: #ffffff; --inner: #f8f9fa; --line: #e3e6ea; --field: #ced4da; --soft: #f1f3f5;
  --text: #212529; --muted: #5c636a; --link: #0b5ed7; --tile-dim: #e9ecef;
  --ok-bg: #d1e7dd; --ok-fg: #0f5132; --err-bg: #f8d7da; --err-fg: #842029; --warn-bg: #fff3cd; --warn-fg: #664d03;
  --info-bg: #cfe2ff; --info-fg: #084298; --shadow: 0 6px 24px rgba(0,0,0,.10);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121417; --card: #1c1f24; --inner: #121417; --line: #2c3138; --field: #3a4048; --soft: #262a30;
  --text: #e9ecef; --muted: #a3aab2; --link: #6ea8fe; --tile-dim: #16181c;
  --ok-bg: #143d27; --ok-fg: #75d08a; --err-bg: #3d1418; --err-fg: #ff8a8a; --warn-bg: #3a2a10; --warn-fg: #ffd75e;
  --info-bg: #1f2f46; --info-fg: #cfe2ff; --shadow: 0 8px 28px rgba(0,0,0,.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #121417; --card: #1c1f24; --inner: #121417; --line: #2c3138; --field: #3a4048; --soft: #262a30;
    --text: #e9ecef; --muted: #a3aab2; --link: #6ea8fe; --tile-dim: #16181c;
    --ok-bg: #143d27; --ok-fg: #75d08a; --err-bg: #3d1418; --err-fg: #ff8a8a; --warn-bg: #3a2a10; --warn-fg: #ffd75e;
    --info-bg: #1f2f46; --info-fg: #cfe2ff; --shadow: 0 8px 28px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

/* status colours: the same in both themes */
:root { --green: #28a745; --red: #dc3545; --red-busy: #c62f3c; --orange: #e8821a; --yellow: #ffc107; --blue: #0d6efd; --grey: #6c757d; --amber: #f5a524; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.pp {
  background: var(--bg); color: var(--text);
  font-family: Arial, "Noto Sans Thai", sans-serif; font-size: 16px; line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.pp a { color: var(--link); text-decoration: none; }
.pp :where(button, input, select, textarea) { font: inherit; color: inherit; }   /* :where = no extra weight: component rules (.pp-btn, .pp-room ...) win */
.pp [hidden] { display: none !important; }

/* page frames */
.pp-page { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 16px; }
.pp-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
.pp-grow { flex: 1; }

/* header with back button */
.pp-head { display: flex; align-items: center; gap: 10px; }
/* the screen header stays at the top while the page scrolls; it spans the page padding so nothing
   shows beside it */
.pp-page > .pp-head { position: sticky; top: 0; z-index: 40; margin: -16px -14px 0; padding: 16px 14px 10px; background: var(--bg); }
.pp-head h1 { margin: 0; font-size: 20px; flex: 1; }
.pp-head .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pp-back { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--text) !important; cursor: pointer; }

/* cards and rows */
.pp-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.pp-card.pad { padding: 14px; }
.pp-inner { background: var(--inner); border: 1px solid var(--line); border-radius: 12px; }
.pp-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.pp-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pp-row:last-child { border-bottom: none; }
.pp-row .k { width: 110px; flex: 0 0 110px; color: var(--muted); }
.pp-row .v { flex: 1; min-width: 0; font-weight: 600; }
.pp-divider { height: 1px; background: var(--line); }

/* buttons */
/* taps react at once: no waiting to see whether it becomes a double-tap zoom */
button, a, input, select, label, [role="button"] { touch-action: manipulation; }
.pp-btn { min-height: 56px; width: 100%; border: none; border-radius: 12px; font-size: 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; text-align: center; text-decoration: none !important; }
.pp-btn.big { min-height: 64px; }
.pp-btn.sm { min-height: 44px; font-size: 15px; width: auto; border-radius: 10px; }
.pp-btn:disabled { opacity: .55; cursor: not-allowed; }
/* instant tap feedback; busy while its request is on the way (pp-ui.js) */
.pp-btn:active, button:active { transform: scale(.97); }
.pp-busy { opacity: .75; cursor: progress !important; }
/* small spinner on a tapped button / link while its action is on the way (not on switches) */
.pp-busy:not(.pp-tg):not([role="switch"]):not([role="checkbox"])::after {
  content: ""; display: inline-block; flex: 0 0 auto; width: .9em; height: .9em; margin-left: 8px; vertical-align: -.12em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ppSpin .7s linear infinite;
}
@keyframes ppSpin { to { transform: rotate(360deg); } }
.pp-btn.green { background: var(--green); color: #fff !important; }
.pp-btn.blue { background: var(--blue); color: #fff !important; }
.pp-btn.red { background: var(--red); color: #fff !important; }
.pp-btn.grey { background: var(--soft); color: var(--text) !important; }
.pp-btn.outline-red { background: transparent; border: 2px solid var(--red); color: var(--err-fg) !important; }
.pp-btn.outline-blue { background: transparent; border: 1px solid var(--blue); color: var(--link) !important; }
.pp-btn.outline-yellow { background: transparent; border: 2px solid var(--yellow); color: #c99700 !important; }
[data-theme="dark"] .pp-btn.outline-yellow { color: #ffd75e !important; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .pp-btn.outline-yellow { color: #ffd75e !important; } }
.pp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pp-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pp-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* menu tiles */
.pp-tile { min-height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text) !important; font-size: 14px; text-align: center; padding: 8px; cursor: pointer; }
.pp-tile svg { color: var(--muted); }

/* segment bar (tabs / day picker) */
.pp-seg { display: flex; gap: 2px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.pp-seg button { flex: 1; min-height: 40px; border: none; background: none; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pp-seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }

/* switch */
.pp-tg { width: 52px; height: 30px; flex: 0 0 52px; border-radius: 15px; border: none; position: relative; cursor: pointer; background: #adb5bd; padding: 0; }
.pp-tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.pp-tg[aria-checked="true"] { background: var(--green); }
.pp-tg[aria-checked="true"]::after { left: 25px; }
.pp-tg:disabled { opacity: .5; }

/* fields */
.pp-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
/* --fh = field height; a fixed height keeps the value vertically centred (iOS Safari put it at the top) */
.pp-field input, .pp-field select, .pp-field textarea, .pp-input { --fh: 52px; height: var(--fh); min-height: var(--fh); line-height: 1.25; border: 1px solid var(--field); border-radius: 10px; padding: 0 12px; font-size: 17px; font-weight: 400; color: var(--text); background: var(--card); width: 100%; }
.pp-field textarea { padding: 10px 12px; height: auto; min-height: 80px; resize: vertical; }

/* messages */
.pp-msg { border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.pp-msg.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pp-msg.err { background: var(--err-bg); color: var(--err-fg); font-weight: 700; }
.pp-msg.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pp-msg.info { background: var(--info-bg); color: var(--info-fg); }
.pp-banner-red { background: #b02a37; color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.pp-tag { font-size: 11px; font-weight: 700; border-radius: 8px; padding: 2px 7px; }

/* pencil / icon buttons */
.pp-icon { width: 44px; height: 44px; flex: 0 0 44px; border: none; border-radius: 8px; background: var(--soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* overlays: bottom sheet and centred dialog */
.pp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; }
.pp-overlay.sheet { align-items: flex-end; justify-content: center; }
.pp-overlay.dialog { align-items: center; justify-content: center; padding: 20px; }
.pp-sheet { background: var(--card); width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.pp-dialog { background: var(--card); border: 1px solid var(--line); width: 100%; max-width: 420px; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.pp-dialog h2, .pp-sheet h2 { margin: 0; font-size: 19px; }
.pp-dialog .line { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.pp-dialog .line span { color: var(--muted); }
.pp-dialog .text { font-size: 15px; color: var(--muted); line-height: 1.45; white-space: pre-line; }
.pp-dialog .btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.pp-dialog .btns.one { grid-template-columns: 1fr; }
.pp-dialog .btns button { min-height: 50px; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; }
/* confirmation banner (ppUi.toast): top of the screen, over the sticky headers; a darker green than
   --green so the white text reads well (4.5:1) */
.pp-toast { position: fixed; left: 0; right: 0; top: calc(10px + env(safe-area-inset-top)); width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; z-index: 1100; border-radius: 999px; padding: 8px 16px 8px 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; line-height: 1.3; background: #198754; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); cursor: pointer; animation: ppToastIn .22s ease-out; }
.pp-toast svg { flex: 0 0 20px; width: 20px; height: 20px; }
.pp-toast.err { background: var(--red); }
.pp-toast.info { background: #343a40; }
.pp-toast[hidden] { display: none; }
@keyframes ppToastIn { from { transform: translateY(-14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pp-toast { animation: none; } }
/* connection problem bar (pp-ui.js connection guard) */
.pp-netbar { position: fixed; left: 0; right: 0; top: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--red); color: #fff; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
.pp-netbar.slow { background: #b7791f; }
/* pull to refresh (pp-ui.js) */
.pp-ptr { position: fixed; top: calc(-44px + env(safe-area-inset-top)); left: 50%; z-index: 1150; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 0); pointer-events: none; transition: opacity .15s; }
.pp-ptr svg { transition: transform .15s; }
.pp-ptr.ready svg { transform: rotate(180deg); }
.pp-ptr.busy svg { animation: ppPtrSpin .8s linear infinite; }
@keyframes ppPtrSpin { to { transform: rotate(360deg); } }
.pp-netbar[hidden] { display: none; }
.pp-netbar button { min-height: 44px; padding: 0 16px; border: 2px solid #fff; border-radius: 999px; background: transparent; color: #fff; font: inherit; cursor: pointer; }

/* list rows that are buttons */
.pp-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pp-list > .item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--text); cursor: pointer; }
.pp-list > .item:last-child { border-bottom: none; }
.pp-list > .item[aria-pressed="true"] { background: var(--info-bg); }
.pp-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.pp-av img { width: 100%; height: 100%; object-fit: cover; }

/* room tiles */
.pp-room { min-height: 50px; border-radius: 10px; border: 2px solid var(--line); background: var(--inner); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.pp-room small { font-size: 10px; font-weight: 600; }
.pp-room[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.pp-room:disabled { background: var(--tile-dim); border-color: transparent; color: #6c757d; cursor: not-allowed; }
/* portal / staff session screen: free = green, in use = red, her own choice = blue (aria-pressed above) */
.pp-room.free { border: 3px solid var(--green); }
.pp-room.taken:disabled { background: var(--red); border-color: var(--red); color: #fff; }
.pp-room.wide { grid-column: span 4; }

/* "updated HH:MM ↻" indicator */
.pp-upd { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 12px; color: var(--muted); cursor: pointer; }
.pp-upd .dot { width: 8px; height: 8px; border-radius: 50%; background: #28a745; }
.pp-upd.stale { color: #e8821a; border-color: #e8821a; }
.pp-upd.stale .dot { background: #e8821a; }

/* ---- reader ---- */
.pp .rd-upd { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 0; font-size: 12px; color: var(--muted); cursor: pointer; text-align: left; }
.pp .rd-upd .dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #28a745; }
.pp .rd-upd.busy .dot { background: #adb5bd; }
.pp .rd-upd.stale { color: var(--orange); }
.pp .rd-upd.stale .dot { background: var(--orange); }
.pp .rd-grab { display: flex; justify-content: center; margin-top: -10px; }
.pp .rd-grab span { width: 40px; height: 4px; border-radius: 2px; background: var(--field); }
.pp .rd-sheeth { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp .rd-sheeth b { font-size: 18px; }
.pp .rd-x { width: 36px; height: 36px; flex: 0 0 36px; border: none; border-radius: 8px; background: var(--soft); color: var(--text); font-size: 18px; cursor: pointer; }
.pp .rd-loading { padding: 30px 0; text-align: center; color: var(--muted); font-size: 14px; }
.pp .rd-search { min-height: 44px; border: 1px solid var(--field); border-radius: 10px; padding: 0 12px; font-size: 16px; background: var(--card); color: var(--text); width: 100%; }

/* ---- admin ---- */
/* Shell of the admin app (admin/_shell.php): desktop sidebar, phone header below 900 px. */
body.adm { font-size: 15px; }
.adm-skip { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.adm-skip:focus { left: 8px; top: 8px; }
.adm-wrap { display: flex; align-items: stretch; min-height: 100vh; min-height: 100dvh; }
.adm-side { position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; flex: 0 0 248px; background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.adm-brand .logo { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: #212529; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.adm-brand > div:last-child { display: flex; flex-direction: column; }
.adm-brand b { font-size: 15px; }
.adm-brand span { font-size: 12px; color: var(--muted); }
.adm-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--muted) !important; font-size: 15px; }
.adm-nav a:hover { background: var(--soft); color: var(--text) !important; }
.adm-nav a[aria-current="page"] { background: var(--info-bg); color: var(--link) !important; font-weight: 600; }
.adm-grp, .adm-label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.adm-grp { padding: 14px 14px 4px; }
.adm-label { margin: 0; }
.adm-out { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--red); border-radius: 8px; color: var(--err-fg) !important; font-size: 15px; font-weight: 600; background: var(--card); }
.adm-main { flex: 1; min-width: 0; padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.adm-main > .adm-head { position: sticky; top: 0; z-index: 40; margin: -24px -32px 0; padding: 24px 32px 12px; background: var(--bg); }
.adm-head .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-head .tt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.adm-head .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.adm-head .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-back { display: none !important; }
.adm-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.adm-card > h2, .adm-h2 { margin: 0; font-size: 18px; }
.adm-btn { min-height: 40px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; text-decoration: none !important; }
.adm-btn:disabled { opacity: .55; cursor: not-allowed; }
.adm-btn.yellow { background: var(--yellow); color: #212529 !important; }
.adm-btn.blue { background: var(--blue); color: #fff !important; }
.adm-btn.green { background: var(--green); color: #fff !important; }
.adm-btn.red { background: var(--red); color: #fff !important; }
.adm-btn.grey { background: var(--soft); color: var(--text) !important; }
.adm-sbtn { min-height: 36px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 12px; background: var(--card); border: 1px solid var(--field); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.adm-sbtn.red { border-color: var(--red); color: var(--err-fg); }
.adm-sbtn.blue { border-color: var(--blue); color: var(--link); }
.adm-sbtn.green { border-color: var(--green); color: var(--ok-fg); }
.adm-sbtn:disabled { opacity: .55; cursor: not-allowed; }
.adm-pill { min-height: 32px; padding: 0 12px; border: 1px solid var(--blue); border-radius: 16px; background: var(--card); color: var(--link); font-size: 13px; font-weight: 600; cursor: pointer; }
.adm-ibtn { width: 36px; height: 36px; flex: 0 0 36px; border: none; border-radius: 8px; background: var(--soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.adm-ibtn.in { background: var(--ok-bg); color: var(--ok-fg); }
.adm-ibtn:disabled { opacity: .5; cursor: not-allowed; }
.adm-rm { display: inline-block; min-width: 30px; flex: 0 0 auto; border-radius: 6px; padding: 4px 6px; text-align: center; color: #fff; font-weight: 700; font-size: 14px; background: var(--red); }
.adm-rm.grey { background: var(--grey); }
.adm-rm.orange { background: #fd7e14; color: #212529; }
.adm-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.adm-chip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.adm-chip > a, .adm-chip > span.n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.adm-chip.off { background: var(--inner); }
.adm-chip.off > a { color: var(--muted); }
.adm-muted { color: var(--muted); }
.adm-empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.adm-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; background: var(--card); color: var(--muted); }
.adm-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 15px; color: var(--text); min-height: 40px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-tip { background: #212529; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.4; display: flex; gap: 8px; align-items: flex-start; }
.adm-tip a { color: #9ec5fe !important; }
.adm-tip button { border: none; background: none; color: #fff; font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1; }
[data-theme="dark"] .adm-brand .logo { background: #2c3138; }
[data-theme="dark"] .adm-tip { background: #2c3138; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .adm-brand .logo { background: #2c3138; }
  [data-theme="auto"] .adm-tip { background: #2c3138; }
}
/* sheets open as a centred box on a computer */
@media (min-width: 900px) {
  .adm .pp-overlay.sheet { align-items: center; padding: 20px; }
  .adm .pp-sheet { border-radius: 16px; max-width: 520px; }
}
/* phone: no sidebar, compact header with a back button */
@media (max-width: 899px) {
  .adm-side { display: none; }
  .adm-main { padding: 12px 12px 20px; gap: 12px; }
  .adm-back { display: inline-flex !important; }
  .adm-head { gap: 10px; }
  .adm-main > .adm-head { margin: -12px -12px 0; padding: 12px 12px 10px; }
  .adm-head h1 { font-size: 20px; }
  .adm-head .tt { gap: 2px; }
  .adm-head .sub { font-size: 12px; gap: 2px 8px; }
  .adm-head .sub .pp-upd { min-height: 26px; padding: 0 8px; }
  .adm-card { padding: 12px; }
}
/* `.pp button { font: inherit }` outranks single-class rules: restate the admin control fonts */
.pp .adm-btn { font-size: 14px; font-weight: 600; }
.pp .adm-sbtn { font-size: 13px; font-weight: 600; }
.pp .adm-pill { font-size: 13px; font-weight: 600; }
.pp.adm .pp-room { font-size: 18px; font-weight: 700; }
.pp.adm .pp-btn { font-size: 18px; font-weight: 700; }
.pp.adm .pp-btn.sm { font-size: 15px; }
.pp.adm .pp-seg button { font-size: 14px; font-weight: 600; }

/* ---- birthday field (lib/birthdays.php pp_birth_fields_html): day / month / year selects ---- */
.pp-birth { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px; }
.pp-birth select { --fh: 52px; height: var(--fh); min-height: var(--fh); border: 1px solid var(--field); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 17px; font-weight: 400; color: var(--text); background: var(--card); width: 100%; }

/* ---- time / date fields side by side (session edit: Start + End): iOS gives these inputs their own
   minimum width and ignores width:100%, so two in a row overlapped. Let them shrink to their column. ---- */
.pp-field { min-width: 0; }
.pp-field input[type="time"], .pp-field input[type="date"], .pp-input[type="time"], .pp-input[type="date"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; width: 100%; text-align: left;
  padding-top: 0; padding-bottom: 0; line-height: calc(var(--fh, 52px) - 2px);   /* value in the middle, not at the top (iOS) */
}
.pp-field input[type="time"]::-webkit-date-and-time-value, .pp-field input[type="date"]::-webkit-date-and-time-value,
.pp-input[type="time"]::-webkit-date-and-time-value, .pp-input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 0; line-height: inherit; }

/* ---- birthday banner (admin dashboard, reader home): today's birthdays, closable ---- */
.pp-bday { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; border-radius: 12px; background: #4a2d6b; color: #fff; }
.pp-bday svg { flex: 0 0 auto; color: #ffd75e; }
.pp-bday .t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.pp-bday .x { flex: 0 0 auto; width: 40px; height: 40px; border: none; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
