#tab-goals-config{
  --goals-ink:#102445;
  --goals-muted:#657c9f;
  --goals-blue:#0a69ee;
  --goals-line:#d9e6f4;
  --goals-soft:#f5f9fd;
  --goals-card:#fff;
  color:var(--goals-ink);
  background:linear-gradient(135deg,#f8fbff 0%,#f1f7fd 100%);
  padding:18px;
  overflow-x:hidden;
}

#tab-goals-config .goalsMockupHeader{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(430px,.9fr);
  gap:24px;
  align-items:center;
  margin:0 0 20px;
}

#tab-goals-config .goalsMockupTitle .eyebrow{
  color:#4a79d9;
  font-size:13px;
  font-weight:800;
  letter-spacing:.14em;
  margin-bottom:5px;
}

#tab-goals-config .goalsMockupTitle h2{
  color:var(--goals-ink);
  font-size:31px;
  line-height:1.08;
  margin:0 0 5px;
}

#tab-goals-config .goalsMockupTitle p{
  color:var(--goals-muted);
  font-size:15px;
  margin:0;
}

#tab-goals-config .goalsPermissionNotice{
  display:flex;
  align-items:center;
  gap:13px;
  min-height:58px;
  padding:12px 20px;
  border:1px solid #cfe2fb;
  border-radius:13px;
  background:#eef7ff;
  box-shadow:0 6px 20px rgba(30,98,176,.06);
}

#tab-goals-config .goalsPermissionNotice>span{
  display:grid;
  place-items:center;
  flex:0 0 25px;
  width:25px;
  height:25px;
  border-radius:50%;
  color:#fff;
  background:var(--goals-blue);
  font-weight:900;
  font-family:Georgia,serif;
}

#tab-goals-config .goalsPermissionNotice p{
  color:#5376ae;
  font-size:13px;
  line-height:1.45;
  margin:0;
}

#tab-goals-config .goalsConfigCard,
#tab-goals-config .goalsBulkCopyCard{
  padding:18px 20px;
  border:1px solid var(--goals-line);
  border-radius:15px;
  background:var(--goals-card);
  box-shadow:0 8px 24px rgba(32,83,142,.06);
}

#tab-goals-config .goalsConfigCard{margin-bottom:20px}

#tab-goals-config .goalsCardTitle{
  display:flex;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center;
  gap:13px;
  min-height:0!important;
  margin-bottom:16px;
}

#tab-goals-config .goalsCardTitle>div:nth-child(2){flex:1;min-width:0}
#tab-goals-config .goalsCardTitle h3{color:var(--goals-ink);font-size:19px;line-height:1.1;margin:0 0 4px}
#tab-goals-config .goalsCardTitle small{color:var(--goals-muted);font-size:12px}

#tab-goals-config .goalsTitleIcon{
  display:grid;
  place-items:center;
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:12px;
  color:#0869f0;
  background:#edf6ff;
}

#tab-goals-config .goalsTitleIcon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#tab-goals-config .goalsTitleIconCopy{color:#1166ef;background:#edf6ff}

#tab-goals-config .goalsMoreButton{
  margin-left:auto;
  align-self:flex-start;
  width:48px;
  height:48px;
  border:1px solid var(--goals-line);
  border-radius:12px;
  color:var(--goals-blue);
  background:#fff;
  font-size:20px;
  font-weight:900;
  letter-spacing:2px;
}

#tab-goals-config .goalsConfigFilters{
  display:grid;
  gap:14px;
  align-items:end;
  margin:0 0 16px;
}

#tab-goals-config .goalsConfigFiltersPrimary{
  grid-template-columns:minmax(130px,.8fr) minmax(210px,1.35fr) minmax(130px,.75fr) minmax(175px,1fr) 105px 170px;
}

#tab-goals-config .goalsBulkCopyGrid{
  grid-template-columns:minmax(190px,.9fr) minmax(190px,.9fr) minmax(340px,1.25fr) auto 220px;
}

#tab-goals-config .goalsConfigFilters .field{min-width:0;margin:0}
#tab-goals-config .goalsConfigFilters label{display:block;color:var(--goals-ink);font-size:12px;font-weight:800;margin-bottom:7px}
#tab-goals-config .goalsConfigFilters input,
#tab-goals-config .goalsConfigFilters select{
  width:100%;
  min-height:43px;
  border:1px solid #cbd9e9;
  border-radius:9px;
  color:var(--goals-ink);
  background:#fff;
  box-shadow:inset 0 1px 2px rgba(15,39,73,.04);
}

#tab-goals-config .goalsConfigFilters .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:45px;
  border-radius:9px;
  white-space:nowrap;
  font-weight:800;
}

#tab-goals-config .goalsConfigFilters .btn.primary{
  color:#fff!important;
  border-color:#0b6be8!important;
  background:linear-gradient(135deg,#075bc8,#0876fb)!important;
  box-shadow:0 7px 16px rgba(8,105,238,.2);
}

#tab-goals-config #goalsConfigScope{
  position:relative;
  min-height:57px;
  padding:18px 18px 18px 55px;
  border:1px solid #cfe2fb;
  border-radius:11px;
  color:#6c88b5;
  background:#f1f8ff;
  box-sizing:border-box;
  margin:0 0 16px;
}

#tab-goals-config #goalsConfigScope::before{
  content:'▧';
  position:absolute;
  left:20px;
  top:50%;
  translate:0 -50%;
  color:#4f82d9;
  font-size:24px;
}

#tab-goals-config .goalsSummaryCards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:4px 0 16px;
}

#tab-goals-config .goalsSummaryCard{
  position:relative;
  min-width:0;
  min-height:92px;
  padding:16px 16px 14px 66px;
  border:1px solid var(--goals-line);
  border-radius:12px;
  color:var(--goals-ink);
  background:#fff;
  box-sizing:border-box;
}

#tab-goals-config .goalsSummaryCard::before{
  content:'✓';
  position:absolute;
  left:16px;
  top:17px;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:11px;
  color:#0d69e9;
  background:#eaf4ff;
  font-weight:900;
}

#tab-goals-config .goalsSummaryCard:nth-child(2)::before{content:'%';color:#6a46db;background:#f1edff}
#tab-goals-config .goalsSummaryCard:nth-child(3)::before{content:'$';color:#10846d;background:#e7f8f3}
#tab-goals-config .goalsSummaryCard:nth-child(4)::before{content:'●';color:#11a36d;background:#e6f8f0}
#tab-goals-config .goalsSummaryCard span,
#tab-goals-config .goalsSummaryCard small{display:block;color:var(--goals-muted)}
#tab-goals-config .goalsSummaryCard span{font-size:12px;font-weight:800}
#tab-goals-config .goalsSummaryCard strong{display:block;overflow:hidden;color:var(--goals-ink);font-size:22px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
#tab-goals-config .goalsSummaryCard small{font-size:11px;line-height:1.3}

#tab-goals-config .goalsConfigBody{
  display:grid;
  grid-template-columns:minmax(0,1fr) 258px;
  gap:18px;
  align-items:start;
}

#tab-goals-config .goalsConfigMain{min-width:0}

#tab-goals-config .goalsSummaryRail{
  position:sticky;
  top:12px;
  padding:17px;
  border:1px solid var(--goals-line);
  border-radius:12px;
  color:var(--goals-ink);
  background:#fff;
  box-sizing:border-box;
}

#tab-goals-config .goalsSummaryRail h4{margin:0 0 14px;color:var(--goals-ink);font-size:16px}
#tab-goals-config .goalsSummaryRing{
  display:grid;
  place-items:center;
  width:112px;
  height:112px;
  margin:0 auto 16px;
  border:12px solid #e7f7ef;
  border-top-color:#1fb47a;
  border-radius:50%;
  color:var(--goals-ink);
  text-align:center;
  box-sizing:border-box;
}
#tab-goals-config .goalsSummaryRing strong{font-size:20px;line-height:1}
#tab-goals-config .goalsSummaryRing span{color:var(--goals-muted);font-size:10px;line-height:1.15}
#tab-goals-config .goalsSummaryRail dl{margin:0}
#tab-goals-config .goalsSummaryRail dl>div{padding:10px 0;border-top:1px solid var(--goals-line)}
#tab-goals-config .goalsSummaryRail dt{color:var(--goals-muted);font-size:11px;font-weight:800}
#tab-goals-config .goalsSummaryRail dd{margin:3px 0 0;color:var(--goals-ink);font-size:13px;font-weight:800;overflow-wrap:anywhere}

#tab-goals-config .goalsFrozenBanner{
  margin:0 0 12px;
  padding:12px 15px;
  border:1px solid #f0c685;
  border-radius:10px;
  color:#83520d;
  background:#fff8e8;
  font-size:13px;
  font-weight:800;
}

#tab-goals-config #goalsConfigGrid>.tableWrap{
  width:100%;
  overflow-x:auto;
  border:1px solid var(--goals-line);
  border-radius:11px 11px 0 0;
  background:#fff;
}

#tab-goals-config .goalsConfigGridTable{
  width:100%;
  min-width:980px;
  table-layout:fixed;
  border-collapse:collapse;
}

#tab-goals-config .goalsConfigGridTable th{
  padding:13px 17px;
  border-bottom:1px solid var(--goals-line);
  color:var(--goals-ink);
  background:#eaf2fa;
  font-size:13px;
  font-weight:900;
}

#tab-goals-config .goalsConfigGridTable th:nth-child(1){width:24%}
#tab-goals-config .goalsConfigGridTable th:nth-child(2){width:13%}
#tab-goals-config .goalsConfigGridTable th:nth-child(3){width:11%}
#tab-goals-config .goalsConfigGridTable th:nth-child(4){width:14%}
#tab-goals-config .goalsConfigGridTable th:nth-child(5){width:14%}
#tab-goals-config .goalsConfigGridTable th:nth-child(6){width:24%}

#tab-goals-config .goalsConfigGridTable td{
  padding:8px 17px;
  border-bottom:1px solid var(--goals-line);
  color:#516f9c;
  vertical-align:middle;
}

#tab-goals-config .goalsConfigGridTable tr:last-child td{border-bottom:0}
#tab-goals-config .goalsConfigGridTable td strong{display:block;color:var(--goals-ink);font-size:13px;line-height:1.3}
#tab-goals-config .goalsConfigGridTable td small{display:block;color:#6482af;font-size:11px;line-height:1.35;margin-top:2px}
#tab-goals-config .goalsConfigGridTable .goalsImpact{color:#657c9f;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
#tab-goals-config .goalsConfigGridTable input,
#tab-goals-config .goalsConfigGridTable select{
  width:100%;
  min-height:36px;
  padding:6px 10px;
  border:1px solid #cbd9e9;
  border-radius:8px;
  color:var(--goals-ink);
  background:#fff;
  box-sizing:border-box;
}

#tab-goals-config .goalsWeightSummary{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:100%;
  min-height:48px;
  margin:12px 0 0;
  padding:19px 18px 11px 52px;
  border:1px solid #b9e2d4;
  border-radius:10px;
  color:#236651;
  background:#edf9f5;
  box-sizing:border-box;
}

#tab-goals-config .goalsWeightProgress{
  position:absolute;
  top:7px;
  left:52px;
  right:18px;
  height:5px;
  overflow:hidden;
  border-radius:99px;
  background:#d8eee6;
}
#tab-goals-config .goalsWeightProgress i{display:block;height:100%;border-radius:inherit;background:#25ad79;transition:width .2s ease}
#tab-goals-config .goalsWeightSummary.invalid .goalsWeightProgress{background:#f5d9dd}
#tab-goals-config .goalsWeightSummary.invalid .goalsWeightProgress i{background:#d84e61}

#tab-goals-config .goalsWeightSummary::before{
  content:'✓';
  position:absolute;
  left:19px;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:50%;
  color:#fff;
  background:#37a77f;
  font-weight:900;
}

#tab-goals-config .goalsWeightSummary strong{color:#245f4e;font-size:13px}
#tab-goals-config .goalsWeightSummary span{color:#3d7a68;font-size:12px;text-align:right}
#tab-goals-config .goalsWeightSummary.invalid{border-color:#f2b7bf;background:#fff2f4}
#tab-goals-config .goalsWeightSummary.invalid::before{content:'!';background:#d84e61}
#tab-goals-config .goalsWeightSummary.invalid strong,
#tab-goals-config .goalsWeightSummary.invalid span{color:#a73343}

#tab-goals-config .goalsBulkCopyGrid .check{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:45px;
  margin:0;
  white-space:nowrap;
}

#tab-goals-config .goalsBulkCopyGrid .check input{width:20px;min-height:20px;accent-color:var(--goals-blue)}
#tab-goals-config #goalBulkUsers{min-height:92px;padding:8px 10px}
#tab-goals-config .goalsSaveFeedback{color:#607ca6}
#tab-goals-config .goalsSaveFeedback.error{color:#a73343}
#tab-goals-config .goalsSaveFeedback.success{color:#167654}

#tab-goals-config input:disabled,
#tab-goals-config select:disabled{color:#536b8f!important;background:#eef3f8!important;opacity:1}

@media(max-width:1180px){
  #tab-goals-config .goalsMockupHeader{grid-template-columns:1fr 1fr;gap:16px}
  #tab-goals-config .goalsConfigFiltersPrimary,
  #tab-goals-config .goalsBulkCopyGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
  #tab-goals-config .goalsSummaryCards{grid-template-columns:repeat(2,minmax(0,1fr))}
  #tab-goals-config .goalsConfigBody{grid-template-columns:1fr}
  #tab-goals-config .goalsSummaryRail{position:static;display:grid;grid-template-columns:auto 130px minmax(0,1fr);gap:16px;align-items:center}
  #tab-goals-config .goalsSummaryRail h4{margin:0}
  #tab-goals-config .goalsSummaryRing{width:92px;height:92px;margin:0;border-width:10px}
  #tab-goals-config .goalsSummaryRail dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  #tab-goals-config .goalsConfigFiltersPrimary .btn,
  #tab-goals-config .goalsBulkCopyGrid .btn{width:100%}
}

@media(max-width:760px){
  #tab-goals-config{padding:12px}
  #tab-goals-config .goalsMockupHeader{grid-template-columns:1fr}
  #tab-goals-config .goalsMockupTitle h2{font-size:26px}
  #tab-goals-config .goalsPermissionNotice{min-width:0}
  #tab-goals-config .goalsConfigCard,
  #tab-goals-config .goalsBulkCopyCard{padding:15px 12px}
  #tab-goals-config .goalsConfigFiltersPrimary,
  #tab-goals-config .goalsBulkCopyGrid{grid-template-columns:1fr}
  #tab-goals-config .goalsSummaryCards{grid-template-columns:1fr}
  #tab-goals-config .goalsSummaryCard{min-height:82px}
  #tab-goals-config .goalsSummaryRail{display:block}
  #tab-goals-config .goalsSummaryRail h4{margin-bottom:14px}
  #tab-goals-config .goalsSummaryRing{width:104px;height:104px;margin:0 auto 14px}
  #tab-goals-config .goalsSummaryRail dl{display:block}
  #tab-goals-config .goalsMoreButton{width:42px;height:42px}
  #tab-goals-config .goalsWeightSummary{align-items:flex-start;flex-direction:column;padding-left:50px}
  #tab-goals-config .goalsWeightSummary span{text-align:left}
  #tab-goals-config .goalsBulkCopyGrid .check{white-space:normal}
}
