
/* ======================================================
   PLATFORM MASTER / CHURCH CONTEXT v0.2.28
   ====================================================== */

body.pm-platform-mode .nt-side{
  background:#fff!important;
}

.pm-shell{
  min-height:100vh;
  background:
    radial-gradient(circle at 8% 8%,rgba(197,70,83,.07),transparent 30%),
    #fffafb;
  color:#202938;
}

.pm-sidebar{
  position:fixed;
  left:0;top:0;bottom:0;
  width:260px;
  padding:26px 18px;
  background:rgba(255,255,255,.96);
  border-right:1px solid #efdfe2;
  box-sizing:border-box;
  z-index:5000;
}

.pm-brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:28px;
}
.pm-logo{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  font-weight:900;color:#fff;
  background:linear-gradient(135deg,#c54653,#932c38);
}
.pm-brand b{display:block;font-size:16px}
.pm-brand span{font-size:12px;color:#7b8492}

.pm-nav{display:grid;gap:7px}
.pm-nav button{
  width:100%;
  border:0;
  background:transparent;
  border-radius:13px;
  padding:12px 13px;
  text-align:left;
  font-weight:750;
  color:#394353;
  cursor:pointer;
}
.pm-nav button:hover,.pm-nav button.active{
  background:#fff0f2;
  color:#a92d39;
}

.pm-main{
  margin-left:260px;
  padding:30px 34px 50px;
  box-sizing:border-box;
}
.pm-head{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:16px;margin-bottom:20px;
}
.pm-head h1,.pm-head h2{margin:0;color:#1f2937}
.pm-head h1{font-size:34px}
.pm-head p{margin:5px 0 0;color:#758094}
.pm-actions{display:flex;gap:9px;flex-wrap:wrap}

.pm-btn{
  border:0;border-radius:12px;
  padding:10px 14px;font-weight:800;cursor:pointer;
}
.pm-primary{background:linear-gradient(135deg,#c54653,#a92d39);color:#fff}
.pm-ghost{background:#fff4f5;color:#a92d39;border:1px solid #efd4d8}
.pm-danger{background:#fff0f2;color:#9f2b38;border:1px solid #edcbd0}

.pm-stats{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;margin-bottom:18px;
}
.pm-stat,.pm-panel,.pm-church-card{
  background:#fff;
  border:1px solid #eddee1;
  box-shadow:0 10px 28px rgba(90,35,45,.05);
}
.pm-stat{border-radius:17px;padding:16px}
.pm-stat b{display:block;font-size:29px}
.pm-stat span{color:#768194;font-size:13px}

.pm-panel{border-radius:20px;padding:18px;margin-bottom:16px}
.pm-churches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pm-church-card{border-radius:19px;padding:18px}
.pm-church-card h3{margin:0 0 4px}
.pm-meta{font-size:13px;color:#788395}
.pm-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;margin-top:8px}
.pm-active{background:#e9f8ee;color:#15733a}
.pm-inactive{background:#f2f3f5;color:#6e7785}
.pm-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:16px}

.pm-form{display:grid;gap:11px}
.pm-form label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#5c6676}
.pm-form input,.pm-form select,.pm-form textarea{
  width:100%;box-sizing:border-box;
  border:1px solid #dde2e9;border-radius:12px;
  padding:11px 12px;background:#fff;
}
.pm-two{display:grid;grid-template-columns:1fr 1fr;gap:11px}

.pm-modal{
  position:fixed;inset:0;z-index:2147483500;
  display:flex;align-items:center;justify-content:center;
  padding:18px;background:rgba(25,27,33,.42);
}
.pm-modal-card{
  width:min(590px,96vw);max-height:92vh;overflow:auto;
  background:#fff;border-radius:22px;padding:21px;
  box-shadow:0 30px 85px rgba(20,20,30,.25);
}

.pm-table{width:100%;border-collapse:collapse}
.pm-table th,.pm-table td{padding:11px 9px;border-bottom:1px solid #f1e5e7;text-align:left}
.pm-table th{font-size:12px;color:#7a8494;text-transform:uppercase}

.pm-empty{
  padding:36px;text-align:center;color:#818b9a;
  border:1px dashed #e5cfd4;border-radius:18px;
}

/* Church context bar */
.pm-churchbar{
  position:sticky;
  top:0;
  z-index:4500;
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 18px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #efdfe2;
  box-shadow:0 8px 20px rgba(70,30,40,.04);
}
.pm-churchbar-left,.pm-churchbar-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pm-current-church{font-weight:850;color:#202938}
.pm-church-select{
  border:1px solid #e4d7da;border-radius:11px;
  padding:9px 11px;background:#fff;
}

body.pm-has-churchbar main,
body.pm-has-churchbar #content,
body.pm-has-churchbar .content{
  scroll-margin-top:70px;
}

@media(max-width:1050px){
  .pm-stats{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:900px){
  .pm-sidebar{
    position:static;width:auto;
    padding:16px;
    border-right:0;border-bottom:1px solid #efdfe2;
  }
  .pm-brand{margin-bottom:12px}
  .pm-nav{grid-template-columns:repeat(2,1fr)}
  .pm-main{margin-left:0;padding:20px 14px 40px}
  .pm-churches,.pm-stats{grid-template-columns:1fr}
}
@media(max-width:620px){
  .pm-nav{grid-template-columns:1fr}
  .pm-head{flex-direction:column;align-items:flex-start}
  .pm-two{grid-template-columns:1fr}
  .pm-churchbar{align-items:flex-start;flex-direction:column}
}
