/* Investment Partners Group - design tokens and components carried over from ipg-prototype.html */
:root {
  --navy: #1B3A57; --navy-deep: #122B43; --green: #2F8F4E; --green-soft: #E3F2E8;
  --gold: #C9A227; --gold-soft: #FBF3D9; --paper: #F5F6F3; --ink: #1F2933; --muted: #6B7580;
  --line: #DCE1E6; --red: #B5382F; --red-soft: #FBE7E5;
  --navy-soft: #EAF0F6; --surface: #FFFFFF; --shadow-sm: 0 1px 2px rgba(18,43,67,.05), 0 1px 3px rgba(18,43,67,.04);
  --radius: .9rem;
  --bs-body-font-family: 'Manrope', system-ui, sans-serif; --bs-body-color: var(--ink);
  --bs-primary: var(--navy); --bs-primary-rgb: 27, 58, 87;
}
html, body { min-height: 100%; background: var(--paper); font-feature-settings: "tnum" 1; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-deep); --bs-btn-hover-border-color: var(--navy-deep); --bs-btn-active-bg: var(--navy-deep); --bs-btn-disabled-bg: var(--navy); --bs-btn-disabled-border-color: var(--navy); }
.btn-success { --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); --bs-btn-hover-bg: #25743F; --bs-btn-hover-border-color: #25743F; }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--navy); }
.form-control:focus, .form-select:focus { border-color: var(--navy); box-shadow: 0 0 0 .2rem rgba(27, 58, 87, .18); }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
a { color: var(--navy); }
.text-gold { color: var(--gold) !important; }

/* ---------- sign-in pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--paper); }
.auth .brand { position: relative; overflow: hidden; color: #fff; padding: 3rem clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: radial-gradient(120% 70% at 100% 0%, rgba(201,162,39,.20) 0%, transparent 55%), radial-gradient(90% 60% at 0% 100%, rgba(47,143,78,.22) 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); }
.auth .logo-card { width: 100%; max-width: 460px; aspect-ratio: 900 / 398; border-radius: 1.1rem; overflow: hidden; background: #F7F8F8; box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(201,162,39,.45); }
.auth .logo-card img { width: 100%; height: 100%; object-fit: contain; display: block; padding: .6rem .9rem; }
.auth .brand h1 { font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.auth .brand .rule { width: 64px; height: 4px; border-radius: 2px; background: var(--gold); margin: 1.1rem 0; }
.auth .brand p { max-width: 38ch; opacity: .85; margin-bottom: 1.25rem; }
.auth .brand .foot { opacity: .7; }
.auth .form { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 1.25rem; }
.auth .form form, .auth .form .auth-box { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 30px rgba(18,43,67,.07); }
.auth .form form.wide { max-width: 660px; }
.auth .form .form-control-lg { font-size: 1rem; }
/* show / hide password */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle { position: absolute; top: 0; right: 0; height: 100%; width: 3rem; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; border-radius: 0 .5rem .5rem 0; }
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--navy); }
.pw-wrap .form-control.is-invalid { background-image: none; }
/* development test accounts */
.test-accounts { width: 100%; max-width: 420px; border: 1px dashed var(--gold); border-radius: 1rem; background: var(--gold-soft); padding: 1rem; }
.test-accounts .head { display: flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); margin-bottom: .6rem; }
.test-accounts .head span { margin-left: auto; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.test-account { width: 100%; display: flex; align-items: center; gap: .75rem; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: .7rem; padding: .55rem .75rem; margin-top: .45rem; transition: border-color .15s, box-shadow .15s; }
.test-account:hover, .test-account:focus-visible { border-color: var(--navy); box-shadow: 0 2px 8px rgba(18,43,67,.12); outline: none; }
.test-account .av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; font-size: .8rem; }
.test-account b { display: block; font-size: .9rem; color: var(--ink); }
.test-account small { color: var(--muted); }
.test-account .bi-box-arrow-in-right { margin-left: auto; color: var(--muted); }
@media (max-width: 991px) {
  .auth { grid-template-columns: 1fr; }
  .auth .brand { padding: 1.5rem 1.25rem; gap: 1rem; align-items: center; text-align: center; }
  .auth .logo-card { max-width: 300px; }
  .auth .pitch, .auth .brand .foot { display: none; }
  .auth .form { justify-content: flex-start; padding-top: 1.5rem; }
}
/* ---------- app shell ---------- */
:root { --side-w: 256px; --side-w-min: 76px; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
body.side-collapsed .shell { grid-template-columns: var(--side-w-min) minmax(0, 1fr); }

/* sidebar (light) */
.side { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.side > * { flex-shrink: 0; }
/* Bootstrap's .mark is a text highlight; our brand marks must not get its background */
.mobilebar .mark, .auth .mark { background: transparent; padding: 0; }
.side .brand { display: block; padding: .25rem; border-radius: .9rem; }
.side .brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.brand-full { display: block; width: 100%; aspect-ratio: 900 / 398; object-fit: contain; border-radius: .7rem; background: #F7F8F8; padding: .3rem .45rem; }
/* square logo mark (assets/images/ipg-mark.png); --e is the box size */
.emblem { --e: 44px; display: inline-block; flex-shrink: 0; width: var(--e); height: var(--e); overflow: hidden; border-radius: calc(var(--e) * .27); background: #F7F8F8; box-shadow: 0 0 0 1px var(--line); }
.emblem img { display: block; width: 100%; height: 100%; object-fit: cover; }
.emblem.sm { --e: 34px; }
.side .brand .emblem { display: none; margin: 0 auto; }
.role-chip { display: flex; align-items: center; gap: .4rem; margin: .8rem .25rem .35rem; padding: .3rem .65rem; border-radius: 999px; background: var(--gold-soft); color: #7A5E0B; font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding-top: .25rem; }
.nav-section { font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--muted); opacity: .8; padding: .9rem .75rem .3rem; white-space: nowrap; }
.side .nav-link, .nav-offcanvas .nav-link { position: relative; color: #4A5561; display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: .6rem; font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.side .nav-link { white-space: nowrap; }
.side .nav-link i, .nav-offcanvas .nav-link i { font-size: 1.1rem; width: 1.4rem; text-align: center; flex-shrink: 0; color: #7C8792; transition: color .15s; }
.side .nav-link:hover, .nav-offcanvas .nav-link:hover { color: var(--navy); background: var(--paper); }
.side .nav-link:hover i, .nav-offcanvas .nav-link:hover i { color: var(--navy); }
.side .nav-link.active, .nav-offcanvas .nav-link.active { color: var(--navy); background: var(--navy-soft); }
.side .nav-link.active i, .nav-offcanvas .nav-link.active i { color: var(--green); }
.side .nav-link.active::before, .nav-offcanvas .nav-link.active::before { content: ""; position: absolute; left: -.75rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side .nav-link .badge, .nav-offcanvas .nav-link .badge { margin-left: auto; background: var(--gold); color: var(--navy-deep); }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.side-foot { margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-foot .nav-link { font-size: .85rem; }

/* Administration | My portal switch (officers are members too) */
.area-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin: .6rem .25rem .5rem; border-radius: .75rem; background: var(--paper); border: 1px solid var(--line); }
.area-switch a { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .42rem .3rem; border-radius: .55rem; font-size: .78rem; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; transition: background .15s, color .15s, box-shadow .15s; }
.area-switch a:hover { color: var(--navy); }
.area-switch a.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(18,43,67,.14); }
.area-switch a.active i { color: var(--green); }
.nav-offcanvas .area-switch { margin: 0 0 .75rem; }
.nav-offcanvas .area-switch a { font-size: .85rem; padding: .55rem .3rem; }

/* collapsed: icon rail */
body.side-collapsed .area-switch { grid-template-columns: 1fr; margin-inline: 0; }
body.side-collapsed .area-switch a { padding: .45rem 0; }
body.side-collapsed .side { padding-inline: .6rem; }
body.side-collapsed .brand-full, body.side-collapsed .side .nav-label { display: none; }
body.side-collapsed .side .brand .emblem { display: block; }
body.side-collapsed .role-chip { justify-content: center; padding: .3rem 0; margin-inline: .35rem; }
body.side-collapsed .nav-section { padding: 0; margin: .6rem .6rem; height: 1px; background: var(--line); opacity: 1; }
body.side-collapsed .side .nav-link { justify-content: center; gap: 0; padding: .6rem 0; }
body.side-collapsed .side .nav-link.active::before { left: -.6rem; }
body.side-collapsed .side .nav-link .badge { position: absolute; top: 5px; right: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px #fff; }

/* top bar */
.content { min-width: 0; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: .85rem; min-height: 62px; padding: .5rem 2rem; background: rgba(245,246,243,.82); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: .7rem; font-size: 1.3rem; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--navy); color: #fff; border-color: var(--navy); }
.appbar .crumb { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); font-weight: 600; min-width: 0; white-space: nowrap; }
.appbar .crumb i { font-size: .7rem; opacity: .6; }
.appbar .crumb b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.appbar .bell { color: var(--navy); width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: .7rem; font-size: 1.1rem; }
.appbar .bell:hover { background: var(--paper); }
.appbar .bell .dot { top: 8px; right: 9px; box-shadow: 0 0 0 2px #fff; }
.user-toggle { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .22rem .75rem .22rem .22rem; color: var(--ink); }
.user-toggle:hover { border-color: #C5CDD5; }
.me-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--green)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; letter-spacing: .02em; flex-shrink: 0; }
.me-who { display: flex; flex-direction: column; line-height: 1.15; text-align: left; max-width: 180px; }
.me-who b { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who small { color: var(--muted); font-size: .7rem; }
.user-menu .dropdown-menu { border: 1px solid var(--line); border-radius: .75rem; box-shadow: 0 12px 30px rgba(18,43,67,.12); padding: .4rem; min-width: 220px; }
.user-menu .dropdown-item { border-radius: .5rem; font-weight: 600; font-size: .9rem; padding: .45rem .7rem; }
.user-menu .dropdown-header { color: var(--muted); font-size: .78rem; }
.user-menu .dropdown-header b { color: var(--ink); font-size: .88rem; }
@media (max-width: 1199px) { .me-who { display: none; } .user-toggle { padding-right: .55rem; } }

main { padding: 1.5rem 2rem 5rem; max-width: 1600px; width: 100%; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.topbar h2 { font-weight: 800; letter-spacing: -.02em; margin: 0; }
.topbar .sub { color: var(--muted); }
.mobilebar { display: none; }
.tabbar { display: none; }
.nav-offcanvas { background: var(--surface); color: var(--ink); --bs-offcanvas-width: min(320px, 86vw); }
.nav-offcanvas .offcanvas-header { border-bottom: 1px solid var(--line); }
.nav-offcanvas .offcanvas-title { color: var(--navy); }
.nav-offcanvas .offcanvas-body { padding: .75rem; }
@media (max-width: 991px) {
  .shell, body.side-collapsed .shell { grid-template-columns: 1fr; }
  .side, .appbar { display: none; }
  main { padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
  .mobilebar { display: flex; position: sticky; top: 0; z-index: 30; padding: .55rem 1rem; align-items: center; justify-content: space-between; gap: .75rem;
    background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
  .mobilebar .mark { color: var(--navy); text-decoration: none; font-weight: 800; display: flex; align-items: center; gap: .6rem; font-size: 1rem; letter-spacing: -.01em; min-width: 0; white-space: nowrap; overflow: hidden; }
  .mobilebar .bell, .mobilebar .menu-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: .75rem; font-size: 1.15rem; padding: 0; }
  .mobilebar .bell .dot { top: 8px; right: 9px; box-shadow: 0 0 0 2px #fff; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; padding: .3rem .35rem calc(.3rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(18,43,67,.06); }
  .tabbar a { flex: 1; min-width: 0; text-align: center; padding: .3rem 0 .25rem; font-size: .68rem; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent; }
  .tabbar a i { display: block; width: 48px; margin: 0 auto .15rem; padding: .2rem 0; border-radius: 999px; font-size: 1.2rem; line-height: 1.2; transition: background .15s, color .15s; }
  .tabbar a.active { color: var(--navy); }
  .tabbar a.active i { background: var(--navy-soft); color: var(--green); }

  .topbar { align-items: flex-start; margin-bottom: 1rem; gap: .75rem; }
  .topbar h2 { font-size: 1.45rem; }
  .topbar .sub { font-size: .88rem; }
  .topbar .btn { --bs-btn-padding-y: .45rem; --bs-btn-padding-x: .8rem; --bs-btn-font-size: .88rem; }
  .ipg-table > .ph [data-role="search"] { max-width: none !important; flex: 1 1 100%; }
  .ipg-table > .ph [data-role="tools"] { margin-left: 0 !important; width: 100%; }
  .ipg-table > .ph [data-role="tools"] > .form-select { flex: 1 1 140px; width: auto; }
  .panel, .fig, .cycle { border-radius: var(--radius); }
  .nav-tabs { scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
}
/* ---------- segmented tabs (member roster) ---------- */
.seg-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs button { flex: none; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: .4rem .85rem; font-size: .85rem; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.seg-tabs button:hover { color: var(--navy); border-color: #C5CDD5; }
.seg-tabs button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg-tabs .count { min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .74rem; line-height: 1.4rem; text-align: center; }
.seg-tabs .count:empty { display: none; }
.seg-tabs button.active .count { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- view as member (IT support) ---------- */
.viewas-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .45rem 1rem; background: var(--gold); color: var(--navy-deep); font-size: .88rem; font-weight: 600; text-align: center; }

/* ---------- cycles table ---------- */
.cycles-table td:first-child { white-space: nowrap; }
.cycles-table tr.table-row-open > td { background: #F7FBF8; }
.cycles-table tr.table-row-open > td:first-child { box-shadow: inset 3px 0 0 var(--green); }

/* ---------- cycle dates (overview) ---------- */
.cycle-dates { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; }
.cycle-dates .name { font-size: 1.05rem; font-weight: 800; margin-right: auto; }
.cycle-dates .when { display: flex; flex-direction: column; }
.cycle-dates .when small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cycle-dates .when b { font-size: 1.1rem; }
.cycle-dates .arrow { color: var(--muted); font-size: 1.25rem; }

/* ---------- cycle strip ---------- */
.cycle { background: #fff; border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.cycle .head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.cycle .head b { font-size: 1.05rem; }
.cycle .months { display: grid; grid-template-columns: repeat(var(--n, 11), 1fr); gap: 4px; }
.cycle .m { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: .45rem 0; border-radius: .4rem; border: 1px solid transparent; }
.cycle .m span { display: block; height: 6px; border-radius: 3px; background: var(--line); margin: .35rem auto 0; width: 80%; }
.cycle .m.closed { color: var(--ink); }
.cycle .m.closed span { background: var(--green); }
.cycle .m.published span { background: var(--green); }
.cycle .m.open { color: var(--navy); border-color: var(--navy); background: var(--gold-soft); }
.cycle .m.open span { background: var(--gold); }
.cycle .ends { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.cycle .ends b { color: var(--ink); font-weight: 700; }
.cycle .legend { font-size: .75rem; color: var(--muted); margin-top: .6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.cycle .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
@media (max-width: 575px) { .cycle .months { grid-template-columns: repeat(6, 1fr); } }

/* ---------- figures & panels ---------- */
.figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.fig { background: #fff; border: 1px solid var(--line); border-radius: .75rem; box-shadow: var(--shadow-sm); padding: 1rem 1.15rem; min-width: 0; }
.fig .l { color: var(--muted); font-size: .82rem; font-weight: 600; }
.fig .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-top: .15rem; overflow-wrap: anywhere; }
.fig .d { font-size: .8rem; color: var(--muted); }
.fig.accent { border-left: 4px solid var(--green); }
.fig.warn { border-left: 4px solid var(--gold); }
.fig.bad { border-left: 4px solid var(--red); }
@media (max-width: 991px) { .figs { grid-template-columns: repeat(2, 1fr); gap: .75rem; } }
@media (max-width: 575px) {
  .fig { padding: .85rem .9rem; }
  .fig .l { font-size: .76rem; }
  .fig .v { font-size: clamp(1.05rem, 5.2vw, 1.35rem); overflow-wrap: normal; white-space: nowrap; }
  .fig .d { font-size: .74rem; }
  .cycle-dates { gap: .5rem 1.25rem; }
  .cycle-dates .name { flex-basis: 100%; margin-right: 0; }
  .statement .big { font-size: 1.8rem; }
  .statement { padding: 1.2rem; }
  .statement:after { width: 120px; height: 120px; right: -50px; top: -50px; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: .75rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; overflow: hidden; }
.panel > .ph, .ipg-table > .ph { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); gap: .5rem; flex-wrap: wrap; }
.panel > .ph h5 { margin: 0; font-weight: 700; font-size: 1rem; }
.panel .pb { padding: 1rem 1.15rem; }
.table { margin: 0; font-size: .9rem; }
.table th { font-weight: 700; color: var(--muted); font-size: .78rem; border-bottom-width: 1px; white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable .bi { opacity: .35; font-size: .7rem; }
.table th.sorted .bi { opacity: 1; color: var(--navy); }
.table td { vertical-align: middle; }
.table tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
.table-wrap { overflow-x: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.15rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); gap: .5rem; flex-wrap: wrap; }
.empty { padding: 2rem 1rem !important; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 1rem; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: #1E6B39; }
.pill.wait { background: var(--gold-soft); color: #7A5E0B; }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.grey { background: #EDF0F2; color: var(--muted); }
.pill.navy { background: #E4EBF2; color: var(--navy); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft); color: #1E6B39; font-weight: 800; font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; margin-right: .5rem; flex: none; }
.who { display: inline-flex; align-items: center; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }

/* member statement card */
.statement { background: var(--navy); color: #fff; border-radius: .9rem; padding: 1.4rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.statement:after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(201,162,39,.15); pointer-events: none; }
.statement .l { opacity: .75; font-size: .82rem; font-weight: 600; }
.statement .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.statement .row > div { margin-top: 1rem; }
.statement .row .v { font-weight: 700; font-size: 1.05rem; }

/* close steps */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }
.steps .n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; flex: none; color: var(--muted); }
.steps li.done .n { background: var(--green); border-color: var(--green); color: #fff; }
.steps li.now .n { border-color: var(--navy); color: var(--navy); }
.steps .t { font-weight: 700; }
.steps .s { color: var(--muted); font-size: .85rem; }

.activity { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.activity li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border: 0; }
.activity time { color: var(--muted); flex: none; width: 70px; font-size: .78rem; padding-top: 2px; }

.settings-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 1rem; align-items: center; padding: .8rem 1.15rem; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row .val { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 767px) { .settings-row { grid-template-columns: 1fr; gap: .35rem; } }

.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.error-page .panel { max-width: 460px; width: 100%; }
pre.json { background: #F3F5F7; border-radius: .5rem; padding: .75rem; font-size: .78rem; text-align: left; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* notifications */
.bell { position: relative; background: transparent; border: 0; color: var(--navy); font-size: 1.15rem; padding: .15rem .4rem; line-height: 1; border-radius: .4rem; }
.bell:hover { background: var(--paper); }
.bell .dot { position: absolute; top: 2px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #fff; }
.notif-list .notif { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .88rem; }
.notif-list .notif:hover { background: var(--paper); }
.notif-list .notif.unread { border-left: 3px solid var(--gold); background: #FFFCF2; }
.notif-list .notif b { display: block; }
.notif-list .notif span { display: block; color: var(--muted); }
.notif-list .notif time { font-size: .75rem; color: var(--muted); }

/* phones: table rows become cards; app.js copies each column header into data-label */
@media (max-width: 767px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tfoot, .table.stack tr { display: block; width: 100%; }
  .table.stack tr { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
  .table.stack tbody tr:last-child { border-bottom: 0; }
  .table.stack tfoot tr { background: var(--paper); border-top: 2px solid var(--line); }
  .table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .22rem 0; border: 0; text-align: right; min-width: 0; white-space: normal; }
  .table.stack td::before { content: attr(data-label); flex: none; max-width: 48%; text-align: left; color: var(--muted); font-size: .76rem; font-weight: 600; }
  .table.stack td:first-child { justify-content: flex-start; text-align: left; font-weight: 700; padding-bottom: .35rem; }
  .table.stack td:first-child::before, .table.stack td[data-label=""]::before, .table.stack td.empty::before, .table.stack td[colspan]::before { display: none; }
  .table.stack td[data-label=""] { justify-content: flex-end; }
  .table.stack td.empty, .table.stack td[colspan] { display: block; text-align: center; font-weight: 400; color: var(--muted); }
  .table.stack td.empty { padding: 1.25rem 0 !important; }
  .table.stack td .ms-5 { margin-left: 0 !important; }
}

/* tabs */
.nav-tabs { border-bottom-color: var(--line); flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 700; white-space: nowrap; border: 0; border-bottom: 3px solid transparent; }
.nav-tabs .nav-link.active { color: var(--navy); background: transparent; border-bottom-color: var(--gold); }

.swal2-popup { font-family: 'Manrope', sans-serif !important; border-radius: .9rem !important; }
.swal2-confirm { background: var(--navy) !important; }
.swal2-html-container { text-align: left; }
.swal2-popup .form-label { font-size: .85rem; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
