/* Conteo visual refresh. Structure and IDs stay intact. */
body[data-active-view="count"] #count.view.active {
  padding: var(--dm-work-top) var(--dm-work-x) var(--dm-work-bottom);
  overflow: auto;
}

#count .count-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
  align-items: start;
}

#count .count-layout > .panel:first-child {
  display: contents;
}

#count .count-layout > .panel:first-child > .panel-heading {
  display: none;
}

#count .count-top-grid,
#count .scan-dashboard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

#count .count-control-block,
#count .count-location-zone,
#count .scan-dashboard > section,
#count .sticky-summary {
  border: 1px solid #e3e8f3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(7, 26, 68, 0.07);
}

#count .count-control-block {
  min-height: 166px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

#count .count-control-block::after {
  content: "";
  order: 1;
  height: 1px;
  background: #e3e8f3;
}

#count .session-actions {
  order: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin: 0;
}

#count .count-mode-actions {
  order: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
}

#count #startSessionBtn,
#count #closeSessionBtn,
#count #openManualCountBtn,
#count #useLocationBtn,
#count #finishLocationBtn {
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
}

#count #startSessionBtn {
  width: 154px;
  background: #ef1736;
  border-color: #ef1736;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(239, 23, 54, 0.18);
}

#count #closeSessionBtn {
  width: 156px;
  background: #ffffff;
  border: 1px solid #d9e1f2;
  color: #071a44;
}

#count #openManualCountBtn {
  width: 170px;
  background: #f6f9ff;
  border: 1px solid #bfd2ff;
  color: #0057d9;
  box-shadow: none;
}

#count #startSessionBtn::before,
#count #closeSessionBtn::before,
#count #openManualCountBtn::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  display: inline-block;
}

#count #startSessionBtn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M9 15l2 2 4-5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M9 15l2 2 4-5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#count #closeSessionBtn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#count #openManualCountBtn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='14' rx='2'/%3E%3Cpath d='M7 10h10M7 14h10M8 3v5M16 3v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='14' rx='2'/%3E%3Cpath d='M7 10h10M7 14h10M8 3v5M16 3v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#count #sessionStatus,
#count #activeLocationStatus {
  color: #536487;
  font-size: 14px;
  font-weight: 700;
}

#count .count-location-zone {
  min-height: 166px;
  padding: 50px 24px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

#count .count-location-zone label {
  flex: 0 0 260px;
  margin: 0;
  color: #071a44;
  font-size: 14px;
  font-weight: 800;
  position: static;
}

#count .count-location-zone label::before {
  content: "Ubicación activa";
  position: absolute;
  left: 24px;
  top: 54px;
  color: #071a44;
  font-size: 14px;
  font-weight: 900;
}

#count .count-location-zone label {
  font-size: 0;
}

#count .count-location-zone input {
  width: 260px;
  height: 42px;
  margin-top: 28px;
  border: 1px solid #d9e1f2;
  border-radius: 8px;
  background: #ffffff;
  color: #071a44;
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
}

#count #useLocationBtn,
#count #finishLocationBtn {
  width: 92px;
  background: #ffffff;
  color: #0057d9;
  border: 1px solid #9fc0ff;
  box-shadow: none;
  margin-top: 28px;
}

#count #activeLocationStatus {
  margin-top: 28px;
  margin-left: 16px;
}

#count .scan-dashboard > section {
  min-height: 174px;
  padding: 22px 18px 14px;
  overflow: hidden;
}

#count .compact-heading,
#count .sticky-summary .panel-heading h2 {
  min-height: 30px;
  margin: 0 0 14px;
  padding: 0 0 0 36px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e3e8f3;
  padding-bottom: 14px;
  color: #071a44;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
  position: relative;
}

#count .compact-heading::before,
#count .sticky-summary .panel-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: #0b6fe8;
}

#count .scan-dashboard > section:first-child .compact-heading::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-8M22 19H2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-8M22 19H2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#count .scan-dashboard > section:nth-child(2) .compact-heading::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#count .count-progress-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid #e3e8f3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(7, 26, 68, 0.07);
}

#count .count-progress-card {
  min-height: 174px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 132px minmax(150px, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid #dbe7f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

#count .count-progress-copy h2 {
  margin: 0;
  color: #071a44;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
}

#count .count-progress-copy span {
  display: block;
  margin-top: 5px;
  color: #536487;
  font-size: 12px;
  font-weight: 800;
}

#count .count-donut {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--donut-chart, conic-gradient(#dbe5f4 0 100%));
  box-shadow: 0 14px 24px rgba(7, 26, 68, 0.08);
  display: grid;
  place-items: center;
  position: relative;
}

#count .count-donut::after {
  content: "";
  position: absolute;
  inset: 35px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #edf2f8;
}

#count .count-donut span {
  position: relative;
  z-index: 1;
  color: #071a44;
  font-size: 18px;
  font-weight: 900;
}

#count .count-donut-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
}

#count .count-donut-legend div {
  min-width: 0;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #536487;
  font-size: 12px;
  font-weight: 800;
}

#count .count-donut-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #dbe5f4;
}

#count .count-donut-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#count .count-donut-legend strong {
  color: #071a44;
  font-weight: 900;
  white-space: nowrap;
}

#count .count-donut-legend .count-dot-blue {
  background: #0069df;
}

#count .count-donut-legend .count-dot-orange {
  background: #f59e0b;
}

#count .scan-table-wrap {
  max-height: 114px;
  border: 0;
  border-radius: 0;
  overflow: auto;
}

#count .scan-table-wrap table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #09265a;
  font-size: 13px;
}

#count .scan-table-wrap th,
#count .scan-table-wrap td {
  height: 38px;
  padding: 7px 14px;
  border: 0;
  color: #09265a;
  font-size: 13px;
}

#count .scan-table-wrap th {
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  font-weight: 900;
}

#count .scan-table-wrap td[colspan] {
  height: 48px;
  border-radius: 8px;
  background: #f3f8ff;
  color: #536487;
  font-weight: 700;
}

#count .sticky-summary {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 204px;
  padding: 22px 18px 24px;
}

#count .sticky-summary .panel-heading {
  margin: 0;
  padding: 0;
  display: block;
}

#count .sticky-summary .panel-heading h2::before {
  background: #0b6fe8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#count .validation {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  margin: 22px 0 0;
}

#count .validation div {
  min-height: 86px;
  padding: 16px 16px 14px 78px;
  border: 1px solid #e3e8f3;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
  position: relative;
  align-content: center;
  gap: 7px;
}

#count .validation div::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--val-soft, #eef3ff);
}

#count .validation div::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  background: var(--val-color, #0b6fe8);
  -webkit-mask: var(--val-icon) center / contain no-repeat;
  mask: var(--val-icon) center / contain no-repeat;
}

#count .validation div:nth-child(1) {
  --val-color: #2563eb;
  --val-soft: #eef3ff;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 9 5-9 5-9-5 9-5Z'/%3E%3Cpath d='m3 12 9 5 9-5'/%3E%3Cpath d='m3 17 9 5 9-5'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation div:nth-child(2) {
  --val-color: #16a34a;
  --val-soft: #edfdf4;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h6'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation div:nth-child(3) {
  --val-color: #7c3aed;
  --val-soft: #f4efff;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation div:nth-child(4) {
  --val-color: #f97316;
  --val-soft: #fff4e8;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5v14M9 5v14M13 5v14M17 5v14M21 5v14'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation div:nth-child(5) {
  --val-color: #ec4899;
  --val-soft: #fff0f7;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M5 7h14'/%3E%3Cpath d='m6 7-3 6h6L6 7Z'/%3E%3Cpath d='m18 7-3 6h6l-3-6Z'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation div:nth-child(6) {
  --val-color: #0ea5a8;
  --val-soft: #eafafa;
  --val-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 12 2 2 4-5'/%3E%3C/g%3E%3C/svg%3E");
}

#count .validation dt {
  color: #536487;
  font-size: 13px;
  font-weight: 700;
}

#count .validation dd {
  color: #071a44;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
}
