/* The pages behind the login: sign in, and people and access */
body.private { background: var(--sunken); }
.private a { color: var(--steel); }
.private button { height: 44px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--night); color: var(--on-night); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.private button:hover { background: #2c3a4c; }
.private button.small { height: 34px; padding: 0 12px; border: 1px solid var(--hairline); background: #fff; color: var(--ink); font-size: 13px; font-weight: 500; }
.private button.small:hover { background: var(--sunken); border-color: var(--muted); }
.private button.small.quiet { border-color: transparent; background: none; color: #9a3324; }
.private button.small.quiet:hover { background: #f8ebe8; }
.private :is(a, button, input, summary):focus-visible { outline: 3px solid #7fa3ba; outline-offset: 2px; }
.muted { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }

/* Sign in */
.pin { max-width: 420px; margin: 64px auto; padding: 36px 32px; display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--soft); border-radius: 14px; box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 12px 32px rgba(10, 10, 10, 0.06); }
/* The GoBookingDirect logo always sits on the right */
.pin .brand { align-self: flex-end; width: 190px; height: auto; margin-bottom: 14px; }
.pin h1 { font-size: 24px; line-height: 32px; }
.pin p { margin: 0; color: var(--ink-2); }
.pin .small { font-size: 13px; line-height: 18px; color: var(--muted); }
.pin form { display: flex; flex-direction: column; gap: 6px; }
.pin label { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pin input { height: 46px; border: 1px solid var(--hairline); border-radius: 6px; padding: 0 14px; font: inherit; background: #fff; }
.pin input[hidden] { display: none; }
.pin button { height: 46px; margin-top: 16px; }
.pin .problem, .notice.problem { padding: 10px 14px; border-radius: 6px; background: #f8ebe8; color: #7a2e22; }

/* Top bar */
.appbar { background: #fff; border-bottom: 1px solid var(--hairline); padding: 0 32px; }
.appbar .wrap { max-width: 1080px; min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.appbar .brand img { display: block; width: 170px; height: auto; }
.links { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; }
.links a { padding: 8px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.links a:hover { background: var(--sunken); }
.links a[aria-current] { background: var(--steel-soft); color: var(--ink); font-weight: 600; }
.me { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

.admin { padding: 32px 32px 64px; }
.admin .wrap { max-width: 1080px; gap: 20px; }
.page-head h1 { font-size: 28px; line-height: 36px; }
.page-head .muted { margin-top: 4px; font-size: 15px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--hairline); }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: none; }
.tabs a:hover { background: #fff; }
.tabs a[aria-current] { background: #fff; border-color: var(--hairline); color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 #fff; }
.tabs span { min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--soft); font-size: 12px; font-weight: 600; text-align: center; color: var(--ink-2); }
.tabs a[aria-current] span { background: var(--night); color: var(--on-night); }

.notice { padding: 16px 18px; border: 1px solid var(--steel); border-radius: 10px; background: var(--steel-soft); display: flex; flex-direction: column; gap: 10px; }
.notice p { margin: 0; }
.notice .link { display: flex; gap: 8px; }
.notice .link input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--steel); border-radius: 6px; padding: 0 10px; font: 13px/1 ui-monospace, Consolas, monospace; background: #fff; }
.notice .link button { height: 40px; }

.card { background: #fff; border: 1px solid var(--soft); border-radius: 14px; overflow: hidden; }
.card-head { padding: 20px 24px 16px; }
.card h2 { margin: 0 0 2px; font: 400 20px/28px "Libre Baskerville", Georgia, serif; }
.empty { margin: 0; padding: 20px 24px; border-top: 1px solid var(--soft); color: var(--muted); }

.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--soft); }
.person { display: grid; grid-template-columns: 40px minmax(160px, 1.1fr) minmax(170px, 1.2fr) 205px 350px; align-items: center; gap: 8px 16px; padding: 14px 24px; border-bottom: 1px solid var(--soft); }
.person:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--steel-soft); color: var(--steel); font-size: 14px; font-weight: 600; }
.who { min-width: 0; display: flex; flex-direction: column; }
.who strong { font-size: 15px; font-weight: 600; }
.who span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.who .you { margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: var(--sunken); font-size: 11px; font-weight: 600; color: var(--muted); }
.what { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 12px; background: var(--sunken); font-size: 12px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.chip.strong { background: var(--night); color: var(--on-night); }
.chip.strong.agent { background: var(--held); }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.state small { font-size: 12px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; font-size: 12px; line-height: 18px; font-weight: 600; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.on { background: #e6f2ea; color: #1f6b3a; }
.badge.wait { background: var(--last); color: #7a5a0c; }
.badge.off { background: var(--soft); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.person.is-off .avatar, .person.is-off .who, .person.is-off .what { opacity: 0.55; }

.adder { border-top: 1px solid var(--soft); background: #fbfbf9; }
.adder summary { padding: 14px 24px; font-size: 14px; font-weight: 600; color: var(--steel); cursor: pointer; list-style: none; }
.adder summary::-webkit-details-marker { display: none; }
.adder summary::before { content: "+"; display: inline-block; width: 20px; font-size: 18px; line-height: 14px; }
.adder[open] summary::before { content: "–"; }
.add { display: flex; flex-direction: column; gap: 16px; padding: 4px 24px 24px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.add label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.add input:not([type="checkbox"], [type="radio"]) { height: 44px; border: 1px solid var(--hairline); border-radius: 6px; padding: 0 12px; font: inherit; font-weight: 400; color: var(--ink); background: #fff; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.add .role { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 8px; background: #fff; cursor: pointer; }
.add .role:has(input:checked) { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); background: #f4f8fb; }
.role input { margin-top: 3px; accent-color: var(--steel); }
.role span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.role strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.lodges { margin: 0; padding: 12px 14px; border: 1px solid var(--soft); border-radius: 8px; background: #fff; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.lodges legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.add .tick { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
.tick input { width: 17px; height: 17px; accent-color: var(--steel); }
/* An admin has every lodge, so the lodge list is only for a lodge manager */
.add:has(input[value="client_admin"]:checked) .lodges, .add:has(input[value="agent"]:checked) .lodges { display: none; }
.add > button { align-self: flex-start; }

@media (max-width: 1000px) {
  .person { grid-template-columns: 40px 1fr; }
  .what, .state, .actions { grid-column: 2; }
  .state { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
  .actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .appbar { padding: 8px 16px; }
  .appbar .wrap { gap: 6px 12px; }
  .links { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; }
  .me span { display: none; }
  .admin { padding: 20px 16px 48px; }
  .card-head, .person, .adder summary, .empty { padding-left: 16px; padding-right: 16px; }
  .add { padding: 4px 16px 20px; }
  .pin { margin: 24px 16px; padding: 28px 22px; }
  .notice .link { flex-direction: column; }
}
