.crm-page{
  padding: 8px 4px;
}

.crm-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.crm-title{
  font-weight:900;
  font-size:26px;
  color:#fff;
}

.crm-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.crm-btn{
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  font-weight:900;
  padding:10px 14px;
}
.crm-btn:hover{ background:rgba(255,255,255,.09); }
.crm-btn.primary{
  border:0;
  background:linear-gradient(180deg,#2c88ff,#1c67ff);
}

.crm-perms{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
.crm-perm{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:10px;
  padding:6px 10px;
  border:1px solid rgba(60,255,120,.18);
  background:rgba(60,255,120,.06);
  color:rgba(120,255,170,.9);
  font-weight:900;
  font-size:12px;
}

.crm-filters{
  display:grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap:14px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.crm-filter-label{ color:rgba(255,255,255,.6); font-size:12px; font-weight:800; margin-bottom:6px; }
.crm-filters .form-select{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.92);
  border-radius:12px;
}
.crm-filters .form-select option{ background:#0f1523; }

.crm-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap:16px;
}

.crm-card{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  padding:14px 14px 12px;
  position:relative;
  min-height: 220px;
}

.crm-card-title{
  font-weight:900;
  color:#fff;
  font-size:18px;
  line-height:1.2;
  padding-right:92px;
}

.crm-card-top{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:10px;
  flex-wrap:nowrap;
  white-space:nowrap;
  overflow:hidden;
}

.crm-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:10px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.9);
  font-weight:900;
  font-size:12px;
}

.crm-meta{
  margin-top:10px;
  color:rgba(255,255,255,.70);
  font-size:13px;
  padding-left: 0px !important;
}

.crm-meta .row{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:5px 0; padding-left: 0px !important;}
.crm-meta .ico{ display:none; }
.crm-meta .muted{ color:rgba(255,255,255,.55); }

.crm-status{
  margin-top:10px;
  border-radius:8px;
  padding:6px 10px;
  font-weight:900;
  font-size:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(150,255,200,.16);
  color:rgba(200,255,230,.95);
}

.crm-desc{
  margin-top:10px;
  color:rgba(255,255,255,.82);
  font-size:13px;
  white-space:pre-wrap;
}

.crm-card-footer{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.crm-avatar{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.crm-avatar .circle{
  width:30px; height:30px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#0f1523;
  background:rgba(255,255,255,.85);
}
.crm-avatar .name{ color:rgba(255,255,255,.92); font-weight:900; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.crm-date{ color:rgba(255,255,255,.45); font-size:12px; display:flex; align-items:center; gap:6px; }

.crm-card-tools{
  position:absolute;
  top:10px;
  right:10px;
  display:flex;
  gap:8px;
}
.crm-ic{
  width:30px; height:30px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.85);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.crm-ic:hover{ background:rgba(255,255,255,.08); }
.crm-ic.danger{ border-color:rgba(255,107,107,.25); color:#ff6b6b; }

.crm-empty{
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.14);
  background:rgba(255,255,255,.02);
  padding:18px;
  color:rgba(255,255,255,.55);
  text-align:center;
}

@media (max-width: 1200px){
  .crm-grid{ grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .crm-filters{ grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 720px){
  .crm-grid{ grid-template-columns: 1fr; }
  .crm-filters{ grid-template-columns: 1fr; }
}
