:root {
  --bg: #f6f5f1; --card: #fff; --ink: #1d2522; --muted: #6b746f; --line: #e5e3dc;
  --brand: #0f5e4b; --brand-2: #e9f3ef; --accent: #f6c453; --pos: #157347; --neg: #b3261e; --wa: #1f9d55;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  font-family: Inter, "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; }
h2 { font-size: 1.2rem; margin: .4rem 0 1rem; }
h3 { font-size: 1rem; margin: 0 0 .75rem; }
code { background: var(--brand-2); padding: 1px 4px; border-radius: 4px; font-size: .85em; }
.boot { padding: 4rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: .82rem; } .center { text-align: center; } .mt { margin-top: 1.25rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }

/* buttons & form */
.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: .5rem .85rem; border-radius: 9px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #c9c6bc; } .btn:disabled { opacity: .6; cursor: wait; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: #0b4a3b; }
.btn.ghost { background: transparent; } .btn.danger { color: var(--neg); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; } .btn.wa.done { background: #e7f6ee; color: var(--wa); }
.btn.sm { padding: .3rem .55rem; font-size: .85rem; } .btn.block { width: 100%; justify-content: center; padding: .7rem; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .7rem; } .field > span { font-size: .82rem; color: var(--muted); font-weight: 500; }
.field[hidden] { display: none !important; }
.field.full, .full { grid-column: 1 / -1; }
input, select, textarea { font: inherit; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); border-color: var(--brand); }
label.inline { display: inline-flex; align-items: center; gap: .4rem; } label.inline input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; } .grid2.gap { gap: 1rem; } .grid2.gap > .card { margin-bottom: 0; } .grid2.gap { margin-bottom: 1rem; }
.narrow { max-width: 760px; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; } .toolbar input[type=search] { flex: 1; min-width: 200px; } .toolbar select { width: auto; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; }

/* layout */
.banner { background: #fff7e0; border-bottom: 1px solid #f1e2ad; padding: .45rem 1rem; font-size: .85rem; text-align: center; }
.banner.inline { border: 1px solid #f1e2ad; border-radius: 8px; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.2rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: .4rem; } .brand.big { font-size: 1.4rem; margin-bottom: .3rem; }
.logo { color: var(--accent); } .org { flex: 1; font-weight: 600; } .org select { width: auto; max-width: 320px; }
.top-actions { display: flex; gap: .3rem; }
.shell { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 56px); }
.sidenav { padding: 1rem .6rem; border-right: 1px solid var(--line); background: #fbfaf7; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; gap: .6rem; padding: .55rem .7rem; border-radius: 8px; color: var(--ink); font-weight: 500; }
.sidenav a:hover { background: var(--brand-2); text-decoration: none; } .sidenav a.active { background: var(--brand); color: #fff; }
.content { padding: 1.3rem 1.5rem 4rem; max-width: 1200px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.1rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; } .page-actions select { width: auto; }
#app.loading .content { opacity: .55; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; } .kpis.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis .card { margin: 0; } .kpi-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.kpi-val { font-size: 1.45rem; font-weight: 700; margin: .15rem 0; font-variant-numeric: tabular-nums; } .kpi-sub { color: var(--muted); font-size: .8rem; }
.progress .bar { height: 10px; background: var(--brand-2); border-radius: 99px; margin-top: .6rem; overflow: hidden; } .progress .bar span { display: block; height: 100%; background: var(--brand); }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: .5rem .55rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: .55rem; border-bottom: 1px solid #f0eee8; vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; } .tbl .actions { text-align: right; white-space: nowrap; }
.tbl tr.total td { font-weight: 700; border-top: 2px solid var(--line); } .tbl.summary { max-width: 460px; margin-top: 1rem; }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .75rem; font-weight: 600; background: #eee; color: #444; text-transform: capitalize; }
.pill.paid, .pill.active { background: #e3f4ea; color: var(--pos); } .pill.pending { background: #fde8e6; color: var(--neg); }
.pill.partial { background: #fff1d1; color: #8a5a00; } .pill.cat { background: #e8eefb; color: #2b4a8a; text-transform: none; } .pill.left, .pill.deceased, .pill.inactive { background: #eceae4; color: #666; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: .35rem .8rem; margin: 0 0 1rem; } .dl dt { color: var(--muted); font-size: .85rem; } .dl dd { margin: 0; }

/* chart */
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; height: 160px; align-items: end; padding-top: .5rem; }
.chart .col { display: flex; flex-direction: column; align-items: center; height: 100%; } .chart small { color: var(--muted); margin-top: .25rem; }
.chart .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart .bars span { width: 40%; border-radius: 4px 4px 0 0; min-height: 1px; } .chart .due, .sw.due { background: #d6e7e0; } .chart .got, .sw.got { background: var(--brand); }
.legend { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; color: var(--muted); } .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* receipt */
.receipt { max-width: 640px; padding: 1.6rem 1.8rem; border-top: 6px solid var(--brand); }
.r-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.r-org { font-size: 1.2rem; font-weight: 700; color: var(--brand); } .r-no { text-align: right; } .r-line { font-size: 1.02rem; } .r-amt { font-size: 1.3rem; }
.r-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 2.5rem; } .sign { border-top: 1px solid var(--ink); padding-top: .3rem; min-width: 140px; text-align: center; font-size: .85rem; }
.qr svg { width: 180px; height: 180px; margin-top: .8rem; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #e3efe9, transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 1.8rem; } .auth-card.wide { max-width: 620px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .9rem; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(20,25,23,.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; margin: 0; padding: 0; }
.modal.alert { max-width: 460px; } .modal-body p { margin: 0 0 .8rem; }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; }
.modal-head { border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; } .modal-body { padding: 1rem 1.1rem 0; }
.modal-foot { justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: #1d2522; color: #fff; padding: .65rem 1rem; border-radius: 10px; z-index: 99; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--neg); }
.print-only { display: none; }
.notice p { margin: .5rem 0; }

/* mobile */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidenav { position: fixed; bottom: 0; left: 0; right: 0; flex-direction: row; overflow-x: auto; padding: .35rem; border-right: 0; border-top: 1px solid var(--line); z-index: 6; background: #fff; }
  .sidenav a { flex-direction: column; gap: 0; font-size: .7rem; padding: .35rem .55rem; min-width: 64px; align-items: center; text-align: center; }
  .sidenav a span { font-size: 1.1rem; }
  .content { padding: 1rem .9rem 6rem; }
  .kpis { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: .4rem; padding: .55rem .8rem; } .org { order: 3; flex-basis: 100%; font-size: .9rem; }
  .kpi-val { font-size: 1.15rem; } .dl { grid-template-columns: 110px 1fr; }
}

/* print: only the receipt / report */
@media print {
  .topbar, .sidenav, .page-head, .banner, .toast { display: none !important; }
  .shell { display: block; } .content { padding: 0; } body, :root { background: #fff; }
  .card { box-shadow: none; border: 0; } .receipt { border: 1px solid #999; border-top: 6px solid #000; margin: 0 auto; }
  .print-only { display: block; }
}

/* registration form builder & public join page */
.linkbox { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--brand-2); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0 1rem; }
.linkbox code { background: #fff; padding: .3rem .5rem; border-radius: 6px; word-break: break-all; flex: 1; min-width: 200px; }
.switch { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; cursor: pointer; }
.switch input, .tbl.fb input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.tbl.fb input.fb-label { padding: .35rem .5rem; } .tbl.fb tr.sec td { background: #f6f5f1; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tbl .center, th.center { text-align: center; }
h4.sub { margin: .8rem 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.join { min-height: 100vh; padding: 1.5rem 1rem 3rem; background: radial-gradient(circle at 20% 0%, #e3efe9, transparent 45%), var(--bg); }
.join-card { max-width: 760px; margin: 0 auto; padding: 1.6rem; }
.join-head { border-bottom: 1px solid var(--line); margin-bottom: 1rem; padding-bottom: .6rem; } .join-head .brand { font-size: 1.25rem; }
.join fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem .3rem; margin: 0 0 1rem; }
.join legend { font-weight: 700; color: var(--brand); padding: 0 .4rem; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--neg); background: #fff6f5; }
.field.invalid > span { color: var(--neg); }
.consent span { display: flex; gap: .5rem; align-items: flex-start; color: var(--ink) !important; font-weight: 400 !important; font-size: .9rem !important; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.big-tick { width: 64px; height: 64px; border-radius: 50%; background: #e3f4ea; color: var(--pos); font-size: 2rem; display: grid; place-items: center; margin: 0 auto 1rem; }
.pending-card { border-color: #f1e2ad; background: #fffcf0; }
.notice-bar { display: block; background: #fffcf0; border-color: #f1e2ad; color: var(--ink); }
.pill.pending-member, .pill.pending { background: #fde8e6; color: var(--neg); }

/* settings dashboard */
.set-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: 1rem; scrollbar-width: thin; }
.set-tabs a { white-space: nowrap; padding: .45rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 500; font-size: .88rem; }
.set-tabs a:hover { border-color: var(--brand); text-decoration: none; } .set-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.set-hero-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; } .set-hero h3 { margin: 0 0 .2rem; } .set-hero p { margin: 0; }
.ring { --p: 0; width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--brand-2) 0); }
.ring span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--brand); }
.checklist { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.checklist a { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.checklist a:hover { border-color: var(--brand); text-decoration: none; background: #fbfdfc; }
.checklist a > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cfd8d3; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.checklist li.ok .tick { background: var(--pos); border-color: var(--pos); color: #fff; } .checklist li.ok b { color: var(--muted); }
.checklist .go { font-size: .82rem; color: var(--brand); font-weight: 600; }
.set-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.set-tile { margin: 0; display: flex; flex-direction: column; gap: .15rem; color: var(--ink); transition: border-color .15s, transform .15s; }
.set-tile:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
.set-tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.set-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-2); display: grid; place-items: center; font-size: 1.25rem; }
.set-tile-title { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.set-tile-val { font-size: 1.15rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .set-tile-val small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.set-open { margin-top: auto; padding-top: .6rem; font-size: .85rem; color: var(--brand); font-weight: 600; }
.r-preview { border: 1px dashed var(--line); border-top: 4px solid var(--brand); border-radius: 8px; padding: .8rem 1rem; max-width: 460px; }
.hint-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; margin-top: .4rem; }
.hint { background: var(--brand-2); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.cat-card { border: 1px solid var(--line); border-radius: 10px; padding: .75rem .85rem; } .cat-amt { font-size: 1.1rem; font-weight: 700; margin: .35rem 0 .2rem; } .cat-amt small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0 1rem; }
.role-grid > div { background: #fbfaf7; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .15rem; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; margin-right: .35rem; }
@media (max-width: 860px) { .checklist, .role-grid { grid-template-columns: 1fr; } .set-hero-head { align-items: flex-start; } .ring { width: 60px; height: 60px; } .ring span { width: 46px; height: 46px; font-size: .85rem; } }
.content { min-width: 0; } .set-tabs { max-width: 100%; }
/* billing cycle picker */
.cycle-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.cycle-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem .7rem; cursor: pointer; display: flex; gap: .5rem; align-items: flex-start; }
.cycle-opt input { width: auto; margin-top: 3px; accent-color: var(--brand); } .cycle-opt span { display: flex; flex-direction: column; } .cycle-opt small { color: var(--muted); font-size: .78rem; }
.cycle-opt.on { border-color: var(--brand); background: var(--brand-2); }
.cat-card.dim { opacity: .72; }
.fine-box { border: 1px dashed var(--line); border-radius: 12px; padding: .75rem .85rem; background: #f7faf8; }
.fine-box .switch { margin-bottom: .55rem; }
.fine-fields { margin-top: .15rem; }
.pill.cycle-monthly { background: #e8eefb; color: #2b4a8a; } .pill.cycle-yearly { background: #fff1d1; color: #8a5a00; } .pill.cycle-one_time { background: #efe6fb; color: #5b2b8a; }
.cat-card .pill { margin-top: .35rem; text-transform: none; }
@media (max-width: 860px) { .cycle-pick { grid-template-columns: 1fr; } }
/* photos, logo, committee */
.ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--brand-2); }
.ph.sm { width: 32px; height: 32px; } .ph.lg { width: 64px; height: 64px; }
.ph-empty { display: inline-grid; place-items: center; color: var(--brand); font-weight: 700; font-size: .85rem; } .ph-empty.lg { font-size: 1.2rem; }
.who { display: flex; align-items: center; gap: .6rem; }
.profile-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; } .profile-head h3 { margin: 0; }
.org-name { display: inline-flex; align-items: center; gap: .5rem; } .org-logo { height: 30px; max-width: 90px; object-fit: contain; }
.set-ico img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.r-head-l { display: flex; gap: .8rem; align-items: center; } .r-logo { height: 56px; max-width: 110px; object-fit: contain; }
.r-preview { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.join-logo { height: 44px; max-width: 120px; object-fit: contain; }
.photo-pick { display: flex; gap: .9rem; align-items: center; margin-bottom: .8rem; }
.pp-prev { width: 76px; height: 76px; border-radius: 50%; background: var(--brand-2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; border: 1px dashed #c9d8d1; }
.pp-prev.square { border-radius: 12px; width: 96px; } .pp-prev img { width: 100%; height: 100%; object-fit: cover; } .pp-prev.square img { object-fit: contain; }
.pp-prev span { font-size: .72rem; color: var(--muted); text-align: center; padding: .2rem; } .mt-s { margin-top: .4rem; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.bearer { border: 1px solid var(--line); border-radius: 12px; padding: .9rem .7rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.b-pos { font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; margin-top: .3rem; } .b-name { font-weight: 600; }
/* membership card: real ID-card size (86 x 54 mm), enlarged on screen */
.mcard-wrap { overflow-x: auto; padding: .3rem 0 .6rem; } .mcard-wrap .mcard { zoom: 1.45; }
.mcard { width: 86mm; height: 54mm; border-radius: 3mm; overflow: hidden; display: flex; flex-direction: column; position: relative;
  background: linear-gradient(135deg, #0f5e4b 0%, #13735c 55%, #0b4a3b 100%); color: #fff; font-family: Inter, system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.mcard::after { content: ''; position: absolute; right: -14mm; top: -14mm; width: 40mm; height: 40mm; border-radius: 50%; background: rgba(246,196,83,.18); }
.mc-top { display: flex; align-items: center; gap: 2mm; padding: 2.2mm 3mm 1.6mm; background: rgba(0,0,0,.14); position: relative; z-index: 1; }
.mc-logo { width: 8mm; height: 8mm; object-fit: contain; background: #fff; border-radius: 1.6mm; padding: .4mm; }
.mc-logo-empty { display: grid; place-items: center; color: #0f5e4b; font-weight: 800; font-size: 3mm; }
.mc-org { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; } .mc-org b { font-size: 3.1mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-org span { font-size: 1.9mm; letter-spacing: .5mm; color: #f6c453; font-weight: 700; }
.mc-body { flex: 1; display: flex; gap: 2.6mm; padding: 2.4mm 3mm 1mm; align-items: flex-start; position: relative; z-index: 1; }
.mc-photo { width: 18mm; height: 22mm; object-fit: cover; border-radius: 1.6mm; border: .5mm solid #fff; background: #e9f3ef; flex-shrink: 0; }
.mc-photo-empty { display: grid; place-items: center; color: #0f5e4b; font-weight: 800; font-size: 5mm; }
.mc-info { flex: 1; min-width: 0; } .mc-name { font-size: 3.4mm; font-weight: 800; margin-bottom: 1mm; line-height: 1.1; }
.mc-row { display: flex; justify-content: space-between; gap: 1.5mm; font-size: 2.15mm; line-height: 1.55; border-bottom: .15mm solid rgba(255,255,255,.15); }
.mc-row span { color: rgba(255,255,255,.75); } .mc-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-qr { width: 15mm; height: 15mm; background: #fff; border-radius: 1.2mm; padding: .8mm; flex-shrink: 0; align-self: flex-end; } .mc-qr svg { width: 100%; height: 100%; display: block; }
.mc-foot { display: flex; align-items: center; justify-content: flex-end; gap: 1.2mm; padding: 1mm 3mm 1.6mm; font-size: 1.9mm; color: rgba(255,255,255,.85); position: relative; z-index: 1; }
.mc-foot svg { width: 3.2mm; height: 3.2mm; } .mc-foot.plain { justify-content: flex-start; }
@media (max-width: 860px) { .mcard-wrap .mcard { zoom: 1.1; } }
/* multi-currency */
.pill.cur { background: #e7f6ee; color: var(--pos); margin-left: .25rem; text-transform: none; }
.other-cur { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; background: #f7fbf9; }
.other-cur span { font-size: .9rem; } .other-cur a { margin-left: auto; font-size: .85rem; }
/* free-plan branding that cannot be cropped out */
.mcard .mc-wm, .receipt .r-wm { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.receipt { position: relative; overflow: hidden; }
.mc-photo-wrap { position: relative; flex-shrink: 0; display: block; }
.mc-badge { position: absolute; right: -1.6mm; bottom: -1.6mm; width: 6.6mm; height: 6.6mm; border-radius: 50%; background: #fff; display: grid; place-items: center; z-index: 2; }
.mc-badge svg { width: 5.2mm; height: 5.2mm; }
/* membership card v2: white ID card with brand header */
.mcard.v2 { background: #fff; color: #132a24; border: .25mm solid #dbe7e3; }
.mcard.v2::after { display: none; }
.mcard.v2 .mc-top { background: linear-gradient(90deg, var(--brand, #0f5e4b), var(--brand-dark, #0b4a3b)); padding: 2.3mm 3mm; height: 13mm; box-sizing: border-box; border-bottom: .7mm solid #f6c453; color: #fff; }
.mcard.v2 .mc-logo { width: 8.4mm; height: 8.4mm; border-radius: 1.8mm; }
.mcard.v2 .mc-org b { font-size: 3.2mm; font-weight: 800; } .mcard.v2 .mc-org span { font-size: 1.8mm; }
.mcard.v2 .mc-body { padding: 2.9mm 3mm 0 3.5mm; gap: 3mm; }
.mcard.v2 .mc-photo { width: 19mm; height: 24mm; border: .6mm solid var(--brand, #0f5e4b); border-radius: 2mm; }
.mcard.v2 .mc-name { font-size: 3.7mm; text-transform: uppercase; color: #132a24; margin: .6mm 0 1.2mm; padding-bottom: .9mm; border-bottom: .45mm solid var(--brand, #0f5e4b); width: fit-content; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard.v2 .mc-grid { display: grid; grid-template-columns: 25mm minmax(0,1fr); gap: 1.4mm 2mm; }
.mcard.v2 .mc-grid > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mcard.v2 .mc-grid span { font-size: 1.85mm; color: #6b7c77; } .mcard.v2 .mc-grid b { font-size: 2.6mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard.v2 .mc-blood { display: inline-block; width: fit-content; background: #fdecec; color: #c62828; border-radius: 3mm; padding: .3mm 1.6mm; margin-top: .3mm; font-weight: 800; }
.mcard.v2 .mc-body { position: relative; } .mcard.v2 .mc-qr { position: absolute; right: 3mm; bottom: 1mm; width: 15mm; height: 15mm; border: .3mm solid #dbe7e3; padding: 1mm; box-sizing: border-box; }
.mcard.v2 .mc-foot { background: #f1f6f4; color: #3d524c; justify-content: center; height: 5.6mm; box-sizing: border-box; padding: 0 3mm; border-bottom: .8mm solid var(--brand, #0f5e4b); }
.mcard.v2 .mc-foot b { color: var(--brand, #0f5e4b); } .mcard.v2 .mc-foot.plain { justify-content: center; }
/* membership card v3: absolute layout in mm, same as the printed image */
.mcard.v2 { display: block; }
.mcard.v2 .mc-top { position: absolute; left: 0; right: 0; top: 0; }
.mcard.v2 .mc-photo-wrap { position: absolute; left: 3.5mm; top: 16.6mm; }
.mcard.v2 .mc-photo { box-sizing: content-box; width: 19mm; height: 24mm; margin: -.6mm; }
.mcard.v2 .mc-name { position: absolute; left: 25.6mm; top: 16.9mm; max-width: 57mm; margin: 0; padding-bottom: .75mm; border-bottom: none; background: linear-gradient(var(--brand, #0f5e4b), var(--brand, #0f5e4b)) left bottom / 9mm .45mm no-repeat; z-index: 1; }
.mcard.v2 .mc-f { position: absolute; display: flex; flex-direction: column; line-height: 1.22; min-width: 0; z-index: 1; }
.mcard.v2 .mc-f span { color: #6b7c77; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard.v2 .mc-f b { color: #132a24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard.v2 .mc-f b.mc-blood { color: #c62828; width: fit-content; }
.mcard.v2 .mc-qr { position: absolute; left: 68mm; top: 29.6mm; right: auto; bottom: auto; z-index: 1; }
.mcard.v2 .mc-foot { position: absolute; left: 0; right: 0; bottom: 0; }
/* ID card settings */
.cf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: start; }
@media (max-width: 980px) { .cf-wrap { grid-template-columns: 1fr; } }
.cf-chosen { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.cf-chosen li { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .6rem; background: #fff; }
.cf-chosen li b { flex: 1; font-weight: 600; } .cf-chosen li .pill { font-size: .7rem; }
.cf-chosen li .btn { padding: .15rem .45rem; min-height: 0; }
.cf-pool { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.cf-pool button { border: 1px dashed var(--line); background: #f7fbf9; border-radius: 999px; padding: .3rem .7rem; cursor: pointer; font: inherit; font-size: .85rem; }
.cf-pool button:hover:not(:disabled) { border-style: solid; border-color: var(--brand); color: var(--brand); }
.cf-pool button:disabled { opacity: .45; cursor: not-allowed; }
.cf-meter { height: 8px; border-radius: 99px; background: #e7efec; overflow: hidden; margin: .3rem 0 .2rem; } .cf-meter i { display: block; height: 100%; background: var(--brand); }
.cf-prev .mcard-wrap .mcard { zoom: 1.25; }

.print-wm, .print-brand { display: none; }
@media print {
  body.branded .print-wm { display: block; position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
  body.branded .print-wm svg { width: 100%; height: 100%; }
  body.branded .print-brand { display: block; position: fixed; left: 0; right: 0; bottom: 0; text-align: center; font-size: 9pt; color: #0f5e4b; padding: 2mm 0; z-index: 9999; }
}
@media print { .receipt .r-wm { display: none; } }
/* GroupDesk brand mark */
.brand-mark { display: inline-flex; width: 28px; height: 28px; flex-shrink: 0; } .brand-mark svg { width: 100%; height: 100%; display: block; }
.brand.big .brand-mark { width: 40px; height: 40px; } .brand { letter-spacing: -.01em; }
.brand-name { display: inline-flex; flex-direction: column; line-height: 1; } .brand-name small { font-size: .58em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: linear-gradient(90deg, #ff7a59, #f6c453); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 2px; }
