[hidden] { display:none !important; }
.office-shell {
  display:flex; flex-direction:column;
  min-height:100vh; min-height:100dvh;
}
.office-shell > main { flex:1; }
@media (max-width:48rem) {
  .office-shell > main { min-block-size:calc(100svh - 4.2rem); }
}
.entry { width:min(100%, 31rem); margin:clamp(3rem,9vh,7rem) auto; }
.entry h1 { font-size:clamp(2.25rem,5vw,4.25rem); overflow-wrap:anywhere; }
#no-access p { margin-top: .75rem; overflow-wrap: anywhere; }
.entry form { display:grid; gap:1rem; margin-top:1.5rem; }
.auth-submit { position:relative; padding-inline:2.5rem; white-space:normal; }
.auth-submit[aria-busy="true"] { cursor:progress; }
.auth-submit[aria-busy="true"]::after {
  content:""; position:absolute; inset-inline-end:1.15rem; width:.9rem; height:.9rem;
  border:2px solid #fff6; border-inline-end-color:currentColor; border-radius:50%;
  animation:auth-submit-spin .7s linear infinite;
}
@keyframes auth-submit-spin { to { transform:rotate(1turn); } }
@media (prefers-reduced-motion:reduce) {
  .auth-submit[aria-busy="true"]::after { animation:none; }
}
#signup-options { display:grid; gap:.75rem; margin-top:1.5rem; }
#signup-options a { position:relative; display:grid; grid-template-columns:2.5rem minmax(0,1fr); gap:.25rem .9rem; padding:1rem 2.75rem 1rem 1.15rem; border:1px solid var(--line); border-radius:1rem; }
#signup-options svg { grid-row:1 / span 2; align-self:center; width:2.5rem; height:2.5rem; padding:.5rem; border-radius:.75rem; background:#f3f3f5; color:var(--ink); fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
#signup-options a:is(:hover,:focus-visible) { background:#f7f7f8; border-color:var(--focus-line); }
:is(#signup-options a, #admin-office-switch):focus-visible { outline-offset:-1px; }
#signup-options a::after { content:""; position:absolute; right:1.25rem; top:50%; width:.45rem; height:.45rem; border:solid currentColor; border-width:1.5px 1.5px 0 0; transform:translateY(-50%) rotate(45deg); }
#signup-options small { color:var(--muted); }
label { display:block; font-weight:600; font-size:.94rem; }
input { box-sizing:border-box; width:100%; padding:.75rem .85rem; border:1px solid #c5c7c9; border-radius:.6rem; font:inherit; color:#17171a; background:white; }
.entry input { margin-top:.3rem; }
button:not(:disabled) { cursor:pointer; }
#status { margin:1rem 0; color:#86344f; }
#status:empty { display:none; }
#entry-error, #verify-error, #resend-feedback.error { color:#86344f; }
#entry-error, #verify-error, #resend-feedback { margin:0; font-size:.94rem; line-height:1.4; }
#entry-error:empty, #verify-error:empty, #resend-feedback:empty { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#signin-inbox { color:var(--muted); font-size:.9rem; line-height:1.4; }
#signin-inbox:not(:empty) { margin-top:-.5rem; }
#signin-inbox:empty { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.copy-row { display:flex; align-items:center; gap:.75rem; }
.copy-row input { flex:1; min-width:0; }
.hint, small { color:var(--muted); font-size:.85rem; }
.hint { margin-top:.6rem; }
#signin-resend {
  min-height:44px; margin-top:-.5rem; padding:.55rem .8rem; border-color:#e5e5e7;
  background:#f3f3f5; color:var(--ink); white-space:normal;
}
#signin-resend:hover:not(:disabled) { background:#e8e8ec; }
#signin-resend:disabled { color:var(--muted); }
#signin-resend-countdown { white-space:nowrap; font-variant-numeric:tabular-nums; }
#entry-links { display:flex; margin-top:.5rem; }
#entry-links .text-link {
  min-width:0; min-height:44px; padding:0; background:transparent; border:0; font:inherit; text-align:start;
}
#entry-links .text-link span { overflow-wrap:anywhere; }
#resend { margin-top:1rem; background:transparent; padding:.45rem 0; border:0; font:inherit; }
#entry-links .text-link, #resend, #social-retry {
  font-size:clamp(.85rem,4.25vw,.9375rem);
}
#verify-code, #signin-code { letter-spacing:.18em; font-variant-numeric:tabular-nums; }
#verification h1 { margin-bottom:.75rem; }
#resend-feedback:not(:empty) { margin-top:.35rem; }
#verification-email { overflow-wrap:anywhere; }
body:has(#management:not([hidden])) { background:var(--ground); touch-action:pan-x pan-y; }
#management { padding:1.4rem 0 4rem; }
.admin-context { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.15rem .65rem; margin-bottom:1rem; }
.admin-context > div { min-width:0; }
.admin-office-mark {
  position:relative; display:grid; place-items:center; flex:none; width:3.15rem; height:3.15rem;
  border:1px solid var(--line); border-radius:.7rem; background:var(--admin-office-accent,white);
}
.admin-office-mark svg,.team-search svg,.team-row > svg,.office-building-icon {
  width:1.1rem; height:1.1rem; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.office-building-icon { width:25px; height:25px; }
.admin-context.has-team-photo .admin-office-mark { background:var(--team-photo) center / cover; }
.admin-context.has-team-photo .admin-office-mark > svg { display:none; }
.admin-label { color:var(--muted); font-size:.72rem; }
#admin-name { display:block; overflow-wrap:anywhere; font-size:.96rem; font-weight:600; }
.admin-office-picker { grid-column:2; grid-row:2; position:relative; width:max-content; max-width:100%; align-self:start; }
#admin-office-switch {
  display:flex; align-items:center; gap:.45rem; min-height:2.25rem; padding:.32rem .62rem;
  border:1px solid var(--line); border-radius:.55rem; background:white; color:var(--ink);
  font-size:.84rem; font-weight:600; line-height:1.25; cursor:pointer; list-style:none;
}
#admin-office-switch::-webkit-details-marker { display:none; }
#admin-office-switch:hover,.admin-office-picker[open] > summary { background:#f3f3f5; }
.admin-office-switch-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#admin-office-switch svg,.admin-office-actions svg {
  width:1rem; height:1rem; flex:none; fill:none; stroke:currentColor;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.admin-office-picker[open] > summary svg { transform:rotate(180deg); }
.admin-office-options {
  position:absolute; z-index:4; inset-block-start:calc(100% + .35rem); inset-inline-start:0;
  width:max(100%,15rem); max-width:min(24rem,calc(100vw - 6rem)); max-height:min(18rem,45vh);
  overflow:auto; overscroll-behavior:contain; margin:0; padding:.28rem; list-style:none;
  border:1px solid var(--line); border-radius:.7rem; background:white; box-shadow:0 9px 24px rgb(25 25 28 / 12%);
}
.admin-office-options a {
  display:flex; align-items:center; gap:.48rem; min-height:2.5rem; padding:.4rem .55rem;
  border-radius:.4rem; color:var(--ink); font-size:.85rem; line-height:1.25; text-decoration:none;
}
.admin-office-options a:is(:hover,:focus-visible,[aria-current="page"]) { background:#f3f3f5; }
.admin-office-options a:focus-visible { outline-offset:-2px; }
.admin-office-options [aria-current="page"] { font-weight:600; }
.admin-office-options [aria-current="page"]::after {
  content:""; flex:none; width:.38rem; height:.66rem; margin-inline:auto .18rem;
  border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg) translateY(-.1rem);
}
.admin-office-option-name { min-width:0; overflow-wrap:anywhere; }
.admin-office-branch {
  flex:none; width:.65rem; height:.7rem; align-self:center; transform:translateY(-.2rem);
  margin-inline-start:.35rem; border-inline-start:1px solid currentColor;
  border-block-end:1px solid currentColor; border-end-start-radius:3px;
}
.admin-office-actions { grid-column:3; display:flex; align-items:center; justify-content:flex-end; gap:.45rem; }
.admin-office-actions .admin-secondary {
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  border-color:var(--line); border-radius:999px; min-height:38px; padding:.42rem .72rem; font-size:.75rem; white-space:nowrap;
}
.admin-office-actions .admin-secondary::after { content:""; position:absolute; inset:-3px 0; }
.admin-office-actions .admin-secondary:hover { background:#f2f2f4; }
#edit-office-photo {
  position:absolute; inset:0; border:0; padding:0; border-radius:inherit; background:transparent; color:inherit;
}
#edit-office-photo .office-photo-edit svg { width:10px; height:10px; stroke-width:1.8; }
.admin-context:has(> .admin-office-picker:not([hidden])) > .admin-office-mark { grid-row:1 / span 2; }
@media(min-width:32.01rem) {
  .admin-context:has(> .admin-office-picker:not([hidden])) > .admin-office-actions { grid-row:1 / span 2; }
}
.admin-context:has(> .admin-office-picker:not([hidden])) > .admin-office-info { grid-column:2; grid-row:1; align-self:end; }
@media(max-width:32rem) {
  .admin-context { grid-template-columns:auto minmax(0,1fr); }
  .admin-context > .admin-office-actions {
    grid-column:1 / -1; grid-row:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.5rem; margin-top:.55rem;
  }
  .admin-context > .admin-office-actions:has(#add-office[hidden]) { grid-template-columns:1fr; }
  .admin-office-actions .admin-secondary {
    min-width:0; justify-self:stretch; align-self:stretch; padding-inline:.6rem; white-space:normal; text-align:center; line-height:1.2;
  }
}
.admin-page-heading {
  --heading-action-height:36px;
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  grid-template-rows:minmax(var(--heading-action-height),auto) auto;
  gap:.28rem .5rem; margin:1.1rem 0 .95rem;
}
.admin-page-heading > .action {
  grid-area:1 / 2; justify-self:end; position:relative;
  min-height:var(--heading-action-height); max-width:min(48vw,18rem); gap:.4rem; padding:.3rem .8rem;
  font-size:.85rem; line-height:1.2; white-space:normal; overflow-wrap:anywhere; text-align:center;
}
.admin-page-heading > .action svg {
  flex:none; width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:1.75;
  stroke-linecap:round; stroke-linejoin:round;
}
/* Keep a 44px touch target around each compact action. */
.admin-page-heading > .action::after { content:""; position:absolute; inset:-4px 0; }
@media(max-width:23rem) {
  .admin-page-heading > .action { max-width:50vw; padding-inline:.48rem; }
}
#edit-office-plan { max-width:none; white-space:nowrap; }
#admin-title { grid-area:1 / 1; align-self:start; font-size:clamp(1.8rem,3.6vw,2.7rem); letter-spacing:-.045em; line-height:1.12; overflow-wrap:anywhere; }
#admin-title:focus { outline:none; }
.admin-page-caption { grid-column:1 / -1; color:var(--muted); font-size:.82rem; }
.admin-tab-guide {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:.4rem;
  margin-bottom:1.1rem; padding:.75rem .45rem .75rem .95rem;
  border:1px solid var(--line); border-radius:.9rem; background:#f8f7f9;
}
.admin-tab-guide h2 { font-size:.95rem; line-height:1.4; }
.admin-tab-guide p { margin-top:.18rem; color:var(--muted); font-size:.85rem; line-height:1.5; }
.admin-tab-guide button {
  display:grid; place-items:center; min-width:44px; min-height:44px; padding:0;
  border:0; border-radius:.65rem; background:none; color:var(--ink);
}
.admin-tab-guide button:hover:not(:disabled) { background:#eeecf0; }
.admin-tab-guide button svg { width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; }
.admin-block { padding-top:2rem; min-width:0; }
.admin-block h2 { font-size:1.4rem; margin-bottom:1rem; }
.admin-block h3 { font-size:1rem; margin:1.5rem 0 .3rem; }
.admin-block form { display:grid; gap:.7rem; }
.admin-block label input,.admin-block textarea { margin-top:.3rem; }
.admin-block input[readonly] { background:#f7f7f8; }
.admin-block textarea { width:100%; resize:vertical; font:inherit; border:1px solid #c5c7c9; border-radius:.6rem; padding:.75rem; }
.admin-secondary { justify-self:start; display:inline-block; flex:none; font:inherit; font-size:.86rem; font-weight:600; border:1px solid #c5c7c9; border-radius:99px; padding:.65rem .95rem; background:white; color:var(--ink); }
.admin-list { list-style:none; margin:0; padding:0; }
.admin-list li { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.75rem 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.admin-list li > div { min-width:0; }
.member-avatar {
  position:relative; display:grid; place-items:center; overflow:hidden;
  width:2.25rem; height:2.25rem; border-radius:50%; flex:none; font-weight:600;
  background:#efeff1; color:var(--ink);
}
.member-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:#f2f2f2; }
.admin-list small { display:block; }
#share-invite { margin-top:1rem; } #share-url { margin:.4rem 0; }
#admin-feedback:not(:empty) { position:fixed; z-index:1; bottom:max(1rem,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:90vw; background:#222; color:white; padding:.7rem 1.2rem; border-radius:1rem; pointer-events:none; }

.permission-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:clamp(.55rem,2vw,.8rem); padding:1rem 0; border-bottom:1px solid var(--line); cursor:pointer; }
.permission-icon { display:grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:.65rem; color:var(--ink); background:#f3f3f5; }
.permission-row:has(> #allow-local-time) > .permission-icon { color:#775315; background:#fff1d7; }
.permission-row:has(> #allow-microphone) > .permission-icon { color:#6544a3; background:#eee7fc; }
.permission-row:has(> #allow-camera) > .permission-icon { color:#265984; background:#e4f1fb; }
.permission-row:has(> #allow-chat) > .permission-icon { color:#236451; background:#e3f3e9; }
.permission-row:has(> #allow-reactions) > .permission-icon { color:#9f3d4a; background:#fce6e9; }
.permission-icon svg { width:1.2rem; height:1.2rem; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.permission-row small { display:block; font-weight:400; margin-top:.15rem; }
.permission-row input { appearance:none; width:2.75rem; min-width:2.75rem; height:1.6rem; padding:2px; margin:0; background:#b8b7bb; border:1px solid #79777b; border-radius:2rem; cursor:pointer; }
.permission-row input::before { content:""; display:block; width:1.2rem; height:1.2rem; background:white; border-radius:50%; }
.permission-row input:checked { background:var(--ink); }
.permission-row input:checked::before { transform:translateX(1.13rem); }
@media(forced-colors:active) { .permission-row input { appearance:auto; } }

.admin-tabs {
  display:flex; gap:.22rem; width:max-content; max-width:100%; padding:.28rem;
  border:1px solid var(--line); border-radius:.85rem; background:white; position:relative; isolation:isolate;
}
.admin-tabs button {
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem; padding:.45rem .8rem;
  min-height:42px; border:0; border-radius:.55rem; background:none; color:var(--muted); font:inherit; font-size:.83rem; font-weight:600; position:relative;
}
.admin-tabs button svg { width:1rem; height:1rem; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-tabs button:hover { background:#f2f2f4; }
.admin-tabs button[aria-selected="true"] { background:var(--ink); color:white; }
.admin-tabs.has-indicator::before {
  content:""; position:absolute; pointer-events:none; inset-block:.28rem; left:0;
  width:var(--active-tab-width); transform:translateX(var(--active-tab-offset));
  border-radius:.55rem; background:var(--ink);
}
/* Keep each label readable while the dark indicator passes underneath it. */
.admin-tabs.has-indicator button { background:transparent; color:#abada5; mix-blend-mode:difference; }
.admin-tabs.has-indicator button:hover { color:#ccc; }
.admin-tabs.has-indicator button[aria-selected="true"] { color:white; }
@media (prefers-reduced-motion: no-preference) {
  .admin-tabs.has-indicator::before { transition:transform .25s ease-in-out,width .25s ease-in-out; }
}
@media (forced-colors: active) {
  .admin-tabs.has-indicator::before { display:none; }
  .admin-tabs.has-indicator button { mix-blend-mode:normal; }
  .admin-tabs.has-indicator button[aria-selected="true"] {
    forced-color-adjust:none; background:Highlight; color:HighlightText;
  }
}
#team-visits {
  padding:clamp(.9rem,2.4vw,1.4rem); border:1px solid var(--line); border-radius:1rem; background:white;
}
#panel-settings { display:grid; align-items:start; gap:1rem; }
#panel-settings > section, .maps-panel { padding:clamp(.8rem,2vw,1.3rem); border:1px solid var(--line); border-radius:1rem; background:white; }
#panel-settings h2, .maps-panel h2 { font-size:1.15rem; line-height:1.3; }
#admin-settings { gap:1rem; }
#admin-settings > label input { font-weight:400; }
#admin-settings > button { justify-self:start; }
.address-heading, .address-field { display:flex; align-items:center; gap:.5rem; }
.address-heading { justify-content:space-between; margin-bottom:.25rem; }
.address-heading button { border:0; background:none; font:inherit; font-size:.85rem; }
.address-field { flex-wrap:wrap; }
#admin-url-prefix { overflow-wrap:anywhere; font-size:.85rem; color:var(--muted); }
#admin-office-url { flex:1 1 8rem; min-width:0; }
#admin-url-error { color:#86344f; }
#panel-settings .hint { line-height:1.5; }
#permission-controls :nth-last-child(1 of .permission-row:not([hidden])) { padding-bottom:.25rem; border-bottom:0; }
#panel-maps { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(16rem,1fr); align-items:start; gap:.8rem; --map-control-fill:#f4f4f4; }
.maps-current { display:flex; align-items:center; gap:.8rem; margin-bottom:1rem; }
.maps-current > div { min-width:0; overflow-wrap:anywhere; }
#current-map-image {
  display:block; flex:none; width:clamp(5.5rem,22%,9rem); height:auto; aspect-ratio:5 / 3; object-fit:cover;
  background:#f5f5f6; border:1px solid var(--line); border-radius:.65rem;
}
.maps-current h2 { margin:0 0 .2rem; }
#current-map-name { margin:0; font-size:.85rem; color:var(--muted); }
#admin-map-size { border-top:1px solid var(--line); padding-top:1rem; }
.change-map > summary { display:flex; align-items:center; justify-content:space-between; gap:.75rem; min-height:44px; cursor:pointer; list-style:none; }
.change-map > summary::-webkit-details-marker { display:none; }
.change-map > summary::after { content:""; flex:none; width:.55rem; height:.55rem; margin-right:.15rem; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.change-map[open] > summary::after { transform:rotate(225deg); }
.change-map h2 { margin:0; }
.change-map .map-form { margin-top:.8rem; }
.map-size-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35rem; max-width:27rem; }
@media(min-width:54rem) {
  #panel-settings { grid-template-columns:minmax(0,3fr) minmax(0,2fr); }
  #panel-settings > .office-details { order:-1; }
}

@media(max-width:43rem) {
  #panel-maps { grid-template-columns:minmax(0,1fr); }
  .admin-tabs { width:100%; gap:.08rem; overflow-x:auto; scrollbar-width:none; }
  .admin-tabs button { flex:1 0 auto; min-width:0; padding:.4rem .22rem; line-height:1.15; font-size:.72rem; }
  .admin-tabs button span { white-space:nowrap; }
  .admin-tabs button svg { width:.85rem; height:.85rem; }
}
@media(max-width:27rem) {
  #management { padding-top:.9rem; }
  .admin-tabs button { flex-direction:column; gap:.22rem; }
}

.slug-input { display:flex; align-items:baseline; gap:.4rem; }
#slug-prefix { color:var(--muted); font-weight:400; }
#office-slug { flex:1; min-width:0; }
#slug-error { display:block; color:#86344f; margin-top:.35rem; }
.layout-picker { min-width:0; margin:0; padding:0; border:0; }
.layout-picker legend { margin-bottom:.6rem; font-weight:600; }
#layout-options { display:grid; gap:.5rem; }
.map-size-options button, .map-option {
  min-width:0; border:1px solid var(--line); border-radius:.65rem;
  color:var(--ink); background:#fff; font:inherit; font-size:.78rem; line-height:1.3; cursor:pointer;
}
.map-form button[aria-pressed="true"], .map-form button[data-confirming] { border-color:var(--ink); background:var(--map-control-fill); }
.map-size-options button, .map-option { position:relative; }
.map-form button[data-confirming] { border-style:dashed; }
.map-form button[data-confirming] > :not(.map-confirm-label) { visibility:hidden; }
.map-form button:disabled { cursor:default; opacity:.65; }
.map-size-options button { display:grid; align-content:start; justify-items:center; row-gap:.12rem; text-align:center; padding:.45rem .25rem; }
.map-size-options svg {
  width:1.4rem; height:1.4rem; fill:none; stroke:currentColor; stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
}
.map-option {
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:.4rem .65rem; padding:.55rem; text-align:start;
}
.map-thumbnail { width:clamp(4.5rem,21vw,6.75rem); aspect-ratio:11 / 8; overflow:hidden; border-radius:.4rem; }
.map-thumbnail img { display:block; width:100%; height:100%; object-fit:cover; }
.map-option-copy { display:grid; gap:.22rem; }
.map-option-copy strong { font-size:.86rem; }
.map-option small, .map-size-options small { color:var(--muted); font-weight:400; }
.map-form .map-confirm-label {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  gap:.3rem; padding:.25rem; color:var(--ink); font-weight:650;
  text-align:center; overflow-wrap:anywhere; pointer-events:none;
}
.map-form .map-confirm-label svg {
  flex:none; width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round;
}
.map-size-options .map-confirm-label { flex-direction:column; }
.map-confirm-status { display:grid; margin:.55rem 0 0; color:var(--muted); font-size:.78rem; }
.map-confirm-status > span, .map-confirm-status::before { grid-area:1 / 1; }
.map-confirm-status::before { content:attr(data-warning); visibility:hidden; }

.team-workbench {
  --team-columns:minmax(0,1.45fr) minmax(6.1rem,.72fr) minmax(6.2rem,.85fr) 1.1rem;
  border:1px solid var(--line); border-radius:1rem; background:white;
}
.team-directory { min-width:0; }
.team-filters { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.45rem 1rem; padding:.8rem .95rem; }
.team-list-toggle { display:flex; gap:.2rem; padding:.2rem; border-radius:.65rem; background:#f0f0f2; }
.team-list-toggle button {
  padding:.36rem .62rem; min-height:36px; border:0; border-radius:.48rem; background:transparent;
  color:var(--muted); font:inherit; font-size:.78rem; font-weight:600;
}
.team-list-toggle button[aria-pressed="true"] { background:white; color:var(--ink); box-shadow:0 1px 4px #17171a1c; }
.team-search { display:flex; align-items:center; gap:.45rem; min-width:9.5rem; max-width:100%; padding:0 .5rem; border:1px solid var(--line); border-radius:.55rem; }
.team-search svg { flex:none; color:var(--muted); }
.team-search input { min-width:0; width:10.25rem; height:38px; padding:.25rem 0; border:0; background:transparent; font-size:.82rem; }
.team-search:focus-within { outline:1px solid var(--focus-line); outline-offset:-1px; }
.team-search input:focus-visible { outline:none; }
.team-columns,.team-row {
  display:grid; grid-template-columns:var(--team-columns); align-items:center; gap:.55rem; padding:.65rem .95rem;
}
.team-columns { background:#f4f4f6; color:var(--muted); font-size:.74rem; font-weight:600; }
.team-records { margin:0; padding:0; list-style:none; }
.team-records li { border-top:1px solid var(--line); }
.team-row {
  width:100%; min-height:3.25rem; border:0; background:white; text-align:start; color:var(--ink);
  font:inherit; font-size:.8rem;
}
.team-records li:last-child .team-row { border-end-start-radius:1rem; }
.team-row:hover { background:#f7f7f8; }
.team-row:focus-visible { outline-offset:-2px; }
.team-row[aria-current="true"] { background:#f0f0f2; box-shadow:inset 3px 0 var(--ink); }
.team-row > svg { justify-self:end; width:.9rem; height:.9rem; }
.team-row-identity,.team-record-identity { display:flex; align-items:center; gap:.65rem; min-width:0; overflow-wrap:anywhere; }
.team-row small,.team-record-identity small { display:block; color:var(--muted); font-size:.7rem; }
.team-row-role { min-width:0; overflow-wrap:anywhere; }
.team-status {
  display:inline-flex; align-items:center; gap:.32rem; justify-self:start; max-width:100%;
  padding:.21rem .42rem; border-radius:.5rem; background:#f0f0f2; color:var(--muted);
  font-size:.7rem; font-weight:600; overflow-wrap:anywhere;
}
.team-status[data-status]::before { content:""; width:.33rem; height:.33rem; flex:none; border-radius:50%; background:#a3a2a7; }
.team-status[data-status="present"] { color:var(--ink); }
.team-status[data-status="present"]::before { background:var(--ink); }
#team-empty { padding:1rem; color:var(--muted); font-size:.83rem; }
.team-record-identity .member-avatar { width:3rem; height:3rem; font-size:1rem; }
.team-record-identity h2 { font-size:1.18rem; line-height:1.24; text-wrap:wrap; }
.team-record-identity h2:focus { outline:none; }
.team-record-facts { margin:1rem 0; border-top:1px solid var(--line); }
.team-record-facts > div {
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  border-bottom:1px solid var(--line); padding:.59rem 0; font-size:.77rem;
}
.team-record-facts dt { color:var(--muted); }
.team-record-facts dd { margin:0; min-width:0; text-align:right; overflow-wrap:anywhere; }
.team-record-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.42rem; }
.team-record-actions .admin-secondary { display:inline-flex; min-height:38px; align-items:center; padding:.4rem .64rem; font-size:.76rem; }
.team-record-role-form { align-items:end; margin:.5rem 0 .85rem; }
.team-record-role-form label { flex:1 1 10rem; min-width:0; }
.team-admin-grants { width:100%; min-width:0; margin:.25rem 0; padding:.6rem; border:1px solid var(--line); border-radius:.75rem; }
.team-admin-grants legend { padding:0 .35rem; font-size:.85rem; font-weight:650; }
.team-admin-grant-groups { display:grid; gap:.6rem; }
.team-admin-grant-group { min-width:0; margin:0; padding:.45rem; border:1px solid var(--line); border-radius:.55rem; }
.team-admin-grant-group > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap:.35rem; }
.team-admin-grant-group label:first-child { grid-column:1/-1; font-weight:650; }
.team-admin-grant-group label:has(input:disabled) { opacity:.58; }
.team-admin-grants label { display:flex; align-items:center; gap:.5rem; min-height:42px; padding:.45rem; border-radius:.5rem; background:#f6f6f7; font-size:.82rem; }
.team-admin-grants input { width:1rem; height:1rem; margin:0; flex:none; accent-color:var(--ink); }
.team-record-actions .team-danger { color:#86344f; border-color:var(--line); }
#close-team-record { width:42px; height:42px; padding:0; font-size:1.25rem; }
.team-records li:last-child .team-row { border-end-end-radius:1rem; }
.team-record-header { display:flex; align-items:center; justify-content:space-between; gap:.7rem; }
.team-record-header #close-team-record { flex:none; }
.team-record-tabs { width:fit-content; flex-wrap:wrap; margin-top:1.1rem; }
.team-record-content { margin-top:1rem; }
.team-record-content > p { margin:.55rem 0; color:var(--muted); font-size:.83rem; }
.team-record-danger { margin-top:1.1rem; border-top:1px solid var(--line); padding-top:1rem; }
.team-history { width:100%; border-collapse:collapse; font-size:.78rem; }
.team-history :is(th,td) { border-bottom:1px solid var(--line); padding:.62rem .25rem; text-align:start; overflow-wrap:anywhere; }
.team-history td:last-child { font-variant-numeric:tabular-nums; }
.team-attendance-results { margin-top:1rem; }
.team-attendance-results > p { margin:.6rem 0; color:var(--muted); font-size:.83rem; }
.team-attendance-results h3 { font-size:1rem; }
@media(max-width:35rem) {
  .team-filters { padding:.65rem; }
  .team-search { flex:1; min-width:8rem; }
  .team-search input { width:100%; font-size:1rem; }
  .team-columns { display:none; }
  .team-row { grid-template-columns:minmax(0,1fr) minmax(3rem,42%) .75rem; gap:.25rem .4rem; padding:.55rem .65rem; }
  .team-row-identity { grid-area:1/1/2/3; }
  .team-row-role { grid-area:2/1; padding-inline-start:2.9rem; color:var(--muted); font-size:.71rem; }
  #admin-invites .team-row-role { padding-inline-start:0; }
  .team-row > .team-status { grid-area:2/2 / 3/4; justify-self:end; text-align:end; }
  .team-row > svg { grid-area:1/3; }
}
.action-with-tooltip {
  position:relative; display:inline-grid; place-items:center; width:44px; height:44px; padding:0;
}
.action-tooltip {
  position:absolute; z-index:2; right:-1px; bottom:calc(100% + 6px); visibility:hidden;
  width:max-content; padding:.35rem .65rem; border-radius:.5rem; background:#29292d; color:white;
  font-size:.78rem; font-weight:500; line-height:1.4;
  box-shadow:0 2px 6px #0002;
}
.action-tooltip::before { content:""; position:absolute; top:100%; inset-inline:0; height:7px; }
.action-tooltip::after {
  content:""; position:absolute; right:17px; top:100%; border:5px solid transparent; border-top-color:#29292d;
}
.action-with-tooltip:focus-visible .action-tooltip { visibility:visible; }
@media (hover:hover) { .action-with-tooltip:hover .action-tooltip { visibility:visible; } }
:is(#remove-member-dialog,#access-dialog,#invite-dialog,#group-dialog,#team-record-dialog,#dashboard-widgets-dialog) {
  box-sizing:border-box; width:min(26rem,calc(100% - 2rem)); margin:auto; padding:clamp(1.2rem,4vw,1.8rem);
  color:var(--ink); background:white; border:1px solid var(--line); border-radius:1.25rem;
  box-shadow:0 18px 72px #1112;
}
:is(#remove-member-dialog,#access-dialog,#invite-dialog,#group-dialog,#team-record-dialog,#dashboard-widgets-dialog)::backdrop { background:rgb(18 20 26 / 42%); }
#team-record-dialog {
  position:fixed; inset:0 0 0 auto; margin:0; max-height:none; height:100dvh;
  width:min(32rem,100%); max-width:100%; border-radius:0; overflow-y:auto; overscroll-behavior:contain;
}
@media (max-width:45rem) { #team-record-dialog { width:100%; border:0; } }
#remove-title,#access-dialog-title { font-size:1.35rem; line-height:1.25; }
#remove-identity { display:flex; align-items:center; gap:.8rem; margin:1.15rem 0; padding:.8rem; border-radius:.8rem; background:#f6f6f7; overflow-wrap:anywhere; }
#remove-identity .member-avatar { flex:none; }
#remove-identity small { display:block; }
#remove-description { line-height:1.5; font-size:.94rem; }
.remove-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:.5rem; margin-top:1.4rem; }
.remove-actions button { min-height:44px; }
.remove-confirm { color:white; background:#a72e38; border-color:#a72e38; }

.access-select { width:100%; min-height:44px; padding:.55rem .7rem; font:inherit; background:white; color:var(--ink); border:1px solid #c5c7c9; border-radius:.6rem; }
#admin-office-time-zone { margin-top:.3rem; font-weight:400; }
#admin-invite .action { justify-self:start; }
#access-member-name { margin:.6rem 0 1rem; overflow-wrap:anywhere; }
#access-dialog select { margin:.4rem 0; }

.team-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1rem; }
.team-heading h2 { margin:0; }
#invite-dialog { width:min(32rem,calc(100% - 2rem)); max-height:calc(100% - 2rem); overflow-y:auto; overscroll-behavior:contain; }
#close-invites,#group-close { display:grid; place-items:center; width:44px; height:44px; padding:0; font-size:1.4rem; line-height:1; }
#invite-feedback:not(:empty) { margin-top:.8rem; font-size:.9rem; }

#group-dialog { max-height:calc(100dvh - 2rem); overflow-y:auto; }
#group-dialog form { margin-top:.75rem; }
#group-dialog select { margin-top:.3rem; }
#group-dialog .action { justify-self:start; margin-top:.4rem; }
#group-dialog .text-link { background:none; border:0; padding:0; }
#group-dialog p { font-size:.92rem; line-height:1.55; }
#group-dialog:has(#group-create-description:not([hidden])) > .team-heading { margin-bottom:.4rem; }
#group-create-description { color:var(--muted); }
#group-error:not(:empty) { margin-top:.65rem; color:#962d40; }
.group-choices { display:grid; gap:.6rem; }
.group-choices button { display:flex; justify-content:space-between; align-items:center; padding:1rem; font:inherit; text-align:left; background:white; border:1px solid var(--line); border-radius:.75rem; }
.group-choices button::after { content:"›"; }
.group-choices button:hover { background:#f6f6f7; }
.group-hub { padding:1rem 1.25rem; background:#f7f7f8; border-radius:.85rem; }
.group-hub p,#no-visits,#group-enable p { color:var(--muted); font-size:.92rem; margin:.35rem 0; }
.group-hub a { font-weight:600; }
#group-enable .action { margin:.65rem 0; }
#team-visits { display:flex; align-items:center; justify-content:space-between; gap:.8rem 1.25rem; flex-wrap:wrap; margin-bottom:.8rem; }
#group-title:focus { outline:none; }
#team-visits h2 { margin:0; font-size:1rem; }
#visit-count { margin:.15rem 0 0; color:var(--muted); font-size:.87rem; }
#group-dialog:has(#group-visits:not([hidden])) { width:min(33rem,calc(100% - 2rem)); }
#group-grants li { gap:.5rem 1rem; flex-wrap:wrap; }
#group-grants li > span { flex:1 1 12rem; min-width:0; font-weight:600; }
#group-grants small { margin-top:.2rem; font-weight:400; }
#group-visits .action { margin-top:1rem; }
#group-dialog .text-link { min-height:44px; }
.office-details-footer:has(#delete-office:not([hidden])) {
  display:flex; justify-content:flex-start; margin-top:1rem; padding-top:.55rem; border-top:1px solid var(--line);
}
.office-delete-action {
  display:inline-flex; align-items:center; gap:.45rem; min-height:44px; padding:0;
  border:0; background:transparent; color:#a72e38; font:inherit; font-size:.85rem; font-weight:600; text-align:start;
}
.office-delete-action:hover,.office-delete-action:focus-visible { text-decoration:underline; }
.office-delete-action svg {
  width:1rem; height:1rem; flex:none; fill:none; stroke:currentColor;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
#group-confirm:has(#delete-check:not([hidden])) .action { border:0; background:#a72e38; }
#group-confirm .action:disabled { opacity:.5; }
#office-photo-preview { padding:0; border:0; color:#19191c; position:relative; display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:50%; box-shadow:inset 0 0 0 1px rgb(0 0 0 / 8%); }
.office-photo-edit { position:absolute; right:-2px; bottom:-1px; display:grid; place-items:center; width:15px; height:15px; border:1px solid #d5d5da; border-radius:50%; background:white; color:#242429; pointer-events:none; }
#office-photo-drop { position:relative; display:grid; justify-items:center; gap:1rem; padding:1.5rem 1rem; border:2px dashed #b9bbc2; border-radius:1rem; background:#fafafa; text-align:center; cursor:pointer; }
#office-photo-drop:focus-within { outline:1px solid var(--focus-line); outline-offset:-1px; }
#office-photo-drop[data-dragging] { border-color:#29292d; background:#eeeef2; }
@media (hover:hover) { #office-photo-drop:hover { border-color:#64656a; } }
#office-photo-drop input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
#office-photo-drop .photo-touch-hint { display:none; }
@media (hover:none) and (pointer:coarse) {
  #office-photo-drop .photo-pointer-hint { display:none; }
  #office-photo-drop .photo-touch-hint { display:inline; }
}
#office-photo-preview { width:84px; height:84px; pointer-events:none; }
#office-photo-preview svg { width:44px; height:44px; }
#office-photo-preview img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; }
#office-photo-form .text-link { justify-self:start; }
.dialog-actions { display:flex; align-items:center; gap:1rem; margin-top:.4rem; }
#group-dialog .dialog-actions .action { margin:0; }

#group-dialog .slug-input { flex-wrap:wrap; }
#suboffice-prefix, #group-rename-prefix { color:var(--muted); font-weight:400; overflow-wrap:anywhere; }
#group-dialog [name=slug] { flex:1 1 8rem; min-width:0; }

#social-options:not([hidden]) { display:grid; gap:.8rem; margin:1.5rem 0 0; }
#social-options:not([hidden]) ~ :is(#entry-form,#signup-options) { margin-top:1rem; }
#social-options button:not([hidden]) {
  display:flex; align-items:center; justify-content:center; gap:.65rem; min-height:48px;
  padding:.6rem .75rem; border:0; border-radius:2rem; background:#f2f2f2;
  color:#1f1f1f; font:inherit; font-weight:500;
}
#social-options button:not(:disabled):hover { background:#e9e9e9; }
#social-options button[data-provider="apple"] { background:#111; color:white; }
#social-options button[data-provider="apple"]:not(:disabled):hover { background:#2b2b2b; }
#social-options svg { width:20px; height:20px; flex:none; }
.social-divider { display:flex; align-items:center; gap:.75rem; margin:0; color:var(--muted); font-size:1rem; }
.social-divider::before, .social-divider::after { content:""; flex:1; height:1px; background:var(--line); }
#social-retry { display:inline-block; margin-top:1rem; }

#profile button.action { justify-self:start; }
.profile-cancel { min-height:2.75rem; }
.profile-cancel:hover { background:#f5f5f5; }
.profile-names { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem; }
.profile-email { margin-top:1.75rem; padding-top:1.5rem; border-top:1px solid var(--line); }
.profile-email h2 { font-size:1.1rem; }
#current-email { margin:.4rem 0 1rem; overflow-wrap:anywhere; }
#pending-email { overflow-wrap:anywhere; }
.profile-feedback { font-size:.9rem; }
.profile-feedback:empty { margin:0; height:0; }
.profile-feedback.error { color:#86344f; }
#email-saved:not(:empty) { margin-top:.75rem; }
@media(max-width:25rem) { .profile-names { grid-template-columns:1fr; } }

/* Office activity dashboard. */
.dashboard-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.55rem; margin-bottom:.8rem; }
.dashboard-zone,.dashboard-chart-caption,.dashboard-coverage { color:var(--muted); font-size:.82rem; overflow-wrap:anywhere; }
.dashboard-date-controls { display:flex; align-items:stretch; gap:.35rem; min-width:0; max-width:100%; }
.dashboard-date-controls input { width:auto; min-width:0; padding:.45rem .55rem; font-size:.84rem; }
.dashboard-date-controls button {
  display:grid; place-items:center; width:2.25rem; min-height:40px; border-radius:.55rem; padding:0; font-size:1.3rem; line-height:1;
}
.dashboard-date-controls button:disabled { color:var(--muted); background:#f4f3f5; }
.dashboard-status:not(:has(p:empty)) { display:flex; align-items:center; gap:.7rem; margin-bottom:.65rem; font-size:.88rem; }
.dashboard-metrics,.dashboard-charts { display:grid; gap:.75rem; }
.dashboard-metrics { grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); margin:0 0 .85rem; }
.dashboard-metrics > div,.dashboard-chart { min-width:0; padding:clamp(.72rem,2.1vw,1.25rem); border:1px solid var(--line); border-radius:1rem; background:white; }
.dashboard-metrics dt { color:var(--muted); font-size:.8rem; font-weight:600; overflow-wrap:anywhere; }
.dashboard-metrics dd { margin:.28rem 0 0; font-size:clamp(1.04rem,2.45vw,1.8rem); font-weight:700; font-variant-numeric:tabular-nums; line-height:1.25; overflow-wrap:anywhere; }
.dashboard-metrics small { display:block; margin-top:.2rem; font-size:.72rem; color:var(--muted); }
.dashboard-charts { grid-template-columns:minmax(0,1.75fr) minmax(0,1fr); align-items:start; }
.dashboard-charts:has(> [hidden]) { grid-template-columns:minmax(0,1fr); }
#dashboard-widgets-dialog { max-height:calc(100dvh - 2rem); overflow-y:auto; overscroll-behavior:contain; }
#dashboard-widgets-title { margin-bottom:.65rem; font-size:1.35rem; }
.dashboard-widget-options label { display:flex; align-items:center; gap:.65rem; min-height:44px; cursor:pointer; }
.dashboard-widget-options input { flex:none; width:1rem; height:1rem; accent-color:var(--ink); }
.dashboard-chart h2 { margin:0 0 .3rem; font-size:1.03rem; }
#dashboard-no-data { margin-top:.7rem; font-size:.81rem; color:var(--muted); }
.dashboard-plot { display:grid; grid-template-columns:auto minmax(0,1fr); gap:0 .45rem; margin-top:.8rem; }
.dashboard-scale { display:flex; justify-content:space-between; flex-direction:column; font-size:.68rem; color:var(--muted); }
.dashboard-bars {
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); align-items:end; gap:clamp(2px,.55vw,6px); height:9rem;
  padding:.4rem .14rem 0; border-bottom:1px solid var(--line);
  background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#eceaf0 calc(25% - 1px),#eceaf0 25%);
}
.dashboard-bars > span { height:max(2px,calc(var(--count) / var(--max-count) * 100%)); border-radius:.3rem .3rem 0 0; background:#a677c8; }
.dashboard-bars > .dashboard-unobserved { background:#dedbe1; }
.dashboard-bars > .dashboard-peak-bar { background:#754797; }
.dashboard-ticks { grid-column:2; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:clamp(2px,.55vw,6px); color:var(--muted); font-size:.68rem; margin-top:.3rem; padding-inline:.14rem; }
.dashboard-ticks span { white-space:nowrap; }
.dashboard-hourly { margin-top:.7rem; font-size:.82rem; }
.dashboard-hourly summary { width:fit-content; font-weight:600; cursor:pointer; }
.dashboard-hourly table { width:100%; border-collapse:collapse; margin-top:.5rem; }
.dashboard-hourly :is(td,th) { text-align:start; border-bottom:1px solid var(--line); padding:.3rem .35rem; }
.dashboard-hourly :is(td,th):last-child { text-align:end; }
.dashboard-hourly tbody th { font-weight:400; }
.dashboard-days { display:grid; gap:.6rem; padding:0; margin:.7rem 0 0; list-style:none; }
.dashboard-days li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.25rem .5rem; font-size:.79rem; }
.dashboard-day-track { grid-column:1 / -1; min-height:.32rem; border-radius:1rem; background:#f1edf5; }
.dashboard-day-track > span { display:block; height:.32rem; border-radius:inherit; background:#a677c8; }
.dashboard-coverage { margin-top:.7rem; }
@media (max-width:43rem) {
  .dashboard-charts { grid-template-columns:minmax(0,1fr); }
}
