/* LPC Roster theme: soft and friendly. Bootstrap 5.3 tokens plus our own components.
   Palette: bluebell primary, pastel tints for status. Type: Bricolage Grotesque (headings), Figtree (text). */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 500 800; font-style: normal; font-display: swap;
  src: url("../vendor/fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url("../vendor/fonts/figtree-latin.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root, [data-bs-theme="light"] {
  --rs-page: #f6f5fc;
  --rs-surface: #ffffff;
  --rs-ink: #26233f;
  --rs-text: #2e2b4a;
  --rs-muted: #6b6884;
  --rs-border: #e7e4f3;
  --rs-primary: #4f5be8;
  --rs-primary-hover: #3e49cf;
  --rs-primary-tint: #e9ebfe;
  --rs-on-primary: #ffffff;
  --rs-attention: #7a5a00;
  --rs-attention-tint: #fff0bf;
  --rs-success: #14694a;
  --rs-success-tint: #d3f4e5;
  --rs-danger: #c0213f;
  --rs-danger-tint: #ffe2e8;
  --rs-info: #1d5c99;
  --rs-info-tint: #daebff;
  --rs-peach: #9a4320;
  --rs-peach-tint: #ffe3d6;
  --rs-lilac-tint: #eeecfb;
  --rs-shadow: 0 1px 2px rgba(60, 50, 140, .06), 0 14px 34px -16px rgba(79, 91, 232, .3);
  --rs-shadow-lift: 0 2px 4px rgba(60, 50, 140, .08), 0 22px 44px -18px rgba(79, 91, 232, .42);

  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 14px;

  --bs-font-sans-serif: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--rs-text);
  --bs-body-bg: var(--rs-page);
  --bs-secondary-color: var(--rs-muted);
  --bs-border-color: var(--rs-border);
  --bs-primary: var(--rs-primary);
  --bs-primary-rgb: 79, 91, 232;
  --bs-link-color: var(--rs-primary);
  --bs-link-hover-color: var(--rs-primary-hover);
  --bs-link-color-rgb: 79, 91, 232;
  --bs-border-radius: var(--r-sm);
  --bs-border-radius-lg: var(--r-md);
  --bs-focus-ring-color: rgba(79, 91, 232, .35);
}

[data-bs-theme="dark"] {
  --rs-page: #131228;
  --rs-surface: #1e1b38;
  --rs-ink: #f0eeff;
  --rs-text: #e4e1fa;
  --rs-muted: #a9a5c8;
  --rs-border: #332f58;
  --rs-primary: #8f99ff;
  --rs-primary-hover: #aab2ff;
  --rs-primary-tint: #2a2d5e;
  --rs-on-primary: #12132e;
  --rs-attention: #ffd66b;
  --rs-attention-tint: #3b3210;
  --rs-success: #6ee0ae;
  --rs-success-tint: #123a2c;
  --rs-danger: #ff8ca0;
  --rs-danger-tint: #461a26;
  --rs-info: #8cc4ff;
  --rs-info-tint: #14304f;
  --rs-peach: #ffb392;
  --rs-peach-tint: #402418;
  --rs-lilac-tint: #25224a;
  --rs-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .6);
  --rs-shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -18px rgba(0, 0, 0, .7);

  --bs-body-bg: var(--rs-page);
  --bs-body-color: var(--rs-text);
  --bs-border-color: var(--rs-border);
  --bs-primary: var(--rs-primary);
  --bs-primary-rgb: 143, 153, 255;
  --bs-link-color: var(--rs-primary);
  --bs-link-hover-color: var(--rs-primary-hover);
  --bs-link-color-rgb: 143, 153, 255;
  --bs-secondary-color: var(--rs-muted);
  --bs-emphasis-color: #fff;
  --bs-focus-ring-color: rgba(143, 153, 255, .45);
}

/* ---------- base ---------- */
body { -webkit-font-smoothing: antialiased; }
.tnum, .fit, .slots label, .table td, .journey, .ring { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
  font-family: "Bricolage Grotesque", var(--bs-font-sans-serif);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--rs-ink);
}
h1, .h1 { font-size: 2.1rem; }
h2, .h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.15rem; }
.h6, h6 { font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 700; letter-spacing: -.01em; }
a { text-underline-offset: 3px; }
.text-muted, .text-body-secondary { color: var(--rs-muted) !important; }
:focus-visible { outline: 3px solid var(--bs-focus-ring-color); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--rs-surface); color: var(--rs-text);
  padding: .5rem .9rem; border-radius: 999px; border: 2px solid var(--rs-primary); }
.skip-link:focus { left: 8px; }

/* ---------- buttons, forms ---------- */
.btn { font-weight: 600; border-radius: 999px; min-height: 44px; padding-inline: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-sm { min-height: 38px; padding-inline: 1rem; }
.btn-lg { min-height: 52px; padding-inline: 1.6rem; }
.btn-primary { --bs-btn-bg: var(--rs-primary); --bs-btn-border-color: var(--rs-primary); --bs-btn-color: var(--rs-on-primary);
  --bs-btn-hover-bg: var(--rs-primary-hover); --bs-btn-hover-border-color: var(--rs-primary-hover); --bs-btn-hover-color: var(--rs-on-primary);
  --bs-btn-active-bg: var(--rs-primary-hover); --bs-btn-active-border-color: var(--rs-primary-hover); --bs-btn-active-color: var(--rs-on-primary);
  --bs-btn-disabled-bg: var(--rs-primary); --bs-btn-disabled-border-color: var(--rs-primary); --bs-btn-disabled-color: var(--rs-on-primary);
  box-shadow: 0 8px 18px -10px var(--rs-primary); }
.btn-outline-primary { --bs-btn-color: var(--rs-primary); --bs-btn-border-color: var(--rs-primary);
  --bs-btn-hover-bg: var(--rs-primary); --bs-btn-hover-border-color: var(--rs-primary); --bs-btn-hover-color: var(--rs-on-primary);
  --bs-btn-active-bg: var(--rs-primary); --bs-btn-active-color: var(--rs-on-primary); --bs-btn-active-border-color: var(--rs-primary); }
.btn-outline-secondary { --bs-btn-color: var(--rs-muted); --bs-btn-border-color: var(--rs-border);
  --bs-btn-hover-bg: var(--rs-lilac-tint); --bs-btn-hover-color: var(--rs-ink); --bs-btn-hover-border-color: var(--rs-border); }
.btn-quiet { --bs-btn-color: var(--rs-muted); --bs-btn-hover-color: var(--rs-ink); --bs-btn-hover-bg: var(--rs-lilac-tint);
  --bs-btn-border-color: transparent; background: transparent; }
.btn-icon { width: 44px; min-width: 44px; padding: 0; font-size: 1.05rem; }
.form-control, .form-select { min-height: 48px; border-radius: var(--r-sm); border: 1.5px solid var(--rs-border);
  background-color: var(--rs-surface); color: var(--rs-text); padding-inline: 1rem; }
textarea.form-control { min-height: 130px; padding-block: .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--rs-primary); box-shadow: 0 0 0 .22rem var(--bs-focus-ring-color); background-color: var(--rs-surface); color: var(--rs-text); }
.form-control::placeholder { color: var(--rs-muted); opacity: .75; }
.input-group-text { background: var(--rs-lilac-tint); border: 1.5px solid var(--rs-border); color: var(--rs-muted); border-radius: var(--r-sm); }
.input-group > .form-control { border-start-start-radius: 0; border-end-start-radius: 0; }
.input-group > .input-group-text { border-end-end-radius: 0; border-start-end-radius: 0; }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--rs-ink); }
.form-text { color: var(--rs-muted); }
.invalid-feedback { display: block; color: var(--rs-danger); }
.form-check-input { width: 1.2em; height: 1.2em; border-width: 1.5px; }
.form-check-input:checked { background-color: var(--rs-primary); border-color: var(--rs-primary); }

/* ---------- surfaces ---------- */
.card { --bs-card-bg: var(--rs-surface); --bs-card-border-color: var(--rs-border); --bs-card-border-radius: var(--r-md); }
.panel { background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: var(--r-lg); box-shadow: var(--rs-shadow); overflow: hidden; }
.panel-pad { padding: 1.4rem 1.6rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.1rem; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--rs-text); --bs-table-border-color: var(--rs-border); }
.table > :not(caption) > * > * { padding: .9rem 1.1rem; }
.table th { color: var(--rs-muted); font-weight: 600; font-size: .86rem; }
.alert { border-radius: var(--r-md); border-width: 0; padding: 1rem 1.2rem; }
.alert-success { background: var(--rs-success-tint); color: var(--rs-success); }
.alert-danger { background: var(--rs-danger-tint); color: var(--rs-danger); }
.alert-info { background: var(--rs-info-tint); color: var(--rs-info); }
.alert a { color: inherit; font-weight: 600; }
.alert .btn-close { filter: none; opacity: .6; }
[data-bs-theme="dark"] .alert .btn-close { filter: invert(1); }
.chip { display: inline-block; padding: .2rem .8rem; border-radius: 999px; font-size: .84rem; font-weight: 500;
  background: var(--rs-lilac-tint); color: var(--rs-ink); margin: 0 .3rem .35rem 0; }

/* ---------- app shell: sidebar on desktop, top strip and tab bar on phones ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem 1rem 1rem;
  background: var(--rs-surface); border-right: 1px solid var(--rs-border); overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--rs-ink); text-decoration: none;
  font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; padding: 0 .5rem; }
.brand:hover { color: var(--rs-ink); }
.brand-mark { width: 40px; height: 40px; border-radius: 14px; background: var(--rs-primary); color: var(--rs-on-primary);
  display: grid; place-items: center; font-size: 1.15rem; transform: rotate(-6deg); }
.side-group { display: grid; gap: .15rem; }
.side-group h2 { font-family: var(--bs-font-sans-serif); font-size: .82rem; font-weight: 600; letter-spacing: 0; color: var(--rs-muted); margin: .6rem .75rem .35rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .85rem; border-radius: 999px; min-height: 44px;
  color: var(--rs-text); text-decoration: none; font-weight: 600; }
.side-link .bi { font-size: 1.15rem; color: var(--rs-muted); }
.side-link:hover { background: var(--rs-lilac-tint); color: var(--rs-ink); }
.side-link[aria-current="page"] { background: var(--rs-primary-tint); color: var(--rs-primary); }
.side-link[aria-current="page"] .bi { color: var(--rs-primary); }
.side-foot { margin-top: auto; display: grid; gap: .6rem; padding: .85rem; border-radius: var(--r-md); background: var(--rs-lilac-tint); }
.side-user { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.side-user .who { min-width: 0; line-height: 1.25; }
.side-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rs-ink); }
.side-user .who span { display: block; font-size: .82rem; color: var(--rs-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-actions { display: flex; gap: .4rem; }
.side-actions .btn { flex: 1; min-height: 38px; font-size: .9rem; padding-inline: .6rem; }
.main { min-width: 0; }
.topbar { display: none; }
.tabbar { display: none; }
.content { max-width: 1120px; margin: 0 auto; padding: 2.2rem 2rem 4.5rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.9rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--rs-muted); margin: .4rem 0 0; max-width: 62ch; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; font-weight: 600; color: var(--rs-muted); text-decoration: none; margin-bottom: .7rem; }
.back-link:hover { color: var(--rs-primary); }

@media (max-width: 991.98px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; padding: .55rem 1rem; min-height: 60px;
    background: color-mix(in srgb, var(--rs-surface) 90%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--rs-border); }
  .topbar .brand { font-size: 1.12rem; padding: 0; margin-right: auto; }
  .topbar .brand-mark { width: 36px; height: 36px; }
  .content { padding: 1.4rem 1rem 7rem; }
  h1, .h1 { font-size: 1.7rem; }
  .tabbar { display: flex; position: fixed; z-index: 1040; left: 12px; right: 12px; bottom: 12px; padding: .4rem;
    background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 999px; box-shadow: var(--rs-shadow-lift); }
  .tabbar a, .tabbar form { flex: 1; }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px;
    border-radius: 999px; color: var(--rs-muted); text-decoration: none; font-size: .72rem; font-weight: 600; width: 100%; background: none; border: 0; }
  .tabbar .bi { font-size: 1.25rem; line-height: 1; }
  .tabbar a[aria-current="page"] { background: var(--rs-primary-tint); color: var(--rs-primary); }
}

/* ---------- manage pages ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: 1.25rem 1.35rem; border-radius: var(--r-lg); text-decoration: none; color: var(--tile-ink, var(--rs-ink));
  background: var(--tile-bg, var(--rs-lilac-tint)); }
.tile:hover { color: var(--tile-ink, var(--rs-ink)); transform: translateY(-2px); }
.tile .n { font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 800; font-size: 2.2rem; line-height: 1; letter-spacing: -.03em; }
.tile .l { font-weight: 600; }
.tile .bi { font-size: 1.3rem; margin-bottom: .6rem; opacity: .85; }
.tile-countries { --tile-bg: var(--rs-peach-tint); --tile-ink: var(--rs-peach); }
.tile-publishers { --tile-bg: var(--rs-info-tint); --tile-ink: var(--rs-info); }
.tile-people { --tile-bg: var(--rs-attention-tint); --tile-ink: var(--rs-attention); }
.tile-courses { --tile-bg: var(--rs-success-tint); --tile-ink: var(--rs-success); }
.tile-invites { --tile-bg: var(--rs-primary-tint); --tile-ink: var(--rs-primary); }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1.25rem; }
.filters .field { min-width: 160px; }
.filters label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; color: var(--rs-muted); }
.inline-edit { display: flex; gap: .5rem; align-items: center; }
.inline-edit .form-control { min-height: 40px; max-width: 260px; }
.group-title { display: flex; align-items: baseline; gap: .6rem; margin: 2rem 0 .75rem; }
.group-title h2 { margin: 0; font-size: 1.25rem; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.5rem; border-bottom: 1px solid var(--rs-border); }
.mini-list li:last-child { border-bottom: 0; }
.perm { font-size: .8rem; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- public shell + sign in ---------- */
.public-top { max-width: 1100px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.public-main { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 4rem; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 6fr) 5fr; }
.auth-aside { position: relative; overflow: hidden; background: var(--rs-primary-tint); padding: 3rem 3.5rem;
  display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside h1 { font-size: 2.9rem; line-height: 1.04; max-width: 13ch; }
.auth-aside p { max-width: 40ch; color: var(--rs-text); font-size: 1.08rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; max-width: 44ch; position: relative; z-index: 1; }
.auth-aside li { display: flex; gap: .8rem; align-items: center; background: var(--rs-surface); padding: .8rem 1.1rem; border-radius: 999px; box-shadow: var(--rs-shadow); }
.auth-aside li .bi { color: var(--rs-primary); font-size: 1.15rem; }
.auth-aside .blob { position: absolute; border-radius: 50%; z-index: 0; }
.auth-aside .b1 { width: 380px; height: 380px; right: -140px; top: -120px; background: var(--rs-peach-tint); }
.auth-aside .b2 { width: 220px; height: 220px; right: 40px; bottom: -90px; background: var(--rs-attention-tint); }
.auth-aside .b3 { width: 120px; height: 120px; left: -40px; bottom: 28%; background: var(--rs-success-tint); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-form .inner { width: 100%; max-width: 410px; }
.auth-form h2 { font-size: 2rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- people, status ---------- */
.avatar { --h: 250; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 700; font-size: .98rem;
  background: hsl(var(--h) 80% 90%); color: hsl(var(--h) 55% 28%); }
[data-bs-theme="dark"] .avatar { background: hsl(var(--h) 32% 26%); color: hsl(var(--h) 80% 88%); }
.avatar-sm { width: 34px; height: 34px; flex-basis: 34px; font-size: .8rem; }

.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .75rem; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap;
  background: var(--rs-lilac-tint); color: var(--rs-ink); }
.pill-waiting { background: var(--rs-peach-tint); color: var(--rs-peach); }
.pill-invited { background: var(--rs-info-tint); color: var(--rs-info); }
.pill-yes { background: var(--rs-attention-tint); color: var(--rs-attention); }
.pill-booked, .pill-ok { background: var(--rs-success-tint); color: var(--rs-success); }
.pill-done { background: var(--rs-primary-tint); color: var(--rs-primary); }
.pill-off { background: var(--rs-lilac-tint); color: var(--rs-muted); }
.pill-bad { background: var(--rs-danger-tint); color: var(--rs-danger); }
.pill-demo { background: var(--rs-attention-tint); color: var(--rs-attention); }
.pill-source { background: var(--rs-surface); color: var(--rs-ink); box-shadow: 0 2px 8px -2px rgba(60, 50, 140, .25); }

.journey { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; width: 100%; }
.journey li { flex: 1; position: relative; text-align: center; font-size: .76rem; color: var(--rs-muted); padding-top: 24px; line-height: 1.2; }
.journey li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--rs-surface); border: 2.5px solid var(--rs-border); z-index: 1; }
.journey li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; border-radius: 3px; background: var(--rs-border); }
.journey li:first-child::after { display: none; }
.journey li.done { color: var(--rs-text); }
.journey li.done::before { background: var(--rs-primary); border-color: var(--rs-primary); }
.journey li.done::after, .journey li.current::after { background: var(--rs-primary); }
.journey li.current { color: var(--rs-primary); font-weight: 700; }
.journey li.current::before { border-color: var(--rs-primary); box-shadow: 0 0 0 5px var(--rs-primary-tint); }

.stagebar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--rs-lilac-tint); gap: 3px; }
.stagebar span { display: block; min-width: 6px; border-radius: 99px; }
.stage-suggested { background: #ffb08a; } .stage-invited { background: #6fb1f2; } .stage-interested { background: #f4c542; }
.stage-booked { background: #46c68f; } .stage-rated { background: var(--rs-primary); }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .84rem; color: var(--rs-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }

.fit { display: inline-flex; align-items: center; gap: .5rem; }
.fit .bar { width: 72px; height: 6px; border-radius: 99px; background: var(--rs-lilac-tint); overflow: hidden; }
.fit .bar span { display: block; height: 100%; background: var(--rs-primary); border-radius: 99px; }
.fit b { font-size: .95rem; } .fit small { color: var(--rs-muted); }
.row-line + .row-line { border-top: 1px solid var(--rs-border); }

/* match ring: a donut that fills to the score */
.ring { --p: 0; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--rs-primary) calc(var(--p) * 1%), var(--rs-lilac-tint) 0); box-shadow: 0 0 0 5px var(--rs-surface); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--rs-surface); }
.ring b { position: relative; font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-size: 1.08rem; color: var(--rs-ink); }

/* ---------- lists ---------- */
.task { display: flex; align-items: center; gap: 1rem; padding: .95rem 1.5rem; border-bottom: 1px solid var(--rs-border); text-decoration: none; color: inherit; }
.task:last-child { border-bottom: 0; }
.task:hover { background: var(--rs-lilac-tint); color: inherit; }
.task .t-ico { color: var(--rs-peach); font-size: 1.3rem; }
.task.err .t-ico { color: var(--rs-danger); }
.attention { background: var(--rs-attention-tint); border-color: transparent; box-shadow: none; }
.attention .panel-head { border-color: rgba(122, 90, 0, .15); }
.attention .task:hover { background: rgba(255, 255, 255, .55); }
[data-bs-theme="dark"] .attention .task:hover { background: rgba(255, 255, 255, .06); }
.attention .text-muted { color: var(--rs-attention) !important; opacity: .85; }
.attention .pill-waiting { background: var(--rs-surface); }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.course-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; background: var(--rs-surface); border: 1px solid var(--rs-border);
  border-radius: var(--r-lg); box-shadow: var(--rs-shadow); text-decoration: none; color: inherit; }
.course-card:hover { color: inherit; box-shadow: var(--rs-shadow-lift); transform: translateY(-3px); }
.course-card .title { font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; line-height: 1.2; color: var(--rs-ink); }
.meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; color: var(--rs-muted); font-size: .92rem; }
.meta .bi { margin-right: .35rem; }

.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--rs-muted); }
.empty .bi { font-size: 2.2rem; color: var(--rs-primary); display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 1rem;
  background: var(--rs-primary-tint); border-radius: 50%; }
.empty h3 { color: var(--rs-ink); }

.mail { padding: 1.2rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.mail:last-child { border-bottom: 0; }
.mail pre { white-space: pre-wrap; font: inherit; margin: .7rem 0 0; color: var(--rs-text); background: var(--rs-lilac-tint); border-radius: var(--r-sm); padding: 1rem 1.2rem; max-width: 80ch; }

/* ---------- pipeline board (course page) ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.lane { border-radius: var(--r-lg); padding: .9rem; background: var(--lane-bg, var(--rs-lilac-tint)); min-height: 140px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .4rem .8rem; color: var(--lane-ink, var(--rs-ink)); }
.lane-head h3 { margin: 0; font-size: 1.02rem; color: inherit; }
.lane-count { min-width: 28px; height: 28px; padding: 0 .5rem; border-radius: 99px; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--rs-surface); color: var(--lane-ink, var(--rs-ink)); }
.lane-suggested { --lane-bg: var(--rs-peach-tint); --lane-ink: var(--rs-peach); }
.lane-invited { --lane-bg: var(--rs-info-tint); --lane-ink: var(--rs-info); }
.lane-interested { --lane-bg: var(--rs-attention-tint); --lane-ink: var(--rs-attention); }
.lane-booked { --lane-bg: var(--rs-success-tint); --lane-ink: var(--rs-success); }
.lane-done { --lane-bg: var(--rs-primary-tint); --lane-ink: var(--rs-primary); }
.lane-cards { display: grid; gap: .65rem; }
.bubble { background: var(--rs-surface); border-radius: var(--r-md); padding: .85rem; box-shadow: 0 6px 16px -10px rgba(60, 50, 140, .35); color: var(--rs-text); }
.bubble .who { display: flex; align-items: center; gap: .65rem; }
.bubble .name { font-weight: 700; line-height: 1.2; color: var(--rs-ink); overflow-wrap: anywhere; }
.bubble .sub { font-size: .84rem; color: var(--rs-muted); line-height: 1.25; overflow-wrap: anywhere; }
.bubble .when { margin-top: .7rem; padding: .6rem .75rem; border-radius: var(--r-sm); background: var(--rs-success-tint); color: var(--rs-success); font-size: .88rem; }
.bubble details { margin-top: .6rem; }
.bubble summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--rs-primary); list-style: none; }
.bubble summary::-webkit-details-marker { display: none; }
.lane-note { font-size: .9rem; color: var(--lane-ink); padding: .2rem .4rem .5rem; }
.lane-empty { font-size: .88rem; color: var(--lane-ink); opacity: .75; padding: .2rem .4rem 0; }
@media (max-width: 1099.98px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .board { grid-template-columns: 1fr; } }

/* ---------- shortlist: profile cards ---------- */
.seg { display: inline-flex; padding: .3rem; gap: .2rem; background: var(--rs-lilac-tint); border-radius: 999px; }
.seg a { padding: .45rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--rs-muted); text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.seg a[aria-current="true"] { background: var(--rs-surface); color: var(--rs-primary); box-shadow: 0 2px 8px -2px rgba(60, 50, 140, .25); }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.pcard { display: flex; flex-direction: column; background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: var(--r-lg);
  box-shadow: var(--rs-shadow); overflow: hidden; }
.pcard:hover { box-shadow: var(--rs-shadow-lift); }
.pcard-photo { --h: 250; position: relative; aspect-ratio: 5 / 3; display: grid; place-items: center;
  background: hsl(var(--h) 85% 91%); color: hsl(var(--h) 50% 32%); }
[data-bs-theme="dark"] .pcard-photo { background: hsl(var(--h) 30% 24%); color: hsl(var(--h) 80% 88%); }
.pcard-photo::before, .pcard-photo::after { content: ""; position: absolute; border-radius: 50%; background: hsl(var(--h) 90% 96% / .55); }
[data-bs-theme="dark"] .pcard-photo::before, [data-bs-theme="dark"] .pcard-photo::after { background: hsl(var(--h) 40% 36% / .4); }
.pcard-photo::before { width: 150px; height: 150px; left: -40px; top: -50px; }
.pcard-photo::after { width: 100px; height: 100px; right: -20px; bottom: -35px; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; position: relative; }
.pcard-initials { position: relative; z-index: 1; font-family: "Bricolage Grotesque", var(--bs-font-sans-serif); font-weight: 800; font-size: 3.6rem; letter-spacing: -.03em; }
.pcard-tags { position: absolute; z-index: 2; left: .9rem; top: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.pcard .ring { position: absolute; z-index: 2; right: 1rem; bottom: -30px; }
.pcard-body { padding: 2.1rem 1.5rem 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; flex: 1; }
.pcard-name { font-size: 1.35rem; margin: 0; }
.pcard-role { color: var(--rs-primary); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.pcard-why { margin: .5rem 0 .6rem; color: var(--rs-text); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-why[open], .pcard-more { -webkit-line-clamp: unset; }
.pcard-foot { margin-top: auto; width: 100%; display: grid; gap: .8rem; justify-items: center; }
.pcard-actions { display: flex; gap: .55rem; justify-content: center; }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; text-decoration: none; font-size: 1.05rem; cursor: pointer;
  background: var(--rs-primary-tint); color: var(--rs-primary); }
.round:hover { background: var(--rs-primary); color: var(--rs-on-primary); }
.round.r-peach { background: var(--rs-peach-tint); color: var(--rs-peach); } .round.r-peach:hover { background: var(--rs-peach); color: var(--rs-surface); }
.round.r-mint { background: var(--rs-success-tint); color: var(--rs-success); } .round.r-mint:hover { background: var(--rs-success); color: var(--rs-surface); }
.round.r-rose { background: var(--rs-danger-tint); color: var(--rs-danger); } .round.r-rose:hover { background: var(--rs-danger); color: var(--rs-surface); }
.pcard .email-ask { width: 100%; text-align: left; }
.pcard .li-note { width: 100%; text-align: left; }
.pcard .li-note textarea { font-size: .85rem; resize: vertical; }
.li-reply { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.li-reply form { display: flex; gap: .5rem; margin: 0; }
.li-reply input[type="email"], .li-reply input[type="text"] { width: auto; min-width: 14rem; flex: 1 1 14rem; }
@media (max-width: 1099.98px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 679.98px) { .pgrid { grid-template-columns: 1fr; } }

.progress-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.progress-row:last-child { border-bottom: 0; }

/* ---------- booking ---------- */
.slot-day h3 { font-size: 1rem; margin: 1.4rem 0 .6rem; }
.slots { display: flex; flex-wrap: wrap; gap: .55rem; }
.slots input { position: absolute; opacity: 0; pointer-events: none; }
.slots label { min-width: 82px; text-align: center; padding: .6rem .9rem; border: 1.5px solid var(--rs-border); border-radius: 999px; background: var(--rs-surface);
  cursor: pointer; font-weight: 600; min-height: 46px; transition: border-color .15s, background-color .15s, transform .15s; }
.slots label:hover { border-color: var(--rs-primary); color: var(--rs-primary); }
.slots input:checked + label { background: var(--rs-primary); border-color: var(--rs-primary); color: var(--rs-on-primary); transform: scale(1.04); }
.slots input:focus-visible + label { outline: 3px solid var(--bs-focus-ring-color); outline-offset: 2px; }
.confirm-bar { position: sticky; bottom: 12px; background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: var(--r-lg); box-shadow: var(--rs-shadow-lift);
  padding: .9rem 1.2rem; margin: 1.5rem 0 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.more-days summary { cursor: pointer; font-weight: 600; color: var(--rs-primary); padding: .8rem 0; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .form-control, .form-select, .task, .course-card, .pcard, .round, .seg a, .pill-nav a { transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .2s ease, transform .2s ease; }
  .btn:active { transform: scale(.97); }
  .spin { animation: rs-spin 1s linear infinite; display: inline-block; }
  /* the one orchestrated moment: people settle into their lanes when the course page opens */
  .board .bubble { animation: rs-settle .45s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
}
@keyframes rs-spin { to { transform: rotate(360deg); } }
@keyframes rs-settle { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.min-w-0 { min-width: 0; }

/* ---------- shortlist carousel: three experts at a time, best matches first ---------- */
.carousel-nav { display: inline-flex; align-items: center; gap: .7rem; }
.carousel-nav[hidden] { display: none; }
.carousel-nav .round:disabled { opacity: .35; cursor: default; pointer-events: none; }
.carousel-nav .dots { display: inline-flex; gap: .4rem; }
.carousel-nav .dot { width: 9px; height: 9px; border-radius: 99px; background: var(--rs-border); transition: width .2s ease, background-color .2s ease; }
.carousel-nav .dot.on { width: 24px; background: var(--rs-primary); }
.carousel-slide[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .carousel-slide.entering .pcard { animation: rs-settle .4s cubic-bezier(.2, .9, .3, 1.2) both; }
  .carousel-slide.entering .pcard:nth-child(2) { animation-delay: 60ms; }
  .carousel-slide.entering .pcard:nth-child(3) { animation-delay: 120ms; }
}

/* ---------- confirmation dialog ---------- */
.confirm-card { border: 0; border-radius: var(--r-lg); background: var(--rs-surface); box-shadow: var(--rs-shadow-lift); }
.confirm-card .modal-body { padding: 2rem 2rem 1rem; text-align: center; }
.confirm-card .modal-footer { border: 0; justify-content: center; gap: .5rem; padding: .5rem 2rem 2rem; }
.confirm-card p { color: var(--rs-text); max-width: 42ch; margin-inline: auto; }
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.6rem;
  background: var(--rs-primary-tint); color: var(--rs-primary); }
.confirm-icon.is-danger { background: var(--rs-danger-tint); color: var(--rs-danger); }
.btn-danger { --bs-btn-bg: var(--rs-danger); --bs-btn-border-color: var(--rs-danger); --bs-btn-hover-bg: var(--rs-danger); --bs-btn-hover-border-color: var(--rs-danger);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--rs-danger); --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .btn-danger { --bs-btn-color: #2a0b12; --bs-btn-hover-color: #2a0b12; --bs-btn-active-color: #2a0b12; }
.modal-backdrop { --bs-backdrop-bg: #14122a; --bs-backdrop-opacity: .55; }

/* ---------- import ---------- */
.dropzone { display: grid; place-items: center; gap: .35rem; text-align: center; padding: 2.5rem 1.5rem; cursor: pointer;
  border: 2px dashed var(--rs-border); border-radius: var(--r-lg); background: var(--rs-lilac-tint); color: var(--rs-text); }
.dropzone:hover, .dropzone.is-over { border-color: var(--rs-primary); background: var(--rs-primary-tint); }
.dropzone > .bi { font-size: 2.2rem; color: var(--rs-primary); }
.dropzone .chosen { color: var(--rs-primary); font-weight: 600; word-break: break-word; }
.dropzone:focus-within { outline: 3px solid var(--bs-focus-ring-color); outline-offset: 2px; }
.import-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 40px; background: var(--rs-lilac-tint); color: var(--rs-muted); }
.import-ico.created { background: var(--rs-success-tint); color: var(--rs-success); }
.import-ico.failed { background: var(--rs-danger-tint); color: var(--rs-danger); }
.btn-outline-danger { --bs-btn-color: var(--rs-danger); --bs-btn-border-color: var(--rs-danger); --bs-btn-hover-bg: var(--rs-danger); --bs-btn-hover-border-color: var(--rs-danger); --bs-btn-hover-color: #fff; }

/* ---------- messages ---------- */
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.topics { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.topic { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 1.2rem; color: var(--rs-text); text-decoration: none; border-bottom: 1px solid var(--rs-border); }
.topic:last-child { border-bottom: 0; }
.topic:hover { background: var(--rs-lilac-tint); color: var(--rs-ink); }
.topic.on { background: var(--rs-primary-tint); color: var(--rs-primary); font-weight: 700; }
.topic .t-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; }
.topic .bi { margin-right: .5rem; }
.t-badges { display: inline-flex; gap: .3rem; align-items: center; }
.t-count { min-width: 26px; text-align: center; font-size: .82rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: var(--rs-lilac-tint); color: var(--rs-muted); }
.topic.on .t-count { background: var(--rs-surface); color: var(--rs-primary); }
.inbox-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.msg { border-bottom: 1px solid var(--rs-border); }
.msg:last-child { border-bottom: 0; }
.msg > summary { display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1.6fr) auto auto; align-items: center; gap: .9rem; padding: .9rem 1.4rem; cursor: pointer; list-style: none; }
.msg > summary::-webkit-details-marker { display: none; }
.msg > summary:hover { background: var(--rs-lilac-tint); }
.msg[open] > summary { background: var(--rs-lilac-tint); }
.msg-who b, .msg-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.msg-who .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-body { padding: .25rem 1.4rem 1.4rem 4.2rem; }
.msg-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; padding: 1rem 1.2rem; border-radius: var(--r-sm); background: var(--rs-page); color: var(--rs-text); max-width: 80ch; }
@media (max-width: 991.98px) {
  .inbox { grid-template-columns: 1fr; }
  .topics { position: static; max-height: 240px; }
  .msg > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .msg > summary .msg-subject { grid-column: 2 / 4; grid-row: 2; }
  .msg > summary time { display: none; }
  .msg-body { padding-left: 1.4rem; }
}

/* keep visually-hidden cells (absolute) clipped inside scrolling tables */
.table-responsive { position: relative; }

/* expert network table and expert detail */
.expert-toolbar { flex-wrap: wrap; justify-content: flex-start; }
.expert-search { max-width: 380px; flex: 1 1 260px; }
.expert-table thead th { background: var(--rs-lilac-tint); text-transform: uppercase; letter-spacing: .04em; font-size: .74rem; white-space: nowrap; }
.expert-table tbody tr:last-child td { border-bottom: 0; }
.expert-table { --bs-table-hover-bg: var(--rs-lilac-tint); --bs-table-hover-color: var(--rs-text); }
.expert-name { font-weight: 600; color: var(--rs-ink); text-decoration: none; }
.expert-name:hover { color: var(--rs-primary); text-decoration: underline; }
.min-w-0 { min-width: 0; }
.chip-more { background: transparent; border: 1px dashed var(--rs-border); color: var(--rs-muted); cursor: help; }
.row-actions { display: inline-flex; align-items: center; gap: .15rem; }
.row-actions .btn { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
.btn-quiet-danger { --bs-btn-hover-color: var(--rs-danger); --bs-btn-hover-bg: var(--rs-danger-tint); }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.6rem; border-top: 1px solid var(--rs-border); }
.pagination { --bs-pagination-color: var(--rs-text); --bs-pagination-bg: transparent; --bs-pagination-border-color: var(--rs-border);
  --bs-pagination-hover-color: var(--rs-primary); --bs-pagination-hover-bg: var(--rs-lilac-tint); --bs-pagination-hover-border-color: var(--rs-border);
  --bs-pagination-active-bg: var(--rs-primary); --bs-pagination-active-border-color: var(--rs-primary); --bs-pagination-active-color: var(--rs-on-primary);
  --bs-pagination-disabled-bg: transparent; --bs-pagination-disabled-color: var(--rs-muted); --bs-pagination-disabled-border-color: var(--rs-border);
  --bs-pagination-focus-box-shadow: 0 0 0 .22rem var(--bs-focus-ring-color); gap: .25rem; }
.pagination .page-link { border-radius: 10px !important; min-width: 34px; text-align: center; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: .85rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--rs-muted); font-weight: 600; font-size: .86rem; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .detail-list > div { grid-template-columns: 1fr; gap: .2rem; } }

/* expert activity */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.stat-grid > div { padding: 1.1rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.stat-grid > div:nth-child(odd) { border-right: 1px solid var(--rs-border); }
.stat-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.stat-grid dt { color: var(--rs-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-grid dd { margin: .2rem 0 0; font-size: 1.6rem; font-weight: 700; color: var(--rs-ink); line-height: 1.2; }
.stat-unit { font-size: .9rem; font-weight: 500; color: var(--rs-muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: 1rem; padding: 1.1rem 1.6rem; border-bottom: 1px solid var(--rs-border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-marker { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--rs-lilac-tint); color: var(--rs-muted); font-size: 1.05rem; }
.timeline-message { background: var(--rs-info-tint); color: var(--rs-info); }
.timeline-course { background: var(--rs-attention-tint); color: var(--rs-attention); }
.timeline-booking { background: var(--rs-success-tint); color: var(--rs-success); }
.timeline-rating { background: var(--rs-primary-tint); color: var(--rs-primary); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-title { font-weight: 600; color: var(--rs-ink); overflow-wrap: anywhere; }
.timeline-desc { margin: .35rem 0 .3rem; font-size: .92rem; color: var(--rs-text); overflow-wrap: anywhere; }
