/* CODSHIPX_AI_R70_B4_R1_INTELLIGENCE_UI_POLISH */

:root{
  --cx70-text:#17324e;
  --cx70-body:#40566c;
  --cx70-muted:#7d8ea0;
  --cx70-line:#dfe7ee;
  --cx70-soft:#f7fafc;
  --cx70-lime:#8bdc0d;
  --cx70-green:#16a34a;
  --cx70-red:#ef4444;
  --cx70-amber:#d97706;
}

html.cx70-open{overflow:hidden!important}
.cx70-hide{display:none!important}

/* Global readability for the intelligence surfaces */
.cx70-modal,
.cx70-customer,
.cx-r67-360{
  font-family:Inter,"Noto Sans Sinhala","Nirmala UI",system-ui,-apple-system,"Segoe UI",sans-serif!important;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

/* Product row affordance */
.cx-r70-product-row{
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.cx-r70-product-row:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 28px rgba(15,23,42,.08);
  border-color:#cfdbe5!important;
}
.cx-r70-product-row:focus-visible{
  outline:2px solid rgba(139,220,13,.82);
  outline-offset:2px;
}
.cx-r70-product-row .r63-row-actions{cursor:default}

/* Backdrop + modal */
.cx70-backdrop{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(6,15,28,.54);
  backdrop-filter:blur(15px) saturate(.88);
  -webkit-backdrop-filter:blur(15px) saturate(.88);
}
.cx70-modal{
  width:min(1220px,calc(100vw - 34px));
  max-height:min(93vh,980px);
  overflow:auto;
  padding:0 24px 26px;
  border:1px solid #d5e0e8;
  border-radius:26px;
  background:linear-gradient(160deg,#fff 0%,#fbfdfa 54%,#f7fafc 100%);
  box-shadow:0 34px 110px rgba(2,12,27,.34);
  scrollbar-width:thin;
  scrollbar-color:#aebcca transparent;
}
.cx70-head{
  position:sticky;
  top:0;
  z-index:15;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:0 -24px 18px;
  padding:18px 24px 16px;
  border-bottom:1px solid rgba(218,228,236,.96);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.cx70-head>div>span,
.cx70-chead>div>span,
.cx70-tools>div>span,
.cx70-chartbox header span{
  display:block;
  margin-bottom:6px;
  color:#74879a;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.105em;
}
.cx70-head h2{
  margin:0;
  color:var(--cx70-text);
  font-size:25px;
  line-height:1.18;
  letter-spacing:-.02em;
}
.cx70-head p{
  margin:7px 0 0;
  color:#75879a;
  font-size:13px;
  line-height:1.55;
}
.cx70-head>button{
  width:44px;
  height:44px;
  flex:0 0 44px;
  border:1px solid #d8e2ea;
  border-radius:14px;
  background:#fff;
  color:#53697f;
  font-size:27px;
  cursor:pointer;
  box-shadow:0 5px 14px rgba(15,23,42,.05);
}
.cx70-head>button:hover{background:#f7fafc;border-color:#cbd8e3}

/* Product hero */
.cx70-hero{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:20px;
  margin-top:4px;
}
.cx70-photo{
  min-height:170px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #dce5ec;
  border-radius:20px;
  background:linear-gradient(145deg,#f8fafc,#eef3f6);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7);
}
.cx70-photo img{width:100%;height:100%;display:block;object-fit:cover}
.cx70-photo b{color:#718197;font-size:34px}
.cx70-facts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.cx70-facts>span{
  min-height:78px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:13px 15px;
  border:1px solid #e0e8ee;
  border-radius:15px;
  background:rgba(255,255,255,.94);
  box-shadow:0 6px 18px rgba(15,23,42,.035);
}
.cx70-facts small,.cx70-metrics small,.cx70-cmetrics small{
  color:#7d8fa1;
  font-size:11px;
  font-weight:800;
  line-height:1.3;
}
.cx70-facts strong{
  margin-top:6px;
  color:#203850;
  font-size:14px;
  line-height:1.35;
  text-transform:capitalize;
}

/* Metrics */
.cx70-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:15px;
}
.cx70-metrics article{
  min-height:105px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:14px 15px;
  border:1px solid #e0e8ef;
  border-radius:15px;
  background:#fff;
  box-shadow:0 7px 18px rgba(15,23,42,.035);
}
.cx70-metrics strong{
  margin-top:6px;
  color:var(--cx70-text);
  font-size:20px;
  line-height:1.15;
  text-transform:capitalize;
}
.cx70-metrics span{
  margin-top:6px;
  color:#7d8fa1;
  font-size:11px;
  line-height:1.4;
}

/* Chart */
.cx70-chartbox{
  margin-top:15px;
  padding:18px;
  border:1px solid #dfe7ee;
  border-radius:18px;
  background:#fff;
  box-shadow:0 7px 20px rgba(15,23,42,.035);
}
.cx70-chartbox>header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:10px;
}
.cx70-chartbox h3{
  margin:0;
  color:#203a54;
  font-size:16px;
  line-height:1.3;
}
.cx70-range,.cx70-ctools,.cx70-tools>div:last-child{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}
.cx70-range button,.cx70-ctools button,.cx70-tools button{
  min-height:36px;
  padding:0 13px;
  border:1px solid #d9e3ea;
  border-radius:10px;
  background:#fff;
  color:#61758a;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.cx70-range button:hover,.cx70-ctools button:hover,.cx70-tools button:hover{transform:translateY(-1px);border-color:#c7d7e1}
.cx70-range button.active,.cx70-ctools button.active,.cx70-tools button.active{
  border-color:#b4da78;
  background:#edf8dc;
  color:#4c770e;
}
.cx70-chart svg{width:100%;height:190px;margin-top:8px;overflow:visible}
.cx70-axis{stroke:#e1e7ed;stroke-width:1}
.cx70-line{fill:none;stroke:#17324e;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.cx70-dot{fill:var(--cx70-lime);stroke:#fff;stroke-width:2}
.cx70-proj{fill:none;stroke:#8697a8;stroke-width:2;stroke-dasharray:7 7}
.cx70-chart-legend{
  display:flex;
  justify-content:center;
  gap:18px;
  margin-top:2px;
  color:#6f8295;
  font-size:11px;
  font-weight:700;
}
.cx70-chart-legend span{display:flex;align-items:center;gap:6px}
.cx70-chart-legend i{display:inline-block;width:22px;height:2px;background:#17324e}
.cx70-chart-legend i.projected{height:0;background:transparent;border-top:2px dashed #8697a8}
.cx70-chart>small{
  display:block;
  margin-top:7px;
  color:#8a9aa9;
  font-size:10.5px;
  line-height:1.4;
  text-align:center;
}
.cx70-empty{
  min-height:132px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px dashed #d9e4eb;
  border-radius:14px;
  background:#fafcfd;
  text-align:center;
}
.cx70-empty-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eff7e3;
  color:#568311;
  font-size:16px;
  font-weight:900;
}
.cx70-empty strong{color:#53687c;font-size:14px}
.cx70-empty span{color:#8798a9;font-size:12px;line-height:1.45}
.cx70-lowdata{
  min-height:122px;
  display:grid;
  grid-template-columns:minmax(190px,.8fr) minmax(260px,1.5fr);
  gap:16px;
  align-items:center;
  padding:17px;
  border:1px dashed #d9e4eb;
  border-radius:14px;
  background:linear-gradient(135deg,#fbfdf9,#f7fafc);
}
.cx70-lowdata-stat{display:flex;align-items:center;gap:12px}
.cx70-lowdata-dot{
  width:14px;
  height:14px;
  flex:0 0 14px;
  border-radius:50%;
  background:var(--cx70-lime);
  box-shadow:0 0 0 7px rgba(139,220,13,.12);
}
.cx70-lowdata-stat small,.cx70-lowdata-stat strong,.cx70-lowdata-stat em{display:block}
.cx70-lowdata-stat small{color:#7e90a1;font-size:11px}
.cx70-lowdata-stat strong{margin-top:2px;color:#17324e;font-size:22px}
.cx70-lowdata-stat em{margin-top:1px;color:#7a8c9f;font-size:11px;font-style:normal}
.cx70-lowdata-copy strong,.cx70-lowdata-copy span{display:block}
.cx70-lowdata-copy strong{color:#344d64;font-size:14px;line-height:1.45}
.cx70-lowdata-copy span{margin-top:5px;color:#8192a3;font-size:12px;line-height:1.5}

/* Codi toolbar */
.cx70-codi{margin-top:16px}
.cx70-tools{
  position:sticky;
  top:79px;
  z-index:12;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin:0 -2px 10px;
  padding:10px 2px;
  background:rgba(249,252,250,.94);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.cx70-tools strong{color:#294159;font-size:13px}

/* Main Codi card */
.cx70-card,.cx70-customer{
  position:relative;
  overflow:hidden;
  border:1px solid #dce5ec;
  border-radius:20px;
  background:#fff;
  padding:21px;
}
.cx70-customer{margin-top:16px}
.cx70-card::before,.cx70-customer::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#cad5de;
}
@keyframes cx70green{0%,100%{box-shadow:0 10px 30px rgba(22,163,74,.03)}50%{box-shadow:0 12px 38px rgba(22,163,74,.12)}}
@keyframes cx70red{0%,100%{box-shadow:0 10px 30px rgba(239,68,68,.03)}50%{box-shadow:0 12px 38px rgba(239,68,68,.12)}}
.signal-positive.cx70-card,.cx70-customer.signal-positive{
  border-color:rgba(22,163,74,.33);
  background:linear-gradient(155deg,#fff 0%,#fbfffc 72%,#f3fff6 100%);
  animation:cx70green 3.6s ease-in-out infinite;
}
.signal-positive.cx70-card::before,.cx70-customer.signal-positive::before{background:var(--cx70-green)}
.signal-risk.cx70-card,.cx70-customer.signal-risk{
  border-color:rgba(239,68,68,.32);
  background:linear-gradient(155deg,#fff 0%,#fffdfd 72%,#fff5f5 100%);
  animation:cx70red 3.6s ease-in-out infinite;
}
.signal-risk.cx70-card::before,.cx70-customer.signal-risk::before{background:var(--cx70-red)}
.signal-mixed.cx70-card,.cx70-customer.signal-mixed{
  border-color:rgba(217,119,6,.30);
  background:linear-gradient(155deg,#fff 0%,#fffefa 72%,#fff9ef 100%);
}
.signal-mixed.cx70-card::before,.cx70-customer.signal-mixed::before{background:var(--cx70-amber)}

.cx70-card>header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding-bottom:15px;
  border-bottom:1px solid #e6edf2;
}
.cx70-id{display:flex;align-items:center;gap:12px}
.cx70-orb{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:inline-block;
  border-radius:50%;
  background:radial-gradient(circle at 32% 28%,#fff,#ddffa7 19%,#8bdc0d 48%,#1d3853 100%);
  box-shadow:0 0 0 6px rgba(139,220,13,.10),0 0 24px rgba(139,220,13,.24);
}
.signal-risk .cx70-orb{
  background:radial-gradient(circle at 32% 28%,#fff,#fecaca 19%,#ef4444 49%,#4d1720 100%);
  box-shadow:0 0 0 6px rgba(239,68,68,.10),0 0 24px rgba(239,68,68,.22);
}
.signal-mixed .cx70-orb{
  background:radial-gradient(circle at 32% 28%,#fff,#fde7be 19%,#d97706 49%,#5b3410 100%);
  box-shadow:0 0 0 6px rgba(217,119,6,.10),0 0 24px rgba(217,119,6,.18);
}
.cx70-id small,.cx70-id strong{display:block}
.cx70-id small{color:#7e8fa0;font-size:11px;font-weight:800}
.cx70-id strong{margin-top:3px;color:#294159;font-size:14px;line-height:1.35}
.cx70-badges{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.cx70-badges span{
  padding:7px 10px;
  border:1px solid #dce5ec;
  border-radius:999px;
  background:rgba(255,255,255,.88);
  color:#667a8e;
  font-size:10.5px;
  font-weight:800;
  text-transform:capitalize;
}
.cx70-summary-block{padding:18px 2px 2px}
.cx70-summary-block h3{
  margin:0;
  max-width:940px;
  color:#17314d;
  font-size:21px;
  line-height:1.38;
  letter-spacing:-.012em;
}
.cx70-summary-block p{
  margin:9px 0 0;
  max-width:980px;
  color:#4e6378;
  font-size:14px;
  line-height:1.72;
}
.cx70-section-label{
  color:#6f8294;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.cx70-card>p{color:#40566c;font-size:14px;line-height:1.72}
.cx70-rec{
  margin-top:15px;
  padding:16px 17px;
  border:1px solid #dce5ec;
  border-radius:14px;
  background:rgba(255,255,255,.88);
  box-shadow:0 6px 18px rgba(15,23,42,.025);
}
.cx70-rec small,.cx70-impact small,.cx70-imgad small{
  color:#718497;
  font-size:11px;
  font-weight:900;
}
.cx70-rec p,.cx70-impact p{
  margin:7px 0 0;
  color:#344b62;
  font-size:14px;
  line-height:1.7;
}
.cx70-evidence-block,.cx70-actions{margin-top:17px}
.cx70-why{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-top:9px;
}
.cx70-why>span{
  min-height:76px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:11px 12px;
  border:1px solid #dfe6ec;
  border-radius:12px;
  background:rgba(255,255,255,.88);
}
.cx70-why .good{border-color:rgba(22,163,74,.28);background:#fbfffc}
.cx70-why .bad{border-color:rgba(239,68,68,.28);background:#fffdfd}
.cx70-why small{color:#708397;font-size:10.5px;line-height:1.35}
.cx70-why strong{margin-top:5px;color:#294159;font-size:13px;line-height:1.42}
.cx70-actions ol{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin:9px 0 0;
  padding:0;
  list-style:none;
  counter-reset:cx70action;
}
.cx70-actions li{
  counter-increment:cx70action;
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:10px;
  align-items:start;
  margin:0;
  padding:12px;
  border:1px solid #dfe7ed;
  border-radius:12px;
  background:rgba(255,255,255,.82);
}
.cx70-actions li>span::before{
  content:counter(cx70action);
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#edf7dd;
  color:#568311;
  font-size:11px;
  font-weight:900;
}
.cx70-actions li p{
  margin:1px 0 0;
  color:#344b62;
  font-size:13.5px;
  line-height:1.58;
}
.cx70-impact{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:17px;
}
.cx70-impact>section{
  padding:14px;
  border:1px solid #dfe7ed;
  border-radius:13px;
  background:rgba(255,255,255,.84);
}
.cx70-impact .impact-good{border-color:rgba(22,163,74,.20);background:#fbfffc}
.cx70-impact .impact-watch{border-color:rgba(217,119,6,.22);background:#fffdf9}
.cx70-imgad{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:12px;
  margin-top:17px;
  padding:15px;
  border:1px solid rgba(82,109,183,.22);
  border-radius:13px;
  background:#f6f8ff;
}
.cx70-imgad>span{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#fff;
  color:#526db7;
  font-size:16px;
}
.cx70-imgad strong{
  display:block;
  margin-top:5px;
  color:#29405d;
  font-size:14px;
  line-height:1.55;
}
.cx70-imgad p{
  margin:7px 0 0;
  color:#667b91;
  font-size:12.5px;
  line-height:1.6;
}

/* Customer live intelligence */
.cx70-chead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding-bottom:15px;
  border-bottom:1px solid #e5edf2;
}
.cx70-chead h3{margin:0;color:var(--cx70-text);font-size:20px;line-height:1.35}
.cx70-chead p{margin:7px 0 0;color:#65798d;font-size:13px;line-height:1.6}
.cx70-cmetrics{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
  margin-top:15px;
}
.cx70-cmetrics>span{
  min-height:78px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:11px 12px;
  border:1px solid #e0e8ee;
  border-radius:12px;
  background:rgba(255,255,255,.9);
}
.cx70-cmetrics strong{margin-top:5px;color:#17314d;font-size:16px;line-height:1.3}

/* Make the existing Customer 360 container more coherent */
.cx-r67-360 .cx-r67-tabs{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(248,250,252,.96);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid #e1e8ee;
  padding-top:10px;
  padding-bottom:10px;
}
.cx-r67-360 .cx-r67-tab-body{padding-top:4px}
.cx-r67-360 .cx-r67-overview-grid>article,
.cx-r67-360 .cx-r67-row,
.cx-r67-360 .cx-r67-note-grid>article{
  border-color:#e0e8ee!important;
  box-shadow:0 5px 16px rgba(15,23,42,.025);
}
.cx-r67-360 .cx-r67-muted{font-size:12px!important;color:#7d8ea0!important}

/* Loading / error */
.cx70-mainload,.cx70-think{
  min-height:125px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:18px;
  border:1px dashed #d9e4eb;
  border-radius:14px;
  background:#fafcfd;
}
.cx70-mainload strong,.cx70-think strong{color:#344e67;font-size:14px}
.cx70-think small{display:block;margin-top:5px;color:#7f90a1;font-size:12px;line-height:1.45}
.cx70-spin{
  width:30px;
  height:30px;
  border:3px solid #dce5ec;
  border-top-color:var(--cx70-lime);
  border-radius:50%;
  animation:cx70spin .8s linear infinite;
}
@keyframes cx70spin{to{transform:rotate(360deg)}}
.cx70-error{
  padding:14px;
  border:1px solid rgba(239,68,68,.28);
  border-radius:12px;
  background:#fff5f5;
  color:#9f2d2d;
}
.cx70-error strong,.cx70-error span{display:block}
.cx70-error strong{font-size:13px}
.cx70-error span{margin-top:5px;font-size:12px;line-height:1.5}

@media(max-width:1080px){
  .cx70-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cx70-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cx70-cmetrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cx70-why{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .cx70-backdrop{padding:8px}
  .cx70-modal{width:calc(100vw - 16px);max-height:calc(100vh - 16px);padding:0 14px 16px;border-radius:18px}
  .cx70-head{margin:0 -14px 14px;padding:14px}
  .cx70-head h2{font-size:21px}
  .cx70-hero{grid-template-columns:1fr}
  .cx70-facts,.cx70-metrics,.cx70-cmetrics,.cx70-why,.cx70-actions ol,.cx70-impact,.cx70-lowdata{grid-template-columns:1fr}
  .cx70-chead,.cx70-tools{position:static;flex-direction:column;align-items:stretch}
  .cx70-chart svg{height:165px}
  .cx70-card,.cx70-customer{padding:16px}
  .cx70-card>header{flex-direction:column}
  .cx70-badges{justify-content:flex-start}
  .cx70-summary-block h3{font-size:18px}
  .cx70-summary-block p,.cx70-rec p,.cx70-impact p{font-size:13.5px}
}
@media(prefers-reduced-motion:reduce){
  .cx70-card,.cx70-customer,.cx70-spin,.cx-r70-product-row{animation:none!important;transition:none!important}
}
