:root{
  --jchcp-navy:#163153;
  --jchcp-navy-2:#21446f;
  --jchcp-blue:#2563eb;
  --jchcp-green:#3aa62f;
  --jchcp-green-dark:#2f8a27;
  --jchcp-text:#22324a;
  --jchcp-muted:#6b7b90;
  --jchcp-line:#dfe7f0;
  --jchcp-soft:#f6f9fc;
  --jchcp-soft-blue:#eef5ff;
  --jchcp-soft-green:#eef9ec;
  --jchcp-danger:#b42318;
  --jchcp-danger-soft:#fff1f0;
  --jchcp-shadow:0 18px 50px rgba(18,45,79,.09);
}

.jchcp-shell{
  width:100%;
  max-width:1240px;
  margin:20px auto;
  padding:0 18px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--jchcp-text);
  box-sizing:border-box;
}
.jchcp-shell *{box-sizing:border-box}
.jchcp-shell svg{display:block}

/* Shared surfaces */
.jchcp-app,.jchcp-card,.jchcp-auth-card{
  background:#fff;
  border:1px solid var(--jchcp-line);
  box-shadow:var(--jchcp-shadow);
}
.jchcp-app{border-radius:24px;overflow:hidden}
.jchcp-card{border-radius:18px;padding:20px}
.jchcp-kicker,.jchcp-powered{
  font-size:11px;
  line-height:1.2;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#718096;
}
.jchcp-icon{width:20px;height:20px;flex:0 0 20px}
.jchcp-icon-sm{width:17px;height:17px;flex:0 0 17px}

/* Login */
.jchcp-auth-wrap{max-width:590px;margin:0 auto}
.jchcp-auth-card{border-radius:24px;overflow:hidden}
.jchcp-auth-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:center;
  padding:26px 28px 22px;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  border-bottom:1px solid var(--jchcp-line);
}
.jchcp-auth-lock{
  width:48px;height:48px;border-radius:15px;
  display:grid;place-items:center;
  background:var(--jchcp-soft-green);
  color:var(--jchcp-green-dark);
  border:1px solid #d6efd2;
}
.jchcp-auth-title h1{margin:3px 0 4px;font-size:27px;line-height:1.15;color:var(--jchcp-navy);letter-spacing:-.02em}
.jchcp-auth-title p{margin:0;color:var(--jchcp-muted);font-size:14px;line-height:1.45}
.jchcp-secure-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 10px;border-radius:999px;
  background:#f4f8fc;border:1px solid var(--jchcp-line);
  color:#53657c;font-size:11px;font-weight:800;white-space:nowrap
}
.jchcp-auth-body{padding:26px 28px 28px}
.jchcp-auth-body form,.jchcp-form{display:grid;gap:15px;margin:0}
.jchcp-auth-body label,.jchcp-form label{display:grid;gap:7px;font-size:13px;font-weight:800;color:#34445b}
.jchcp-auth-body input,.jchcp-form input,.jchcp-form textarea,.jchcp-form select{
  width:100%;
  min-height:50px;
  padding:11px 13px;
  border:1px solid #ccd8e5;
  border-radius:12px;
  background:#fff;
  color:var(--jchcp-text);
  font:inherit;
  outline:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease
}
.jchcp-auth-body input:focus,.jchcp-form input:focus,.jchcp-form textarea:focus,.jchcp-form select:focus{
  border-color:#7aa5eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.09)
}
.jchcp-auth-body input:disabled{background:#f7f9fc;color:#607086}
.jchcp-code-input{text-align:center;font-size:23px!important;font-weight:850!important;letter-spacing:.30em!important;padding-left:.30em!important}
.jchcp-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:50px;border:0;border-radius:12px;
  background:var(--jchcp-green);color:#fff;
  font-weight:850;padding:0 18px;cursor:pointer;
  box-shadow:0 8px 18px rgba(58,166,47,.18);
  transition:transform .14s ease,background .14s ease,box-shadow .14s ease
}
.jchcp-primary:hover{background:var(--jchcp-green-dark);transform:translateY(-1px);box-shadow:0 10px 22px rgba(58,166,47,.22)}
.jchcp-help{font-size:12px;color:var(--jchcp-muted);line-height:1.55;margin:0}
.jchcp-auth-note{
  display:flex;gap:10px;align-items:flex-start;margin-top:18px;
  padding:13px 14px;border-radius:12px;background:var(--jchcp-soft);
  border:1px solid #e8eef5;color:#62738a;font-size:12px;line-height:1.5
}
.jchcp-auth-note .jchcp-icon-sm{color:#5d7189;margin-top:1px}
.jchcp-link{display:inline-flex;align-items:center;gap:7px;margin-top:16px;color:var(--jchcp-blue);text-decoration:none;font-weight:800;font-size:13px}

/* Notices */
.jchcp-notice{margin-bottom:18px;padding:13px 15px;border-radius:12px;background:#ecfdf3;border:1px solid #bbf7d0;color:#166534;font-size:13px;font-weight:650}
.jchcp-notice.is-error{background:#fff1f2;border-color:#fecdd3;color:#9f1239}

/* Portal header */
.jchcp-header{
  display:flex;justify-content:space-between;gap:20px;align-items:center;
  padding:20px 24px;background:#fff;border-bottom:1px solid var(--jchcp-line)
}
.jchcp-branding{display:flex;gap:14px;align-items:center;min-width:0}
.jchcp-branding img{
  width:52px;height:52px;object-fit:contain;border-radius:13px;
  border:1px solid #edf1f6;background:#fff;padding:4px
}
.jchcp-brand-copy{display:grid;gap:3px;min-width:0}
.jchcp-branding strong{font-size:19px;line-height:1.25;color:var(--jchcp-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jchcp-header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.jchcp-header-link,.jchcp-link-button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:38px;border:1px solid #d9e3ed;background:#fff;border-radius:10px;
  padding:0 12px;color:#41546c;text-decoration:none;font-size:12px;font-weight:800;cursor:pointer
}
.jchcp-header-link:hover,.jchcp-link-button:hover{background:#f7f9fc;color:var(--jchcp-navy)}
.jchcp-inline-form{display:inline-flex;margin:0}

/* Navigation */
.jchcp-nav{
  display:flex;gap:4px;padding:9px 14px;
  border-bottom:1px solid var(--jchcp-line);
  background:#fbfcfe;overflow-x:auto;scrollbar-width:thin
}
.jchcp-nav a{
  display:inline-flex;align-items:center;gap:7px;white-space:nowrap;
  padding:10px 12px;border-radius:10px;color:#5c6e84;
  text-decoration:none;font-weight:800;font-size:12.5px;
  transition:background .15s ease,color .15s ease
}
.jchcp-nav a:hover{background:#f0f4f8;color:var(--jchcp-navy)}
.jchcp-nav a.is-active{background:#eaf2ff;color:#1d4ed8;box-shadow:inset 0 0 0 1px #d9e7ff}
.jchcp-nav a.is-active .jchcp-icon-sm{color:#2563eb}

/* Main content */
.jchcp-main{padding:26px;background:#fff}
.jchcp-welcome{
  display:flex;justify-content:space-between;align-items:center;gap:24px;
  padding:25px 26px;margin-bottom:18px;
  border:1px solid #dce8f4;border-radius:20px;
  background:linear-gradient(135deg,#f8fbff 0%,#f3f8ff 62%,#f2faef 100%);
  overflow:hidden;position:relative
}
.jchcp-welcome:after{
  content:"";position:absolute;width:180px;height:180px;border-radius:50%;
  right:-80px;top:-95px;background:rgba(58,166,47,.08)
}
.jchcp-welcome-copy{position:relative;z-index:1}
.jchcp-welcome h1{margin:5px 0 7px;font-size:30px;line-height:1.15;color:var(--jchcp-navy);letter-spacing:-.025em}
.jchcp-welcome p{margin:0;color:#607086;font-size:14px}
.jchcp-welcome p strong{color:#2c405b}
.jchcp-welcome-mark{
  width:54px;height:54px;border-radius:16px;display:grid;place-items:center;
  color:var(--jchcp-green-dark);background:#fff;border:1px solid #dbe8d8;
  box-shadow:0 8px 22px rgba(18,45,79,.08);position:relative;z-index:1
}

.jchcp-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.jchcp-quick-card{
  min-height:146px;padding:17px;border:1px solid var(--jchcp-line);border-radius:17px;
  text-decoration:none;color:var(--jchcp-text);background:#fff;
  display:flex;flex-direction:column;justify-content:space-between;gap:14px;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease
}
.jchcp-quick-card:hover{transform:translateY(-2px);border-color:#cbd9e8;box-shadow:0 12px 28px rgba(18,45,79,.08)}
.jchcp-quick-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.jchcp-quick-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#eef5ff;color:#315f9d}
.jchcp-quick-card.is-accent .jchcp-quick-icon{background:var(--jchcp-soft-green);color:var(--jchcp-green-dark)}
.jchcp-quick-arrow{color:#8ca0b7;margin-top:5px}
.jchcp-quick-card strong{display:block;font-size:16px;color:var(--jchcp-navy);margin-bottom:5px}
.jchcp-quick-card p{margin:0;color:var(--jchcp-muted);font-size:12.5px;line-height:1.45}

/* Section heads and lists */
.jchcp-section-head{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:16px}
.jchcp-section-head h2{margin:0;font-size:26px;line-height:1.2;color:var(--jchcp-navy);letter-spacing:-.02em}
.jchcp-section-head p{margin:5px 0 0;color:var(--jchcp-muted);font-size:13.5px}
.jchcp-list{display:grid;gap:11px}
.jchcp-row{
  display:flex;justify-content:space-between;align-items:center;gap:18px;
  padding:17px 18px;border:1px solid var(--jchcp-line);border-radius:15px;background:#fff
}
.jchcp-row-main{display:grid;gap:7px;min-width:0}
.jchcp-row-titleline{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.jchcp-row-titleline>strong{font-size:16px;color:var(--jchcp-navy)}
.jchcp-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--jchcp-muted);font-size:12px}
.jchcp-row p{font-size:12.5px;color:#5d6d82;margin:0;line-height:1.5}
.jchcp-row-right{display:grid;gap:10px;text-align:right;justify-items:end;flex:0 0 auto}
.jchcp-amount{font-size:18px;color:var(--jchcp-navy);font-weight:800;white-space:nowrap}
.jchcp-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.jchcp-btn,.jchcp-actions a,.jchcp-actions button{
  min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  border:1px solid #cfdbe8;background:#fff;border-radius:9px;padding:0 11px;
  text-decoration:none;color:#2c5fa8;font-size:12px;font-weight:850;cursor:pointer
}
.jchcp-btn:hover,.jchcp-actions a:hover,.jchcp-actions button:hover{background:#f7faff}
.jchcp-actions button.is-success{color:#287d25;border-color:#bcdcb9;background:#f4fbf2}
.jchcp-actions button.is-danger{color:var(--jchcp-danger);border-color:#efcbc7;background:#fff8f7}
.jchcp-status{
  display:inline-flex;align-items:center;min-height:25px;padding:0 8px;border-radius:999px;
  background:#f1f5f9;color:#5e6f82;font-size:10.5px;font-weight:850;text-transform:capitalize;border:1px solid #e1e8ef
}
.jchcp-status--sent,.jchcp-status--scheduled,.jchcp-status--on-our-way,.jchcp-status--on-site,.jchcp-status--in-progress{background:#eef5ff;color:#285eaa;border-color:#d7e6ff}
.jchcp-status--accepted,.jchcp-status--paid,.jchcp-status--completed,.jchcp-status--closed{background:#eef9ec;color:#317c2b;border-color:#d4ebd0}
.jchcp-status--declined,.jchcp-status--cancelled,.jchcp-status--written-off{background:#fff1f0;color:#a13b32;border-color:#f2d3d0}
.jchcp-status--unpaid,.jchcp-status--part-paid,.jchcp-status--waiting-on-parts,.jchcp-status--follow-up-required{background:#fff8e8;color:#8a6018;border-color:#f0dfb9}
.jchcp-empty{padding:34px;text-align:center;border:1px dashed #cbd7e4;border-radius:15px;color:var(--jchcp-muted);background:#fbfcfd}

/* Statements */
.jchcp-statement-summary{
  display:flex;justify-content:space-between;align-items:center;gap:20px;
  padding:20px 22px;margin-bottom:14px;border:1px solid var(--jchcp-line);
  border-radius:17px;background:linear-gradient(135deg,#fbfdff,#f5f9ff)
}
.jchcp-statement-summary small{display:block;color:var(--jchcp-muted);font-size:11px;margin-top:4px}
.jchcp-balance{display:grid;gap:4px;text-align:right}
.jchcp-balance span{font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;color:#75859a}
.jchcp-balance strong{font-size:28px;line-height:1;color:var(--jchcp-navy)}

/* Forms */
.jchcp-form{padding:22px}
.jchcp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.jchcp-form label small{font-weight:500;color:var(--jchcp-muted);font-size:11px}
.jchcp-form-section{display:grid;gap:14px;padding-bottom:19px;border-bottom:1px solid #e8eef5}
.jchcp-form-section:last-of-type{border-bottom:0;padding-bottom:0}
.jchcp-form-section-title{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:850;color:var(--jchcp-navy)}
.jchcp-info-strip{
  display:flex;gap:10px;align-items:flex-start;margin-bottom:15px;padding:13px 14px;
  border-radius:12px;border:1px solid #d8e6f4;background:#f4f8fc;color:#566b83;font-size:12.5px;line-height:1.5
}

/* Account */
.jchcp-account{padding:0;overflow:hidden}
.jchcp-account dl{display:grid;margin:0}
.jchcp-account dl div{display:grid;grid-template-columns:180px 1fr;gap:16px;padding:16px 18px;border-bottom:1px solid #e8eef5}
.jchcp-account dl div:last-child{border-bottom:0}
.jchcp-account dt{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#78899e;font-weight:850}
.jchcp-account dd{margin:0;font-weight:750;color:#2c4059;overflow-wrap:anywhere}
.jchcp-account-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 18px;background:#fafcfe;border-top:1px solid #e8eef5}
.jchcp-account-footer p{margin:0;color:var(--jchcp-muted);font-size:12px}

/* Business selector */
.jchcp-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.jchcp-card-head h2{margin:4px 0 5px;color:var(--jchcp-navy);font-size:25px}
.jchcp-card-head p{margin:0;color:var(--jchcp-muted);font-size:13px}
.jchcp-business-list{display:grid;gap:10px;margin-top:18px}
.jchcp-business-item{
  display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center;
  padding:14px;border:1px solid var(--jchcp-line);border-radius:14px;background:#fff
}
.jchcp-business-item:hover{background:#fbfdff;border-color:#cfdbea}
.jchcp-business-item img{width:46px;height:46px;object-fit:contain;border-radius:10px;border:1px solid #edf1f5;padding:3px}
.jchcp-business-icon{width:46px;height:46px;border-radius:11px;display:grid;place-items:center;background:#eef5ff;color:#315f9d}
.jchcp-business-item span{display:grid;gap:3px}
.jchcp-business-item strong{color:var(--jchcp-navy);font-size:15px}
.jchcp-business-item small{color:var(--jchcp-muted);font-size:11.5px}
.jchcp-business-item button{min-height:38px;border:1px solid #d1dfed;border-radius:9px;background:#f4f8ff;color:#2459a0;font-weight:850;padding:0 13px;cursor:pointer}


/* Portal PDF viewer */
.jchcp-document-toolbar{
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;
  margin-bottom:14px;padding:12px 14px;border:1px solid var(--jchcp-line);
  border-radius:14px;background:#f8fbfe
}
.jchcp-back-btn,.jchcp-open-pdf{
  min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:0 13px;border:1px solid #d4dfeb;border-radius:10px;background:#fff;
  color:#315a91;text-decoration:none;font-size:12px;font-weight:850;white-space:nowrap
}
.jchcp-back-btn:hover,.jchcp-open-pdf:hover{background:#f2f7fc;color:var(--jchcp-navy)}
.jchcp-document-title{display:grid;gap:3px;min-width:0;text-align:center}
.jchcp-document-title strong{color:var(--jchcp-navy);font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jchcp-document-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.jchcp-pdf-viewer{
  width:100%;height:min(74vh,900px);min-height:620px;border:1px solid var(--jchcp-line);
  border-radius:16px;overflow:hidden;background:#eef2f7
}
.jchcp-pdf-viewer iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.jchcp-pdf-mobile-actions{display:none}

@media(max-width:820px){
  .jchcp-shell{margin:10px auto;padding:0 10px}
  .jchcp-app,.jchcp-auth-card{border-radius:18px}
  .jchcp-header{align-items:flex-start;padding:16px}
  .jchcp-header-actions{display:grid;justify-items:end}
  .jchcp-branding strong{font-size:16px}
  .jchcp-nav{padding:8px 10px}
  .jchcp-main{padding:17px}
  .jchcp-welcome{padding:20px}
  .jchcp-welcome h1{font-size:25px}
  .jchcp-quick-grid{grid-template-columns:1fr 1fr}
  .jchcp-row{align-items:flex-start}
  .jchcp-form-grid{grid-template-columns:1fr}
  .jchcp-document-toolbar{grid-template-columns:auto 1fr}
  .jchcp-document-toolbar-actions{grid-column:1/-1;width:100%;justify-content:stretch}
  .jchcp-document-toolbar-actions .jchcp-open-pdf{flex:1 1 170px}
  .jchcp-pdf-viewer{height:68vh;min-height:520px}
}

@media(max-width:600px){
  .jchcp-auth-head{grid-template-columns:auto 1fr;padding:20px}
  .jchcp-secure-pill{display:none}
  .jchcp-auth-body{padding:20px}
  .jchcp-auth-title h1{font-size:24px}
  .jchcp-header{display:grid;gap:13px}
  .jchcp-header-actions{display:flex;justify-content:flex-start}
  .jchcp-branding img{width:46px;height:46px}
  .jchcp-main{padding:14px}
  .jchcp-welcome{align-items:flex-start}
  .jchcp-welcome-mark{display:none}
  .jchcp-quick-grid{grid-template-columns:1fr}
  .jchcp-quick-card{min-height:118px}
  .jchcp-section-head h2{font-size:23px}
  .jchcp-row{display:grid}
  .jchcp-row-right{text-align:left;justify-items:start;width:100%}
  .jchcp-actions{justify-content:flex-start}
  .jchcp-statement-summary{display:grid;gap:14px}
  .jchcp-balance{text-align:left}
  .jchcp-account dl div{grid-template-columns:1fr;gap:5px}
  .jchcp-account-footer{display:grid}
  .jchcp-business-item{grid-template-columns:auto 1fr}
  .jchcp-business-item button{grid-column:1/-1;width:100%}
  .jchcp-document-toolbar{display:flex;flex-wrap:wrap;align-items:center}
  .jchcp-document-title{order:-1;width:100%;text-align:left}
  .jchcp-document-toolbar .jchcp-back-btn{flex:1 1 145px}
  .jchcp-document-toolbar-actions{width:100%;display:flex}
  .jchcp-document-toolbar-actions .jchcp-open-pdf{flex:1 1 145px}
  .jchcp-pdf-viewer{height:64vh;min-height:440px;border-radius:12px}
  .jchcp-pdf-mobile-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
  .jchcp-pdf-mobile-actions a{flex:1 1 145px}
}

/* v0.1.3 business masthead */
.jchcp-business-masthead{
  padding:24px 26px;
  align-items:flex-start;
  background:linear-gradient(135deg,#ffffff 0%,#fbfdff 72%,#f4f9f2 100%);
}
.jchcp-business-masthead .jchcp-branding{align-items:flex-start;gap:18px;flex:1 1 auto;min-width:0}
.jchcp-business-logo{
  width:82px;height:82px;flex:0 0 82px;border-radius:18px;
  display:grid;place-items:center;background:#fff;border:1px solid #e2eaf3;
  box-shadow:0 8px 24px rgba(18,45,79,.07);padding:7px;overflow:hidden
}
.jchcp-business-logo img{width:100%;height:100%;object-fit:contain;border:0;border-radius:10px;padding:0;background:transparent}
.jchcp-business-logo-fallback{width:100%;height:100%;border-radius:12px;display:grid;place-items:center;background:#eef5ff;color:#315f9d}
.jchcp-business-logo-fallback .jchcp-icon{width:31px;height:31px}
.jchcp-business-masthead .jchcp-brand-copy{gap:7px;min-width:0;padding-top:1px}
.jchcp-business-overline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#64768d;font-size:10.5px;font-weight:900;letter-spacing:.085em;text-transform:uppercase}
.jchcp-powered-badge{
  display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;
  background:#eef8eb;border:1px solid #d9edd4;color:#397d32;letter-spacing:.03em;text-transform:none;font-weight:800
}
.jchcp-business-masthead h1{margin:0;color:var(--jchcp-navy);font-size:25px;line-height:1.16;letter-spacing:-.025em;font-weight:800}
.jchcp-business-contact{display:flex;align-items:center;gap:7px 15px;flex-wrap:wrap;margin-top:1px}
.jchcp-business-contact>a,.jchcp-business-contact>span{
  display:inline-flex;align-items:center;gap:6px;min-width:0;color:#53677f;text-decoration:none;font-size:12.5px;line-height:1.35
}
.jchcp-business-contact>a:hover{color:#245da3}
.jchcp-business-contact .jchcp-icon-sm{color:#7890aa;width:15px;height:15px;flex-basis:15px}
.jchcp-business-address{max-width:560px}
.jchcp-business-legal{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;color:#8290a3;font-size:10.5px;line-height:1.3}
.jchcp-secure-account{
  display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 10px;border-radius:999px;
  background:#f1f8ef;border:1px solid #d9ecd5;color:#397a33;font-size:10.5px;font-weight:850;white-space:nowrap
}
.jchcp-header-buttons{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.jchcp-business-masthead .jchcp-header-actions{display:grid;gap:10px;justify-items:end;align-self:stretch;align-content:space-between;flex:0 0 auto}

@media(max-width:820px){
  .jchcp-business-masthead{padding:19px 18px;gap:17px}
  .jchcp-business-logo{width:70px;height:70px;flex-basis:70px;border-radius:16px}
  .jchcp-business-masthead h1{font-size:21px}
  .jchcp-business-masthead .jchcp-header-actions{justify-items:start;align-self:auto}
  .jchcp-header-buttons{justify-content:flex-start}
}

@media(max-width:600px){
  .jchcp-business-masthead{display:block;padding:17px 15px}
  .jchcp-business-masthead .jchcp-branding{gap:13px}
  .jchcp-business-logo{width:62px;height:62px;flex-basis:62px;border-radius:14px;padding:5px}
  .jchcp-business-masthead h1{font-size:19px}
  .jchcp-business-contact{display:grid;gap:6px;margin-top:2px}
  .jchcp-business-contact>a,.jchcp-business-contact>span{font-size:12px;overflow-wrap:anywhere}
  .jchcp-business-legal{margin-top:2px}
  .jchcp-business-masthead .jchcp-header-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;padding-top:13px;border-top:1px solid #e7edf4}
  .jchcp-secure-account{display:none}
  .jchcp-header-buttons{width:100%;justify-content:space-between}
}


/* Shared JobCardHub login: Customer Portal option */
.jchcp-login-option-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;padding:14px 15px;border:1px solid #cfe3cc;border-radius:14px;background:linear-gradient(180deg,#f8fff7 0%,#f1faef 100%);color:#22324a;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.jchcp-login-option-card:hover,.jchcp-login-option-card:focus{border-color:#9fd198;box-shadow:0 8px 20px rgba(58,166,47,.12);transform:translateY(-1px);text-decoration:none}
.jchcp-login-option-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#e8f7e5;color:#2f8a27;border:1px solid #cfe9ca}
.jchcp-login-option-icon svg{width:19px;height:19px}
.jchcp-login-option-copy{display:grid;gap:2px;min-width:0}
.jchcp-login-option-kicker{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#5c8a56}
.jchcp-login-option-copy strong{font-size:15px;color:#17365d}
.jchcp-login-option-copy small{font-size:11px;line-height:1.4;color:#66768a;font-weight:500}
.jchcp-login-option-arrow{font-size:20px;font-weight:800;color:#3a9b31}
@media(max-width:480px){.jchcp-login-option-card{grid-template-columns:auto minmax(0,1fr);padding:13px}.jchcp-login-option-arrow{display:none}.jchcp-login-option-copy small{font-size:10.5px}}

/* v0.1.5 document actions, account details and full-height PDF stage */
.jchcp-document-subheading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0 10px;padding:0 2px;color:var(--jchcp-navy)}
.jchcp-document-subheading strong{font-size:15px}
.jchcp-document-subheading span{font-size:11.5px;color:var(--jchcp-muted)}
.jchcp-document-subheading.is-credit{margin-top:28px;padding-top:20px;border-top:1px solid #e7edf4}
.jchcp-quote-response-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 14px;padding:14px 16px;border:1px solid #d7e7d4;border-radius:14px;background:#f7fcf5}
.jchcp-quote-response-bar>div:first-child{display:grid;gap:3px}
.jchcp-quote-response-bar strong{color:#244723;font-size:13px}
.jchcp-quote-response-bar span{color:#66786a;font-size:11.5px}
.jchcp-not-proceeding{position:relative}
.jchcp-not-proceeding>summary{list-style:none;min-height:36px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #d4dfeb;background:#fff;border-radius:9px;padding:0 11px;color:#69798c;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.jchcp-not-proceeding>summary::-webkit-details-marker{display:none}
.jchcp-not-proceeding[open]>summary{border-color:#efcbc7;color:#9d4038;background:#fff8f7}
.jchcp-not-proceeding-form{position:absolute;z-index:30;right:0;top:44px;width:min(330px,84vw);padding:14px;border:1px solid #e0e7ef;border-radius:13px;background:#fff;box-shadow:0 18px 44px rgba(18,45,79,.18);text-align:left}
.jchcp-not-proceeding-form label{display:grid;gap:6px;color:#334962;font-size:11.5px;font-weight:800}
.jchcp-not-proceeding-form label small{font-weight:500;color:var(--jchcp-muted)}
.jchcp-not-proceeding-form textarea{width:100%;box-sizing:border-box;resize:vertical}
.jchcp-not-proceeding-form button{width:100%;margin-top:10px}
.jchcp-account-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.85fr);gap:14px;margin-bottom:14px}
.jchcp-account-card-title{padding:15px 18px 12px;border-bottom:1px solid #e8eef5;color:var(--jchcp-navy);font-size:13px;font-weight:850}
.jchcp-account dd small{display:block;margin-top:5px;color:var(--jchcp-muted);font-size:10.5px;line-height:1.45;font-weight:500}
.jchcp-contact-card{overflow:hidden}
.jchcp-contact-list{display:grid}
.jchcp-contact-person{display:grid;gap:3px;padding:14px 16px;border-bottom:1px solid #e8eef5}
.jchcp-contact-person:last-child{border-bottom:0}
.jchcp-contact-person strong{color:var(--jchcp-navy);font-size:13px}
.jchcp-contact-person span{color:#52677f;font-size:11.5px}
.jchcp-contact-person small{color:var(--jchcp-muted);font-size:10.5px;overflow-wrap:anywhere}
.jchcp-empty.compact{margin:14px;padding:18px}
.jchcp-change-request-card{margin-top:14px;overflow:hidden}
.jchcp-change-request-card>p{margin:14px 18px 0;color:var(--jchcp-muted);font-size:12px;line-height:1.5}
.jchcp-change-form{padding-top:16px}
.jchcp-change-history{margin-top:14px;overflow:hidden}
.jchcp-change-history .jchcp-list{gap:0}
.jchcp-change-history-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 18px;border-bottom:1px solid #e8eef5}
.jchcp-change-history-row:last-child{border-bottom:0}
.jchcp-change-history-row>div{display:grid;gap:3px}
.jchcp-change-history-row strong{color:var(--jchcp-navy);font-size:12.5px}
.jchcp-change-history-row span:not(.jchcp-status){color:var(--jchcp-muted);font-size:11px;overflow-wrap:anywhere}
.jchcp-account-footer.standalone{margin-top:14px;border:1px solid var(--jchcp-line);border-radius:14px;background:#fafcfe}
.jchcp-pdf-viewer{height:calc(100vh - 220px)!important;min-height:760px!important;max-height:none!important;overflow:hidden!important}
.jchcp-pdf-viewer iframe{display:block!important;width:100%!important;height:100%!important;min-height:760px!important;max-height:none!important;border:0!important}

@media(max-width:900px){
  .jchcp-account-grid{grid-template-columns:1fr}
  .jchcp-quote-response-bar{align-items:flex-start}
}
@media(max-width:600px){
  .jchcp-document-subheading{display:grid}
  .jchcp-quote-response-bar{display:grid}
  .jchcp-not-proceeding-form{position:fixed;left:12px;right:12px;top:auto;bottom:12px;width:auto}
  .jchcp-pdf-viewer{height:calc(100dvh - 220px)!important;min-height:520px!important}
  .jchcp-pdf-viewer iframe{min-height:520px!important}
  .jchcp-change-history-row{align-items:flex-start}
}
.jchcp-status--resolved{background:#eef9ec;color:#317c2b;border-color:#d4ebd0}
.jchcp-status--rejected{background:#fff1f0;color:#a13b32;border-color:#f2d3d0}

/* Customer Portal v0.1.6 refinements */
.jchcp-shell--auth{max-width:720px!important;margin:26px auto!important;padding:0 18px!important}
.jchcp-shell--auth .jchcp-auth-wrap{width:min(100%,560px)!important;max-width:560px!important;margin:0 auto!important}
.jchcp-shell--auth .jchcp-auth-card{width:100%!important;max-width:560px!important}
@media(max-width:620px){
  .jchcp-shell--auth{margin:14px auto!important;padding:0 12px!important}
  .jchcp-shell--auth .jchcp-auth-wrap,.jchcp-shell--auth .jchcp-auth-card{width:100%!important;max-width:100%!important}
}

/* Customer Portal v0.1.9 — fit-to-width PDF viewer */
.jchcp-document-viewer-head{
  display:grid;
  gap:12px;
  margin:0 0 14px;
  padding:14px 16px;
  border:1px solid var(--jchcp-line);
  border-radius:14px;
  background:#f8fbfe;
}
.jchcp-document-viewer-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.jchcp-viewer-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  padding:9px 13px;
  border:1px solid #cfdceb;
  border-radius:999px;
  background:#fff;
  color:#274f86;
  text-decoration:none;
  font:inherit;
  font-size:12.5px;
  font-weight:850;
  line-height:1;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(18,45,79,.04);
  -webkit-tap-highlight-color:transparent;
}
.jchcp-viewer-action:hover,.jchcp-viewer-action:focus{
  border-color:#8fb2e3;
  background:#f4f8fd;
  color:#174f9e;
  outline:none;
}
.jchcp-viewer-action:disabled{opacity:.55;cursor:wait}
.jchcp-document-viewer-title{display:grid;gap:3px;min-width:0}
.jchcp-document-viewer-title strong{
  color:var(--jchcp-navy);
  font-size:16px;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.jchcp-pdf-stage{
  width:100%;
  min-width:0;
  margin:0;
  padding:10px;
  border:1px solid #dbe5f1;
  border-radius:14px;
  background:#eaf1f8;
  overflow:hidden;
  box-sizing:border-box;
}
.jchcp-pdf-canvas-list{
  width:100%;
  max-width:980px;
  margin:0 auto;
}
.jchcp-pdf-page{
  width:100%;
  margin:0 auto 10px;
  border:1px solid #d7e1ec;
  border-radius:4px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 7px 20px rgba(15,23,42,.09);
}
.jchcp-pdf-page:last-child{margin-bottom:0}
.jchcp-pdf-page canvas{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  margin:0;
  background:#fff;
}
.jchcp-pdf-loading,.jchcp-pdf-error{
  max-width:620px;
  margin:24px auto;
  padding:18px;
  border:1px solid #dbe5f1;
  border-radius:12px;
  background:#fff;
  color:#5b6f86;
  text-align:center;
  font-size:13px;
  line-height:1.5;
}
.jchcp-pdf-error{display:grid;justify-items:center;gap:7px}
.jchcp-pdf-error[hidden],.jchcp-pdf-loading[hidden]{display:none!important}
.jchcp-pdf-error strong{color:var(--jchcp-navy);font-size:14px}
.jchcp-pdf-error .jchcp-viewer-action{margin-top:4px}

@media(max-width:600px){
  .jchcp-document-viewer-head{
    margin-left:-4px;
    margin-right:-4px;
    padding:11px 10px;
    border-radius:12px;
  }
  .jchcp-document-viewer-actions{
    flex-wrap:nowrap;
    gap:6px;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .jchcp-document-viewer-actions::-webkit-scrollbar{display:none}
  .jchcp-viewer-action{
    flex:0 0 auto;
    min-height:38px;
    padding:8px 10px;
    font-size:12px;
  }
  .jchcp-viewer-action .jchcp-icon-sm{width:15px;height:15px}
  .jchcp-document-viewer-title strong{font-size:15px}
  .jchcp-pdf-stage{
    margin-left:-4px;
    margin-right:-4px;
    width:calc(100% + 8px);
    padding:6px;
    border-radius:10px;
  }
  .jchcp-pdf-page{margin-bottom:7px;box-shadow:0 4px 12px rgba(15,23,42,.08)}
}


/* Customer Portal v0.1.10 — data presentation and mobile refinement */
.jchcp-statement-type{
  display:inline-flex;align-items:center;min-height:23px;padding:0 7px;border-radius:999px;
  background:#f1f5f9;border:1px solid #e1e8ef;color:#64748b;font-size:9.5px;font-weight:850
}
.jchcp-amount.is-credit{color:#2f7f29}
.jchcp-statement-running-balance{display:block;color:#7a899c;font-size:10.5px;font-weight:700;white-space:nowrap}

@media(max-width:600px){
  .jchcp-shell{padding:0 8px;margin:8px auto}
  .jchcp-app{border-radius:16px}
  .jchcp-business-masthead{padding:13px 12px!important}
  .jchcp-business-masthead .jchcp-branding{gap:10px!important;align-items:flex-start!important}
  .jchcp-business-logo{width:48px!important;height:48px!important;flex-basis:48px!important;border-radius:12px!important;padding:4px!important}
  .jchcp-business-overline{font-size:8.5px!important;gap:5px!important;letter-spacing:.06em!important}
  .jchcp-powered-badge{min-height:18px!important;padding:0 6px!important;font-size:8px!important}
  .jchcp-business-masthead h1{font-size:17px!important;line-height:1.16!important;letter-spacing:-.015em!important}
  .jchcp-business-contact{display:flex!important;gap:4px 10px!important;margin-top:1px!important}
  .jchcp-business-contact>a,.jchcp-business-contact>span{font-size:10.5px!important;line-height:1.25!important}
  .jchcp-business-address{flex-basis:100%;max-width:none!important}
  .jchcp-business-legal{display:none!important}
  .jchcp-business-masthead .jchcp-header-actions{margin-top:10px!important;padding-top:9px!important}
  .jchcp-header-link,.jchcp-link-button{min-height:34px!important;padding:0 10px!important;font-size:11px!important}

  .jchcp-nav{gap:14px!important;padding:0 12px!important;overflow-x:auto!important;scrollbar-width:none!important;background:#fbfcfe!important}
  .jchcp-nav::-webkit-scrollbar{display:none!important}
  .jchcp-nav a{position:relative;padding:11px 0 10px!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font-size:11.5px!important}
  .jchcp-nav a.is-active{color:#1d4ed8!important;background:transparent!important;box-shadow:none!important}
  .jchcp-nav a.is-active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:2px;background:#2563eb}

  .jchcp-main{padding:12px!important}
  .jchcp-welcome{padding:16px!important;margin-bottom:12px!important;border-radius:15px!important}
  .jchcp-welcome h1{font-size:21px!important;margin:4px 0 5px!important}
  .jchcp-welcome p{font-size:12px!important;line-height:1.4!important}
  .jchcp-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .jchcp-quick-card{min-height:96px!important;padding:13px!important;border-radius:14px!important;gap:10px!important}
  .jchcp-quick-card.is-accent{grid-column:1/-1!important;min-height:82px!important}
  .jchcp-quick-icon{width:32px!important;height:32px!important;border-radius:9px!important}
  .jchcp-quick-card strong{font-size:14px!important;margin-bottom:3px!important}
  .jchcp-quick-card p{font-size:10.5px!important;line-height:1.35!important}

  .jchcp-section-head{align-items:flex-start!important;margin-bottom:12px!important}
  .jchcp-section-head h2{font-size:21px!important}
  .jchcp-section-head p{font-size:11.5px!important;line-height:1.4!important}
  .jchcp-document-subheading{gap:4px!important;padding:0 2px!important}
  .jchcp-row{padding:15px!important;border-radius:13px!important;gap:12px!important}
  .jchcp-row-titleline>strong{font-size:15px!important}
  .jchcp-row-right{gap:8px!important}
  .jchcp-amount{font-size:17px!important}
  .jchcp-actions{gap:6px!important}
  .jchcp-actions a,.jchcp-actions button{min-height:35px!important;padding:0 10px!important;width:auto!important}
  .jchcp-status{width:auto!important;justify-self:start!important;align-self:start!important}
  .jchcp-empty{padding:22px 14px!important}

  .jchcp-statement-summary{padding:16px!important;border-radius:14px!important}
  .jchcp-balance strong{font-size:24px!important}
  .jchcp-statement-row .jchcp-row-right{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;flex-direction:column!important}
}


/* Customer Portal v0.1.11 — mobile navigation, masthead and PDF toolbar cleanup */
@media(max-width:700px){
  .jchcp-business-masthead{
    display:block;
    padding:14px 12px!important;
  }
  .jchcp-business-masthead .jchcp-branding{
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    column-gap:10px!important;
    align-items:start!important;
  }
  .jchcp-business-logo{
    width:44px!important;
    height:44px!important;
    flex-basis:44px!important;
    border-radius:12px!important;
    padding:4px!important;
  }
  .jchcp-business-masthead .jchcp-brand-copy{
    gap:4px!important;
    min-width:0!important;
    padding-top:0!important;
  }
  .jchcp-business-overline{
    gap:5px!important;
    font-size:8px!important;
    letter-spacing:.055em!important;
  }
  .jchcp-powered-badge{
    min-height:18px!important;
    padding:0 6px!important;
    font-size:8px!important;
  }
  .jchcp-business-masthead h1{
    margin:0!important;
    max-width:none!important;
    font-size:15.5px!important;
    line-height:1.12!important;
    letter-spacing:-.012em!important;
    text-wrap:balance;
  }
  .jchcp-business-contact{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;
    margin-top:2px!important;
  }
  .jchcp-business-contact > a,
  .jchcp-business-contact > span{
    min-width:0!important;
    font-size:10.5px!important;
    line-height:1.24!important;
  }
  .jchcp-business-address{
    max-width:none!important;
  }
  .jchcp-business-masthead .jchcp-header-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    margin-top:10px!important;
    padding-top:10px!important;
    border-top:1px solid #e7edf4!important;
  }
  .jchcp-header-buttons{
    width:100%!important;
    justify-content:stretch!important;
    gap:8px!important;
  }
  .jchcp-header-buttons > *{
    flex:1 1 0!important;
  }
  .jchcp-header-link,
  .jchcp-link-button,
  .jchcp-header-buttons .jchcp-inline-form,
  .jchcp-header-buttons .jchcp-inline-form > *{
    width:100%!important;
  }

  .jchcp-nav{
    display:grid!important;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px!important;
    padding:10px 12px!important;
    overflow:visible!important;
    background:#fbfcfe!important;
  }
  .jchcp-nav a{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    min-height:42px!important;
    padding:10px 8px!important;
    border-radius:12px!important;
    border:1px solid #dbe5f1!important;
    background:#fff!important;
    color:#5d7086!important;
    font-size:11px!important;
    line-height:1.15!important;
    text-align:center!important;
    box-shadow:none!important;
    white-space:nowrap!important;
  }
  .jchcp-nav a .jchcp-icon-sm{
    width:15px!important;
    height:15px!important;
    flex:0 0 15px!important;
  }
  .jchcp-nav a.is-active{
    background:#eef4ff!important;
    border-color:#cfe0ff!important;
    color:#1d4ed8!important;
    box-shadow:inset 0 0 0 1px #d8e6ff!important;
  }
  .jchcp-nav a.is-active:after{display:none!important}

  .jchcp-document-viewer-head{
    margin-left:0!important;
    margin-right:0!important;
    padding:12px!important;
    border-radius:12px!important;
  }
  .jchcp-document-viewer-actions{
    display:grid!important;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px!important;
    width:100%!important;
    overflow:visible!important;
  }
  .jchcp-viewer-action{
    width:100%!important;
    min-width:0!important;
    min-height:40px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
  .jchcp-document-viewer-title strong{
    font-size:14px!important;
    line-height:1.25!important;
  }
}

@media(max-width:420px){
  .jchcp-nav{
    grid-template-columns:repeat(2, minmax(0, 1fr))!important;
  }
  .jchcp-nav a{
    white-space:normal!important;
  }
}
