html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  /* The header stays at the top (sticky-top): links into the page stop under it (set exactly by site.js) */
  scroll-padding-top: var(--header-height, 5rem);
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* The organisation's logo in the header (Settings, Style tab) */
.org-logo {
  height: 2rem;
  max-width: 8rem;
  object-fit: contain;
}

/* Calendar (calendar.js): Year, Month and Week, the same in the back end, on the public page and in other websites */
.mx-calendar .cal-title { font-size: 1.25rem; font-weight: 600; min-width: 12rem; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font-size: .8rem; }
.cal-legend label { display: inline-flex; align-items: center; gap: .3rem; }
.cal-swatch { width: .7rem; height: .7rem; border-radius: .2rem; display: inline-block; vertical-align: middle; }
.cal-event-image { width: 100%; max-height: 12rem; object-fit: cover; border-radius: .5rem; }
.cal-filter { border: 1px solid #ced4da; border-radius: 1rem; padding: .1rem .6rem; font-size: .78rem; background: #fff; }
.cal-filter.on { background: #212529; color: #fff; border-color: #212529; }
.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.cal-mini { border: 1px solid #dee2e6; border-radius: .5rem; padding: .5rem; background: #fff; text-align: left; }
.cal-mini:hover, .cal-mini:focus-visible { border-color: var(--bs-primary); }
.cal-mini-title { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.cal-mini table { width: 100%; font-size: .72rem; text-align: center; border-collapse: collapse; }
.cal-mini th { color: #6c757d; font-weight: 500; }
.cal-mini td { padding: .1rem 0; position: relative; }
.cal-mini .wk { color: #adb5bd; font-size: .62rem; }
.cal-mini td.other { color: #ced4da; }
.cal-mini td.has::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--dot); }
.cal-mini td.clash span { outline: 2px solid #dc3545; border-radius: 50%; }
.cal-mini td.today span { background: #0d6efd; color: #fff; border-radius: 50%; padding: 0 .3rem; }
.cal-month { display: grid; grid-template-columns: 2rem repeat(7, minmax(0, 1fr)); border-left: 1px solid #dee2e6; border-top: 1px solid #dee2e6; }
.cal-month > * { border-right: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; }
.cal-month .head { background: #f8f9fa; font-size: .75rem; text-align: center; padding: .25rem; font-weight: 600; }
.cal-month .wk { background: #f8f9fa; font-size: .7rem; color: #6c757d; border-top: 0; border-left: 0; padding-top: .3rem; }
.cal-month .day { min-height: 6.2rem; padding: .2rem; font-size: .75rem; cursor: pointer; overflow: hidden; }
.cal-month .day:hover { background: #f8f9fa; }
.cal-month .day.other { background: #fcfcfd; color: #adb5bd; }
.cal-month .day .num { font-weight: 600; }
.cal-month .day.today .num { background: #0d6efd; color: #fff; border-radius: 50%; padding: 0 .35rem; }
.cal-more { display: block; border: 0; background: none; padding: 0; font-size: .7rem; color: #6c757d; }
.cal-chip { display: block; border-radius: .25rem; padding: 0 .3rem; margin-top: .15rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; cursor: pointer; }
.cal-chip.dark { color: #212529; }
/* The symbols (repeats, reminders, public): a third larger than the text */
.cal-icon { display: inline-block; font-size: 1.3em; line-height: 1; vertical-align: -.12em; margin-left: .15rem; }
.cal-chip.theirs { opacity: .55; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 4px, transparent 4px 8px); }
.cal-chip.clash { outline: 2px solid #dc3545; outline-offset: -1px; }
/* An event's image: small at the start of the entry, or across the top of a tall Week entry */
.cal-chip.has-img { padding-left: 0; }
.cal-chip-img { display: inline-block; width: 1.15rem; height: 1.05rem; vertical-align: top; margin-right: .25rem; border-radius: .25rem 0 0 .25rem; background: #fff center / cover no-repeat; }
.cal-block-img { display: block; height: 2.6rem; margin: .1rem -.15rem .2rem; border-radius: .2rem; background: #fff center / cover no-repeat; }
.cal-chip:focus-visible { outline: 2px solid #212529; }
.cal-week { display: grid; grid-template-columns: 3rem repeat(7, minmax(0, 1fr)); border-left: 1px solid #dee2e6; }
.cal-week .head { background: #f8f9fa; text-align: center; font-size: .78rem; padding: .25rem; border-right: 1px solid #dee2e6; border-top: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; }
.cal-week .head.today { color: #0d6efd; font-weight: 700; }
.cal-week .allday { border-right: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; min-height: 1.6rem; padding: .1rem; font-size: .72rem; }
.cal-week .hour { height: 2.4rem; border-bottom: 1px solid #f1f3f5; font-size: .68rem; color: #868e96; text-align: right; padding-right: .25rem; }
.cal-week .col { position: relative; border-right: 1px solid #dee2e6; cursor: pointer; }
.cal-week .slot { height: 2.4rem; border-bottom: 1px solid #f1f3f5; }
.cal-week .slot:hover { background: #f8f9fa; }
.cal-week .cal-block { position: absolute; margin: 0; white-space: normal; padding: .1rem .3rem; }
.cal-week .now-line { position: absolute; left: 0; right: 0; height: 2px; background: #dc3545; pointer-events: none; }
.cal-dialog { border: 0; border-radius: .75rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.25); padding: 0; width: min(36rem, 95vw); }
.cal-dialog::backdrop { background: rgba(0,0,0,.3); }
.ev-preview-dialog { width: min(48rem, 95vw); }
.ev-preview-frame { width: 100%; height: min(75vh, 50rem); border: 1px solid #dee2e6; border-radius: .5rem; }
/* "Preview and share…" on the General calendar: the ticks and links beside a preview */
.cal-share-dialog { width: min(68rem, 96vw); }
.cal-share-grid { display: grid; grid-template-columns: 18rem minmax(0, 1fr); gap: .75rem; }
.cal-share-frame { width: 100%; height: min(72vh, 46rem); border: 2px dashed #9ec5fe; border-radius: .5rem; }
@media (max-width: 767.98px) { .cal-share-grid { grid-template-columns: 1fr; } }
.points-activities-dialog { width: min(46rem, 95vw); }
.points-activities { max-height: 65vh; overflow: auto; }
.points-row { cursor: pointer; }
.points-row:hover td, .points-row:focus td { background: #f1f6ff; }
.cal-colour { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ced4da; }
.cal-colour.chosen { box-shadow: 0 0 0 2px #212529; }
.embed-body { background: transparent; }

/* Events: cards in the list, functions (green when full), people, and the locked help columns on the Users page */
.ev-card { border: 1px solid #dee2e6; border-radius: .6rem; overflow: hidden; display: flex; margin-bottom: .75rem; background: #fff; }
.ev-card:hover { border-color: var(--bs-primary); }
.ev-img { width: 9rem; min-height: 7rem; flex: none; background: #e9ecef center / cover no-repeat; display: flex; align-items: flex-end; text-decoration: none; }
.ev-date { background: rgba(255,255,255,.92); color: #212529; margin: .4rem; border-radius: .4rem; padding: .1rem .45rem; text-align: center; line-height: 1.1; }
.ev-date b { display: block; font-size: 1.1rem; }
.ev-body { padding: .6rem .8rem; flex: 1; min-width: 0; }
.ev-function { border: 1px solid #dee2e6; border-left-width: 5px; border-radius: .5rem; padding: .5rem .7rem; margin-bottom: .5rem; }
.ev-function.full { border-color: #198754; background: #f3faf6; }
.ev-function.missing { border-left-color: #fd7e14; }
.ev-person { display: inline-flex; align-items: center; gap: .3rem; background: #e9ecef; border-radius: 1rem; padding: .05rem .5rem; font-size: .78rem; margin: .1rem .15rem .1rem 0; }
.ev-person.helper { background: #fff3cd; }
.ev-person .ev-name { display: inline-flex; flex-direction: column; line-height: 1.15; }
.ev-person .ev-helps { font-size: .7rem; color: #7a5a00; }
.ev-person .ev-helps a { margin-left: .2rem; }
.ev-dialog { width: min(48rem, 96vw); }
.users-table .help-count { white-space: nowrap; }
@media (max-width: 575.98px) { .ev-img { width: 6rem; } }

/* Groups: a golden point in the Users list; a task sent from another event or group */
.task-incoming { background: #eef4ff; }

/* Event and group pages: a white card on the light page, the buttons top right */
.page-card { background: #fff; border: 1px solid #e3e8f0; border-radius: .6rem; overflow: hidden; }
.page-img { width: 7rem; min-height: 4.5rem; border-radius: .5rem; }
.page-text { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 48rem; }
.page-tools .btn { --bs-btn-padding-y: .15rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .8rem; }

/* The task list: one compact row per task, the title and description first */
.task-rows { max-height: 32rem; overflow: auto; }
.task-row { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto; gap: .5rem; padding: .4rem .6rem; border-bottom: 1px solid #eef1f6; align-items: start; }
.task-row:hover { background: #f4f7fd; }
.task-row.incoming { background: #f3f7ff; }
.task-row.sent { color: #6c757d; }
.task-body[data-task-open] { cursor: pointer; }
.task-body[data-task-open]:focus-visible { outline: 2px solid var(--org-accent, #0d6efd); outline-offset: 2px; border-radius: .2rem; }
.task-title { font-weight: 600; line-height: 1.25; }
.task-description { font-size: .82rem; color: #3a4252; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-row.open-d .task-description { -webkit-line-clamp: unset; display: block; }
.task-meta { font-size: .7rem; color: #6c757d; margin-top: .1rem; }
.task-meta .late { color: #c0392b; font-weight: 600; }
.task-row.done .task-title { text-decoration: line-through; color: #8a93a3; }
.task-row.done .task-description { color: #9aa2b1; }
.task-status { font-size: .68rem; padding: .05rem .45rem; border-radius: 1rem; white-space: nowrap; background: #eef1f6; color: #556; }
.task-status.s-on { background: #dbe8ff; color: #1d4fb8; }
.task-status.s-dn, .task-status.done { background: #d9f2e3; color: #146c43; }
.task-status.s-cx { background: #fbe3e3; color: #a12b2b; }
.task-tag { font-size: .68rem; background: #e8eefc; color: var(--org-primary, #0d6efd); border-radius: .25rem; padding: 0 .3rem; margin-right: .15rem; }
.task-etag { font-size: .68rem; font-weight: normal; background: #f1f3f7; color: #556; border-radius: .25rem; padding: 0 .3rem; }
.task-dialog { width: min(44rem, 96vw); }
.task-group {font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; background: #f7f9fc; padding: .2rem .6rem; border-bottom: 1px solid #eef1f6; }

/* The functions as a short list (each opens in a window) */
.fn-list { max-height: 22rem; overflow: auto; }
.fn-row { display: flex; align-items: center; gap: .4rem; width: 100%; padding: .3rem .5rem; border: 0; border-bottom: 1px solid #eef1f6; background: none; font-size: .82rem; }
.fn-row:hover, .fn-row:focus-visible { background: #f4f7fd; }
.fn-bar { width: 3px; align-self: stretch; border-radius: 2px; flex: none; }
.fn-bar.full { background: #198754; }
.fn-bar.missing { background: #ffc107; }

/* Documents: the folder tree, the files, and the box of shared documents on event and group pages */
.doc-tree a { display: block; padding: .15rem .4rem; border-radius: .3rem; color: #223; text-decoration: none; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tree a:hover { background: #f4f7fd; }
.doc-tree a.on { background: #e8eefc; color: var(--org-primary, #0d6efd); font-weight: 600; }
.doc-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 14rem) 11rem 2rem; gap: .5rem; align-items: center; padding: .35rem .6rem; border-bottom: 1px solid #eef1f6; font-size: .85rem; }
.doc-row:hover { background: #f4f7fd; }
.doc-head { background: #f7f9fc; color: #6c757d; font-weight: 600; font-size: .78rem; }
.doc-head:hover { background: #f7f9fc; }
.doc-drop { outline: 2px dashed var(--org-accent, #0d6efd); outline-offset: -4px; }
.doc-icon { display: inline-block; min-width: 1.7rem; font-weight: 700; font-size: .62rem; color: #fff; border-radius: .2rem; text-align: center; padding: .15rem .1rem; }
.doc-w { background: #2b579a; } .doc-x { background: #217346; } .doc-p { background: #c43e1c; } .doc-f { background: #b30b00; }
.doc-i { background: #6f42c1; } .doc-z { background: #6c757d; } .doc-t { background: #495057; }
.doc-share { display: inline-block; font-size: .68rem; border-radius: 1rem; padding: 0 .4rem; background: #eef1f6; color: #445; margin: 0 .15rem .1rem 0; white-space: nowrap; }
.doc-share.inherited { background: #f7f9fc; color: #7a8394; font-style: italic; }
.doc-share-list { max-height: 22rem; overflow: auto; }
.doc-shared-list { max-height: 16rem; overflow: auto; }
.doc-shared-row { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; border-bottom: 1px solid #eef1f6; font-size: .82rem; }
@media (max-width: 767.98px) { .doc-row { grid-template-columns: 2rem minmax(0, 1fr) 2rem; } .doc-row > :nth-child(3), .doc-row > :nth-child(4) { display: none; } }
/* Events list: the first two lines of the description */
.ev-card-text { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
/* Member invoices: a payment (golden or diamond point, points) indented under the cost it pays */
.invoice-pays { padding-left: 1.2rem !important; }
.invoice-summary { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .4rem; }
.invoice-summary-label { font-size: .75rem; color: var(--bs-secondary-color); }
.points-earned { color: #198754; font-weight: 600; }
.points-pending { color: #e07800; font-weight: 600; font-size: .85em; margin-left: .25rem; }
.points-max-tag { font-size: .7em; border: 1px solid #198754; border-radius: .25rem; padding: 0 .2rem; margin-left: .15rem; color: #198754; vertical-align: .1em; }
/* The number of entries waiting for approval, on Points in the menu */
.nav-badge { background: #e07800; color: #fff; border-radius: 1rem; font-size: .7rem; font-weight: 600; padding: .05rem .4rem; margin-left: .25rem; vertical-align: .15em; }
.points-over { font-size: .75em; font-weight: normal; color: var(--bs-secondary-color); }

/* Events: the days to copy an event to */
.copy-calendar { table-layout: fixed; }
.copy-calendar td { height: 2.6rem; vertical-align: top; cursor: pointer; font-size: .8rem; user-select: none; }
.copy-calendar td.picked { background: #d1e7dd; outline: 2px solid #198754; outline-offset: -2px; }
.copy-calendar td.original { background: #fff3cd; cursor: default; }
.copy-calendar td.other-month { color: #adb5bd; cursor: default; }

/* The golden star (or blue diamond) after a golden (diamond) group's name: a little higher, on the right */

/* Points › Waiting for you: the searchable members list in "Who is it?" and "Add other work" */
.points-pick { max-height: 12rem; overflow-y: auto; }
.points-pick-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .2rem .5rem; }
.points-pick-item:hover, .points-pick-item:focus-visible { background: var(--bs-light, #f1f3f5); }
.points-pick-item[aria-selected="true"] { background: #d1e7dd; font-weight: 600; }
/* The members list is grouped per family: a heading, then every member; the ones matching the search in bold */
.points-pick { max-height: 20rem; }
.points-pick-family { border-bottom: 1px solid var(--bs-border-color, #dee2e6); padding: .25rem 0; }
.points-pick-family:last-child { border-bottom: 0; }
.points-pick-head { font-size: .8rem; font-weight: 600; color: #555; padding: 0 .5rem; }
.points-pick-item { display: flex; justify-content: space-between; gap: .5rem; }
.points-pick-hit { font-weight: 600; }
.points-pick-about { font-size: .75rem; font-weight: 400; color: #666; white-space: nowrap; }

/* Imports (members, helpers): steps "1 Choose file > 2 Check > 3 Done", the drop area and the rows to check */
.import-steps {
    display: flex;
    gap: 1rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.import-steps li {
    counter-increment: step;
    color: var(--bs-secondary-color);
}

.import-steps li::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    margin-right: 0.35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    font-size: 0.75rem;
}

.import-steps li.active {
    color: var(--bs-body-color);
}

.import-steps li.active::before {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
}

.import-drop {
    padding: 1rem;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
}

.import-rows {
    max-height: 16rem;
    overflow: auto;
}
.helper-import-dialog { width: min(52rem, 96vw); }

/* "View as" on the front page: the hero pulls itself up under the header (margin-top: -1rem); keep the bar uncovered */
.view-as-bar:has(+ .front-hero) {
    margin-bottom: 1rem !important;
}


/* Settings: the gear in the header and the settings window's side list */
.settings-gear-menu { min-width: 15rem; max-height: 80vh; overflow-y: auto; }
.settings-icon { display: inline-block; width: 1.5rem; text-align: center; }
.settings-side .list-group-item.active { background-color: var(--org-primary, #0d6efd); border-color: var(--org-primary, #0d6efd); }
.settings-dialog { width: min(50rem, 96vw); padding: 1rem 1.25rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; }
.settings-dialog::backdrop { background: rgba(0, 0, 0, .3); }

/* The admin header: the club and the tools on top (a shade darker), the work tabs below. Every control in it is
   the same height and style (.hdr-ctl). The colours come from the club's Style settings. */
.admin-header { --hdr-h: 2.125rem; --hdr-line: rgba(255, 255, 255, .16); --hdr-muted: rgba(255, 255, 255, .75); color: #fff; }
.admin-top { display: flex; align-items: center; gap: .75rem; height: 3.5rem; padding: 0 1rem;
    background: color-mix(in srgb, var(--org-primary, #212529) 78%, black); }
.admin-club { display: flex; align-items: center; gap: .6rem; min-width: 0; color: #fff; text-decoration: none; font-size: 1.05rem; font-weight: 600; }
.admin-club > span:not(.admin-tag) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-club .org-logo { margin-right: 0 !important; }
.admin-club:hover { color: #fff; }
.admin-tag { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--org-primary, #212529);
    background: #fff; border-radius: .25rem; padding: .1rem .4rem; }
.admin-tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; flex: none; }

.hdr-ctl { height: var(--hdr-h, 2.125rem); text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .65rem; border-radius: .5rem;
    border: 1px solid var(--hdr-line, rgba(255, 255, 255, .16)); background: rgba(255, 255, 255, .07); color: #fff; font-size: .875rem; line-height: 1;
    white-space: nowrap; margin: 0; }
.hdr-ctl:hover, .hdr-ctl:focus-within, .hdr-ctl[aria-expanded="true"], .hdr-ctl.active { background: rgba(255, 255, 255, .16); color: #fff; }
.hdr-ctl:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.hdr-ctl > svg { width: 1rem; height: 1rem; flex: none; }
.hdr-ctl > svg.hdr-chev { width: .6rem; height: .6rem; opacity: .7; }
.hdr-icon { width: var(--hdr-h, 2.125rem); padding: 0; justify-content: center; }
.hdr-cap { color: var(--hdr-muted, rgba(255, 255, 255, .75)); font-size: .75rem; margin: 0; }
.hdr-select select { field-sizing: content; appearance: none; background: transparent; border: 0; color: #fff; font: inherit; padding: 0 1rem 0 0; max-width: 12rem;
    text-overflow: ellipsis; cursor: pointer; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' stroke='white' fill='none' stroke-width='1.6' opacity='.7'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center; background-size: .6rem; }
.hdr-select select option, .hdr-select select optgroup { color: #212529; }
.hdr-avatar { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #e07800; color: #fff; font-size: .7rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hdr-who { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; }
.hdr-menu { min-width: 15rem; }

.admin-tabs { background: var(--org-primary, #212529); border-bottom: 1px solid rgba(0, 0, 0, .2); }
.admin-tab-list { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0 .5rem; height: 2.9rem; overflow-x: auto; scrollbar-width: none; }
.admin-tab-list > li { display: flex; }
.admin-tab-list a { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .75rem; color: var(--hdr-muted); text-decoration: none;
    font-size: .95rem; white-space: nowrap; border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.admin-tab-list a:hover { color: #fff; }
.admin-tab-list a.active { color: #fff; font-weight: 600; border-bottom-color: #e07800; }
.admin-tab-list a .nav-badge { margin-left: 0; vertical-align: baseline; }
.admin-tab-site { margin-left: auto; }
.admin-tab-site svg { width: .85rem; height: .85rem; }
.admin-tabs-tools { display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem 1rem .75rem; border-top: 1px solid var(--hdr-line); }

/* On a phone: one row on top, the tabs (and View as, language) behind ☰, one under the other */
@media (max-width: 767.98px) {
    .admin-top { gap: .5rem; padding: 0 .75rem; }
    .admin-club { font-size: .95rem; }
    .admin-tab-list { flex-direction: column; height: auto; padding: .35rem .5rem; }
    .admin-tab-list a { padding: .6rem .75rem; border: 0; border-radius: .5rem; }
    .admin-tab-list a.active { background: rgba(255, 255, 255, .12); }
    .admin-tab-site { margin-left: 0; }
}

/* ===== The app's look (the same calm style as the header): a light grey page with white cards, controls 34px high
   (28px in tables) with 8px corners, quiet table headings, soft rounded badges. Only the look: no page changes. ===== */
:root { --app-bg: #f3f5f9; --app-card: #fff; --app-line: #e3e7ee; --app-line-soft: #eef1f6; --app-muted: #6b7385;
    --app-ctl-h: 2.125rem; --app-ctl-sm-h: 1.75rem; --app-radius: .5rem; --app-card-radius: .75rem; }
body { background: var(--app-bg); }
body.embed-body { background: transparent; }
h1, .h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; }
h2, .h2 { font-size: 1.25rem; font-weight: 650; }
h3, .h3 { font-size: 1.15rem; font-weight: 600; }

/* Cards: page cards, Bootstrap cards and the white boxes the pages draw with border + rounded */
.page-card, .card, .bg-white.border.rounded {
    background: var(--app-card); border: 1px solid var(--app-line) !important; border-radius: var(--app-card-radius) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-header { background: #fafbfd; border-bottom-color: var(--app-line); font-weight: 600; }
.card-header:first-child { border-radius: var(--app-card-radius) var(--app-card-radius) 0 0; }
.card-footer { background: #fafbfd; border-top-color: var(--app-line); }

/* Buttons: 34px, 8px corners; small ones 28px. The grey outline button is white with a grey edge */
.btn { --bs-btn-border-radius: var(--app-radius); --bs-btn-font-weight: 500; --bs-btn-font-size: .875rem; --bs-btn-padding-x: .85rem;
    min-height: var(--app-ctl-h); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; line-height: 1.2; }
.btn-sm { --bs-btn-border-radius: .4rem; --bs-btn-font-size: .8rem; --bs-btn-padding-x: .6rem; --bs-btn-padding-y: .2rem; min-height: var(--app-ctl-sm-h); }
.btn-lg { min-height: 2.75rem; }
.btn-link { min-height: 0; }
.btn.w-100, .btn.d-block { display: flex; }
.btn.d-none { display: none; }
.btn-outline-secondary { --bs-btn-color: #2b3240; --bs-btn-bg: #fff; --bs-btn-border-color: #d5dae3; --bs-btn-hover-color: #1d2330;
    --bs-btn-hover-bg: #f3f5f9; --bs-btn-hover-border-color: #c4cad6; --bs-btn-active-color: #1d2330; --bs-btn-active-bg: #e9edf3;
    --bs-btn-active-border-color: #c4cad6; }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: #d5dae3; --bs-btn-hover-bg: #f3f5f9; --bs-btn-hover-border-color: #c4cad6; }
.btn-outline-danger { --bs-btn-bg: #fff; }
.btn-close { min-height: 0; }

/* Fields: 34px, 8px corners; bold labels, grey help text */
.form-control, .form-select { border-color: #d5dae3; border-radius: var(--app-radius); font-size: .9rem; }
.form-control:not(textarea):not([type="file"]):not([type="color"]), .form-select { min-height: var(--app-ctl-h); }
.form-control-sm, .form-select-sm { border-radius: .4rem; font-size: .8rem; }
.form-control-sm:not(textarea):not([type="file"]), .form-select-sm { min-height: var(--app-ctl-sm-h); }
.form-control:focus, .form-select:focus { border-color: var(--org-accent, #0d6efd); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--org-accent, #0d6efd) 18%, transparent); }
.form-floating > .form-control, .form-floating > .form-select { min-height: calc(3.5rem + 2px); }
.form-label, .col-form-label { font-weight: 600; font-size: .85rem; color: #2b3240; margin-bottom: .3rem; }
.form-check .form-label, label.form-label:has(> input) { font-weight: 400; }
.form-text { color: var(--app-muted); font-size: .8rem; }
.input-group-text { border-color: #d5dae3; background: #f6f8fb; font-size: .85rem; }
.form-check-input:checked { background-color: var(--org-primary, #0d6efd); border-color: var(--org-primary, #0d6efd); }

/* Tables: small grey uppercase headings, 40px rows that light up on hover, numbers on the right */
.table { --bs-table-hover-bg: #f6f8fc; --bs-table-border-color: var(--app-line-soft); font-size: .875rem; }
.table > thead th, .table > thead td { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted);
    border-bottom: 1px solid var(--app-line); vertical-align: middle; }
.table > tbody > tr > td, .table > tbody > tr > th { height: 2.5rem; vertical-align: middle; }
.table-sm > tbody > tr > td, .table-sm > tbody > tr > th { height: 2.25rem; }
.table > tbody > tr:hover > * { --bs-table-bg-state: var(--bs-table-hover-bg); }
.table td.text-end, .table th.text-end { font-variant-numeric: tabular-nums; }
.table .btn { min-height: var(--app-ctl-sm-h); --bs-btn-padding-y: .15rem; --bs-btn-padding-x: .55rem; --bs-btn-font-size: .8rem; }
.table .form-control:not(textarea), .table .form-select { min-height: var(--app-ctl-sm-h); }
.table-responsive:has(> .table) { background: var(--app-card); border: 1px solid var(--app-line); border-radius: var(--app-card-radius); }
.table-responsive > .table { margin-bottom: 0; }
.table-responsive > .table > tbody > tr:last-child > * { border-bottom: 0; }
.page-card .table-responsive, .card .table-responsive, .cal-dialog .table-responsive { border: 0; border-radius: 0; background: transparent; }

/* Badges: soft rounded pills (green done, orange needs you, blue groups, grey info) */
.badge { font-weight: 600; font-size: .72rem; border-radius: 1rem; padding: .3em .65em; letter-spacing: .01em; }
.badge.text-bg-success, .badge.bg-success { background: #dcf3e5 !important; color: #136c3a !important; }
.badge.text-bg-warning, .badge.bg-warning { background: #fdebd3 !important; color: #9a4b00 !important; }
.badge.text-bg-danger, .badge.bg-danger { background: #fbe1e1 !important; color: #a12b2b !important; }
.badge.text-bg-primary, .badge.bg-primary, .badge.text-bg-info, .badge.bg-info { background: #e1ebfd !important; color: #1d4fb8 !important; }
.badge.text-bg-secondary, .badge.bg-secondary, .badge.text-bg-light, .badge.bg-light { background: #eef1f6 !important; color: #4a5263 !important; border: 0 !important; }
.badge.text-bg-dark, .badge.bg-dark { background: #2b3240 !important; color: #fff !important; }

/* Messages, menus and windows: the same corners */
.alert { border-radius: var(--app-radius); font-size: .9rem; }
.alert.rounded-0 { border-radius: 0; }
.dropdown-menu { --bs-dropdown-border-color: var(--app-line); --bs-dropdown-border-radius: .6rem; --bs-dropdown-font-size: .875rem;
    --bs-dropdown-link-active-bg: var(--org-primary, #0d6efd); box-shadow: 0 .5rem 1.5rem rgba(16, 24, 40, .12); padding: .35rem; }
.dropdown-item { border-radius: .4rem; padding: .4rem .65rem; }
.modal-content { border: 0; border-radius: var(--app-card-radius); }
.cal-dialog, .settings-dialog { border-radius: var(--app-card-radius); }
.nav-tabs { --bs-nav-tabs-border-color: var(--app-line); }
.nav-pills { --bs-nav-pills-border-radius: var(--app-radius); --bs-nav-pills-link-active-bg: var(--org-primary, #0d6efd); }
.list-group { --bs-list-group-border-color: var(--app-line); --bs-list-group-border-radius: var(--app-card-radius); }
.pagination { --bs-pagination-border-radius: var(--app-radius); --bs-pagination-active-bg: var(--org-primary, #0d6efd); --bs-pagination-active-border-color: var(--org-primary, #0d6efd); }

/* Key figures (where a page has them): a small label, a big number */
.kpi { background: var(--app-card); border: 1px solid var(--app-line); border-radius: var(--app-card-radius); padding: .85rem 1rem; height: 100%; }
.kpi-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.kpi-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }

/* The settings window's side list: three groups, the open one in the club's colour */
.settings-side { background: var(--app-card); border: 1px solid var(--app-line) !important; border-radius: var(--app-card-radius) !important; padding: .5rem; }
.settings-side .list-group-item { border: 0; border-radius: .45rem !important; padding: .45rem .6rem; font-size: .9rem; margin: 1px 0; }
.settings-side .list-group-item:hover:not(.active) { background: #f3f5f9; }
.settings-group { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--app-muted); padding: .7rem .6rem .2rem; }
.settings-group:first-child { padding-top: .2rem; }
.settings-gear-menu .dropdown-header { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--app-muted); padding: .5rem .65rem .2rem; }

/* The ⚙ settings button on a page, beside its title */
.page-gear { width: var(--app-ctl-h); padding: 0 !important; flex: none; }
.page-gear svg { width: 1rem; height: 1rem; }

/* The public site's header: one row like the back end's top row, in the club's main colour, the pages beside the name */
.site-top { background: var(--org-primary, #212529); }
.site-links { margin-left: .75rem; }
.site-link-list { flex-direction: row; gap: .15rem; }
.site-link-list .nav-link { color: var(--hdr-muted, rgba(255, 255, 255, .75)); padding: .4rem .7rem; border-radius: .4rem; font-size: .95rem; }
.site-link-list .nav-link:hover, .site-link-list .nav-link:focus-visible { color: #fff; background: rgba(255, 255, 255, .1); }
@media (max-width: 575.98px) {
    .site-top { flex-wrap: wrap; height: auto; min-height: 3.5rem; padding-top: .55rem; padding-bottom: .55rem; }
    .site-links { order: 5; flex-basis: 100%; margin: .25rem 0 0; }
    .site-link-list { flex-direction: column; }
}

/* The login page: a white card in the middle */
.login-page { padding: 2rem 0 3rem; }
.login-card { padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 6px 24px rgba(16, 24, 40, .08); }
.login-card .btn { min-height: 2.5rem; }

/* The yellow bars under the header (test mode, View as): flush with the header, the page a little below them */
.admin-header:has(~ .alert.rounded-0) { margin-bottom: 0 !important; }
.alert.rounded-0 { margin-bottom: 0; border-left: 0; border-right: 0; }
.alert.rounded-0 + .container { padding-top: 1rem; }

/* The golden star and the diamond: drawn pictures (a shiny gold star, a faceted blue diamond) instead of the ★ and ◆
   characters, which stay in the page for screen readers and copying */
.gold-check, .gold-star, .diamond-check, .diamond-star {
    display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.17em; color: transparent !important; overflow: hidden;
    white-space: nowrap; text-indent: 0; line-height: 1; font-size: inherit; background: center / contain no-repeat; user-select: none; }
.gold-star, .diamond-star { width: .95em; height: .95em; vertical-align: .35em; font-size: .85em; margin-left: .15em; }
.gold-check, .gold-star {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffd966'/%3E%3Cstop offset='.55' stop-color='%23f2b705'/%3E%3Cstop offset='1' stop-color='%23c98a00'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 1.8l3.05 6.4 7 .9-5.15 4.85 1.3 6.95L12 17.5l-6.2 3.4 1.3-6.95L1.95 9.1l7-.9z' fill='url(%23g)' stroke='%23a87300' stroke-width='1' stroke-linejoin='round'/%3E%3Cpath d='M12 4.6l2.1 4.4' stroke='%23fff3c4' stroke-width='1.1' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E"); }
.diamond-check, .diamond-star {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='d' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23b9e6ff'/%3E%3Cstop offset='1' stop-color='%231f8fd1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M6.2 3.5h11.6L22 9.2 12 21.2 2 9.2z' fill='url(%23d)' stroke='%230d6aa8' stroke-width='1' stroke-linejoin='round'/%3E%3Cpath d='M2 9.2h20M8.6 3.5 7 9.2l5 12 5-12-1.6-5.7M7 9.2l5-5.7 5 5.7' fill='none' stroke='%23fff' stroke-width='.9' stroke-opacity='.75' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.gold-check + .diamond-check { margin-left: .1em; }

/* Small line icons (settings list, menus): one grey style, white on the open item */
.line-icon { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.settings-icon { display: inline-flex; width: auto; margin-right: .6rem; color: #7a8294; }
.active > .settings-icon, .dropdown-item.active .settings-icon { color: #fff; }
.settings-side .list-group-item { display: flex; align-items: center; }
.settings-gear-menu .dropdown-item { display: flex; align-items: center; }

/* Status pills and the "paid with" pills in lists */
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; border-radius: 1rem; padding: .2rem .6rem; white-space: nowrap; }
.pill-grey { background: #eef1f6; color: #4a5263; } .pill-green { background: #dcf3e5; color: #136c3a; } .pill-blue { background: #e1ebfd; color: #1d4fb8; }
.pill-orange { background: #fdebd3; color: #9a4b00; } .pill-red { background: #fbe1e1; color: #a12b2b; } .pill-gold { background: #fff4d6; color: #8a6200; } .pill-diamond { background: #e3f3fd; color: #0d6aa8; }

/* Key figures in a row */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi-note { font-size: .78rem; color: var(--app-muted); }
.kpi.warn .kpi-value { color: #b45b00; } .kpi.bad .kpi-value { color: #b02a37; }
@media (max-width: 767.98px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A list in a card: a bar of filters on top */
.list-card { background: var(--app-card); border: 1px solid var(--app-line); border-radius: var(--app-card-radius); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); overflow: hidden; }
.list-card > .list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .75rem; border-bottom: 1px solid var(--app-line); margin: 0; }
.list-card .table-responsive { border: 0; border-radius: 0; }
.list-card .table { margin-bottom: 0; }
.list-card .table > :not(caption) > * > :first-child { padding-left: .9rem; }
.list-card .table > :not(caption) > * > :last-child { padding-right: .9rem; }
.seg { display: flex; flex-wrap: wrap; gap: 2px; background: #eef1f6; border-radius: .6rem; padding: 3px; list-style: none; margin: 0; }
.seg a { display: flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: .45rem; font-size: .85rem; color: #3b4252; text-decoration: none; }
.seg a:hover { color: var(--bs-body-color); background: rgba(255, 255, 255, .6); }
.seg a.active { background: #fff; color: var(--bs-body-color); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg .count { background: #dfe4ec; border-radius: 1rem; font-size: .7rem; font-weight: 600; padding: 0 .45rem; }
.seg .count.red { background: #fbe1e1; color: #a12b2b; }
.who-name { font-weight: 600; display: block; }
.who-sub { font-size: .78rem; color: var(--app-muted); display: block; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A member invoice as a document: the club's band on top, a summary strip, the lines, the total */
.inv-doc { background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-card-radius); overflow: hidden; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.inv-band { background: var(--org-primary, #0b2a6b); color: #fff; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .9rem; }
.inv-band .org-logo { height: 2.75rem; max-width: 7rem; }
.inv-band-name { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.inv-band-address { font-size: .78rem; opacity: .85; white-space: pre-line; }
.inv-band-no { margin-left: auto; text-align: right; }
.inv-band-no strong { display: block; font-size: 1.1rem; letter-spacing: .05em; }
.inv-band-no span { font-size: .78rem; opacity: .9; }
.inv-body { padding: 1rem 1.25rem 1.1rem; }
.inv-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--app-muted); }
.inv-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); border: 1px solid var(--app-line); border-radius: .6rem; overflow: hidden; margin: .9rem 0; }
.inv-sum > div { padding: .55rem .75rem; border-right: 1px solid var(--app-line); }
.inv-sum > div:last-child { border-right: 0; background: #f0f4fc; }
.inv-sum strong { display: block; font-size: 1rem; }
.inv-sum > div:last-child strong { color: var(--org-primary, #0b2a6b); font-size: 1.1rem; }
.inv-lines td { height: 2.6rem; }
.inv-lines tr.pays td { font-size: .82rem; height: 2.3rem; }
.inv-total { display: flex; justify-content: flex-end; gap: 2rem; padding: .7rem .5rem; border-top: 2px solid var(--org-primary, #0b2a6b); font-size: 1.05rem; }
.inv-total strong { color: var(--org-primary, #0b2a6b); }
.inv-pay { display: flex; flex-wrap: wrap; gap: 1.25rem; background: #f6f8fb; border-radius: .5rem; padding: .6rem .8rem; font-size: .85rem; margin-top: .5rem; }
.inv-points-head { padding: .9rem 1rem .4rem; }

/* Text with formatting (RichText): the same look in the editor and on the invoice */
.rich-text h2, .rich-text h3 { color: var(--org-primary, #0b2a6b); }
.rich-text h2 { font-size: 1.15rem; font-weight: 600; margin: .6rem 0 .3rem; }
.rich-text h3 { font-size: 1rem; font-weight: 600; margin: .5rem 0 .25rem; }
.rich-text > :first-child { margin-top: 0; }
.rich-text p { margin: 0 0 .5rem; }
.rich-text ul, .rich-text ol { margin: 0 0 .5rem; padding-left: 1.4rem; }
.rich-text p:last-child, .rich-text ul:last-child, .rich-text ol:last-child { margin-bottom: 0; }
.rich-text .t-small { font-size: .82em; }
.rich-text .t-large { font-size: 1.2em; }
.rte { border: 1px solid var(--bs-border-color); border-radius: .375rem; background: #fff; }
.rte:focus-within { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; padding: .25rem; background: #f8f9fa; border-bottom: 1px solid var(--bs-border-color); border-radius: .375rem .375rem 0 0; }
.rte-bar .form-select { width: auto; min-width: 8.5rem; font-size: .8rem; padding-top: .15rem; padding-bottom: .15rem; }
.rte-bar button { border: 1px solid transparent; background: transparent; border-radius: .25rem; min-width: 1.9rem; height: 1.9rem; font-size: .82rem; padding: 0 .4rem; color: inherit; }
.rte-bar button:hover { background: #e9ecef; }
.rte-bar button.active { background: #dbe4f5; border-color: #b8c7e6; }
.rte-sep { width: 1px; align-self: stretch; background: var(--bs-border-color); margin: .15rem .2rem; }
.rte-area { min-height: 9rem; max-height: 32rem; overflow: auto; padding: .5rem .7rem; outline: none; font-size: .875rem; line-height: 1.45; }
.rte-area.rte-empty::before { content: attr(data-placeholder); color: #6c757d; pointer-events: none; }

/* The event page: like Member invoices (key figures, a list card with tabs) */
.ev-thumb { width: 3.4rem; height: 2.4rem; border-radius: .45rem; background: #e9edf3 center / cover no-repeat; flex: none; }
.ev-note { background: #fff; border: 1px solid var(--app-line); border-left: 3px solid #1d4fb8; border-radius: .6rem; padding: .6rem .9rem; font-size: .875rem; }
.pane-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .9rem; border-bottom: 1px solid var(--app-line); }
.seg button { display: flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: .45rem; font-size: .85rem; color: #3b4252; border: 0; background: none; }
.seg button:hover { color: var(--bs-body-color); background: rgba(255, 255, 255, .6); }
.seg button.active { background: #fff; color: var(--bs-body-color); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg .count.orange { background: #fdebd3; color: #9a4b00; }
.ev-functions .day-row td { background: #f8f9fb; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--app-muted); padding-top: .35rem; padding-bottom: .35rem; }
.ev-names { font-size: .82rem; color: #3b4252; }
.ev-names .helper { color: #9a4b00; }
.ev-names .missing { color: #9a4b00; font-weight: 600; }
.ev-box { border: 1px solid var(--app-line); border-radius: .6rem; padding: .9rem 1rem; height: 100%; }
.ev-message { max-width: 44rem; }
.ev-more .dropdown-header { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* The groups: the same look as the event page. A group's calendar in its tab (the calendar page without its header) */
.group-calendar-frame { display: block; width: 100%; height: min(80vh, 56rem); border: 0; }
.bare-page { background: var(--app-card, #fff); }
.list-thumb { display: block; width: 3rem; height: 2.1rem; border-radius: .4rem; background: #e9edf3 center / cover no-repeat; }
