/* Parish CRM — public / parishioner UI (scoped under .ccrm-pub) */
.ccrm-pub{
  --v:#5b21b6; --v2:#7c3aed; --v-soft:#f5f3ff; --gold:#b45309;
  --ink:#1f2937; --muted:#6b7280; --line:#e7e7ee; --ok:#047857; --bad:#b91c1c;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--ink); max-width:760px; margin:24px auto; line-height:1.5;
}
.ccrm-pub.wide,.ccrm-pub:has(.ccrm-pub-toolbar){max-width:920px}
.ccrm-pub *{box-sizing:border-box}
.ccrm-pub-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px 26px 14px;box-shadow:0 6px 30px rgba(16,24,40,.06)}
.ccrm-pub-head{margin-bottom:20px}
.ccrm-pub-head h2{margin:0;font-size:23px;font-weight:700;color:var(--ink)}
.ccrm-pub-head .lead{margin:6px 0 0;color:var(--muted);font-size:14px}
.ccrm-pub h3{font-size:16px;font-weight:600;margin:0 0 14px;display:flex;align-items:center;gap:8px;color:var(--ink)}
.ccrm-pub h4{font-size:14px;font-weight:600;margin:0 0 10px}
.ccrm-pub svg{width:18px;height:18px;flex:none}
.ccrm-pub code{background:var(--v-soft);color:var(--v);padding:2px 8px;border-radius:6px;font-size:13px}
.ccrm-pub .fine{color:var(--muted);font-size:12.5px;margin:8px 0 0}
.ccrm-pub .muted{color:var(--muted)}

/* Forms */
.ccrm-pub-form{display:block}
.ccrm-pf-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:560px){.ccrm-pf-grid{grid-template-columns:1fr}}
.ccrm-pf-inline{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.ccrm-pf{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.ccrm-pf.full{grid-column:1/-1}
.ccrm-pf>span{font-size:13px;font-weight:600;color:#374151}
.ccrm-pf>span em{color:var(--bad);font-style:normal}
.ccrm-pub input[type=text],.ccrm-pub input[type=email],.ccrm-pub input[type=number],
.ccrm-pub input[type=date],.ccrm-pub input[type=password],.ccrm-pub select,.ccrm-pub textarea{
  width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:11px;font-size:14.5px;
  background:#fff;color:var(--ink);font-family:inherit}
.ccrm-pub textarea{resize:vertical;min-height:80px}
.ccrm-pub input:focus,.ccrm-pub select:focus,.ccrm-pub textarea:focus{outline:none;border-color:var(--v2);box-shadow:0 0 0 3px rgba(124,58,237,.13)}

/* Method picker */
.ccrm-pf-methods{margin:6px 0 16px}
.ccrm-pf-methods .lbl{font-size:13px;font-weight:600;color:#374151;display:block;margin-bottom:8px}
.ccrm-pf-methods .opts{display:flex;gap:10px;flex-wrap:wrap}
.ccrm-pf-methods label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:11px;padding:9px 14px;font-size:13.5px;cursor:pointer}
.ccrm-pf-methods label:hover{border-color:var(--v2)}

/* Buttons */
.ccrm-pub-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,var(--v),var(--v2));
  color:#fff;border:none;border-radius:12px;padding:13px 22px;font-size:14.5px;font-weight:600;cursor:pointer;
  text-decoration:none;transition:.15s;width:100%}
.ccrm-pub-btn:hover{filter:brightness(1.07);box-shadow:0 6px 18px rgba(124,58,237,.3);color:#fff}
.ccrm-pub-btn.sm{width:auto;padding:9px 16px;font-size:13px;border-radius:10px}
.ccrm-pub-btn.ghost{background:#fff;color:var(--v);border:1px solid var(--line)}
.ccrm-pub-btn.ghost:hover{border-color:var(--v2);box-shadow:none}
.ccrm-pub-amount{background:var(--v-soft);border-radius:12px;padding:12px 16px;margin:6px 0 16px;font-size:14.5px;color:var(--ink)}
.ccrm-pub-amount strong{color:var(--v);font-size:17px}

/* Notices */
.ccrm-pub-note{padding:12px 16px;border-radius:12px;font-size:14px;font-weight:500;margin:0 0 16px;border:1px solid}
.ccrm-pub-note.success{background:#ecfdf5;border-color:#a7f3d0;color:var(--ok)}
.ccrm-pub-note.error{background:#fef2f2;border-color:#fecaca;color:var(--bad)}
.ccrm-pub-note.info{background:var(--v-soft);border-color:#ddd6fe;color:var(--v)}

/* List items */
.ccrm-pub-fam{display:flex;align-items:center;gap:8px;margin:16px 0;font-size:15px}
.ccrm-pub-list{display:flex;flex-direction:column;gap:10px}
.ccrm-pub-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:13px;padding:13px 16px;flex-wrap:wrap}
.ccrm-pub-item .t{font-weight:600;font-size:14.5px}
.ccrm-pub-item .m{font-size:12.5px;color:var(--muted);margin-top:2px}
.ccrm-pub-item .m .due{color:var(--bad);font-weight:600}
.ccrm-pub-item .a{display:flex;align-items:center;gap:12px}
.ccrm-pub-item .amt{font-weight:700;color:var(--v);font-size:15px}
.ccrm-pub-item .st{font-size:11px;font-weight:600;padding:2px 9px;border-radius:14px}
.ccrm-pub-item .st.ok{background:#dcfce7;color:var(--ok)}
.ccrm-pub-item .st.pend{background:#fef3c7;color:var(--gold)}

/* Payment panel */
.ccrm-pub-pay{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
@media(max-width:620px){.ccrm-pub-pay{grid-template-columns:1fr}}
.ccrm-pub-paysum{grid-column:1/-1;text-align:center;background:linear-gradient(160deg,var(--v-soft),#fff);border:1px solid var(--line);border-radius:14px;padding:20px}
.ccrm-pub-paysum .amt{font-size:40px;font-weight:800;color:var(--v);line-height:1}
.ccrm-pub-paysum .lbl{font-weight:600;margin-top:6px}
.ccrm-pub-paysum .who{color:var(--muted);font-size:13.5px;margin-top:4px}
.ccrm-pub-paysum .ref{margin-top:10px;font-size:12.5px;color:var(--muted)}
.ccrm-pub-paybox{border:1px solid var(--line);border-radius:14px;padding:18px;text-align:center}
.ccrm-pub-paybox .qr{display:flex;justify-content:center;padding:10px 0}
.ccrm-pub-paybox .qr canvas{border:1px solid var(--line);border-radius:12px;padding:8px;background:#fff}
.ccrm-upi-report{margin-top:14px;text-align:left}

/* Cols / subcards (auth) */
.ccrm-pub-cols{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media(max-width:620px){.ccrm-pub-cols{grid-template-columns:1fr}}
.ccrm-pub-subcard{border:1px solid var(--line);border-radius:14px;padding:20px}
.ccrm-pub-subcard h3{margin-bottom:14px}
.ccrm-pub-subcard #loginform label{display:block;font-size:13px;font-weight:600;margin-bottom:10px;color:#374151}
.ccrm-pub-subcard #loginform input[type=text],.ccrm-pub-subcard #loginform input[type=password]{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:11px;margin-top:5px}
.ccrm-pub-subcard #loginform .button,.ccrm-pub-subcard #loginform #wp-submit{background:linear-gradient(135deg,var(--v),var(--v2));color:#fff;border:none;border-radius:11px;padding:11px 20px;font-weight:600;cursor:pointer;width:100%}
.ccrm-pub-subcard .login-remember{font-weight:400!important}

/* Portal */
.ccrm-pub-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.ccrm-pub-toolbar .who{display:flex;align-items:center;gap:8px;font-weight:600}
.ccrm-pub-toolbar .links{display:flex;align-items:center;gap:14px}
.ccrm-pub-toolbar a,.ccrm-pub-toolbar .linkbtn{color:var(--v);font-size:13px;font-weight:600;text-decoration:none;background:none;border:none;cursor:pointer;padding:0}
.ccrm-pub-toolbar a:hover,.ccrm-pub-toolbar .linkbtn:hover{text-decoration:underline}
.ccrm-pub-section{padding:18px 0;border-bottom:1px solid var(--line)}
.ccrm-pub-section:last-child{border-bottom:none}
.ccrm-pub-section h3 .code{font-size:12px;font-weight:600;background:var(--v-soft);color:var(--v);padding:2px 9px;border-radius:14px}
.ccrm-pub-section h3 .count{font-size:12px;background:#f1f1f4;color:var(--muted);padding:2px 9px;border-radius:14px;font-weight:600}
.ccrm-pub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}
.ccrm-pub-grid .cell .k{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:600;margin-bottom:3px}
.ccrm-pub-grid .cell .v{font-size:14.5px}

/* Members */
.ccrm-pub-members{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;margin-bottom:8px}
.ccrm-pub-members .mem{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:9px 12px}
.ccrm-pub-members .av,.ccrm-pub-tree .av{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#0ea5e9,#0369a1);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;flex:none}
.ccrm-pub-members .av.f,.ccrm-pub-tree .node.f .av{background:linear-gradient(135deg,#ec4899,#be185d)}
.ccrm-pub-members .av.d{opacity:.6}
.ccrm-pub-members .nm{font-weight:600;font-size:13.5px}
.ccrm-pub-members .rl{font-size:12px;color:var(--muted)}

/* Read-only tree */
.ccrm-pub-tree-wrap{overflow-x:auto;padding:6px 2px}
.ccrm-pub-tree{display:inline-block;min-width:100%}
.ccrm-pub-tree ul{display:flex;justify-content:center;padding-top:20px;position:relative;margin:0;list-style:none}
.ccrm-pub-tree ul ul::before{content:'';position:absolute;top:0;left:50%;border-left:1.5px solid #d6d3e6;height:20px}
.ccrm-pub-tree li{list-style:none;text-align:center;padding:20px 8px 0;position:relative}
.ccrm-pub-tree li::before,.ccrm-pub-tree li::after{content:'';position:absolute;top:0;right:50%;border-top:1.5px solid #d6d3e6;width:50%;height:20px}
.ccrm-pub-tree li::after{right:auto;left:50%;border-left:1.5px solid #d6d3e6}
.ccrm-pub-tree li:only-child::before,.ccrm-pub-tree li:only-child::after{display:none}
.ccrm-pub-tree li:first-child::before,.ccrm-pub-tree li:last-child::after{border:0}
.ccrm-pub-tree li:last-child::before{border-right:1.5px solid #d6d3e6;border-radius:0 6px 0 0}
.ccrm-pub-tree li:first-child::after{border-radius:6px 0 0 0}
.ccrm-pub-tree .node{display:inline-flex;flex-direction:column;align-items:center;gap:4px;background:#fff;border:1.5px solid #e0f2fe;border-radius:12px;padding:10px 14px}
.ccrm-pub-tree .node.f{border-color:#fce7f3}
.ccrm-pub-tree .node.d{opacity:.7}
.ccrm-pub-tree .node .nm{font-size:12.5px;font-weight:600}

.ccrm-pub-back{margin-top:14px}
.ccrm-pub-back a{color:var(--v);font-weight:600;text-decoration:none}

/* Footer */
.ccrm-pub-foot{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line);color:var(--muted);font-size:12.5px}
.ccrm-pub-foot svg{width:16px;height:16px;color:var(--v2)}
.ccrm-pub-foot strong{color:var(--v)}
