/* Circlewell application: a slim rail, a feed with a side column, and people cards. Phone layout is in mobile.css. */
.xc { --xc-bar: #a62d78; --xc-bar-hi: #83215f; --xc-b2: #3d7f74; --xc-b2-hi: #2c6259; --xc-grid: #ece6e9; --xc-base: #b9adb3; --xc-ink: #251b21; --xc-ink2: #625660; --xc-hover: rgba(166, 45, 120, .07); --xc-tip: #2b1f27; --xc-h: 170px; }
.app-body { --bar: 40px; }
.app-body .demo-bar { position: sticky; top: 0; z-index: 15; height: var(--bar); flex-wrap: nowrap; white-space: nowrap; }
h2, h3 { font-weight: 800; }
.shell { display: grid; grid-template-columns: 104px minmax(0, 1fr); min-height: calc(100vh - var(--bar)); }
.rail { position: sticky; top: var(--bar); align-self: start; display: flex; flex-direction: column; align-items: stretch; gap: 14px; height: calc(100vh - var(--bar)); padding: 12px 8px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: none; }
.rail-brand { display: grid; place-items: center; min-height: 40px; }
.rail ul { display: grid; gap: 6px; }
.rail nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; border-radius: 12px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; }
.rail nav a .icon { width: 21px; height: 21px; }
.rail nav a:hover { background: var(--soft); color: var(--ink); }
.rail nav a.is-active { background: var(--accent-tint); color: var(--accent-dark); }
.rail nav a b { position: absolute; top: 4px; right: 13px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
@media (min-width: 761px) and (max-height: 760px) { .rail nav a { min-height: 50px; } }
.workspace { min-width: 0; }
.topbar { position: sticky; top: var(--bar); z-index: 10; display: flex; align-items: center; gap: 20px; height: 68px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.club { display: grid; line-height: 1.25; white-space: nowrap; }
.club strong { font: 400 18px/1.25 var(--head); }
.club span { font-size: 12.5px; color: var(--ink-2); }
.global-search { position: relative; flex: 1; max-width: 400px; margin-left: auto; }
.global-search > .icon { position: absolute; left: 14px; top: 12px; color: var(--ink-2); }
.global-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); }
.results, .popover { position: absolute; z-index: 20; top: 50px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 36px -16px rgba(43, 31, 39, .4); padding: 6px; }
.results { left: 0; right: 0; min-width: 280px; }
.results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.results a:hover { background: var(--accent-tint); }
.results span { display: block; font-size: 13.5px; color: var(--ink-2); }
.results .none { padding: 8px 10px; color: var(--ink-2); }
.menu-wrap { position: relative; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: 99px; background: none; text-align: left; cursor: pointer; }
.me:hover { border-color: var(--line-2); }
.me > span:not(.avatar) { display: grid; line-height: 1.25; white-space: nowrap; }
.me small { color: var(--ink-2); font-size: 12.5px; }
.popover { right: 0; width: 230px; }
.popover button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-weight: 600; }
.popover button:hover { background: var(--soft); }

.content { max-width: 1240px; margin: 0 auto; padding: 24px 28px 56px; }
.content > * + * { margin-top: 16px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 18px; align-items: start; }
.layout-main, .layout-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid2 .span2 { grid-column: 1 / -1; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head h1, .record-head h1, .locked h1, .profile h1, .eventhead h1, .entry-post h1, .article h1 { font: 400 28px/1.22 var(--head); }
.page-head p { color: var(--ink-2); margin-top: 2px; }
.page-actions, .actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actionbar:empty { display: none; }
.btn { font-weight: 700; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 700; text-decoration: none; font-size: 14.5px; }
.card { min-width: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.card-head h2 { font-size: 16.5px; }
.card-head a { font-size: 14px; font-weight: 700; }
.card > .actionbar { margin-top: 14px; }
.card p + p { margin-top: 8px; }
.muted { color: var(--ink-2); }
.hint { margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.hint .icon { width: 15px; height: 15px; vertical-align: -2px; }

.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 99px; font-size: 13.5px; font-weight: 800; font-style: normal; }
.av-0 { background: #f6dcec; color: #7d1f5a; } .av-1 { background: #f6e6cc; color: #6f4608; } .av-2 { background: #dcebdc; color: #255a31; } .av-3 { background: #dbe9f3; color: #1e5075; } .av-4 { background: #f9ded3; color: #8a3517; }
.avatar.av-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar.av-xl { width: 76px; height: 76px; font: 400 26px/1 var(--head); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; line-height: 1.6; white-space: nowrap; }
.tone-ok { background: var(--ok-tint); color: var(--ok); }
.tone-neutral { background: var(--soft); color: #453b42; }
.tone-warn { background: var(--warn-tint); color: var(--warn); }
.tone-danger { background: var(--danger-tint); color: var(--danger); }
.tone-info { background: var(--info-tint); color: var(--info); }
.tone-wait { background: var(--wait-tint); color: var(--wait); }
.tone-accent { background: var(--accent-tint); color: var(--accent-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tag-you { border-color: var(--accent); color: var(--accent-dark); }

.empty { padding: 20px 16px; text-align: center; }
.empty h3 { font-size: 15.5px; }
.empty p { color: var(--ink-2); margin-top: 2px; }
.empty .btn { margin-top: 12px; }
.note-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-dark); }

/* Lists in the feed */
.todo li + li, .events li + li, .posts li + li, .notes li + li, .rows li + li, .roster li + li, .replies li + li, .applist li + li { border-top: 1px solid var(--line); }
.todo a, .notes a { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.todo a > span:nth-child(2), .notes a > span:nth-child(2) { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.todo small, .notes small { color: var(--ink-2); font-size: 13.5px; }
.todo em { display: inline-flex; align-items: center; flex: none; color: var(--accent-dark); font-style: normal; font-weight: 800; font-size: 14px; }
.todo a:hover strong, .notes a:hover strong, .event:hover .event-main > strong, .post:hover .post-main > strong { color: var(--accent-dark); }
.note.is-unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 99px; background: var(--accent); }
li:first-child > :is(.event, .post, .note), .todo li:first-child a { padding-top: 2px; }
li:last-child > :is(.event, .post, .note), .todo li:last-child a { padding-bottom: 2px; }
.event { display: flex; align-items: center; gap: 14px; padding: 13px 0; color: var(--ink); text-decoration: none; }
.dateblock { display: grid; justify-items: center; align-content: center; flex: none; width: 56px; height: 60px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-dark); line-height: 1.1; }
.dateblock small { font-size: 12px; font-weight: 800; }
.dateblock b { font: 400 24px/1.1 var(--head); }
.event-main { display: grid; flex: 1; min-width: 0; gap: 2px; line-height: 1.4; }
.event-main > strong { font-size: 15.5px; }
.event-main > span:not(.meter-wrap), .event-main > small { color: var(--ink-2); font-size: 13.5px; }
.event-end { flex: none; }
.layout-side .event { flex-wrap: wrap; }
.layout-side .event-end:empty { display: none; }
.meter-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.meter { display: block; width: 110px; height: 7px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.is-full i { background: #b4601c; }
.meter-wrap small { font-size: 13px; color: var(--ink-2); }

.post { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; color: var(--ink); text-decoration: none; }
.post-main { display: grid; flex: 1; min-width: 0; gap: 3px; }
.post-main > strong { display: flex; align-items: center; gap: 6px; font-size: 16px; line-height: 1.35; }
.post-main > strong .icon { width: 15px; height: 15px; color: var(--accent); }
.post-by { color: var(--ink-2); font-size: 13.5px; }
.post-by b { color: var(--ink); }
.post-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #473c43; font-size: 14.5px; line-height: 1.5; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.post-meta .icon { width: 14px; height: 14px; }

.people li + li { margin-top: 4px; }
.people a, .people .person { display: flex; align-items: center; gap: 10px; min-height: 46px; color: var(--ink); text-decoration: none; }
.people a > span:last-child, .people .person > span:last-child { display: grid; line-height: 1.35; }
.people small { color: var(--ink-2); font-size: 13px; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.figures > * { display: grid; align-content: start; gap: 1px; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none; }
.figures > a:hover { background: var(--accent-tint); }
.figures b { font: 400 28px/1.2 var(--head); font-variant-numeric: tabular-nums; }
.figures span { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.figures-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figures-row > * { background: var(--surface); border: 1px solid var(--line); }
.chartcard .xc-frame { padding-top: 14px; }
.chartcard .xc { --xc-label: minmax(70px, 96px); }

.idcard { display: grid; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 18px 30px -20px rgba(131, 33, 95, .85); }
.idcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.idcard-top strong { font-size: 13.5px; }
.idcard-name { font: 400 25px/1.2 var(--head); }
.idcard-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; font-size: 14px; font-weight: 800; }
.idcard-row > span { display: grid; }
.idcard-row small { font-size: 12px; font-weight: 500; color: #fbe7f3; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 18px; border: 1px solid #e6bfd8; border-radius: var(--radius-lg); background: var(--accent-tint); }
.banner > .icon { width: 24px; height: 24px; color: var(--accent-dark); }
.banner > div { display: grid; flex: 1 1 220px; line-height: 1.45; }
.banner span { font-size: 14px; color: #4f2c42; }

.today { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 28px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--navy); color: #fff; }
.today p { color: #e4d8df; font-size: 14px; }
.today h2 { margin: 2px 0; font: 400 24px/1.25 var(--head); }
.today-count { display: grid; justify-items: center; }
.today-count b { font: 400 34px/1.1 var(--head); }
.today-count b span { font-size: 18px; }
.today-count small { color: #e4d8df; font-size: 13px; }

/* People cards */
.list-count { margin-bottom: 10px; color: var(--ink-2); font-size: 14px; }
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mcards li { display: grid; }
.mcard { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.mcard-main { display: grid; align-content: center; line-height: 1.35; }
.mcard-main strong { font-size: 16px; }
.mcard-main span { font-size: 14px; }
.mcard-main small { color: var(--ink-2); font-size: 13px; }
.mcard-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-content: end; gap: 6px; }
.showmore { margin-top: 14px; text-align: center; }
.profile, .eventhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; }
.profile p, .eventhead p { color: var(--ink-2); }
.profile .tags { margin-top: 6px; }
.profile-bio { margin-top: 8px; }
.profile .profile-bio { color: var(--ink); }
.profile .actionbar, .eventhead .actionbar { justify-content: flex-end; max-width: 380px; }
.eventhead p .icon { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; }
.eventhead .dateblock { width: 76px; height: 82px; }
.eventhead .dateblock b { font-size: 32px; }
.record-id { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.record-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }

.rows > li > a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 9px 0; color: var(--ink); text-decoration: none; }
.rows > li > a > span:not(.badge):not(.avatar):not(.rows-end) { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.rows small { color: var(--ink-2); font-size: 13.5px; }
.rows b { font-variant-numeric: tabular-nums; }
.rows-end { display: grid; justify-items: end; gap: 3px; flex: none; }
.facts > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { flex: none; color: var(--ink-2); }
.facts dd { min-width: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.applist a { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.applist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.applist a > span:nth-child(2) { display: grid; flex: 1; min-width: 0; line-height: 1.45; }
.applist small { color: var(--ink-2); font-size: 13.5px; }
.quote { font-size: 17px; line-height: 1.6; }
.receipt { max-width: 640px; }
.receipt-total { font: 400 40px/1.2 var(--head); margin-bottom: 8px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.plans > li { display: flex; flex-direction: column; gap: 8px; }
.plans .card-head { margin: 0; }
.plans p + p { margin: 0; }
.plans .actionbar { margin-top: auto; padding-top: 8px; }
.plan-price b { font: 400 30px/1.2 var(--head); }
.statusline { margin: 10px 0; }
.switch { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; cursor: pointer; font-weight: 700; }
.switch input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.switch small { display: block; color: var(--ink-2); font-weight: 500; font-size: 13px; line-height: 1.45; }
.rsvp .meter-wrap { margin: 4px 0 10px; }
.rsvp > .btn, .rsvp > a.btn { width: 100%; margin-top: 14px; }
.phone-first { display: none; }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.faces a { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.faces + p { margin-top: 10px; }
.checkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.checkbar b { font: 400 22px/1.2 var(--head); }
.checkbar .meter { flex: 1 1 140px; margin-left: 10px; height: 10px; }
.roster > li { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 8px; }
.roster > li.is-in { background: #eff8f1; }
.roster > li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; line-height: 1.4; }
.roster a { color: var(--ink); font-weight: 700; text-decoration: none; }
.roster small { color: var(--ink-2); font-size: 13px; }
.roster > li > div { display: flex; align-items: center; gap: 6px; }
.roster + *, .card .tabs + .searchfield { margin-top: 10px; }
.card .tabs { margin: 8px 0 0; }
.card .searchfield { max-width: none; }
#results > .roster { margin-top: 6px; }

.topics button { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; align-items: center; padding: 0 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-weight: 600; text-align: left; }
.topics li + li { margin-top: 6px; }
.topics button:hover { background: var(--soft); }
.topics button.is-on { background: var(--accent-tint); color: var(--accent-dark); }
.entry { display: flex; align-items: flex-start; gap: 12px; }
.entry > div { flex: 1; min-width: 0; }
.replies > li { padding: 14px 0; }
.replies > li:first-child { padding-top: 2px; }
.entry-post h1 { margin: 4px 0 8px; font-size: 25px; }
.entry-body { margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.entry-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.entry-flag { display: flex; gap: 8px; align-items: center; margin: 6px 0; padding: 7px 12px; border-radius: 10px; background: var(--soft); color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.reported { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; }
.replyform { display: grid; justify-items: start; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.replyform .field { width: 100%; }
.stack { display: grid; gap: 8px; }
.reports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.reports > li { display: flex; flex-direction: column; gap: 8px; }
.reports .card-head { margin: 0; }
.reports p + p { margin: 0; }
.reports .actionbar { margin-top: auto; padding-top: 6px; }
blockquote { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.outcome { margin-top: auto !important; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.outcome span { font-weight: 500; }
.article { max-width: 760px; }
.article h1 { margin: 6px 0 12px; }
.article .actionbar, .article .callout { margin-top: 18px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--info-tint); }
.callout-warn { background: var(--warn-tint); }
.callout .icon { margin-top: 3px; }

/* Filters and tables */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter select { min-height: 42px; max-width: 100%; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font-size: 14.5px; }
.searchfield { display: flex; align-items: center; gap: 9px; flex: 1 1 240px; max-width: 360px; min-height: 42px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink-2); }
.searchfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.searchfield input { flex: 1; min-width: 0; width: 100%; height: 40px; border: 0; background: none; color: var(--ink); outline: none; }
.layout-main > .filterbar { margin-bottom: -4px; }
.tabs { position: relative; display: flex; gap: 8px; max-width: 100%; padding: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; user-select: none; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 12px; line-height: 20px; text-align: center; }
.segmented { display: flex; width: fit-content; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); }
.segmented a { display: grid; place-items: center; min-height: 36px; padding: 0 22px; border-radius: 9px; color: var(--ink-2); font-weight: 800; text-decoration: none; }
.segmented a.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(43, 31, 39, .18); }
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th { padding: 11px 10px; background: #fbf9fa; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 13px; text-align: left; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-href] { cursor: pointer; }
tbody tr:hover { background: #fcf4f9; }
.num { text-align: right; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.who .avatar { width: 32px; height: 32px; font-size: 12px; }

.locked { max-width: 520px; margin: 48px auto; text-align: center; }
.locked > .icon { width: 36px; height: 36px; margin: 0 auto 12px; color: var(--accent); }
.locked p { margin: 8px 0 18px; color: var(--ink-2); }

/* Role choice */
.signin { max-width: 960px; margin: 0 auto; padding: 44px 20px 64px; text-align: center; }
.signin h1 { margin-top: 28px; font: 400 clamp(28px, 4vw, 36px)/1.18 var(--head); }
.signin-sub { max-width: 52ch; margin: 8px auto 0; color: var(--ink-2); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; text-align: left; }
.role { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.role:hover { border-color: var(--accent); transform: translateY(-2px); }
.role-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-tint); color: var(--accent-dark); }
.role-icon .icon { width: 24px; height: 24px; }
.role-title { margin-top: 10px; font: 400 20px/1.3 var(--head); }
.role-name { color: var(--accent-dark); font-weight: 700; font-size: 14.5px; }
.role-short { display: none; }
.role-points { display: grid; gap: 8px; margin-top: 12px; color: var(--ink-2); font-size: 14.5px; }
.role-points > span { display: flex; gap: 8px; }
.role-points .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.role-org { margin-top: 20px; color: var(--ink-2); font-size: 13.5px; }
.noscript { padding: 40px; text-align: center; }

/* Popups: the title and buttons stay in view while the fields scroll */
dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); overflow: hidden; box-shadow: 0 30px 70px -20px rgba(43, 31, 39, .55); }
dialog::backdrop { background: rgba(35, 24, 31, .55); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font: 400 19px/1.3 var(--head); }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.modal-body { min-height: 0; padding: 16px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body > * + * { margin-top: 12px; }
.modal-foot { display: flex; flex: none; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.wide { grid-column: 1 / -1; }
.modal-note { color: var(--ink-2); }
.modal-note strong { color: var(--ink); }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span, .checks legend, .cards legend { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field em { font-style: normal; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.error { display: block; color: var(--danger); font-size: 13.5px; font-weight: 700; }
.error:empty { display: none; }
.form-error { padding: 10px 12px; border-radius: var(--radius); background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.checks > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2px 10px; }
.checks label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14.5px; cursor: pointer; }
.checks input, .cards input { width: 19px; height: 19px; flex: none; accent-color: var(--accent); }
.cards label { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.cards label:has(input:checked) { border-color: var(--accent); background: #fdf2f9; }
.cards label span { display: grid; line-height: 1.4; }
.cards small { color: var(--ink-2); font-size: 13px; }
.cards .error { margin-top: 6px; }

.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 12px 28px -12px rgba(43, 31, 39, .6); }
.toast .icon { margin-top: 2px; color: #a8dcb3; }
.toast-warn .icon { color: #ffc35c; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .club span { display: none; }
}
@media (max-width: 1060px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout-side { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }
  .layout-side > .wide-only:only-child { display: block; }
  .grid2, .reports { grid-template-columns: minmax(0, 1fr); }
  .profile, .eventhead { grid-template-columns: auto minmax(0, 1fr); }
  .profile .actionbar, .eventhead .actionbar { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}
@media (max-width: 900px) {
  .club { display: none; }
  .global-search { margin-left: 0; }
  .menu-wrap { margin-left: auto; }
  .me > span:not(.avatar) { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 56px; }
  .today { grid-template-columns: minmax(0, 1fr) auto; }
  .today .btn { grid-column: 1 / -1; }
}
/* Loading placeholder shown while a screen opens */
.page-skel { display: grid; grid-column: 1 / -1; align-content: start; gap: 14px; width: 100%; min-width: 0; padding: 2px; }
.page-skel i { display: block; height: 96px; border-radius: var(--radius-lg, 8px); background: linear-gradient(90deg, rgba(100, 112, 128, .13) 25%, rgba(100, 112, 128, .05) 50%, rgba(100, 112, 128, .13) 75%); background-size: 200% 100%; animation: skel-shimmer 1s linear infinite; }
.page-skel .sk-title { width: min(280px, 70%); height: 30px; }
.page-skel .sk-line { width: min(420px, 90%); height: 14px; }
.page-skel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-skel .sk-block { height: 280px; }
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) { .page-skel > div { grid-template-columns: minmax(0, 1fr); } .page-skel > div i { height: 68px; } }
.page-in > * { animation: page-in .3s ease-out both; }
@keyframes page-in { from { opacity: 0; } }
.page-skel.is-flush { box-sizing: border-box; padding: 22px 24px; }
