
:root{
  --caip-ink:#17191a;
  --caip-ink-soft:#242624;
  --caip-paper:#f1ede5;
  --caip-paper-2:#e8e1d6;
  --caip-line:#c9c0b3;
  --caip-bronze:#9a7440;
  --caip-bronze-deep:#7f5d32;
  --caip-white:#f8f4ec;
  --caip-muted:#6f6a62;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--caip-ink)}
html{margin-top:0!important}
body.mch-login-page{
  min-height:100vh;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  color:var(--caip-ink);
  overflow:hidden;
}
body.mch-login-page #wpadminbar{display:none!important}

.caip-login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,56%) minmax(440px,44%);
}

/* LEFT — institutional identity */
.caip-login-identity{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  color:var(--caip-white);
  background:#141715;
}
.caip-login-photo{
  position:absolute;
  inset:0;
  background:
    url("../images/mch-statue.webp") 68% 35%/cover no-repeat;
  filter:saturate(.56) sepia(.16) contrast(1.03);
  transform:scale(1.015);
}
.caip-login-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(9,10,10,.94) 0%,rgba(15,16,15,.86) 31%,rgba(16,17,16,.45) 59%,rgba(16,17,16,.16) 76%,rgba(16,17,16,.34) 100%),
    linear-gradient(0deg,rgba(8,9,9,.92) 0%,rgba(8,9,9,.18) 38%,rgba(8,9,9,.15) 72%,rgba(8,9,9,.42) 100%);
}
.caip-identity-top,
.caip-identity-copy,
.caip-identity-foot{
  position:relative;
  z-index:2;
}
.caip-identity-top{
  padding:4.2vh 4.6vw 0;
}
.caip-brand-lockup{
  display:flex;
  align-items:center;
  gap:16px;
}
.caip-brand-emblem{
  width:54px;
  height:54px;
  fill:none;
  stroke:#b88b4b;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.caip-brand-lockup>div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.caip-brand-lockup span{
  font-size:14px;
  line-height:1.25;
  letter-spacing:.24em;
  color:#d8d0c5;
}

.caip-identity-copy{
  width:min(620px,74%);
  margin:10vh 0 0 4.6vw;
}
.caip-identity-copy h1{
  margin:0;
  max-width:620px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(47px,5vw,82px);
  font-weight:400;
  line-height:.93;
  letter-spacing:-.035em;
  color:#f6f1e9;
}
.caip-identity-copy h1 strong{
  display:inline-block;
  margin-top:7px;
  font-weight:400;
  color:#d1a15d;
}
.caip-purpose-rule{
  width:72px;
  height:1px;
  margin:30px 0 27px;
  background:#b5894b;
}
.caip-identity-copy h2{
  margin:0 0 15px;
  max-width:560px;
  font:400 clamp(23px,2vw,34px)/1.16 Georgia,"Times New Roman",serif;
  color:#f5f0e8;
}
.caip-purpose{
  margin:0;
  max-width:590px;
  color:#ddd7ce;
  font-size:15px;
  line-height:1.62;
}
.caip-scope{
  margin:22px 0 0;
  max-width:600px;
  color:#c1b9ae;
  font-size:14px;
  line-height:1.7;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.caip-intelligence-statement{
  max-width:560px;
  margin-top:26px;
  padding:14px 0 0 17px;
  border-left:1px solid rgba(190,145,79,.72);
}
.caip-intelligence-statement span{
  display:block;
  margin-bottom:6px;
  color:#c89a58;
  font-size:14px;
  font-weight:800;
  letter-spacing:.19em;
}
.caip-intelligence-statement p{
  margin:0;
  color:#cfc8be;
  font:italic 14px/1.52 Georgia,"Times New Roman",serif;
}
.caip-identity-foot{
  position:absolute;
  left:4.6vw;
  bottom:4.3vh;
  display:flex;
  align-items:center;
  gap:12px;
  color:#c8c0b5;
  font-size:14px;
  letter-spacing:.24em;
}
.caip-identity-foot i{
  width:34px;
  height:1px;
  background:rgba(184,139,75,.66);
}

/* RIGHT — warm paper access surface */
.caip-login-access{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  background:
    linear-gradient(135deg,#f3efe8 0%,#ede7dd 48%,#e8e0d5 100%);
  border-left:1px solid rgba(105,89,67,.28);
}
.caip-paper-pattern{
  position:absolute;
  inset:0;
  opacity:.45;
  pointer-events:none;
  background:
    radial-gradient(circle at 88% 19%,rgba(144,112,68,.08) 0 1px,transparent 1.5px),
    radial-gradient(circle at 78% 74%,rgba(91,76,58,.045) 0 1px,transparent 1.4px),
    repeating-linear-gradient(103deg,transparent 0 23px,rgba(112,95,72,.018) 24px,transparent 25px);
}
.caip-access-inner{
  position:relative;
  z-index:2;
  width:min(560px,76%);
  min-height:100vh;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:54px 0 32px;
}
.caip-login-language{
  position:absolute;
  top:6.2vh;
  right:0;
  display:flex;
  gap:23px;
  align-items:center;
}
.caip-login-language button{
  position:relative;
  border:0;
  padding:0 0 8px;
  background:transparent;
  color:#77726b;
  font:700 14px/1 Inter,system-ui,sans-serif;
  cursor:pointer;
}
.caip-login-language button:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  transform:scaleX(0);
  background:#8e6736;
  transition:transform .16s ease;
}
.caip-login-language button.is-active{
  color:#76542d;
}
.caip-login-language button.is-active:after{
  transform:scaleX(1);
}

.caip-access-head{
  margin-bottom:34px;
}
.caip-access-head h2{
  margin:0 0 7px;
  color:#181a19;
  font:400 clamp(38px,3.4vw,54px)/1 Georgia,"Times New Roman",serif;
  letter-spacing:-.025em;
}
.caip-access-head p{
  margin:0;
  color:#777168;
  font-size:14px;
  line-height:1.45;
}

.caip-login-error{
  margin:-7px 0 22px;
  padding:11px 13px;
  border-left:3px solid #a65f3b;
  background:rgba(166,95,59,.08);
  color:#7a3525;
  font-size:14px;
  line-height:1.45;
}

.caip-login-form{
  width:100%;
}
.caip-login-field{
  display:block;
  margin-bottom:20px;
}
.caip-login-field>span:first-child{
  display:block;
  margin-bottom:8px;
  color:#252724;
  font-size:14px;
  font-weight:700;
}
.caip-input-shell{
  position:relative;
  height:56px;
  display:flex;
  align-items:center;
  border:1px solid #c7beb1;
  border-radius:2px;
  background:rgba(249,246,240,.72);
  transition:border-color .15s ease,background .15s ease;
}
.caip-input-shell:focus-within{
  border-color:#98703c;
  background:#fbf9f5;
  box-shadow:inset 3px 0 #9a7440;
}
.caip-input-shell>svg{
  flex:0 0 auto;
  width:20px;
  height:20px;
  margin:0 14px 0 17px;
  fill:none;
  stroke:#353936;
  stroke-width:1.45;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.caip-input-shell input{
  flex:1;
  min-width:0;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#1e211f;
  font:400 14px/1 Inter,system-ui,sans-serif;
  padding:0 47px 0 0;
}
.caip-input-shell input::placeholder{
  color:#969087;
}
.caip-password-toggle{
  position:absolute;
  right:8px;
  top:50%;
  width:38px;
  height:38px;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  color:#6d6a64;
  cursor:pointer;
  padding:8px;
}
.caip-password-toggle svg{
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
}

.caip-login-options{
  margin:0 0 27px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}
.caip-remember{
  display:flex;
  align-items:center;
  gap:9px;
  color:#3c3e3b;
  font-size:14px;
  cursor:pointer;
}
.caip-remember input{
  position:absolute;
  opacity:0;
}
.caip-checkbox-ui{
  width:18px;
  height:18px;
  border:1px solid #9e9589;
  border-radius:2px;
  background:#f8f5ef;
}
.caip-remember input:checked+.caip-checkbox-ui{
  position:relative;
  border-color:#9a7440;
  background:#9a7440;
}
.caip-remember input:checked+.caip-checkbox-ui:after{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:5px;
  height:9px;
  border:solid #fff;
  border-width:0 1.5px 1.5px 0;
  transform:rotate(45deg);
}
.caip-login-options a{
  color:#79572f;
  font-size:14px;
  text-decoration:none;
}
.caip-login-options a:hover{
  text-decoration:underline;
}

.caip-signin-button{
  width:100%;
  height:56px;
  border:1px solid #866131;
  border-radius:2px;
  background:#9a7440;
  color:#fffdf8;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  cursor:pointer;
  font:800 14px/1 Inter,system-ui,sans-serif;
  letter-spacing:.12em;
}
.caip-signin-button:hover{
  background:#856130;
  border-color:#755329;
}
.caip-signin-button svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.caip-access-security{
  margin-top:30px;
  padding-top:22px;
  border-top:1px solid #ccc3b7;
  display:grid;
  grid-template-columns:30px 1fr;
  gap:12px;
  align-items:center;
}
.caip-access-security>svg{
  width:24px;
  height:24px;
  fill:none;
  stroke:#8c6737;
  stroke-width:1.4;
}
.caip-access-security div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.caip-access-security strong{
  color:#343632;
  font-size:14px;
  font-weight:700;
}
.caip-access-security span{
  color:#7a756d;
  font-size:14px;
  line-height:1.35;
}

.caip-access-footer{
  margin-top:auto;
  padding-top:28px;
  border-top:1px solid #d4ccc0;
  display:flex;
  justify-content:space-between;
  gap:18px;
  color:#8a847b;
  font-size:14px;
  line-height:1.4;
}

/* Responsive */
@media(max-width:1180px){
  .caip-login-shell{grid-template-columns:52% 48%}
  .caip-identity-copy{width:82%;margin-top:8vh}
  .caip-access-inner{width:82%}
}
@media(max-width:900px){
  body.mch-login-page{overflow:auto}
  .caip-login-shell{display:block}
  .caip-login-identity{min-height:46vh}
  .caip-login-photo{background-position:70% 30%}
  .caip-login-shade{
    background:linear-gradient(90deg,rgba(9,10,10,.91),rgba(12,13,12,.52) 70%,rgba(12,13,12,.30));
  }
  .caip-identity-top{padding:28px 28px 0}
  .caip-brand-emblem{width:43px;height:43px}
  .caip-identity-copy{width:min(620px,80%);margin:6vh 0 0 28px}
  .caip-identity-copy h1{font-size:clamp(40px,9vw,62px)}
  .caip-purpose{font-size:14px}
  .caip-scope,.caip-intelligence-statement{display:none}
  .caip-identity-foot{display:none}
  .caip-login-access{min-height:54vh}
  .caip-access-inner{width:min(560px,calc(100% - 44px));min-height:auto;padding:86px 0 32px}
  .caip-login-language{top:28px;right:0}
}
@media(max-width:560px){
  .caip-login-identity{min-height:40vh}
  .caip-brand-lockup>div{display:none}
  .caip-identity-copy{width:calc(100% - 48px);margin:5vh 24px 0}
  .caip-product-kicker{font-size:14px}
  .caip-identity-copy h1{font-size:40px}
  .caip-identity-copy h2{font-size:21px}
  .caip-purpose{display:none}
  .caip-access-inner{width:calc(100% - 34px);padding-top:80px}
  .caip-access-head h2{font-size:39px}
  .caip-login-options{align-items:flex-start;flex-direction:column}
  .caip-access-footer{flex-direction:column}
}
