.cm-context{
  display:grid;
  gap:12px;
  width:100%;
  min-width:0;
  max-width:1150px;
  min-height:660px;
  margin:0 auto;
}
.cm-context__card{
  padding:18px;
  border:1px solid var(--cm-border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--cm-shadow-soft);
  min-width:0;
}
.cm-context__controls{
  display:grid;
  gap:14px;
}
.cm-context__title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  color:var(--cm-title);
  font-size:14px;
  font-weight:800;
  text-transform:uppercase;
}
.cm-context__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}
.cm-context .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:32px;
  padding:0 14px;
  border:1px solid var(--cm-border);
  border-radius:6px;
  background:#fff;
  font:800 14px/1 inherit;
  cursor:pointer;
}
.cm-context .btn.primary{
  background:linear-gradient(180deg, var(--cm-brand) 0%, var(--cm-brand-strong) 100%);
  border-color:var(--cm-brand-strong);
}
.cm-context__filters{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 140px;
  gap:10px;
}
.cm-context__search,
.cm-context__kind{
  min-height:32px;
  padding:8px 12px;
  border:1px solid var(--cm-border);
  border-radius:6px;
  background:#fff;
  font:600 14px/1.3 inherit;
}
.cm-context__search{
  width:100%;
  min-width:0;
  padding-left:30px;
  background-image:url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_11001_43182)'%3E%3Ccircle cx='5.5' cy='5.5' r='4.5' stroke='%23BDBDBD' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 9L11 11' stroke='%23BDBDBD' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_11001_43182'%3E%3Crect width='12' height='12' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:12px center;
  background-size:12px 12px;
}
.cm-context__kind{
  width:100%;
  min-width:0;
}
.cm-context__tablewrap{
  width:100%;
  min-width:0;
  overflow-y:auto;
  overflow-x:auto;
  height:500px;
  border:1px solid var(--cm-border);
  border-radius:12px;
}
.cm-context__table{
  width:100%;
  min-width:920px;
  border-collapse:collapse;
  table-layout:fixed;
}
.cm-context__table th:nth-child(1),
.cm-context__table td:nth-child(1){ width:38px; }
.cm-context__table th:nth-child(2),
.cm-context__table td:nth-child(2){ width:66px; }
.cm-context__table th:nth-child(3),
.cm-context__table td:nth-child(3){ width:96px; }
.cm-context__table th:nth-child(4),
.cm-context__table td:nth-child(4){ width:88px; }
.cm-context__table th:nth-child(5),
.cm-context__table td:nth-child(5){ width:88px; }
.cm-context__table th:nth-child(6),
.cm-context__table td:nth-child(6){ width:72px; }
.cm-context__table th:nth-child(7),
.cm-context__table td:nth-child(7){ width:74px; }
.cm-context__table th:nth-child(8),
.cm-context__table td:nth-child(8){ width:78px; }
.cm-context__table th:nth-child(10),
.cm-context__table td:nth-child(10){ width:112px; }
.cm-context__thead th{
  position:sticky;
  top:0;
  background:#fbfdf7;
  color:#a0b45f;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
}
.cm-context__table th,
.cm-context__table td{
  padding:10px 6px;
  border-bottom:1px solid rgba(214, 230, 185, 0.7);
  vertical-align:top;
}
.center{ text-align:center; }
.nowrap{ white-space:nowrap; }
.cm-context .fld,
.cm-context .editable,
.cm-context select.fld{
  width:100%;
  min-height:30px;
  padding:6px 8px;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  font:600 12px/1.25 inherit;
}
.cm-context .editable{
  min-height:54px;
  white-space:pre-wrap;
  word-break:break-word;
}
.cm-context .editable:focus,
.cm-context .fld:focus{
  outline:none;
  border-color:var(--cm-border-strong);
  background:#fbfdf7;
}
.cm-context .editable:empty:before{
  content:attr(data-placeholder);
  color:#b6b39f;
}
.cm-context .dirty-dot{
  display:none;
  width:8px;
  height:8px;
  margin-right:6px;
  border-radius:50%;
  background:#d18da4;
}
.cm-context tr[data-dirty="true"] .dirty-dot{
  display:inline-block;
}
.cm-context .btn--row{
  min-height:30px;
  width:100px;
  padding:0 10px;
  border:1px solid var(--cm-border);
  border-radius:6px;
  background:#fff;
  cursor:pointer;
}
.cm-context .btn--row.danger{
  background:#fff6f8;
  border-color:var(--cm-danger-border);
}
.cm-context__hint{
  margin-top:10px;
  color:var(--cm-text-soft);
  font-size:12px;
}

@media (max-width: 760px){
  .cm-context__card{
    padding:14px;
  }

  .cm-context__title{
    width:100%;
    max-width:100%;
    line-height:1.1;
  }

  .cm-context__filters{
    grid-template-columns:1fr;
  }

  .cm-context__actions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }

  .cm-context__actions .btn{
    width:100%;
    min-width:0;
  }

  .cm-context__table{
    min-width:720px;
  }
}

@media (max-width: 350px){
  .cm-context__actions{
    grid-template-columns:1fr;
  }
}
