:root{
  --bg:#f3f6f8;
  --panel:#ffffff;
  --panel-soft:#f9fbfc;
  --text:#0f1728;
  --muted:#66758b;
  --line:#e4ebf1;
  --brand:#1b4332;
  --brand-2:#2d6a4f;
  --brand-700:#163728;
  --primary:#2563eb;
  --primary-soft:#eef4ff;
  --danger:#dc2626;
  --danger-soft:#fff1f2;
  --success:#16a34a;
  --success-soft:#ecfdf3;
  --warning:#d97706;
  --warning-soft:#fff7ed;
  --shadow:0 14px 34px rgba(16,24,40,.055);
  --radius-xl:22px;
  --radius-lg:18px;
  --radius-md:14px;
}

html, body {
  height: 100%;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(27,67,50,.05), transparent 28%),
    linear-gradient(180deg,#f8fbfc 0%, #f3f6f8 100%);
  color:var(--text);
}

.crm-auth-body{background:#f3f7fa;}
.crm-auth-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr;
  position:relative;
}
.crm-auth-visual{
  position:relative;
  overflow:hidden;
  min-height:100vh;
  background:linear-gradient(180deg,#163728 0%,#214d39 100%);
}
.crm-auth-visual__image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.crm-auth-visual__overlay{
  position:absolute;
  left:64px;
  right:64px;
  bottom:64px;
  color:#fff;
  max-width:520px;
}
.crm-auth-visual__eyebrow{
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:rgba(255,255,255,.75);
  margin-bottom:12px;
}
.crm-auth-visual__overlay h1{
  font-size:48px;
  line-height:1.05;
  margin:0 0 14px;
  font-weight:800;
}
.crm-auth-visual__overlay p{
  font-size:1rem;
  color:rgba(255,255,255,.82);
  margin:0;
}
.crm-auth-form-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px;
}
.crm-auth-form{
  width:min(460px, 100%);
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(18px);
  border:1px solid rgba(231,236,243,.95);
  border-radius:28px;
  box-shadow:0 24px 60px rgba(16,24,40,.08);
  padding:36px;
}
.crm-auth-form__header{margin-bottom:24px;}
.crm-auth-form__brand{
  margin-bottom:14px;
  display:flex;
  justify-content:center;
}
.crm-auth-form__brand-image{
  width:85px;
  max-width:100%;
  height:auto;
  display:block;
}
.crm-auth-form__eyebrow{
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:8px;
}
.crm-auth-form__header h2{
  margin:0;
  font-size:32px;
  font-weight:800;
}
.crm-auth-footer{
  position:absolute;
  left:28px;
  right:28px;
  bottom:24px;
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  color:#fff;
  z-index:3;
}
.crm-auth-footer__brand{
  font-weight:800;
  letter-spacing:.04em;
  display:flex;
  align-items:center;
  gap:10px;
}
.crm-auth-footer__logo{
  height:26px;
  width:auto;
  display:block;
}
.crm-auth-footer__version{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  font-size:.85rem;
  font-weight:800;
}
.crm-auth-footer__signature{
  font-size:.78rem;
  color:rgba(255,255,255,.88);
  letter-spacing:.01em;
  text-shadow:0 1px 2px rgba(0,0,0,.18);
}
.crm-auth-footer__signature strong{
  color:#fff;
  font-weight:800;
}

.crm-shell{display:flex;min-height:100vh;}
.crm-mobile-backdrop{
  display:none;
}
.crm-sidebar{
  width:280px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.06), transparent 24%),
    linear-gradient(180deg,#183b2d 0%,#1b4332 62%,#21493a 100%);
  color:#fff;
  padding:18px 16px;
  position:sticky;
  top:0;
  height:100vh;
  box-shadow:0 12px 28px rgba(16,24,40,.11);
  z-index:1000;
  display:flex;
  flex-direction:column;
}
.crm-main{flex:1;padding:24px 24px 28px;}
.crm-content{display:block;}
.crm-mobile-nav-toggle{
  display:none;
  width:46px;
  height:46px;
  border-radius:16px;
  border:1px solid #d9e8df;
  background:linear-gradient(180deg,#ffffff 0%, #f7fbf8 100%);
  color:var(--brand);
  box-shadow:var(--shadow);
  align-items:center;
  justify-content:center;
  font-size:22px;
  margin-bottom:10px;
}

.crm-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 12px 20px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.crm-brand__logo{
  width:46px;height:46px;border-radius:16px;
  display:grid;place-items:center;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.10);
  overflow:hidden;
}
.crm-brand__logo-image{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  padding:5px;
}
.crm-brand__title{font-size:18px;line-height:1.2;margin:0;font-weight:800;}
.crm-brand__subtitle{margin:3px 0 0;font-size:12px;color:rgba(255,255,255,.72);}
.crm-sidebar__mobile-top{
  display:none;
}
.crm-sidebar__close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}

.crm-nav{display:flex;flex-direction:column;gap:6px;flex:1 1 auto;}
.crm-nav__link{
  display:flex;align-items:center;gap:12px;
  color:#fff;text-decoration:none;
  padding:12px 14px;border-radius:16px;
  opacity:.88;
  transition:background .16s ease, transform .16s ease, opacity .16s ease;
}
.crm-nav__link:hover,
.crm-nav__link.active{
  background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.08));
  opacity:1;color:#fff;
}
.crm-nav__link i{
  width:18px;
  text-align:center;
  color:rgba(255,255,255,.76);
}
.crm-sidebar__section{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(255,255,255,.46);
  padding:14px 12px 8px;
  font-weight:800;
}
.crm-sidebar__footer{
  margin-top:auto;
  padding:14px 12px 8px;
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.72);
}
.crm-sidebar__meta{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}

.crm-topbar{
  display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px;
  padding:6px 0 2px;
}
.crm-topbar__heading{
  display:flex;
  flex-direction:column;
}
.crm-topbar__eyebrow{font-size:.8rem;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.06em;}
.crm-topbar__title{margin:4px 0 0;font-size:30px;font-weight:900;letter-spacing:-.02em;}
.crm-topbar__meta{display:flex;align-items:center;gap:12px;}
.crm-topbar__brand-mobile{
  display:none;
}
.crm-topbar__brand-mobile img{
  display:block;
  width:34px;
  height:34px;
  object-fit:contain;
}
.crm-version-chip{
  font-size:.8rem;
  color:#466253;
  background:linear-gradient(180deg,#f7faf8 0%,#eef5f1 100%);
  border:1px solid #d9e8df;
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
}
.crm-version-chip--sidebar{
  align-self:flex-start;
  color:rgba(255,255,255,.82);
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);
}
.crm-sidebar__signature{
  font-size:.76rem;
  color:rgba(255,255,255,.62);
  letter-spacing:.01em;
}
.crm-sidebar__signature strong{
  color:rgba(255,255,255,.82);
  font-weight:800;
}
.crm-user-menu{
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #dfe7e2;
  background:linear-gradient(180deg,#ffffff 0%, #f8fbf9 100%);
  border-radius:20px;
  padding:8px 12px;
  min-width:250px;
  box-shadow:var(--shadow);
}
.crm-user-menu__mobile-icon{
  display:none;
  width:20px;
  height:20px;
  align-items:center;
  justify-content:center;
  color:var(--brand);
  font-size:1rem;
}
.crm-user-menu__avatar{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(180deg,#eff7f3 0%, #e3efe8 100%);
  color:var(--brand);
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.crm-user-menu__text{display:flex;flex-direction:column;align-items:flex-start;line-height:1.2;flex:1;}
.crm-user-menu__text strong{font-size:.95rem;color:var(--text);font-weight:900;}
.crm-user-menu__text small{font-size:.78rem;color:var(--muted);}
.crm-user-dropdown{
  border:none;
  border-radius:20px;
  box-shadow:0 24px 46px rgba(16,24,40,.14);
  padding:10px;
  min-width:260px;
}
.crm-user-dropdown .dropdown-item,
.crm-user-dropdown .dropdown-item-text{
  border-radius:12px;
  padding:10px 12px;
}
.crm-user-dropdown .dropdown-item{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}
.crm-user-dropdown .dropdown-item i{
  width:18px;
  text-align:center;
  color:#547063;
}
.crm-user-dropdown .dropdown-item:hover{
  background:#f7faf8;
}
.crm-user-dropdown__identity{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.crm-user-dropdown__identity small{
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
}
.crm-user-dropdown__context{
  font-size:.82rem;
}
.crm-user-dropdown__logout{
  color:#b42318;
  background:#fff7f6;
  border:1px solid #f4d0cb;
  font-weight:800;
}
.crm-user-dropdown__logout i{
  color:#b42318 !important;
}
.crm-user-dropdown__logout:hover{
  background:#fdeeed !important;
  color:#912018;
}

.crm-page-title{
  margin:0;
  font-size:29px;
  font-weight:900;
  letter-spacing:-.02em;
  color:var(--text);
}
.crm-page-subtitle{
  margin:6px 0 0;
  color:var(--muted);
  max-width:720px;
  line-height:1.45;
}

.page-header{
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  margin-bottom:14px;
}
.page-header__actions{display:flex;gap:10px;flex-wrap:wrap;}
.page-header > :first-child:not(.page-header__actions){
  display:block;
  min-width:min(520px, 100%);
}
.crm-nav__sub{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:-2px 0 8px 40px;
}
.crm-nav__sublink{
  color:rgba(255,255,255,.8);
  text-decoration:none;
  font-size:.9rem;
  padding:8px 12px;
  border-radius:12px;
}
.crm-nav__sublink:hover,
.crm-nav__sublink.active{
  background:rgba(255,255,255,.10);
  color:#fff;
}

.crm-card,
.crm-table-card,
.crm-soft-card{
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:linear-gradient(180deg,#ffffff 0%, #fafcfd 100%);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.crm-card__body,
.crm-soft-card{padding:20px;}

.crm-table-card__header{
  display:flex;justify-content:space-between;align-items:center;
  padding:20px 22px 16px;border-bottom:1px solid #eef2f6;
}
.crm-table-card__title{font-size:1.08rem;font-weight:900;color:var(--text);letter-spacing:-.01em;}
.crm-table-card__sub{font-size:.9rem;color:var(--muted);margin-top:4px;}
.crm-table-card__stats{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.crm-table-card__stat{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  background:#f7faf8;
  border:1px solid #e1ebe4;
  color:#466253;
  font-size:.82rem;
  font-weight:800;
}
.crm-table-card__toolbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  padding:14px 20px 0;
}
.crm-table-card__toolbar-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.crm-page-size-select{
  min-width:170px;
}

.crm-kpi-grid,
.kpi-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:18px;
}
.crm-kpi-card,
.kpi-card{
  position:relative;
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfe 100%);
  box-shadow:var(--shadow);
  overflow:hidden;
  padding:20px;
}
.kpi-card::after,
.crm-kpi-card::after{
  content:"";position:absolute;right:-18px;top:-18px;width:84px;height:84px;
  background:rgba(27,67,50,.06);border-radius:22px;transform:rotate(12deg);
}
.kpi-head{display:flex;justify-content:space-between;align-items:flex-start;}
.kpi-icon{
  width:50px;height:50px;border-radius:18px;display:grid;place-items:center;
  background:linear-gradient(180deg,#eff7f3 0%, #e5f1ea 100%);
  color:var(--brand);
  font-size:22px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.kpi-label{font-size:.82rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.02em;}
.kpi-value{font-size:1.95rem;font-weight:900;color:var(--text);margin-top:8px;letter-spacing:-.03em;}
.kpi-foot{margin-top:12px;display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:.86rem;font-weight:700;}

.crm-btn{
  min-width:auto;height:43px;padding:0 15px;display:inline-flex;align-items:center;justify-content:center;
  gap:8px;border-radius:14px;border:1px solid #e4e7ec;background:#fff;color:#344054;
  font-weight:800;text-decoration:none;box-shadow:0 4px 12px rgba(16,24,40,.04);transition:all .16s ease;
}
.crm-btn:hover{text-decoration:none;background:#f9fafb;border-color:#d0d5dd;color:#111827;transform:translateY(-1px);}
.crm-btn--primary{
  background:linear-gradient(180deg,#eff7f3 0%, #e4f1ea 100%);
  color:var(--brand);
  border-color:#d4e6db;
  box-shadow:0 8px 18px rgba(27,67,50,.10);
}
.crm-btn--light{background:#fff;color:#344054;border-color:#e4e7ec;}
.crm-btn--danger{background:var(--danger-soft);color:var(--danger);border-color:#fecdd3;}
.crm-btn--success{background:var(--success-soft);color:var(--success);border-color:#bbf7d0;}
.crm-btn--icon{width:42px;min-width:42px;padding:0;}

.crm-table{--bs-table-bg:transparent;--bs-table-striped-bg:transparent;--bs-table-hover-bg:transparent;}
.crm-table thead th{
  font-size:.78rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.02em;
  padding:14px 16px;border-bottom:1px solid #eef2f6;background:transparent;white-space:nowrap;
}
.crm-table tbody td{padding:16px;vertical-align:middle;border-top:1px solid #f2f4f7;}
.crm-table tbody tr{transition:background .16s ease, box-shadow .16s ease;}
.crm-table tbody tr:hover{background:#fafcff;}
.crm-table tbody tr.crm-row-link{
  cursor:pointer;
}
.crm-table tbody tr.crm-row-link td:last-child{
  position:relative;
  padding-right:42px;
}
.crm-table tbody tr.crm-row-link td:last-child::after{
  content:"›";
  position:absolute;
  right:16px;
  top:50%;
  transform:translate(-4px,-50%);
  opacity:0;
  color:var(--brand);
  font-size:20px;
  font-weight:900;
  transition:transform .16s ease, opacity .16s ease;
  pointer-events:none;
}
.crm-table tbody tr.crm-row-link:hover td:last-child::after,
.crm-table tbody tr.crm-row-link:focus-visible td:last-child::after{
  opacity:1;
  transform:translate(0,-50%);
}
.crm-table tbody tr.crm-row-link:focus-visible{
  outline:2px solid rgba(31,111,84,.18);
  outline-offset:-2px;
}

.crm-name-cell__name,
.crm-cell-stack__title{font-weight:800;color:#111827;}
.crm-name-cell__sub,
.crm-cell-stack__meta,
.crm-email-cell,
.subtext{font-size:.88rem;color:var(--muted);}
.crm-show-mobile-inline{
  display:none;
}

.crm-pill,
.crm-status-inline{
  display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;
  font-size:.8rem;font-weight:800;border:1px solid transparent;
}
.crm-pill--ok{background:#eaf8ef;color:#1f8f4d;border-color:#ccefd8;}
.crm-pill--late{background:#fff7ed;color:#d97706;border-color:#fed7aa;}
.crm-pill--bad{background:#fdecec;color:#c0392b;border-color:#fecaca;}
.crm-pill--info{background:#eef4ff;color:#1d4ed8;border-color:#dbe7ff;}

.crm-money{font-weight:800;white-space:nowrap;}
.crm-money--estimated{color:#2563eb;}
.crm-money--established{color:#1f8f4d;}

.crm-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.crm-actions--stack-mobile{
  width:100%;
}
.crm-filter-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px;}
.crm-filter-shell{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(220px,.7fr) auto;
  gap:14px;
  align-items:end;
  margin-bottom:18px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  box-shadow:var(--shadow);
}
.crm-filter-shell__intro{
  grid-column:1 / -1;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-bottom:6px;
}
.crm-filter-shell__eyebrow{
  font-size:.72rem;
  font-weight:900;
  color:#1f6f54;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.crm-filter-shell__title{
  font-size:1.05rem;
  font-weight:900;
  color:var(--text);
  line-height:1.1;
}
.crm-filter-shell__hint{
  font-size:.9rem;
  color:var(--muted);
}
.crm-filter-shell__main,
.crm-filter-shell__side{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.crm-filter-shell__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.crm-filter-shell__actions .crm-btn{
  flex-shrink:0;
}
.crm-filter-shell__label{
  font-size:.78rem;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.crm-search-input{
  position:relative;
}
.crm-search-input > i{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#98a2b3;
  font-size:1rem;
  z-index:1;
}
.crm-search-input .form-control{
  min-height:50px;
  padding-left:42px;
  border-radius:16px;
  background:#fff;
  border-color:#dbe6de;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), 0 10px 30px rgba(24,39,75,.04);
}
.crm-empty-state{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:12px 0;
}
.crm-empty-state__icon{
  width:52px;
  height:52px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:22px;
}
.crm-member-hero{margin-bottom:18px;}
.crm-member-hero__body{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.crm-member-hero__eyebrow{
  font-size:.78rem;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:6px;
}
.crm-member-hero__title{
  font-size:1.5rem;
  font-weight:900;
  color:var(--text);
  line-height:1.1;
}
.crm-member-hero__meta{
  margin-top:6px;
  color:var(--muted);
  font-weight:600;
}

.member-detail-top-grid{
  grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);
  grid-template-areas:
    "profile account"
    "communication communication";
  align-items:start;
  gap:20px;
}
.member-detail-card{
  min-height:100%;
}
.member-detail-card--profile,
.member-detail-card--account{
  min-height:100%;
}
.member-detail-card--profile{grid-area:profile;}
.member-detail-card--account{
  grid-area:account;
}
.member-detail-card--communication{grid-area:communication;}
.member-detail-card .crm-card__body{
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.member-detail-card .section-header{
  margin-bottom:0;
}
.member-detail-card .info-grid{
  align-content:start;
}
.member-detail-card--communication .crm-actions{justify-content:flex-start;}
.member-detail-card--communication .crm-actions{
  gap:10px;
}
.member-detail-card--communication .crm-btn{min-height:44px;}
.member-detail-card--communication .info-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
}
.member-detail-card--account .crm-actions{
  gap:10px;
  flex-wrap:wrap;
}
.member-detail-card--account .crm-btn{
  min-height:44px;
}
.crm-section-anchor{
  display:flex;
  align-items:center;
  gap:12px;
  margin:22px 0 10px;
}
.crm-section-anchor::after{
  content:"";
  flex:1;
  height:1px;
  background:linear-gradient(90deg, rgba(31,111,84,.18), rgba(31,111,84,0));
}
.crm-section-anchor__eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 12px;
  border-radius:999px;
  background:#eef6f1;
  border:1px solid #d7e7de;
  color:#1f6f54;
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.crm-section-anchor__title{
  font-size:1rem;
  font-weight:900;
  color:var(--text);
  line-height:1.1;
}

.section-grid-2{display:grid;grid-template-columns:1.35fr .95fr;gap:18px;margin-bottom:18px;}
.section-grid-3{display:grid;grid-template-columns:1.2fr 1.2fr .8fr;gap:18px;margin-bottom:18px;}
.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.section-header h3{
  margin:0;
  font-size:18px;
  font-weight:900;
  letter-spacing:-.01em;
}
.section-header .sub{
  font-size:.88rem;
  color:var(--muted);
  margin-top:4px;
}

.chart-wrap{height:300px;}
.mini-chart{height:220px;}

.crm-stack-list{display:flex;flex-direction:column;gap:12px;}
.crm-stack-item{
  display:flex;justify-content:space-between;align-items:center;
  border:1px solid var(--line);border-radius:16px;padding:12px 14px;background:#fff;
}

.info-grid,
.crm-details-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
}
.info-item{
  background:#f8fbf8;border:1px solid var(--line);border-radius:16px;padding:12px 14px;
}
.info-item label{display:block;font-size:.78rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.02em;margin-bottom:3px;}
.info-item strong{font-size:.98rem;}
.crm-details-grid .full{grid-column:1 / -1;}

.steps{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.step{padding:8px 12px;border-radius:999px;font-size:.78rem;font-weight:800;}
.step.paid{background:#eaf8ef;color:#1f8f4d;}
.step.unpaid{background:#fdecec;color:#c0392b;}

.qr-box{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:center;margin-top:16px;}
.qr-box img{width:120px;height:120px;border:1px solid var(--line);border-radius:16px;}

.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.filter-buttons{display:flex;gap:8px;flex-wrap:wrap;}
.legend{display:flex;gap:14px;flex-wrap:wrap;}
.legend span{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--muted);font-weight:700;}
.legend-box{width:14px;height:14px;border-radius:4px;display:inline-block;}
#agendaCalendar{margin-top:6px;}

.hall-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
.hall-card img{width:100%;height:180px;object-fit:cover;display:block;}
.hall-meta{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 8px;}
.meta-pill{display:inline-flex;align-items:center;gap:6px;background:#f8fafc;border:1px solid var(--line);padding:6px 10px;border-radius:999px;font-size:.78rem;font-weight:700;color:#475467;}

.crm-login-logo{
  width:60px;height:60px;border-radius:18px;background:rgba(27,67,50,.08);
  display:grid;place-items:center;font-weight:800;font-size:20px;margin:0 auto;
}
.crm-portal-message{
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfd 100%);
  padding:22px;
  line-height:1.75;
}
.crm-portal-message p:last-child{
  margin-bottom:0;
}
.crm-member-picker{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:360px;
  overflow:auto;
  padding-right:4px;
}
.crm-member-picker__item{
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px 14px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfd 100%);
  cursor:pointer;
}
.crm-member-picker__input{
  width:18px;
  height:18px;
  flex:0 0 auto;
}
.crm-member-picker__copy{
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.crm-member-picker__name{
  font-weight:800;
  color:var(--text);
}
.crm-member-picker__meta{
  font-size:.84rem;
  color:var(--muted);
}

.crm-toggle-card{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg,#fcfefd 0%, #f6faf7 100%);
}
.crm-toggle-form{
  grid-column:1 / -1;
  margin:0;
}
.crm-toggle-card--action{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.crm-toggle-card--action:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(16,24,40,.08);
}
.crm-toggle-card--action:focus-visible{
  outline:3px solid rgba(59,130,246,.2);
  outline-offset:2px;
}
.crm-toggle-card.is-off{
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
}
.crm-toggle-card__copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.crm-toggle-card__copy label{
  display:block;
  font-size:.78rem;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.crm-toggle-card__copy strong{
  font-size:1rem;
}
.crm-toggle-card__copy span{
  color:var(--muted);
  font-size:.9rem;
}
.crm-toggle-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  min-width:110px;
  justify-content:center;
}
.crm-toggle-badge__track{
  width:52px;
  height:30px;
  border-radius:999px;
  background:#d0d5dd;
  position:relative;
  transition:all .2s ease;
}
.crm-toggle-badge__thumb{
  position:absolute;
  top:3px;
  left:3px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,24,40,.14);
  transition:all .2s ease;
}
.crm-toggle-badge__label{
  font-size:.85rem;
  font-weight:800;
}
.crm-toggle-badge.is-on{
  border-color:#bbf7d0;
  background:#f3fff7;
  color:#15803d;
}
.crm-toggle-badge.is-on .crm-toggle-badge__track{
  background:#22c55e;
}
.crm-toggle-badge.is-on .crm-toggle-badge__thumb{
  left:25px;
}
.crm-toggle-badge.is-off{
  color:#475467;
}
.crm-contribution-timeline-shell{
  overflow:auto;
  padding-right:6px;
}
.crm-contribution-card{
  max-height:680px;
  overflow:hidden;
}
.crm-contribution-card .crm-card__body{
  max-height:680px;
  overflow-y:auto;
}
.crm-contribution-legend{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin:12px 0 2px;
}
.crm-contribution-legend__item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.82rem;
  font-weight:700;
  color:var(--muted);
}
.crm-contribution-legend__swatch{
  width:14px;
  height:14px;
  border-radius:5px;
  border:1px solid var(--line);
  display:inline-block;
}
.crm-contribution-legend__swatch.is-paid{
  background:#eaf8ef;
  border-color:#ccefd8;
}
.crm-contribution-legend__swatch.is-unpaid{
  background:#fff4f4;
  border-color:#fecaca;
}
.crm-contribution-legend__swatch.is-future{
  background:#f8fafc;
  border-color:#e2e8f0;
}
.crm-contribution-legend__swatch.is-current{
  background:#eef4ff;
  border-color:#cfe0ff;
}
.crm-contribution-timeline{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:18px;
  min-width:760px;
}
.crm-sort-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:inherit;
  text-decoration:none;
  font-weight:800;
}
.crm-sort-link:hover{
  color:var(--brand-700);
}
.crm-sort-link i{
  color:#98a2b3;
}
.crm-id-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid var(--line);
  font-weight:700;
  color:#344054;
}
.crm-table-card__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 24px 22px;
  border-top:1px solid var(--line);
  flex-wrap:wrap;
}
.crm-pagination{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.crm-pagination .crm-btn{
  min-width:112px;
}
.crm-pagination__page{
  width:40px;
  height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:#fff;
  color:#344054;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 4px 12px rgba(15,23,42,.04);
}
.crm-pagination__page:hover{
  border-color:#bfd3c7;
  background:#f7fbf8;
}
.crm-pagination__page.is-active{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}
.crm-contribution-year{
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfe 100%);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.crm-contribution-year.is-current{
  border-color:#cfe0ff;
}
.crm-contribution-year.is-complete{
  background:linear-gradient(180deg,#f8fff9 0%, #fbfefc 100%);
}
.crm-contribution-year.is-future{
  background:linear-gradient(180deg,#fcfdff 0%, #f7f9fc 100%);
}
.crm-contribution-year__summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
}
.crm-contribution-year__summary::-webkit-details-marker{
  display:none;
}
.crm-contribution-year__headline{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.crm-contribution-year__year{
  font-size:1.05rem;
  font-weight:900;
  color:var(--text);
}
.crm-contribution-year__meta{
  color:var(--muted);
  font-size:.88rem;
  font-weight:700;
}
.crm-contribution-year__progress{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:min(360px,100%);
  justify-content:flex-end;
}
.crm-contribution-year__bar{
  width:180px;
  height:10px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}
.crm-contribution-year__bar-fill{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#16a34a 0%, #22c55e 100%);
}
.crm-contribution-year__state{
  min-width:90px;
  text-align:right;
  font-size:.82rem;
  font-weight:800;
  color:var(--muted);
}
.crm-contribution-year__items-wrap{
  border-top:1px solid #eef2f6;
  padding:0 20px 18px;
}
.crm-contribution-year__items{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-top:16px;
  scrollbar-width:thin;
}
.crm-contribution-meter__item{
  min-width:86px;
  min-height:68px;
  border-radius:18px;
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:10px 8px;
  background:#fff;
  color:#111827;
  text-align:center;
}
.crm-contribution-meter__label{font-size:.88rem;font-weight:900;line-height:1.1;}
.crm-contribution-meter__amount{font-size:.72rem;font-weight:800;line-height:1.1;margin-top:4px;}
.crm-contribution-meter__date{font-size:.66rem;color:var(--muted);line-height:1.1;margin-top:3px;}
.crm-contribution-meter__item.is-paid{
  background:#eaf8ef;
  border-color:#ccefd8;
}
.crm-contribution-meter__item.is-unpaid{
  background:#fff4f4;
  border-color:#fecaca;
}
.crm-contribution-meter__item.is-future{
  background:#f8fafc;
  border-color:#e2e8f0;
}
.crm-contribution-meter__item.is-current{
  box-shadow:0 0 0 2px rgba(37,99,235,.12);
}
.crm-dialog{
  width:min(760px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  border:none;
  border-radius:26px;
  padding:0;
  background:linear-gradient(180deg,#ffffff 0%, #fafcfd 100%);
  box-shadow:0 34px 90px rgba(16,24,40,.24);
  overflow:hidden;
}
.crm-dialog--wide{
  width:min(1200px, calc(100vw - 32px));
}
.crm-dialog::backdrop{
  background:rgba(15,23,42,.52);
  backdrop-filter:blur(6px);
}
.crm-dialog__close-row{
  display:flex;
  justify-content:flex-end;
  padding:16px 16px 0;
  margin:0;
}
.crm-dialog__body{
  padding:0 26px 26px;
  overflow:auto;
  max-height:calc(100vh - 92px);
}
.crm-email-compose-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1.05fr);
  gap:20px;
  align-items:start;
}
.crm-email-preview-toggle{
  display:none;
}
.crm-email-compose-editor-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.crm-email-compose-fields,
.crm-email-preview-shell{
  border:1px solid var(--line);
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfd 100%);
  padding:20px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.crm-email-compose-editor{
  min-height:420px;
  max-height:520px;
  overflow:auto;
  border:1px solid #dbe4ea;
  border-radius:20px;
  padding:16px 18px;
  background:#fff;
  color:var(--text);
  line-height:1.6;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.crm-email-compose-editor:focus{
  outline:none;
  border-color:#9bcbb5;
  box-shadow:0 0 0 4px rgba(31,111,84,.10), inset 0 1px 0 rgba(255,255,255,.7);
}
.crm-email-compose-editor:empty::before{
  content:"Start met typen of gebruik de knoppen hierboven.";
  color:#8a97a6;
}
.crm-email-compose-editor p:last-child{
  margin-bottom:0;
}
.crm-email-compose-textarea{
  min-height:420px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.84rem;
}
.crm-editor-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 12px;
}
.crm-editor-toolbar__btn{
  border:1px solid var(--line);
  background:linear-gradient(180deg,#ffffff 0%, #f8fbf9 100%);
  border-radius:999px;
  padding:8px 12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.8rem;
  font-weight:800;
  color:#334155;
  transition:all .18s ease;
}
.crm-editor-toolbar__btn:hover{
  border-color:#bfd3c7;
  background:#f7fbf8;
  color:var(--brand-700);
}
.crm-email-preview-shell__head{
  font-size:.82rem;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:12px;
}
.crm-email-preview-frame{
  width:100%;
  min-height:520px;
  border:1px solid #dbe4ea;
  border-radius:20px;
  background:#f4f7f9;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.table-responsive{
  position:relative;
}
.table-responsive::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:28px;
  height:100%;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(248,251,252,0), rgba(248,251,252,.92));
  opacity:0;
  transition:opacity .16s ease;
}
.table-responsive:hover::after{
  opacity:1;
}
.crm-email-history{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.crm-email-log{
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfd 100%);
  overflow:hidden;
}
.crm-email-log.is-success{
  border-color:#ccefd8;
}
.crm-email-log.is-failed{
  border-color:#f4c7c3;
}
.crm-email-log__summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
}
.crm-email-log__summary::-webkit-details-marker{
  display:none;
}
.crm-email-log__headline{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.crm-email-log__title{
  font-weight:900;
  color:var(--text);
}
.crm-email-log__meta{
  color:var(--muted);
  font-size:.84rem;
}
.crm-email-log__body{
  padding:0 20px 20px;
  border-top:1px solid #edf1f4;
}
.crm-email-log__field{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-top:16px;
}
.crm-email-log__field label{
  font-size:.78rem;
  font-weight:800;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.crm-email-log__preview{
  width:100%;
  min-height:420px;
  border:1px solid #dbe4ea;
  border-radius:18px;
  background:#f4f7f9;
}
@media (max-width: 991px){
  .crm-email-compose-grid{
    grid-template-columns:1fr;
  }
  .crm-email-compose-grid .crm-email-preview-shell{
    display:none;
  }
  .crm-email-compose-grid.is-preview-open .crm-email-preview-shell{
    display:block;
  }
  .crm-email-preview-toggle{
    display:inline-flex;
    align-items:center;
    gap:8px;
  }
  .crm-email-preview-frame{
    min-height:360px;
  }
}
.crm-form-switch-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.crm-form-switch{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfe 100%);
  padding:18px 20px;
  cursor:pointer;
  transition:all .18s ease;
}
.crm-form-switch:hover{
  border-color:#cfd8e3;
}
.crm-form-switch.is-on{
  background:linear-gradient(180deg,#f6fff8 0%, #fbfffc 100%);
  border-color:#ccefd8;
}
.crm-form-switch__input{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
}
.crm-form-switch__copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.crm-form-switch__title{
  font-size:1rem;
  font-weight:900;
  color:var(--text);
}
.crm-form-switch__sub{
  font-size:.9rem;
  color:var(--muted);
}
.crm-form-switch__ui{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}
.crm-form-switch__track{
  width:54px;
  height:32px;
  border-radius:999px;
  background:#d0d5dd;
  position:relative;
  transition:all .2s ease;
}
.crm-form-switch__track::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,24,40,.14);
  transition:all .2s ease;
}
.crm-form-switch__state{
  min-width:28px;
  font-size:.86rem;
  font-weight:800;
  color:var(--muted);
}
.crm-form-switch.is-on .crm-form-switch__track{
  background:#22c55e;
}
.crm-form-switch.is-on .crm-form-switch__track::after{
  left:25px;
}
.crm-form-switch.is-on .crm-form-switch__state{
  color:#15803d;
}

.form-control,.form-select{
  border-radius:16px;
  border-color:#d9e0e8;
  box-shadow:0 1px 2px rgba(16,24,40,.03);
  padding:11px 13px;
  min-height:48px;
  background:linear-gradient(180deg,#ffffff 0%, #fcfdff 100%);
}
textarea.form-control{
  min-height:120px;
}
.form-control:focus,.form-select:focus{
  border-color:#bfd3c7;
  box-shadow:0 0 0 4px rgba(31,111,84,.08);
}
.form-label,.sub-label{font-size:.82rem;font-weight:700;color:var(--muted);margin-bottom:6px;display:block;}
.alert{
  border:none;
  border-radius:20px;
  box-shadow:0 12px 28px rgba(16,24,40,.06);
  padding:14px 16px;
}

@media (max-width:1200px){
  .crm-kpi-grid,.section-grid-3,.hall-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .section-grid-2{grid-template-columns:1fr;}
  .crm-filter-shell{grid-template-columns:1fr 1fr;}
  .crm-filter-shell__actions{grid-column:1 / -1;justify-content:flex-start;}
  .crm-table-card__header{align-items:flex-start;flex-direction:column;}
  .crm-table-card__stats{justify-content:flex-start;}
  .crm-table-card__toolbar{
    justify-content:flex-start;
    padding:14px 16px 0;
  }
}
@media (max-width:900px){
  .crm-auth-shell{grid-template-columns:1fr;}
  .crm-auth-shell{
    grid-template-rows:auto 1fr;
    min-height:100dvh;
  }
  .crm-auth-visual{
    min-height:132px;
    max-height:148px;
    border-bottom-left-radius:22px;
    border-bottom-right-radius:22px;
  }
  .crm-auth-visual__overlay{
    left:20px;
    right:20px;
    bottom:18px;
    max-width:none;
    text-align:center;
  }
  .crm-auth-visual__eyebrow{
    font-size:.72rem;
    margin-bottom:8px;
  }
  .crm-auth-visual__overlay h1{
    font-size:22px;
    margin-bottom:8px;
    max-width:320px;
    margin-left:auto;
    margin-right:auto;
  }
  .crm-auth-visual__overlay p{
    font-size:.88rem;
    max-width:320px;
    margin-left:auto;
    margin-right:auto;
  }
  .crm-auth-visual__overlay p{
    display:none;
  }
  .crm-auth-form-wrap{padding:22px 16px 88px;}
  .crm-auth-form{padding:28px 22px;border-radius:24px;}
  .crm-auth-form__header{
    text-align:center;
  }
  .crm-auth-form__brand-image{
    width:85px;
    margin-inline:auto;
  }
  .crm-auth-footer{
    left:16px;
    right:16px;
    bottom:16px;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    text-align:center;
    flex-direction:column;
    align-items:center;
  }
  .crm-shell{display:block;position:relative;}
  .crm-mobile-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.4);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:1090;
    border:none;
    padding:0;
  }
  body.crm-sidebar-open .crm-mobile-backdrop{
    opacity:1;
    pointer-events:auto;
  }
  .crm-sidebar{
    width:min(84vw,320px);
    height:100vh;
    position:fixed;
    left:0;
    top:0;
    transform:translateX(-100%);
    transition:transform .22s ease;
    z-index:1100;
    overflow-y:auto;
  }
  .crm-sidebar__mobile-top{
    display:flex;
    justify-content:flex-end;
    padding:4px 4px 8px;
  }
  body.crm-sidebar-open .crm-sidebar{
    transform:translateX(0);
  }
  .crm-main{padding:14px 14px 24px;}
  .crm-mobile-nav-toggle{
    display:inline-flex;
    margin-bottom:0;
    flex:0 0 46px;
  }
  .page-header{
    align-items:flex-start;
  }
  .page-header > :first-child:not(.page-header__actions){
    min-width:0;
  }
  .page-header__actions{
    width:100%;
  }
  .page-header__actions .crm-btn{
    flex:1 1 calc(50% - 8px);
  }
  .crm-topbar{
    position:relative;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:56px;
  }
  .crm-topbar__heading{
    display:flex;
    flex-direction:row;
    align-items:center;
    flex:0 0 auto;
  }
  .crm-topbar__brand-mobile{
    display:inline-flex;
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%, -50%);
    width:46px;
    height:46px;
    border-radius:16px;
    align-items:center;
    justify-content:center;
    background:#fff;
    border:1px solid #d9e8df;
    box-shadow:var(--shadow);
    flex:0 0 46px;
  }
  .crm-topbar__eyebrow,
  .crm-topbar__title{
    display:none;
  }
  .crm-topbar__meta{
    justify-content:flex-end;
    align-items:center;
    flex-wrap:nowrap;
    gap:10px;
    flex:0 0 auto;
  }
  .crm-topbar__meta > .dropdown{
    width:auto;
    max-width:120px;
  }
  .crm-version-chip{order:2;}
  .crm-user-menu{
    min-width:0;
    width:auto;
    max-width:120px;
    height:46px;
    border-radius:16px;
    padding:0 10px 0 9px;
    justify-content:flex-start;
    gap:8px;
    order:1;
  }
  .crm-user-menu__mobile-icon{
    display:inline-flex;
  }
  .crm-user-menu__avatar{
    display:none;
  }
  .crm-user-menu__text{
    display:flex;
    min-width:0;
    flex:1;
  }
  .crm-user-menu__text strong,
  .crm-user-menu__text small{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .crm-user-menu__text strong{
    font-size:.76rem;
  }
  .crm-user-menu__text small{
    font-size:.64rem;
  }
  .crm-user-menu > .bi-chevron-down{
    display:inline-flex;
    flex:0 0 auto;
    font-size:.74rem;
  }
  .crm-user-dropdown{
    width:min(100vw - 28px, 360px);
  }
  .crm-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .hall-grid,.section-grid-3{grid-template-columns:1fr;}
  .crm-kpi-grid{
    gap:12px;
    margin-bottom:14px;
  }
  .crm-kpi-card,
  .kpi-card{
    padding:14px 15px;
    border-radius:18px;
  }
  .kpi-card::after,
  .crm-kpi-card::after{
    width:64px;
    height:64px;
    right:-12px;
    top:-12px;
  }
  .kpi-icon{
    width:42px;
    height:42px;
    border-radius:14px;
    font-size:18px;
  }
  .kpi-label{
    font-size:.72rem;
  }
  .kpi-value{
    font-size:1.5rem;
    margin-top:6px;
  }
  .kpi-foot{
    margin-top:8px;
    font-size:.78rem;
    gap:8px;
  }
  .crm-card__body,
  .crm-soft-card{
    padding:16px;
  }
  .crm-table-card__header{
    padding:16px 16px 14px;
  }
  .crm-table-card__toolbar-form{
    width:100%;
    align-items:flex-start;
    flex-direction:column;
  }
  .crm-page-size-select{
    width:100%;
    min-width:0;
  }
  .section-header{
    align-items:flex-start;
    flex-direction:column;
  }
  .member-detail-top-grid{
    grid-template-columns:1fr;
    grid-template-areas:
      "profile"
      "account"
      "communication";
  }
  .info-grid,.crm-details-grid{grid-template-columns:1fr;}
  .qr-box{grid-template-columns:1fr;}
  .crm-filter-shell{grid-template-columns:1fr;}
  .crm-filter-shell__actions{
    width:100%;
  }
  .crm-filter-shell__actions .crm-btn{
    flex:1 1 100%;
    width:100%;
  }
  .crm-contribution-timeline{min-width:0;}
  .crm-member-hero__body{align-items:flex-start;}
  .crm-member-hero__title{font-size:1.3rem;}
  .crm-member-hero__meta{font-size:.92rem;}
  .crm-actions{
    width:100%;
    justify-content:flex-start;
  }
  .crm-actions--stack-mobile .crm-btn{
    width:100%;
    flex:1 1 100%;
  }
  .crm-stack-item{
    flex-direction:column;
    align-items:flex-start;
  }
  .calendar-toolbar{
    align-items:flex-start;
  }
  .legend{
    gap:10px;
  }
  .legend span{
    font-size:.82rem;
  }
  .hall-card img{
    height:160px;
  }
  .crm-toggle-card{
    flex-direction:column;
    align-items:flex-start;
    padding:16px;
  }
  .crm-toggle-badge{
    width:100%;
    justify-content:space-between;
  }
  .crm-contribution-card{
    max-height:none;
  }
  .crm-contribution-card .crm-card__body{
    max-height:none;
    overflow:visible;
  }
  .crm-contribution-legend{
    gap:10px;
  }
  .crm-contribution-legend__item{
    font-size:.76rem;
  }
  .crm-contribution-timeline-shell{
    margin-inline:-4px;
    padding-inline:4px;
    padding-right:0;
  }
  .crm-contribution-timeline{
    gap:10px;
    margin-top:14px;
    min-width:620px;
  }
  .crm-contribution-year{
    border-radius:18px;
  }
  .crm-contribution-year__summary{
    padding:14px 14px 12px;
    gap:12px;
  }
  .crm-contribution-year__headline{
    gap:8px;
  }
  .crm-contribution-year__year{
    font-size:.98rem;
  }
  .crm-contribution-year__meta,
  .crm-contribution-year__state{
    font-size:.78rem;
  }
  .crm-contribution-year__items-wrap{
    padding:0 14px 14px;
  }
  .crm-contribution-year__items{
    gap:8px;
    padding-top:12px;
  }
  .crm-contribution-meter__item{
    min-width:74px;
    min-height:60px;
    padding:8px 6px;
    border-radius:15px;
  }
  .crm-contribution-meter__label{
    font-size:.8rem;
  }
  .crm-contribution-meter__amount{
    font-size:.66rem;
  }
  .crm-contribution-meter__date{
    font-size:.62rem;
  }
  .crm-dialog{
    width:calc(100vw - 18px);
    max-height:calc(100vh - 18px);
    margin:auto;
    border-radius:22px;
  }
  .crm-dialog__close-row{
    padding:12px 12px 0;
  }
  .crm-dialog__body{
    padding:0 14px 16px;
    max-height:calc(100vh - 72px);
  }
  .crm-email-compose-fields,
  .crm-email-preview-shell{
    padding:14px;
    border-radius:18px;
  }
  .crm-email-compose-editor{
    min-height:250px;
    max-height:320px;
    padding:14px;
    border-radius:16px;
    font-size:.94rem;
  }
  .crm-email-compose-textarea{
    min-height:280px;
    font-size:.8rem;
  }
  .crm-editor-toolbar{
    gap:8px;
  }
  .crm-editor-toolbar__btn{
    padding:8px 10px;
    font-size:.74rem;
  }
  .crm-editor-toolbar__btn span{
    display:none;
  }
  .crm-email-preview-shell__head{
    margin-bottom:10px;
  }
  .crm-email-preview-frame{
    min-height:280px;
  }
  .crm-email-log{
    border-radius:18px;
  }
  .crm-email-log__summary{
    padding:14px;
    align-items:flex-start;
    flex-direction:column;
  }
  .crm-email-log__body{
    padding:0 14px 14px;
  }
  .crm-email-log__preview{
    min-height:280px;
  }
  .table-responsive{
    margin-inline:-2px;
  }
  .table-responsive::after{
    opacity:1;
  }
  .crm-table tbody td,
  .crm-table thead th{
    white-space:nowrap;
  }
  .crm-hide-mobile-col{
    display:none;
  }
  .crm-show-mobile-inline{
    display:block;
    margin-top:4px;
  }
  .crm-form-switch{flex-direction:column;align-items:flex-start;}
  .crm-form-switch__ui{width:100%;justify-content:space-between;}
  .crm-contribution-year__summary{flex-direction:column;align-items:flex-start;}
  .crm-contribution-year__progress{min-width:100%;justify-content:space-between;}
  .crm-contribution-year__bar{width:100%;}
  .crm-table-card__footer{
    align-items:stretch;
    flex-direction:column;
    padding:14px 16px 16px;
  }
  .crm-pagination{
    width:100%;
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
  }
  .crm-pagination > *{
    flex:0 0 auto;
  }
  .crm-table tbody td{
    padding:14px 12px;
  }
  .crm-table thead th{
    padding:12px;
  }
}



/*Finance lines for events*/

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finance-line-row {
  border: 1px solid #e7ecf3;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  margin-bottom: 12px;
}

.finance-line-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.finance-line-actions {
  min-width: 140px;
}

.sticky-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 991px) {
  .form-grid,
  .finance-line-grid {
    grid-template-columns: 1fr;
  }

  .finance-line-actions {
    min-width: unset;
  }
}
